@recursica/mantine-adapter 0.55.3 → 0.55.4
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 +8 -0
- package/dist/index.d.ts +16 -0
- package/dist/mantine-adapter.cjs.map +1 -1
- package/dist/mantine-adapter.js.map +1 -1
- package/package.json +2 -2
- package/src/components/AssistiveElement/AssistiveElement.stories.tsx +0 -1
- package/src/components/Chip/Chip.stories.tsx +15 -1
- package/src/components/EmptyValueRenderer/USAGE.md +37 -0
- package/src/components/EmptyValueRenderer/index.ts +5 -0
- package/src/components/Layer/index.ts +5 -0
- package/src/components/RecursicaThemeProvider/index.ts +2 -0
- package/src/components/index.ts +3 -0
- package/src/index.ts +105 -1
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "git+https://github.com/borderux/recursica.git",
|
|
14
14
|
"directory": "packages/mantine-adapter"
|
|
15
15
|
},
|
|
16
|
-
"version": "0.55.
|
|
16
|
+
"version": "0.55.4",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"main": "./dist/mantine-adapter.cjs",
|
|
19
19
|
"module": "./dist/mantine-adapter.js",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"vitest": "^3.2.4"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@recursica/adapter-common": "^0.29.
|
|
106
|
+
"@recursica/adapter-common": "^0.29.1"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
109
|
"@mantine/core": "^8.0.0",
|
|
@@ -118,9 +118,23 @@ export const WithLeadingIcon: Story = {
|
|
|
118
118
|
// matches MUI's native behavior of the check icon overlaying the leading icon.
|
|
119
119
|
export const WithLeadingIconSelected: Story = {
|
|
120
120
|
args: {
|
|
121
|
-
...WithLeadingIcon.args,
|
|
122
121
|
children: "Leading Icon Selected",
|
|
123
122
|
checked: true,
|
|
123
|
+
icon: (
|
|
124
|
+
<svg
|
|
125
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
126
|
+
viewBox="0 0 24 24"
|
|
127
|
+
fill="none"
|
|
128
|
+
stroke="currentColor"
|
|
129
|
+
strokeWidth="2"
|
|
130
|
+
strokeLinecap="round"
|
|
131
|
+
strokeLinejoin="round"
|
|
132
|
+
>
|
|
133
|
+
<circle cx="12" cy="12" r="10"></circle>
|
|
134
|
+
<path d="M12 8v4"></path>
|
|
135
|
+
<path d="M12 16h.01"></path>
|
|
136
|
+
</svg>
|
|
137
|
+
),
|
|
124
138
|
},
|
|
125
139
|
render: (args: ChipStoryProps) => <Chip {...args} onChange={() => {}} />,
|
|
126
140
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# EmptyValueRenderer - Usage Guide
|
|
2
|
+
|
|
3
|
+
This document describes how to integrate and use the `EmptyValueRenderer` component in your projects using `@recursica/mantine-adapter`.
|
|
4
|
+
|
|
5
|
+
> [!NOTE] > `EmptyValueRenderer` is defined once in `@recursica/adapter-common` and re-exported here so it shares the exact same behavior across every Recursica adapter.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Import Reference
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { EmptyValueRenderer } from "@recursica/mantine-adapter";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 2. Basic Example
|
|
18
|
+
|
|
19
|
+
`EmptyValueRenderer` renders a fallback (`"N/A"` by default) in place of an empty value, and exposes a static `EmptyValueRenderer.check(value)` helper that flags `null`, `undefined`, `""`, and `[]` as empty:
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { EmptyValueRenderer, ReadOnlyField } from "@recursica/mantine-adapter";
|
|
23
|
+
|
|
24
|
+
function Example({ value }: { value?: string }) {
|
|
25
|
+
return EmptyValueRenderer.check(value) ? (
|
|
26
|
+
<EmptyValueRenderer emptyText="No value set" />
|
|
27
|
+
) : (
|
|
28
|
+
<ReadOnlyField value={value} />
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Design System Integration
|
|
36
|
+
|
|
37
|
+
`EmptyValueRenderer` has no visual variants and does not accept `overStyled` — it is a plain text fallback, not a styled component. Use it wherever a read-only or empty-state surface needs a consistent "no value" treatment instead of ad hoc strings.
|
package/src/components/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from "./Chip/Chip";
|
|
|
12
12
|
export * from "./Container/Container";
|
|
13
13
|
export * from "./DatePicker/DatePicker";
|
|
14
14
|
export * from "./Dropdown/Dropdown";
|
|
15
|
+
export * from "./EmptyValueRenderer";
|
|
15
16
|
export * from "./FileInput/FileInput";
|
|
16
17
|
export * from "./FileUpload/FileUpload";
|
|
17
18
|
export * from "./Flex/Flex";
|
|
@@ -20,6 +21,7 @@ export * from "./Grid/Grid";
|
|
|
20
21
|
export * from "./Group/Group";
|
|
21
22
|
export * from "./Heading/Heading";
|
|
22
23
|
export * from "./HoverCard/HoverCard";
|
|
24
|
+
export * from "./Layer";
|
|
23
25
|
export * from "./Link/Link";
|
|
24
26
|
export * from "./Loader/Loader";
|
|
25
27
|
export * from "./Label";
|
|
@@ -32,6 +34,7 @@ export * from "./Popover";
|
|
|
32
34
|
export * from "./Radio/Radio";
|
|
33
35
|
export * from "./Radio/RadioGroup";
|
|
34
36
|
export * from "./ReadOnlyField";
|
|
37
|
+
export * from "./RecursicaThemeProvider";
|
|
35
38
|
export * from "./SegmentedControl/SegmentedControl";
|
|
36
39
|
export * from "./Slider/Slider";
|
|
37
40
|
export * from "./Stack/Stack";
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,111 @@ import "@recursica/adapter-common/style.css";
|
|
|
2
2
|
import * as rawComponents from "./components";
|
|
3
3
|
import { wrapComponent } from "@recursica/adapter-common";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// Pass-through components that have no mantine-specific implementation — each is
|
|
6
|
+
// redeclared in its own components/ folder and re-exported from adapter-common there.
|
|
7
|
+
export {
|
|
8
|
+
Layer,
|
|
9
|
+
EmptyValueRenderer,
|
|
10
|
+
RecursicaThemeProvider,
|
|
11
|
+
} from "./components";
|
|
12
|
+
export type {
|
|
13
|
+
RecursicaLayerProps,
|
|
14
|
+
LayerProps,
|
|
15
|
+
EmptyValueRendererProps,
|
|
16
|
+
RecursicaEmptyValueRendererProps,
|
|
17
|
+
RecursicaThemeProviderProps,
|
|
18
|
+
} from "./components";
|
|
19
|
+
export { markCurrentPageItem } from "@recursica/adapter-common";
|
|
20
|
+
|
|
21
|
+
// Foundational types and utilities re-exported explicitly from @recursica/adapter-common
|
|
22
|
+
export type {
|
|
23
|
+
RecursicaSpacing,
|
|
24
|
+
RecursicaSize,
|
|
25
|
+
RequireAccessibleLabel,
|
|
26
|
+
BlockedStylingKeys,
|
|
27
|
+
ForbiddenStyles,
|
|
28
|
+
WithRecursicaSpacing,
|
|
29
|
+
RecursicaOverStyled,
|
|
30
|
+
RecursicaLabelProps,
|
|
31
|
+
RecursicaFormControlWrapperProps,
|
|
32
|
+
RecursicaComponent,
|
|
33
|
+
} from "@recursica/adapter-common";
|
|
34
|
+
export { RECURSICA_COMPONENTS } from "@recursica/adapter-common";
|
|
35
|
+
export {
|
|
36
|
+
copyToClipboard,
|
|
37
|
+
fileMatchesAccept,
|
|
38
|
+
mergeClassNames,
|
|
39
|
+
mergeStyles,
|
|
40
|
+
normalizeComboboxData,
|
|
41
|
+
omitUnsupportedProps,
|
|
42
|
+
withCallerOverride,
|
|
43
|
+
wrapComponent,
|
|
44
|
+
IS_DEV,
|
|
45
|
+
toggleGlobalOverStyled,
|
|
46
|
+
isGlobalOverStyledActive,
|
|
47
|
+
useGlobalOverStyled,
|
|
48
|
+
injectOverStyledStyles,
|
|
49
|
+
registerOverStyledConsoleCommand,
|
|
50
|
+
} from "@recursica/adapter-common";
|
|
51
|
+
|
|
52
|
+
// Shared Recursica prop types that have no mantine-specific extension — re-exported
|
|
53
|
+
// explicitly since each component only imports these internally, never by name.
|
|
54
|
+
export type {
|
|
55
|
+
ReadOnlyControlProps,
|
|
56
|
+
ReadOnlyFieldType,
|
|
57
|
+
RecursicaAccordionProps,
|
|
58
|
+
RecursicaAccordionItemProps,
|
|
59
|
+
RecursicaAccordionControlProps,
|
|
60
|
+
RecursicaAccordionPanelProps,
|
|
61
|
+
RecursicaAssistiveElementProps,
|
|
62
|
+
RecursicaAutocompleteProps,
|
|
63
|
+
RecursicaAvatarProps,
|
|
64
|
+
RecursicaBadgeProps,
|
|
65
|
+
RecursicaBreadcrumbProps,
|
|
66
|
+
RecursicaButtonProps,
|
|
67
|
+
RecursicaCardProps,
|
|
68
|
+
RecursicaCardSectionProps,
|
|
69
|
+
RecursicaCheckboxProps,
|
|
70
|
+
RecursicaChipProps,
|
|
71
|
+
RecursicaComboboxItem,
|
|
72
|
+
RecursicaComboboxData,
|
|
73
|
+
RecursicaComboboxItemWithLabel,
|
|
74
|
+
RecursicaContainerProps,
|
|
75
|
+
RecursicaFileInputProps,
|
|
76
|
+
RecursicaFileInputItem,
|
|
77
|
+
RecursicaFileUploadProps,
|
|
78
|
+
RecursicaFileUploadItem,
|
|
79
|
+
RecursicaFormControlLayoutProps,
|
|
80
|
+
RecursicaHeadingProps,
|
|
81
|
+
RecursicaHoverCardProps,
|
|
82
|
+
RecursicaLinkProps,
|
|
83
|
+
RecursicaLoaderProps,
|
|
84
|
+
RecursicaMenuProps,
|
|
85
|
+
RecursicaModalProps,
|
|
86
|
+
RecursicaPaginationProps,
|
|
87
|
+
RecursicaPanelProps,
|
|
88
|
+
RecursicaPopoverProps,
|
|
89
|
+
RecursicaRadioProps,
|
|
90
|
+
RecursicaSegmentedControlProps,
|
|
91
|
+
RecursicaStepperProps,
|
|
92
|
+
RecursicaSwitchProps,
|
|
93
|
+
RecursicaTableProps,
|
|
94
|
+
RecursicaTableRowProps,
|
|
95
|
+
RecursicaTableHeaderCellProps,
|
|
96
|
+
RecursicaTableCellProps,
|
|
97
|
+
RecursicaTabsProps,
|
|
98
|
+
TextVariant,
|
|
99
|
+
RecursicaTextProps,
|
|
100
|
+
RecursicaTimelineProps,
|
|
101
|
+
RecursicaTimelineItemProps,
|
|
102
|
+
RecursicaToastProps,
|
|
103
|
+
RecursicaTooltipProps,
|
|
104
|
+
RecursicaTransferListProps,
|
|
105
|
+
RecursicaTransferListItem,
|
|
106
|
+
RecursicaTransferListData,
|
|
107
|
+
RecursicaTreeProps,
|
|
108
|
+
RecursicaTreeNode,
|
|
109
|
+
} from "@recursica/adapter-common";
|
|
6
110
|
|
|
7
111
|
// Expose unwrapped structural layout primitives to preserve their polymorphic types
|
|
8
112
|
export const Flex = rawComponents.Flex;
|