@cerberus-design/react 1.3.0-rc.2 → 1.3.0-rc.3
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.
|
@@ -5,6 +5,7 @@ const require_parts = require("../button/parts.cjs");
|
|
|
5
5
|
const require_primitives = require("../button/primitives.cjs");
|
|
6
6
|
const require_button = require("../icon-button/button.cjs");
|
|
7
7
|
const require_menu = require("../menu/menu.cjs");
|
|
8
|
+
let react = require("react");
|
|
8
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
10
|
//#region src/components/split-button/button.tsx
|
|
10
11
|
/**
|
|
@@ -16,7 +17,9 @@ function SplitButton(props) {
|
|
|
16
17
|
const [elProps, { usage = "filled", actionText }, actionProps] = require_index.splitProps(props, ["children"], ["usage", "actionText"]);
|
|
17
18
|
const { icons } = require_cerberus.useCerberusContext();
|
|
18
19
|
const { selectArrow: SelectArrow } = icons;
|
|
19
|
-
const iconShape =
|
|
20
|
+
const iconShape = (0, react.useMemo)(() => {
|
|
21
|
+
return actionProps.shape === "rounded" ? "circle" : "square";
|
|
22
|
+
}, [actionProps.shape]);
|
|
20
23
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_primitives.ButtonGroup, {
|
|
21
24
|
layout: "attached",
|
|
22
25
|
shape: actionProps.shape,
|
|
@@ -5,6 +5,7 @@ import { ButtonParts } from "../button/parts.js";
|
|
|
5
5
|
import { ButtonGroup } from "../button/primitives.js";
|
|
6
6
|
import { IconButton } from "../icon-button/button.js";
|
|
7
7
|
import { Menu, MenuContent, MenuTrigger } from "../menu/menu.js";
|
|
8
|
+
import { useMemo } from "react";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
//#region src/components/split-button/button.tsx
|
|
10
11
|
/**
|
|
@@ -16,7 +17,9 @@ function SplitButton(props) {
|
|
|
16
17
|
const [elProps, { usage = "filled", actionText }, actionProps] = splitProps(props, ["children"], ["usage", "actionText"]);
|
|
17
18
|
const { icons } = useCerberusContext();
|
|
18
19
|
const { selectArrow: SelectArrow } = icons;
|
|
19
|
-
const iconShape =
|
|
20
|
+
const iconShape = useMemo(() => {
|
|
21
|
+
return actionProps.shape === "rounded" ? "circle" : "square";
|
|
22
|
+
}, [actionProps.shape]);
|
|
20
23
|
return /* @__PURE__ */ jsxs(ButtonGroup, {
|
|
21
24
|
layout: "attached",
|
|
22
25
|
shape: actionProps.shape,
|
|
@@ -80,7 +80,8 @@
|
|
|
80
80
|
"marginBottom]___[value:-1px]___[cond:& > *:not(:first-child):not(:last-child)",
|
|
81
81
|
"borderTopRadius]___[value:0!]___[cond:& > *:last-child",
|
|
82
82
|
"marginTop]___[value:-15px]___[cond:& > *:not(:first-child)",
|
|
83
|
-
"borderBottomRightRadius]___[value:0!]___[cond
|
|
83
|
+
"borderBottomRightRadius]___[value:0!]___[cond:_iconButton",
|
|
84
|
+
"borderBottomRightRadius]___[value:0!]___[cond:_menuTrigger",
|
|
84
85
|
"paddingInlineEnd]___[value:0",
|
|
85
86
|
"transform]___[value:scaleX(-1)",
|
|
86
87
|
"transform]___[value:rotate(180deg)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerberus-design/react",
|
|
3
|
-
"version": "1.3.0-rc.
|
|
3
|
+
"version": "1.3.0-rc.3",
|
|
4
4
|
"description": "The Cerberus Design React component library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react-dom": "^19.2.5",
|
|
46
46
|
"vite": "^8.0.8",
|
|
47
47
|
"vite-plugin-dts": "^5.0.0",
|
|
48
|
-
"@cerberus/panda-preset": "1.3.0-rc.
|
|
48
|
+
"@cerberus/panda-preset": "1.3.0-rc.3",
|
|
49
49
|
"styled-system": "0.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|