@nation-a/ui 0.7.1 → 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 +385 -118
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +385 -118
- 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/index.d.ts +2 -1
- package/dist/types/utils/with-polymorphic-component.d.ts +18 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,16 @@ function _interopNamespaceDefault(e) {
|
|
|
20
20
|
return Object.freeze(n);
|
|
21
21
|
}
|
|
22
22
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
23
|
+
function withPolymorphicComponent(Component) {
|
|
24
|
+
const PolymorphicComponent = React__namespace.forwardRef(
|
|
25
|
+
(props, ref) => {
|
|
26
|
+
const { as, ...restProps } = props;
|
|
27
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, { as, ref, ...restProps });
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
PolymorphicComponent.displayName = `withPolymorphic(${Component.displayName || "Component"})`;
|
|
31
|
+
return PolymorphicComponent;
|
|
32
|
+
}
|
|
23
33
|
function isObject$1(value) {
|
|
24
34
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
25
35
|
}
|
|
@@ -121,8 +131,8 @@ function mapObject(obj, fn) {
|
|
|
121
131
|
}
|
|
122
132
|
function toResponsiveObject(values, breakpoints2) {
|
|
123
133
|
return values.reduce(
|
|
124
|
-
(acc, current,
|
|
125
|
-
const key = breakpoints2[
|
|
134
|
+
(acc, current, index2) => {
|
|
135
|
+
const key = breakpoints2[index2];
|
|
126
136
|
if (current != null) {
|
|
127
137
|
acc[key] = current;
|
|
128
138
|
}
|
|
@@ -458,15 +468,15 @@ function sva(config2) {
|
|
|
458
468
|
getVariantProps
|
|
459
469
|
});
|
|
460
470
|
}
|
|
461
|
-
var userGeneratedStr = "css
|
|
471
|
+
var userGeneratedStr = "css";
|
|
462
472
|
var userGenerated = userGeneratedStr.split(",");
|
|
463
|
-
var cssPropertiesStr = "
|
|
473
|
+
var cssPropertiesStr = "";
|
|
464
474
|
var allCssProperties = cssPropertiesStr.split(",").concat(userGenerated);
|
|
465
475
|
var properties = new Map(allCssProperties.map((prop) => [prop, true]));
|
|
466
476
|
var cssPropertySelectorRegex = /&|@/;
|
|
467
|
-
var isCssProperty =
|
|
477
|
+
var isCssProperty = (prop) => {
|
|
468
478
|
return properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop);
|
|
469
|
-
}
|
|
479
|
+
};
|
|
470
480
|
const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(prop) && !isCssProperty(prop);
|
|
471
481
|
const composeShouldForwardProps = (tag, shouldForwardProp2) => tag.__shouldForwardProps__ && shouldForwardProp2 ? (propName) => tag.__shouldForwardProps__(propName) && shouldForwardProp2(propName) : shouldForwardProp2;
|
|
472
482
|
const composeCvaFn = (cvaA, cvaB) => {
|
|
@@ -541,6 +551,124 @@ function createJsxFactory() {
|
|
|
541
551
|
});
|
|
542
552
|
}
|
|
543
553
|
const styled = /* @__PURE__ */ createJsxFactory();
|
|
554
|
+
const boxConfig = {
|
|
555
|
+
transform(props) {
|
|
556
|
+
return props;
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
const getBoxStyle = (styles = {}) => {
|
|
560
|
+
const _styles = getPatternStyles(boxConfig, styles);
|
|
561
|
+
return boxConfig.transform(_styles, patternFns);
|
|
562
|
+
};
|
|
563
|
+
const Box$1 = /* @__PURE__ */ React.forwardRef(function Box(props, ref) {
|
|
564
|
+
const [patternProps, restProps] = splitProps(props, []);
|
|
565
|
+
const styleProps = getBoxStyle(patternProps);
|
|
566
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
567
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
568
|
+
return React.createElement(styled.div, mergedProps);
|
|
569
|
+
});
|
|
570
|
+
const flexConfig = {
|
|
571
|
+
transform(props) {
|
|
572
|
+
const { direction, align, justify, wrap: wrap2, basis, grow, shrink, ...rest } = props;
|
|
573
|
+
return {
|
|
574
|
+
display: "flex",
|
|
575
|
+
flexDirection: direction,
|
|
576
|
+
alignItems: align,
|
|
577
|
+
justifyContent: justify,
|
|
578
|
+
flexWrap: wrap2,
|
|
579
|
+
flexBasis: basis,
|
|
580
|
+
flexGrow: grow,
|
|
581
|
+
flexShrink: shrink,
|
|
582
|
+
...rest
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
const getFlexStyle = (styles = {}) => {
|
|
587
|
+
const _styles = getPatternStyles(flexConfig, styles);
|
|
588
|
+
return flexConfig.transform(_styles, patternFns);
|
|
589
|
+
};
|
|
590
|
+
const Flex$1 = /* @__PURE__ */ React.forwardRef(function Flex(props, ref) {
|
|
591
|
+
const [patternProps, restProps] = splitProps(props, ["align", "justify", "direction", "wrap", "basis", "grow", "shrink"]);
|
|
592
|
+
const styleProps = getFlexStyle(patternProps);
|
|
593
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
594
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
595
|
+
return React.createElement(styled.div, mergedProps);
|
|
596
|
+
});
|
|
597
|
+
const stackConfig = {
|
|
598
|
+
transform(props) {
|
|
599
|
+
const { align, justify, direction, gap, ...rest } = props;
|
|
600
|
+
return {
|
|
601
|
+
display: "flex",
|
|
602
|
+
flexDirection: direction,
|
|
603
|
+
alignItems: align,
|
|
604
|
+
justifyContent: justify,
|
|
605
|
+
gap,
|
|
606
|
+
...rest
|
|
607
|
+
};
|
|
608
|
+
},
|
|
609
|
+
defaultValues: { direction: "column", gap: "10px" }
|
|
610
|
+
};
|
|
611
|
+
const getStackStyle = (styles = {}) => {
|
|
612
|
+
const _styles = getPatternStyles(stackConfig, styles);
|
|
613
|
+
return stackConfig.transform(_styles, patternFns);
|
|
614
|
+
};
|
|
615
|
+
const Stack$1 = /* @__PURE__ */ React.forwardRef(function Stack(props, ref) {
|
|
616
|
+
const [patternProps, restProps] = splitProps(props, ["align", "justify", "direction", "gap"]);
|
|
617
|
+
const styleProps = getStackStyle(patternProps);
|
|
618
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
619
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
620
|
+
return React.createElement(styled.div, mergedProps);
|
|
621
|
+
});
|
|
622
|
+
const vstackConfig = {
|
|
623
|
+
transform(props) {
|
|
624
|
+
const { justify, gap, ...rest } = props;
|
|
625
|
+
return {
|
|
626
|
+
display: "flex",
|
|
627
|
+
alignItems: "center",
|
|
628
|
+
justifyContent: justify,
|
|
629
|
+
gap,
|
|
630
|
+
flexDirection: "column",
|
|
631
|
+
...rest
|
|
632
|
+
};
|
|
633
|
+
},
|
|
634
|
+
defaultValues: { gap: "10px" }
|
|
635
|
+
};
|
|
636
|
+
const getVstackStyle = (styles = {}) => {
|
|
637
|
+
const _styles = getPatternStyles(vstackConfig, styles);
|
|
638
|
+
return vstackConfig.transform(_styles, patternFns);
|
|
639
|
+
};
|
|
640
|
+
const VStack$1 = /* @__PURE__ */ React.forwardRef(function VStack(props, ref) {
|
|
641
|
+
const [patternProps, restProps] = splitProps(props, ["justify", "gap"]);
|
|
642
|
+
const styleProps = getVstackStyle(patternProps);
|
|
643
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
644
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
645
|
+
return React.createElement(styled.div, mergedProps);
|
|
646
|
+
});
|
|
647
|
+
const hstackConfig = {
|
|
648
|
+
transform(props) {
|
|
649
|
+
const { justify, gap, ...rest } = props;
|
|
650
|
+
return {
|
|
651
|
+
display: "flex",
|
|
652
|
+
alignItems: "center",
|
|
653
|
+
justifyContent: justify,
|
|
654
|
+
gap,
|
|
655
|
+
flexDirection: "row",
|
|
656
|
+
...rest
|
|
657
|
+
};
|
|
658
|
+
},
|
|
659
|
+
defaultValues: { gap: "10px" }
|
|
660
|
+
};
|
|
661
|
+
const getHstackStyle = (styles = {}) => {
|
|
662
|
+
const _styles = getPatternStyles(hstackConfig, styles);
|
|
663
|
+
return hstackConfig.transform(_styles, patternFns);
|
|
664
|
+
};
|
|
665
|
+
const HStack$1 = /* @__PURE__ */ React.forwardRef(function HStack(props, ref) {
|
|
666
|
+
const [patternProps, restProps] = splitProps(props, ["justify", "gap"]);
|
|
667
|
+
const styleProps = getHstackStyle(patternProps);
|
|
668
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
669
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
670
|
+
return React.createElement(styled.div, mergedProps);
|
|
671
|
+
});
|
|
544
672
|
const centerConfig = {
|
|
545
673
|
transform(props) {
|
|
546
674
|
const { inline, ...rest } = props;
|
|
@@ -556,12 +684,75 @@ const getCenterStyle = (styles = {}) => {
|
|
|
556
684
|
const _styles = getPatternStyles(centerConfig, styles);
|
|
557
685
|
return centerConfig.transform(_styles, patternFns);
|
|
558
686
|
};
|
|
559
|
-
const Center = /* @__PURE__ */ React.forwardRef(function
|
|
687
|
+
const Center$1 = /* @__PURE__ */ React.forwardRef(function Center(props, ref) {
|
|
560
688
|
const [patternProps, restProps] = splitProps(props, ["inline"]);
|
|
561
689
|
const styleProps = getCenterStyle(patternProps);
|
|
562
|
-
const
|
|
690
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
691
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
563
692
|
return React.createElement(styled.div, mergedProps);
|
|
564
693
|
});
|
|
694
|
+
const gridConfig = {
|
|
695
|
+
transform(props, { map, isCssUnit: isCssUnit2 }) {
|
|
696
|
+
const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
|
|
697
|
+
const getValue = (v2) => isCssUnit2(v2) ? v2 : `token(sizes.${v2}, ${v2})`;
|
|
698
|
+
return {
|
|
699
|
+
display: "grid",
|
|
700
|
+
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,
|
|
701
|
+
gap,
|
|
702
|
+
columnGap,
|
|
703
|
+
rowGap,
|
|
704
|
+
...rest
|
|
705
|
+
};
|
|
706
|
+
},
|
|
707
|
+
defaultValues(props) {
|
|
708
|
+
return { gap: props.columnGap || props.rowGap ? void 0 : "10px" };
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
const getGridStyle = (styles = {}) => {
|
|
712
|
+
const _styles = getPatternStyles(gridConfig, styles);
|
|
713
|
+
return gridConfig.transform(_styles, patternFns);
|
|
714
|
+
};
|
|
715
|
+
const Grid$1 = /* @__PURE__ */ React.forwardRef(function Grid(props, ref) {
|
|
716
|
+
const [patternProps, restProps] = splitProps(props, ["gap", "columnGap", "rowGap", "columns", "minChildWidth"]);
|
|
717
|
+
const styleProps = getGridStyle(patternProps);
|
|
718
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
719
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
720
|
+
return React.createElement(styled.div, mergedProps);
|
|
721
|
+
});
|
|
722
|
+
const gridItemConfig = {
|
|
723
|
+
transform(props, { map }) {
|
|
724
|
+
const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props;
|
|
725
|
+
const spanFn = (v2) => v2 === "auto" ? v2 : `span ${v2}`;
|
|
726
|
+
return {
|
|
727
|
+
gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
|
|
728
|
+
gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
|
|
729
|
+
gridColumnStart: colStart,
|
|
730
|
+
gridColumnEnd: colEnd,
|
|
731
|
+
gridRowStart: rowStart,
|
|
732
|
+
gridRowEnd: rowEnd,
|
|
733
|
+
...rest
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
const getGridItemStyle = (styles = {}) => {
|
|
738
|
+
const _styles = getPatternStyles(gridItemConfig, styles);
|
|
739
|
+
return gridItemConfig.transform(_styles, patternFns);
|
|
740
|
+
};
|
|
741
|
+
const GridItem$1 = /* @__PURE__ */ React.forwardRef(function GridItem(props, ref) {
|
|
742
|
+
const [patternProps, restProps] = splitProps(props, ["colSpan", "rowSpan", "colStart", "rowStart", "colEnd", "rowEnd"]);
|
|
743
|
+
const styleProps = getGridItemStyle(patternProps);
|
|
744
|
+
const cssProps = { css: mergeCss(styleProps, props.css) };
|
|
745
|
+
const mergedProps = { ref, ...restProps, ...cssProps };
|
|
746
|
+
return React.createElement(styled.div, mergedProps);
|
|
747
|
+
});
|
|
748
|
+
const Box2 = withPolymorphicComponent(Box$1);
|
|
749
|
+
const Flex2 = withPolymorphicComponent(Flex$1);
|
|
750
|
+
const Grid2 = withPolymorphicComponent(Grid$1);
|
|
751
|
+
const Stack2 = withPolymorphicComponent(Stack$1);
|
|
752
|
+
const VStack2 = withPolymorphicComponent(VStack$1);
|
|
753
|
+
const HStack2 = withPolymorphicComponent(HStack$1);
|
|
754
|
+
const GridItem2 = withPolymorphicComponent(GridItem$1);
|
|
755
|
+
const Center2 = withPolymorphicComponent(Center$1);
|
|
565
756
|
function getErrorMessage(hook, provider) {
|
|
566
757
|
return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
|
|
567
758
|
}
|
|
@@ -1740,9 +1931,9 @@ var layerStack = {
|
|
|
1740
1931
|
},
|
|
1741
1932
|
isBelowPointerBlockingLayer(node) {
|
|
1742
1933
|
var _a;
|
|
1743
|
-
const
|
|
1934
|
+
const index2 = this.indexOf(node);
|
|
1744
1935
|
const highestBlockingIndex = this.topMostPointerBlockingLayer() ? this.indexOf((_a = this.topMostPointerBlockingLayer()) == null ? void 0 : _a.node) : -1;
|
|
1745
|
-
return
|
|
1936
|
+
return index2 < highestBlockingIndex;
|
|
1746
1937
|
},
|
|
1747
1938
|
isTopMost(node) {
|
|
1748
1939
|
const layer = this.layers[this.count() - 1];
|
|
@@ -1765,18 +1956,18 @@ var layerStack = {
|
|
|
1765
1956
|
this.branches.push(node);
|
|
1766
1957
|
},
|
|
1767
1958
|
remove(node) {
|
|
1768
|
-
const
|
|
1769
|
-
if (
|
|
1770
|
-
if (
|
|
1959
|
+
const index2 = this.indexOf(node);
|
|
1960
|
+
if (index2 < 0) return;
|
|
1961
|
+
if (index2 < this.count() - 1) {
|
|
1771
1962
|
const _layers = this.getNestedLayers(node);
|
|
1772
1963
|
_layers.forEach((layer) => layer.dismiss());
|
|
1773
1964
|
}
|
|
1774
|
-
this.layers.splice(
|
|
1965
|
+
this.layers.splice(index2, 1);
|
|
1775
1966
|
node.style.removeProperty("--layer-index");
|
|
1776
1967
|
},
|
|
1777
1968
|
removeBranch(node) {
|
|
1778
|
-
const
|
|
1779
|
-
if (
|
|
1969
|
+
const index2 = this.branches.indexOf(node);
|
|
1970
|
+
if (index2 >= 0) this.branches.splice(index2, 1);
|
|
1780
1971
|
},
|
|
1781
1972
|
indexOf(node) {
|
|
1782
1973
|
return this.layers.findIndex((layer) => layer.node === node);
|
|
@@ -3925,17 +4116,18 @@ const spinnerRecipe = cva({
|
|
|
3925
4116
|
}
|
|
3926
4117
|
});
|
|
3927
4118
|
const Spinner = React.forwardRef((props, ref) => {
|
|
3928
|
-
const {
|
|
4119
|
+
const { color, ...rest } = props;
|
|
3929
4120
|
const StyledSpinner = styled(ark.div, spinnerRecipe);
|
|
3930
4121
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3931
4122
|
StyledSpinner,
|
|
3932
4123
|
{
|
|
3933
4124
|
ref,
|
|
3934
4125
|
...rest,
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
4126
|
+
css: {
|
|
4127
|
+
borderColor: "inherit",
|
|
4128
|
+
borderBottomColor: "transparent",
|
|
4129
|
+
borderLeftColor: "transparent"
|
|
4130
|
+
}
|
|
3939
4131
|
}
|
|
3940
4132
|
);
|
|
3941
4133
|
});
|
|
@@ -4388,32 +4580,41 @@ const buttonRecipe = cva({
|
|
|
4388
4580
|
}
|
|
4389
4581
|
]
|
|
4390
4582
|
});
|
|
4391
|
-
const Button =
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4583
|
+
const Button = ({ loading, disabled, loadingText, children, color, variant, size, radius, ...rest }) => {
|
|
4584
|
+
const StyledButton = styled(ark.button, buttonRecipe);
|
|
4585
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4586
|
+
StyledButton,
|
|
4587
|
+
{
|
|
4588
|
+
disabled,
|
|
4589
|
+
color,
|
|
4590
|
+
variant,
|
|
4591
|
+
size,
|
|
4592
|
+
radius,
|
|
4593
|
+
css: { pointerEvents: loading ? "none" : "auto" },
|
|
4594
|
+
...rest,
|
|
4595
|
+
children: loading ? loadingText || /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4596
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4597
|
+
Center2,
|
|
4598
|
+
{
|
|
4599
|
+
inline: true,
|
|
4600
|
+
css: {
|
|
4601
|
+
position: "absolute",
|
|
4602
|
+
transform: "translate(-50%, -50%)",
|
|
4603
|
+
top: "50%",
|
|
4604
|
+
insetStart: "50%"
|
|
4605
|
+
},
|
|
4606
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: size === "xs" || size === "sm" ? "sm" : "md" })
|
|
4607
|
+
}
|
|
4608
|
+
),
|
|
4609
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box2, { as: "span", css: { opacity: 0 }, children })
|
|
4610
|
+
] }) : children
|
|
4611
|
+
}
|
|
4612
|
+
);
|
|
4613
|
+
};
|
|
4614
|
+
const index$1 = withPolymorphicComponent(Button);
|
|
4414
4615
|
const textRecipe = cva({
|
|
4415
4616
|
base: {
|
|
4416
|
-
color: "
|
|
4617
|
+
color: "currentcolor"
|
|
4417
4618
|
},
|
|
4418
4619
|
defaultVariants: {
|
|
4419
4620
|
variant: "body.md"
|
|
@@ -4490,7 +4691,7 @@ const Text = React.forwardRef((props, ref) => {
|
|
|
4490
4691
|
label: styled("span", textRecipe)
|
|
4491
4692
|
};
|
|
4492
4693
|
const TextComponent = componentMap[textType];
|
|
4493
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TextComponent, { ref, textStyle: variant, font, ...rest, children });
|
|
4694
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextComponent, { ref, css: { textStyle: variant, fontFamily: font }, ...rest, children });
|
|
4494
4695
|
});
|
|
4495
4696
|
Text.displayName = "Text";
|
|
4496
4697
|
const shouldForwardProp = (prop, variantKeys, options = {}) => {
|
|
@@ -4831,17 +5032,30 @@ const IconButton = React.forwardRef(
|
|
|
4831
5032
|
color,
|
|
4832
5033
|
variant,
|
|
4833
5034
|
size,
|
|
4834
|
-
pointerEvents: loading ? "none" : "auto",
|
|
5035
|
+
css: { pointerEvents: loading ? "none" : "auto" },
|
|
4835
5036
|
...rest,
|
|
4836
5037
|
children: loading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4837
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4838
|
-
|
|
5038
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5039
|
+
Center$1,
|
|
5040
|
+
{
|
|
5041
|
+
inline: true,
|
|
5042
|
+
css: {
|
|
5043
|
+
position: "absolute",
|
|
5044
|
+
transform: "translate(-50%, -50%)",
|
|
5045
|
+
top: "50%",
|
|
5046
|
+
insetStart: "50%"
|
|
5047
|
+
},
|
|
5048
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: size === "lg" ? "md" : "sm" })
|
|
5049
|
+
}
|
|
5050
|
+
),
|
|
5051
|
+
/* @__PURE__ */ jsxRuntime.jsx(styled.span, { css: { opacity: 0 }, children })
|
|
4839
5052
|
] }) : children
|
|
4840
5053
|
}
|
|
4841
5054
|
);
|
|
4842
5055
|
}
|
|
4843
5056
|
);
|
|
4844
5057
|
IconButton.displayName = "IconButton";
|
|
5058
|
+
const index = withPolymorphicComponent(IconButton);
|
|
4845
5059
|
var updateQueue = makeQueue();
|
|
4846
5060
|
var raf = (fn) => schedule(fn, updateQueue);
|
|
4847
5061
|
var writeQueue = makeQueue();
|
|
@@ -5162,8 +5376,8 @@ function advance(dt) {
|
|
|
5162
5376
|
return currentFrame.length > 0;
|
|
5163
5377
|
}
|
|
5164
5378
|
function findIndex(arr, test) {
|
|
5165
|
-
const
|
|
5166
|
-
return
|
|
5379
|
+
const index2 = arr.findIndex(test);
|
|
5380
|
+
return index2 < 0 ? arr.length : index2;
|
|
5167
5381
|
}
|
|
5168
5382
|
var colors2 = {
|
|
5169
5383
|
transparent: 0,
|
|
@@ -7613,8 +7827,8 @@ var SpringRef = () => {
|
|
|
7613
7827
|
each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i)));
|
|
7614
7828
|
return this;
|
|
7615
7829
|
};
|
|
7616
|
-
const _getProps = function(arg, ctrl,
|
|
7617
|
-
return is.fun(arg) ? arg(
|
|
7830
|
+
const _getProps = function(arg, ctrl, index2) {
|
|
7831
|
+
return is.fun(arg) ? arg(index2, ctrl) : arg;
|
|
7618
7832
|
};
|
|
7619
7833
|
SpringRef2._getProps = _getProps;
|
|
7620
7834
|
return SpringRef2;
|
|
@@ -8364,22 +8578,25 @@ const BottomSheetFrame = React.forwardRef(
|
|
|
8364
8578
|
animated.section,
|
|
8365
8579
|
{
|
|
8366
8580
|
ref,
|
|
8367
|
-
className: cx(
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8581
|
+
className: cx(
|
|
8582
|
+
css$1({
|
|
8583
|
+
position: "fixed",
|
|
8584
|
+
touchAction: "pan-y",
|
|
8585
|
+
display: "flex",
|
|
8586
|
+
flexDirection: "column",
|
|
8587
|
+
width: "100%",
|
|
8588
|
+
pointerEvents: "auto",
|
|
8589
|
+
// 제스처 이벤트 허용
|
|
8590
|
+
overflow: "hidden",
|
|
8591
|
+
borderRadius: "40px 40px 0 0",
|
|
8592
|
+
height: "100%",
|
|
8593
|
+
zIndex: 999,
|
|
8594
|
+
backgroundColor: "#ffffff",
|
|
8595
|
+
shadow: "0 -15px 15px 0px rgba(0, 0, 0, 0.05)",
|
|
8596
|
+
willChange: "auto"
|
|
8597
|
+
}),
|
|
8598
|
+
className
|
|
8599
|
+
),
|
|
8383
8600
|
style: {
|
|
8384
8601
|
bottom: `calc(${initialOpenHeightPx}px - 100dvh)`,
|
|
8385
8602
|
transform: springs.transform
|
|
@@ -8389,42 +8606,70 @@ const BottomSheetFrame = React.forwardRef(
|
|
|
8389
8606
|
);
|
|
8390
8607
|
}
|
|
8391
8608
|
);
|
|
8392
|
-
const Backdrop = React.forwardRef(
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
animated.div,
|
|
8404
|
-
{
|
|
8405
|
-
className: css$1({
|
|
8406
|
-
zIndex: 99,
|
|
8407
|
-
position: "fixed",
|
|
8408
|
-
top: 0,
|
|
8409
|
-
width: "100%",
|
|
8410
|
-
height: "100dvh",
|
|
8411
|
-
willChange: "opacity",
|
|
8412
|
-
overflow: "hidden",
|
|
8413
|
-
touchAction: "none"
|
|
8609
|
+
const Backdrop = React.forwardRef(
|
|
8610
|
+
({ onBackdropClick, isBackdropOpen, opacity: bgOpacity }, ref) => {
|
|
8611
|
+
const [springs] = useSpring(
|
|
8612
|
+
() => ({
|
|
8613
|
+
from: { opacity: 0 },
|
|
8614
|
+
to: { opacity: isBackdropOpen ? 1 : 0 },
|
|
8615
|
+
config: {
|
|
8616
|
+
tension: 200,
|
|
8617
|
+
friction: 25,
|
|
8618
|
+
mass: 0.8
|
|
8619
|
+
}
|
|
8414
8620
|
}),
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8621
|
+
[isBackdropOpen]
|
|
8622
|
+
);
|
|
8623
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8624
|
+
animated.div,
|
|
8625
|
+
{
|
|
8626
|
+
className: css$1({
|
|
8627
|
+
zIndex: 99,
|
|
8628
|
+
position: "fixed",
|
|
8629
|
+
top: 0,
|
|
8630
|
+
width: "100%",
|
|
8631
|
+
height: "100dvh",
|
|
8632
|
+
willChange: "opacity",
|
|
8633
|
+
overflow: "hidden",
|
|
8634
|
+
touchAction: "none"
|
|
8635
|
+
}),
|
|
8636
|
+
style: {
|
|
8637
|
+
backgroundColor: springs.opacity.to((o) => `rgba(0, 0, 0, ${o * bgOpacity})`),
|
|
8638
|
+
opacity: springs.opacity,
|
|
8639
|
+
visibility: isBackdropOpen ? "visible" : "hidden"
|
|
8640
|
+
},
|
|
8641
|
+
onClick: () => onBackdropClick(),
|
|
8642
|
+
ref
|
|
8643
|
+
}
|
|
8644
|
+
);
|
|
8645
|
+
}
|
|
8646
|
+
);
|
|
8647
|
+
const BottomSheetHandle = () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8648
|
+
"div",
|
|
8649
|
+
{
|
|
8650
|
+
className: css$1({
|
|
8651
|
+
margin: "22px auto",
|
|
8652
|
+
height: 1.5,
|
|
8653
|
+
minHeight: 1.5,
|
|
8654
|
+
width: "45px",
|
|
8655
|
+
borderRadius: 999,
|
|
8656
|
+
background: "#bebebe"
|
|
8657
|
+
})
|
|
8658
|
+
}
|
|
8659
|
+
);
|
|
8426
8660
|
const BottomSheet = (props) => {
|
|
8427
|
-
const {
|
|
8661
|
+
const {
|
|
8662
|
+
isOpen = true,
|
|
8663
|
+
onClose,
|
|
8664
|
+
onOpen,
|
|
8665
|
+
children,
|
|
8666
|
+
className = "",
|
|
8667
|
+
snapPercent,
|
|
8668
|
+
bgBlocking = true,
|
|
8669
|
+
backdropOpacity = DEFAULT_BACKDROP_OPACITY,
|
|
8670
|
+
hideHandle = false,
|
|
8671
|
+
expendOnContentDrag = false
|
|
8672
|
+
} = props;
|
|
8428
8673
|
const { bottomSheetRef, contentRef, snapToMin, springs } = useBottomSheet({
|
|
8429
8674
|
isOpen,
|
|
8430
8675
|
onOpen,
|
|
@@ -8638,18 +8883,18 @@ const tagRecipe = cva({
|
|
|
8638
8883
|
avatar: false
|
|
8639
8884
|
}
|
|
8640
8885
|
});
|
|
8641
|
-
function
|
|
8886
|
+
function P({ size: C = 24, color: n = "currentColor", ...o }) {
|
|
8642
8887
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8643
8888
|
"svg",
|
|
8644
8889
|
{
|
|
8645
|
-
width:
|
|
8646
|
-
height:
|
|
8890
|
+
width: C,
|
|
8891
|
+
height: C,
|
|
8647
8892
|
viewBox: "0 0 24 24",
|
|
8648
8893
|
fill: "none",
|
|
8649
8894
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8650
8895
|
strokeWidth: "0",
|
|
8651
|
-
color,
|
|
8652
|
-
...
|
|
8896
|
+
color: n,
|
|
8897
|
+
...o,
|
|
8653
8898
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8654
8899
|
"path",
|
|
8655
8900
|
{
|
|
@@ -8663,14 +8908,28 @@ function CloseOutlineIcon({ size = 24, color = "currentColor", ...props }) {
|
|
|
8663
8908
|
}
|
|
8664
8909
|
);
|
|
8665
8910
|
}
|
|
8666
|
-
const Tag = React.forwardRef(
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8911
|
+
const Tag = React.forwardRef(
|
|
8912
|
+
({ color, background, radius, imageSrc, text, onDeleteClick, ...rest }, ref) => {
|
|
8913
|
+
const StyledTag = styled(ark.div, tagRecipe);
|
|
8914
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(StyledTag, { color, background, radius, avatar: !!imageSrc, ref, ...rest, children: [
|
|
8915
|
+
imageSrc && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8916
|
+
styled.img,
|
|
8917
|
+
{
|
|
8918
|
+
src: imageSrc,
|
|
8919
|
+
css: {
|
|
8920
|
+
width: "8",
|
|
8921
|
+
height: "8",
|
|
8922
|
+
borderRadius: "full",
|
|
8923
|
+
overflow: "hidden"
|
|
8924
|
+
},
|
|
8925
|
+
alt: "avatar thumbnail"
|
|
8926
|
+
}
|
|
8927
|
+
),
|
|
8928
|
+
text,
|
|
8929
|
+
onDeleteClick ? /* @__PURE__ */ jsxRuntime.jsx(P, { size: 12, onClick: onDeleteClick, cursor: "pointer" }) : null
|
|
8930
|
+
] });
|
|
8931
|
+
}
|
|
8932
|
+
);
|
|
8674
8933
|
Tag.displayName = "Tag";
|
|
8675
8934
|
function definePreset(preset2) {
|
|
8676
8935
|
return preset2;
|
|
@@ -8973,13 +9232,21 @@ const preset = definePreset({
|
|
|
8973
9232
|
}
|
|
8974
9233
|
});
|
|
8975
9234
|
exports.BottomSheet = BottomSheet;
|
|
8976
|
-
exports.
|
|
9235
|
+
exports.Box = Box2;
|
|
9236
|
+
exports.Button = index$1;
|
|
9237
|
+
exports.Center = Center2;
|
|
8977
9238
|
exports.Dialog = Dialog;
|
|
8978
|
-
exports.
|
|
9239
|
+
exports.Flex = Flex2;
|
|
9240
|
+
exports.Grid = Grid2;
|
|
9241
|
+
exports.GridItem = GridItem2;
|
|
9242
|
+
exports.HStack = HStack2;
|
|
9243
|
+
exports.IconButton = index;
|
|
8979
9244
|
exports.Navigation = Navigation;
|
|
8980
9245
|
exports.Portal = Portal;
|
|
8981
9246
|
exports.Spinner = Spinner;
|
|
9247
|
+
exports.Stack = Stack2;
|
|
8982
9248
|
exports.Tag = Tag;
|
|
8983
9249
|
exports.Text = Text;
|
|
9250
|
+
exports.VStack = VStack2;
|
|
8984
9251
|
exports.preset = preset;
|
|
8985
9252
|
//# sourceMappingURL=index.cjs.map
|