@edifice.io/react 2.5.19-develop-pedago.20260513133752 → 2.5.19-develop-pedago.20260518161655
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* Simple option for SegmentedControl
|
|
3
4
|
*/
|
|
@@ -10,6 +11,11 @@ export interface SegmentedOption {
|
|
|
10
11
|
* Option value
|
|
11
12
|
*/
|
|
12
13
|
value: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional element displayed next to the label (e.g. a Badge, an icon, a count…).
|
|
16
|
+
* No extra element is rendered when omitted.
|
|
17
|
+
*/
|
|
18
|
+
badge?: ReactNode;
|
|
13
19
|
}
|
|
14
20
|
/**
|
|
15
21
|
* SegmentedControl component props
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Segmented } from "antd";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { forwardRef } from "react";
|
|
@@ -12,7 +12,10 @@ const SegmentedControl = /* @__PURE__ */ forwardRef(({
|
|
|
12
12
|
}, ref) => {
|
|
13
13
|
const transformedOptions = options.map((option) => ({
|
|
14
14
|
...option,
|
|
15
|
-
label: /* @__PURE__ */
|
|
15
|
+
label: /* @__PURE__ */ jsxs("span", { className: "d-flex align-items-center gap-8", "data-testid": `segmented-option-${option.value}`, children: [
|
|
16
|
+
option.label,
|
|
17
|
+
option.badge
|
|
18
|
+
] })
|
|
16
19
|
})), classNames = clsx(className, {
|
|
17
20
|
ghost: variant === "ghost"
|
|
18
21
|
}), antProps = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.5.19-develop-pedago.
|
|
3
|
+
"version": "2.5.19-develop-pedago.20260518161655",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -133,9 +133,9 @@
|
|
|
133
133
|
"react-slugify": "3.0.3",
|
|
134
134
|
"swiper": "10.1.0",
|
|
135
135
|
"ua-parser-js": "1.0.36",
|
|
136
|
-
"@edifice.io/bootstrap": "2.5.19-develop-pedago.
|
|
137
|
-
"@edifice.io/
|
|
138
|
-
"@edifice.io/
|
|
136
|
+
"@edifice.io/bootstrap": "2.5.19-develop-pedago.20260518161655",
|
|
137
|
+
"@edifice.io/tiptap-extensions": "2.5.19-develop-pedago.20260518161655",
|
|
138
|
+
"@edifice.io/utilities": "2.5.19-develop-pedago.20260518161655"
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"@babel/plugin-transform-react-pure-annotations": "7.27.1",
|
|
@@ -166,8 +166,8 @@
|
|
|
166
166
|
"vite": "5.4.14",
|
|
167
167
|
"vite-plugin-dts": "4.5.4",
|
|
168
168
|
"vite-tsconfig-paths": "5.1.4",
|
|
169
|
-
"@edifice.io/client": "2.5.19-develop-pedago.
|
|
170
|
-
"@edifice.io/config": "2.5.19-develop-pedago.
|
|
169
|
+
"@edifice.io/client": "2.5.19-develop-pedago.20260518161655",
|
|
170
|
+
"@edifice.io/config": "2.5.19-develop-pedago.20260518161655"
|
|
171
171
|
},
|
|
172
172
|
"peerDependencies": {
|
|
173
173
|
"@react-spring/web": "9.7.5",
|