@getgreenline/blaze-ui 1.0.51-beta.0 → 1.0.52
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.
|
@@ -119,7 +119,7 @@ const gridColsClass = {
|
|
|
119
119
|
3: "tw:grid-cols-3",
|
|
120
120
|
4: "tw:grid-cols-4",
|
|
121
121
|
};
|
|
122
|
-
const appBadgeClassName = "tw:absolute tw:left-1/2 tw:top-full tw:z-10 tw:-translate-x-1 tw:-translate-y-1/2 tw:!rounded-full tw:!border-border tw:!bg-white tw:!px-1.5 tw:!py-px tw:!text-[9px] tw:!leading-none tw:!text-primary tw:!shadow-sm";
|
|
122
|
+
const appBadgeClassName = "tw:absolute tw:left-1/2 tw:top-full tw:z-10 tw:-translate-x-1 tw:-translate-y-1/2 tw:!rounded-full tw:!border-border tw:!bg-white tw:!px-1.5 tw:!py-px tw:!text-[9px] tw:!leading-none tw:!text-primary tw:!shadow-sm tw:dark:!bg-white tw:dark:!text-primary";
|
|
123
123
|
function HeaderAppSwitcher({ commonHost, currentApp = "Retail", visibleApps, columns, ssoRedirect, }) {
|
|
124
124
|
const apps = React.useMemo(() => {
|
|
125
125
|
const base = resolveHostInfo(commonHost);
|
|
@@ -137,8 +137,8 @@ function HeaderAppSwitcher({ commonHost, currentApp = "Retail", visibleApps, col
|
|
|
137
137
|
const isDisabled = Boolean(app.disabled);
|
|
138
138
|
const isCurrent = Boolean(app.isCurrent);
|
|
139
139
|
const tileClassName = getTileClassName(isCurrent, isDisabled);
|
|
140
|
-
const tileContent = (jsxs(Fragment, { children: [jsxs("span", { className: "tw:relative tw:flex tw:size-9 tw:items-center tw:justify-center tw:[&>svg]:size-9 tw:[&>svg]:shrink-0", children: [app.logo, app.badge ? (jsx(Badge, { variant: "soft", className: appBadgeClassName, children: app.badge })) : null] }), jsx("span", { className: cn("tw:text-center tw:text-xs tw:font-normal tw:leading-
|
|
141
|
-
const baseClassName = `tw:relative tw:flex tw:min-h-14 tw:flex-col tw:items-center tw:gap-2.5 tw:rounded-md tw:p-
|
|
140
|
+
const tileContent = (jsxs(Fragment, { children: [jsxs("span", { className: "tw:relative tw:flex tw:size-9 tw:items-center tw:justify-center tw:[&>svg]:size-9 tw:[&>svg]:shrink-0", children: [app.logo, app.badge ? (jsx(Badge, { variant: "soft", className: appBadgeClassName, children: app.badge })) : null] }), jsx("span", { className: cn("tw:text-center tw:text-xs tw:font-normal tw:leading-none tw:text-popover-foreground", isDisabled && "tw:text-muted-foreground"), children: app.name })] }));
|
|
141
|
+
const baseClassName = `tw:relative tw:flex tw:min-h-14 tw:flex-col tw:items-center tw:gap-2.5 tw:rounded-md tw:p-2 tw:transition-colors ${tileClassName}`;
|
|
142
142
|
const Wrapper = isDisabled || isCurrent ? "div" : "a";
|
|
143
143
|
const wrapperProps = isDisabled || isCurrent
|
|
144
144
|
? isCurrent
|