@nation-a/ui 0.7.0 → 0.8.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/dist/index.cjs +409 -130
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +409 -130
- package/dist/index.js.map +1 -1
- package/dist/styled-system/jsx/aspect-ratio.mjs +3 -2
- package/dist/styled-system/jsx/bleed.mjs +3 -2
- package/dist/styled-system/jsx/box.mjs +3 -2
- package/dist/styled-system/jsx/center.mjs +3 -2
- package/dist/styled-system/jsx/circle.mjs +3 -2
- package/dist/styled-system/jsx/container.mjs +3 -2
- package/dist/styled-system/jsx/cq.mjs +3 -2
- package/dist/styled-system/jsx/divider.mjs +3 -2
- package/dist/styled-system/jsx/flex.mjs +3 -2
- package/dist/styled-system/jsx/float.mjs +3 -2
- package/dist/styled-system/jsx/grid-item.mjs +3 -2
- package/dist/styled-system/jsx/grid.mjs +3 -2
- package/dist/styled-system/jsx/hstack.mjs +3 -2
- package/dist/styled-system/jsx/is-valid-prop.mjs +3 -4
- package/dist/styled-system/jsx/link-overlay.mjs +3 -2
- package/dist/styled-system/jsx/spacer.mjs +3 -2
- package/dist/styled-system/jsx/square.mjs +3 -2
- package/dist/styled-system/jsx/stack.mjs +3 -2
- package/dist/styled-system/jsx/visually-hidden.mjs +3 -2
- package/dist/styled-system/jsx/vstack.mjs +3 -2
- package/dist/styled-system/jsx/wrap.mjs +3 -2
- package/dist/styled-system/styles.css +1850 -1162
- package/dist/styled-system/types/system-types.d.ts +2 -2
- package/dist/types/components/BottomSheet/index.d.ts +8 -8
- package/dist/types/components/Button/index.d.ts +288 -5
- package/dist/types/components/Dialog/dialog.recipe.d.ts +1 -1
- package/dist/types/components/Dialog/index.d.ts +28 -17
- package/dist/types/components/IconButton/index.d.ts +8 -10
- package/dist/types/components/Layout/index.d.ts +42 -0
- package/dist/types/components/Navigation/index.d.ts +9 -15
- package/dist/types/components/Navigation/navigation.recipe.d.ts +1 -1
- package/dist/types/components/Spinner/index.d.ts +3 -19
- package/dist/types/components/Tag/index.d.ts +3 -7
- package/dist/types/components/Tag/tag.recipe.d.ts +1 -1
- package/dist/types/components/Text/index.d.ts +3 -6
- package/dist/types/components/Text/text.recipe.d.ts +12 -0
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/utils/with-polymorphic-component.d.ts +18 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,6 +2,16 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { forwardRef, useMemo, createElement, createContext as createContext$1, useContext, useRef, useLayoutEffect, useEffect, useState, memo as memo$1, Children, isValidElement, cloneElement, useCallback, useId, useSyncExternalStore } from "react";
|
|
4
4
|
import { flushSync, createPortal, unstable_batchedUpdates } from "react-dom";
|
|
5
|
+
function withPolymorphicComponent(Component) {
|
|
6
|
+
const PolymorphicComponent = React.forwardRef(
|
|
7
|
+
(props, ref) => {
|
|
8
|
+
const { as, ...restProps } = props;
|
|
9
|
+
return /* @__PURE__ */ jsx(Component, { as, ref, ...restProps });
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
PolymorphicComponent.displayName = `withPolymorphic(${Component.displayName || "Component"})`;
|
|
13
|
+
return PolymorphicComponent;
|
|
14
|
+
}
|
|
5
15
|
function isObject$1(value) {
|
|
6
16
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
7
17
|
}
|
|
@@ -103,8 +113,8 @@ function mapObject(obj, fn) {
|
|
|
103
113
|
}
|
|
104
114
|
function toResponsiveObject(values, breakpoints2) {
|
|
105
115
|
return values.reduce(
|
|
106
|
-
(acc, current,
|
|
107
|
-
const key = breakpoints2[
|
|
116
|
+
(acc, current, index2) => {
|
|
117
|
+
const key = breakpoints2[index2];
|
|
108
118
|
if (current != null) {
|
|
109
119
|
acc[key] = current;
|
|
110
120
|
}
|
|
@@ -440,15 +450,15 @@ function sva(config2) {
|
|
|
440
450
|
getVariantProps
|
|
441
451
|
});
|
|
442
452
|
}
|
|
443
|
-
var userGeneratedStr = "css
|
|
453
|
+
var userGeneratedStr = "css";
|
|
444
454
|
var userGenerated = userGeneratedStr.split(",");
|
|
445
|
-
var cssPropertiesStr = "
|
|
455
|
+
var cssPropertiesStr = "";
|
|
446
456
|
var allCssProperties = cssPropertiesStr.split(",").concat(userGenerated);
|
|
447
457
|
var properties = new Map(allCssProperties.map((prop) => [prop, true]));
|
|
448
458
|
var cssPropertySelectorRegex = /&|@/;
|
|
449
|
-
var isCssProperty =
|
|
459
|
+
var isCssProperty = (prop) => {
|
|
450
460
|
return properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop);
|
|
451
|
-
}
|
|
461
|
+
};
|
|
452
462
|
const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(prop) && !isCssProperty(prop);
|
|
453
463
|
const composeShouldForwardProps = (tag, shouldForwardProp2) => tag.__shouldForwardProps__ && shouldForwardProp2 ? (propName) => tag.__shouldForwardProps__(propName) && shouldForwardProp2(propName) : shouldForwardProp2;
|
|
454
464
|
const composeCvaFn = (cvaA, cvaB) => {
|
|
@@ -523,6 +533,124 @@ function createJsxFactory() {
|
|
|
523
533
|
});
|
|
524
534
|
}
|
|
525
535
|
const styled = /* @__PURE__ */ createJsxFactory();
|
|
536
|
+
const boxConfig = {
|
|
537
|
+
transform(props) {
|
|
538
|
+
return props;
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
const getBoxStyle = (styles = {}) => {
|
|
542
|
+
const _styles = getPatternStyles(boxConfig, styles);
|
|
543
|
+
return boxConfig.transform(_styles, patternFns);
|
|
544
|
+
};
|
|
545
|
+
const Box$1 = /* @__PURE__ */ forwardRef(function Box(props, ref) {
|
|
546
|
+
const [patternProps, restProps] = splitProps(props, []);
|
|
547
|
+
const styleProps = getBoxStyle(patternProps);
|
|
548
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
549
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
550
|
+
return createElement(styled.div, mergedProps);
|
|
551
|
+
});
|
|
552
|
+
const flexConfig = {
|
|
553
|
+
transform(props) {
|
|
554
|
+
const { direction, align, justify, wrap: wrap2, basis, grow, shrink, ...rest } = props;
|
|
555
|
+
return {
|
|
556
|
+
display: "flex",
|
|
557
|
+
flexDirection: direction,
|
|
558
|
+
alignItems: align,
|
|
559
|
+
justifyContent: justify,
|
|
560
|
+
flexWrap: wrap2,
|
|
561
|
+
flexBasis: basis,
|
|
562
|
+
flexGrow: grow,
|
|
563
|
+
flexShrink: shrink,
|
|
564
|
+
...rest
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
const getFlexStyle = (styles = {}) => {
|
|
569
|
+
const _styles = getPatternStyles(flexConfig, styles);
|
|
570
|
+
return flexConfig.transform(_styles, patternFns);
|
|
571
|
+
};
|
|
572
|
+
const Flex$1 = /* @__PURE__ */ forwardRef(function Flex(props, ref) {
|
|
573
|
+
const [patternProps, restProps] = splitProps(props, ["align", "justify", "direction", "wrap", "basis", "grow", "shrink"]);
|
|
574
|
+
const styleProps = getFlexStyle(patternProps);
|
|
575
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
576
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
577
|
+
return createElement(styled.div, mergedProps);
|
|
578
|
+
});
|
|
579
|
+
const stackConfig = {
|
|
580
|
+
transform(props) {
|
|
581
|
+
const { align, justify, direction, gap, ...rest } = props;
|
|
582
|
+
return {
|
|
583
|
+
display: "flex",
|
|
584
|
+
flexDirection: direction,
|
|
585
|
+
alignItems: align,
|
|
586
|
+
justifyContent: justify,
|
|
587
|
+
gap,
|
|
588
|
+
...rest
|
|
589
|
+
};
|
|
590
|
+
},
|
|
591
|
+
defaultValues: { direction: "column", gap: "10px" }
|
|
592
|
+
};
|
|
593
|
+
const getStackStyle = (styles = {}) => {
|
|
594
|
+
const _styles = getPatternStyles(stackConfig, styles);
|
|
595
|
+
return stackConfig.transform(_styles, patternFns);
|
|
596
|
+
};
|
|
597
|
+
const Stack$1 = /* @__PURE__ */ forwardRef(function Stack(props, ref) {
|
|
598
|
+
const [patternProps, restProps] = splitProps(props, ["align", "justify", "direction", "gap"]);
|
|
599
|
+
const styleProps = getStackStyle(patternProps);
|
|
600
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
601
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
602
|
+
return createElement(styled.div, mergedProps);
|
|
603
|
+
});
|
|
604
|
+
const vstackConfig = {
|
|
605
|
+
transform(props) {
|
|
606
|
+
const { justify, gap, ...rest } = props;
|
|
607
|
+
return {
|
|
608
|
+
display: "flex",
|
|
609
|
+
alignItems: "center",
|
|
610
|
+
justifyContent: justify,
|
|
611
|
+
gap,
|
|
612
|
+
flexDirection: "column",
|
|
613
|
+
...rest
|
|
614
|
+
};
|
|
615
|
+
},
|
|
616
|
+
defaultValues: { gap: "10px" }
|
|
617
|
+
};
|
|
618
|
+
const getVstackStyle = (styles = {}) => {
|
|
619
|
+
const _styles = getPatternStyles(vstackConfig, styles);
|
|
620
|
+
return vstackConfig.transform(_styles, patternFns);
|
|
621
|
+
};
|
|
622
|
+
const VStack$1 = /* @__PURE__ */ forwardRef(function VStack(props, ref) {
|
|
623
|
+
const [patternProps, restProps] = splitProps(props, ["justify", "gap"]);
|
|
624
|
+
const styleProps = getVstackStyle(patternProps);
|
|
625
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
626
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
627
|
+
return createElement(styled.div, mergedProps);
|
|
628
|
+
});
|
|
629
|
+
const hstackConfig = {
|
|
630
|
+
transform(props) {
|
|
631
|
+
const { justify, gap, ...rest } = props;
|
|
632
|
+
return {
|
|
633
|
+
display: "flex",
|
|
634
|
+
alignItems: "center",
|
|
635
|
+
justifyContent: justify,
|
|
636
|
+
gap,
|
|
637
|
+
flexDirection: "row",
|
|
638
|
+
...rest
|
|
639
|
+
};
|
|
640
|
+
},
|
|
641
|
+
defaultValues: { gap: "10px" }
|
|
642
|
+
};
|
|
643
|
+
const getHstackStyle = (styles = {}) => {
|
|
644
|
+
const _styles = getPatternStyles(hstackConfig, styles);
|
|
645
|
+
return hstackConfig.transform(_styles, patternFns);
|
|
646
|
+
};
|
|
647
|
+
const HStack$1 = /* @__PURE__ */ forwardRef(function HStack(props, ref) {
|
|
648
|
+
const [patternProps, restProps] = splitProps(props, ["justify", "gap"]);
|
|
649
|
+
const styleProps = getHstackStyle(patternProps);
|
|
650
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
651
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
652
|
+
return createElement(styled.div, mergedProps);
|
|
653
|
+
});
|
|
526
654
|
const centerConfig = {
|
|
527
655
|
transform(props) {
|
|
528
656
|
const { inline, ...rest } = props;
|
|
@@ -538,12 +666,75 @@ const getCenterStyle = (styles = {}) => {
|
|
|
538
666
|
const _styles = getPatternStyles(centerConfig, styles);
|
|
539
667
|
return centerConfig.transform(_styles, patternFns);
|
|
540
668
|
};
|
|
541
|
-
const Center = /* @__PURE__ */ forwardRef(function
|
|
669
|
+
const Center$1 = /* @__PURE__ */ forwardRef(function Center(props, ref) {
|
|
542
670
|
const [patternProps, restProps] = splitProps(props, ["inline"]);
|
|
543
671
|
const styleProps = getCenterStyle(patternProps);
|
|
544
|
-
const
|
|
672
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
673
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
674
|
+
return createElement(styled.div, mergedProps);
|
|
675
|
+
});
|
|
676
|
+
const gridConfig = {
|
|
677
|
+
transform(props, { map, isCssUnit: isCssUnit2 }) {
|
|
678
|
+
const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
|
|
679
|
+
const getValue = (v2) => isCssUnit2(v2) ? v2 : `token(sizes.${v2}, ${v2})`;
|
|
680
|
+
return {
|
|
681
|
+
display: "grid",
|
|
682
|
+
gridTemplateColumns: columns != null ? map(columns, (v2) => `repeat(${v2}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v2) => `repeat(auto-fit, minmax(${getValue(v2)}, 1fr))`) : void 0,
|
|
683
|
+
gap,
|
|
684
|
+
columnGap,
|
|
685
|
+
rowGap,
|
|
686
|
+
...rest
|
|
687
|
+
};
|
|
688
|
+
},
|
|
689
|
+
defaultValues(props) {
|
|
690
|
+
return { gap: props.columnGap || props.rowGap ? void 0 : "10px" };
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
const getGridStyle = (styles = {}) => {
|
|
694
|
+
const _styles = getPatternStyles(gridConfig, styles);
|
|
695
|
+
return gridConfig.transform(_styles, patternFns);
|
|
696
|
+
};
|
|
697
|
+
const Grid$1 = /* @__PURE__ */ forwardRef(function Grid(props, ref) {
|
|
698
|
+
const [patternProps, restProps] = splitProps(props, ["gap", "columnGap", "rowGap", "columns", "minChildWidth"]);
|
|
699
|
+
const styleProps = getGridStyle(patternProps);
|
|
700
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
701
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
702
|
+
return createElement(styled.div, mergedProps);
|
|
703
|
+
});
|
|
704
|
+
const gridItemConfig = {
|
|
705
|
+
transform(props, { map }) {
|
|
706
|
+
const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props;
|
|
707
|
+
const spanFn = (v2) => v2 === "auto" ? v2 : `span ${v2}`;
|
|
708
|
+
return {
|
|
709
|
+
gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
|
|
710
|
+
gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
|
|
711
|
+
gridColumnStart: colStart,
|
|
712
|
+
gridColumnEnd: colEnd,
|
|
713
|
+
gridRowStart: rowStart,
|
|
714
|
+
gridRowEnd: rowEnd,
|
|
715
|
+
...rest
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
const getGridItemStyle = (styles = {}) => {
|
|
720
|
+
const _styles = getPatternStyles(gridItemConfig, styles);
|
|
721
|
+
return gridItemConfig.transform(_styles, patternFns);
|
|
722
|
+
};
|
|
723
|
+
const GridItem$1 = /* @__PURE__ */ forwardRef(function GridItem(props, ref) {
|
|
724
|
+
const [patternProps, restProps] = splitProps(props, ["colSpan", "rowSpan", "colStart", "rowStart", "colEnd", "rowEnd"]);
|
|
725
|
+
const styleProps = getGridItemStyle(patternProps);
|
|
726
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
727
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
545
728
|
return createElement(styled.div, mergedProps);
|
|
546
729
|
});
|
|
730
|
+
const Box2 = withPolymorphicComponent(Box$1);
|
|
731
|
+
const Flex2 = withPolymorphicComponent(Flex$1);
|
|
732
|
+
const Grid2 = withPolymorphicComponent(Grid$1);
|
|
733
|
+
const Stack2 = withPolymorphicComponent(Stack$1);
|
|
734
|
+
const VStack2 = withPolymorphicComponent(VStack$1);
|
|
735
|
+
const HStack2 = withPolymorphicComponent(HStack$1);
|
|
736
|
+
const GridItem2 = withPolymorphicComponent(GridItem$1);
|
|
737
|
+
const Center2 = withPolymorphicComponent(Center$1);
|
|
547
738
|
function getErrorMessage(hook, provider) {
|
|
548
739
|
return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
|
|
549
740
|
}
|
|
@@ -1722,9 +1913,9 @@ var layerStack = {
|
|
|
1722
1913
|
},
|
|
1723
1914
|
isBelowPointerBlockingLayer(node) {
|
|
1724
1915
|
var _a;
|
|
1725
|
-
const
|
|
1916
|
+
const index2 = this.indexOf(node);
|
|
1726
1917
|
const highestBlockingIndex = this.topMostPointerBlockingLayer() ? this.indexOf((_a = this.topMostPointerBlockingLayer()) == null ? void 0 : _a.node) : -1;
|
|
1727
|
-
return
|
|
1918
|
+
return index2 < highestBlockingIndex;
|
|
1728
1919
|
},
|
|
1729
1920
|
isTopMost(node) {
|
|
1730
1921
|
const layer = this.layers[this.count() - 1];
|
|
@@ -1747,18 +1938,18 @@ var layerStack = {
|
|
|
1747
1938
|
this.branches.push(node);
|
|
1748
1939
|
},
|
|
1749
1940
|
remove(node) {
|
|
1750
|
-
const
|
|
1751
|
-
if (
|
|
1752
|
-
if (
|
|
1941
|
+
const index2 = this.indexOf(node);
|
|
1942
|
+
if (index2 < 0) return;
|
|
1943
|
+
if (index2 < this.count() - 1) {
|
|
1753
1944
|
const _layers = this.getNestedLayers(node);
|
|
1754
1945
|
_layers.forEach((layer) => layer.dismiss());
|
|
1755
1946
|
}
|
|
1756
|
-
this.layers.splice(
|
|
1947
|
+
this.layers.splice(index2, 1);
|
|
1757
1948
|
node.style.removeProperty("--layer-index");
|
|
1758
1949
|
},
|
|
1759
1950
|
removeBranch(node) {
|
|
1760
|
-
const
|
|
1761
|
-
if (
|
|
1951
|
+
const index2 = this.branches.indexOf(node);
|
|
1952
|
+
if (index2 >= 0) this.branches.splice(index2, 1);
|
|
1762
1953
|
},
|
|
1763
1954
|
indexOf(node) {
|
|
1764
1955
|
return this.layers.findIndex((layer) => layer.node === node);
|
|
@@ -3907,17 +4098,18 @@ const spinnerRecipe = cva({
|
|
|
3907
4098
|
}
|
|
3908
4099
|
});
|
|
3909
4100
|
const Spinner = forwardRef((props, ref) => {
|
|
3910
|
-
const {
|
|
4101
|
+
const { color, ...rest } = props;
|
|
3911
4102
|
const StyledSpinner = styled(ark.div, spinnerRecipe);
|
|
3912
4103
|
return /* @__PURE__ */ jsx(
|
|
3913
4104
|
StyledSpinner,
|
|
3914
4105
|
{
|
|
3915
4106
|
ref,
|
|
3916
4107
|
...rest,
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
4108
|
+
css: {
|
|
4109
|
+
borderColor: "inherit",
|
|
4110
|
+
borderBottomColor: "transparent",
|
|
4111
|
+
borderLeftColor: "transparent"
|
|
4112
|
+
}
|
|
3921
4113
|
}
|
|
3922
4114
|
);
|
|
3923
4115
|
});
|
|
@@ -4370,32 +4562,41 @@ const buttonRecipe = cva({
|
|
|
4370
4562
|
}
|
|
4371
4563
|
]
|
|
4372
4564
|
});
|
|
4373
|
-
const Button =
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4565
|
+
const Button = ({ loading, disabled, loadingText, children, color, variant, size, radius, ...rest }) => {
|
|
4566
|
+
const StyledButton = styled(ark.button, buttonRecipe);
|
|
4567
|
+
return /* @__PURE__ */ jsx(
|
|
4568
|
+
StyledButton,
|
|
4569
|
+
{
|
|
4570
|
+
disabled,
|
|
4571
|
+
color,
|
|
4572
|
+
variant,
|
|
4573
|
+
size,
|
|
4574
|
+
radius,
|
|
4575
|
+
css: { pointerEvents: loading ? "none" : "auto" },
|
|
4576
|
+
...rest,
|
|
4577
|
+
children: loading ? loadingText || /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4578
|
+
/* @__PURE__ */ jsx(
|
|
4579
|
+
Center2,
|
|
4580
|
+
{
|
|
4581
|
+
inline: true,
|
|
4582
|
+
css: {
|
|
4583
|
+
position: "absolute",
|
|
4584
|
+
transform: "translate(-50%, -50%)",
|
|
4585
|
+
top: "50%",
|
|
4586
|
+
insetStart: "50%"
|
|
4587
|
+
},
|
|
4588
|
+
children: /* @__PURE__ */ jsx(Spinner, { size: size === "xs" || size === "sm" ? "sm" : "md" })
|
|
4589
|
+
}
|
|
4590
|
+
),
|
|
4591
|
+
/* @__PURE__ */ jsx(Box2, { as: "span", css: { opacity: 0 }, children })
|
|
4592
|
+
] }) : children
|
|
4593
|
+
}
|
|
4594
|
+
);
|
|
4595
|
+
};
|
|
4596
|
+
const index$1 = withPolymorphicComponent(Button);
|
|
4396
4597
|
const textRecipe = cva({
|
|
4397
4598
|
base: {
|
|
4398
|
-
color: "
|
|
4599
|
+
color: "currentcolor"
|
|
4399
4600
|
},
|
|
4400
4601
|
defaultVariants: {
|
|
4401
4602
|
variant: "body.md"
|
|
@@ -4411,40 +4612,52 @@ const textRecipe = cva({
|
|
|
4411
4612
|
},
|
|
4412
4613
|
variant: {
|
|
4413
4614
|
"display.lg": {
|
|
4414
|
-
textStyle: "display.lg"
|
|
4615
|
+
textStyle: "display.lg",
|
|
4616
|
+
fontFamily: "inter"
|
|
4415
4617
|
},
|
|
4416
4618
|
"display.md": {
|
|
4417
|
-
textStyle: "display.md"
|
|
4619
|
+
textStyle: "display.md",
|
|
4620
|
+
fontFamily: "inter"
|
|
4418
4621
|
},
|
|
4419
4622
|
"headline.md": {
|
|
4420
|
-
textStyle: "headline.md"
|
|
4623
|
+
textStyle: "headline.md",
|
|
4624
|
+
fontFamily: "inter"
|
|
4421
4625
|
},
|
|
4422
4626
|
"headline.sm": {
|
|
4423
|
-
textStyle: "headline.sm"
|
|
4627
|
+
textStyle: "headline.sm",
|
|
4628
|
+
fontFamily: "inter"
|
|
4424
4629
|
},
|
|
4425
4630
|
"title.lg": {
|
|
4426
|
-
textStyle: "title.lg"
|
|
4631
|
+
textStyle: "title.lg",
|
|
4632
|
+
fontFamily: "notoSans"
|
|
4427
4633
|
},
|
|
4428
4634
|
"title.md": {
|
|
4429
|
-
textStyle: "title.md"
|
|
4635
|
+
textStyle: "title.md",
|
|
4636
|
+
fontFamily: "notoSans"
|
|
4430
4637
|
},
|
|
4431
4638
|
"title.sm": {
|
|
4432
|
-
textStyle: "title.sm"
|
|
4639
|
+
textStyle: "title.sm",
|
|
4640
|
+
fontFamily: "notoSans"
|
|
4433
4641
|
},
|
|
4434
4642
|
"body.lg": {
|
|
4435
|
-
textStyle: "body.lg"
|
|
4643
|
+
textStyle: "body.lg",
|
|
4644
|
+
fontFamily: "notoSans"
|
|
4436
4645
|
},
|
|
4437
4646
|
"body.md": {
|
|
4438
|
-
textStyle: "body.md"
|
|
4647
|
+
textStyle: "body.md",
|
|
4648
|
+
fontFamily: "notoSans"
|
|
4439
4649
|
},
|
|
4440
4650
|
"body.sm": {
|
|
4441
|
-
textStyle: "body.sm"
|
|
4651
|
+
textStyle: "body.sm",
|
|
4652
|
+
fontFamily: "notoSans"
|
|
4442
4653
|
},
|
|
4443
4654
|
"label.sm": {
|
|
4444
|
-
textStyle: "label.sm"
|
|
4655
|
+
textStyle: "label.sm",
|
|
4656
|
+
fontFamily: "notoSans"
|
|
4445
4657
|
},
|
|
4446
4658
|
"label.md": {
|
|
4447
|
-
textStyle: "label.md"
|
|
4659
|
+
textStyle: "label.md",
|
|
4660
|
+
fontFamily: "notoSans"
|
|
4448
4661
|
}
|
|
4449
4662
|
}
|
|
4450
4663
|
}
|
|
@@ -4460,7 +4673,7 @@ const Text = forwardRef((props, ref) => {
|
|
|
4460
4673
|
label: styled("span", textRecipe)
|
|
4461
4674
|
};
|
|
4462
4675
|
const TextComponent = componentMap[textType];
|
|
4463
|
-
return /* @__PURE__ */ jsx(TextComponent, { ref, textStyle: variant, font, ...rest, children });
|
|
4676
|
+
return /* @__PURE__ */ jsx(TextComponent, { ref, css: { textStyle: variant, fontFamily: font }, ...rest, children });
|
|
4464
4677
|
});
|
|
4465
4678
|
Text.displayName = "Text";
|
|
4466
4679
|
const shouldForwardProp = (prop, variantKeys, options = {}) => {
|
|
@@ -4801,17 +5014,30 @@ const IconButton = forwardRef(
|
|
|
4801
5014
|
color,
|
|
4802
5015
|
variant,
|
|
4803
5016
|
size,
|
|
4804
|
-
pointerEvents: loading ? "none" : "auto",
|
|
5017
|
+
css: { pointerEvents: loading ? "none" : "auto" },
|
|
4805
5018
|
...rest,
|
|
4806
5019
|
children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4807
|
-
/* @__PURE__ */ jsx(
|
|
4808
|
-
|
|
5020
|
+
/* @__PURE__ */ jsx(
|
|
5021
|
+
Center$1,
|
|
5022
|
+
{
|
|
5023
|
+
inline: true,
|
|
5024
|
+
css: {
|
|
5025
|
+
position: "absolute",
|
|
5026
|
+
transform: "translate(-50%, -50%)",
|
|
5027
|
+
top: "50%",
|
|
5028
|
+
insetStart: "50%"
|
|
5029
|
+
},
|
|
5030
|
+
children: /* @__PURE__ */ jsx(Spinner, { size: size === "lg" ? "md" : "sm" })
|
|
5031
|
+
}
|
|
5032
|
+
),
|
|
5033
|
+
/* @__PURE__ */ jsx(styled.span, { css: { opacity: 0 }, children })
|
|
4809
5034
|
] }) : children
|
|
4810
5035
|
}
|
|
4811
5036
|
);
|
|
4812
5037
|
}
|
|
4813
5038
|
);
|
|
4814
5039
|
IconButton.displayName = "IconButton";
|
|
5040
|
+
const index = withPolymorphicComponent(IconButton);
|
|
4815
5041
|
var updateQueue = makeQueue();
|
|
4816
5042
|
var raf = (fn) => schedule(fn, updateQueue);
|
|
4817
5043
|
var writeQueue = makeQueue();
|
|
@@ -5132,8 +5358,8 @@ function advance(dt) {
|
|
|
5132
5358
|
return currentFrame.length > 0;
|
|
5133
5359
|
}
|
|
5134
5360
|
function findIndex(arr, test) {
|
|
5135
|
-
const
|
|
5136
|
-
return
|
|
5361
|
+
const index2 = arr.findIndex(test);
|
|
5362
|
+
return index2 < 0 ? arr.length : index2;
|
|
5137
5363
|
}
|
|
5138
5364
|
var colors2 = {
|
|
5139
5365
|
transparent: 0,
|
|
@@ -7583,8 +7809,8 @@ var SpringRef = () => {
|
|
|
7583
7809
|
each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i)));
|
|
7584
7810
|
return this;
|
|
7585
7811
|
};
|
|
7586
|
-
const _getProps = function(arg, ctrl,
|
|
7587
|
-
return is.fun(arg) ? arg(
|
|
7812
|
+
const _getProps = function(arg, ctrl, index2) {
|
|
7813
|
+
return is.fun(arg) ? arg(index2, ctrl) : arg;
|
|
7588
7814
|
};
|
|
7589
7815
|
SpringRef2._getProps = _getProps;
|
|
7590
7816
|
return SpringRef2;
|
|
@@ -8334,22 +8560,25 @@ const BottomSheetFrame = forwardRef(
|
|
|
8334
8560
|
animated.section,
|
|
8335
8561
|
{
|
|
8336
8562
|
ref,
|
|
8337
|
-
className: cx(
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8563
|
+
className: cx(
|
|
8564
|
+
css$1({
|
|
8565
|
+
position: "fixed",
|
|
8566
|
+
touchAction: "pan-y",
|
|
8567
|
+
display: "flex",
|
|
8568
|
+
flexDirection: "column",
|
|
8569
|
+
width: "100%",
|
|
8570
|
+
pointerEvents: "auto",
|
|
8571
|
+
// 제스처 이벤트 허용
|
|
8572
|
+
overflow: "hidden",
|
|
8573
|
+
borderRadius: "40px 40px 0 0",
|
|
8574
|
+
height: "100%",
|
|
8575
|
+
zIndex: 999,
|
|
8576
|
+
backgroundColor: "#ffffff",
|
|
8577
|
+
shadow: "0 -15px 15px 0px rgba(0, 0, 0, 0.05)",
|
|
8578
|
+
willChange: "auto"
|
|
8579
|
+
}),
|
|
8580
|
+
className
|
|
8581
|
+
),
|
|
8353
8582
|
style: {
|
|
8354
8583
|
bottom: `calc(${initialOpenHeightPx}px - 100dvh)`,
|
|
8355
8584
|
transform: springs.transform
|
|
@@ -8359,42 +8588,70 @@ const BottomSheetFrame = forwardRef(
|
|
|
8359
8588
|
);
|
|
8360
8589
|
}
|
|
8361
8590
|
);
|
|
8362
|
-
const Backdrop = forwardRef(
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
animated.div,
|
|
8374
|
-
{
|
|
8375
|
-
className: css$1({
|
|
8376
|
-
zIndex: 99,
|
|
8377
|
-
position: "fixed",
|
|
8378
|
-
top: 0,
|
|
8379
|
-
width: "100%",
|
|
8380
|
-
height: "100dvh",
|
|
8381
|
-
willChange: "opacity",
|
|
8382
|
-
overflow: "hidden",
|
|
8383
|
-
touchAction: "none"
|
|
8591
|
+
const Backdrop = forwardRef(
|
|
8592
|
+
({ onBackdropClick, isBackdropOpen, opacity: bgOpacity }, ref) => {
|
|
8593
|
+
const [springs] = useSpring(
|
|
8594
|
+
() => ({
|
|
8595
|
+
from: { opacity: 0 },
|
|
8596
|
+
to: { opacity: isBackdropOpen ? 1 : 0 },
|
|
8597
|
+
config: {
|
|
8598
|
+
tension: 200,
|
|
8599
|
+
friction: 25,
|
|
8600
|
+
mass: 0.8
|
|
8601
|
+
}
|
|
8384
8602
|
}),
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8603
|
+
[isBackdropOpen]
|
|
8604
|
+
);
|
|
8605
|
+
return /* @__PURE__ */ jsx(
|
|
8606
|
+
animated.div,
|
|
8607
|
+
{
|
|
8608
|
+
className: css$1({
|
|
8609
|
+
zIndex: 99,
|
|
8610
|
+
position: "fixed",
|
|
8611
|
+
top: 0,
|
|
8612
|
+
width: "100%",
|
|
8613
|
+
height: "100dvh",
|
|
8614
|
+
willChange: "opacity",
|
|
8615
|
+
overflow: "hidden",
|
|
8616
|
+
touchAction: "none"
|
|
8617
|
+
}),
|
|
8618
|
+
style: {
|
|
8619
|
+
backgroundColor: springs.opacity.to((o) => `rgba(0, 0, 0, ${o * bgOpacity})`),
|
|
8620
|
+
opacity: springs.opacity,
|
|
8621
|
+
visibility: isBackdropOpen ? "visible" : "hidden"
|
|
8622
|
+
},
|
|
8623
|
+
onClick: () => onBackdropClick(),
|
|
8624
|
+
ref
|
|
8625
|
+
}
|
|
8626
|
+
);
|
|
8627
|
+
}
|
|
8628
|
+
);
|
|
8629
|
+
const BottomSheetHandle = () => /* @__PURE__ */ jsx(
|
|
8630
|
+
"div",
|
|
8631
|
+
{
|
|
8632
|
+
className: css$1({
|
|
8633
|
+
margin: "22px auto",
|
|
8634
|
+
height: 1.5,
|
|
8635
|
+
minHeight: 1.5,
|
|
8636
|
+
width: "45px",
|
|
8637
|
+
borderRadius: 999,
|
|
8638
|
+
background: "#bebebe"
|
|
8639
|
+
})
|
|
8640
|
+
}
|
|
8641
|
+
);
|
|
8396
8642
|
const BottomSheet = (props) => {
|
|
8397
|
-
const {
|
|
8643
|
+
const {
|
|
8644
|
+
isOpen = true,
|
|
8645
|
+
onClose,
|
|
8646
|
+
onOpen,
|
|
8647
|
+
children,
|
|
8648
|
+
className = "",
|
|
8649
|
+
snapPercent,
|
|
8650
|
+
bgBlocking = true,
|
|
8651
|
+
backdropOpacity = DEFAULT_BACKDROP_OPACITY,
|
|
8652
|
+
hideHandle = false,
|
|
8653
|
+
expendOnContentDrag = false
|
|
8654
|
+
} = props;
|
|
8398
8655
|
const { bottomSheetRef, contentRef, snapToMin, springs } = useBottomSheet({
|
|
8399
8656
|
isOpen,
|
|
8400
8657
|
onOpen,
|
|
@@ -8608,18 +8865,18 @@ const tagRecipe = cva({
|
|
|
8608
8865
|
avatar: false
|
|
8609
8866
|
}
|
|
8610
8867
|
});
|
|
8611
|
-
function
|
|
8868
|
+
function P({ size: C = 24, color: n = "currentColor", ...o }) {
|
|
8612
8869
|
return /* @__PURE__ */ jsx(
|
|
8613
8870
|
"svg",
|
|
8614
8871
|
{
|
|
8615
|
-
width:
|
|
8616
|
-
height:
|
|
8872
|
+
width: C,
|
|
8873
|
+
height: C,
|
|
8617
8874
|
viewBox: "0 0 24 24",
|
|
8618
8875
|
fill: "none",
|
|
8619
8876
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8620
8877
|
strokeWidth: "0",
|
|
8621
|
-
color,
|
|
8622
|
-
...
|
|
8878
|
+
color: n,
|
|
8879
|
+
...o,
|
|
8623
8880
|
children: /* @__PURE__ */ jsx(
|
|
8624
8881
|
"path",
|
|
8625
8882
|
{
|
|
@@ -8633,14 +8890,28 @@ function CloseOutlineIcon({ size = 24, color = "currentColor", ...props }) {
|
|
|
8633
8890
|
}
|
|
8634
8891
|
);
|
|
8635
8892
|
}
|
|
8636
|
-
const Tag = forwardRef(
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8893
|
+
const Tag = forwardRef(
|
|
8894
|
+
({ color, background, radius, imageSrc, text, onDeleteClick, ...rest }, ref) => {
|
|
8895
|
+
const StyledTag = styled(ark.div, tagRecipe);
|
|
8896
|
+
return /* @__PURE__ */ jsxs(StyledTag, { color, background, radius, avatar: !!imageSrc, ref, ...rest, children: [
|
|
8897
|
+
imageSrc && /* @__PURE__ */ jsx(
|
|
8898
|
+
styled.img,
|
|
8899
|
+
{
|
|
8900
|
+
src: imageSrc,
|
|
8901
|
+
css: {
|
|
8902
|
+
width: "8",
|
|
8903
|
+
height: "8",
|
|
8904
|
+
borderRadius: "full",
|
|
8905
|
+
overflow: "hidden"
|
|
8906
|
+
},
|
|
8907
|
+
alt: "avatar thumbnail"
|
|
8908
|
+
}
|
|
8909
|
+
),
|
|
8910
|
+
text,
|
|
8911
|
+
onDeleteClick ? /* @__PURE__ */ jsx(P, { size: 12, onClick: onDeleteClick, cursor: "pointer" }) : null
|
|
8912
|
+
] });
|
|
8913
|
+
}
|
|
8914
|
+
);
|
|
8644
8915
|
Tag.displayName = "Tag";
|
|
8645
8916
|
function definePreset(preset2) {
|
|
8646
8917
|
return preset2;
|
|
@@ -8944,14 +9215,22 @@ const preset = definePreset({
|
|
|
8944
9215
|
});
|
|
8945
9216
|
export {
|
|
8946
9217
|
BottomSheet,
|
|
8947
|
-
|
|
9218
|
+
Box2 as Box,
|
|
9219
|
+
index$1 as Button,
|
|
9220
|
+
Center2 as Center,
|
|
8948
9221
|
Dialog,
|
|
8949
|
-
|
|
9222
|
+
Flex2 as Flex,
|
|
9223
|
+
Grid2 as Grid,
|
|
9224
|
+
GridItem2 as GridItem,
|
|
9225
|
+
HStack2 as HStack,
|
|
9226
|
+
index as IconButton,
|
|
8950
9227
|
Navigation,
|
|
8951
9228
|
Portal,
|
|
8952
9229
|
Spinner,
|
|
9230
|
+
Stack2 as Stack,
|
|
8953
9231
|
Tag,
|
|
8954
9232
|
Text,
|
|
9233
|
+
VStack2 as VStack,
|
|
8955
9234
|
preset
|
|
8956
9235
|
};
|
|
8957
9236
|
//# sourceMappingURL=index.js.map
|