@luscii-healthtech/web-ui 30.0.3 → 30.0.4
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/Stack/Stack.d.ts +4 -0
- package/dist/index.development.js +27 -26
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/web-ui-tailwind.css +0 -30
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -34,6 +34,10 @@ type Props<C extends React.ElementType> = React.ComponentPropsWithoutRef<C> & {
|
|
|
34
34
|
* Reverse the order of the items
|
|
35
35
|
*/
|
|
36
36
|
reverse?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Wrap content over multiple lines
|
|
39
|
+
*/
|
|
40
|
+
wrap?: boolean;
|
|
37
41
|
children?: React.ReactNode;
|
|
38
42
|
className?: string;
|
|
39
43
|
};
|
|
@@ -2235,12 +2235,13 @@ const Box = (props) => {
|
|
|
2235
2235
|
};
|
|
2236
2236
|
|
|
2237
2237
|
const Stack = (props) => {
|
|
2238
|
-
const { children, gap, align = "start", justify = "normal", axis = "y", className, reverse } = props, attributes = __rest(props, ["children", "gap", "align", "justify", "axis", "className", "reverse"]);
|
|
2238
|
+
const { children, gap, align = "start", justify = "normal", axis = "y", className, reverse, wrap = false } = props, attributes = __rest(props, ["children", "gap", "align", "justify", "axis", "className", "reverse", "wrap"]);
|
|
2239
2239
|
const stackClasses = classNames__default.default(`ui-flex`, {
|
|
2240
2240
|
"ui-flex-row": axis === "x",
|
|
2241
2241
|
"ui-flex-col": axis === "y",
|
|
2242
2242
|
"ui-flex-row-reverse": axis === "x" && reverse,
|
|
2243
2243
|
"ui-flex-col-reverse": axis === "y" && reverse,
|
|
2244
|
+
"ui-flex-wrap": wrap,
|
|
2244
2245
|
[`ui-gap-${gap}`]: gap
|
|
2245
2246
|
}, `ui-items-${align} ui-justify-${justify}`);
|
|
2246
2247
|
return React__namespace.default.createElement(Box, Object.assign({ className: classNames__default.default(stackClasses, className) }, attributes), children);
|
|
@@ -5977,11 +5978,6 @@ function RenderTopBar(props) {
|
|
|
5977
5978
|
return null;
|
|
5978
5979
|
}
|
|
5979
5980
|
|
|
5980
|
-
const CloseIcon = () => React__namespace.default.createElement(
|
|
5981
|
-
"svg",
|
|
5982
|
-
{ className: "ui-h-2 ui-w-2", stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" },
|
|
5983
|
-
React__namespace.default.createElement("path", { strokeLinecap: "round", strokeWidth: "1.5", d: "M1 1l6 6m0-6L1 7" })
|
|
5984
|
-
);
|
|
5985
5981
|
const defaultRemoveFilterOptionLabelGetter = (activeFilter) => `Remove filter ${activeFilter.label}`;
|
|
5986
5982
|
const ActiveFilters = (props) => {
|
|
5987
5983
|
var _a;
|
|
@@ -5997,28 +5993,32 @@ const ActiveFilters = (props) => {
|
|
|
5997
5993
|
{ className: "ui-bg-gray-100" },
|
|
5998
5994
|
React__namespace.default.createElement(
|
|
5999
5995
|
"div",
|
|
6000
|
-
{ className: "ui-min-h-15 ui-max-w-7xl ui-
|
|
6001
|
-
React__namespace.default.createElement(
|
|
6002
|
-
React__namespace.default.createElement("div", { "aria-hidden": "true", className: "ui-hidden ui-h-5 ui-w-px ui-bg-gray-300 sm:ui-ml-4 sm:ui-block" }),
|
|
5996
|
+
{ className: "ui-min-h-15 ui-max-w-7xl ui-py-s sm:ui-flex sm:ui-items-center" },
|
|
5997
|
+
React__namespace.default.createElement(Text, { variant: "base", color: "slate-500" }, localization.filtersLabel),
|
|
6003
5998
|
React__namespace.default.createElement(
|
|
6004
5999
|
"div",
|
|
6005
6000
|
{ className: "ui-mt-2 sm:ui-ml-4 sm:ui-mt-0" },
|
|
6006
|
-
React__namespace.default.createElement(
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
React__namespace.default.createElement("span", null, activeFilter.label),
|
|
6001
|
+
React__namespace.default.createElement(Stack, { axis: "x", gap: "m", align: "center", wrap: true }, activeFilters.map((activeFilter, idx) => React__namespace.default.createElement(
|
|
6002
|
+
React__namespace.default.Fragment,
|
|
6003
|
+
null,
|
|
6010
6004
|
React__namespace.default.createElement(
|
|
6011
|
-
"
|
|
6012
|
-
{
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6005
|
+
"span",
|
|
6006
|
+
{ key: activeFilter.value, className: "ui-mx-1 ui-inline-flex ui-items-center ui-rounded-full ui-border ui-border-neutral-interactive ui-bg-white ui-py-xxxxs ui-pl-m ui-pr-xxs hover:ui-border-neutral-interactive--hover hover:ui-bg-primary-background" },
|
|
6007
|
+
React__namespace.default.createElement(Text, { variant: "base" }, activeFilter.label),
|
|
6008
|
+
React__namespace.default.createElement(
|
|
6009
|
+
"button",
|
|
6010
|
+
{ type: "button", "aria-label": removeFilterOptionLabelGetter(activeFilter), className: "ui-mx-1 ui-inline-flex ui-h-6 ui-w-6 ui-flex-shrink-0 ui-rounded-full ui-p-0 ui-text-on-surface", onClick: () => onRemoveActiveFilter({
|
|
6011
|
+
changedFilterOption: {
|
|
6012
|
+
isChecked: false,
|
|
6013
|
+
id: activeFilter.id,
|
|
6014
|
+
label: activeFilter.label,
|
|
6015
|
+
value: activeFilter.value
|
|
6016
|
+
}
|
|
6017
|
+
}) },
|
|
6018
|
+
React__namespace.default.createElement(CrossIcon, null)
|
|
6019
|
+
)
|
|
6020
|
+
),
|
|
6021
|
+
idx < activeFilters.length - 1 && React__namespace.default.createElement("div", { "aria-hidden": "true", className: "ui-h-5 ui-w-px ui-bg-slate-300" })
|
|
6022
6022
|
)))
|
|
6023
6023
|
)
|
|
6024
6024
|
)
|
|
@@ -6130,12 +6130,13 @@ const FilterBar = (_a) => {
|
|
|
6130
6130
|
"div",
|
|
6131
6131
|
{ className: "ui-rounded-lg ui-py-4" },
|
|
6132
6132
|
React__namespace.default.createElement(
|
|
6133
|
-
|
|
6134
|
-
{
|
|
6133
|
+
Stack,
|
|
6134
|
+
{ axis: "x", align: "center", justify: "between" },
|
|
6135
6135
|
React__namespace.default.createElement(SortMenu, { localization, sortingOptions, onSortOptionChange }),
|
|
6136
6136
|
React__namespace.default.createElement(FiltersMenus, { filters: categorizedFilters, onFilterOptionChange })
|
|
6137
6137
|
)
|
|
6138
6138
|
),
|
|
6139
|
+
React__namespace.default.createElement(Divider, { version: "v2", color: "border" }),
|
|
6139
6140
|
React__namespace.default.createElement(ActiveFilters, { localization, filters: categorizedFilters, onRemoveActiveFilter: onFilterOptionChange })
|
|
6140
6141
|
)
|
|
6141
6142
|
);
|