@uni-design-system/uni-react 8.3.1 → 9.0.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.
- package/CHANGELOG.md +79 -0
- package/README.md +26 -2
- package/dist/cjs/index.cjs +323 -33
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +324 -34
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/layout/box/box.component.d.ts +21 -0
- package/dist/types/components/layout/box/box.component.d.ts.map +1 -0
- package/dist/types/components/layout/box/box.stories.d.ts +11 -0
- package/dist/types/components/layout/box/box.stories.d.ts.map +1 -0
- package/dist/types/components/layout/box/box.styles.d.ts +77 -0
- package/dist/types/components/layout/box/box.styles.d.ts.map +1 -0
- package/dist/types/components/layout/box/index.d.ts +3 -0
- package/dist/types/components/layout/box/index.d.ts.map +1 -0
- package/dist/types/components/layout/center/center.component.d.ts +7 -0
- package/dist/types/components/layout/center/center.component.d.ts.map +1 -0
- package/dist/types/components/layout/center/center.stories.d.ts +7 -0
- package/dist/types/components/layout/center/center.stories.d.ts.map +1 -0
- package/dist/types/components/layout/center/index.d.ts +2 -0
- package/dist/types/components/layout/center/index.d.ts.map +1 -0
- package/dist/types/components/layout/grid/grid-area/grid-area.component.d.ts +11 -0
- package/dist/types/components/layout/grid/grid-area/grid-area.component.d.ts.map +1 -0
- package/dist/types/components/layout/grid/grid-area/index.d.ts +2 -0
- package/dist/types/components/layout/grid/grid-area/index.d.ts.map +1 -0
- package/dist/types/components/layout/grid/grid.component.d.ts +24 -0
- package/dist/types/components/layout/grid/grid.component.d.ts.map +1 -0
- package/dist/types/components/layout/grid/grid.stories.d.ts +7 -0
- package/dist/types/components/layout/grid/grid.stories.d.ts.map +1 -0
- package/dist/types/components/layout/grid/index.d.ts +3 -0
- package/dist/types/components/layout/grid/index.d.ts.map +1 -0
- package/dist/types/components/layout/index.d.ts +7 -0
- package/dist/types/components/layout/index.d.ts.map +1 -0
- package/dist/types/components/layout/layout.spec.d.ts +2 -0
- package/dist/types/components/layout/layout.spec.d.ts.map +1 -0
- package/dist/types/components/layout/row/index.d.ts +2 -0
- package/dist/types/components/layout/row/index.d.ts.map +1 -0
- package/dist/types/components/layout/row/row.component.d.ts +13 -0
- package/dist/types/components/layout/row/row.component.d.ts.map +1 -0
- package/dist/types/components/layout/row/row.stories.d.ts +7 -0
- package/dist/types/components/layout/row/row.stories.d.ts.map +1 -0
- package/dist/types/components/layout/stack/index.d.ts +2 -0
- package/dist/types/components/layout/stack/index.d.ts.map +1 -0
- package/dist/types/components/layout/stack/stack.component.d.ts +13 -0
- package/dist/types/components/layout/stack/stack.component.d.ts.map +1 -0
- package/dist/types/components/layout/stack/stack.stories.d.ts +7 -0
- package/dist/types/components/layout/stack/stack.stories.d.ts.map +1 -0
- package/dist/types/components/layout/wrap/index.d.ts +2 -0
- package/dist/types/components/layout/wrap/index.d.ts.map +1 -0
- package/dist/types/components/layout/wrap/wrap.component.d.ts +7 -0
- package/dist/types/components/layout/wrap/wrap.component.d.ts.map +1 -0
- package/dist/types/components/layout/wrap/wrap.stories.d.ts +7 -0
- package/dist/types/components/layout/wrap/wrap.stories.d.ts.map +1 -0
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/core/index.d.ts.map +1 -1
- package/dist/types/core/polymorphic/index.d.ts +2 -0
- package/dist/types/core/polymorphic/index.d.ts.map +1 -0
- package/dist/types/core/polymorphic/polymorphic.types.d.ts +27 -0
- package/dist/types/core/polymorphic/polymorphic.types.d.ts.map +1 -0
- package/dist/types/core/theme/index.d.ts +1 -0
- package/dist/types/core/theme/index.d.ts.map +1 -1
- package/dist/types/core/theme/theme.styles.d.ts +52 -0
- package/dist/types/core/theme/theme.styles.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/number.helper.d.ts +2 -0
- package/dist/types/utils/number.helper.d.ts.map +1 -0
- package/package.json +7 -3
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as require$$0 from "react";
|
|
2
2
|
import require$$0__default, { createContext, forwardRef, useState, useMemo, useEffect, useContext, useRef, useLayoutEffect, useId, useInsertionEffect, useCallback, Children, isValidElement, Fragment, createElement, Component, memo as memo$1, useReducer, cloneElement } from "react";
|
|
3
|
-
import { getValue, LightTheme, getDeviceSize, getDeviceOrientation, HSLAToString, ShadowCssMap, FontWeightMap, RoleHues } from "@uni-design-system/uni-core";
|
|
3
|
+
import { getValue, LightTheme, Z_INDEX, getDeviceSize, getDeviceOrientation, HSLAToString, ShadowCssMap, FontWeightMap, RoleHues } from "@uni-design-system/uni-core";
|
|
4
4
|
import { unstable_batchedUpdates, createPortal } from "react-dom";
|
|
5
|
+
import { css, cx as cx$1 } from "@emotion/css";
|
|
5
6
|
var jsxRuntime = { exports: {} };
|
|
6
7
|
var reactJsxRuntime_production_min = {};
|
|
7
8
|
var hasRequiredReactJsxRuntime_production_min;
|
|
@@ -6411,6 +6412,105 @@ function withTheme(Component2) {
|
|
|
6411
6412
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Component2, { ...props, theme });
|
|
6412
6413
|
};
|
|
6413
6414
|
}
|
|
6415
|
+
const createLocalStorageManager = (key2) => ({
|
|
6416
|
+
type: "localStorage",
|
|
6417
|
+
get(init) {
|
|
6418
|
+
if (!globalThis?.document) return init;
|
|
6419
|
+
let value;
|
|
6420
|
+
try {
|
|
6421
|
+
value = localStorage.getItem(key2) || init;
|
|
6422
|
+
} catch {
|
|
6423
|
+
}
|
|
6424
|
+
return JSON.parse(value) || init;
|
|
6425
|
+
},
|
|
6426
|
+
set(value) {
|
|
6427
|
+
try {
|
|
6428
|
+
localStorage.setItem(key2, JSON.stringify(value));
|
|
6429
|
+
} catch {
|
|
6430
|
+
}
|
|
6431
|
+
}
|
|
6432
|
+
});
|
|
6433
|
+
const parseCookie = (cookie, key2) => {
|
|
6434
|
+
const match = cookie.match(new RegExp(`(^| )${key2}=([^;]+)`));
|
|
6435
|
+
return match?.[2];
|
|
6436
|
+
};
|
|
6437
|
+
const createCookieStorageManager = (key2, cookie) => ({
|
|
6438
|
+
type: "cookie",
|
|
6439
|
+
get(init) {
|
|
6440
|
+
if (cookie) return parseCookie(cookie, key2);
|
|
6441
|
+
if (!globalThis?.document) return init;
|
|
6442
|
+
return parseCookie(document.cookie, key2) || init;
|
|
6443
|
+
},
|
|
6444
|
+
set(value) {
|
|
6445
|
+
document.cookie = `${key2}=${value}; max-age=31536000; path=/`;
|
|
6446
|
+
}
|
|
6447
|
+
});
|
|
6448
|
+
const safeParseInt = (n) => typeof n === "number" ? n : parseInt(n);
|
|
6449
|
+
function createThemeStyles(theme) {
|
|
6450
|
+
const colors = theme.colors;
|
|
6451
|
+
const spacing = theme.spacing;
|
|
6452
|
+
const radii = theme.radii;
|
|
6453
|
+
const borders = theme.borders;
|
|
6454
|
+
const shadows = theme.shadows;
|
|
6455
|
+
const thicknesses = theme.thicknesses;
|
|
6456
|
+
const getContentColor = (token, useVariant) => useVariant ? colors[`on-${token}-variant`] : colors[`on-${token}`];
|
|
6457
|
+
return {
|
|
6458
|
+
theme,
|
|
6459
|
+
colors,
|
|
6460
|
+
colorPalette: () => colors,
|
|
6461
|
+
getSpacing: (size) => size === "none" ? "none" : spacing[size],
|
|
6462
|
+
getThickness: (thickness) => thicknesses[thickness],
|
|
6463
|
+
getContentColor,
|
|
6464
|
+
/** Background + matching on-color for a container token, as one pair. */
|
|
6465
|
+
colorPair: (token, colorVariant) => {
|
|
6466
|
+
if (!token) return void 0;
|
|
6467
|
+
return { color: getContentColor(token, colorVariant), backgroundColor: colors[token] };
|
|
6468
|
+
},
|
|
6469
|
+
color: (color2) => !color2 ? void 0 : { color: colors[color2] },
|
|
6470
|
+
backgroundColor: (token) => !token ? void 0 : { backgroundColor: colors[token] },
|
|
6471
|
+
backgroundImage: (url) => !url ? void 0 : { backgroundImage: `url(${url})` },
|
|
6472
|
+
borderColor: (borderColor) => ({
|
|
6473
|
+
borderColor: colors[borderColor]
|
|
6474
|
+
}),
|
|
6475
|
+
/** An SVG-drawn dashed outline — CSS `dashed` cannot control dash length. */
|
|
6476
|
+
getDashedBorder: (color2, radius) => {
|
|
6477
|
+
if (!color2) return void 0;
|
|
6478
|
+
const r = radius && radii[radius];
|
|
6479
|
+
const borderRadius = r ? safeParseInt(r) : 0;
|
|
6480
|
+
const strokeColor = colors[color2]?.replace("#", "%23");
|
|
6481
|
+
return {
|
|
6482
|
+
backgroundImage: `url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='${borderRadius}' ry='${borderRadius}' stroke='${strokeColor}' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e")`,
|
|
6483
|
+
borderRadius
|
|
6484
|
+
};
|
|
6485
|
+
},
|
|
6486
|
+
radius: (size) => !size ? void 0 : { borderRadius: radii[size] },
|
|
6487
|
+
getRadiusLeft: (size) => !size ? void 0 : { borderBottomLeftRadius: radii[size], borderTopLeftRadius: radii[size] },
|
|
6488
|
+
getRadiusRight: (size) => !size ? void 0 : { borderBottomRightRadius: radii[size], borderTopRightRadius: radii[size] },
|
|
6489
|
+
getRadiusTop: (size) => !size ? void 0 : { borderTopLeftRadius: radii[size], borderTopRightRadius: radii[size] },
|
|
6490
|
+
getRadiusBottom: (size) => !size ? void 0 : { borderBottomLeftRadius: radii[size], borderBottomRightRadius: radii[size] },
|
|
6491
|
+
padding: (size) => !size ? void 0 : { padding: spacing[size] },
|
|
6492
|
+
horizontalPadding: (size) => !size ? void 0 : { paddingInline: spacing[size] },
|
|
6493
|
+
verticalPadding: (size) => !size ? void 0 : { paddingBlock: spacing[size] },
|
|
6494
|
+
paddingLeft: (size) => !size ? void 0 : { paddingLeft: spacing[size] },
|
|
6495
|
+
paddingRight: (size) => !size ? void 0 : { paddingRight: spacing[size] },
|
|
6496
|
+
paddingTop: (size) => !size ? void 0 : { paddingTop: spacing[size] },
|
|
6497
|
+
paddingBottom: (size) => !size ? void 0 : { paddingBottom: spacing[size] },
|
|
6498
|
+
border: (border) => !border ? void 0 : { border: borders[border] },
|
|
6499
|
+
borderTop: (border) => !border ? void 0 : { borderTop: borders[border] },
|
|
6500
|
+
borderBottom: (border) => !border ? void 0 : { borderBottom: borders[border] },
|
|
6501
|
+
borderLeft: (border) => !border ? void 0 : { borderLeft: borders[border] },
|
|
6502
|
+
borderRight: (border) => !border ? void 0 : { borderRight: borders[border] },
|
|
6503
|
+
boxShadow: (shadow) => !shadow ? void 0 : { boxShadow: shadows[shadow] },
|
|
6504
|
+
gap: (gap) => !gap || gap === "none" ? void 0 : { gap: spacing[gap] },
|
|
6505
|
+
zIndex: (element) => !element ? void 0 : { zIndex: Z_INDEX[element] },
|
|
6506
|
+
/** One property, dropped when the value is absent (or falsy, as in Angular). */
|
|
6507
|
+
style: (prop, value) => !value ? void 0 : { [prop]: value }
|
|
6508
|
+
};
|
|
6509
|
+
}
|
|
6510
|
+
function useThemeStyles() {
|
|
6511
|
+
const theme = useTheme();
|
|
6512
|
+
return useMemo(() => createThemeStyles(theme), [theme]);
|
|
6513
|
+
}
|
|
6414
6514
|
function Icon({ name, color: color2 = "on-surface", height = 24, width = 24 }) {
|
|
6415
6515
|
if (!name) return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {});
|
|
6416
6516
|
const { colors } = useTheme();
|
|
@@ -19593,6 +19693,215 @@ const SortableList = ({
|
|
|
19593
19693
|
const TextInput = ({ value, onChange }) => {
|
|
19594
19694
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("input", { type: "text", value, onChange }) });
|
|
19595
19695
|
};
|
|
19696
|
+
const BOX_STYLE_PROP_KEYS = [
|
|
19697
|
+
"color",
|
|
19698
|
+
"backgroundColor",
|
|
19699
|
+
"borderRadius",
|
|
19700
|
+
"borderRadiusLeft",
|
|
19701
|
+
"borderRadiusRight",
|
|
19702
|
+
"borderRadiusTop",
|
|
19703
|
+
"borderRadiusBottom",
|
|
19704
|
+
"padding",
|
|
19705
|
+
"paddingHorizontal",
|
|
19706
|
+
"paddingVertical",
|
|
19707
|
+
"paddingLeft",
|
|
19708
|
+
"paddingRight",
|
|
19709
|
+
"paddingTop",
|
|
19710
|
+
"paddingBottom",
|
|
19711
|
+
"border",
|
|
19712
|
+
"borderTop",
|
|
19713
|
+
"borderBottom",
|
|
19714
|
+
"borderLeft",
|
|
19715
|
+
"borderRight",
|
|
19716
|
+
"dashBorder",
|
|
19717
|
+
"alignSelf",
|
|
19718
|
+
"alignItems",
|
|
19719
|
+
"alignContent",
|
|
19720
|
+
"justifyContent",
|
|
19721
|
+
"grow",
|
|
19722
|
+
"display",
|
|
19723
|
+
"position",
|
|
19724
|
+
"inset",
|
|
19725
|
+
"height",
|
|
19726
|
+
"minHeight",
|
|
19727
|
+
"maxHeight",
|
|
19728
|
+
"width",
|
|
19729
|
+
"minWidth",
|
|
19730
|
+
"maxWidth",
|
|
19731
|
+
"ignoreDir",
|
|
19732
|
+
"gridArea",
|
|
19733
|
+
"gridColumn",
|
|
19734
|
+
"gridRow",
|
|
19735
|
+
"overflow",
|
|
19736
|
+
"shadow",
|
|
19737
|
+
"gap",
|
|
19738
|
+
"fullWidth",
|
|
19739
|
+
"fullHeight",
|
|
19740
|
+
"flexDirection",
|
|
19741
|
+
"textAlign",
|
|
19742
|
+
"wrapItems",
|
|
19743
|
+
"zIndex"
|
|
19744
|
+
];
|
|
19745
|
+
const STYLE_PROP_SET = new Set(BOX_STYLE_PROP_KEYS);
|
|
19746
|
+
function splitBoxProps(props) {
|
|
19747
|
+
const styleProps = {};
|
|
19748
|
+
const rest = {};
|
|
19749
|
+
for (const key2 of Object.keys(props)) {
|
|
19750
|
+
const target = STYLE_PROP_SET.has(key2) ? styleProps : rest;
|
|
19751
|
+
target[key2] = props[key2];
|
|
19752
|
+
}
|
|
19753
|
+
return [styleProps, rest];
|
|
19754
|
+
}
|
|
19755
|
+
function boxClassName(props, styles) {
|
|
19756
|
+
const { border, dashBorder = false, ignoreDir = true, flexDirection } = props;
|
|
19757
|
+
return css([
|
|
19758
|
+
{
|
|
19759
|
+
...styles.colorPair(props.color),
|
|
19760
|
+
...styles.backgroundColor(props.backgroundColor),
|
|
19761
|
+
display: props.alignSelf ? "flex" : "block",
|
|
19762
|
+
position: props.position,
|
|
19763
|
+
inset: props.inset,
|
|
19764
|
+
boxSizing: "border-box",
|
|
19765
|
+
height: props.height,
|
|
19766
|
+
minHeight: props.minHeight,
|
|
19767
|
+
maxHeight: props.maxHeight,
|
|
19768
|
+
width: props.width,
|
|
19769
|
+
minWidth: props.minWidth,
|
|
19770
|
+
maxWidth: props.maxWidth,
|
|
19771
|
+
flexWrap: props.wrapItems,
|
|
19772
|
+
overflow: props.overflow,
|
|
19773
|
+
...styles.padding(props.padding),
|
|
19774
|
+
...styles.horizontalPadding(props.paddingHorizontal),
|
|
19775
|
+
...styles.verticalPadding(props.paddingVertical),
|
|
19776
|
+
...styles.paddingLeft(props.paddingLeft),
|
|
19777
|
+
...styles.paddingRight(props.paddingRight),
|
|
19778
|
+
...styles.paddingTop(props.paddingTop),
|
|
19779
|
+
...styles.paddingBottom(props.paddingBottom),
|
|
19780
|
+
...styles.boxShadow(props.shadow),
|
|
19781
|
+
...styles.radius(props.borderRadius),
|
|
19782
|
+
...styles.getRadiusLeft(props.borderRadiusLeft),
|
|
19783
|
+
...styles.getRadiusRight(props.borderRadiusRight),
|
|
19784
|
+
...styles.getRadiusTop(props.borderRadiusTop),
|
|
19785
|
+
...styles.getRadiusBottom(props.borderRadiusBottom),
|
|
19786
|
+
...styles.borderTop(props.borderTop),
|
|
19787
|
+
...styles.borderBottom(props.borderBottom),
|
|
19788
|
+
...styles.borderLeft(props.borderLeft),
|
|
19789
|
+
...styles.borderRight(props.borderRight),
|
|
19790
|
+
...styles.gap(props.gap),
|
|
19791
|
+
...styles.style("display", props.display),
|
|
19792
|
+
...styles.style("alignSelf", props.alignSelf),
|
|
19793
|
+
...styles.style("alignItems", props.alignItems),
|
|
19794
|
+
...styles.style("justifyContent", props.justifyContent),
|
|
19795
|
+
...styles.style("alignContent", props.alignContent),
|
|
19796
|
+
...styles.style("flexGrow", props.grow),
|
|
19797
|
+
...styles.style("flexDirection", props.flexDirection),
|
|
19798
|
+
...styles.style("gridArea", props.gridArea),
|
|
19799
|
+
...styles.style("gridColumn", props.gridColumn),
|
|
19800
|
+
...styles.style("gridRow", props.gridRow),
|
|
19801
|
+
...styles.style("textAlign", props.textAlign),
|
|
19802
|
+
...styles.zIndex(props.zIndex)
|
|
19803
|
+
},
|
|
19804
|
+
border && !dashBorder && { ...styles.border(border) },
|
|
19805
|
+
border && dashBorder && { ...styles.getDashedBorder(border, props.borderRadius) },
|
|
19806
|
+
props.fullWidth && { width: "100%" },
|
|
19807
|
+
props.fullHeight && { height: "100%" },
|
|
19808
|
+
ignoreDir && (flexDirection ?? "row") === "row" && {
|
|
19809
|
+
"&:dir(rtl)": { flexDirection: "row-reverse" }
|
|
19810
|
+
},
|
|
19811
|
+
ignoreDir && (flexDirection ?? "row") === "row-reverse" && {
|
|
19812
|
+
"&:dir(rtl)": { flexDirection: "row" }
|
|
19813
|
+
}
|
|
19814
|
+
]);
|
|
19815
|
+
}
|
|
19816
|
+
function useBoxClassName(props) {
|
|
19817
|
+
const styles = useThemeStyles();
|
|
19818
|
+
return boxClassName(props, styles);
|
|
19819
|
+
}
|
|
19820
|
+
const Box = forwardRef(function Box2({ as, className: className2, children, ...props }, ref) {
|
|
19821
|
+
const Component2 = as || "div";
|
|
19822
|
+
const [styleProps, rest] = splitBoxProps(props);
|
|
19823
|
+
const boxClass = useBoxClassName(styleProps);
|
|
19824
|
+
const element = /* @__PURE__ */ jsxRuntimeExports.jsx(Component2, { ref, className: cx$1(boxClass, className2), ...rest, children });
|
|
19825
|
+
return styleProps.color ? /* @__PURE__ */ jsxRuntimeExports.jsx(ContainerContext.Provider, { value: { colorToken: styleProps.color }, children: element }) : element;
|
|
19826
|
+
});
|
|
19827
|
+
Box.displayName = "Box";
|
|
19828
|
+
const Center = forwardRef(function Center2(props, ref) {
|
|
19829
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19830
|
+
Box,
|
|
19831
|
+
{
|
|
19832
|
+
display: "flex",
|
|
19833
|
+
justifyContent: "center",
|
|
19834
|
+
alignItems: "center",
|
|
19835
|
+
...props,
|
|
19836
|
+
ref
|
|
19837
|
+
}
|
|
19838
|
+
);
|
|
19839
|
+
});
|
|
19840
|
+
Center.displayName = "Center";
|
|
19841
|
+
const Grid = forwardRef(function Grid2(props, ref) {
|
|
19842
|
+
const {
|
|
19843
|
+
templateAreas,
|
|
19844
|
+
templateColumns,
|
|
19845
|
+
templateRows,
|
|
19846
|
+
outline,
|
|
19847
|
+
outlineColor,
|
|
19848
|
+
className: className2,
|
|
19849
|
+
...boxProps
|
|
19850
|
+
} = props;
|
|
19851
|
+
const styles = useThemeStyles();
|
|
19852
|
+
const gridClass = css([
|
|
19853
|
+
templateAreas && { gridTemplateAreas: templateAreas },
|
|
19854
|
+
templateColumns && { gridTemplateColumns: templateColumns },
|
|
19855
|
+
templateRows && { gridTemplateRows: templateRows },
|
|
19856
|
+
outline && { gap: styles.getThickness(outline) },
|
|
19857
|
+
outlineColor && { backgroundColor: styles.colorPalette()[outlineColor] }
|
|
19858
|
+
]);
|
|
19859
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19860
|
+
Box,
|
|
19861
|
+
{
|
|
19862
|
+
display: "grid",
|
|
19863
|
+
...boxProps,
|
|
19864
|
+
className: cx$1(gridClass, className2),
|
|
19865
|
+
ref
|
|
19866
|
+
}
|
|
19867
|
+
);
|
|
19868
|
+
});
|
|
19869
|
+
Grid.displayName = "Grid";
|
|
19870
|
+
const GridArea = forwardRef(function GridArea2(props, ref) {
|
|
19871
|
+
const { area, ...boxProps } = props;
|
|
19872
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { gridArea: area, ...boxProps, ref });
|
|
19873
|
+
});
|
|
19874
|
+
GridArea.displayName = "GridArea";
|
|
19875
|
+
const Row = forwardRef(function Row2(props, ref) {
|
|
19876
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19877
|
+
Box,
|
|
19878
|
+
{
|
|
19879
|
+
display: "flex",
|
|
19880
|
+
flexDirection: "row",
|
|
19881
|
+
minWidth: "fit-content",
|
|
19882
|
+
...props,
|
|
19883
|
+
ref
|
|
19884
|
+
}
|
|
19885
|
+
);
|
|
19886
|
+
});
|
|
19887
|
+
Row.displayName = "Row";
|
|
19888
|
+
const Stack = forwardRef(function Stack2(props, ref) {
|
|
19889
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19890
|
+
Box,
|
|
19891
|
+
{
|
|
19892
|
+
display: "flex",
|
|
19893
|
+
flexDirection: "column",
|
|
19894
|
+
minHeight: "fit-content",
|
|
19895
|
+
...props,
|
|
19896
|
+
ref
|
|
19897
|
+
}
|
|
19898
|
+
);
|
|
19899
|
+
});
|
|
19900
|
+
Stack.displayName = "Stack";
|
|
19901
|
+
const Wrap = forwardRef(function Wrap2(props, ref) {
|
|
19902
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { display: "flex", wrapItems: "wrap", ...props, ref });
|
|
19903
|
+
});
|
|
19904
|
+
Wrap.displayName = "Wrap";
|
|
19596
19905
|
const ModalSizes = {
|
|
19597
19906
|
sm: 260,
|
|
19598
19907
|
md: 320,
|
|
@@ -19678,47 +19987,17 @@ const Switch = ({ size = "sm", on = false, onChange }) => {
|
|
|
19678
19987
|
};
|
|
19679
19988
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: switchStyle, className: "switch", "data-isOn": isOn, onClick: toggleSwitch, children: /* @__PURE__ */ jsxRuntimeExports.jsx(motion.div, { style: handleStyle, className: "handle", layout: true, transition: spring2 }) });
|
|
19680
19989
|
};
|
|
19681
|
-
const createLocalStorageManager = (key2) => ({
|
|
19682
|
-
type: "localStorage",
|
|
19683
|
-
get(init) {
|
|
19684
|
-
if (!globalThis?.document) return init;
|
|
19685
|
-
let value;
|
|
19686
|
-
try {
|
|
19687
|
-
value = localStorage.getItem(key2) || init;
|
|
19688
|
-
} catch {
|
|
19689
|
-
}
|
|
19690
|
-
return JSON.parse(value) || init;
|
|
19691
|
-
},
|
|
19692
|
-
set(value) {
|
|
19693
|
-
try {
|
|
19694
|
-
localStorage.setItem(key2, JSON.stringify(value));
|
|
19695
|
-
} catch {
|
|
19696
|
-
}
|
|
19697
|
-
}
|
|
19698
|
-
});
|
|
19699
|
-
const parseCookie = (cookie, key2) => {
|
|
19700
|
-
const match = cookie.match(new RegExp(`(^| )${key2}=([^;]+)`));
|
|
19701
|
-
return match?.[2];
|
|
19702
|
-
};
|
|
19703
|
-
const createCookieStorageManager = (key2, cookie) => ({
|
|
19704
|
-
type: "cookie",
|
|
19705
|
-
get(init) {
|
|
19706
|
-
if (cookie) return parseCookie(cookie, key2);
|
|
19707
|
-
if (!globalThis?.document) return init;
|
|
19708
|
-
return parseCookie(document.cookie, key2) || init;
|
|
19709
|
-
},
|
|
19710
|
-
set(value) {
|
|
19711
|
-
document.cookie = `${key2}=${value}; max-age=31536000; path=/`;
|
|
19712
|
-
}
|
|
19713
|
-
});
|
|
19714
19990
|
const IconDictionary = srcExports.IconDictionary;
|
|
19715
19991
|
const IconKeys = srcExports.IconKeys;
|
|
19716
19992
|
export {
|
|
19993
|
+
BOX_STYLE_PROP_KEYS,
|
|
19717
19994
|
Background,
|
|
19718
19995
|
BorderStyle,
|
|
19996
|
+
Box,
|
|
19719
19997
|
BoxShadow,
|
|
19720
19998
|
Button,
|
|
19721
19999
|
Card,
|
|
20000
|
+
Center,
|
|
19722
20001
|
Collapse,
|
|
19723
20002
|
ContainerContext,
|
|
19724
20003
|
DragHandle,
|
|
@@ -19726,6 +20005,8 @@ export {
|
|
|
19726
20005
|
Flex,
|
|
19727
20006
|
FlexHorizontalAlignments,
|
|
19728
20007
|
FlexVerticalAlignments,
|
|
20008
|
+
Grid,
|
|
20009
|
+
GridArea,
|
|
19729
20010
|
Icon,
|
|
19730
20011
|
IconDictionary,
|
|
19731
20012
|
IconKeys,
|
|
@@ -19735,20 +20016,25 @@ export {
|
|
|
19735
20016
|
Modal,
|
|
19736
20017
|
Overlay,
|
|
19737
20018
|
Padding,
|
|
20019
|
+
Row,
|
|
19738
20020
|
Slide,
|
|
19739
20021
|
SortableItem,
|
|
19740
20022
|
SortableList,
|
|
19741
20023
|
SortableOverlay,
|
|
20024
|
+
Stack,
|
|
19742
20025
|
Switch,
|
|
19743
20026
|
Text,
|
|
19744
20027
|
TextInput,
|
|
19745
20028
|
ThemeProvider,
|
|
20029
|
+
Wrap,
|
|
19746
20030
|
alignBottom,
|
|
19747
20031
|
alignCenter,
|
|
19748
20032
|
alignTop,
|
|
20033
|
+
boxClassName,
|
|
19749
20034
|
column,
|
|
19750
20035
|
createCookieStorageManager,
|
|
19751
20036
|
createLocalStorageManager,
|
|
20037
|
+
createThemeStyles,
|
|
19752
20038
|
expand,
|
|
19753
20039
|
fadeConfig,
|
|
19754
20040
|
fix,
|
|
@@ -19768,11 +20054,15 @@ export {
|
|
|
19768
20054
|
row,
|
|
19769
20055
|
rowFixedItem,
|
|
19770
20056
|
rowFlexItem,
|
|
20057
|
+
safeParseInt,
|
|
19771
20058
|
spaceBetween,
|
|
19772
20059
|
spaceEvenly,
|
|
20060
|
+
splitBoxProps,
|
|
20061
|
+
useBoxClassName,
|
|
19773
20062
|
useLayout,
|
|
19774
20063
|
useMedia,
|
|
19775
20064
|
useTheme,
|
|
20065
|
+
useThemeStyles,
|
|
19776
20066
|
useToggle,
|
|
19777
20067
|
withTheme
|
|
19778
20068
|
};
|