@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.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 };
|
|
692
|
+
return React.createElement(styled.div, mergedProps);
|
|
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 };
|
|
563
746
|
return React.createElement(styled.div, mergedProps);
|
|
564
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"
|
|
@@ -4429,40 +4630,52 @@ const textRecipe = cva({
|
|
|
4429
4630
|
},
|
|
4430
4631
|
variant: {
|
|
4431
4632
|
"display.lg": {
|
|
4432
|
-
textStyle: "display.lg"
|
|
4633
|
+
textStyle: "display.lg",
|
|
4634
|
+
fontFamily: "inter"
|
|
4433
4635
|
},
|
|
4434
4636
|
"display.md": {
|
|
4435
|
-
textStyle: "display.md"
|
|
4637
|
+
textStyle: "display.md",
|
|
4638
|
+
fontFamily: "inter"
|
|
4436
4639
|
},
|
|
4437
4640
|
"headline.md": {
|
|
4438
|
-
textStyle: "headline.md"
|
|
4641
|
+
textStyle: "headline.md",
|
|
4642
|
+
fontFamily: "inter"
|
|
4439
4643
|
},
|
|
4440
4644
|
"headline.sm": {
|
|
4441
|
-
textStyle: "headline.sm"
|
|
4645
|
+
textStyle: "headline.sm",
|
|
4646
|
+
fontFamily: "inter"
|
|
4442
4647
|
},
|
|
4443
4648
|
"title.lg": {
|
|
4444
|
-
textStyle: "title.lg"
|
|
4649
|
+
textStyle: "title.lg",
|
|
4650
|
+
fontFamily: "notoSans"
|
|
4445
4651
|
},
|
|
4446
4652
|
"title.md": {
|
|
4447
|
-
textStyle: "title.md"
|
|
4653
|
+
textStyle: "title.md",
|
|
4654
|
+
fontFamily: "notoSans"
|
|
4448
4655
|
},
|
|
4449
4656
|
"title.sm": {
|
|
4450
|
-
textStyle: "title.sm"
|
|
4657
|
+
textStyle: "title.sm",
|
|
4658
|
+
fontFamily: "notoSans"
|
|
4451
4659
|
},
|
|
4452
4660
|
"body.lg": {
|
|
4453
|
-
textStyle: "body.lg"
|
|
4661
|
+
textStyle: "body.lg",
|
|
4662
|
+
fontFamily: "notoSans"
|
|
4454
4663
|
},
|
|
4455
4664
|
"body.md": {
|
|
4456
|
-
textStyle: "body.md"
|
|
4665
|
+
textStyle: "body.md",
|
|
4666
|
+
fontFamily: "notoSans"
|
|
4457
4667
|
},
|
|
4458
4668
|
"body.sm": {
|
|
4459
|
-
textStyle: "body.sm"
|
|
4669
|
+
textStyle: "body.sm",
|
|
4670
|
+
fontFamily: "notoSans"
|
|
4460
4671
|
},
|
|
4461
4672
|
"label.sm": {
|
|
4462
|
-
textStyle: "label.sm"
|
|
4673
|
+
textStyle: "label.sm",
|
|
4674
|
+
fontFamily: "notoSans"
|
|
4463
4675
|
},
|
|
4464
4676
|
"label.md": {
|
|
4465
|
-
textStyle: "label.md"
|
|
4677
|
+
textStyle: "label.md",
|
|
4678
|
+
fontFamily: "notoSans"
|
|
4466
4679
|
}
|
|
4467
4680
|
}
|
|
4468
4681
|
}
|
|
@@ -4478,7 +4691,7 @@ const Text = React.forwardRef((props, ref) => {
|
|
|
4478
4691
|
label: styled("span", textRecipe)
|
|
4479
4692
|
};
|
|
4480
4693
|
const TextComponent = componentMap[textType];
|
|
4481
|
-
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 });
|
|
4482
4695
|
});
|
|
4483
4696
|
Text.displayName = "Text";
|
|
4484
4697
|
const shouldForwardProp = (prop, variantKeys, options = {}) => {
|
|
@@ -4819,17 +5032,30 @@ const IconButton = React.forwardRef(
|
|
|
4819
5032
|
color,
|
|
4820
5033
|
variant,
|
|
4821
5034
|
size,
|
|
4822
|
-
pointerEvents: loading ? "none" : "auto",
|
|
5035
|
+
css: { pointerEvents: loading ? "none" : "auto" },
|
|
4823
5036
|
...rest,
|
|
4824
5037
|
children: loading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4825
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4826
|
-
|
|
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 })
|
|
4827
5052
|
] }) : children
|
|
4828
5053
|
}
|
|
4829
5054
|
);
|
|
4830
5055
|
}
|
|
4831
5056
|
);
|
|
4832
5057
|
IconButton.displayName = "IconButton";
|
|
5058
|
+
const index = withPolymorphicComponent(IconButton);
|
|
4833
5059
|
var updateQueue = makeQueue();
|
|
4834
5060
|
var raf = (fn) => schedule(fn, updateQueue);
|
|
4835
5061
|
var writeQueue = makeQueue();
|
|
@@ -5150,8 +5376,8 @@ function advance(dt) {
|
|
|
5150
5376
|
return currentFrame.length > 0;
|
|
5151
5377
|
}
|
|
5152
5378
|
function findIndex(arr, test) {
|
|
5153
|
-
const
|
|
5154
|
-
return
|
|
5379
|
+
const index2 = arr.findIndex(test);
|
|
5380
|
+
return index2 < 0 ? arr.length : index2;
|
|
5155
5381
|
}
|
|
5156
5382
|
var colors2 = {
|
|
5157
5383
|
transparent: 0,
|
|
@@ -7601,8 +7827,8 @@ var SpringRef = () => {
|
|
|
7601
7827
|
each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i)));
|
|
7602
7828
|
return this;
|
|
7603
7829
|
};
|
|
7604
|
-
const _getProps = function(arg, ctrl,
|
|
7605
|
-
return is.fun(arg) ? arg(
|
|
7830
|
+
const _getProps = function(arg, ctrl, index2) {
|
|
7831
|
+
return is.fun(arg) ? arg(index2, ctrl) : arg;
|
|
7606
7832
|
};
|
|
7607
7833
|
SpringRef2._getProps = _getProps;
|
|
7608
7834
|
return SpringRef2;
|
|
@@ -8352,22 +8578,25 @@ const BottomSheetFrame = React.forwardRef(
|
|
|
8352
8578
|
animated.section,
|
|
8353
8579
|
{
|
|
8354
8580
|
ref,
|
|
8355
|
-
className: cx(
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
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
|
+
),
|
|
8371
8600
|
style: {
|
|
8372
8601
|
bottom: `calc(${initialOpenHeightPx}px - 100dvh)`,
|
|
8373
8602
|
transform: springs.transform
|
|
@@ -8377,42 +8606,70 @@ const BottomSheetFrame = React.forwardRef(
|
|
|
8377
8606
|
);
|
|
8378
8607
|
}
|
|
8379
8608
|
);
|
|
8380
|
-
const Backdrop = React.forwardRef(
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
animated.div,
|
|
8392
|
-
{
|
|
8393
|
-
className: css$1({
|
|
8394
|
-
zIndex: 99,
|
|
8395
|
-
position: "fixed",
|
|
8396
|
-
top: 0,
|
|
8397
|
-
width: "100%",
|
|
8398
|
-
height: "100dvh",
|
|
8399
|
-
willChange: "opacity",
|
|
8400
|
-
overflow: "hidden",
|
|
8401
|
-
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
|
+
}
|
|
8402
8620
|
}),
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
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
|
+
);
|
|
8414
8660
|
const BottomSheet = (props) => {
|
|
8415
|
-
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;
|
|
8416
8673
|
const { bottomSheetRef, contentRef, snapToMin, springs } = useBottomSheet({
|
|
8417
8674
|
isOpen,
|
|
8418
8675
|
onOpen,
|
|
@@ -8626,18 +8883,18 @@ const tagRecipe = cva({
|
|
|
8626
8883
|
avatar: false
|
|
8627
8884
|
}
|
|
8628
8885
|
});
|
|
8629
|
-
function
|
|
8886
|
+
function P({ size: C = 24, color: n = "currentColor", ...o }) {
|
|
8630
8887
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8631
8888
|
"svg",
|
|
8632
8889
|
{
|
|
8633
|
-
width:
|
|
8634
|
-
height:
|
|
8890
|
+
width: C,
|
|
8891
|
+
height: C,
|
|
8635
8892
|
viewBox: "0 0 24 24",
|
|
8636
8893
|
fill: "none",
|
|
8637
8894
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8638
8895
|
strokeWidth: "0",
|
|
8639
|
-
color,
|
|
8640
|
-
...
|
|
8896
|
+
color: n,
|
|
8897
|
+
...o,
|
|
8641
8898
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8642
8899
|
"path",
|
|
8643
8900
|
{
|
|
@@ -8651,14 +8908,28 @@ function CloseOutlineIcon({ size = 24, color = "currentColor", ...props }) {
|
|
|
8651
8908
|
}
|
|
8652
8909
|
);
|
|
8653
8910
|
}
|
|
8654
|
-
const Tag = React.forwardRef(
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
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
|
+
);
|
|
8662
8933
|
Tag.displayName = "Tag";
|
|
8663
8934
|
function definePreset(preset2) {
|
|
8664
8935
|
return preset2;
|
|
@@ -8961,13 +9232,21 @@ const preset = definePreset({
|
|
|
8961
9232
|
}
|
|
8962
9233
|
});
|
|
8963
9234
|
exports.BottomSheet = BottomSheet;
|
|
8964
|
-
exports.
|
|
9235
|
+
exports.Box = Box2;
|
|
9236
|
+
exports.Button = index$1;
|
|
9237
|
+
exports.Center = Center2;
|
|
8965
9238
|
exports.Dialog = Dialog;
|
|
8966
|
-
exports.
|
|
9239
|
+
exports.Flex = Flex2;
|
|
9240
|
+
exports.Grid = Grid2;
|
|
9241
|
+
exports.GridItem = GridItem2;
|
|
9242
|
+
exports.HStack = HStack2;
|
|
9243
|
+
exports.IconButton = index;
|
|
8967
9244
|
exports.Navigation = Navigation;
|
|
8968
9245
|
exports.Portal = Portal;
|
|
8969
9246
|
exports.Spinner = Spinner;
|
|
9247
|
+
exports.Stack = Stack2;
|
|
8970
9248
|
exports.Tag = Tag;
|
|
8971
9249
|
exports.Text = Text;
|
|
9250
|
+
exports.VStack = VStack2;
|
|
8972
9251
|
exports.preset = preset;
|
|
8973
9252
|
//# sourceMappingURL=index.cjs.map
|