@treasuryspatial/viewer-ui-kit 0.1.40 → 0.1.42

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 +1 @@
1
- {"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../src/TopBar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAkDvC,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,OAAe,EACf,MAAc,EACd,KAAK,EACL,MAAM,EACN,OAAO,EACP,SAAS,GACV,EAAE,WAAW,2CAUb"}
1
+ {"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../src/TopBar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA8DvC,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,OAAe,EACf,MAAc,EACd,KAAK,EACL,MAAM,EACN,OAAO,EACP,aAAa,EACb,SAAS,GACV,EAAE,WAAW,2CAWb"}
package/dist/TopBar.js CHANGED
@@ -13,11 +13,12 @@ const Root = styled.nav `
13
13
  color: var(--viewer-ui-color-text-strong, var(--brand-text-primary, #1f2937));
14
14
  transform: ${(props) => (props.$hidden ? 'translateY(-100%)' : 'translateY(0)')};
15
15
  transition: transform 0.22s ease;
16
+ overflow: visible;
16
17
  `;
17
18
  const Inner = styled.div `
18
19
  height: 100%;
19
20
  display: grid;
20
- grid-template-columns: minmax(0, 1fr) auto;
21
+ grid-template-columns: ${(props) => (props.$hasCenter ? 'minmax(0, 1fr) auto minmax(0, 1fr)' : 'minmax(0, 1fr) auto')};
21
22
  align-items: center;
22
23
  gap: 16px;
23
24
  padding: 0 16px;
@@ -32,7 +33,7 @@ const BrandSlot = styled.div `
32
33
  align-items: center;
33
34
  `;
34
35
  const CenterSlot = styled.div `
35
- display: none;
36
+ display: flex;
36
37
  justify-content: center;
37
38
  align-items: center;
38
39
  min-width: 0;
@@ -43,6 +44,16 @@ const ActionsSlot = styled.div `
43
44
  justify-content: flex-end;
44
45
  align-items: center;
45
46
  `;
46
- export default function TopBar({ compact = false, hidden = false, brand, center, actions, className, }) {
47
- return (_jsx(Root, { className: className, "$compact": compact, "$hidden": hidden, children: _jsxs(Inner, { children: [_jsx(BrandSlot, { children: brand }), _jsx(CenterSlot, { children: center }), _jsx(ActionsSlot, { children: actions })] }) }));
47
+ const BottomOverlay = styled.div `
48
+ position: absolute;
49
+ left: 50%;
50
+ bottom: -1px;
51
+ transform: translate(-50%, 100%);
52
+ z-index: 60;
53
+ display: ${(props) => (props.$compact ? 'flex' : 'none')};
54
+ align-items: center;
55
+ gap: 8px;
56
+ `;
57
+ export default function TopBar({ compact = false, hidden = false, brand, center, actions, bottomOverlay, className, }) {
58
+ return (_jsxs(Root, { className: className, "$compact": compact, "$hidden": hidden, children: [_jsxs(Inner, { "$hasCenter": Boolean(center), children: [_jsx(BrandSlot, { children: brand }), center ? _jsx(CenterSlot, { children: center }) : null, _jsx(ActionsSlot, { children: actions })] }), bottomOverlay ? _jsx(BottomOverlay, { "$compact": compact, children: bottomOverlay }) : null] }));
48
59
  }
package/dist/layout.d.ts CHANGED
@@ -20,6 +20,7 @@ export declare const PanelCollapseToggle: import("styled-components/dist/types")
20
20
  export declare const PanelShowToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, never>, never>> & string;
21
21
  export declare const RightPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {
22
22
  $open: boolean;
23
+ $topOffset?: number;
23
24
  }>> & string;
24
25
  export declare const RightPanelCollapseToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, never>, never>> & string;
25
26
  export declare const RightPanelShowToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, never>, never>> & string;
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,6NAKlB,CAAC;AAEF,eAAO,MAAM,WAAW;iBAAiC,MAAM;YAM9D,CAAC;AAEF,eAAO,MA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e,6NAK3B,CAAC;AAEF,eAAO,MAAM,YAAY;WAAyB,OAAO;YAexD,CAAC;AAEF,eAAO,MAAM,WAAW,6NAOvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,6NAI9B,CAAC;AAEF,eAAO,MAAM,cAAc,6NAK1B,CAAC;AAEF,eAAO,MAAM,UAAU,qOAItB,CAAC;AAEF,eAAO,MAAM,aAAa,yOAIzB,CAAC;AAEF,eAAO,MAAM,eAAe;YAAyB,SAAS,GAAG,OAAO,GAAG,OAAO;YA4BjF,CAAC;AAEF,eAAO,MAAM,SAAS,6NASrB,CAAC;AAEF,eAAO,MAAM,WAAW,6NAOvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,wbAM/B,CAAC;AAEF,eAAO,MAAM,eAAe,wbAM3B,CAAC;AAEF,eAAO,MAAM,UAAU;WAAyB,OAAO;iBAAe,MAAM;YAc3E,CAAC;AAEF,eAAO,MAAM,wBAAwB,wbAMpC,CAAC;AAEF,eAAO,MAAM,oBAAoB,wbAMhC,CAAC;AAEF,eAAO,MAAM,gBAAgB;iBAA6B,MAAM;YAO/D,CAAC;AAEF,eAAO,MAAM,aAAa,6NAYzB,CAAC;AAEF,eAAO,MAAM,eAAe,6NAK3B,CAAC;AAEF,eAAO,MAAM,cAAc,+NAK1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,yOAa7B,CAAC;AAEF,eAAO,MAAM,aAAa,6NAGzB,CAAC;AAEF,eAAO,MAAM,YAAY,6NAKxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,6NAI9B,CAAC;AAEF,eAAO,MAAM,eAAe,yOAa3B,CAAC;AAEF,eAAO,MAAM,gBAAgB;iBAA6B,OAAO;YAYhE,CAAC"}
package/dist/layout.js CHANGED
@@ -126,8 +126,8 @@ export const PanelShowToggle = styled.button.attrs({ className: 'collapse-toggle
126
126
  export const RightPanel = styled.aside `
127
127
  position: absolute;
128
128
  right: 0;
129
- top: 0;
130
- bottom: 0;
129
+ top: ${(props) => props.$topOffset ?? 0}px;
130
+ height: calc(100% - ${(props) => props.$topOffset ?? 0}px);
131
131
  width: var(--ui-metrics-width);
132
132
  background: var(--brand-panel);
133
133
  border-left: 1px solid var(--brand-panel-border);
@@ -135,7 +135,7 @@ export const RightPanel = styled.aside `
135
135
  display: flex;
136
136
  flex-direction: column;
137
137
  transform: translateX(${(props) => (props.$open ? '0' : '105%')});
138
- transition: transform 0.3s ease;
138
+ transition: transform 0.3s ease, top 0.3s ease, height 0.3s ease;
139
139
  z-index: 30;
140
140
  `;
141
141
  export const RightPanelCollapseToggle = styled.button.attrs({ className: 'collapse-toggle collapse-toggle--edge-left' }) `