@luscii-healthtech/web-ui 39.4.2 → 39.4.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.
- package/dist/components/Box/Box.d.ts +10 -0
- package/dist/index.development.js +37 -3
- 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 +24 -0
- package/dist/web-ui-tailwind.css +90 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,16 @@ export type Props<C extends React.ElementType> = React.ComponentPropsWithoutRef<
|
|
|
22
22
|
* Check {@link SIZES} for reference.
|
|
23
23
|
*/
|
|
24
24
|
borderRadius?: keyof typeof SIZES;
|
|
25
|
+
/**
|
|
26
|
+
* Will set a left border radius based on the standard sizes scale.
|
|
27
|
+
* Check {@link SIZES} for reference.
|
|
28
|
+
*/
|
|
29
|
+
borderRadiusLeft?: keyof typeof SIZES;
|
|
30
|
+
/**
|
|
31
|
+
* Will set a right border radius based on the standard sizes scale.
|
|
32
|
+
* Check {@link SIZES} for reference.
|
|
33
|
+
*/
|
|
34
|
+
borderRadiusRight?: keyof typeof SIZES;
|
|
25
35
|
hoverBackgroundColor?: BackgroundColor;
|
|
26
36
|
cursor?: CursorOption;
|
|
27
37
|
};
|
|
@@ -1869,6 +1869,38 @@ const createRadiusClassName = (borderRadius) => {
|
|
|
1869
1869
|
"ui-radius-xxl": borderRadius === "xxl"
|
|
1870
1870
|
});
|
|
1871
1871
|
};
|
|
1872
|
+
const createRadiusLeftClassName = (borderRadius) => {
|
|
1873
|
+
if (!borderRadius || !SIZES[borderRadius]) {
|
|
1874
|
+
return "";
|
|
1875
|
+
}
|
|
1876
|
+
return classNames__default.default({
|
|
1877
|
+
"ui-radius-l-xxxxs": borderRadius === "xxxxs",
|
|
1878
|
+
"ui-radius-l-xxxs": borderRadius === "xxxs",
|
|
1879
|
+
"ui-radius-l-xxs": borderRadius === "xxs",
|
|
1880
|
+
"ui-radius-l-xs": borderRadius === "xs",
|
|
1881
|
+
"ui-radius-l-s": borderRadius === "s",
|
|
1882
|
+
"ui-radius-l-m": borderRadius === "m",
|
|
1883
|
+
"ui-radius-l-l": borderRadius === "l",
|
|
1884
|
+
"ui-radius-l-xl": borderRadius === "xl",
|
|
1885
|
+
"ui-radius-l-xxl": borderRadius === "xxl"
|
|
1886
|
+
});
|
|
1887
|
+
};
|
|
1888
|
+
const createRadiusRightClassName = (borderRadius) => {
|
|
1889
|
+
if (!borderRadius || !SIZES[borderRadius]) {
|
|
1890
|
+
return "";
|
|
1891
|
+
}
|
|
1892
|
+
return classNames__default.default({
|
|
1893
|
+
"ui-radius-r-xxxxs": borderRadius === "xxxxs",
|
|
1894
|
+
"ui-radius-r-xxxs": borderRadius === "xxxs",
|
|
1895
|
+
"ui-radius-r-xxs": borderRadius === "xxs",
|
|
1896
|
+
"ui-radius-r-xs": borderRadius === "xs",
|
|
1897
|
+
"ui-radius-r-s": borderRadius === "s",
|
|
1898
|
+
"ui-radius-r-m": borderRadius === "m",
|
|
1899
|
+
"ui-radius-r-l": borderRadius === "l",
|
|
1900
|
+
"ui-radius-r-xl": borderRadius === "xl",
|
|
1901
|
+
"ui-radius-r-xxl": borderRadius === "xxl"
|
|
1902
|
+
});
|
|
1903
|
+
};
|
|
1872
1904
|
|
|
1873
1905
|
const spacingKeys = [
|
|
1874
1906
|
"p",
|
|
@@ -1890,10 +1922,12 @@ const createSpacingClassNames = (keys, spacingProps) => {
|
|
|
1890
1922
|
return keys.filter((key) => spacingProps[key]).map((key) => `ui-${key}-${spacingProps[key]}`).join(" ");
|
|
1891
1923
|
};
|
|
1892
1924
|
const Box = (props) => {
|
|
1893
|
-
const { as: Element = "div", borderRadius, className, elevation, width, backgroundColor, hoverBackgroundColor, cursor } = props, attributes = __rest(props, ["as", "borderRadius", "className", "elevation", "width", "backgroundColor", "hoverBackgroundColor", "cursor"]);
|
|
1925
|
+
const { as: Element = "div", borderRadius, borderRadiusLeft, borderRadiusRight, className, elevation, width, backgroundColor, hoverBackgroundColor, cursor } = props, attributes = __rest(props, ["as", "borderRadius", "borderRadiusLeft", "borderRadiusRight", "className", "elevation", "width", "backgroundColor", "hoverBackgroundColor", "cursor"]);
|
|
1894
1926
|
const spacingClasses = createSpacingClassNames(spacingKeys, props);
|
|
1895
1927
|
const shadowClassName = createShadowClassName(elevation);
|
|
1896
1928
|
const borderRadiusClassName = createRadiusClassName(borderRadius);
|
|
1929
|
+
const borderRadiusLeftClassName = createRadiusLeftClassName(borderRadiusLeft);
|
|
1930
|
+
const borderRadiusRightClassName = createRadiusRightClassName(borderRadiusRight);
|
|
1897
1931
|
const attributesWithoutSpacingKeys = omit__default.default(attributes, spacingKeys);
|
|
1898
1932
|
return React__namespace.default.createElement(Element, Object.assign({ className: classNames__default.default(spacingClasses, {
|
|
1899
1933
|
"ui-bg-surface": backgroundColor === "surface",
|
|
@@ -1929,7 +1963,7 @@ const Box = (props) => {
|
|
|
1929
1963
|
"ui-cursor-no-drop": cursor === "no-drop",
|
|
1930
1964
|
"ui-cursor-grab": cursor === "grab",
|
|
1931
1965
|
"ui-cursor-grabbing": cursor === "grabbing"
|
|
1932
|
-
}, className, shadowClassName, borderRadiusClassName) }, attributesWithoutSpacingKeys));
|
|
1966
|
+
}, className, shadowClassName, borderRadiusClassName, borderRadiusLeftClassName, borderRadiusRightClassName) }, attributesWithoutSpacingKeys));
|
|
1933
1967
|
};
|
|
1934
1968
|
|
|
1935
1969
|
const Stack = (props) => {
|
|
@@ -7428,7 +7462,7 @@ const ModalDialog = (_a) => {
|
|
|
7428
7462
|
Object.assign({ ref: dialog, className: classes, onClose }, rest),
|
|
7429
7463
|
React__namespace.default.createElement(
|
|
7430
7464
|
Card,
|
|
7431
|
-
{ padding: false, borderRadius: variant === "side-modal" ? "none" : "m", className: classNames__default.default({
|
|
7465
|
+
{ padding: false, borderRadius: variant === "side-modal" ? "none" : "m", borderRadiusLeft: variant === "side-modal" ? "m" : "none", className: classNames__default.default({
|
|
7432
7466
|
"ui-h-screen": variant === "side-modal"
|
|
7433
7467
|
}) },
|
|
7434
7468
|
React__namespace.default.createElement(Stack, { width: "full", align: "stretch", className: classNames__default.default({
|