@cerberus-design/react 1.8.1 → 1.9.0-next.1790696978591.fa36c92
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.
|
@@ -24,14 +24,16 @@ function SplitButton(props) {
|
|
|
24
24
|
layout: "attached",
|
|
25
25
|
shape: actionProps.shape,
|
|
26
26
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_parts.ButtonParts.Root, {
|
|
27
|
-
usage,
|
|
28
27
|
...actionProps,
|
|
28
|
+
size: props.size,
|
|
29
|
+
usage,
|
|
29
30
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_parts.ButtonParts.Icon, {}), actionText]
|
|
30
31
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_menu.Menu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_menu.MenuTrigger, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.IconButton, {
|
|
31
32
|
ariaLabel: "More options",
|
|
32
33
|
palette: actionProps.palette,
|
|
33
34
|
disabled: actionProps.pending,
|
|
34
35
|
shape: iconShape,
|
|
36
|
+
size: props.size,
|
|
35
37
|
usage,
|
|
36
38
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectArrow, {})
|
|
37
39
|
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_menu.MenuContent, { children: elProps.children })] })]
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { ButtonProps } from '../button/index';
|
|
2
|
+
import { IconButtonProps } from '../icon-button/index';
|
|
2
3
|
import { CerberusPrimitiveProps } from '../../system/types';
|
|
3
4
|
/**
|
|
4
5
|
* This module provides an abstraction for a SplitButton component.
|
|
5
6
|
* @module SplitButton
|
|
6
7
|
*/
|
|
7
|
-
export interface SplitButtonProps extends ButtonProps {
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
8
|
+
export interface SplitButtonProps extends Omit<ButtonProps, 'size'> {
|
|
9
|
+
/**
|
|
10
|
+
* The text for the primary action button.
|
|
10
11
|
*/
|
|
11
12
|
actionText: string;
|
|
13
|
+
/**
|
|
14
|
+
* The size of the SplitButton.
|
|
15
|
+
*/
|
|
16
|
+
size?: IconButtonProps['size'];
|
|
12
17
|
}
|
|
13
18
|
/**
|
|
14
19
|
* A SplitButton component that combines a primary action button with a
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { ButtonProps } from '../button/index';
|
|
2
|
+
import { IconButtonProps } from '../icon-button/index';
|
|
2
3
|
import { CerberusPrimitiveProps } from '../../system/types';
|
|
3
4
|
/**
|
|
4
5
|
* This module provides an abstraction for a SplitButton component.
|
|
5
6
|
* @module SplitButton
|
|
6
7
|
*/
|
|
7
|
-
export interface SplitButtonProps extends ButtonProps {
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
8
|
+
export interface SplitButtonProps extends Omit<ButtonProps, 'size'> {
|
|
9
|
+
/**
|
|
10
|
+
* The text for the primary action button.
|
|
10
11
|
*/
|
|
11
12
|
actionText: string;
|
|
13
|
+
/**
|
|
14
|
+
* The size of the SplitButton.
|
|
15
|
+
*/
|
|
16
|
+
size?: IconButtonProps['size'];
|
|
12
17
|
}
|
|
13
18
|
/**
|
|
14
19
|
* A SplitButton component that combines a primary action button with a
|
|
@@ -24,14 +24,16 @@ function SplitButton(props) {
|
|
|
24
24
|
layout: "attached",
|
|
25
25
|
shape: actionProps.shape,
|
|
26
26
|
children: [/* @__PURE__ */ jsxs(ButtonParts.Root, {
|
|
27
|
-
usage,
|
|
28
27
|
...actionProps,
|
|
28
|
+
size: props.size,
|
|
29
|
+
usage,
|
|
29
30
|
children: [/* @__PURE__ */ jsx(ButtonParts.Icon, {}), actionText]
|
|
30
31
|
}), /* @__PURE__ */ jsxs(Menu, { children: [/* @__PURE__ */ jsx(MenuTrigger, { children: /* @__PURE__ */ jsx(IconButton, {
|
|
31
32
|
ariaLabel: "More options",
|
|
32
33
|
palette: actionProps.palette,
|
|
33
34
|
disabled: actionProps.pending,
|
|
34
35
|
shape: iconShape,
|
|
36
|
+
size: props.size,
|
|
35
37
|
usage,
|
|
36
38
|
children: /* @__PURE__ */ jsx(SelectArrow, {})
|
|
37
39
|
}) }), /* @__PURE__ */ jsx(MenuContent, { children: elProps.children })] })]
|
|
@@ -82,6 +82,10 @@
|
|
|
82
82
|
"marginTop]___[value:-15px]___[cond:& > *:not(:first-child)",
|
|
83
83
|
"borderBottomRightRadius]___[value:0!]___[cond:_iconButton",
|
|
84
84
|
"borderBottomRightRadius]___[value:0!]___[cond:_menuTrigger",
|
|
85
|
+
"borderTopRightRadius]___[value:0.25rem!]___[cond:_iconButton",
|
|
86
|
+
"borderBottomRightRadius]___[value:0.25rem!]___[cond:_iconButton",
|
|
87
|
+
"borderTopRightRadius]___[value:0.25rem!]___[cond:_menuTrigger",
|
|
88
|
+
"borderBottomRightRadius]___[value:0.25rem!]___[cond:_menuTrigger",
|
|
85
89
|
"paddingInlineEnd]___[value:0",
|
|
86
90
|
"transform]___[value:scaleX(-1)",
|
|
87
91
|
"transform]___[value:rotate(180deg)",
|
|
@@ -185,7 +189,9 @@
|
|
|
185
189
|
"palette]___[value:success]___[recipe:iconButton",
|
|
186
190
|
"palette]___[value:warning]___[recipe:iconButton",
|
|
187
191
|
"palette]___[value:danger]___[recipe:iconButton",
|
|
188
|
-
"usage]___[value:outlined]___[recipe:iconButton"
|
|
192
|
+
"usage]___[value:outlined]___[recipe:iconButton",
|
|
193
|
+
"size]___[value:xs]___[recipe:iconButton",
|
|
194
|
+
"size]___[value:md]___[recipe:iconButton"
|
|
189
195
|
],
|
|
190
196
|
"input": [
|
|
191
197
|
"size]___[value:lg]___[recipe:input",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerberus-design/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0-next.1790696978591.fa36c92",
|
|
4
4
|
"description": "The Cerberus Design React component library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@carbon/icons-react": "^11.88.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@cerberus/panda-preset": "1.
|
|
38
|
+
"@cerberus/panda-preset": "1.9.0-next.1790696978591.fa36c92",
|
|
39
39
|
"@internationalized/date": "^3.12.4",
|
|
40
40
|
"@pandacss/dev": "^1.12.1",
|
|
41
41
|
"@types/react": "^19.3.0",
|