bianic-ui 1.13.0-beta.1 → 1.13.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/dist/cjs/index.js
CHANGED
|
@@ -1516,7 +1516,7 @@ var stateColorConfig = {
|
|
|
1516
1516
|
};
|
|
1517
1517
|
|
|
1518
1518
|
var ContextualButton = function (_a) {
|
|
1519
|
-
var label = _a.label, icon = _a.icon, _b = _a.variant, variant = _b === void 0 ? 'dark' : _b, disabled = _a.disabled; _a.isNotified; var _d = _a.isSelected, isSelected = _d === void 0 ? false : _d, props = __rest(_a, ["label", "icon", "variant", "disabled", "isNotified", "isSelected"]);
|
|
1519
|
+
var actionElement = _a.actionElement, label = _a.label, icon = _a.icon, _b = _a.variant, variant = _b === void 0 ? 'dark' : _b, disabled = _a.disabled; _a.isNotified; var _d = _a.isSelected, isSelected = _d === void 0 ? false : _d, props = __rest(_a, ["actionElement", "label", "icon", "variant", "disabled", "isNotified", "isSelected"]);
|
|
1520
1520
|
var textColor = isSelected
|
|
1521
1521
|
? variant === 'dark'
|
|
1522
1522
|
? 'text-primary-black'
|
|
@@ -1525,7 +1525,8 @@ var ContextualButton = function (_a) {
|
|
|
1525
1525
|
var stateColor = stateColorConfig[isSelected ? 'selected' : 'default'];
|
|
1526
1526
|
return (React.createElement("button", __assign({ className: "contextual-button box-border flex flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
|
|
1527
1527
|
icon,
|
|
1528
|
-
label && (React.createElement("div", { className: "label max-h-[46px] px-[5px] text-[12px] leading-none" }, label))
|
|
1528
|
+
label && (React.createElement("div", { className: "label max-h-[46px] px-[5px] text-[12px] leading-none" }, label)),
|
|
1529
|
+
actionElement));
|
|
1529
1530
|
};
|
|
1530
1531
|
|
|
1531
1532
|
function Color() {
|
|
@@ -3,8 +3,9 @@ interface ContextualButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
3
3
|
label?: string;
|
|
4
4
|
variant?: 'dark' | 'light' | undefined;
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
|
+
actionElement?: React.ReactNode;
|
|
6
7
|
isNotified?: boolean;
|
|
7
8
|
isSelected?: boolean;
|
|
8
9
|
}
|
|
9
|
-
declare const ContextualButton: ({ label, icon, variant, disabled, isNotified, isSelected, ...props }: ContextualButtonProps) => React.JSX.Element;
|
|
10
|
+
declare const ContextualButton: ({ actionElement, label, icon, variant, disabled, isNotified, isSelected, ...props }: ContextualButtonProps) => React.JSX.Element;
|
|
10
11
|
export default ContextualButton;
|
package/dist/esm/index.js
CHANGED
|
@@ -1514,7 +1514,7 @@ var stateColorConfig = {
|
|
|
1514
1514
|
};
|
|
1515
1515
|
|
|
1516
1516
|
var ContextualButton = function (_a) {
|
|
1517
|
-
var label = _a.label, icon = _a.icon, _b = _a.variant, variant = _b === void 0 ? 'dark' : _b, disabled = _a.disabled; _a.isNotified; var _d = _a.isSelected, isSelected = _d === void 0 ? false : _d, props = __rest(_a, ["label", "icon", "variant", "disabled", "isNotified", "isSelected"]);
|
|
1517
|
+
var actionElement = _a.actionElement, label = _a.label, icon = _a.icon, _b = _a.variant, variant = _b === void 0 ? 'dark' : _b, disabled = _a.disabled; _a.isNotified; var _d = _a.isSelected, isSelected = _d === void 0 ? false : _d, props = __rest(_a, ["actionElement", "label", "icon", "variant", "disabled", "isNotified", "isSelected"]);
|
|
1518
1518
|
var textColor = isSelected
|
|
1519
1519
|
? variant === 'dark'
|
|
1520
1520
|
? 'text-primary-black'
|
|
@@ -1523,7 +1523,8 @@ var ContextualButton = function (_a) {
|
|
|
1523
1523
|
var stateColor = stateColorConfig[isSelected ? 'selected' : 'default'];
|
|
1524
1524
|
return (React.createElement("button", __assign({ className: "contextual-button box-border flex flex-row items-center rounded-radius-sm border border-transparent p-[1px] outline-none ".concat(stateColor, " ").concat(textColor) }, props, { disabled: disabled }),
|
|
1525
1525
|
icon,
|
|
1526
|
-
label && (React.createElement("div", { className: "label max-h-[46px] px-[5px] text-[12px] leading-none" }, label))
|
|
1526
|
+
label && (React.createElement("div", { className: "label max-h-[46px] px-[5px] text-[12px] leading-none" }, label)),
|
|
1527
|
+
actionElement));
|
|
1527
1528
|
};
|
|
1528
1529
|
|
|
1529
1530
|
function Color() {
|
|
@@ -3,8 +3,9 @@ interface ContextualButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
3
3
|
label?: string;
|
|
4
4
|
variant?: 'dark' | 'light' | undefined;
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
|
+
actionElement?: React.ReactNode;
|
|
6
7
|
isNotified?: boolean;
|
|
7
8
|
isSelected?: boolean;
|
|
8
9
|
}
|
|
9
|
-
declare const ContextualButton: ({ label, icon, variant, disabled, isNotified, isSelected, ...props }: ContextualButtonProps) => React.JSX.Element;
|
|
10
|
+
declare const ContextualButton: ({ actionElement, label, icon, variant, disabled, isNotified, isSelected, ...props }: ContextualButtonProps) => React.JSX.Element;
|
|
10
11
|
export default ContextualButton;
|
package/dist/index.d.ts
CHANGED
|
@@ -130,10 +130,11 @@ interface ContextualButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
130
130
|
label?: string;
|
|
131
131
|
variant?: 'dark' | 'light' | undefined;
|
|
132
132
|
icon?: React$1.ReactNode;
|
|
133
|
+
actionElement?: React$1.ReactNode;
|
|
133
134
|
isNotified?: boolean;
|
|
134
135
|
isSelected?: boolean;
|
|
135
136
|
}
|
|
136
|
-
declare const ContextualButton: ({ label, icon, variant, disabled, isNotified, isSelected, ...props }: ContextualButtonProps) => React$1.JSX.Element;
|
|
137
|
+
declare const ContextualButton: ({ actionElement, label, icon, variant, disabled, isNotified, isSelected, ...props }: ContextualButtonProps) => React$1.JSX.Element;
|
|
137
138
|
|
|
138
139
|
declare function Color(): React$1.JSX.Element;
|
|
139
140
|
|
package/package.json
CHANGED