@uni-design-system/uni-react 8.3.0 → 8.4.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 +12 -0
- package/README.md +26 -2
- package/dist/cjs/index.cjs +325 -33
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +326 -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 +79 -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 +8 -4
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,217 @@ 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
|
+
"elevation",
|
|
19737
|
+
"shadow",
|
|
19738
|
+
"gap",
|
|
19739
|
+
"fullWidth",
|
|
19740
|
+
"fullHeight",
|
|
19741
|
+
"flexDirection",
|
|
19742
|
+
"textAlign",
|
|
19743
|
+
"wrapItems",
|
|
19744
|
+
"zIndex"
|
|
19745
|
+
];
|
|
19746
|
+
const STYLE_PROP_SET = new Set(BOX_STYLE_PROP_KEYS);
|
|
19747
|
+
function splitBoxProps(props) {
|
|
19748
|
+
const styleProps = {};
|
|
19749
|
+
const rest = {};
|
|
19750
|
+
for (const key2 of Object.keys(props)) {
|
|
19751
|
+
const target = STYLE_PROP_SET.has(key2) ? styleProps : rest;
|
|
19752
|
+
target[key2] = props[key2];
|
|
19753
|
+
}
|
|
19754
|
+
return [styleProps, rest];
|
|
19755
|
+
}
|
|
19756
|
+
function boxClassName(props, styles) {
|
|
19757
|
+
const { border, dashBorder = false, ignoreDir = true, flexDirection } = props;
|
|
19758
|
+
return css([
|
|
19759
|
+
{
|
|
19760
|
+
...styles.colorPair(props.color),
|
|
19761
|
+
...styles.backgroundColor(props.backgroundColor),
|
|
19762
|
+
display: props.alignSelf ? "flex" : "block",
|
|
19763
|
+
position: props.position,
|
|
19764
|
+
inset: props.inset,
|
|
19765
|
+
boxSizing: "border-box",
|
|
19766
|
+
height: props.height,
|
|
19767
|
+
minHeight: props.minHeight,
|
|
19768
|
+
maxHeight: props.maxHeight,
|
|
19769
|
+
width: props.width,
|
|
19770
|
+
minWidth: props.minWidth,
|
|
19771
|
+
maxWidth: props.maxWidth,
|
|
19772
|
+
flexWrap: props.wrapItems,
|
|
19773
|
+
overflow: props.overflow,
|
|
19774
|
+
...styles.padding(props.padding),
|
|
19775
|
+
...styles.horizontalPadding(props.paddingHorizontal),
|
|
19776
|
+
...styles.verticalPadding(props.paddingVertical),
|
|
19777
|
+
...styles.paddingLeft(props.paddingLeft),
|
|
19778
|
+
...styles.paddingRight(props.paddingRight),
|
|
19779
|
+
...styles.paddingTop(props.paddingTop),
|
|
19780
|
+
...styles.paddingBottom(props.paddingBottom),
|
|
19781
|
+
...styles.boxShadow(props.elevation),
|
|
19782
|
+
...styles.boxShadow(props.shadow),
|
|
19783
|
+
...styles.radius(props.borderRadius),
|
|
19784
|
+
...styles.getRadiusLeft(props.borderRadiusLeft),
|
|
19785
|
+
...styles.getRadiusRight(props.borderRadiusRight),
|
|
19786
|
+
...styles.getRadiusTop(props.borderRadiusTop),
|
|
19787
|
+
...styles.getRadiusBottom(props.borderRadiusBottom),
|
|
19788
|
+
...styles.borderTop(props.borderTop),
|
|
19789
|
+
...styles.borderBottom(props.borderBottom),
|
|
19790
|
+
...styles.borderLeft(props.borderLeft),
|
|
19791
|
+
...styles.borderRight(props.borderRight),
|
|
19792
|
+
...styles.gap(props.gap),
|
|
19793
|
+
...styles.style("display", props.display),
|
|
19794
|
+
...styles.style("alignSelf", props.alignSelf),
|
|
19795
|
+
...styles.style("alignItems", props.alignItems),
|
|
19796
|
+
...styles.style("justifyContent", props.justifyContent),
|
|
19797
|
+
...styles.style("alignContent", props.alignContent),
|
|
19798
|
+
...styles.style("flexGrow", props.grow),
|
|
19799
|
+
...styles.style("flexDirection", props.flexDirection),
|
|
19800
|
+
...styles.style("gridArea", props.gridArea),
|
|
19801
|
+
...styles.style("gridColumn", props.gridColumn),
|
|
19802
|
+
...styles.style("gridRow", props.gridRow),
|
|
19803
|
+
...styles.style("textAlign", props.textAlign),
|
|
19804
|
+
...styles.zIndex(props.zIndex)
|
|
19805
|
+
},
|
|
19806
|
+
border && !dashBorder && { ...styles.border(border) },
|
|
19807
|
+
border && dashBorder && { ...styles.getDashedBorder(border, props.borderRadius) },
|
|
19808
|
+
props.fullWidth && { width: "100%" },
|
|
19809
|
+
props.fullHeight && { height: "100%" },
|
|
19810
|
+
ignoreDir && (flexDirection ?? "row") === "row" && {
|
|
19811
|
+
"&:dir(rtl)": { flexDirection: "row-reverse" }
|
|
19812
|
+
},
|
|
19813
|
+
ignoreDir && (flexDirection ?? "row") === "row-reverse" && {
|
|
19814
|
+
"&:dir(rtl)": { flexDirection: "row" }
|
|
19815
|
+
}
|
|
19816
|
+
]);
|
|
19817
|
+
}
|
|
19818
|
+
function useBoxClassName(props) {
|
|
19819
|
+
const styles = useThemeStyles();
|
|
19820
|
+
return boxClassName(props, styles);
|
|
19821
|
+
}
|
|
19822
|
+
const Box = forwardRef(function Box2({ as, className: className2, children, ...props }, ref) {
|
|
19823
|
+
const Component2 = as || "div";
|
|
19824
|
+
const [styleProps, rest] = splitBoxProps(props);
|
|
19825
|
+
const boxClass = useBoxClassName(styleProps);
|
|
19826
|
+
const element = /* @__PURE__ */ jsxRuntimeExports.jsx(Component2, { ref, className: cx$1(boxClass, className2), ...rest, children });
|
|
19827
|
+
return styleProps.color ? /* @__PURE__ */ jsxRuntimeExports.jsx(ContainerContext.Provider, { value: { colorToken: styleProps.color }, children: element }) : element;
|
|
19828
|
+
});
|
|
19829
|
+
Box.displayName = "Box";
|
|
19830
|
+
const Center = forwardRef(function Center2(props, ref) {
|
|
19831
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19832
|
+
Box,
|
|
19833
|
+
{
|
|
19834
|
+
display: "flex",
|
|
19835
|
+
justifyContent: "center",
|
|
19836
|
+
alignItems: "center",
|
|
19837
|
+
...props,
|
|
19838
|
+
ref
|
|
19839
|
+
}
|
|
19840
|
+
);
|
|
19841
|
+
});
|
|
19842
|
+
Center.displayName = "Center";
|
|
19843
|
+
const Grid = forwardRef(function Grid2(props, ref) {
|
|
19844
|
+
const {
|
|
19845
|
+
templateAreas,
|
|
19846
|
+
templateColumns,
|
|
19847
|
+
templateRows,
|
|
19848
|
+
outline,
|
|
19849
|
+
outlineColor,
|
|
19850
|
+
className: className2,
|
|
19851
|
+
...boxProps
|
|
19852
|
+
} = props;
|
|
19853
|
+
const styles = useThemeStyles();
|
|
19854
|
+
const gridClass = css([
|
|
19855
|
+
templateAreas && { gridTemplateAreas: templateAreas },
|
|
19856
|
+
templateColumns && { gridTemplateColumns: templateColumns },
|
|
19857
|
+
templateRows && { gridTemplateRows: templateRows },
|
|
19858
|
+
outline && { gap: styles.getThickness(outline) },
|
|
19859
|
+
outlineColor && { backgroundColor: styles.colorPalette()[outlineColor] }
|
|
19860
|
+
]);
|
|
19861
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19862
|
+
Box,
|
|
19863
|
+
{
|
|
19864
|
+
display: "grid",
|
|
19865
|
+
...boxProps,
|
|
19866
|
+
className: cx$1(gridClass, className2),
|
|
19867
|
+
ref
|
|
19868
|
+
}
|
|
19869
|
+
);
|
|
19870
|
+
});
|
|
19871
|
+
Grid.displayName = "Grid";
|
|
19872
|
+
const GridArea = forwardRef(function GridArea2(props, ref) {
|
|
19873
|
+
const { area, ...boxProps } = props;
|
|
19874
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { gridArea: area, ...boxProps, ref });
|
|
19875
|
+
});
|
|
19876
|
+
GridArea.displayName = "GridArea";
|
|
19877
|
+
const Row = forwardRef(function Row2(props, ref) {
|
|
19878
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19879
|
+
Box,
|
|
19880
|
+
{
|
|
19881
|
+
display: "flex",
|
|
19882
|
+
flexDirection: "row",
|
|
19883
|
+
minWidth: "fit-content",
|
|
19884
|
+
...props,
|
|
19885
|
+
ref
|
|
19886
|
+
}
|
|
19887
|
+
);
|
|
19888
|
+
});
|
|
19889
|
+
Row.displayName = "Row";
|
|
19890
|
+
const Stack = forwardRef(function Stack2(props, ref) {
|
|
19891
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19892
|
+
Box,
|
|
19893
|
+
{
|
|
19894
|
+
display: "flex",
|
|
19895
|
+
flexDirection: "column",
|
|
19896
|
+
minHeight: "fit-content",
|
|
19897
|
+
...props,
|
|
19898
|
+
ref
|
|
19899
|
+
}
|
|
19900
|
+
);
|
|
19901
|
+
});
|
|
19902
|
+
Stack.displayName = "Stack";
|
|
19903
|
+
const Wrap = forwardRef(function Wrap2(props, ref) {
|
|
19904
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { display: "flex", wrapItems: "wrap", ...props, ref });
|
|
19905
|
+
});
|
|
19906
|
+
Wrap.displayName = "Wrap";
|
|
19596
19907
|
const ModalSizes = {
|
|
19597
19908
|
sm: 260,
|
|
19598
19909
|
md: 320,
|
|
@@ -19678,47 +19989,17 @@ const Switch = ({ size = "sm", on = false, onChange }) => {
|
|
|
19678
19989
|
};
|
|
19679
19990
|
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
19991
|
};
|
|
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
19992
|
const IconDictionary = srcExports.IconDictionary;
|
|
19715
19993
|
const IconKeys = srcExports.IconKeys;
|
|
19716
19994
|
export {
|
|
19995
|
+
BOX_STYLE_PROP_KEYS,
|
|
19717
19996
|
Background,
|
|
19718
19997
|
BorderStyle,
|
|
19998
|
+
Box,
|
|
19719
19999
|
BoxShadow,
|
|
19720
20000
|
Button,
|
|
19721
20001
|
Card,
|
|
20002
|
+
Center,
|
|
19722
20003
|
Collapse,
|
|
19723
20004
|
ContainerContext,
|
|
19724
20005
|
DragHandle,
|
|
@@ -19726,6 +20007,8 @@ export {
|
|
|
19726
20007
|
Flex,
|
|
19727
20008
|
FlexHorizontalAlignments,
|
|
19728
20009
|
FlexVerticalAlignments,
|
|
20010
|
+
Grid,
|
|
20011
|
+
GridArea,
|
|
19729
20012
|
Icon,
|
|
19730
20013
|
IconDictionary,
|
|
19731
20014
|
IconKeys,
|
|
@@ -19735,20 +20018,25 @@ export {
|
|
|
19735
20018
|
Modal,
|
|
19736
20019
|
Overlay,
|
|
19737
20020
|
Padding,
|
|
20021
|
+
Row,
|
|
19738
20022
|
Slide,
|
|
19739
20023
|
SortableItem,
|
|
19740
20024
|
SortableList,
|
|
19741
20025
|
SortableOverlay,
|
|
20026
|
+
Stack,
|
|
19742
20027
|
Switch,
|
|
19743
20028
|
Text,
|
|
19744
20029
|
TextInput,
|
|
19745
20030
|
ThemeProvider,
|
|
20031
|
+
Wrap,
|
|
19746
20032
|
alignBottom,
|
|
19747
20033
|
alignCenter,
|
|
19748
20034
|
alignTop,
|
|
20035
|
+
boxClassName,
|
|
19749
20036
|
column,
|
|
19750
20037
|
createCookieStorageManager,
|
|
19751
20038
|
createLocalStorageManager,
|
|
20039
|
+
createThemeStyles,
|
|
19752
20040
|
expand,
|
|
19753
20041
|
fadeConfig,
|
|
19754
20042
|
fix,
|
|
@@ -19768,11 +20056,15 @@ export {
|
|
|
19768
20056
|
row,
|
|
19769
20057
|
rowFixedItem,
|
|
19770
20058
|
rowFlexItem,
|
|
20059
|
+
safeParseInt,
|
|
19771
20060
|
spaceBetween,
|
|
19772
20061
|
spaceEvenly,
|
|
20062
|
+
splitBoxProps,
|
|
20063
|
+
useBoxClassName,
|
|
19773
20064
|
useLayout,
|
|
19774
20065
|
useMedia,
|
|
19775
20066
|
useTheme,
|
|
20067
|
+
useThemeStyles,
|
|
19776
20068
|
useToggle,
|
|
19777
20069
|
withTheme
|
|
19778
20070
|
};
|