@geomak/ui 5.5.1 → 5.5.2
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 +23 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -30
- package/dist/index.d.ts +11 -30
- package/dist/index.js +23 -46
- package/dist/index.js.map +1 -1
- package/dist/styles.css +13 -45
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10,12 +10,12 @@ var framerMotion = require('framer-motion');
|
|
|
10
10
|
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
11
11
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
12
12
|
var Accordion = require('@radix-ui/react-accordion');
|
|
13
|
-
var ToggleGroup = require('@radix-ui/react-toggle-group');
|
|
14
13
|
var ContextMenuPrimitive = require('@radix-ui/react-context-menu');
|
|
15
14
|
var Popover = require('@radix-ui/react-popover');
|
|
16
15
|
var SwitchPrimitive = require('@radix-ui/react-switch');
|
|
17
16
|
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
18
17
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
18
|
+
var ToggleGroup = require('@radix-ui/react-toggle-group');
|
|
19
19
|
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
20
20
|
|
|
21
21
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -44,12 +44,12 @@ var Dialog__namespace = /*#__PURE__*/_interopNamespace(Dialog);
|
|
|
44
44
|
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
45
45
|
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
46
46
|
var Accordion__namespace = /*#__PURE__*/_interopNamespace(Accordion);
|
|
47
|
-
var ToggleGroup__namespace = /*#__PURE__*/_interopNamespace(ToggleGroup);
|
|
48
47
|
var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
|
|
49
48
|
var Popover__namespace = /*#__PURE__*/_interopNamespace(Popover);
|
|
50
49
|
var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
|
|
51
50
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
52
51
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
52
|
+
var ToggleGroup__namespace = /*#__PURE__*/_interopNamespace(ToggleGroup);
|
|
53
53
|
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
54
54
|
|
|
55
55
|
var Moon = ({ color = "gray" }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: color, viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: color, className: "w-8 h-8", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z" }) });
|
|
@@ -1178,38 +1178,6 @@ function Tree({
|
|
|
1178
1178
|
item.key
|
|
1179
1179
|
)) });
|
|
1180
1180
|
}
|
|
1181
|
-
function ToggleButton({ items, onChange, activeKey }) {
|
|
1182
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1183
|
-
ToggleGroup__namespace.Root,
|
|
1184
|
-
{
|
|
1185
|
-
type: "single",
|
|
1186
|
-
value: activeKey,
|
|
1187
|
-
onValueChange: (val) => {
|
|
1188
|
-
if (val) onChange(val);
|
|
1189
|
-
},
|
|
1190
|
-
className: "flex items-center",
|
|
1191
|
-
children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1192
|
-
ToggleGroup__namespace.Item,
|
|
1193
|
-
{
|
|
1194
|
-
value: item.key,
|
|
1195
|
-
"aria-label": typeof item.label === "string" ? item.label : item.key,
|
|
1196
|
-
className: [
|
|
1197
|
-
// Semantic tokens handle both light and dark modes via
|
|
1198
|
-
// CSS vars — no `dark:` variants needed.
|
|
1199
|
-
index === 0 && "rounded-l-lg border-r border-border",
|
|
1200
|
-
index === items.length - 1 && "rounded-r-lg border-l border-border",
|
|
1201
|
-
"p-2 cursor-pointer transition-colors duration-150 text-foreground-secondary",
|
|
1202
|
-
"focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
1203
|
-
"bg-surface hover:bg-surface-raised",
|
|
1204
|
-
"data-[state=on]:bg-accent data-[state=on]:text-accent-fg"
|
|
1205
|
-
].filter(Boolean).join(" "),
|
|
1206
|
-
children: item.icon ?? item.label
|
|
1207
|
-
},
|
|
1208
|
-
item.key
|
|
1209
|
-
))
|
|
1210
|
-
}
|
|
1211
|
-
);
|
|
1212
|
-
}
|
|
1213
1181
|
var NotificationContext = React8.createContext({
|
|
1214
1182
|
open: () => void 0,
|
|
1215
1183
|
close: () => void 0
|
|
@@ -1611,6 +1579,10 @@ var TOGGLE_POSITION_CLASS = {
|
|
|
1611
1579
|
function ScalableContainer({
|
|
1612
1580
|
width = "100%",
|
|
1613
1581
|
height = "auto",
|
|
1582
|
+
expandedWidth = "100%",
|
|
1583
|
+
expandedHeight = "100%",
|
|
1584
|
+
expanded,
|
|
1585
|
+
onExpandedChange,
|
|
1614
1586
|
children,
|
|
1615
1587
|
assignClassOnClick,
|
|
1616
1588
|
expandIcon,
|
|
@@ -1618,27 +1590,32 @@ function ScalableContainer({
|
|
|
1618
1590
|
togglePosition = "top-right"
|
|
1619
1591
|
}) {
|
|
1620
1592
|
const containerRef = React8.useRef(null);
|
|
1621
|
-
const [
|
|
1593
|
+
const [internalScaled, setInternalScaled] = React8.useState(false);
|
|
1594
|
+
const isScaled = expanded ?? internalScaled;
|
|
1622
1595
|
const reduced = framerMotion.useReducedMotion();
|
|
1623
1596
|
const onToggle = () => {
|
|
1624
1597
|
const next = !isScaled;
|
|
1625
|
-
|
|
1626
|
-
|
|
1598
|
+
if (expanded === void 0) setInternalScaled(next);
|
|
1599
|
+
onExpandedChange?.(next);
|
|
1600
|
+
if (next) {
|
|
1601
|
+
window.setTimeout(
|
|
1602
|
+
() => containerRef.current?.scrollIntoView({ behavior: "smooth", block: "nearest" }),
|
|
1603
|
+
reduced ? 0 : 340
|
|
1604
|
+
);
|
|
1605
|
+
}
|
|
1627
1606
|
};
|
|
1628
1607
|
const wrapperClass = isScaled ? assignClassOnClick : void 0;
|
|
1629
1608
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1630
1609
|
framerMotion.motion.div,
|
|
1631
1610
|
{
|
|
1632
1611
|
ref: containerRef,
|
|
1633
|
-
layout: true,
|
|
1634
1612
|
animate: {
|
|
1635
|
-
width: isScaled ?
|
|
1636
|
-
height: isScaled ?
|
|
1613
|
+
width: isScaled ? expandedWidth : width,
|
|
1614
|
+
height: isScaled ? expandedHeight : height
|
|
1637
1615
|
},
|
|
1638
1616
|
transition: reduced ? { duration: 0 } : {
|
|
1639
1617
|
width: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] },
|
|
1640
|
-
height: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] }
|
|
1641
|
-
layout: { duration: 0.32, ease: [0.16, 1, 0.3, 1] }
|
|
1618
|
+
height: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] }
|
|
1642
1619
|
},
|
|
1643
1620
|
className: [
|
|
1644
1621
|
"relative rounded-lg overflow-hidden",
|
|
@@ -2174,10 +2151,10 @@ var FIELD_SIZE = {
|
|
|
2174
2151
|
md: { control: "h-control-md", text: "text-sm", padX: "px-3", gap: "gap-2" },
|
|
2175
2152
|
lg: { control: "h-control-lg", text: "text-sm", padX: "px-3.5", gap: "gap-2.5" }
|
|
2176
2153
|
};
|
|
2177
|
-
var FOCUS_WITHIN = "focus-within:outline-none focus-within:border-accent
|
|
2178
|
-
var FOCUS_ELEMENT = "focus:outline-none focus:border-accent
|
|
2179
|
-
var FOCUS_WITHIN_ERROR = "focus-within:border-status-error
|
|
2180
|
-
var FOCUS_ELEMENT_ERROR = "focus:border-status-error
|
|
2154
|
+
var FOCUS_WITHIN = "focus-within:outline-none focus-within:border-accent";
|
|
2155
|
+
var FOCUS_ELEMENT = "focus:outline-none focus:border-accent data-[state=open]:border-accent";
|
|
2156
|
+
var FOCUS_WITHIN_ERROR = "focus-within:border-status-error";
|
|
2157
|
+
var FOCUS_ELEMENT_ERROR = "focus:border-status-error data-[state=open]:border-status-error";
|
|
2181
2158
|
function fieldShell({
|
|
2182
2159
|
size = "md",
|
|
2183
2160
|
hasError = false,
|
|
@@ -5749,7 +5726,6 @@ exports.TextInput = TextInput;
|
|
|
5749
5726
|
exports.ThemeProvider = ThemeProvider;
|
|
5750
5727
|
exports.ThemeSwitch = ThemeSwitch;
|
|
5751
5728
|
exports.TimePicker = TimePicker;
|
|
5752
|
-
exports.ToggleButton = ToggleButton;
|
|
5753
5729
|
exports.Tooltip = Tooltip;
|
|
5754
5730
|
exports.TooltipProvider = TooltipProvider;
|
|
5755
5731
|
exports.TopBar = TopBar;
|