@luscii-healthtech/web-ui 28.11.1 → 28.12.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/components/Box/Box.d.ts +1 -1
- package/dist/components/Card/Card.d.ts +11 -4
- package/dist/components/Card/HoverIndicator.d.ts +8 -0
- package/dist/components/Text/Text.d.ts +4 -4
- package/dist/index.development.js +161 -17
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/radius.utils.d.ts +13 -0
- package/dist/utils/shadow.utils.d.ts +19 -0
- package/dist/web-ui-tailwind.css +236 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ export type Props<C extends React.ElementType> = React.ComponentPropsWithoutRef<
|
|
|
21
21
|
* Will set a border radius based on the standard sizes scale.
|
|
22
22
|
* Check {@link SIZES} for reference.
|
|
23
23
|
*/
|
|
24
|
-
borderRadius?:
|
|
24
|
+
borderRadius?: keyof typeof SIZES;
|
|
25
25
|
};
|
|
26
26
|
export declare const Box: <C extends React.ElementType = "div">(props: Props<C>) => React.JSX.Element;
|
|
27
27
|
export {};
|
|
@@ -32,7 +32,18 @@ type TitleAndMaybeActions = {
|
|
|
32
32
|
};
|
|
33
33
|
export type Props<C extends React.ElementType> = React.ComponentPropsWithoutRef<C> & {
|
|
34
34
|
as?: C;
|
|
35
|
+
border?: boolean;
|
|
36
|
+
borderRadius?: BoxProps<C>["borderRadius"];
|
|
35
37
|
children: React.ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Adds a box-shadow to the element based on the design system
|
|
40
|
+
*/
|
|
41
|
+
elevation?: BoxProps<C>["elevation"];
|
|
42
|
+
/**
|
|
43
|
+
* The elevation from the design system to apply when hovering over the card.
|
|
44
|
+
*/
|
|
45
|
+
elevationOnHover?: BoxProps<C>["elevation"];
|
|
46
|
+
indicatorOnHover?: boolean;
|
|
36
47
|
/**
|
|
37
48
|
* Whether or not to add the default padding to the card. Set this
|
|
38
49
|
* to `false` if you want to render something full width inside of the
|
|
@@ -42,10 +53,6 @@ export type Props<C extends React.ElementType> = React.ComponentPropsWithoutRef<
|
|
|
42
53
|
* @default true
|
|
43
54
|
*/
|
|
44
55
|
padding?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Adds a box-shadow to the element based on the design system
|
|
47
|
-
*/
|
|
48
|
-
elevation?: BoxProps<C>["elevation"];
|
|
49
56
|
} & TitleAndMaybeActions;
|
|
50
57
|
export declare function Card<C extends React.ElementType = "div">(props: Props<C>): React.JSX.Element;
|
|
51
58
|
export declare namespace Card {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type Props as BoxProps } from "../Box/Box";
|
|
3
|
+
type Props = {
|
|
4
|
+
borderRadius?: BoxProps<"div">["borderRadius"];
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare const HoverIndicator: (props: Props) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -8,10 +8,10 @@ import "./Text.css";
|
|
|
8
8
|
* https://v1.tailwindcss.com/docs/controlling-file-size
|
|
9
9
|
*/
|
|
10
10
|
export declare const allowedTextStyles: {
|
|
11
|
-
readonly sm:
|
|
12
|
-
readonly "sm-strong":
|
|
13
|
-
readonly base:
|
|
14
|
-
readonly strong:
|
|
11
|
+
readonly sm: `${string} ui-font-medium`;
|
|
12
|
+
readonly "sm-strong": `${string} ui-font-semibold ui-antialiased`;
|
|
13
|
+
readonly base: string;
|
|
14
|
+
readonly strong: `${string} ui-font-semibold ui-antialiased`;
|
|
15
15
|
readonly lg: "";
|
|
16
16
|
readonly "lg-strong": "ui-font-semibold ui-antialiased";
|
|
17
17
|
readonly xl: "ui-text-lg";
|
|
@@ -949,11 +949,15 @@ function styleInject(css, ref) {
|
|
|
949
949
|
var css_248z$j = "/* https://stackoverflow.com/a/13924997 */\n.ui-text-two-lines-max {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n /* number of lines to show */\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n";
|
|
950
950
|
styleInject(css_248z$j);
|
|
951
951
|
|
|
952
|
+
const responsiveTextSizeVariants = {
|
|
953
|
+
sm: "ui-text-sm sm:ui-text-xs",
|
|
954
|
+
base: "ui-text-base sm:ui-text-sm"
|
|
955
|
+
};
|
|
952
956
|
const allowedTextStyles = {
|
|
953
|
-
sm:
|
|
954
|
-
"sm-strong":
|
|
955
|
-
base:
|
|
956
|
-
strong:
|
|
957
|
+
sm: `${responsiveTextSizeVariants.sm} ui-font-medium`,
|
|
958
|
+
"sm-strong": `${responsiveTextSizeVariants.sm} ui-font-semibold ui-antialiased`,
|
|
959
|
+
base: responsiveTextSizeVariants.base,
|
|
960
|
+
strong: `${responsiveTextSizeVariants.base} ui-font-semibold ui-antialiased`,
|
|
957
961
|
lg: "",
|
|
958
962
|
"lg-strong": "ui-font-semibold ui-antialiased",
|
|
959
963
|
xl: "ui-text-lg",
|
|
@@ -994,6 +998,7 @@ const Text = (props) => {
|
|
|
994
998
|
allowedColors[color !== null && color !== void 0 ? color : "base"],
|
|
995
999
|
selectedHoverColor,
|
|
996
1000
|
selectedGroupHoverColor,
|
|
1001
|
+
"leading-6 sm:leading-5",
|
|
997
1002
|
{
|
|
998
1003
|
"ui-inline": inline,
|
|
999
1004
|
// FIXME: this class doesn't do anything without a ui-max-width
|
|
@@ -1738,7 +1743,7 @@ const ButtonV2 = React__namespace.default.forwardRef((_a, innerRef) => {
|
|
|
1738
1743
|
"ui-px-[calc(theme('spacing.m')-1px)]": true,
|
|
1739
1744
|
"ui-py-[calc(theme('spacing.xxs')-1px)]": size === "medium",
|
|
1740
1745
|
"ui-py-[calc(theme('spacing.s')-1px)]": size === "large"
|
|
1741
|
-
}, className);
|
|
1746
|
+
}, "ui-h-12 sm:ui-h-auto", className);
|
|
1742
1747
|
const textColorClass = allowedColors[textColor !== null && textColor !== void 0 ? textColor : "base"];
|
|
1743
1748
|
const tooltipAttrs = title ? {
|
|
1744
1749
|
"data-tip": true,
|
|
@@ -2070,6 +2075,121 @@ const CenteredHero = ({ title, text, image, buttons = [], background = "slate-50
|
|
|
2070
2075
|
);
|
|
2071
2076
|
};
|
|
2072
2077
|
|
|
2078
|
+
const ELEVATION = {
|
|
2079
|
+
surface: "none",
|
|
2080
|
+
base: "0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)",
|
|
2081
|
+
small: "0px 1px 2px rgba(0, 0, 0, 0.05)",
|
|
2082
|
+
medium: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
2083
|
+
large: "0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
2084
|
+
extraLarge: "0px 6px 10px rgba(0, 0, 0, 0.14), 0px 1px 18px rgba(0, 0, 0, 0.12), 0px 3px 5px rgba(0, 0, 0, 0.2)",
|
|
2085
|
+
drag: "0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)"
|
|
2086
|
+
};
|
|
2087
|
+
|
|
2088
|
+
const createShadowClassName = (elevation, options) => {
|
|
2089
|
+
if (!elevation || !ELEVATION[elevation]) {
|
|
2090
|
+
return "";
|
|
2091
|
+
}
|
|
2092
|
+
const { modifier } = options || {};
|
|
2093
|
+
if (modifier === "hover") {
|
|
2094
|
+
return classNames__default.default({
|
|
2095
|
+
"hover:ui-shadow-base": elevation === "base",
|
|
2096
|
+
"hover:ui-shadow-small": elevation === "small",
|
|
2097
|
+
"hover:ui-shadow-medium": elevation === "medium",
|
|
2098
|
+
"hover:ui-shadow-large": elevation === "large",
|
|
2099
|
+
"hover:ui-shadow-surface": elevation === "surface",
|
|
2100
|
+
"hover:ui-shadow-extraLarge": elevation === "extraLarge",
|
|
2101
|
+
"hover:ui-shadow-drag": elevation === "drag"
|
|
2102
|
+
});
|
|
2103
|
+
}
|
|
2104
|
+
if (modifier === "focus") {
|
|
2105
|
+
return classNames__default.default({
|
|
2106
|
+
"focus:ui-shadow-base": elevation === "base",
|
|
2107
|
+
"focus:ui-shadow-small": elevation === "small",
|
|
2108
|
+
"focus:ui-shadow-medium": elevation === "medium",
|
|
2109
|
+
"focus:ui-shadow-large": elevation === "large",
|
|
2110
|
+
"focus:ui-shadow-surface": elevation === "surface",
|
|
2111
|
+
"focus:ui-shadow-extraLarge": elevation === "extraLarge",
|
|
2112
|
+
"focus:ui-shadow-drag": elevation === "drag"
|
|
2113
|
+
});
|
|
2114
|
+
}
|
|
2115
|
+
if (modifier === "active") {
|
|
2116
|
+
return classNames__default.default({
|
|
2117
|
+
"active:ui-shadow-base": elevation === "base",
|
|
2118
|
+
"active:ui-shadow-small": elevation === "small",
|
|
2119
|
+
"active:ui-shadow-medium": elevation === "medium",
|
|
2120
|
+
"active:ui-shadow-large": elevation === "large",
|
|
2121
|
+
"active:ui-shadow-surface": elevation === "surface",
|
|
2122
|
+
"active:ui-shadow-extraLarge": elevation === "extraLarge",
|
|
2123
|
+
"active:ui-shadow-drag": elevation === "drag"
|
|
2124
|
+
});
|
|
2125
|
+
}
|
|
2126
|
+
return classNames__default.default({
|
|
2127
|
+
"ui-shadow-base": elevation === "base",
|
|
2128
|
+
"ui-shadow-small": elevation === "small",
|
|
2129
|
+
"ui-shadow-medium": elevation === "medium",
|
|
2130
|
+
"ui-shadow-large": elevation === "large",
|
|
2131
|
+
"ui-shadow-surface": elevation === "surface",
|
|
2132
|
+
"ui-shadow-extraLarge": elevation === "extraLarge",
|
|
2133
|
+
"ui-shadow-drag": elevation === "drag"
|
|
2134
|
+
});
|
|
2135
|
+
};
|
|
2136
|
+
|
|
2137
|
+
const SIZES = {
|
|
2138
|
+
/**
|
|
2139
|
+
* Represents the tiny size of 4px.
|
|
2140
|
+
*/
|
|
2141
|
+
xxxxs: "4px",
|
|
2142
|
+
/**
|
|
2143
|
+
* Represents a very extra extra small size of 6px.
|
|
2144
|
+
*/
|
|
2145
|
+
xxxs: "6px",
|
|
2146
|
+
/**
|
|
2147
|
+
* Represents an extra extra small size of 8px.
|
|
2148
|
+
*/
|
|
2149
|
+
xxs: "8px",
|
|
2150
|
+
/**
|
|
2151
|
+
* Represents an extra small size of 10px.
|
|
2152
|
+
*/
|
|
2153
|
+
xs: "10px",
|
|
2154
|
+
/**
|
|
2155
|
+
* Represents a small size of 12px.
|
|
2156
|
+
*/
|
|
2157
|
+
s: "12px",
|
|
2158
|
+
/**
|
|
2159
|
+
* Represents a medium size of 16px.
|
|
2160
|
+
*/
|
|
2161
|
+
m: "16px",
|
|
2162
|
+
/**
|
|
2163
|
+
* Represents a large size of 24px.
|
|
2164
|
+
*/
|
|
2165
|
+
l: "24px",
|
|
2166
|
+
/**
|
|
2167
|
+
* Represents an extra large size of 32px.
|
|
2168
|
+
*/
|
|
2169
|
+
xl: "32px",
|
|
2170
|
+
/**
|
|
2171
|
+
* Represents an extra extra large size of 32px.
|
|
2172
|
+
*/
|
|
2173
|
+
xxl: "32px"
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2176
|
+
const createRadiusClassName = (borderRadius) => {
|
|
2177
|
+
if (!borderRadius || !SIZES[borderRadius]) {
|
|
2178
|
+
return "";
|
|
2179
|
+
}
|
|
2180
|
+
return classNames__default.default({
|
|
2181
|
+
"ui-radius-xxxxs": borderRadius === "xxxxs",
|
|
2182
|
+
"ui-radius-xxxs": borderRadius === "xxxs",
|
|
2183
|
+
"ui-radius-xxs": borderRadius === "xxs",
|
|
2184
|
+
"ui-radius-xs": borderRadius === "xs",
|
|
2185
|
+
"ui-radius-s": borderRadius === "s",
|
|
2186
|
+
"ui-radius-m": borderRadius === "m",
|
|
2187
|
+
"ui-radius-l": borderRadius === "l",
|
|
2188
|
+
"ui-radius-xl": borderRadius === "xl",
|
|
2189
|
+
"ui-radius-xxl": borderRadius === "xxl"
|
|
2190
|
+
});
|
|
2191
|
+
};
|
|
2192
|
+
|
|
2073
2193
|
const spacingKeys = [
|
|
2074
2194
|
"p",
|
|
2075
2195
|
"pt",
|
|
@@ -2090,8 +2210,10 @@ const createSpacingClassNames = (keys, spacingProps) => {
|
|
|
2090
2210
|
return keys.filter((key) => spacingProps[key]).map((key) => `ui-${key}-${spacingProps[key]}`).join(" ");
|
|
2091
2211
|
};
|
|
2092
2212
|
const Box = (props) => {
|
|
2093
|
-
const { as: Element = "div", className, elevation, width } = props, attributes = __rest(props, ["as", "className", "elevation", "width"]);
|
|
2213
|
+
const { as: Element = "div", borderRadius, className, elevation, width } = props, attributes = __rest(props, ["as", "borderRadius", "className", "elevation", "width"]);
|
|
2094
2214
|
const spacingClasses = createSpacingClassNames(spacingKeys, props);
|
|
2215
|
+
const shadowClassName = createShadowClassName(elevation);
|
|
2216
|
+
const borderRadiusClassName = createRadiusClassName(borderRadius);
|
|
2095
2217
|
const attributesWithoutSpacingKeys = omit__default.default(attributes, spacingKeys);
|
|
2096
2218
|
return React__namespace.default.createElement(Element, Object.assign({ className: classNames__default.default(spacingClasses, {
|
|
2097
2219
|
"ui-bg-slate-100": props.backgroundColor === "base",
|
|
@@ -2099,11 +2221,9 @@ const Box = (props) => {
|
|
|
2099
2221
|
"ui-bg-red-50": props.backgroundColor === "red",
|
|
2100
2222
|
" ui-bg-green-50": props.backgroundColor === "green",
|
|
2101
2223
|
" ui-bg-amber-50": props.backgroundColor === "amber",
|
|
2102
|
-
[`ui-shadow-${elevation}`]: elevation,
|
|
2103
2224
|
[`ui-w-${width}`]: width && width !== "full",
|
|
2104
|
-
"ui-w-full": width === "full"
|
|
2105
|
-
|
|
2106
|
-
}, className) }, attributesWithoutSpacingKeys));
|
|
2225
|
+
"ui-w-full": width === "full"
|
|
2226
|
+
}, className, shadowClassName, borderRadiusClassName) }, attributesWithoutSpacingKeys));
|
|
2107
2227
|
};
|
|
2108
2228
|
|
|
2109
2229
|
const Stack = (props) => {
|
|
@@ -2536,7 +2656,7 @@ const Carousel = ({ slides, className, id }) => {
|
|
|
2536
2656
|
) : React__namespace.default.createElement(React__namespace.default.Fragment, null);
|
|
2537
2657
|
};
|
|
2538
2658
|
|
|
2539
|
-
var css_248z$c = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FILE IN FUTURE CHANGES. WE SHOULD BE\n * USING TAILWIND CLASSES DIRECTLY IN OUR COMPONENTS.\n */\n.cweb-checkbox {\n outline: none;\n}\n.cweb-checkbox .cweb-checkbox-input {\n position: absolute;\n -webkit-appearance: none;\n height: 1px;\n opacity: 0;\n width: 1px;\n}\n.cweb-checkbox.type-regular .cweb-checkbox-icon-container {\n border-color: #cccccc;\n
|
|
2659
|
+
var css_248z$c = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FILE IN FUTURE CHANGES. WE SHOULD BE\n * USING TAILWIND CLASSES DIRECTLY IN OUR COMPONENTS.\n */\n.cweb-checkbox {\n outline: none;\n}\n.cweb-checkbox .cweb-checkbox-input {\n position: absolute;\n -webkit-appearance: none;\n height: 1px;\n opacity: 0;\n width: 1px;\n}\n.cweb-checkbox.type-regular .cweb-checkbox-icon-container {\n border-color: #cccccc;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n border-width: 1px;\n border-style: solid;\n border-radius: 4px;\n}\n.cweb-checkbox.type-regular.hasError .cweb-checkbox-icon-container {\n --tw-border-opacity: 1;\n border-color: rgb(155 44 44 / var(--tw-border-opacity));\n}\n.cweb-checkbox.type-regular.is-focused .cweb-checkbox-icon-container {\n border-color: #1e40af;\n}\n.cweb-checkbox.type-regular.is-checked .cweb-checkbox-icon {\n padding: 4px;\n background: url(\"data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2210%22 height%3D%228%22 viewBox%3D%220 0 10 8%22 fill%3D%22none%22%3E %3Cpath d%3D%22M9.207 0.792787C9.39447 0.980314 9.49979 1.23462 9.49979 1.49979C9.49979 1.76495 9.39447 2.01926 9.207 2.20679L4.207 7.20679C4.01947 7.39426 3.76516 7.49957 3.5 7.49957C3.23484 7.49957 2.98053 7.39426 2.793 7.20679L0.793 5.20679C0.610842 5.01818 0.510047 4.76558 0.512326 4.50339C0.514604 4.24119 0.619773 3.99038 0.805181 3.80497C0.990589 3.61956 1.2414 3.51439 1.5036 3.51211C1.7658 3.50983 2.0184 3.61063 2.207 3.79279L3.5 5.08579L7.793 0.792787C7.98053 0.605316 8.23484 0.5 8.5 0.5C8.76516 0.5 9.01947 0.605316 9.207 0.792787Z%22 fill%3D%22white%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-checkbox.type-regular.is-checked .cweb-checkbox-icon-container {\n border-color: #1e40af;\n}\n.cweb-checkbox.type-regular.is-checked.is-focused .cweb-checkbox-icon-container {\n border-color: #1d4ed8;\n}\n.cweb-checkbox.type-regular.is-indeterminate .cweb-checkbox-icon {\n width: 0.5rem;\n height: 0.5rem;\n padding: 4px;\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2210%22 height%3D%222%22 viewBox%3D%220 0 10 2%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M9 -4.37114e-08C9.55228 -1.95703e-08 10 0.447715 10 1C10 1.55228 9.55228 2 9 2L1 2C0.447716 2 -6.78525e-08 1.55228 -4.37114e-08 1C-1.95703e-08 0.447715 0.447715 -4.17544e-07 1 -3.93402e-07L9 -4.37114e-08Z%22 fill%3D%22white%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-checkbox.type-regular.is-indeterminate .cweb-checkbox-icon-container {\n border-color: #1e40af;\n}\n.cweb-checkbox.type-regular.is-indeterminate.is-focused .cweb-checkbox-icon-container {\n border-color: #1d4ed8;\n}\n.cweb-checkbox.type-regular.is-disabled.show-cross-when-disabled .cweb-checkbox-icon {\n width: 10px;\n height: 10px;\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2211px%22 height%3D%2211px%22 viewBox%3D%220 0 11 11%22 version%3D%221.1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cg stroke%3D%22none%22 stroke-width%3D%221%22 fill%3D%22none%22 fill-rule%3D%22evenodd%22 stroke-linecap%3D%22round%22%3E %3Cg transform%3D%22translate(-6.000000%2C -7.000000)%22 stroke%3D%22%232D2D2D%22 stroke-width%3D%222%22%3E %3Cpath d%3D%22M7%2C17 L16%2C8 M16%2C17 L7%2C8%22 %2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n opacity: 0.6;\n}";
|
|
2540
2660
|
styleInject(css_248z$c);
|
|
2541
2661
|
|
|
2542
2662
|
const CheckboxInner = (props) => {
|
|
@@ -2589,18 +2709,18 @@ const CheckboxInner = (props) => {
|
|
|
2589
2709
|
{ className: "ui-flex" },
|
|
2590
2710
|
React__namespace.default.createElement(
|
|
2591
2711
|
"div",
|
|
2592
|
-
{ className: "ui-flex ui-h-[
|
|
2712
|
+
{ className: "ui-flex ui-h-[24px] ui-flex-col ui-justify-center sm:ui-h-[20px]" },
|
|
2593
2713
|
React__namespace.default.createElement("input", { id, ref: innerRef, "data-test-id": `checkbox-${name}`, className: "cweb-checkbox-input", name, type: "checkbox", checked, disabled: isDisabled, value, onBlur: handleBlur, onFocus: handleFocus, onChange: handleChange }),
|
|
2594
2714
|
React__namespace.default.createElement(
|
|
2595
2715
|
"span",
|
|
2596
|
-
{ className: classNames__default.default("cweb-checkbox-icon-container ui-transition-colors", {
|
|
2716
|
+
{ className: classNames__default.default("cweb-checkbox-icon-container ui-transition-colors", "ui-h-6 ui-w-6", "sm:ui-h-4 sm:ui-w-4", {
|
|
2597
2717
|
"ui-bg-primary": checked || indeterminate,
|
|
2598
2718
|
"ui-bg-white": !checked && !indeterminate,
|
|
2599
2719
|
"group-hover:ui-bg-blue-50": type === "regular" && !(checked || indeterminate),
|
|
2600
2720
|
"group-hover:ui-bg-primary-dark": checked || indeterminate,
|
|
2601
2721
|
"ui-outline-primary": isFocused
|
|
2602
2722
|
}), "data-test-id": "checkbox-span" },
|
|
2603
|
-
React__namespace.default.createElement("div", { className: "cweb-checkbox-icon" })
|
|
2723
|
+
React__namespace.default.createElement("div", { className: "cweb-checkbox-icon ui-h-3 ui-w-3 sm:ui-h-2 sm:ui-w-2" })
|
|
2604
2724
|
)
|
|
2605
2725
|
),
|
|
2606
2726
|
React__namespace.default.createElement(
|
|
@@ -5778,14 +5898,38 @@ function TopBar(props) {
|
|
|
5778
5898
|
}
|
|
5779
5899
|
TopBar.Actions = Actions;
|
|
5780
5900
|
|
|
5781
|
-
|
|
5782
|
-
const {
|
|
5901
|
+
const HoverIndicator = (props) => {
|
|
5902
|
+
const { borderRadius = "xxs", children } = props;
|
|
5903
|
+
const boxClasses = classNames__default.default("ui-relative ui-border ui-border-l-[16px] ui-border-transparent ui-border-l-transparent hover:ui-border-l-primary", "before:ui-absolute before:ui-inset-[-1px] before:-ui-ml-[15px] before:ui-w-[16px] hover:before:ui-bg-primary", { [`before:ui-radius-l-${borderRadius}`]: borderRadius });
|
|
5783
5904
|
return React__namespace.default.createElement(
|
|
5784
5905
|
Box,
|
|
5785
|
-
|
|
5906
|
+
{ borderRadius, className: boxClasses },
|
|
5907
|
+
React__namespace.default.createElement(Box, { className: "-ui-ml-4" }, children)
|
|
5908
|
+
);
|
|
5909
|
+
};
|
|
5910
|
+
|
|
5911
|
+
function Card(props) {
|
|
5912
|
+
const { actions: __, as: Element = "div", border, borderRadius = "xxs", children, className, elevation, elevationOnHover, indicatorOnHover, padding = true, title: _ } = props, rest = __rest(props, ["actions", "as", "border", "borderRadius", "children", "className", "elevation", "elevationOnHover", "indicatorOnHover", "padding", "title"]);
|
|
5913
|
+
const cardContentClassName = classNames__default.default("ui-bg-white", {
|
|
5914
|
+
"ui-ml-[16px]": indicatorOnHover
|
|
5915
|
+
});
|
|
5916
|
+
const hoverShadowClassName = createShadowClassName(elevationOnHover, {
|
|
5917
|
+
modifier: "hover"
|
|
5918
|
+
});
|
|
5919
|
+
const CardContent = () => React__namespace.default.createElement(
|
|
5920
|
+
Box,
|
|
5921
|
+
{ className: cardContentClassName },
|
|
5786
5922
|
React__namespace.default.createElement(RenderTopBar, Object.assign({}, props)),
|
|
5787
5923
|
padding ? React__namespace.default.createElement(Padding, null, children) : children
|
|
5788
5924
|
);
|
|
5925
|
+
const classes = classNames__default.default("ui-overflow-hidden", "ui-bg-white", className, hoverShadowClassName, {
|
|
5926
|
+
"ui-border ui-border-slate-300 hover:ui-border-slate-400": border
|
|
5927
|
+
});
|
|
5928
|
+
return React__namespace.default.createElement(Box, Object.assign({ as: Element, elevation, borderRadius }, rest, { className: classes }), indicatorOnHover ? React__namespace.default.createElement(
|
|
5929
|
+
HoverIndicator,
|
|
5930
|
+
{ borderRadius },
|
|
5931
|
+
React__namespace.default.createElement(CardContent, null)
|
|
5932
|
+
) : React__namespace.default.createElement(CardContent, null));
|
|
5789
5933
|
}
|
|
5790
5934
|
Card.Title = (props) => React__namespace.default.createElement(Title, Object.assign({ type: "sm" }, props));
|
|
5791
5935
|
Card.TopBar = TopBar;
|