@luscii-healthtech/web-ui 2.12.2 → 2.12.5
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/Container/types/FlexContainerProps.type.d.ts +5 -4
- package/dist/web-ui-tailwind.css +12 -0
- package/dist/web-ui.cjs.development.js +24 -18
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.js +1 -1
- package/dist/web-ui.cjs.production.min.js.map +1 -1
- package/dist/web-ui.esm.js +24 -18
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
declare type Spacing = "none" | "small" | "medium" | "large";
|
|
2
3
|
declare type FlexContainerBase = {
|
|
3
4
|
alignItems?: "center" | "start" | "end";
|
|
4
5
|
justifyContent?: "center" | "start" | "end" | "between";
|
|
5
6
|
position?: "static" | "fixed" | "absolute" | "relative" | "sticky";
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
verticalSpacing?: Spacing;
|
|
8
|
+
horizontalSpacing?: Spacing;
|
|
8
9
|
hasPadding?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare type FlexContainerBaseProps = FlexContainerBase & {
|
|
11
12
|
children: React.ReactNode;
|
|
12
13
|
};
|
|
13
|
-
export declare type FlexContainerProps = Omit<FlexContainerBaseProps, "
|
|
14
|
-
|
|
14
|
+
export declare type FlexContainerProps = Omit<FlexContainerBaseProps, "verticalSpacing" | "horizontalSpacing"> & {
|
|
15
|
+
spacing?: Spacing;
|
|
15
16
|
};
|
|
16
17
|
export {};
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -651,6 +651,18 @@ video {
|
|
|
651
651
|
margin-left: calc(1.5rem * calc(1 - var(--space-x-reverse)));
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
+
.space-y-8 > :not(template) ~ :not(template) {
|
|
655
|
+
--space-y-reverse: 0;
|
|
656
|
+
margin-top: calc(2rem * calc(1 - var(--space-y-reverse)));
|
|
657
|
+
margin-bottom: calc(2rem * var(--space-y-reverse));
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.space-x-8 > :not(template) ~ :not(template) {
|
|
661
|
+
--space-x-reverse: 0;
|
|
662
|
+
margin-right: calc(2rem * var(--space-x-reverse));
|
|
663
|
+
margin-left: calc(2rem * calc(1 - var(--space-x-reverse)));
|
|
664
|
+
}
|
|
665
|
+
|
|
654
666
|
.divide-y > :not(template) ~ :not(template) {
|
|
655
667
|
--divide-y-reverse: 0;
|
|
656
668
|
border-top-width: calc(1px * calc(1 - var(--divide-y-reverse)));
|
|
@@ -86,8 +86,10 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
86
86
|
var FlexContainer = function FlexContainer(props) {
|
|
87
87
|
var children = props.children,
|
|
88
88
|
alignItems = props.alignItems,
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
_props$verticalSpacin = props.verticalSpacing,
|
|
90
|
+
verticalSpacing = _props$verticalSpacin === void 0 ? "none" : _props$verticalSpacin,
|
|
91
|
+
_props$horizontalSpac = props.horizontalSpacing,
|
|
92
|
+
horizontalSpacing = _props$horizontalSpac === void 0 ? "none" : _props$horizontalSpac,
|
|
91
93
|
justifyContent = props.justifyContent,
|
|
92
94
|
hasPadding = props.hasPadding,
|
|
93
95
|
_props$position = props.position,
|
|
@@ -97,11 +99,11 @@ var FlexContainer = function FlexContainer(props) {
|
|
|
97
99
|
className: classNames("flex w-full", {
|
|
98
100
|
"flex-row": type === "row",
|
|
99
101
|
"flex-col": type === "column",
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
relative: position === "relative",
|
|
103
|
+
absolute: position === "absolute",
|
|
104
|
+
static: position === "static",
|
|
105
|
+
fixed: position === "fixed",
|
|
106
|
+
sticky: position === "sticky",
|
|
105
107
|
"justify-center": justifyContent === "center",
|
|
106
108
|
"justify-start": justifyContent === "start",
|
|
107
109
|
"justify-end": justifyContent === "end",
|
|
@@ -109,14 +111,18 @@ var FlexContainer = function FlexContainer(props) {
|
|
|
109
111
|
"items-start": alignItems === "start",
|
|
110
112
|
"items-center": alignItems === "center",
|
|
111
113
|
"items-end": alignItems === "end",
|
|
112
|
-
"space-x-
|
|
113
|
-
"space-
|
|
114
|
+
"space-x-2": horizontalSpacing === "small",
|
|
115
|
+
"space-x-4": horizontalSpacing === "medium",
|
|
116
|
+
"space-x-8": horizontalSpacing === "large",
|
|
117
|
+
"space-y-2": verticalSpacing === "small",
|
|
118
|
+
"space-y-4": verticalSpacing === "medium",
|
|
119
|
+
"space-y-8": verticalSpacing === "large",
|
|
114
120
|
"p-4": hasPadding
|
|
115
121
|
})
|
|
116
122
|
}, children);
|
|
117
123
|
};
|
|
118
124
|
|
|
119
|
-
var _excluded = ["children", "
|
|
125
|
+
var _excluded = ["children", "spacing"];
|
|
120
126
|
/**
|
|
121
127
|
* Container to be used for layouting instead of divs around the project.
|
|
122
128
|
* The spacing here has been coded according to our guidelines.
|
|
@@ -124,17 +130,17 @@ var _excluded = ["children", "spaced"];
|
|
|
124
130
|
|
|
125
131
|
var FlexColumn = function FlexColumn(props) {
|
|
126
132
|
var children = props.children,
|
|
127
|
-
_props$
|
|
128
|
-
|
|
133
|
+
_props$spacing = props.spacing,
|
|
134
|
+
spacing = _props$spacing === void 0 ? "medium" : _props$spacing,
|
|
129
135
|
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
130
136
|
|
|
131
137
|
return /*#__PURE__*/React__default.createElement(FlexContainer, _extends({}, rest, {
|
|
132
138
|
type: "column",
|
|
133
|
-
|
|
139
|
+
verticalSpacing: spacing
|
|
134
140
|
}), children);
|
|
135
141
|
};
|
|
136
142
|
|
|
137
|
-
var _excluded$1 = ["children", "
|
|
143
|
+
var _excluded$1 = ["children", "spacing"];
|
|
138
144
|
/**
|
|
139
145
|
* Container to be used for layouting instead of divs around the project.
|
|
140
146
|
* The spacing here has been coded according to our guidelines.
|
|
@@ -142,13 +148,13 @@ var _excluded$1 = ["children", "spaced"];
|
|
|
142
148
|
|
|
143
149
|
var FlexRow = function FlexRow(props) {
|
|
144
150
|
var children = props.children,
|
|
145
|
-
_props$
|
|
146
|
-
|
|
151
|
+
_props$spacing = props.spacing,
|
|
152
|
+
spacing = _props$spacing === void 0 ? "medium" : _props$spacing,
|
|
147
153
|
rest = _objectWithoutPropertiesLoose(props, _excluded$1);
|
|
148
154
|
|
|
149
155
|
return /*#__PURE__*/React__default.createElement(FlexContainer, _extends({}, rest, {
|
|
150
156
|
type: "row",
|
|
151
|
-
|
|
157
|
+
horizontalSpacing: spacing
|
|
152
158
|
}), children);
|
|
153
159
|
};
|
|
154
160
|
|
|
@@ -1037,7 +1043,7 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1037
1043
|
|
|
1038
1044
|
var isClearIconVisible = clearable && value;
|
|
1039
1045
|
return /*#__PURE__*/React__default.createElement(FlexRow, {
|
|
1040
|
-
|
|
1046
|
+
spacing: "none",
|
|
1041
1047
|
"data-test-id": "input-component-container",
|
|
1042
1048
|
position: "relative"
|
|
1043
1049
|
}, /*#__PURE__*/React__default.createElement("span", {
|