@sanity/ui 5.0.0-alpha.6 → 5.0.0-alpha.8

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.
Files changed (47) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/install.js +2 -1
  3. package/dist/index.d.ts +285 -116
  4. package/dist/index.js +177 -174
  5. package/dist/index.js.map +1 -1
  6. package/dist/styles.css +1 -1
  7. package/package.json +2 -2
  8. package/src/cli/install.ts +2 -1
  9. package/src/components/box/box.props.ts +7 -2
  10. package/src/components/button/button.props.ts +27 -9
  11. package/src/components/card/card.props.ts +6 -2
  12. package/src/components/checkbox/Checkbox.tsx +2 -1
  13. package/src/components/checkbox/checkbox.props.ts +11 -3
  14. package/src/components/code/code.props.ts +10 -3
  15. package/src/components/container/container.props.ts +6 -2
  16. package/src/components/{modal/Modal.tsx → dialog/Dialog.tsx} +28 -28
  17. package/src/components/{modal/modal.css → dialog/dialog.css} +11 -11
  18. package/src/components/dialog/dialog.props.ts +38 -0
  19. package/src/components/eyebrow/eyebrow.props.ts +6 -2
  20. package/src/components/flex/flex.props.ts +6 -2
  21. package/src/components/grid/grid.props.ts +6 -2
  22. package/src/components/h-stack/hStack.props.ts +3 -1
  23. package/src/components/heading/heading.props.ts +8 -2
  24. package/src/components/icon/icon.props.ts +6 -2
  25. package/src/components/icon-button/iconButton.props.ts +7 -2
  26. package/src/components/index.css +1 -1
  27. package/src/components/indicator/indicator.props.ts +6 -2
  28. package/src/components/indicator-stack/indicatorStack.props.ts +3 -1
  29. package/src/components/inline/inline.props.ts +6 -2
  30. package/src/components/label/label.props.ts +7 -1
  31. package/src/components/link/link.props.ts +4 -4
  32. package/src/components/list/list.props.ts +27 -9
  33. package/src/components/popover/popover.props.ts +14 -4
  34. package/src/components/press-area/pressArea.props.ts +3 -1
  35. package/src/components/radio/radio.props.ts +7 -2
  36. package/src/components/skip-to-content/skipToContent.props.ts +9 -3
  37. package/src/components/spinner/Spinner.tsx +1 -1
  38. package/src/components/spinner/spinner.props.ts +3 -0
  39. package/src/components/switch/switch.props.ts +7 -2
  40. package/src/components/text/text.props.ts +6 -2
  41. package/src/components/tooltip/tooltip.props.ts +12 -4
  42. package/src/components/tooltip-group/tooltipGroup.props.ts +3 -1
  43. package/src/components/v-stack/vStack.props.ts +3 -1
  44. package/src/components/visually-hidden/visuallyHidden.props.ts +6 -2
  45. package/src/index.ts +1 -1
  46. package/src/version.ts +2 -2
  47. package/src/components/modal/modal.props.ts +0 -29
package/dist/index.js CHANGED
@@ -2,8 +2,11 @@
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import clsx from "clsx";
5
- import { isValidElement, useRef, useEffect, lazy, Suspense, Children, useId, useSyncExternalStore, useState, cloneElement, Activity } from "react";
6
- import { SpinnerIcon, RemoveIcon, CheckmarkIcon, CloseIcon } from "@sanity/icons";
5
+ import { isValidElement, useRef, useEffect, lazy, Suspense, useId, Children, useSyncExternalStore, useState, cloneElement, Activity } from "react";
6
+ import { SpinnerIcon } from "@sanity/icons/Spinner";
7
+ import { CheckmarkIcon } from "@sanity/icons/Checkmark";
8
+ import { RemoveIcon } from "@sanity/icons/Remove";
9
+ import { CloseIcon } from "@sanity/icons/Close";
7
10
  import { createPortal } from "react-dom";
8
11
  const PREFIX = "sui", BREAKPOINTS_LENGTH = 6;
