@recursica/mantine-adapter 0.23.0 → 0.26.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/ARCHITECTURE.md +15 -0
- package/CHANGELOG.md +32 -0
- package/SETUP.md +79 -0
- package/USAGE.md +55 -0
- package/dist/mantine-adapter.cjs +1 -1
- package/dist/mantine-adapter.cjs.map +1 -1
- package/dist/mantine-adapter.css +1 -1
- package/dist/mantine-adapter.js +928 -878
- package/dist/mantine-adapter.js.map +1 -1
- package/dist/src/components/Accordion/Accordion.d.ts +4 -24
- package/dist/src/components/AssistiveElement/AssistiveElement.d.ts +1 -6
- package/dist/src/components/AutoComplete/AutoComplete.d.ts +7 -3
- package/dist/src/components/Avatar/Avatar.d.ts +2 -6
- package/dist/src/components/Badge/Badge.d.ts +2 -5
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +1 -2
- package/dist/src/components/Button/Button.d.ts +2 -16
- package/dist/src/components/Card/Card.d.ts +4 -6
- package/dist/src/components/Checkbox/Checkbox.d.ts +4 -4
- package/dist/src/components/Checkbox/CheckboxGroup.d.ts +7 -3
- package/dist/src/components/Chip/Chip.d.ts +1 -10
- package/dist/src/components/Container/Container.d.ts +1 -11
- package/dist/src/components/DatePicker/DatePicker.d.ts +7 -3
- package/dist/src/components/Dropdown/Dropdown.d.ts +2 -4
- package/dist/src/components/Flex/Flex.d.ts +2 -11
- package/dist/src/components/FormControlLayout/FormControlLayout.d.ts +2 -7
- package/dist/src/components/FormControlWrapper/FormControlWrapper.d.ts +1 -15
- package/dist/src/components/Group/Group.d.ts +1 -10
- package/dist/src/components/HoverCard/HoverCard.d.ts +1 -11
- package/dist/src/components/Label/Label.d.ts +1 -14
- package/dist/src/components/Link/Link.d.ts +2 -11
- package/dist/src/components/Loader/Loader.d.ts +2 -7
- package/dist/src/components/Menu/Menu.d.ts +4 -3
- package/dist/src/components/Modal/Modal.d.ts +2 -1
- package/dist/src/components/NumberInput/NumberInput.d.ts +2 -4
- package/dist/src/components/Pagination/Pagination.d.ts +2 -4
- package/dist/src/components/Panel/Panel.d.ts +2 -9
- package/dist/src/components/Popover/Popover.d.ts +1 -11
- package/dist/src/components/Radio/Radio.d.ts +4 -4
- package/dist/src/components/Radio/RadioGroup.d.ts +7 -3
- package/dist/src/components/ReadOnlyField/ReadOnlyField.d.ts +2 -10
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +1 -11
- package/dist/src/components/Slider/Slider.d.ts +7 -13
- package/dist/src/components/Stack/Stack.d.ts +2 -9
- package/dist/src/components/Stepper/Stepper.d.ts +2 -4
- package/dist/src/components/Switch/Switch.d.ts +4 -4
- package/dist/src/components/Switch/SwitchGroup.d.ts +7 -3
- package/dist/src/components/Table/Table.d.ts +2 -1
- package/dist/src/components/Tabs/Tabs.d.ts +2 -4
- package/dist/src/components/Text/Text.d.ts +2 -11
- package/dist/src/components/TextArea/TextArea.d.ts +2 -8
- package/dist/src/components/TextField/TextField.d.ts +7 -3
- package/dist/src/components/TimePicker/TimePicker.d.ts +2 -1
- package/dist/src/components/Timeline/Timeline.d.ts +2 -1
- package/dist/src/components/Timeline/TimelineItem.d.ts +1 -12
- package/dist/src/components/Title/Title.d.ts +1 -7
- package/dist/src/components/Toast/Toast.d.ts +1 -12
- package/dist/src/components/Tooltip/Tooltip.d.ts +1 -12
- package/dist/src/components/TransferList/TransferList.d.ts +2 -1
- package/dist/src/utils/RequireAccessibleLabel.d.ts +1 -18
- package/dist/src/utils/filterStylingProps.d.ts +1 -11
- package/llms.txt +16 -0
- package/package.json +9 -2
- package/src/components/Accordion/Accordion.module.css +1 -2
- package/src/components/Accordion/Accordion.tsx +15 -28
- package/src/components/AssistiveElement/AssistiveElement.tsx +1 -6
- package/src/components/AutoComplete/AutoComplete.tsx +4 -1
- package/src/components/Avatar/Avatar.tsx +1 -5
- package/src/components/Badge/Badge.tsx +1 -4
- package/src/components/Breadcrumb/Breadcrumb.tsx +1 -2
- package/src/components/Button/Button.module.css +18 -45
- package/src/components/Button/Button.tsx +1 -15
- package/src/components/Card/Card.tsx +11 -6
- package/src/components/Checkbox/Checkbox.module.css +6 -10
- package/src/components/Checkbox/Checkbox.tsx +19 -14
- package/src/components/Checkbox/CheckboxGroup.tsx +4 -1
- package/src/components/Chip/CHIP_IMPLEMENTATION_NOTES.md +4 -1
- package/src/components/Chip/Chip.module.css +36 -28
- package/src/components/Chip/Chip.tsx +8 -15
- package/src/components/Container/Container.tsx +1 -19
- package/src/components/DatePicker/DatePicker.module.css +2 -2
- package/src/components/DatePicker/DatePicker.tsx +4 -1
- package/src/components/Dropdown/Dropdown.tsx +4 -4
- package/src/components/Flex/Flex.tsx +2 -13
- package/src/components/FormControlLayout/FormControlLayout.module.css +6 -18
- package/src/components/FormControlLayout/FormControlLayout.tsx +4 -8
- package/src/components/FormControlWrapper/FormControlWrapper.tsx +2 -15
- package/src/components/Group/Group.tsx +2 -13
- package/src/components/HoverCard/HoverCard.tsx +1 -8
- package/src/components/Label/Label.module.css +5 -10
- package/src/components/Label/Label.tsx +1 -14
- package/src/components/Link/Link.module.css +4 -3
- package/src/components/Link/Link.stories.tsx +2 -3
- package/src/components/Link/Link.tsx +1 -10
- package/src/components/Loader/Loader.module.css +1 -2
- package/src/components/Loader/Loader.tsx +1 -7
- package/src/components/Menu/Menu.tsx +5 -1
- package/src/components/Modal/Modal.tsx +3 -1
- package/src/components/NumberInput/NumberInput.tsx +4 -4
- package/src/components/Pagination/Pagination.module.css +12 -24
- package/src/components/Pagination/Pagination.stories.tsx +0 -8
- package/src/components/Pagination/Pagination.tsx +5 -4
- package/src/components/Panel/Panel.tsx +1 -8
- package/src/components/Popover/Popover.tsx +1 -8
- package/src/components/Radio/Radio.module.css +4 -10
- package/src/components/Radio/Radio.tsx +19 -14
- package/src/components/Radio/RadioGroup.tsx +4 -1
- package/src/components/ReadOnlyField/ReadOnlyField.module.css +9 -18
- package/src/components/ReadOnlyField/ReadOnlyField.tsx +4 -11
- package/src/components/SegmentedControl/SegmentedControl.module.css +20 -44
- package/src/components/SegmentedControl/SegmentedControl.tsx +1 -11
- package/src/components/Slider/Slider.module.css +1 -4
- package/src/components/Slider/Slider.tsx +4 -12
- package/src/components/Stack/Stack.tsx +2 -11
- package/src/components/Stepper/Stepper.tsx +1 -7
- package/src/components/Switch/Switch.tsx +19 -11
- package/src/components/Switch/SwitchGroup.tsx +4 -1
- package/src/components/Table/Table.tsx +3 -1
- package/src/components/Tabs/Tabs.tsx +1 -7
- package/src/components/Text/Text.tsx +2 -16
- package/src/components/TextArea/TextArea.tsx +4 -8
- package/src/components/TextField/TextField.tsx +4 -1
- package/src/components/TimePicker/TimePicker.tsx +3 -1
- package/src/components/Timeline/Timeline.tsx +4 -1
- package/src/components/Timeline/TimelineItem.tsx +1 -12
- package/src/components/Title/Title.tsx +1 -6
- package/src/components/Toast/Toast.tsx +1 -13
- package/src/components/Tooltip/Tooltip.tsx +1 -9
- package/src/components/TransferList/TransferList.tsx +3 -1
- package/src/utils/RequireAccessibleLabel.ts +1 -12
- package/src/utils/filterStylingProps.ts +7 -20
|
@@ -9,6 +9,8 @@ import { type RecursicaFormControlWrapperProps } from "../FormControlWrapper/For
|
|
|
9
9
|
import { WithReadOnlyWrapper } from "../ReadOnlyField/WithReadOnlyWrapper";
|
|
10
10
|
import styles from "./DatePicker.module.css";
|
|
11
11
|
|
|
12
|
+
import { type RecursicaDatePickerProps as BaseRecursicaDatePickerProps } from "@recursica/adapter-common";
|
|
13
|
+
|
|
12
14
|
export interface RecursicaDatePickerProps
|
|
13
15
|
extends Omit<
|
|
14
16
|
DatePickerInputProps,
|
|
@@ -31,7 +33,8 @@ export interface RecursicaDatePickerProps
|
|
|
31
33
|
RecursicaFormControlWrapperProps,
|
|
32
34
|
"controlMaxWidth" | "controlMinWidth"
|
|
33
35
|
>,
|
|
34
|
-
ReadOnlyControlProps
|
|
36
|
+
ReadOnlyControlProps,
|
|
37
|
+
BaseRecursicaDatePickerProps {}
|
|
35
38
|
|
|
36
39
|
export type DatePickerProps = RecursicaOverStyled<RecursicaDatePickerProps>;
|
|
37
40
|
|
|
@@ -12,6 +12,8 @@ import { type RecursicaFormControlWrapperProps } from "../FormControlWrapper/For
|
|
|
12
12
|
import { WithReadOnlyWrapper } from "../ReadOnlyField/WithReadOnlyWrapper";
|
|
13
13
|
import styles from "./Dropdown.module.css";
|
|
14
14
|
|
|
15
|
+
import { type RecursicaDropdownProps as BaseRecursicaDropdownProps } from "@recursica/adapter-common";
|
|
16
|
+
|
|
15
17
|
export interface RecursicaDropdownProps
|
|
16
18
|
extends Omit<
|
|
17
19
|
MantineSelectProps,
|
|
@@ -28,10 +30,8 @@ export interface RecursicaDropdownProps
|
|
|
28
30
|
| "labelWithEditIcon"
|
|
29
31
|
| "onLabelEditClick"
|
|
30
32
|
>,
|
|
31
|
-
ReadOnlyControlProps
|
|
32
|
-
|
|
33
|
-
containerWidth?: React.CSSProperties["width"];
|
|
34
|
-
}
|
|
33
|
+
ReadOnlyControlProps,
|
|
34
|
+
BaseRecursicaDropdownProps {}
|
|
35
35
|
|
|
36
36
|
export type DropdownProps = RecursicaOverStyled<RecursicaDropdownProps>;
|
|
37
37
|
|
|
@@ -4,21 +4,10 @@ import {
|
|
|
4
4
|
type FlexProps as MantineFlexProps,
|
|
5
5
|
createPolymorphicComponent,
|
|
6
6
|
} from "@mantine/core";
|
|
7
|
-
import {
|
|
8
|
-
type RecursicaSpacing,
|
|
9
|
-
mapLayoutProps,
|
|
10
|
-
} from "../../utils/filterStylingProps";
|
|
7
|
+
import { mapLayoutProps } from "../../utils/filterStylingProps";
|
|
11
8
|
import styles from "./Flex.module.css";
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Children components inside the Flex container
|
|
16
|
-
*/
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
gap?: MantineFlexProps["gap"] | RecursicaSpacing;
|
|
19
|
-
rowGap?: MantineFlexProps["gap"] | RecursicaSpacing;
|
|
20
|
-
columnGap?: MantineFlexProps["gap"] | RecursicaSpacing;
|
|
21
|
-
}
|
|
10
|
+
import { type RecursicaFlexProps } from "@recursica/adapter-common";
|
|
22
11
|
|
|
23
12
|
/**
|
|
24
13
|
* Flex layout wrapper.
|
|
@@ -34,39 +34,27 @@
|
|
|
34
34
|
/* Stacked Layout constraints */
|
|
35
35
|
.root[data-form-layout="stacked"] .leftSection {
|
|
36
36
|
padding-bottom: var(
|
|
37
|
-
--recursica_ui-kit_components_label_variants_layouts_stacked_properties_bottom-padding
|
|
38
|
-
var(
|
|
39
|
-
--recursica_ui-kit_globals_form_properties_label-field-gap-vertical,
|
|
40
|
-
8px
|
|
41
|
-
)
|
|
37
|
+
--recursica_ui-kit_components_label_variants_layouts_stacked_properties_bottom-padding
|
|
42
38
|
);
|
|
43
39
|
min-height: var(
|
|
44
|
-
--recursica_ui-kit_components_label_variants_layouts_stacked_properties_min-height
|
|
45
|
-
auto
|
|
40
|
+
--recursica_ui-kit_components_label_variants_layouts_stacked_properties_min-height
|
|
46
41
|
);
|
|
47
42
|
}
|
|
48
43
|
|
|
49
44
|
/* SideBySide Layout constraints */
|
|
50
45
|
.root[data-form-layout="side-by-side"] .leftSection {
|
|
51
46
|
padding-top: var(
|
|
52
|
-
--recursica_ui-kit_components_label_variants_layouts_side-by-side_properties_vertical-padding
|
|
53
|
-
0
|
|
47
|
+
--recursica_ui-kit_components_label_variants_layouts_side-by-side_properties_vertical-padding
|
|
54
48
|
);
|
|
55
49
|
padding-bottom: var(
|
|
56
|
-
--recursica_ui-kit_components_label_variants_layouts_side-by-side_properties_vertical-padding
|
|
57
|
-
0
|
|
50
|
+
--recursica_ui-kit_components_label_variants_layouts_side-by-side_properties_vertical-padding
|
|
58
51
|
);
|
|
59
52
|
min-height: var(
|
|
60
|
-
--recursica_ui-kit_components_label_variants_layouts_side-by-side_properties_min-height
|
|
61
|
-
auto
|
|
53
|
+
--recursica_ui-kit_components_label_variants_layouts_side-by-side_properties_min-height
|
|
62
54
|
);
|
|
63
55
|
/* In side-by-side, the label column exists to the left of its input, so we use the gutter gap here. */
|
|
64
56
|
margin-right: var(
|
|
65
|
-
--recursica_ui-kit_components_label_variants_layouts_side-by-side_properties_gutter
|
|
66
|
-
var(
|
|
67
|
-
--recursica_ui-kit_globals_form_properties_label-field-gap-horizontal,
|
|
68
|
-
16px
|
|
69
|
-
)
|
|
57
|
+
--recursica_ui-kit_components_label_variants_layouts_side-by-side_properties_gutter
|
|
70
58
|
);
|
|
71
59
|
}
|
|
72
60
|
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import styles from "./FormControlLayout.module.css";
|
|
3
3
|
|
|
4
|
+
import { type RecursicaFormControlLayoutProps } from "@recursica/adapter-common";
|
|
5
|
+
|
|
4
6
|
export interface FormControlLayoutProps
|
|
5
|
-
extends React.HTMLAttributes<HTMLDivElement
|
|
6
|
-
|
|
7
|
-
labelSize?: "default" | "small" | "md";
|
|
8
|
-
controlMaxWidth?: string;
|
|
9
|
-
controlMinWidth?: string;
|
|
10
|
-
leftSection?: React.ReactNode;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
}
|
|
7
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
8
|
+
RecursicaFormControlLayoutProps {}
|
|
13
9
|
|
|
14
10
|
/**
|
|
15
11
|
* A layout component used to correctly position form inputs alongside their labels.
|
|
@@ -4,25 +4,12 @@ import {
|
|
|
4
4
|
filterStylingProps,
|
|
5
5
|
type RecursicaOverStyled,
|
|
6
6
|
} from "../../utils/filterStylingProps";
|
|
7
|
-
import { Label
|
|
7
|
+
import { Label } from "../Label/Label";
|
|
8
8
|
import { FormControlLayout } from "../FormControlLayout/FormControlLayout";
|
|
9
9
|
import { AssistiveElement } from "../AssistiveElement/AssistiveElement";
|
|
10
10
|
import styles from "./FormControlWrapper.module.css";
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
/** Overall structural flow mapping the Form Control natively cascading down to Label and Input logic. */
|
|
14
|
-
formLayout?: "stacked" | "side-by-side";
|
|
15
|
-
/** Securely replaces standard Mantine descriptions safely providing standard Assistive properties. */
|
|
16
|
-
assistiveText?: React.ReactNode;
|
|
17
|
-
/** Explicit toggle to suppress the Info icon rendering natively alongside the assistiveText. Defaults to true. */
|
|
18
|
-
assistiveWithIcon?: boolean;
|
|
19
|
-
/** Custom action area to render alongside the label instead of the default edit icon. */
|
|
20
|
-
labelActionArea?: React.ReactNode;
|
|
21
|
-
/** Pass the native maximum width design variable dynamically bounding the specific wrapper width exclusively. */
|
|
22
|
-
controlMaxWidth: string | undefined;
|
|
23
|
-
/** Pass the native minimum width design variable dynamically bounding the specific wrapper width exclusively. */
|
|
24
|
-
controlMinWidth: string | undefined;
|
|
25
|
-
}
|
|
12
|
+
import { type RecursicaFormControlWrapperProps } from "@recursica/adapter-common";
|
|
26
13
|
|
|
27
14
|
export type FormControlWrapperProps = RecursicaOverStyled<
|
|
28
15
|
Omit<InputWrapperProps, "labelProps" | "inputWrapperOrder"> &
|
|
@@ -3,21 +3,10 @@ import {
|
|
|
3
3
|
Group as MantineGroup,
|
|
4
4
|
type GroupProps as MantineGroupProps,
|
|
5
5
|
} from "@mantine/core";
|
|
6
|
-
import {
|
|
7
|
-
type RecursicaSpacing,
|
|
8
|
-
mapLayoutProps,
|
|
9
|
-
} from "../../utils/filterStylingProps";
|
|
6
|
+
import { mapLayoutProps } from "../../utils/filterStylingProps";
|
|
10
7
|
import styles from "./Group.module.css";
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Children components inside the group
|
|
15
|
-
*/
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
gap?: MantineGroupProps["gap"] | RecursicaSpacing;
|
|
18
|
-
rowGap?: MantineGroupProps["gap"] | RecursicaSpacing;
|
|
19
|
-
columnGap?: MantineGroupProps["gap"] | RecursicaSpacing;
|
|
20
|
-
}
|
|
9
|
+
import { type RecursicaGroupProps } from "@recursica/adapter-common";
|
|
21
10
|
|
|
22
11
|
/**
|
|
23
12
|
* Group flex layout wrapper.
|
|
@@ -17,14 +17,7 @@ import styles from "./HoverCard.module.css";
|
|
|
17
17
|
/**
|
|
18
18
|
* Recursica-specific props for HoverCard.
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Whether to display a beak (arrow) pointing from the dropdown to the target.
|
|
23
|
-
* This is the Recursica equivalent of Mantine's `withArrow`.
|
|
24
|
-
* When both `withBeak` and `withArrow` are provided, `withBeak` takes precedence.
|
|
25
|
-
*/
|
|
26
|
-
withBeak?: boolean;
|
|
27
|
-
}
|
|
20
|
+
import { type RecursicaHoverCardProps } from "@recursica/adapter-common";
|
|
28
21
|
|
|
29
22
|
/**
|
|
30
23
|
* Recursica HoverCard component wrapping Mantine's composable HoverCard.
|
|
@@ -47,16 +47,13 @@
|
|
|
47
47
|
--recursica_ui-kit_components_label_properties_label-text_line-height
|
|
48
48
|
);
|
|
49
49
|
font-style: var(
|
|
50
|
-
--recursica_ui-kit_components_label_properties_label-text_font-style
|
|
51
|
-
normal
|
|
50
|
+
--recursica_ui-kit_components_label_properties_label-text_font-style
|
|
52
51
|
);
|
|
53
52
|
text-decoration: var(
|
|
54
|
-
--recursica_ui-kit_components_label_properties_label-text_text-decoration
|
|
55
|
-
none
|
|
53
|
+
--recursica_ui-kit_components_label_properties_label-text_text-decoration
|
|
56
54
|
);
|
|
57
55
|
text-transform: var(
|
|
58
|
-
--recursica_ui-kit_components_label_properties_label-text_text-transform
|
|
59
|
-
none
|
|
56
|
+
--recursica_ui-kit_components_label_properties_label-text_text-transform
|
|
60
57
|
);
|
|
61
58
|
}
|
|
62
59
|
|
|
@@ -105,12 +102,10 @@
|
|
|
105
102
|
--recursica_ui-kit_components_label_properties_optional-text_font-style
|
|
106
103
|
);
|
|
107
104
|
text-decoration: var(
|
|
108
|
-
--recursica_ui-kit_components_label_properties_optional-text_text-decoration
|
|
109
|
-
none
|
|
105
|
+
--recursica_ui-kit_components_label_properties_optional-text_text-decoration
|
|
110
106
|
);
|
|
111
107
|
text-transform: var(
|
|
112
|
-
--recursica_ui-kit_components_label_properties_optional-text_text-transform
|
|
113
|
-
none
|
|
108
|
+
--recursica_ui-kit_components_label_properties_optional-text_text-transform
|
|
114
109
|
);
|
|
115
110
|
color: inherit;
|
|
116
111
|
opacity: var(
|
|
@@ -6,20 +6,7 @@ import {
|
|
|
6
6
|
} from "../../utils/filterStylingProps";
|
|
7
7
|
import styles from "./Label.module.css";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
/** Specifies the sizing metrics natively mapping the Label boundaries. */
|
|
11
|
-
labelSize?: "default" | "small" | "md";
|
|
12
|
-
/** Overall alignment directive for the label strings natively forcing Left/Right justification. */
|
|
13
|
-
labelAlignment?: "left" | "right";
|
|
14
|
-
/** Injects an indicator text block alongside the label. Can be boolean (`true` maps to '(Optional)') or custom React nodes. */
|
|
15
|
-
labelOptionalText?: boolean | React.ReactNode;
|
|
16
|
-
/** When true, forces the native Edit Icon to replace the standard asterisk visually. */
|
|
17
|
-
labelWithEditIcon?: boolean;
|
|
18
|
-
/** Custom action area to render alongside the label instead of the default edit icon. */
|
|
19
|
-
labelActionArea?: React.ReactNode;
|
|
20
|
-
/** Interaction hook invoked whenever a generated edit icon block natively triggers a click event. */
|
|
21
|
-
onLabelEditClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
22
|
-
}
|
|
9
|
+
import { type RecursicaLabelProps } from "@recursica/adapter-common";
|
|
23
10
|
|
|
24
11
|
export type LabelProps = RecursicaOverStyled<
|
|
25
12
|
Omit<InputLabelProps, "size"> & RecursicaLabelProps
|
|
@@ -16,9 +16,8 @@ HARDCODED VALUES:
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
.root {
|
|
19
|
-
/* HARDCODE: base layout
|
|
20
|
-
display: inline
|
|
21
|
-
align-items: center;
|
|
19
|
+
/* HARDCODE: base layout */
|
|
20
|
+
display: inline;
|
|
22
21
|
cursor: pointer;
|
|
23
22
|
|
|
24
23
|
/* HARDCODE: Reset underline and color so we can explicitly use our tokens */
|
|
@@ -53,6 +52,8 @@ HARDCODED VALUES:
|
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
.root[data-has-icon] {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
56
57
|
gap: var(--recursica_ui-kit_components_link_properties_icon-text-gap);
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
4
4
|
import { Link } from "./Link";
|
|
5
|
-
import { Text } from "@mantine/core";
|
|
6
5
|
|
|
7
6
|
const meta: Meta<typeof Link> = {
|
|
8
7
|
title: "UI-Kit/Link",
|
|
@@ -52,8 +51,8 @@ export const Polymorphic: Story = {
|
|
|
52
51
|
|
|
53
52
|
export const InlineText: Story = {
|
|
54
53
|
render: () => (
|
|
55
|
-
<
|
|
54
|
+
<p>
|
|
56
55
|
Here is some text with an <Link href="#">inline link</Link> inside it.
|
|
57
|
-
</
|
|
56
|
+
</p>
|
|
58
57
|
),
|
|
59
58
|
};
|
|
@@ -10,16 +10,7 @@ import {
|
|
|
10
10
|
} from "../../utils/filterStylingProps";
|
|
11
11
|
import styles from "./Link.module.css";
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Optional leading icon to display next to the link text.
|
|
16
|
-
*/
|
|
17
|
-
icon?: React.ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* The text or elements to display inside the link.
|
|
20
|
-
*/
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
}
|
|
13
|
+
import { type RecursicaLinkProps } from "@recursica/adapter-common";
|
|
23
14
|
|
|
24
15
|
export type LinkProps = RecursicaOverStyled<
|
|
25
16
|
Omit<MantineAnchorProps, "underline"> & RecursicaLinkProps
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
.root {
|
|
2
2
|
/* Default inheritance mapped from component variables if not explicitly overridden by variants */
|
|
3
3
|
--loader-color: var(
|
|
4
|
-
--recursica_ui-kit_components_loader_properties_indicator-color
|
|
5
|
-
currentColor
|
|
4
|
+
--recursica_ui-kit_components_loader_properties_indicator-color
|
|
6
5
|
);
|
|
7
6
|
}
|
|
8
7
|
|
|
@@ -6,16 +6,10 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
filterStylingProps,
|
|
8
8
|
type RecursicaOverStyled,
|
|
9
|
-
type RecursicaSize,
|
|
10
9
|
} from "../../utils/filterStylingProps";
|
|
11
10
|
import styles from "./Loader.module.css";
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
/** Map to the component styles defined in variables */
|
|
15
|
-
variant?: "oval" | "bars" | "dots";
|
|
16
|
-
/** Map to Recursica sizes */
|
|
17
|
-
size?: "sm" | "md" | "lg" | RecursicaSize;
|
|
18
|
-
}
|
|
12
|
+
import { type RecursicaLoaderProps } from "@recursica/adapter-common";
|
|
19
13
|
|
|
20
14
|
export type LoaderProps = RecursicaOverStyled<
|
|
21
15
|
Omit<MantineLoaderProps, "variant" | "size" | "type"> & RecursicaLoaderProps
|
|
@@ -18,6 +18,8 @@ import {
|
|
|
18
18
|
} from "../../utils/filterStylingProps";
|
|
19
19
|
import styles from "./Menu.module.css";
|
|
20
20
|
|
|
21
|
+
import { type RecursicaMenuProps } from "@recursica/adapter-common";
|
|
22
|
+
|
|
21
23
|
// ============================================================
|
|
22
24
|
// MENU ROOT
|
|
23
25
|
// ============================================================
|
|
@@ -38,7 +40,9 @@ import styles from "./Menu.module.css";
|
|
|
38
40
|
* </Menu>
|
|
39
41
|
* ```
|
|
40
42
|
*/
|
|
41
|
-
export type MenuProps = RecursicaOverStyled<
|
|
43
|
+
export type MenuProps = RecursicaOverStyled<
|
|
44
|
+
MantineMenuProps & RecursicaMenuProps
|
|
45
|
+
>;
|
|
42
46
|
|
|
43
47
|
const MenuBase = function Menu({ overStyled = false, ...rest }: MenuProps) {
|
|
44
48
|
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
@@ -9,13 +9,15 @@ import {
|
|
|
9
9
|
} from "../../utils/filterStylingProps";
|
|
10
10
|
import styles from "./Modal.module.css";
|
|
11
11
|
|
|
12
|
+
import { type RecursicaModalProps } from "@recursica/adapter-common";
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* Properties for the strictly-tokenized Modal component.
|
|
14
16
|
* Native Mantine abstract properties like `size`, `radius`, and `shadow` have been stripped out
|
|
15
17
|
* because they directly conflict with the non-negotiable pixel boundaries defined in the Recursica UI Kit.
|
|
16
18
|
*/
|
|
17
19
|
export type ModalProps = RecursicaOverStyled<
|
|
18
|
-
Omit<MantineModalProps, "size" | "radius" | "shadow">
|
|
20
|
+
Omit<MantineModalProps, "size" | "radius" | "shadow"> & RecursicaModalProps
|
|
19
21
|
>;
|
|
20
22
|
|
|
21
23
|
/**
|
|
@@ -12,6 +12,8 @@ import { type RecursicaFormControlWrapperProps } from "../FormControlWrapper/For
|
|
|
12
12
|
import { WithReadOnlyWrapper } from "../ReadOnlyField/WithReadOnlyWrapper";
|
|
13
13
|
import styles from "./NumberInput.module.css";
|
|
14
14
|
|
|
15
|
+
import { type RecursicaNumberInputProps as BaseRecursicaNumberInputProps } from "@recursica/adapter-common";
|
|
16
|
+
|
|
15
17
|
export interface RecursicaNumberInputProps
|
|
16
18
|
extends Omit<
|
|
17
19
|
MantineNumberInputProps,
|
|
@@ -28,10 +30,8 @@ export interface RecursicaNumberInputProps
|
|
|
28
30
|
| "labelWithEditIcon"
|
|
29
31
|
| "onLabelEditClick"
|
|
30
32
|
>,
|
|
31
|
-
ReadOnlyControlProps
|
|
32
|
-
|
|
33
|
-
hideControls?: boolean;
|
|
34
|
-
}
|
|
33
|
+
ReadOnlyControlProps,
|
|
34
|
+
BaseRecursicaNumberInputProps {}
|
|
35
35
|
|
|
36
36
|
export type NumberInputProps = RecursicaOverStyled<RecursicaNumberInputProps>;
|
|
37
37
|
|
|
@@ -98,42 +98,33 @@
|
|
|
98
98
|
|
|
99
99
|
/* Typography */
|
|
100
100
|
font-family: var(
|
|
101
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-family
|
|
102
|
-
var(--recursica_brand_fonts_primary)
|
|
101
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-family
|
|
103
102
|
);
|
|
104
103
|
font-size: var(
|
|
105
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-size
|
|
106
|
-
var(--recursica_brand_dimensions_text-size_default)
|
|
104
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-size
|
|
107
105
|
);
|
|
108
106
|
font-style: var(
|
|
109
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-style
|
|
110
|
-
normal
|
|
107
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-style
|
|
111
108
|
);
|
|
112
109
|
font-weight: var(
|
|
113
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-weight
|
|
114
|
-
500
|
|
110
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_font-weight
|
|
115
111
|
);
|
|
116
112
|
letter-spacing: var(
|
|
117
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_letter-spacing
|
|
118
|
-
0
|
|
113
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_letter-spacing
|
|
119
114
|
);
|
|
120
115
|
line-height: var(
|
|
121
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_line-height
|
|
122
|
-
1.5
|
|
116
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_line-height
|
|
123
117
|
);
|
|
124
118
|
text-decoration: var(
|
|
125
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_text-decoration
|
|
126
|
-
none
|
|
119
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_text-decoration
|
|
127
120
|
);
|
|
128
121
|
text-transform: var(
|
|
129
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_text-transform
|
|
130
|
-
none
|
|
122
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_text_text-transform
|
|
131
123
|
);
|
|
132
124
|
|
|
133
125
|
/* Dimensions */
|
|
134
126
|
border-radius: var(
|
|
135
|
-
--recursica_ui-kit_components_button_variants_content_icon-only_variants_sizes_default_properties_border-radius
|
|
136
|
-
4px
|
|
127
|
+
--recursica_ui-kit_components_button_variants_content_icon-only_variants_sizes_default_properties_border-radius
|
|
137
128
|
);
|
|
138
129
|
height: var(
|
|
139
130
|
--recursica_ui-kit_components_button_variants_sizes_default_properties_height
|
|
@@ -192,8 +183,7 @@
|
|
|
192
183
|
|
|
193
184
|
.control:hover:not(:disabled)::after {
|
|
194
185
|
opacity: var(
|
|
195
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_hover-opacity
|
|
196
|
-
0.1
|
|
186
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_hover-opacity
|
|
197
187
|
);
|
|
198
188
|
}
|
|
199
189
|
|
|
@@ -270,8 +260,7 @@
|
|
|
270
260
|
}
|
|
271
261
|
.control[data-variant="text"]:hover:not(:disabled)::after {
|
|
272
262
|
opacity: var(
|
|
273
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_hover-opacity
|
|
274
|
-
0.1
|
|
263
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_hover-opacity
|
|
275
264
|
);
|
|
276
265
|
}
|
|
277
266
|
|
|
@@ -296,8 +285,7 @@
|
|
|
296
285
|
display: flex;
|
|
297
286
|
align-items: center;
|
|
298
287
|
gap: var(
|
|
299
|
-
--recursica_ui-kit_components_button_variants_sizes_default_properties_icon-text-gap
|
|
300
|
-
4px
|
|
288
|
+
--recursica_ui-kit_components_button_variants_sizes_default_properties_icon-text-gap
|
|
301
289
|
);
|
|
302
290
|
}
|
|
303
291
|
|
|
@@ -40,14 +40,6 @@ export const WithEdges: Story = {
|
|
|
40
40
|
},
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
export const Compositional: Story = {
|
|
44
|
-
render: () => (
|
|
45
|
-
<Pagination.Root total={10}>
|
|
46
|
-
<Pagination.Items />
|
|
47
|
-
</Pagination.Root>
|
|
48
|
-
),
|
|
49
|
-
};
|
|
50
|
-
|
|
51
43
|
export const WithTextLabels: Story = {
|
|
52
44
|
args: {
|
|
53
45
|
withEdges: true,
|
|
@@ -18,10 +18,11 @@ import {
|
|
|
18
18
|
PaginationIcon,
|
|
19
19
|
} from "./Pagination.icons";
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
import { type RecursicaPaginationProps } from "@recursica/adapter-common";
|
|
22
|
+
|
|
23
|
+
export type PaginationProps = RecursicaOverStyled<
|
|
24
|
+
MantinePaginationProps & RecursicaPaginationProps
|
|
25
|
+
>;
|
|
25
26
|
|
|
26
27
|
export type PaginationRootProps =
|
|
27
28
|
RecursicaOverStyled<MantinePaginationRootProps>;
|
|
@@ -13,14 +13,7 @@ import styles from "./Panel.module.css";
|
|
|
13
13
|
// PANEL (Drawer)
|
|
14
14
|
// ============================================================
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* If true, forces the header text to a single line and truncates with an ellipsis.
|
|
19
|
-
* Note: While the prop is named `wrapHeaderText` for backward compatibility,
|
|
20
|
-
* setting it to `true` actually PREVENTS wrapping (it forces truncation).
|
|
21
|
-
*/
|
|
22
|
-
wrapHeaderText?: boolean;
|
|
23
|
-
}
|
|
16
|
+
import { type RecursicaPanelProps } from "@recursica/adapter-common";
|
|
24
17
|
|
|
25
18
|
/**
|
|
26
19
|
* Recursica Panel root props. Extends Mantine Drawer.
|
|
@@ -17,14 +17,7 @@ import styles from "./Popover.module.css";
|
|
|
17
17
|
/**
|
|
18
18
|
* Recursica-specific props for Popover.
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Whether to display a beak (arrow) pointing from the dropdown to the target.
|
|
23
|
-
* This is the Recursica equivalent of Mantine's `withArrow`.
|
|
24
|
-
* When both `withBeak` and `withArrow` are provided, `withBeak` takes precedence.
|
|
25
|
-
*/
|
|
26
|
-
withBeak?: boolean;
|
|
27
|
-
}
|
|
20
|
+
import { type RecursicaPopoverProps } from "@recursica/adapter-common";
|
|
28
21
|
|
|
29
22
|
/**
|
|
30
23
|
* Recursica Popover component wrapping Mantine's composable Popover.
|
|
@@ -12,15 +12,13 @@
|
|
|
12
12
|
/* --- GROUP STYLES --- */
|
|
13
13
|
.groupRoot {
|
|
14
14
|
padding: var(
|
|
15
|
-
--recursica_ui-kit_components_radio-button-group_properties_padding
|
|
16
|
-
0
|
|
15
|
+
--recursica_ui-kit_components_radio-button-group_properties_padding
|
|
17
16
|
);
|
|
18
17
|
margin: 0; /* HARDCODE: structural reset; consider token if layout needs change */
|
|
19
18
|
display: flex;
|
|
20
19
|
flex-direction: column;
|
|
21
20
|
gap: var(
|
|
22
|
-
--recursica_ui-kit_components_radio-button-group_properties_item-gap
|
|
23
|
-
16px
|
|
21
|
+
--recursica_ui-kit_components_radio-button-group_properties_item-gap
|
|
24
22
|
);
|
|
25
23
|
}
|
|
26
24
|
|
|
@@ -49,10 +47,7 @@
|
|
|
49
47
|
.groupRoot[data-layout="stacked"] {
|
|
50
48
|
flex-direction: column;
|
|
51
49
|
margin-top: var(
|
|
52
|
-
--recursica_ui-kit_components_radio-button-group_variants_layouts_stacked_properties_label-field-gap
|
|
53
|
-
var(
|
|
54
|
-
--recursica_ui-kit_components_radio-button-group_variants_layouts_stacked_properties_top-bottom-margin
|
|
55
|
-
)
|
|
50
|
+
--recursica_ui-kit_components_radio-button-group_variants_layouts_stacked_properties_label-field-gap
|
|
56
51
|
);
|
|
57
52
|
margin-bottom: var(
|
|
58
53
|
--recursica_ui-kit_components_radio-button-group_variants_layouts_stacked_properties_top-bottom-margin
|
|
@@ -214,7 +209,6 @@
|
|
|
214
209
|
--recursica_ui-kit_components_radio-button-item_properties_colors_disabled-text
|
|
215
210
|
);
|
|
216
211
|
opacity: var(
|
|
217
|
-
--recursica_ui-kit_components_radio-button-item_properties_disabled-opacity
|
|
218
|
-
var(--recursica_ui-kit_components_radio-button_properties_disabled-opacity)
|
|
212
|
+
--recursica_ui-kit_components_radio-button-item_properties_disabled-opacity
|
|
219
213
|
);
|
|
220
214
|
}
|
|
@@ -9,7 +9,10 @@ import {
|
|
|
9
9
|
filterStylingProps,
|
|
10
10
|
type RecursicaOverStyled,
|
|
11
11
|
} from "../../utils/filterStylingProps";
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
type RequireAccessibleLabel,
|
|
14
|
+
type RecursicaRadioProps,
|
|
15
|
+
} from "@recursica/adapter-common";
|
|
13
16
|
import {
|
|
14
17
|
FormControlLayout,
|
|
15
18
|
type FormControlLayoutProps,
|
|
@@ -32,19 +35,21 @@ const RadioIcon: React.FC<{
|
|
|
32
35
|
</svg>
|
|
33
36
|
);
|
|
34
37
|
|
|
35
|
-
export type
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
export type RadioWrapperProps = Omit<
|
|
39
|
+
MantineRadioProps,
|
|
40
|
+
"size" | "color" | "radius" | "iconColor" | "variant"
|
|
41
|
+
> &
|
|
42
|
+
RecursicaRadioProps &
|
|
43
|
+
ReadOnlyControlProps &
|
|
44
|
+
Pick<
|
|
45
|
+
FormControlLayoutProps,
|
|
46
|
+
"formLayout" | "labelSize" | "controlMaxWidth" | "controlMinWidth"
|
|
47
|
+
>;
|
|
48
|
+
|
|
49
|
+
export type RecursicaRadioPropsAlias =
|
|
50
|
+
RequireAccessibleLabel<RadioWrapperProps>;
|
|
51
|
+
|
|
52
|
+
export type RadioProps = RecursicaOverStyled<RecursicaRadioPropsAlias>;
|
|
48
53
|
|
|
49
54
|
type RadioComponent = React.ForwardRefExoticComponent<
|
|
50
55
|
RadioProps & React.RefAttributes<HTMLInputElement>
|