@recursica/mantine-adapter 0.7.0 → 0.8.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 +6 -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 +963 -639
- package/dist/mantine-adapter.js.map +1 -1
- package/dist/src/components/Container/Container.d.ts +14 -0
- package/dist/src/components/Dropdown/Dropdown.d.ts +10 -2
- package/dist/src/components/Flex/Flex.d.ts +17 -0
- package/dist/src/components/Group/Group.d.ts +17 -0
- package/dist/src/components/Stack/Stack.d.ts +15 -0
- package/dist/src/components/TextArea/TextArea.d.ts +14 -2
- package/dist/src/components/index.d.ts +6 -0
- package/package.json +1 -1
- package/src/components/Container/CONTAINER_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Container/Container.module.css +7 -0
- package/src/components/Container/Container.stories.tsx +102 -0
- package/src/components/Container/Container.tsx +63 -0
- package/src/components/Dropdown/DROPDOWN_IMPLEMENTATION_NOTES.md +7 -0
- package/src/components/Dropdown/Dropdown.module.css +272 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +77 -5
- package/src/components/Dropdown/Dropdown.tsx +184 -5
- package/src/components/Flex/FLEX_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Flex/Flex.module.css +7 -0
- package/src/components/Flex/Flex.stories.tsx +125 -0
- package/src/components/Flex/Flex.tsx +68 -0
- package/src/components/Group/GROUP_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Group/Group.module.css +7 -0
- package/src/components/Group/Group.stories.tsx +117 -0
- package/src/components/Group/Group.tsx +68 -0
- package/src/components/Stack/STACK_IMPLEMENTATION_NOTES.md +4 -0
- package/src/components/Stack/Stack.module.css +7 -0
- package/src/components/Stack/Stack.stories.tsx +105 -0
- package/src/components/Stack/Stack.tsx +66 -0
- package/src/components/TextArea/TEXTAREA_IMPLEMENTATION_NOTES.md +7 -0
- package/src/components/TextArea/TextArea.module.css +225 -0
- package/src/components/TextArea/TextArea.stories.tsx +77 -5
- package/src/components/TextArea/TextArea.tsx +162 -5
- package/src/components/index.ts +6 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ContainerProps as MantineContainerProps } from '@mantine/core';
|
|
3
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
4
|
+
export interface RecursicaContainerProps {
|
|
5
|
+
/**
|
|
6
|
+
* Children components inside the layout container
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Container layout wrapper
|
|
12
|
+
*/
|
|
13
|
+
export type ContainerProps = RecursicaOverStyled<MantineContainerProps & RecursicaContainerProps>;
|
|
14
|
+
export declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { SelectProps as MantineSelectProps } from '@mantine/core';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
6
|
+
export interface RecursicaDropdownProps extends Omit<MantineSelectProps, "size" | "variant" | "radius" | "wrapperProps" | "label" | "description" | "error" | "required" | "withAsterisk">, Pick<RecursicaFormControlWrapperProps, "label" | "error" | "required" | "withAsterisk" | "id" | "assistiveText" | "assistiveWithIcon" | "formLayout" | "labelSize" | "labelAlignment" | "labelOptionalText" | "labelWithEditIcon" | "onLabelEditClick">, ReadOnlyControlProps {
|
|
7
|
+
/** Internal hook for Selects to override raw layout width properties when necessary */
|
|
8
|
+
containerWidth?: React.CSSProperties["width"];
|
|
9
|
+
}
|
|
10
|
+
export type DropdownProps = RecursicaOverStyled<RecursicaDropdownProps>;
|
|
11
|
+
export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FlexProps as MantineFlexProps } from '@mantine/core';
|
|
3
|
+
import { RecursicaOverStyled, RecursicaSpacing } from '../../utils/filterStylingProps';
|
|
4
|
+
export interface RecursicaFlexProps {
|
|
5
|
+
/**
|
|
6
|
+
* Children components inside the Flex container
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
gap?: MantineFlexProps["gap"] | RecursicaSpacing;
|
|
10
|
+
rowGap?: MantineFlexProps["gap"] | RecursicaSpacing;
|
|
11
|
+
columnGap?: MantineFlexProps["gap"] | RecursicaSpacing;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Flex layout wrapper
|
|
15
|
+
*/
|
|
16
|
+
export type FlexProps = RecursicaOverStyled<MantineFlexProps & RecursicaFlexProps>;
|
|
17
|
+
export declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { GroupProps as MantineGroupProps } from '@mantine/core';
|
|
3
|
+
import { RecursicaOverStyled, RecursicaSpacing } from '../../utils/filterStylingProps';
|
|
4
|
+
export interface RecursicaGroupProps {
|
|
5
|
+
/**
|
|
6
|
+
* Children components inside the group
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
gap?: MantineGroupProps["gap"] | RecursicaSpacing;
|
|
10
|
+
rowGap?: MantineGroupProps["gap"] | RecursicaSpacing;
|
|
11
|
+
columnGap?: MantineGroupProps["gap"] | RecursicaSpacing;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Group flex layout wrapper
|
|
15
|
+
*/
|
|
16
|
+
export type GroupProps = RecursicaOverStyled<MantineGroupProps & RecursicaGroupProps>;
|
|
17
|
+
export declare const Group: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StackProps as MantineStackProps } from '@mantine/core';
|
|
3
|
+
import { RecursicaOverStyled, RecursicaSpacing } from '../../utils/filterStylingProps';
|
|
4
|
+
export interface RecursicaStackProps {
|
|
5
|
+
/**
|
|
6
|
+
* Children components inside the stack
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
gap?: MantineStackProps["gap"] | RecursicaSpacing;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Stack flex layout wrapper
|
|
13
|
+
*/
|
|
14
|
+
export type StackProps = RecursicaOverStyled<MantineStackProps & RecursicaStackProps>;
|
|
15
|
+
export declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { TextareaProps as MantineTextareaProps } from '@mantine/core';
|
|
3
|
+
import { ReadOnlyControlProps } from '@recursica/adapter-common';
|
|
4
|
+
import { RecursicaOverStyled } from '../../utils/filterStylingProps';
|
|
5
|
+
import { RecursicaFormControlWrapperProps } from '../FormControlWrapper/FormControlWrapper';
|
|
6
|
+
export interface RecursicaTextAreaProps extends Omit<MantineTextareaProps, "size" | "variant" | "radius" | "wrapperProps" | "label" | "description" | "error" | "required" | "withAsterisk">, Pick<RecursicaFormControlWrapperProps, "label" | "error" | "required" | "withAsterisk" | "id" | "assistiveText" | "assistiveWithIcon" | "formLayout" | "labelSize" | "labelAlignment" | "labelOptionalText" | "labelWithEditIcon" | "onLabelEditClick">, ReadOnlyControlProps {
|
|
7
|
+
/** Maximum rows for autosize textarea to grow */
|
|
8
|
+
maxRows?: number;
|
|
9
|
+
/** Minimum rows of autosize textarea */
|
|
10
|
+
minRows?: number;
|
|
11
|
+
/** If set, enables textarea height growing with its content */
|
|
12
|
+
autosize?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type TextAreaProps = RecursicaOverStyled<RecursicaTextAreaProps>;
|
|
15
|
+
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -7,10 +7,13 @@ export * from './Card/Card';
|
|
|
7
7
|
export * from './Checkbox/Checkbox';
|
|
8
8
|
export * from './Checkbox/CheckboxGroup';
|
|
9
9
|
export * from './Chip/Chip';
|
|
10
|
+
export * from './Container/Container';
|
|
10
11
|
export * from './DatePicker/DatePicker';
|
|
11
12
|
export * from './Dropdown/Dropdown';
|
|
12
13
|
export * from './FileInput/FileInput';
|
|
13
14
|
export * from './FileUpload/FileUpload';
|
|
15
|
+
export * from './Flex/Flex';
|
|
16
|
+
export * from './Group/Group';
|
|
14
17
|
export * from './HoverCard/HoverCard';
|
|
15
18
|
export * from './Link/Link';
|
|
16
19
|
export * from './Loader/Loader';
|
|
@@ -26,14 +29,17 @@ export * from './ReadOnlyField';
|
|
|
26
29
|
export * from './Search/Search';
|
|
27
30
|
export * from './SegmentedControl/SegmentedControl';
|
|
28
31
|
export * from './Slider/Slider';
|
|
32
|
+
export * from './Stack/Stack';
|
|
29
33
|
export * from './Stepper/Stepper';
|
|
30
34
|
export * from './Switch/Switch';
|
|
31
35
|
export * from './Table/Table';
|
|
32
36
|
export * from './Tabs/Tabs';
|
|
37
|
+
export * from './Text/Text';
|
|
33
38
|
export * from './TextArea/TextArea';
|
|
34
39
|
export * from './TextField/TextField';
|
|
35
40
|
export * from './TimePicker/TimePicker';
|
|
36
41
|
export * from './Timeline/Timeline';
|
|
42
|
+
export * from './Title/Title';
|
|
37
43
|
export * from './Toast/Toast';
|
|
38
44
|
export * from './Tooltip/Tooltip';
|
|
39
45
|
export * from './TransferList/TransferList';
|
package/package.json
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Container Implementation Notes
|
|
2
|
+
|
|
3
|
+
The `Container` component is a generic layout wrapper mapped directly to Mantine's `Container`.
|
|
4
|
+
It serves to provide standardized centered max-width bounds around content. Mantine handles the width boundaries inherently based on size properties.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { Container } from "./Container";
|
|
4
|
+
import { Text } from "../Text/Text";
|
|
5
|
+
|
|
6
|
+
type ContainerStoryProps = React.ComponentProps<typeof Container>;
|
|
7
|
+
|
|
8
|
+
const meta: Meta<ContainerStoryProps> = {
|
|
9
|
+
title: "UI-Kit/Container",
|
|
10
|
+
component: Container,
|
|
11
|
+
tags: ["autodocs"],
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component:
|
|
16
|
+
"Container is a generic layout wrapper that safely maps to Mantine's Container, standardizing maximum content widths across the application.",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
args: {
|
|
21
|
+
size: "md",
|
|
22
|
+
fluid: false,
|
|
23
|
+
},
|
|
24
|
+
argTypes: {
|
|
25
|
+
size: {
|
|
26
|
+
control: "select",
|
|
27
|
+
options: ["xs", "sm", "md", "lg", "xl"],
|
|
28
|
+
description: "Maximum width defined by Mantine system sizes",
|
|
29
|
+
},
|
|
30
|
+
fluid: {
|
|
31
|
+
control: "boolean",
|
|
32
|
+
description: "If true, overrides size and sets max-width to 100%",
|
|
33
|
+
},
|
|
34
|
+
defaultChecked: {
|
|
35
|
+
table: { disable: true },
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default meta;
|
|
41
|
+
|
|
42
|
+
type Story = StoryObj<ContainerStoryProps>;
|
|
43
|
+
|
|
44
|
+
export const Default: Story = {
|
|
45
|
+
render: (args) => (
|
|
46
|
+
<div style={{ backgroundColor: "#f0f0f0", padding: "16px" }}>
|
|
47
|
+
<Container
|
|
48
|
+
{...args}
|
|
49
|
+
style={{
|
|
50
|
+
backgroundColor: "white",
|
|
51
|
+
padding: "16px",
|
|
52
|
+
border: "1px solid #ccc",
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
<Text>
|
|
56
|
+
This is a Container holding centered content. The background and
|
|
57
|
+
border are added just to demonstrate the layout bounds visually.
|
|
58
|
+
</Text>
|
|
59
|
+
</Container>
|
|
60
|
+
</div>
|
|
61
|
+
),
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const SmallContainer: Story = {
|
|
65
|
+
args: {
|
|
66
|
+
size: "sm",
|
|
67
|
+
},
|
|
68
|
+
render: (args) => (
|
|
69
|
+
<div style={{ backgroundColor: "#f0f0f0", padding: "16px" }}>
|
|
70
|
+
<Container
|
|
71
|
+
{...args}
|
|
72
|
+
style={{
|
|
73
|
+
backgroundColor: "white",
|
|
74
|
+
padding: "16px",
|
|
75
|
+
border: "1px solid #ccc",
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
<Text>Small Container Layout</Text>
|
|
79
|
+
</Container>
|
|
80
|
+
</div>
|
|
81
|
+
),
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const FluidContainer: Story = {
|
|
85
|
+
args: {
|
|
86
|
+
fluid: true,
|
|
87
|
+
},
|
|
88
|
+
render: (args) => (
|
|
89
|
+
<div style={{ backgroundColor: "#f0f0f0", padding: "16px" }}>
|
|
90
|
+
<Container
|
|
91
|
+
{...args}
|
|
92
|
+
style={{
|
|
93
|
+
backgroundColor: "white",
|
|
94
|
+
padding: "16px",
|
|
95
|
+
border: "1px solid #ccc",
|
|
96
|
+
}}
|
|
97
|
+
>
|
|
98
|
+
<Text>Fluid Container Layout</Text>
|
|
99
|
+
</Container>
|
|
100
|
+
</div>
|
|
101
|
+
),
|
|
102
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Container as MantineContainer,
|
|
4
|
+
type ContainerProps as MantineContainerProps,
|
|
5
|
+
} from "@mantine/core";
|
|
6
|
+
import {
|
|
7
|
+
filterStylingProps,
|
|
8
|
+
type RecursicaOverStyled,
|
|
9
|
+
} from "../../utils/filterStylingProps";
|
|
10
|
+
import styles from "./Container.module.css";
|
|
11
|
+
|
|
12
|
+
export interface RecursicaContainerProps {
|
|
13
|
+
/**
|
|
14
|
+
* Children components inside the layout container
|
|
15
|
+
*/
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Container layout wrapper
|
|
21
|
+
*/
|
|
22
|
+
export type ContainerProps = RecursicaOverStyled<
|
|
23
|
+
MantineContainerProps & RecursicaContainerProps
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
export const Container = forwardRef<HTMLDivElement, ContainerProps>(
|
|
27
|
+
function Container({ children, overStyled = false, ...rest }, ref) {
|
|
28
|
+
const sanitizedProps = filterStylingProps(rest, overStyled);
|
|
29
|
+
const restRecord = sanitizedProps as Record<string, unknown>;
|
|
30
|
+
|
|
31
|
+
const mergedClassNames: Partial<Record<string, string>> = {
|
|
32
|
+
root: styles.root,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const classNamesProp = restRecord.classNames;
|
|
36
|
+
if (
|
|
37
|
+
classNamesProp &&
|
|
38
|
+
typeof classNamesProp === "object" &&
|
|
39
|
+
!Array.isArray(classNamesProp)
|
|
40
|
+
) {
|
|
41
|
+
const o = classNamesProp as Partial<Record<string, string>>;
|
|
42
|
+
mergedClassNames.root = o.root ? `${styles.root} ${o.root}` : styles.root;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const classNameProp = restRecord.className as string | undefined;
|
|
46
|
+
const finalClass = classNameProp
|
|
47
|
+
? `${styles.root} ${classNameProp}`
|
|
48
|
+
: styles.root;
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<MantineContainer
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={finalClass}
|
|
54
|
+
classNames={mergedClassNames}
|
|
55
|
+
{...sanitizedProps}
|
|
56
|
+
>
|
|
57
|
+
{children}
|
|
58
|
+
</MantineContainer>
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
Container.displayName = "Container";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Dropdown Implementation Notes
|
|
2
|
+
|
|
3
|
+
The `Dropdown` component is mapped explicitly to Mantine's `<Select>` following the exact same strict encapsulation rules as `TextField`.
|
|
4
|
+
|
|
5
|
+
1. **Naked Primitive Mapping:** Mantine's `Select` natively executes macro-label generation. To decouple it, we explicitly disable internal labels (`label={undefined}`) and inject it purely inside our generic `FormControlWrapper`.
|
|
6
|
+
2. **Strict Dropdown Design Tokens:** The adapter implements strictly sandboxed styling utilizing only `--recursica_ui-kit_components_dropdown_...` variables. It explicitly does NOT inherit general `text-field` tokens despite geometric similarities, ensuring dropdown menus can be themed independently.
|
|
7
|
+
3. **Dropdown Appendages:** To correctly map Mantine's detached Popover `.dropdown` and list `.option` items, we targeted focus and geometric bindings appending standard padding structures matched to the dropdown height overrides dynamically into our `Dropdown.module.css`.
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/* HARDCODED VALUES:
|
|
2
|
+
- border-width: 1px. Native geometric boundary for the input box.
|
|
3
|
+
- border-style: solid. Native structural rendering rule.
|
|
4
|
+
- outline: none. Bypassing browser focus rings to rely strictly on Recursica focus states natively.
|
|
5
|
+
- flex/layout: display: flex on the root wrapper safely encapsulating internal section rendering.
|
|
6
|
+
- placeholder opacity: 0.5. The dropdown parameters currently lack a dedicated placeholder-opacity variable.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.root {
|
|
10
|
+
display: flex;
|
|
11
|
+
position: relative;
|
|
12
|
+
width: 100%;
|
|
13
|
+
min-height: var(--recursica_ui-kit_components_dropdown_properties_min-height);
|
|
14
|
+
|
|
15
|
+
/* Override Mantine native Input variables governing section spacing padding mathematics safely */
|
|
16
|
+
--input-left-section-size: calc(
|
|
17
|
+
var(--recursica_ui-kit_components_dropdown_properties_icon-size) +
|
|
18
|
+
(
|
|
19
|
+
var(
|
|
20
|
+
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
21
|
+
) *
|
|
22
|
+
2
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
--input-right-section-size: calc(
|
|
26
|
+
var(--recursica_ui-kit_components_dropdown_properties_icon-size) +
|
|
27
|
+
(
|
|
28
|
+
var(
|
|
29
|
+
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
30
|
+
) *
|
|
31
|
+
2
|
|
32
|
+
)
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.input {
|
|
37
|
+
/* Structural Overrides */
|
|
38
|
+
width: 100%;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
margin: 0;
|
|
41
|
+
|
|
42
|
+
/* Box Geometry */
|
|
43
|
+
min-height: var(--recursica_ui-kit_components_dropdown_properties_min-height);
|
|
44
|
+
padding-top: var(
|
|
45
|
+
--recursica_ui-kit_components_dropdown_properties_vertical-padding
|
|
46
|
+
);
|
|
47
|
+
padding-bottom: var(
|
|
48
|
+
--recursica_ui-kit_components_dropdown_properties_vertical-padding
|
|
49
|
+
);
|
|
50
|
+
padding-left: var(
|
|
51
|
+
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
52
|
+
);
|
|
53
|
+
padding-right: var(
|
|
54
|
+
--recursica_ui-kit_components_dropdown_properties_horizontal-padding
|
|
55
|
+
);
|
|
56
|
+
border-radius: var(
|
|
57
|
+
--recursica_ui-kit_components_dropdown_properties_border-radius
|
|
58
|
+
);
|
|
59
|
+
border-width: 1px;
|
|
60
|
+
border-style: solid;
|
|
61
|
+
|
|
62
|
+
/* Strict Typography Unification */
|
|
63
|
+
font-family: var(
|
|
64
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-family
|
|
65
|
+
);
|
|
66
|
+
font-size: var(
|
|
67
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-size
|
|
68
|
+
);
|
|
69
|
+
font-style: var(
|
|
70
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-style
|
|
71
|
+
);
|
|
72
|
+
font-weight: var(
|
|
73
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-weight
|
|
74
|
+
);
|
|
75
|
+
letter-spacing: var(
|
|
76
|
+
--recursica_ui-kit_components_dropdown_properties_text_letter-spacing
|
|
77
|
+
);
|
|
78
|
+
line-height: var(
|
|
79
|
+
--recursica_ui-kit_components_dropdown_properties_text_line-height
|
|
80
|
+
);
|
|
81
|
+
text-decoration: var(
|
|
82
|
+
--recursica_ui-kit_components_dropdown_properties_text_text-decoration
|
|
83
|
+
);
|
|
84
|
+
text-transform: var(
|
|
85
|
+
--recursica_ui-kit_components_dropdown_properties_text_text-transform
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
/* Base State Default Execution */
|
|
89
|
+
background-color: var(
|
|
90
|
+
--recursica_ui-kit_components_dropdown_variants_states_default_properties_colors_background
|
|
91
|
+
);
|
|
92
|
+
border-color: var(
|
|
93
|
+
--recursica_ui-kit_components_dropdown_variants_states_default_properties_colors_border-color
|
|
94
|
+
);
|
|
95
|
+
color: var(
|
|
96
|
+
--recursica_ui-kit_components_dropdown_variants_states_default_properties_colors_text
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
outline: none;
|
|
100
|
+
transition:
|
|
101
|
+
border-color 0.15s ease,
|
|
102
|
+
background-color 0.15s ease;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.input::placeholder {
|
|
106
|
+
/* HARDCODE: Dropdown properties currently missing placeholder-opacity tokens from Figma JSON */
|
|
107
|
+
opacity: 0.5;
|
|
108
|
+
color: inherit;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Dynamic Padding Overrides */
|
|
112
|
+
.root[data-with-left-section] .input {
|
|
113
|
+
padding-left: var(--input-left-section-size);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.root[data-with-right-section] .input {
|
|
117
|
+
padding-right: var(--input-right-section-size);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Flexible End-Caps (Icons, actions) */
|
|
121
|
+
.section {
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
height: 100%;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.section :global(svg) {
|
|
129
|
+
width: var(--recursica_ui-kit_components_dropdown_properties_icon-size);
|
|
130
|
+
height: var(--recursica_ui-kit_components_dropdown_properties_icon-size);
|
|
131
|
+
color: var(
|
|
132
|
+
--recursica_ui-kit_components_dropdown_variants_states_default_properties_colors_leading-icon
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.section[data-position="right"] :global(svg) {
|
|
137
|
+
color: var(
|
|
138
|
+
--recursica_ui-kit_components_dropdown_variants_states_default_properties_colors_trailing-icon
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* -------------------------------------
|
|
143
|
+
STATE CASCADE ARCHITECTURE
|
|
144
|
+
-------------------------------------- */
|
|
145
|
+
|
|
146
|
+
/* Focus State Mapping (Triggered internally via browser pseudo-pseudo-class) */
|
|
147
|
+
.input:focus-within,
|
|
148
|
+
.input:focus {
|
|
149
|
+
border-color: var(
|
|
150
|
+
--recursica_ui-kit_components_dropdown_variants_states_focus_properties_colors_border-color
|
|
151
|
+
);
|
|
152
|
+
background-color: var(
|
|
153
|
+
--recursica_ui-kit_components_dropdown_variants_states_focus_properties_colors_background
|
|
154
|
+
);
|
|
155
|
+
color: var(
|
|
156
|
+
--recursica_ui-kit_components_dropdown_variants_states_focus_properties_colors_text
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.root:focus-within .section[data-position="left"] :global(svg) {
|
|
161
|
+
color: var(
|
|
162
|
+
--recursica_ui-kit_components_dropdown_variants_states_focus_properties_colors_leading-icon
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.root:focus-within .section[data-position="right"] :global(svg) {
|
|
167
|
+
color: var(
|
|
168
|
+
--recursica_ui-kit_components_dropdown_variants_states_focus_properties_colors_trailing-icon
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Error State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
173
|
+
.root[data-error] .input {
|
|
174
|
+
border-color: var(
|
|
175
|
+
--recursica_ui-kit_components_dropdown_variants_states_error_properties_colors_border-color
|
|
176
|
+
) !important;
|
|
177
|
+
background-color: var(
|
|
178
|
+
--recursica_ui-kit_components_dropdown_variants_states_error_properties_colors_background
|
|
179
|
+
) !important;
|
|
180
|
+
color: var(
|
|
181
|
+
--recursica_ui-kit_components_dropdown_variants_states_error_properties_colors_text
|
|
182
|
+
) !important;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.root[data-error] .section[data-position="left"] :global(svg) {
|
|
186
|
+
color: var(
|
|
187
|
+
--recursica_ui-kit_components_dropdown_variants_states_error_properties_colors_leading-icon
|
|
188
|
+
) !important;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.root[data-error] .section[data-position="right"] :global(svg) {
|
|
192
|
+
color: var(
|
|
193
|
+
--recursica_ui-kit_components_dropdown_variants_states_error_properties_colors_trailing-icon
|
|
194
|
+
) !important;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* Disabled State Mapping (Propagated strictly down from the wrapper DOM context) */
|
|
198
|
+
.root[data-disabled] .input {
|
|
199
|
+
border-color: var(
|
|
200
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_colors_border-color
|
|
201
|
+
) !important;
|
|
202
|
+
background-color: var(
|
|
203
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_colors_background
|
|
204
|
+
) !important;
|
|
205
|
+
color: var(
|
|
206
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_colors_text
|
|
207
|
+
) !important;
|
|
208
|
+
cursor: not-allowed;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.root[data-disabled] .section[data-position="left"] :global(svg) {
|
|
212
|
+
color: var(
|
|
213
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_colors_leading-icon
|
|
214
|
+
) !important;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.root[data-disabled] .section[data-position="right"] :global(svg) {
|
|
218
|
+
color: var(
|
|
219
|
+
--recursica_ui-kit_components_dropdown_variants_states_disabled_properties_colors_trailing-icon
|
|
220
|
+
) !important;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* -------------------------------------
|
|
224
|
+
DROPDOWN & OPTIONS ARCHITECTURE
|
|
225
|
+
-------------------------------------- */
|
|
226
|
+
|
|
227
|
+
.dropdown {
|
|
228
|
+
background-color: var(
|
|
229
|
+
--recursica_ui-kit_components_dropdown_variants_states_default_properties_colors_background
|
|
230
|
+
);
|
|
231
|
+
border: 1px solid
|
|
232
|
+
var(
|
|
233
|
+
--recursica_ui-kit_components_dropdown_variants_states_default_properties_colors_border-color
|
|
234
|
+
);
|
|
235
|
+
border-radius: var(
|
|
236
|
+
--recursica_ui-kit_components_dropdown_properties_border-radius
|
|
237
|
+
);
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.option {
|
|
242
|
+
font-family: var(
|
|
243
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-family
|
|
244
|
+
);
|
|
245
|
+
font-size: var(
|
|
246
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-size
|
|
247
|
+
);
|
|
248
|
+
font-weight: var(
|
|
249
|
+
--recursica_ui-kit_components_dropdown_properties_text_font-weight
|
|
250
|
+
);
|
|
251
|
+
color: var(
|
|
252
|
+
--recursica_ui-kit_components_dropdown_variants_states_default_properties_colors_text
|
|
253
|
+
);
|
|
254
|
+
padding: calc(
|
|
255
|
+
var(--recursica_ui-kit_components_dropdown_properties_vertical-padding) *
|
|
256
|
+
0.75
|
|
257
|
+
)
|
|
258
|
+
var(--recursica_ui-kit_components_dropdown_properties_horizontal-padding);
|
|
259
|
+
cursor: pointer;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.option[data-selected="true"],
|
|
263
|
+
.option[data-combobox-selected="true"],
|
|
264
|
+
.option[data-hovered="true"],
|
|
265
|
+
.option:hover {
|
|
266
|
+
background-color: var(
|
|
267
|
+
--recursica_ui-kit_components_dropdown_variants_states_focus_properties_colors_background
|
|
268
|
+
);
|
|
269
|
+
color: var(
|
|
270
|
+
--recursica_ui-kit_components_dropdown_variants_states_focus_properties_colors_text
|
|
271
|
+
);
|
|
272
|
+
}
|