@recursica/mui-adapter 0.5.0 → 0.6.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/CHANGELOG.md +9 -0
- package/dist/mui-adapter.cjs +74 -1
- package/dist/mui-adapter.cjs.map +1 -1
- package/dist/mui-adapter.css +1 -1
- package/dist/mui-adapter.js +6652 -204
- package/dist/mui-adapter.js.map +1 -1
- package/dist/src/components/Accordion/Accordion.d.ts +63 -2
- package/dist/src/components/AssistiveElement/AssistiveElement.d.ts +9 -2
- package/dist/src/components/Autocomplete/Autocomplete.d.ts +16 -2
- package/dist/src/components/Avatar/Avatar.d.ts +14 -2
- package/dist/src/components/Badge/Badge.d.ts +13 -3
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +10 -3
- package/dist/src/components/Button/Button.d.ts +1 -1
- package/dist/src/components/Card/Card.d.ts +40 -3
- package/dist/src/components/Checkbox/Checkbox.d.ts +15 -2
- package/dist/src/components/Checkbox/CheckboxGroup.d.ts +16 -0
- package/dist/src/components/Checkbox/index.d.ts +5 -1
- package/dist/src/components/Chip/Chip.d.ts +18 -2
- package/dist/src/components/Dropdown/Dropdown.d.ts +23 -3
- package/dist/src/components/FormControlLayout/FormControlLayout.d.ts +10 -2
- package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +24 -2
- package/dist/src/components/HoverCard/HoverCard.d.ts +55 -3
- package/dist/src/components/Label/Label.d.ts +13 -2
- package/dist/src/components/Link/Link.d.ts +1 -1
- package/dist/src/components/Menu/Menu.d.ts +99 -3
- package/dist/src/components/Modal/Modal.d.ts +36 -2
- package/dist/src/components/NumberInput/NumberInput.d.ts +14 -2
- package/dist/src/components/Pagination/Pagination.d.ts +44 -2
- package/dist/src/components/Pagination/Pagination.icons.d.ts +8 -0
- package/dist/src/components/Panel/Panel.d.ts +65 -3
- package/dist/src/components/Radio/Radio.d.ts +13 -3
- package/dist/src/components/Radio/RadioGroup.d.ts +13 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyBooleanField.d.ts +5 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyField.d.ts +7 -2
- package/dist/src/components/ReadOnlyField/ReadOnlySwitchField.d.ts +5 -0
- package/dist/src/components/ReadOnlyField/ReadOnlyTextField.d.ts +8 -0
- package/dist/src/components/ReadOnlyField/WithReadOnlyWrapper.d.ts +28 -0
- package/dist/src/components/ReadOnlyField/index.d.ts +1 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +31 -3
- package/dist/src/components/Slider/Slider.d.ts +28 -2
- package/dist/src/components/Stepper/Stepper.d.ts +21 -2
- package/dist/src/components/Switch/Switch.d.ts +10 -3
- package/dist/src/components/Switch/SwitchGroup.d.ts +13 -0
- package/dist/src/components/Tabs/Tabs.d.ts +35 -3
- package/dist/src/components/Text/Text.d.ts +1 -1
- package/dist/src/components/TextArea/TextArea.d.ts +18 -2
- package/dist/src/components/TextField/TextField.d.ts +16 -2
- package/dist/src/components/Timeline/Timeline.d.ts +14 -2
- package/dist/src/components/Timeline/TimelineItem.d.ts +29 -0
- package/dist/src/components/Title/Title.d.ts +1 -1
- package/dist/src/components/Toast/Toast.d.ts +25 -2
- package/dist/src/components/Tooltip/Tooltip.d.ts +42 -3
- package/dist/src/components/Typography/Typography.d.ts +1 -1
- package/package.json +9 -2
- package/src/components/Accordion/Accordion.module.css +295 -56
- package/src/components/Accordion/Accordion.stories.tsx +149 -21
- package/src/components/Accordion/Accordion.tsx +264 -5
- package/src/components/AssistiveElement/AssistiveElement.module.css +111 -20
- package/src/components/AssistiveElement/AssistiveElement.stories.tsx +76 -19
- package/src/components/AssistiveElement/AssistiveElement.tsx +85 -5
- package/src/components/Autocomplete/Autocomplete.module.css +320 -42
- package/src/components/Autocomplete/Autocomplete.stories.tsx +180 -19
- package/src/components/Autocomplete/Autocomplete.tsx +199 -6
- package/src/components/Avatar/Avatar.module.css +343 -73
- package/src/components/Avatar/Avatar.stories.tsx +94 -22
- package/src/components/Avatar/Avatar.tsx +110 -6
- package/src/components/Badge/Badge.module.css +127 -29
- package/src/components/Badge/Badge.stories.tsx +65 -22
- package/src/components/Badge/Badge.tsx +70 -6
- package/src/components/Breadcrumb/Breadcrumb.module.css +25 -5
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +57 -22
- package/src/components/Breadcrumb/Breadcrumb.tsx +62 -6
- package/src/components/Button/Button.module.css +3 -3
- package/src/components/Card/Card.module.css +118 -38
- package/src/components/Card/Card.stories.tsx +117 -19
- package/src/components/Card/Card.tsx +179 -5
- package/src/components/Checkbox/Checkbox.module.css +232 -39
- package/src/components/Checkbox/Checkbox.stories.tsx +81 -19
- package/src/components/Checkbox/Checkbox.tsx +146 -5
- package/src/components/Checkbox/CheckboxGroup.tsx +117 -0
- package/src/components/Checkbox/index.ts +6 -1
- package/src/components/Chip/Chip.module.css +228 -43
- package/src/components/Chip/Chip.stories.tsx +101 -21
- package/src/components/Chip/Chip.tsx +138 -6
- package/src/components/Dropdown/Dropdown.module.css +291 -41
- package/src/components/Dropdown/Dropdown.stories.tsx +80 -21
- package/src/components/Dropdown/Dropdown.tsx +182 -6
- package/src/components/FormControlLayout/FormControlLayout.module.css +92 -0
- package/src/components/FormControlLayout/FormControlLayout.stories.tsx +74 -19
- package/src/components/FormControlLayout/FormControlLayout.tsx +58 -4
- package/src/components/FormControlWrapper/FormControlWrapper.module.css +96 -0
- package/src/components/FormControlWrapper/FormControlWrapper.stories.tsx +122 -19
- package/src/components/FormControlWrapper/FormControlWrapper.tsx +145 -6
- package/src/components/HoverCard/HoverCard.module.css +90 -22
- package/src/components/HoverCard/HoverCard.stories.tsx +158 -21
- package/src/components/HoverCard/HoverCard.tsx +150 -5
- package/src/components/Label/Label.module.css +136 -35
- package/src/components/Label/Label.stories.tsx +98 -17
- package/src/components/Label/Label.tsx +88 -5
- package/src/components/Menu/Menu.module.css +285 -51
- package/src/components/Menu/Menu.stories.tsx +307 -21
- package/src/components/Menu/Menu.tsx +318 -5
- package/src/components/Modal/Modal.module.css +171 -35
- package/src/components/Modal/Modal.stories.tsx +66 -22
- package/src/components/Modal/Modal.tsx +216 -4
- package/src/components/NumberInput/NumberInput.module.css +276 -42
- package/src/components/NumberInput/NumberInput.stories.tsx +83 -20
- package/src/components/NumberInput/NumberInput.tsx +148 -6
- package/src/components/Pagination/Pagination.icons.tsx +66 -0
- package/src/components/Pagination/Pagination.module.css +246 -20
- package/src/components/Pagination/Pagination.stories.tsx +42 -21
- package/src/components/Pagination/Pagination.tsx +193 -5
- package/src/components/Panel/Panel.module.css +206 -38
- package/src/components/Panel/Panel.stories.tsx +214 -22
- package/src/components/Panel/Panel.tsx +153 -5
- package/src/components/Radio/Radio.module.css +220 -37
- package/src/components/Radio/Radio.stories.tsx +77 -19
- package/src/components/Radio/Radio.tsx +178 -5
- package/src/components/Radio/RadioGroup.tsx +111 -0
- package/src/components/ReadOnlyField/ReadOnlyBooleanField.tsx +21 -0
- package/src/components/ReadOnlyField/ReadOnlyField.module.css +53 -15
- package/src/components/ReadOnlyField/ReadOnlyField.stories.tsx +175 -16
- package/src/components/ReadOnlyField/ReadOnlyField.tsx +109 -5
- package/src/components/ReadOnlyField/ReadOnlySwitchField.tsx +21 -0
- package/src/components/ReadOnlyField/ReadOnlyTextField.tsx +48 -0
- package/src/components/ReadOnlyField/WithReadOnlyWrapper.tsx +93 -0
- package/src/components/ReadOnlyField/index.ts +1 -0
- package/src/components/SegmentedControl/SegmentedControl.module.css +203 -47
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +102 -20
- package/src/components/SegmentedControl/SegmentedControl.tsx +110 -6
- package/src/components/Slider/Slider.module.css +542 -86
- package/src/components/Slider/Slider.stories.tsx +157 -19
- package/src/components/Slider/Slider.tsx +282 -5
- package/src/components/Stepper/Stepper.module.css +410 -71
- package/src/components/Stepper/Stepper.stories.tsx +132 -19
- package/src/components/Stepper/Stepper.tsx +145 -6
- package/src/components/Switch/Switch.module.css +238 -39
- package/src/components/Switch/Switch.stories.tsx +98 -19
- package/src/components/Switch/Switch.tsx +153 -6
- package/src/components/Switch/SwitchGroup.tsx +111 -0
- package/src/components/Tabs/Tabs.module.css +422 -79
- package/src/components/Tabs/Tabs.stories.tsx +138 -19
- package/src/components/Tabs/Tabs.tsx +103 -6
- package/src/components/TextArea/TextArea.module.css +155 -32
- package/src/components/TextArea/TextArea.stories.tsx +80 -21
- package/src/components/TextArea/TextArea.tsx +156 -6
- package/src/components/TextField/TextField.module.css +261 -42
- package/src/components/TextField/TextField.stories.tsx +168 -15
- package/src/components/TextField/TextField.tsx +171 -6
- package/src/components/Timeline/Timeline.module.css +365 -76
- package/src/components/Timeline/Timeline.stories.tsx +114 -21
- package/src/components/Timeline/Timeline.tsx +80 -5
- package/src/components/Timeline/TimelineItem.tsx +101 -0
- package/src/components/Toast/Toast.module.css +166 -28
- package/src/components/Toast/Toast.stories.tsx +54 -22
- package/src/components/Toast/Toast.tsx +90 -5
- package/src/components/Tooltip/Tooltip.module.css +89 -24
- package/src/components/Tooltip/Tooltip.stories.tsx +152 -22
- package/src/components/Tooltip/Tooltip.tsx +114 -5
|
@@ -1,8 +1,196 @@
|
|
|
1
|
-
|
|
2
|
-
import "
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import React, { forwardRef } from "react";
|
|
3
|
+
import {
|
|
4
|
+
Pagination as MuiPagination,
|
|
5
|
+
type PaginationProps as MuiPaginationProps,
|
|
6
|
+
type PaginationRootProps as MuiPaginationRootProps,
|
|
7
|
+
} from "@mui/material";
|
|
8
|
+
import {
|
|
9
|
+
filterStylingProps,
|
|
10
|
+
type RecursicaOverStyled,
|
|
11
|
+
} from "../../utils/filterStylingProps";
|
|
12
|
+
import styles from "./Pagination.module.css";
|
|
13
|
+
import {
|
|
14
|
+
NextWithLabel,
|
|
15
|
+
PrevWithLabel,
|
|
16
|
+
FirstWithLabel,
|
|
17
|
+
LastWithLabel,
|
|
18
|
+
PaginationIcon,
|
|
19
|
+
} from "./Pagination.icons";
|
|
3
20
|
|
|
4
|
-
export type PaginationProps =
|
|
21
|
+
export type PaginationProps = RecursicaOverStyled<MuiPaginationProps> & {
|
|
22
|
+
/** If set to true, displays text labels alongside the icons for next/previous/first/last edges. */
|
|
23
|
+
withLabels?: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type PaginationRootProps = RecursicaOverStyled<MuiPaginationRootProps>;
|
|
27
|
+
|
|
28
|
+
export type PaginationEdgeProps<T extends React.ElementType> =
|
|
29
|
+
React.ComponentProps<T> & {
|
|
30
|
+
/** If set to true, displays text labels alongside the icon. */
|
|
31
|
+
withLabel?: boolean;
|
|
32
|
+
icon?: any;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
function usePaginationClassNames(restRecord: Record<string, unknown>): {
|
|
36
|
+
className: string;
|
|
37
|
+
classNames: Partial<Record<string, string>>;
|
|
38
|
+
} {
|
|
39
|
+
const mergedClassNames: Partial<Record<string, string>> = {
|
|
40
|
+
root: styles.root,
|
|
41
|
+
control: styles.control,
|
|
42
|
+
dots: styles.dots,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const classNamesProp = restRecord.classNames;
|
|
46
|
+
if (
|
|
47
|
+
classNamesProp &&
|
|
48
|
+
typeof classNamesProp === "object" &&
|
|
49
|
+
!Array.isArray(classNamesProp)
|
|
50
|
+
) {
|
|
51
|
+
const o = classNamesProp as Partial<Record<string, string>>;
|
|
52
|
+
mergedClassNames.root = o.root ? `${styles.root} ${o.root}` : styles.root;
|
|
53
|
+
mergedClassNames.control = o.control
|
|
54
|
+
? `${styles.control} ${o.control}`
|
|
55
|
+
: styles.control;
|
|
56
|
+
mergedClassNames.dots = o.dots ? `${styles.dots} ${o.dots}` : styles.dots;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const classNameProp = restRecord.className as string | undefined;
|
|
60
|
+
const finalClass = classNameProp
|
|
61
|
+
? `${styles.root} ${classNameProp}`
|
|
62
|
+
: styles.root;
|
|
63
|
+
|
|
64
|
+
return { className: finalClass, classNames: mergedClassNames };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const _PaginationRoot = forwardRef<HTMLDivElement, PaginationRootProps>(
|
|
68
|
+
function PaginationRoot({ overStyled = false, ...rest }, ref) {
|
|
69
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
70
|
+
const stylingParams = usePaginationClassNames(
|
|
71
|
+
sanitizedProps as Record<string, unknown>,
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<div
|
|
76
|
+
ref={ref}
|
|
77
|
+
className={stylingParams.className}
|
|
78
|
+
classes={stylingParams.classNames}
|
|
79
|
+
{...(sanitizedProps as MuiPaginationRootProps)}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
},
|
|
83
|
+
);
|
|
84
|
+
_PaginationRoot.displayName = "Pagination.Root";
|
|
5
85
|
|
|
6
|
-
|
|
7
|
-
|
|
86
|
+
const _PaginationNext = forwardRef<
|
|
87
|
+
HTMLButtonElement,
|
|
88
|
+
PaginationEdgeProps<typeof MuiPagination.Next>
|
|
89
|
+
>(function PaginationNext({ withLabel, icon, ...props }, ref) {
|
|
90
|
+
const renderIcon = icon || (withLabel ? NextWithLabel : undefined);
|
|
91
|
+
return (
|
|
92
|
+
<div ref={ref} data-variant="text" icon={renderIcon as any} {...props} />
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
|
+
_PaginationNext.displayName = "Pagination.Next";
|
|
96
|
+
|
|
97
|
+
const _PaginationPrevious = forwardRef<
|
|
98
|
+
HTMLButtonElement,
|
|
99
|
+
PaginationEdgeProps<typeof MuiPagination.Previous>
|
|
100
|
+
>(function PaginationPrevious({ withLabel, icon, ...props }, ref) {
|
|
101
|
+
const renderIcon = icon || (withLabel ? PrevWithLabel : undefined);
|
|
102
|
+
return (
|
|
103
|
+
<div ref={ref} data-variant="text" icon={renderIcon as any} {...props} />
|
|
104
|
+
);
|
|
105
|
+
});
|
|
106
|
+
_PaginationPrevious.displayName = "Pagination.Previous";
|
|
107
|
+
|
|
108
|
+
const _PaginationFirst = forwardRef<
|
|
109
|
+
HTMLButtonElement,
|
|
110
|
+
PaginationEdgeProps<typeof MuiPagination.First>
|
|
111
|
+
>(function PaginationFirst({ withLabel, icon, ...props }, ref) {
|
|
112
|
+
const renderIcon = icon || (withLabel ? FirstWithLabel : undefined);
|
|
113
|
+
return (
|
|
114
|
+
<div ref={ref} data-variant="text" icon={renderIcon as any} {...props} />
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
_PaginationFirst.displayName = "Pagination.First";
|
|
118
|
+
|
|
119
|
+
const _PaginationLast = forwardRef<
|
|
120
|
+
HTMLButtonElement,
|
|
121
|
+
PaginationEdgeProps<typeof MuiPagination.Last>
|
|
122
|
+
>(function PaginationLast({ withLabel, icon, ...props }, ref) {
|
|
123
|
+
const renderIcon = icon || (withLabel ? LastWithLabel : undefined);
|
|
124
|
+
return (
|
|
125
|
+
<div ref={ref} data-variant="text" icon={renderIcon as any} {...props} />
|
|
126
|
+
);
|
|
127
|
+
});
|
|
128
|
+
_PaginationLast.displayName = "Pagination.Last";
|
|
129
|
+
|
|
130
|
+
const _Pagination = forwardRef<HTMLDivElement, PaginationProps>(
|
|
131
|
+
function Pagination(
|
|
132
|
+
{ overStyled = false, getControlProps, withLabels, ...rest },
|
|
133
|
+
ref,
|
|
134
|
+
) {
|
|
135
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
136
|
+
const stylingParams = usePaginationClassNames(
|
|
137
|
+
sanitizedProps as Record<string, unknown>,
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
const mergedGetControlProps = (
|
|
141
|
+
control: "first" | "previous" | "last" | "next",
|
|
142
|
+
) => {
|
|
143
|
+
const baseProps = { "data-variant": "text" };
|
|
144
|
+
if (getControlProps) {
|
|
145
|
+
return { ...baseProps, ...getControlProps(control) };
|
|
146
|
+
}
|
|
147
|
+
return baseProps;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const labelsIcons = withLabels
|
|
151
|
+
? {
|
|
152
|
+
nextIcon: NextWithLabel,
|
|
153
|
+
previousIcon: PrevWithLabel,
|
|
154
|
+
firstIcon: FirstWithLabel,
|
|
155
|
+
lastIcon: LastWithLabel,
|
|
156
|
+
}
|
|
157
|
+
: {};
|
|
158
|
+
|
|
159
|
+
return (
|
|
160
|
+
<MuiPagination
|
|
161
|
+
ref={ref}
|
|
162
|
+
className={stylingParams.className}
|
|
163
|
+
classes={stylingParams.classNames}
|
|
164
|
+
getControlProps={mergedGetControlProps}
|
|
165
|
+
{...labelsIcons}
|
|
166
|
+
{...(sanitizedProps as MuiPaginationProps)}
|
|
167
|
+
/>
|
|
168
|
+
);
|
|
169
|
+
},
|
|
170
|
+
);
|
|
171
|
+
_Pagination.displayName = "Pagination";
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Recursica Pagination component wrapping Mui's Pagination.
|
|
175
|
+
*/
|
|
176
|
+
export const Pagination = _Pagination as typeof _Pagination & {
|
|
177
|
+
Root: typeof _PaginationRoot;
|
|
178
|
+
Items: typeof MuiPagination.Items;
|
|
179
|
+
Control: typeof MuiPagination.Control;
|
|
180
|
+
Dots: typeof MuiPagination.Dots;
|
|
181
|
+
Next: typeof _PaginationNext;
|
|
182
|
+
Previous: typeof _PaginationPrevious;
|
|
183
|
+
First: typeof _PaginationFirst;
|
|
184
|
+
Last: typeof _PaginationLast;
|
|
185
|
+
Icon: typeof PaginationIcon;
|
|
8
186
|
};
|
|
187
|
+
|
|
188
|
+
Pagination.Root = _PaginationRoot;
|
|
189
|
+
Pagination.Items = MuiPagination.Items;
|
|
190
|
+
Pagination.Control = MuiPagination.Control;
|
|
191
|
+
Pagination.Dots = MuiPagination.Dots;
|
|
192
|
+
Pagination.Next = _PaginationNext;
|
|
193
|
+
Pagination.Previous = _PaginationPrevious;
|
|
194
|
+
Pagination.First = _PaginationFirst;
|
|
195
|
+
Pagination.Last = _PaginationLast;
|
|
196
|
+
Pagination.Icon = PaginationIcon;
|
|
@@ -1,38 +1,206 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
/* HARDCODED VALUES:
|
|
2
|
+
- border-style: solid: Structural rendering rule for the panel border.
|
|
3
|
+
- .inner { left: 0 }: Prevents the fixed Drawer portal from being pushed off-screen in centered flex environments (like Storybook Canvas).
|
|
4
|
+
- flexbox layout on .content & .body: Required to create a vertical flex context that pushes the footer to the bottom.
|
|
5
|
+
- position: sticky & negative margins on .footer: A CSS technique used to break the footer out of the .body padding constraints so it stretches edge-to-edge, while remaining fixed at the bottom of the scroll container.
|
|
6
|
+
- z-index: 10 on .footer: Ensures the footer covers the body content as it scrolls underneath.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/* ======================================
|
|
10
|
+
PANEL CONTENT (outer drawer container)
|
|
11
|
+
====================================== */
|
|
12
|
+
|
|
13
|
+
.content {
|
|
14
|
+
background-color: var(
|
|
15
|
+
--recursica_ui-kit_components_panel_properties_colors_background
|
|
16
|
+
);
|
|
17
|
+
border-style: solid;
|
|
18
|
+
border-width: var(--recursica_ui-kit_components_panel_properties_border-size);
|
|
19
|
+
border-color: var(
|
|
20
|
+
--recursica_ui-kit_components_panel_properties_colors_border-color
|
|
21
|
+
);
|
|
22
|
+
border-radius: var(
|
|
23
|
+
--recursica_ui-kit_components_panel_properties_border-radius
|
|
24
|
+
);
|
|
25
|
+
box-shadow: var(--recursica_ui-kit_components_panel_properties_elevation);
|
|
26
|
+
min-width: var(--recursica_ui-kit_components_panel_properties_min-width);
|
|
27
|
+
max-width: var(--recursica_ui-kit_components_panel_properties_max-width);
|
|
28
|
+
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
height: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.inner {
|
|
35
|
+
/* Forces the Drawer Inner container to the left edge, preventing it from inheriting
|
|
36
|
+
a centered static position in flex environments like Storybook's Canvas wrapper */
|
|
37
|
+
left: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ======================================
|
|
41
|
+
PANEL HEADER
|
|
42
|
+
====================================== */
|
|
43
|
+
|
|
44
|
+
.header {
|
|
45
|
+
background-color: var(
|
|
46
|
+
--recursica_ui-kit_components_panel_properties_colors_header-footer-background
|
|
47
|
+
);
|
|
48
|
+
padding: var(
|
|
49
|
+
--recursica_ui-kit_components_panel_properties_header-footer-vertical-padding
|
|
50
|
+
)
|
|
51
|
+
var(
|
|
52
|
+
--recursica_ui-kit_components_panel_properties_header-footer-horizontal-padding
|
|
53
|
+
);
|
|
54
|
+
border-bottom: var(
|
|
55
|
+
--recursica_ui-kit_components_panel_properties_divider-size
|
|
56
|
+
)
|
|
57
|
+
solid
|
|
58
|
+
var(--recursica_ui-kit_components_panel_properties_colors_divider-color);
|
|
59
|
+
gap: var(--recursica_ui-kit_components_panel_properties_header-close-gap);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* ======================================
|
|
63
|
+
PANEL TITLE
|
|
64
|
+
====================================== */
|
|
65
|
+
|
|
66
|
+
.title {
|
|
67
|
+
color: var(--recursica_ui-kit_components_panel_properties_colors_title);
|
|
68
|
+
|
|
69
|
+
/* Direct Figma Typography Mapping */
|
|
70
|
+
font-family: var(
|
|
71
|
+
--recursica_ui-kit_components_panel_properties_header-style_fontFamily
|
|
72
|
+
);
|
|
73
|
+
font-size: var(
|
|
74
|
+
--recursica_ui-kit_components_panel_properties_header-style_fontSize
|
|
75
|
+
);
|
|
76
|
+
font-style: var(
|
|
77
|
+
--recursica_ui-kit_components_panel_properties_header-style_fontStyle
|
|
78
|
+
);
|
|
79
|
+
font-weight: var(
|
|
80
|
+
--recursica_ui-kit_components_panel_properties_header-style_fontWeight
|
|
81
|
+
);
|
|
82
|
+
letter-spacing: var(
|
|
83
|
+
--recursica_ui-kit_components_panel_properties_header-style_letterSpacing
|
|
84
|
+
);
|
|
85
|
+
line-height: var(
|
|
86
|
+
--recursica_ui-kit_components_panel_properties_header-style_lineHeight
|
|
87
|
+
);
|
|
88
|
+
text-transform: var(
|
|
89
|
+
--recursica_ui-kit_components_panel_properties_header-style_textCase
|
|
90
|
+
);
|
|
91
|
+
text-decoration: var(
|
|
92
|
+
--recursica_ui-kit_components_panel_properties_header-style_textDecoration
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.titleTruncate {
|
|
97
|
+
composes: title;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
display: block;
|
|
102
|
+
flex: 1;
|
|
103
|
+
min-width: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* ======================================
|
|
107
|
+
PANEL BODY
|
|
108
|
+
====================================== */
|
|
109
|
+
|
|
110
|
+
.body {
|
|
111
|
+
padding: var(
|
|
112
|
+
--recursica_ui-kit_components_panel_properties_content-vertical-padding
|
|
113
|
+
)
|
|
114
|
+
var(
|
|
115
|
+
--recursica_ui-kit_components_panel_properties_content-horizontal-padding
|
|
116
|
+
);
|
|
117
|
+
color: var(--recursica_ui-kit_components_panel_properties_colors_content);
|
|
118
|
+
|
|
119
|
+
flex: 1;
|
|
120
|
+
display: flex;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
overflow-y: auto;
|
|
123
|
+
|
|
124
|
+
/* Direct Figma Typography Mapping */
|
|
125
|
+
font-family: var(
|
|
126
|
+
--recursica_ui-kit_components_panel_properties_content-style_fontFamily
|
|
127
|
+
);
|
|
128
|
+
font-size: var(
|
|
129
|
+
--recursica_ui-kit_components_panel_properties_content-style_fontSize
|
|
130
|
+
);
|
|
131
|
+
font-style: var(
|
|
132
|
+
--recursica_ui-kit_components_panel_properties_content-style_fontStyle
|
|
133
|
+
);
|
|
134
|
+
font-weight: var(
|
|
135
|
+
--recursica_ui-kit_components_panel_properties_content-style_fontWeight
|
|
136
|
+
);
|
|
137
|
+
letter-spacing: var(
|
|
138
|
+
--recursica_ui-kit_components_panel_properties_content-style_letterSpacing
|
|
139
|
+
);
|
|
140
|
+
line-height: var(
|
|
141
|
+
--recursica_ui-kit_components_panel_properties_content-style_lineHeight
|
|
142
|
+
);
|
|
143
|
+
text-transform: var(
|
|
144
|
+
--recursica_ui-kit_components_panel_properties_content-style_textCase
|
|
145
|
+
);
|
|
146
|
+
text-decoration: var(
|
|
147
|
+
--recursica_ui-kit_components_panel_properties_content-style_textDecoration
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* ======================================
|
|
152
|
+
PANEL FOOTER
|
|
153
|
+
====================================== */
|
|
154
|
+
|
|
155
|
+
.footer {
|
|
156
|
+
background-color: var(
|
|
157
|
+
--recursica_ui-kit_components_panel_properties_colors_header-footer-background
|
|
158
|
+
);
|
|
159
|
+
padding: var(
|
|
160
|
+
--recursica_ui-kit_components_panel_properties_header-footer-vertical-padding
|
|
161
|
+
)
|
|
162
|
+
var(
|
|
163
|
+
--recursica_ui-kit_components_panel_properties_header-footer-horizontal-padding
|
|
164
|
+
);
|
|
165
|
+
border-top: var(--recursica_ui-kit_components_panel_properties_divider-size)
|
|
166
|
+
solid
|
|
167
|
+
var(--recursica_ui-kit_components_panel_properties_colors_divider-color);
|
|
168
|
+
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
justify-content: flex-end;
|
|
172
|
+
gap: var(--recursica_ui-kit_components_panel_properties_footer-button-gap);
|
|
173
|
+
|
|
174
|
+
/* Ensure footer sticks to the bottom of the scroll container */
|
|
175
|
+
margin-top: auto;
|
|
176
|
+
position: sticky;
|
|
177
|
+
|
|
178
|
+
/* Break out of .body padding constraints to stretch edge-to-edge */
|
|
179
|
+
bottom: calc(
|
|
180
|
+
var(
|
|
181
|
+
--recursica_ui-kit_components_panel_properties_content-vertical-padding
|
|
182
|
+
) *
|
|
183
|
+
-1
|
|
184
|
+
);
|
|
185
|
+
margin-left: calc(
|
|
186
|
+
var(
|
|
187
|
+
--recursica_ui-kit_components_panel_properties_content-horizontal-padding
|
|
188
|
+
) *
|
|
189
|
+
-1
|
|
190
|
+
);
|
|
191
|
+
margin-right: calc(
|
|
192
|
+
var(
|
|
193
|
+
--recursica_ui-kit_components_panel_properties_content-horizontal-padding
|
|
194
|
+
) *
|
|
195
|
+
-1
|
|
196
|
+
);
|
|
197
|
+
margin-bottom: calc(
|
|
198
|
+
var(
|
|
199
|
+
--recursica_ui-kit_components_panel_properties_content-vertical-padding
|
|
200
|
+
) *
|
|
201
|
+
-1
|
|
202
|
+
);
|
|
203
|
+
|
|
204
|
+
/* Render over scrolling content */
|
|
205
|
+
z-index: 10;
|
|
206
|
+
}
|