@luscii-healthtech/web-ui 30.0.2 → 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 +30 -27
- 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);
|
|
@@ -5300,7 +5301,9 @@ const ImageCategory = (props) => {
|
|
|
5300
5301
|
"ui-h-11 ui-w-11": props.isTypeCompact,
|
|
5301
5302
|
"ui-h-22 ui-w-36": !props.isTypeCompact
|
|
5302
5303
|
}) },
|
|
5303
|
-
React__namespace.default.createElement(Image$2, { className: "ui-h-full ui-w-full ui-rounded", onClick: props.handleImageClick, src: option, "data-index": index
|
|
5304
|
+
React__namespace.default.createElement(Image$2, { className: "ui-h-full ui-w-full ui-rounded", onClick: props.handleImageClick, src: option, "data-index": index, wrapperClassName: classNames__default.default({
|
|
5305
|
+
"ui-h-full ui-w-full": !props.isTypeCompact
|
|
5306
|
+
}) })
|
|
5304
5307
|
);
|
|
5305
5308
|
}))
|
|
5306
5309
|
);
|
|
@@ -5975,11 +5978,6 @@ function RenderTopBar(props) {
|
|
|
5975
5978
|
return null;
|
|
5976
5979
|
}
|
|
5977
5980
|
|
|
5978
|
-
const CloseIcon = () => React__namespace.default.createElement(
|
|
5979
|
-
"svg",
|
|
5980
|
-
{ className: "ui-h-2 ui-w-2", stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" },
|
|
5981
|
-
React__namespace.default.createElement("path", { strokeLinecap: "round", strokeWidth: "1.5", d: "M1 1l6 6m0-6L1 7" })
|
|
5982
|
-
);
|
|
5983
5981
|
const defaultRemoveFilterOptionLabelGetter = (activeFilter) => `Remove filter ${activeFilter.label}`;
|
|
5984
5982
|
const ActiveFilters = (props) => {
|
|
5985
5983
|
var _a;
|
|
@@ -5995,28 +5993,32 @@ const ActiveFilters = (props) => {
|
|
|
5995
5993
|
{ className: "ui-bg-gray-100" },
|
|
5996
5994
|
React__namespace.default.createElement(
|
|
5997
5995
|
"div",
|
|
5998
|
-
{ className: "ui-min-h-15 ui-max-w-7xl ui-
|
|
5999
|
-
React__namespace.default.createElement(
|
|
6000
|
-
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),
|
|
6001
5998
|
React__namespace.default.createElement(
|
|
6002
5999
|
"div",
|
|
6003
6000
|
{ className: "ui-mt-2 sm:ui-ml-4 sm:ui-mt-0" },
|
|
6004
|
-
React__namespace.default.createElement(
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
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,
|
|
6008
6004
|
React__namespace.default.createElement(
|
|
6009
|
-
"
|
|
6010
|
-
{
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
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" })
|
|
6020
6022
|
)))
|
|
6021
6023
|
)
|
|
6022
6024
|
)
|
|
@@ -6128,12 +6130,13 @@ const FilterBar = (_a) => {
|
|
|
6128
6130
|
"div",
|
|
6129
6131
|
{ className: "ui-rounded-lg ui-py-4" },
|
|
6130
6132
|
React__namespace.default.createElement(
|
|
6131
|
-
|
|
6132
|
-
{
|
|
6133
|
+
Stack,
|
|
6134
|
+
{ axis: "x", align: "center", justify: "between" },
|
|
6133
6135
|
React__namespace.default.createElement(SortMenu, { localization, sortingOptions, onSortOptionChange }),
|
|
6134
6136
|
React__namespace.default.createElement(FiltersMenus, { filters: categorizedFilters, onFilterOptionChange })
|
|
6135
6137
|
)
|
|
6136
6138
|
),
|
|
6139
|
+
React__namespace.default.createElement(Divider, { version: "v2", color: "border" }),
|
|
6137
6140
|
React__namespace.default.createElement(ActiveFilters, { localization, filters: categorizedFilters, onRemoveActiveFilter: onFilterOptionChange })
|
|
6138
6141
|
)
|
|
6139
6142
|
);
|