@orangecheck/design 0.13.0 → 0.14.0

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.
@@ -1,5 +1,5 @@
1
1
  export { Callout, CalloutProps, CalloutTone, DataRow, DataRowProps, DefinitionItem, DefinitionList, DefinitionListProps, EmptyState, EmptyStateCta, EmptyStateProps, HelpHint, HelpHintProps, SectionHeader, SectionHeaderProps, StatCard, StatCardProps, StatGrid, StatGridProps, StatItem, StatTile } from './composites.mjs';
2
- export { AppShell, AppShellProps, EcosystemSlug, EcosystemSwitcher, EcosystemSwitcherProps, FAMILY_PROPERTIES, FamilyCategory, FamilyProperty, LayoutSubHeader, LayoutSubHeaderProps, LayoutSubHeaderTag, OcAccountMenu, OcAccountMenuBuildInfo, OcAccountMenuItem, OcAccountMenuProps, OcAccountMenuSession, OcAccountMenuView, OcAccountMenuViewProps, OcDashboardHub, OcDashboardHubProps, OcDashboardShell, OcDashboardShellProps, OcDashboardTool, OcLogoDropdown, OcLogoDropdownProps, OcPrimaryNav, OcPrimaryNavLink, OcPrimaryNavProps, SITE_STATE_LABEL, SiteState, findFamilyProperty } from './chrome.mjs';
2
+ export { AppShell, AppShellProps, EcosystemSlug, EcosystemSwitcher, EcosystemSwitcherProps, FAMILY_PROPERTIES, FamilyCategory, FamilyProperty, LayoutSubHeader, LayoutSubHeaderProps, LayoutSubHeaderTag, OcAccountMenu, OcAccountMenuBuildInfo, OcAccountMenuItem, OcAccountMenuProps, OcAccountMenuSession, OcAccountMenuView, OcAccountMenuViewProps, OcAppBar, OcAppBarProps, OcDashboardHub, OcDashboardHubProps, OcDashboardShell, OcDashboardShellProps, OcDashboardTool, OcLogoDropdown, OcLogoDropdownProps, OcPrimaryNav, OcPrimaryNavLink, OcPrimaryNavProps, SITE_STATE_LABEL, SiteState, findFamilyProperty } from './chrome.mjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
5
5
  import '@orangecheck/auth-client';
@@ -1,5 +1,5 @@
1
1
  export { Callout, CalloutProps, CalloutTone, DataRow, DataRowProps, DefinitionItem, DefinitionList, DefinitionListProps, EmptyState, EmptyStateCta, EmptyStateProps, HelpHint, HelpHintProps, SectionHeader, SectionHeaderProps, StatCard, StatCardProps, StatGrid, StatGridProps, StatItem, StatTile } from './composites.js';
2
- export { AppShell, AppShellProps, EcosystemSlug, EcosystemSwitcher, EcosystemSwitcherProps, FAMILY_PROPERTIES, FamilyCategory, FamilyProperty, LayoutSubHeader, LayoutSubHeaderProps, LayoutSubHeaderTag, OcAccountMenu, OcAccountMenuBuildInfo, OcAccountMenuItem, OcAccountMenuProps, OcAccountMenuSession, OcAccountMenuView, OcAccountMenuViewProps, OcDashboardHub, OcDashboardHubProps, OcDashboardShell, OcDashboardShellProps, OcDashboardTool, OcLogoDropdown, OcLogoDropdownProps, OcPrimaryNav, OcPrimaryNavLink, OcPrimaryNavProps, SITE_STATE_LABEL, SiteState, findFamilyProperty } from './chrome.js';
2
+ export { AppShell, AppShellProps, EcosystemSlug, EcosystemSwitcher, EcosystemSwitcherProps, FAMILY_PROPERTIES, FamilyCategory, FamilyProperty, LayoutSubHeader, LayoutSubHeaderProps, LayoutSubHeaderTag, OcAccountMenu, OcAccountMenuBuildInfo, OcAccountMenuItem, OcAccountMenuProps, OcAccountMenuSession, OcAccountMenuView, OcAccountMenuViewProps, OcAppBar, OcAppBarProps, OcDashboardHub, OcDashboardHubProps, OcDashboardShell, OcDashboardShellProps, OcDashboardTool, OcLogoDropdown, OcLogoDropdownProps, OcPrimaryNav, OcPrimaryNavLink, OcPrimaryNavProps, SITE_STATE_LABEL, SiteState, findFamilyProperty } from './chrome.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
5
5
  import '@orangecheck/auth-client';