9
12
  function getProps(componentProps, propDefs) {
@@ -96,7 +99,7 @@ function getCompositeValue(propValue, propDef, key) {
96
99
  compositeValue = mapping?.[propValue];
97
100
  return compositeValue;
98
101
  }
99
- const HASH = "71d7e5";
102
+ const HASH = "ff7a34";
100
103
  function suffixClassName(className) {
101
104
  return `${className}-${HASH}`;
102
105
  }
@@ -971,6 +974,176 @@ function Container(t0) {
971
974
  let t2;
972
975
  return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Container", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
973
976
  }
977
+ const HEADING_TAG = ["h1", "h2", "h3", "h4", "h5", "h6"], HEADING_SIZE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], headingProps = {
978
+ as: {
979
+ type: "union",
980
+ values: HEADING_TAG
981
+ },
982
+ size: {
983
+ type: "union",
984
+ className: "text-heading",
985
+ values: HEADING_SIZE
986
+ },
987
+ ...typographyProps
988
+ }, headingClassName = suffixClassName("sui-Heading");
989
+ function Heading(t0) {
990
+ const $ = c(15);
991
+ let T0, children, rest, style, t1, t2;
992
+ if ($[0] !== t0) {
993
+ t2 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
994
+ bb0: {
995
+ const {
996
+ size: t32,
997
+ weight: t4,
998
+ ...props
999
+ } = t0, size = t32 === void 0 ? 2 : t32, weight = t4 === void 0 ? "bold" : t4, {
1000
+ as,
1001
+ children: t5,
1002
+ className,
1003
+ style: t6,
1004
+ ...t7
1005
+ } = getProps({
1006
+ size,
1007
+ weight,
1008
+ ...props
1009
+ }, headingProps);
1010
+ children = t5, style = t6, rest = t7;
1011
+ const Component = as || "h2";
1012
+ if (props.truncate && props.trim) {
1013
+ const t8 = clsx(headingClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t9 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp";
1014
+ let t10;
1015
+ $[7] !== t9 ? (t10 = clsx("sui-overflow-hidden", t9), $[7] = t9, $[8] = t10) : t10 = $[8], t2 = /* @__PURE__ */ jsx(Component, { className: t8, style, "data-ui": "Heading", ...rest, children: /* @__PURE__ */ jsx("span", { className: t10, children }) });
1016
+ break bb0;
1017
+ }
1018
+ T0 = Component, t1 = clsx(headingClassName, props.truncate && "sui-overflow-hidden", className);
1019
+ }
1020
+ $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
1021
+ } else
1022
+ T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
1023
+ if (t2 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
1024
+ return t2;
1025
+ let t3;
1026
+ return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Heading", ...rest, children }), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
1027
+ }
1028
+ const iconButtonProps = {
1029
+ "aria-label": {
1030
+ type: "string"
1031
+ },
1032
+ as: buttonProps.as,
1033
+ icon: {
1034
+ type: "string"
1035
+ }
1036
+ }, iconButtonClassName = suffixClassName("sui-IconButton");
1037
+ function IconButton(props) {
1038
+ const $ = c(16);
1039
+ let IconProp, T0, rest, style, t0, t1;
1040
+ if ($[0] !== props) {
1041
+ const {
1042
+ as,
1043
+ className,
1044
+ style: t22,
1045
+ icon: t32,
1046
+ ...t4
1047
+ } = getProps(props, iconButtonProps);
1048
+ style = t22, IconProp = t32, rest = t4;
1049
+ const Component = as || "button";
1050
+ T0 = Button, t0 = Component, t1 = clsx(iconButtonClassName, className), $[0] = props, $[1] = IconProp, $[2] = T0, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
1051
+ } else
1052
+ IconProp = $[1], T0 = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
1053
+ let t2;
1054
+ $[7] !== IconProp ? (t2 = /* @__PURE__ */ jsx(Icon, { icon: IconProp, margin: -2, size: 1 }), $[7] = IconProp, $[8] = t2) : t2 = $[8];
1055
+ let t3;
1056
+ return $[9] !== T0 || $[10] !== rest || $[11] !== style || $[12] !== t0 || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "IconButton", ...rest, children: t2 }), $[9] = T0, $[10] = rest, $[11] = style, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
1057
+ }
1058
+ const dialogProps = {
1059
+ header: {
1060
+ type: "string"
1061
+ },
1062
+ open: {
1063
+ type: "boolean"
1064
+ },
1065
+ size: {
1066
+ type: "union",
1067
+ className: "container",
1068
+ values: CONTAINER_SIZE
1069
+ }
1070
+ }, dialogClassName = suffixClassName("sui-Dialog"), dialogContentClassName = suffixClassName("sui-DialogContent"), dialogFooterClassName = suffixClassName("sui-DialogFooter");
1071
+ function DialogRoot(t0) {
1072
+ const $ = c(17), {
1073
+ open: t1,
1074
+ size: t2,
1075
+ ...props
1076
+ } = t0, open = t1 === void 0 ? !1 : t1, size = t2 === void 0 ? 0 : t2, {
1077
+ children,
1078
+ className,
1079
+ style,
1080
+ header,
1081
+ onClose,
1082
+ ...rest
1083
+ } = getProps({
1084
+ size,
1085
+ ...props
1086
+ }, dialogProps), dialogRef = useRef(null), headerId = useId(), dialogClasses = clsx(dialogClassName, "sui-inset0 sui-m-auto sui-radius5 sui-shadow3 sui-p4 sui-flex-direction-column sui-gap4 sui-overflow-y-auto");
1087
+ let t3, t4;
1088
+ $[0] !== open ? (t3 = () => {
1089
+ const dialogElement = dialogRef.current;
1090
+ if (dialogElement)
1091
+ return open ? dialogElement.open || dialogElement.showModal() : dialogElement.open && dialogElement.close(), () => {
1092
+ dialogElement.close();
1093
+ };
1094
+ }, t4 = [open], $[0] = open, $[1] = t3, $[2] = t4) : (t3 = $[1], t4 = $[2]), useEffect(t3, t4);
1095
+ const t5 = "any", t6 = header ? headerId : void 0, t7 = clsx(dialogClasses, className);
1096
+ let t8;
1097
+ $[3] !== header || $[4] !== headerId ? (t8 = header ? /* @__PURE__ */ jsx(Heading, { trim: !0, size: 1, id: headerId, children: header }) : /* @__PURE__ */ jsx("div", {}), $[3] = header, $[4] = headerId, $[5] = t8) : t8 = $[5];
1098
+ let t9;
1099
+ $[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx(IconButton, { "aria-label": "Close", level: "tertiary", icon: CloseIcon, onClick: () => dialogRef.current?.close() }), $[6] = t9) : t9 = $[6];
1100
+ let t10;
1101
+ $[7] !== t8 ? (t10 = /* @__PURE__ */ jsxs(Flex, { flexShrink: 0, justifyContent: "space-between", alignItems: "center", children: [
1102
+ t8,
1103
+ t9
1104
+ ] }), $[7] = t8, $[8] = t10) : t10 = $[8];
1105
+ let t11;
1106
+ return $[9] !== children || $[10] !== onClose || $[11] !== rest || $[12] !== style || $[13] !== t10 || $[14] !== t6 || $[15] !== t7 ? (t11 = /* @__PURE__ */ jsxs("dialog", { ...rest, ref: dialogRef, closedby: t5, "aria-labelledby": t6, onClose, className: t7, style, "data-ui": "Dialog", children: [
1107
+ t10,
1108
+ children
1109
+ ] }), $[9] = children, $[10] = onClose, $[11] = rest, $[12] = style, $[13] = t10, $[14] = t6, $[15] = t7, $[16] = t11) : t11 = $[16], t11;
1110
+ }
1111
+ function DialogContent(props) {
1112
+ const $ = c(12);
1113
+ let T0, children, style, t0, t1;
1114
+ if ($[0] !== props) {
1115
+ const {
1116
+ children: t22,
1117
+ className,
1118
+ style: t3,
1119
+ ...rest
1120
+ } = getProps(props, {});
1121
+ children = t22, style = t3, T0 = Box, t0 = rest, t1 = clsx(dialogContentClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = style, $[4] = t0, $[5] = t1;
1122
+ } else
1123
+ T0 = $[1], children = $[2], style = $[3], t0 = $[4], t1 = $[5];
1124
+ let t2;
1125
+ return $[6] !== T0 || $[7] !== children || $[8] !== style || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { ...t0, className: t1, style, "data-ui": "DialogContent", flexGrow: 1, overflowY: "auto", children }), $[6] = T0, $[7] = children, $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
1126
+ }
1127
+ function DialogFooter(props) {
1128
+ const $ = c(12);
1129
+ let T0, children, style, t0, t1;
1130
+ if ($[0] !== props) {
1131
+ const {
1132
+ children: t22,
1133
+ className,
1134
+ style: t3,
1135
+ ...rest
1136
+ } = getProps(props, {});
1137
+ children = t22, style = t3, T0 = Box, t0 = rest, t1 = clsx(dialogFooterClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = style, $[4] = t0, $[5] = t1;
1138
+ } else
1139
+ T0 = $[1], children = $[2], style = $[3], t0 = $[4], t1 = $[5];
1140
+ let t2;
1141
+ return $[6] !== T0 || $[7] !== children || $[8] !== style || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { ...t0, className: t1, style, "data-ui": "DialogFooter", flexShrink: 0, children }), $[6] = T0, $[7] = children, $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
1142
+ }
1143
+ DialogRoot.displayName = "Dialog";
1144
+ const Dialog = DialogRoot;
1145
+ DialogRoot.Content = DialogContent;
1146
+ DialogRoot.Footer = DialogFooter;
974
1147
  const dividerProps = {
975
1148
  ...marginProps
976
1149
  }, dividerClassName = suffixClassName("sui-Divider");
