@conveyorhq/arrow-ds 1.127.0 → 1.128.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/package.json +1 -1
- package/public/components/OptionButton/OptionButton.d.ts +6 -3
- package/public/components/OptionButton/OptionButton.js +4 -4
- package/public/css/styles.css +16 -2
- package/public/css/styles.min.css +1 -1
- package/public/css/styles.min.css.map +1 -1
- package/src/components/OptionButton/OptionButton.tsx +8 -3
- package/src/components/OptionButton/index.css +14 -2
package/package.json
CHANGED
|
@@ -7,8 +7,10 @@ export interface OptionButtonGroupProps extends StackProps {
|
|
|
7
7
|
type?: "radio" | "checkbox";
|
|
8
8
|
}
|
|
9
9
|
export declare const OptionButtonGroup: (props: OptionButtonGroupProps) => JSX.Element;
|
|
10
|
-
export declare type OptionButtonRootProps = HTMLProps<HTMLLabelElement
|
|
11
|
-
|
|
10
|
+
export declare type OptionButtonRootProps = HTMLProps<HTMLLabelElement> & {
|
|
11
|
+
theme?: "blue" | "green";
|
|
12
|
+
};
|
|
13
|
+
export declare const OptionButtonRoot: ({ children, className, theme, ...rest }: OptionButtonRootProps) => JSX.Element;
|
|
12
14
|
export declare type OptionButtonInputProps = HTMLProps<HTMLInputElement>;
|
|
13
15
|
export declare const OptionButtonInput: (props: OptionButtonInputProps) => JSX.Element;
|
|
14
16
|
export declare const OptionButtonContent: ({ className, children, ...rest }: BoxProps) => JSX.Element;
|
|
@@ -19,11 +21,12 @@ export declare const OptionButtonSelectedIcon: ({ className, ...rest }: BoxProps
|
|
|
19
21
|
interface OptionButtonProps extends HTMLProps<HTMLInputElement> {
|
|
20
22
|
heading: string;
|
|
21
23
|
description?: string;
|
|
24
|
+
theme?: "blue" | "green";
|
|
22
25
|
}
|
|
23
26
|
export declare const OptionButton: {
|
|
24
27
|
(props: OptionButtonProps): JSX.Element;
|
|
25
28
|
Group: (props: OptionButtonGroupProps) => JSX.Element;
|
|
26
|
-
Root: ({ children, className, ...rest }: OptionButtonRootProps) => JSX.Element;
|
|
29
|
+
Root: ({ children, className, theme, ...rest }: OptionButtonRootProps) => JSX.Element;
|
|
27
30
|
Input: (props: OptionButtonInputProps) => JSX.Element;
|
|
28
31
|
Content: ({ className, children, ...rest }: BoxProps) => JSX.Element;
|
|
29
32
|
Heading: ({ className, children, ...rest }: TextProps) => JSX.Element;
|
|
@@ -26,8 +26,8 @@ const OptionButtonGroup = (props) => {
|
|
|
26
26
|
react_1.default.createElement(Stack_1.Stack, Object.assign({ orientation: orientation }, rest))));
|
|
27
27
|
};
|
|
28
28
|
exports.OptionButtonGroup = OptionButtonGroup;
|
|
29
|
-
const OptionButtonRoot = ({ children, className, ...rest }) => {
|
|
30
|
-
return (react_1.default.createElement("label", Object.assign({ className: classnames_1.default(cn(), className) }, rest), children));
|
|
29
|
+
const OptionButtonRoot = ({ children, className, theme = "blue", ...rest }) => {
|
|
30
|
+
return (react_1.default.createElement("label", Object.assign({ className: classnames_1.default(cn(), className), "data-theme": theme }, rest), children));
|
|
31
31
|
};
|
|
32
32
|
exports.OptionButtonRoot = OptionButtonRoot;
|
|
33
33
|
const OptionButtonInput = (props) => {
|
|
@@ -54,7 +54,7 @@ const OptionButtonSelectedIcon = ({ className, ...rest }) => (react_1.default.cr
|
|
|
54
54
|
exports.OptionButtonSelectedIcon = OptionButtonSelectedIcon;
|
|
55
55
|
const OptionButton = (props) => {
|
|
56
56
|
const { name: nameFromContext, type: typeFromContext, } = context_1.useOptionButtonContext();
|
|
57
|
-
const { heading, description, id: idProp, name: nameProp, checked, className, defaultValue, type: typeProp = "radio", disabled = false, ...rest } = props;
|
|
57
|
+
const { heading, description, id: idProp, name: nameProp, checked, className, defaultValue, type: typeProp = "radio", disabled = false, theme = "blue", ...rest } = props;
|
|
58
58
|
const fallbackId = `OptionButton-${auto_id_1.useId()}`;
|
|
59
59
|
const id = isUndefined_1.default(idProp) ? fallbackId : idProp;
|
|
60
60
|
const name = isUndefined_1.default(nameFromContext) ? nameProp : nameFromContext;
|
|
@@ -64,7 +64,7 @@ const OptionButton = (props) => {
|
|
|
64
64
|
disabled && cn({ m: "disabled" }),
|
|
65
65
|
className,
|
|
66
66
|
]);
|
|
67
|
-
return (react_1.default.createElement(exports.OptionButtonRoot, { className: rootClassName },
|
|
67
|
+
return (react_1.default.createElement(exports.OptionButtonRoot, { className: rootClassName, theme: theme },
|
|
68
68
|
react_1.default.createElement(exports.OptionButtonContent, null,
|
|
69
69
|
heading && react_1.default.createElement(exports.OptionButtonHeading, null, heading),
|
|
70
70
|
description && (react_1.default.createElement(exports.OptionButtonDescription, null, description))),
|
package/public/css/styles.css
CHANGED
|
@@ -4939,16 +4939,30 @@ override built-in Image component classes */
|
|
|
4939
4939
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
4940
4940
|
}
|
|
4941
4941
|
|
|
4942
|
-
.ads-OptionButton:hover
|
|
4942
|
+
.ads-OptionButton[data-theme="blue"]:hover
|
|
4943
4943
|
.ads-OptionButton-input:checked
|
|
4944
4944
|
+ .ads-OptionButton-backdrop,
|
|
4945
|
-
.ads-OptionButton-
|
|
4945
|
+
.ads-OptionButton[data-theme="blue"]
|
|
4946
|
+
.ads-OptionButton-input:checked
|
|
4947
|
+
+ .ads-OptionButton-backdrop {
|
|
4946
4948
|
--tw-border-opacity: 1;
|
|
4947
4949
|
border-color: rgb(13 125 228 / var(--tw-border-opacity));
|
|
4948
4950
|
--tw-bg-opacity: 1;
|
|
4949
4951
|
background-color: rgb(244 247 249 / var(--tw-bg-opacity));
|
|
4950
4952
|
}
|
|
4951
4953
|
|
|
4954
|
+
.ads-OptionButton[data-theme="green"]:hover
|
|
4955
|
+
.ads-OptionButton-input:checked
|
|
4956
|
+
+ .ads-OptionButton-backdrop,
|
|
4957
|
+
.ads-OptionButton[data-theme="green"]
|
|
4958
|
+
.ads-OptionButton-input:checked
|
|
4959
|
+
+ .ads-OptionButton-backdrop {
|
|
4960
|
+
--tw-border-opacity: 1;
|
|
4961
|
+
border-color: rgb(51 198 159 / var(--tw-border-opacity));
|
|
4962
|
+
--tw-bg-opacity: 1;
|
|
4963
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
4964
|
+
}
|
|
4965
|
+
|
|
4952
4966
|
.ads-OptionButton-input:focus-visible + .ads-OptionButton-backdrop {
|
|
4953
4967
|
outline-style: solid;
|
|
4954
4968
|
outline-width: 2px;
|