@geomak/ui 7.7.2 → 7.7.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/index.cjs +6 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -26
- package/dist/index.d.ts +33 -26
- package/dist/index.js +6 -11
- package/dist/index.js.map +1 -1
- package/dist/styles.css +20 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2084,22 +2084,22 @@ interface ListProps {
|
|
|
2084
2084
|
declare function List({ items, onItemClick, activeKey, density, className, style, }: ListProps): react_jsx_runtime.JSX.Element;
|
|
2085
2085
|
|
|
2086
2086
|
interface ScalableContainerProps {
|
|
2087
|
-
/**
|
|
2087
|
+
/**
|
|
2088
|
+
* Resting width. Optional — when omitted, the resting size is left to your
|
|
2089
|
+
* own `className` / parent layout (so the container can sit in a fluid grid
|
|
2090
|
+
* sized by `w-[…]` classes). Only set this if you want an inline width.
|
|
2091
|
+
*/
|
|
2088
2092
|
width?: react__default.CSSProperties['width'];
|
|
2089
|
-
/** Resting height.
|
|
2093
|
+
/** Resting height. Optional — see {@link ScalableContainerProps.width}. */
|
|
2090
2094
|
height?: react__default.CSSProperties['height'];
|
|
2091
2095
|
/**
|
|
2092
|
-
* Width when expanded.
|
|
2093
|
-
*
|
|
2094
|
-
*
|
|
2095
|
-
* `'100%'`.
|
|
2096
|
+
* Width when expanded. Default `'100%'`. Use `'100%'` to span the full row
|
|
2097
|
+
* of a flex/grid so the container pushes its neighbours onto the next
|
|
2098
|
+
* row(s); a concrete value (e.g. `900`) grows it to that exact width.
|
|
2096
2099
|
*/
|
|
2097
2100
|
targetWidth?: react__default.CSSProperties['width'];
|
|
2098
|
-
/**
|
|
2099
|
-
*
|
|
2100
|
-
* grow taller and push whatever sits below it further down. Falls back to
|
|
2101
|
-
* {@link ScalableContainerProps.expandedHeight}, then `'100%'`.
|
|
2102
|
-
*/
|
|
2101
|
+
/** Height when expanded. Default `'100%'`. A concrete value (e.g. `580`)
|
|
2102
|
+
* grows the container taller and pushes whatever follows further down. */
|
|
2103
2103
|
targetHeight?: react__default.CSSProperties['height'];
|
|
2104
2104
|
/** @deprecated Use `targetWidth`. */
|
|
2105
2105
|
expandedWidth?: react__default.CSSProperties['width'];
|
|
@@ -2130,24 +2130,31 @@ interface ScalableContainerProps {
|
|
|
2130
2130
|
className?: string;
|
|
2131
2131
|
}
|
|
2132
2132
|
/**
|
|
2133
|
-
* Container that
|
|
2134
|
-
*
|
|
2135
|
-
*
|
|
2136
|
-
*
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2139
|
-
*
|
|
2140
|
-
*
|
|
2141
|
-
*
|
|
2142
|
-
*
|
|
2143
|
-
*
|
|
2133
|
+
* Container that grows to a target size on click and collapses back. Reads like
|
|
2134
|
+
* an OS window resize — subtle elevation lift, smooth size transition.
|
|
2135
|
+
*
|
|
2136
|
+
* **Resting size comes from your layout, not from props.** Leave `width`/`height`
|
|
2137
|
+
* unset and size the container with your own `className` (e.g. a fluid grid:
|
|
2138
|
+
* `w-full lg:w-[calc(50%-6px)]`). Only when expanded does the container write an
|
|
2139
|
+
* inline `width`/`height` (= `targetWidth`/`targetHeight`) and go `flex: none`,
|
|
2140
|
+
* so it grows to that size and simply **pushes its neighbours along the flow** —
|
|
2141
|
+
* they keep their own dimensions and reflow (wrap / move down). On collapse the
|
|
2142
|
+
* inline sizing is removed and your className layout takes back over. No sibling
|
|
2143
|
+
* styles are ever touched.
|
|
2144
|
+
*
|
|
2145
|
+
* For neighbours to reflow *below* the expanded one, the parent must be able to
|
|
2146
|
+
* wrap — a `flex flex-wrap` row is the simplest; with `targetWidth="100%"` the
|
|
2147
|
+
* expanded item takes a full row and everything after it moves down.
|
|
2144
2148
|
*
|
|
2145
2149
|
* @example
|
|
2146
2150
|
* ```tsx
|
|
2147
|
-
*
|
|
2148
|
-
*
|
|
2149
|
-
*
|
|
2150
|
-
*
|
|
2151
|
+
* <div className="flex flex-wrap gap-3">
|
|
2152
|
+
* <ScalableContainer
|
|
2153
|
+
* className="w-full lg:w-[calc(50%-6px)]" // resting size — your grid
|
|
2154
|
+
* height={300} // resting height
|
|
2155
|
+
* targetWidth="100%" targetHeight={580} // expanded size
|
|
2156
|
+
* >
|
|
2157
|
+
* <Chart … />
|
|
2151
2158
|
* </ScalableContainer>
|
|
2152
2159
|
* …
|
|
2153
2160
|
* </div>
|
package/dist/index.d.ts
CHANGED
|
@@ -2084,22 +2084,22 @@ interface ListProps {
|
|
|
2084
2084
|
declare function List({ items, onItemClick, activeKey, density, className, style, }: ListProps): react_jsx_runtime.JSX.Element;
|
|
2085
2085
|
|
|
2086
2086
|
interface ScalableContainerProps {
|
|
2087
|
-
/**
|
|
2087
|
+
/**
|
|
2088
|
+
* Resting width. Optional — when omitted, the resting size is left to your
|
|
2089
|
+
* own `className` / parent layout (so the container can sit in a fluid grid
|
|
2090
|
+
* sized by `w-[…]` classes). Only set this if you want an inline width.
|
|
2091
|
+
*/
|
|
2088
2092
|
width?: react__default.CSSProperties['width'];
|
|
2089
|
-
/** Resting height.
|
|
2093
|
+
/** Resting height. Optional — see {@link ScalableContainerProps.width}. */
|
|
2090
2094
|
height?: react__default.CSSProperties['height'];
|
|
2091
2095
|
/**
|
|
2092
|
-
* Width when expanded.
|
|
2093
|
-
*
|
|
2094
|
-
*
|
|
2095
|
-
* `'100%'`.
|
|
2096
|
+
* Width when expanded. Default `'100%'`. Use `'100%'` to span the full row
|
|
2097
|
+
* of a flex/grid so the container pushes its neighbours onto the next
|
|
2098
|
+
* row(s); a concrete value (e.g. `900`) grows it to that exact width.
|
|
2096
2099
|
*/
|
|
2097
2100
|
targetWidth?: react__default.CSSProperties['width'];
|
|
2098
|
-
/**
|
|
2099
|
-
*
|
|
2100
|
-
* grow taller and push whatever sits below it further down. Falls back to
|
|
2101
|
-
* {@link ScalableContainerProps.expandedHeight}, then `'100%'`.
|
|
2102
|
-
*/
|
|
2101
|
+
/** Height when expanded. Default `'100%'`. A concrete value (e.g. `580`)
|
|
2102
|
+
* grows the container taller and pushes whatever follows further down. */
|
|
2103
2103
|
targetHeight?: react__default.CSSProperties['height'];
|
|
2104
2104
|
/** @deprecated Use `targetWidth`. */
|
|
2105
2105
|
expandedWidth?: react__default.CSSProperties['width'];
|
|
@@ -2130,24 +2130,31 @@ interface ScalableContainerProps {
|
|
|
2130
2130
|
className?: string;
|
|
2131
2131
|
}
|
|
2132
2132
|
/**
|
|
2133
|
-
* Container that
|
|
2134
|
-
*
|
|
2135
|
-
*
|
|
2136
|
-
*
|
|
2137
|
-
*
|
|
2138
|
-
*
|
|
2139
|
-
*
|
|
2140
|
-
*
|
|
2141
|
-
*
|
|
2142
|
-
*
|
|
2143
|
-
*
|
|
2133
|
+
* Container that grows to a target size on click and collapses back. Reads like
|
|
2134
|
+
* an OS window resize — subtle elevation lift, smooth size transition.
|
|
2135
|
+
*
|
|
2136
|
+
* **Resting size comes from your layout, not from props.** Leave `width`/`height`
|
|
2137
|
+
* unset and size the container with your own `className` (e.g. a fluid grid:
|
|
2138
|
+
* `w-full lg:w-[calc(50%-6px)]`). Only when expanded does the container write an
|
|
2139
|
+
* inline `width`/`height` (= `targetWidth`/`targetHeight`) and go `flex: none`,
|
|
2140
|
+
* so it grows to that size and simply **pushes its neighbours along the flow** —
|
|
2141
|
+
* they keep their own dimensions and reflow (wrap / move down). On collapse the
|
|
2142
|
+
* inline sizing is removed and your className layout takes back over. No sibling
|
|
2143
|
+
* styles are ever touched.
|
|
2144
|
+
*
|
|
2145
|
+
* For neighbours to reflow *below* the expanded one, the parent must be able to
|
|
2146
|
+
* wrap — a `flex flex-wrap` row is the simplest; with `targetWidth="100%"` the
|
|
2147
|
+
* expanded item takes a full row and everything after it moves down.
|
|
2144
2148
|
*
|
|
2145
2149
|
* @example
|
|
2146
2150
|
* ```tsx
|
|
2147
|
-
*
|
|
2148
|
-
*
|
|
2149
|
-
*
|
|
2150
|
-
*
|
|
2151
|
+
* <div className="flex flex-wrap gap-3">
|
|
2152
|
+
* <ScalableContainer
|
|
2153
|
+
* className="w-full lg:w-[calc(50%-6px)]" // resting size — your grid
|
|
2154
|
+
* height={300} // resting height
|
|
2155
|
+
* targetWidth="100%" targetHeight={580} // expanded size
|
|
2156
|
+
* >
|
|
2157
|
+
* <Chart … />
|
|
2151
2158
|
* </ScalableContainer>
|
|
2152
2159
|
* …
|
|
2153
2160
|
* </div>
|
package/dist/index.js
CHANGED
|
@@ -4655,8 +4655,8 @@ var TOGGLE_POSITION_CLASS = {
|
|
|
4655
4655
|
"bottom-right": "bottom-2 right-2"
|
|
4656
4656
|
};
|
|
4657
4657
|
function ScalableContainer({
|
|
4658
|
-
width
|
|
4659
|
-
height
|
|
4658
|
+
width,
|
|
4659
|
+
height,
|
|
4660
4660
|
targetWidth,
|
|
4661
4661
|
targetHeight,
|
|
4662
4662
|
expandedWidth = "100%",
|
|
@@ -4705,25 +4705,20 @@ function ScalableContainer({
|
|
|
4705
4705
|
};
|
|
4706
4706
|
const wrapperClass = isScaled ? assignClassOnClick : void 0;
|
|
4707
4707
|
return /* @__PURE__ */ jsxs(
|
|
4708
|
-
|
|
4708
|
+
"div",
|
|
4709
4709
|
{
|
|
4710
4710
|
ref: containerRef,
|
|
4711
4711
|
style: {
|
|
4712
4712
|
width: isScaled ? expandW : width,
|
|
4713
4713
|
height: isScaled ? expandH : height,
|
|
4714
|
-
|
|
4715
|
-
},
|
|
4716
|
-
animate: { width: isScaled ? expandW : width, height: isScaled ? expandH : height },
|
|
4717
|
-
transition: reduced ? { duration: 0 } : {
|
|
4718
|
-
width: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] },
|
|
4719
|
-
height: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] }
|
|
4714
|
+
...isScaled ? { flex: "none" } : null
|
|
4720
4715
|
},
|
|
4721
4716
|
className: cx(
|
|
4722
4717
|
"relative rounded-lg overflow-hidden",
|
|
4718
|
+
"transition-[width,height,box-shadow] duration-[320ms] ease-[cubic-bezier(0.16,1,0.3,1)] motion-reduce:transition-none",
|
|
4723
4719
|
// OS-window aesthetic: subtle elevation at rest, lifted shadow +
|
|
4724
4720
|
// raised stacking when expanded so it sits above neighbours.
|
|
4725
4721
|
isScaled ? "z-raised shadow-2xl" : "shadow-md",
|
|
4726
|
-
"transition-shadow duration-300",
|
|
4727
4722
|
className
|
|
4728
4723
|
),
|
|
4729
4724
|
children: [
|
|
@@ -5512,7 +5507,7 @@ function EditableCell({
|
|
|
5512
5507
|
};
|
|
5513
5508
|
}, [editing, col.editor]);
|
|
5514
5509
|
if (editing) {
|
|
5515
|
-
if (col.editor) return /* @__PURE__ */ jsx("div", { ref: editRef, children: col.editor({ value, row, commit, cancel }) });
|
|
5510
|
+
if (col.editor) return /* @__PURE__ */ jsx("div", { ref: editRef, className: "w-full", children: col.editor({ value, row, commit, cancel }) });
|
|
5516
5511
|
return /* @__PURE__ */ jsx(
|
|
5517
5512
|
"input",
|
|
5518
5513
|
{
|