@@ -1759,7 +1759,11 @@ function isActive(pathname, link) {
1759
1759
  if (link.href === "/") return pathname === "/";
1760
1760
  return pathname === link.href || pathname.startsWith(link.href + "/");
1761
1761
  }
1762
- function OcPrimaryNav({ activePath, links, className }) {
1762
+ function OcPrimaryNav({
1763
+ activePath,
1764
+ links,
1765
+ className
1766
+ }) {
1763
1767
  return /* @__PURE__ */ jsxRuntime.jsx(
1764
1768
  "nav",
1765
1769
  {
@@ -1768,7 +1772,7 @@ function OcPrimaryNav({ activePath, links, className }) {
1768
1772
  "data-oc-primary-nav": "",
1769
1773
  children: links.map((link) => {
1770
1774
  const active = isActive(activePath, link);
1771
- const className2 = "font-display relative shrink-0 px-2 py-1 sm:px-3 text-[11px] sm:text-[12px] font-semibold tracking-wider uppercase transition-colors " + (active ? 'text-primary after:bg-primary after:absolute after:inset-x-2 after:-bottom-[13px] after:h-px after:content-[""]' : "text-muted-foreground hover:text-foreground");
1775
+ const className2 = "font-display shrink-0 px-2 py-1 sm:px-3 text-[11px] sm:text-[12px] font-semibold tracking-wider uppercase transition-colors " + (active ? "text-primary" : "text-muted-foreground hover:text-foreground");
1772
1776
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1773
1777
  link.label,
1774
1778
  link.external ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -2108,6 +2112,39 @@ function LayoutSubHeader({
2108
2112
  tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground flex flex-wrap items-center gap-x-4 gap-y-1 tracking-widest uppercase", children: tags.map((tag, i) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: tag.hideBelow ? HIDE[tag.hideBelow] : void 0, children: tag.label }, i)) })
2109
2113
  ] }) });
2110
2114
  }
2115
+ function OcAppBar({
2116
+ variant = "full",
2117
+ start,
2118
+ center,
2119
+ end,
2120
+ sticky = true,
2121
+ className
2122
+ }) {
2123
+ return /* @__PURE__ */ jsxRuntime.jsx(
2124
+ "header",
2125
+ {
2126
+ className: cn(
2127
+ "bg-background/90 supports-[backdrop-filter]:bg-background/70 w-full border-b backdrop-blur",
2128
+ sticky && "sticky top-0 z-50",
2129
+ className
2130
+ ),
2131
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
2132
+ "div",
2133
+ {
2134
+ className: cn(
2135
+ variant === "full" ? "app-bar" : "container",
2136
+ "flex h-12 items-center justify-between gap-4"
2137
+ ),
2138
+ children: [
2139
+ start,
2140
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 flex-1 justify-center px-2", children: center }),
2141
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: end })
2142
+ ]
2143
+ }
2144
+ )
2145
+ }
2146
+ );
2147
+ }
2111
2148
 
2112
2149
  exports.AppShell = AppShell;
2113
2150
  exports.Callout = Callout;
@@ -2120,6 +2157,7 @@ exports.HelpHint = HelpHint;
2120
2157
  exports.LayoutSubHeader = LayoutSubHeader;
2121
2158
  exports.OcAccountMenu = OcAccountMenu;
2122
2159
  exports.OcAccountMenuView = OcAccountMenuView;
2160
+ exports.OcAppBar = OcAppBar;
2123
2161
  exports.OcDashboardHub = OcDashboardHub;
2124
2162
  exports.OcDashboardShell = OcDashboardShell;
2125
2163
  exports.OcLogoDropdown = OcLogoDropdown;