@@ -1130,87 +1303,6 @@ function HStack(props) {
1130
1303
  let t2;
1131
1304
  return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "HStack", display: "inline-flex", alignItems: "center", flexWrap: "wrap", ...rest, children }), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
1132
1305
  }
1133
- const HEADING_TAG = ["h1", "h2", "h3", "h4", "h5", "h6"], HEADING_SIZE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], headingProps = {
1134
- as: {
1135
- type: "union",
1136
- values: HEADING_TAG
1137
- },
1138
- size: {
1139
- type: "union",
1140
- className: "text-heading",
1141
- values: HEADING_SIZE
1142
- },
1143
- ...typographyProps
1144
- }, headingClassName = suffixClassName("sui-Heading");
1145
- function Heading(t0) {
1146
- const $ = c(15);
1147
- let T0, children, rest, style, t1, t2;
1148
- if ($[0] !== t0) {
1149
- t2 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
1150
- bb0: {
1151
- const {
1152
- size: t32,
1153
- weight: t4,
1154
- ...props
1155
- } = t0, size = t32 === void 0 ? 2 : t32, weight = t4 === void 0 ? "bold" : t4, {
1156
- as,
1157
- children: t5,
1158
- className,
1159
- style: t6,
1160
- ...t7
1161
- } = getProps({
1162
- size,
1163
- weight,
1164
- ...props
1165
- }, headingProps);
1166
- children = t5, style = t6, rest = t7;
1167
- const Component = as || "h2";
1168
- if (props.truncate && props.trim) {
1169
- const t8 = clsx(headingClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t9 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp";
1170
- let t10;
1171
- $[7] !== t9 ? (t10 = clsx("sui-overflow-hidden", t9), $[7] = t9, $[8] = t10) : t10 = $[8], t2 = /* @__PURE__ */ jsx(Component, { className: t8, style, "data-ui": "Heading", ...rest, children: /* @__PURE__ */ jsx("span", { className: t10, children }) });
1172
- break bb0;
1173
- }
1174
- T0 = Component, t1 = clsx(headingClassName, props.truncate && "sui-overflow-hidden", className);
1175
- }
1176
- $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
1177
- } else
1178
- T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
1179
- if (t2 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
1180
- return t2;
1181
- let t3;
1182
- return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Heading", ...rest, children }), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
1183
- }
1184
- const iconButtonProps = {
1185
- "aria-label": {
1186
- type: "string"
1187
- },
1188
- as: buttonProps.as,
1189
- icon: {
1190
- type: "string"
1191
- }
1192
- }, iconButtonClassName = suffixClassName("sui-IconButton");
1193
- function IconButton(props) {
1194
- const $ = c(16);
1195
- let IconProp, T0, rest, style, t0, t1;
1196
- if ($[0] !== props) {
1197
- const {
1198
- as,
1199
- className,
1200
- style: t22,
1201
- icon: t32,
1202
- ...t4
1203
- } = getProps(props, iconButtonProps);
1204
- style = t22, IconProp = t32, rest = t4;
1205
- const Component = as || "button";
1206
- T0 = Button, t0 = Component, t1 = clsx(iconButtonClassName, className), $[0] = props, $[1] = IconProp, $[2] = T0, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
1207
- } else
1208
- IconProp = $[1], T0 = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
1209
- let t2;
1210
- $[7] !== IconProp ? (t2 = /* @__PURE__ */ jsx(Icon, { icon: IconProp, margin: -2, size: 1 }), $[7] = IconProp, $[8] = t2) : t2 = $[8];
1211
- let t3;
1212
- return $[9] !== T0 || $[10] !== rest || $[11] !== style || $[12] !== t0 || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "IconButton", ...rest, children: t2 }), $[9] = T0, $[10] = rest, $[11] = style, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
1213
- }
1214
1306
  const indicatorProps = {
1215
1307
  as: {
1216
1308
  type: "string"
@@ -1648,95 +1740,6 @@ ListRoot.Item = ListItem;
1648
1740
  ListRoot.ButtonItem = ListButtonItem;
1649
1741
  ListRoot.ItemText = ListItemText;
1650
1742
  ListRoot.ItemImage = ListItemImage;
1651
- const modalProps = {
1652
- header: {
1653
- type: "string"
1654
- },
1655
- open: {
1656
- type: "boolean"
1657
- },
1658
- size: {
1659
- type: "union",
1660
- className: "container",
1661
- values: CONTAINER_SIZE
1662
- }
1663
- }, modalClassName = suffixClassName("sui-Modal"), modalContentClassName = suffixClassName("sui-ModalContent"), modalFooterClassName = suffixClassName("sui-ModalFooter");
1664
- function ModalRoot(t0) {
1665
- const $ = c(17), {
1666
- open: t1,
1667
- size: t2,
1668
- ...props
1669
- } = t0, open = t1 === void 0 ? !1 : t1, size = t2 === void 0 ? 0 : t2, {
1670
- children,
1671
- className,
1672
- style,
1673
- header,
1674
- onClose,
1675
- ...rest
1676
- } = getProps({
1677
- size,
1678
- ...props
1679
- }, modalProps), modalRef = useRef(null), headerId = useId(), modalClasses = clsx(modalClassName, "sui-inset0 sui-m-auto sui-radius5 sui-shadow3 sui-p4 sui-flex-direction-column sui-gap4 sui-overflow-y-auto");
1680
- let t3, t4;
1681
- $[0] !== open ? (t3 = () => {
1682
- const dialogElement = modalRef.current;
1683
- if (dialogElement)
1684
- return open ? dialogElement.open || dialogElement.showModal() : dialogElement.open && dialogElement.close(), () => {
1685
- dialogElement.close();
1686
- };
1687
- }, t4 = [open], $[0] = open, $[1] = t3, $[2] = t4) : (t3 = $[1], t4 = $[2]), useEffect(t3, t4);
1688
- const t5 = "any", t6 = header ? headerId : void 0, t7 = clsx(modalClasses, className);
1689
- let t8;
1690
- $[3] !== header || $[4] !== headerId ? (t8 = header ? /* @__PURE__ */ jsx(Heading, { trim: !0, size: 1, id: headerId, children: header }) : /* @__PURE__ */ jsx("div", {}), $[3] = header, $[4] = headerId, $[5] = t8) : t8 = $[5];
1691
- let t9;
1692
- $[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx(IconButton, { "aria-label": "Close", level: "tertiary", icon: CloseIcon, onClick: () => modalRef.current?.close() }), $[6] = t9) : t9 = $[6];
1693
- let t10;
1694
- $[7] !== t8 ? (t10 = /* @__PURE__ */ jsxs(Flex, { flexShrink: 0, justifyContent: "space-between", alignItems: "center", children: [
1695
- t8,
1696
- t9
1697
- ] }), $[7] = t8, $[8] = t10) : t10 = $[8];
1698
- let t11;
1699
- return $[9] !== children || $[10] !== onClose || $[11] !== rest || $[12] !== style || $[13] !== t10 || $[14] !== t6 || $[15] !== t7 ? (t11 = /* @__PURE__ */ jsxs("dialog", { ...rest, ref: modalRef, closedby: t5, "aria-labelledby": t6, onClose, className: t7, style, "data-ui": "Modal", children: [
1700
- t10,
1701
- children
1702
- ] }), $[9] = children, $[10] = onClose, $[11] = rest, $[12] = style, $[13] = t10, $[14] = t6, $[15] = t7, $[16] = t11) : t11 = $[16], t11;
1703
- }
1704
- function ModalContent(props) {
1705
- const $ = c(12);
1706
- let T0, children, style, t0, t1;
1707
- if ($[0] !== props) {
1708
- const {
1709
- children: t22,
1710
- className,
1711
- style: t3,
1712
- ...rest
1713
- } = getProps(props, {});
1714
- children = t22, style = t3, T0 = Box, t0 = rest, t1 = clsx(modalContentClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = style, $[4] = t0, $[5] = t1;
1715
- } else
1716
- T0 = $[1], children = $[2], style = $[3], t0 = $[4], t1 = $[5];
1717
- let t2;
1718
- return $[6] !== T0 || $[7] !== children || $[8] !== style || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { ...t0, className: t1, style, "data-ui": "ModalContent", flexGrow: 1, overflowY: "auto", children }), $[6] = T0, $[7] = children, $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
1719
- }
1720
- function ModalFooter(props) {
1721
- const $ = c(12);
1722
- let T0, children, style, t0, t1;
1723
- if ($[0] !== props) {
1724
- const {
1725
- children: t22,
1726
- className,
1727
- style: t3,
1728
- ...rest
1729
- } = getProps(props, {});
1730
- children = t22, style = t3, T0 = Box, t0 = rest, t1 = clsx(modalFooterClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = style, $[4] = t0, $[5] = t1;
1731
- } else
1732
- T0 = $[1], children = $[2], style = $[3], t0 = $[4], t1 = $[5];
1733
- let t2;
1734
- return $[6] !== T0 || $[7] !== children || $[8] !== style || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { ...t0, className: t1, style, "data-ui": "ModalFooter", flexShrink: 0, children }), $[6] = T0, $[7] = children, $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
1735
- }
1736
- ModalRoot.displayName = "Modal";
1737
- const Modal = ModalRoot;
1738
- ModalRoot.Content = ModalContent;
1739
- ModalRoot.Footer = ModalFooter;
1740
1743
  function useIsClient() {
1741
1744
  return useSyncExternalStore(_temp2, _temp3, _temp4);
1742
1745
  }
@@ -2049,6 +2052,7 @@ export {
2049
2052
  Checkbox,
2050
2053
  Code,
2051
2054
  Container,
2055
+ Dialog,
2052
2056
  Divider,
2053
2057
  Eyebrow,
2054
2058
  Flex,
@@ -2063,7 +2067,6 @@ export {
2063
2067
  Label,
2064
2068
  Link,
2065
2069
  List,
2066
- Modal,
2067
2070
  Popover,
2068
2071
  PressArea,
2069
2072
  Radio,