@luscii-healthtech/web-ui 28.3.0 → 28.3.2
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 +7 -0
- package/dist/index.development.js +8 -2
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/general.types.d.ts +1 -0
- package/dist/web-ui-tailwind.css +9 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SIZES } from "../../system/Sizes";
|
|
3
3
|
import { ELEVATION } from "../../system/Elevation";
|
|
4
|
+
import { BackgroundColor } from "../../types/general.types";
|
|
4
5
|
type Size = keyof typeof SIZES;
|
|
5
6
|
declare const spacingKeys: readonly ["p", "pt", "pr", "pb", "pl", "px", "py", "m", "mt", "mr", "mb", "ml", "mx", "my"];
|
|
6
7
|
type SpacingProps = Partial<Record<(typeof spacingKeys)[number], Size>>;
|
|
@@ -15,6 +16,12 @@ export type Props<C extends React.ElementType> = React.ComponentPropsWithoutRef<
|
|
|
15
16
|
* Make the item fill up horizontal space
|
|
16
17
|
*/
|
|
17
18
|
width?: "full" | keyof typeof SIZES;
|
|
19
|
+
backgroundColor?: BackgroundColor;
|
|
20
|
+
/**
|
|
21
|
+
* Will set a border radius based on the standard sizes scale.
|
|
22
|
+
* Check {@link SIZES} for reference.
|
|
23
|
+
*/
|
|
24
|
+
borderRadius?: "xxxs";
|
|
18
25
|
};
|
|
19
26
|
export declare const Box: <C extends React.ElementType = "div">(props: Props<C>) => React.JSX.Element;
|
|
20
27
|
export {};
|
|
@@ -1521,7 +1521,7 @@ const StyledInput = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
1521
1521
|
"focus:ui-border-primary": !isError,
|
|
1522
1522
|
"focus:ui-outline-primary": !isError,
|
|
1523
1523
|
"ui-bg-white": !attributes.disabled
|
|
1524
|
-
}, "ui-h-11", "ui-p-2", "ui-border", "ui-text-sm", "ui-placeholder-slate-500", "ui-border-solid", "ui-transition-colors", "ui-duration-300", {
|
|
1524
|
+
}, "ui-h-11", "ui-p-2", "ui-border", "ui-text-base sm:ui-text-sm", "ui-placeholder-slate-500", "ui-border-solid", "ui-transition-colors", "ui-duration-300", {
|
|
1525
1525
|
"ui-z-10": hasSuffix || hasPrefix,
|
|
1526
1526
|
// to make sure the ui-outline is displayed completely
|
|
1527
1527
|
"ui-rounded": hasNoExtraContent,
|
|
@@ -1990,9 +1990,15 @@ const Box = (props) => {
|
|
|
1990
1990
|
const spacingClasses = createSpacingClassNames(spacingKeys, props);
|
|
1991
1991
|
const attributesWithoutSpacingKeys = omit__default.default(attributes, spacingKeys);
|
|
1992
1992
|
return React__namespace.default.createElement(Element, Object.assign({ className: classNames__default.default(spacingClasses, {
|
|
1993
|
+
"ui-bg-slate-100": props.backgroundColor === "base",
|
|
1994
|
+
"ui-bg-blue-50": props.backgroundColor === "blue",
|
|
1995
|
+
"ui-bg-red-50": props.backgroundColor === "red",
|
|
1996
|
+
" ui-bg-green-50": props.backgroundColor === "green",
|
|
1997
|
+
" ui-bg-amber-50": props.backgroundColor === "amber",
|
|
1993
1998
|
[`ui-shadow-${elevation}`]: elevation,
|
|
1994
1999
|
[`ui-w-${width}`]: width && width !== "full",
|
|
1995
|
-
"ui-w-full": width === "full"
|
|
2000
|
+
"ui-w-full": width === "full",
|
|
2001
|
+
"ui-radius-xxxs": props.borderRadius
|
|
1996
2002
|
}, className) }, attributesWithoutSpacingKeys));
|
|
1997
2003
|
};
|
|
1998
2004
|
|