@sanity-labs/ui-poc 0.0.1-scoped.0 → 0.0.1-versioned.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.d.ts +0 -4
- package/dist/index.js +134 -65
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -3
- package/src/components/box/Box.tsx +7 -1
- package/src/components/button/Button.tsx +2 -1
- package/src/components/card/Card.tsx +2 -1
- package/src/components/checkbox/Checkbox.tsx +4 -3
- package/src/components/code/Code.tsx +8 -2
- package/src/components/container/Container.tsx +2 -1
- package/src/components/divider/Divider.tsx +6 -1
- package/src/components/flex/Flex.tsx +7 -1
- package/src/components/grid/Grid.tsx +7 -1
- package/src/components/h-stack/HStack.tsx +2 -1
- package/src/components/heading/Heading.tsx +6 -2
- package/src/components/icon/Icon.tsx +2 -1
- package/src/components/icon-button/IconButton.tsx +2 -1
- package/src/components/indicator/Indicator.tsx +2 -1
- package/src/components/indicator/indicator.props.ts +1 -1
- package/src/components/indicator-stack/IndicatorStack.tsx +2 -1
- package/src/components/inline/Inline.tsx +2 -1
- package/src/components/label/Label.tsx +3 -1
- package/src/components/link/Link.tsx +2 -1
- package/src/components/link/link.css +1 -1
- package/src/components/link/link.props.ts +1 -1
- package/src/components/list/List.tsx +10 -4
- package/src/components/press-area/PressArea.tsx +2 -1
- package/src/components/radio/Radio.tsx +4 -3
- package/src/components/skip-to-content/SkipToContent.tsx +3 -1
- package/src/components/spinner/Spinner.tsx +2 -1
- package/src/components/switch/Switch.tsx +4 -3
- package/src/components/text/Text.tsx +11 -2
- package/src/components/tooltip/Tooltip.tsx +6 -1
- package/src/components/tooltip-group/TooltipGroup.tsx +2 -1
- package/src/components/v-stack/VStack.tsx +2 -1
- package/src/components/visually-hidden/VisuallyHidden.tsx +2 -1
- package/src/components/visually-hidden/visually-hidden.css +1 -1
- package/src/components/visually-hidden/visuallyHidden.props.ts +1 -1
- package/src/css/index.css +5 -0
- package/src/css/tokens/opacity.css +1 -1
- package/src/css/tokens/semantic.css +1 -1
- package/src/css/tokens/surface.css +1 -1
- package/src/index.css +6 -6
- package/src/index.ts +1 -2
- package/src/utils/getVersionedClassname.ts +5 -0
- package/src/components/root/Root.tsx +0 -12
- package/src/version.ts +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type {ComponentProps} from 'react'
|
|
|
2
2
|
import {ComponentPropsWithRef} from 'react'
|
|
3
3
|
import {ElementType} from 'react'
|
|
4
4
|
import {JSX} from 'react/jsx-runtime'
|
|
5
|
-
import type {PropsWithChildren} from 'react'
|
|
6
5
|
import type {default as React_2} from 'react'
|
|
7
6
|
import type {SVGProps} from 'react'
|
|
8
7
|
|
|
@@ -641,9 +640,6 @@ declare type Responsive<T> =
|
|
|
641
640
|
length: 6
|
|
642
641
|
})
|
|
643
642
|
|
|
644
|
-
/** @public */
|
|
645
|
-
export declare function Root(props: PropsWithChildren): JSX.Element
|
|
646
|
-
|
|
647
643
|
declare const SHADOW: readonly [0, 1, 2, 3, 4, 5]
|
|
648
644
|
|
|
649
645
|
declare type Shadow = (typeof SHADOW)[number]
|
package/dist/index.js
CHANGED
|
@@ -66,6 +66,10 @@ function getCompositeValue(propValue, propDef, key) {
|
|
|
66
66
|
compositeValue = mapping?.[propValue];
|
|
67
67
|
return compositeValue;
|
|
68
68
|
}
|
|
69
|
+
const version = "alpha17";
|
|
70
|
+
function getVersionedClassname(classname) {
|
|
71
|
+
return `${classname}-${version}`;
|
|
72
|
+
}
|
|
69
73
|
const RADIUS = [0, 1, 2, 3, 4, 5, 6, "full"], borderProps = {
|
|
70
74
|
border: {
|
|
71
75
|
type: "boolean",
|
|
@@ -342,7 +346,16 @@ function Box({
|
|
|
342
346
|
...props
|
|
343
347
|
}) {
|
|
344
348
|
const { as, children, className, style, ...rest } = getProps({ display, ...props }, boxProps);
|
|
345
|
-
return /* @__PURE__ */ jsx(
|
|
349
|
+
return /* @__PURE__ */ jsx(
|
|
350
|
+
as || "div",
|
|
351
|
+
{
|
|
352
|
+
className: classNames(getVersionedClassname("sui-Box"), className),
|
|
353
|
+
style,
|
|
354
|
+
"data-ui": "Box",
|
|
355
|
+
...rest,
|
|
356
|
+
children
|
|
357
|
+
}
|
|
358
|
+
);
|
|
346
359
|
}
|
|
347
360
|
const ALIGN_ITEMS = ["baseline", "center", "flex-end", "flex-start", "stretch"], JUSTIFY_CONTENT = [
|
|
348
361
|
"flex-start",
|
|
@@ -406,7 +419,16 @@ function Flex({
|
|
|
406
419
|
...props
|
|
407
420
|
}) {
|
|
408
421
|
const { as, children, className, style, ...rest } = getProps({ display, ...props }, flexProps);
|
|
409
|
-
return /* @__PURE__ */ jsx(
|
|
422
|
+
return /* @__PURE__ */ jsx(
|
|
423
|
+
as || "div",
|
|
424
|
+
{
|
|
425
|
+
className: classNames(getVersionedClassname("sui-Flex"), className),
|
|
426
|
+
style,
|
|
427
|
+
"data-ui": "Flex",
|
|
428
|
+
...rest,
|
|
429
|
+
children
|
|
430
|
+
}
|
|
431
|
+
);
|
|
410
432
|
}
|
|
411
433
|
const FONT_WEIGHT = ["regular", "medium", "semibold", "bold"], TEXT_ALIGN = ["left", "center", "right", "justify"], typographyProps = {
|
|
412
434
|
align: {
|
|
@@ -454,7 +476,7 @@ function Icon({ size = 2, ...props }) {
|
|
|
454
476
|
return /* @__PURE__ */ jsx(
|
|
455
477
|
Component,
|
|
456
478
|
{
|
|
457
|
-
className: classNames("sui-Icon", className),
|
|
479
|
+
className: classNames(getVersionedClassname("sui-Icon"), className),
|
|
458
480
|
"data-ui": "Icon",
|
|
459
481
|
style,
|
|
460
482
|
"aria-hidden": props["aria-label"] ? void 0 : !0,
|
|
@@ -475,7 +497,7 @@ function Spinner({ size = 2, ...props }) {
|
|
|
475
497
|
Icon,
|
|
476
498
|
{
|
|
477
499
|
icon: SpinnerIcon,
|
|
478
|
-
className: classNames("sui-Spinner", className),
|
|
500
|
+
className: classNames(getVersionedClassname("sui-Spinner"), className),
|
|
479
501
|
style,
|
|
480
502
|
"data-ui": "Spinner",
|
|
481
503
|
role: "status",
|
|
@@ -503,13 +525,25 @@ function Text({
|
|
|
503
525
|
return props.lineClamp && props.trim ? /* @__PURE__ */ jsx(
|
|
504
526
|
Component,
|
|
505
527
|
{
|
|
506
|
-
className: classNames(
|
|
528
|
+
className: classNames(
|
|
529
|
+
getVersionedClassname("sui-Text"),
|
|
530
|
+
className?.replace("sui-line-clamp", "")
|
|
531
|
+
),
|
|
507
532
|
style,
|
|
508
533
|
"data-ui": "Text",
|
|
509
534
|
...rest,
|
|
510
535
|
children: /* @__PURE__ */ jsx("span", { className: "sui-line-clamp", children })
|
|
511
536
|
}
|
|
512
|
-
) : /* @__PURE__ */ jsx(
|
|
537
|
+
) : /* @__PURE__ */ jsx(
|
|
538
|
+
Component,
|
|
539
|
+
{
|
|
540
|
+
className: classNames(getVersionedClassname("sui-Text"), className),
|
|
541
|
+
style,
|
|
542
|
+
"data-ui": "Text",
|
|
543
|
+
...rest,
|
|
544
|
+
children
|
|
545
|
+
}
|
|
546
|
+
);
|
|
513
547
|
}
|
|
514
548
|
const BUTTON_DENSITY = ["regular", "loose"], BUTTON_LEVEL = ["primary", "secondary", "tertiary"], BUTTON_TONE = ["neutral", "critical"], buttonProps = {
|
|
515
549
|
as: {
|
|
@@ -599,7 +633,7 @@ function Button({
|
|
|
599
633
|
as || "button",
|
|
600
634
|
{
|
|
601
635
|
className: classNames(
|
|
602
|
-
"sui-Button",
|
|
636
|
+
getVersionedClassname("sui-Button"),
|
|
603
637
|
"sui-display-inline-flex sui-align-items-center sui-justify-content-center sui-radius2 sui-position-relative sui-overflow-hidden",
|
|
604
638
|
className
|
|
605
639
|
),
|
|
@@ -664,7 +698,7 @@ function Card({
|
|
|
664
698
|
return /* @__PURE__ */ jsx(
|
|
665
699
|
as || "div",
|
|
666
700
|
{
|
|
667
|
-
className: classNames("sui-Card sui-border", className),
|
|
701
|
+
className: classNames(getVersionedClassname("sui-Card"), "sui-border", className),
|
|
668
702
|
style,
|
|
669
703
|
"data-ui": "Card",
|
|
670
704
|
...rest,
|
|
@@ -690,7 +724,8 @@ function Label(props) {
|
|
|
690
724
|
size: 1,
|
|
691
725
|
muted: disabled,
|
|
692
726
|
className: classNames(
|
|
693
|
-
"sui-Label
|
|
727
|
+
getVersionedClassname("sui-Label"),
|
|
728
|
+
"sui-display-flex sui-align-items-center sui-gap2",
|
|
694
729
|
error && "sui-error",
|
|
695
730
|
className
|
|
696
731
|
),
|
|
@@ -707,7 +742,7 @@ const visuallyHiddenProps = {
|
|
|
707
742
|
},
|
|
708
743
|
visibleOnFocus: {
|
|
709
744
|
type: "boolean",
|
|
710
|
-
className: "
|
|
745
|
+
className: "sui-visually-hidden-visible"
|
|
711
746
|
}
|
|
712
747
|
};
|
|
713
748
|
function VisuallyHidden(props) {
|
|
@@ -715,7 +750,7 @@ function VisuallyHidden(props) {
|
|
|
715
750
|
return /* @__PURE__ */ jsx(
|
|
716
751
|
as || "span",
|
|
717
752
|
{
|
|
718
|
-
className: classNames("sui-VisuallyHidden", className),
|
|
753
|
+
className: classNames(getVersionedClassname("sui-VisuallyHidden"), className),
|
|
719
754
|
style,
|
|
720
755
|
"data-ui": "VisuallyHidden",
|
|
721
756
|
...rest,
|
|
@@ -745,7 +780,7 @@ function Checkbox(props) {
|
|
|
745
780
|
}, [indeterminate]), /* @__PURE__ */ jsxs(
|
|
746
781
|
Label,
|
|
747
782
|
{
|
|
748
|
-
className: classNames("sui-Checkbox", className),
|
|
783
|
+
className: classNames(getVersionedClassname("sui-Checkbox"), className),
|
|
749
784
|
style,
|
|
750
785
|
"data-ui": "Checkbox",
|
|
751
786
|
disabled,
|
|
@@ -756,7 +791,7 @@ function Checkbox(props) {
|
|
|
756
791
|
{
|
|
757
792
|
as: "input",
|
|
758
793
|
type: "checkbox",
|
|
759
|
-
className: "sui-CheckboxInput",
|
|
794
|
+
className: getVersionedClassname("sui-CheckboxInput"),
|
|
760
795
|
ref: inputRef,
|
|
761
796
|
disabled,
|
|
762
797
|
...rest
|
|
@@ -766,7 +801,7 @@ function Checkbox(props) {
|
|
|
766
801
|
Box,
|
|
767
802
|
{
|
|
768
803
|
as: "span",
|
|
769
|
-
className: classNames("sui-CheckboxMark", error && "sui-error"),
|
|
804
|
+
className: classNames(getVersionedClassname("sui-CheckboxMark"), error && "sui-error"),
|
|
770
805
|
position: "relative",
|
|
771
806
|
radius: 2,
|
|
772
807
|
width: "17px",
|
|
@@ -802,10 +837,19 @@ function Code({
|
|
|
802
837
|
...props
|
|
803
838
|
}) {
|
|
804
839
|
const { as, children, className, language, style, ...rest } = getProps({ size, ...props }, codeProps), Component = as || "pre";
|
|
805
|
-
return language ? /* @__PURE__ */ jsx(
|
|
840
|
+
return language ? /* @__PURE__ */ jsx(
|
|
841
|
+
Component,
|
|
842
|
+
{
|
|
843
|
+
className: classNames(getVersionedClassname("sui-Code"), className),
|
|
844
|
+
style,
|
|
845
|
+
"data-ui": "Code",
|
|
846
|
+
...rest,
|
|
847
|
+
children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("code", { children }), children: /* @__PURE__ */ jsx(LazyRefractor, { language, value: children }) })
|
|
848
|
+
}
|
|
849
|
+
) : /* @__PURE__ */ jsx(
|
|
806
850
|
Component,
|
|
807
851
|
{
|
|
808
|
-
className: classNames("sui-Code", className),
|
|
852
|
+
className: classNames(getVersionedClassname("sui-Code"), className),
|
|
809
853
|
style,
|
|
810
854
|
"data-ui": "Code",
|
|
811
855
|
...rest,
|
|
@@ -832,7 +876,7 @@ function Container({
|
|
|
832
876
|
return /* @__PURE__ */ jsx(
|
|
833
877
|
as || "div",
|
|
834
878
|
{
|
|
835
|
-
className: classNames("sui-Container", className),
|
|
879
|
+
className: classNames(getVersionedClassname("sui-Container"), className),
|
|
836
880
|
style,
|
|
837
881
|
"data-ui": "Container",
|
|
838
882
|
...rest,
|
|
@@ -848,7 +892,11 @@ function Divider(props) {
|
|
|
848
892
|
return /* @__PURE__ */ jsx(
|
|
849
893
|
"hr",
|
|
850
894
|
{
|
|
851
|
-
className: classNames(
|
|
895
|
+
className: classNames(
|
|
896
|
+
getVersionedClassname("sui-Divider"),
|
|
897
|
+
"sui-border-none sui-border-top",
|
|
898
|
+
className
|
|
899
|
+
),
|
|
852
900
|
style,
|
|
853
901
|
"data-ui": "Divider",
|
|
854
902
|
...rest
|
|
@@ -899,7 +947,16 @@ function Grid({
|
|
|
899
947
|
...props
|
|
900
948
|
}) {
|
|
901
949
|
const { as, children, className, style, ...rest } = getProps({ display, ...props }, gridProps);
|
|
902
|
-
return /* @__PURE__ */ jsx(
|
|
950
|
+
return /* @__PURE__ */ jsx(
|
|
951
|
+
as || "div",
|
|
952
|
+
{
|
|
953
|
+
className: classNames(getVersionedClassname("sui-Grid"), className),
|
|
954
|
+
style,
|
|
955
|
+
"data-ui": "Grid",
|
|
956
|
+
...rest,
|
|
957
|
+
children
|
|
958
|
+
}
|
|
959
|
+
);
|
|
903
960
|
}
|
|
904
961
|
const hStackProps = {
|
|
905
962
|
as: {
|
|
@@ -913,7 +970,7 @@ function HStack(props) {
|
|
|
913
970
|
Flex,
|
|
914
971
|
{
|
|
915
972
|
as: as || "div",
|
|
916
|
-
className: classNames("sui-HStack", className),
|
|
973
|
+
className: classNames(getVersionedClassname("sui-HStack"), className),
|
|
917
974
|
style,
|
|
918
975
|
"data-ui": "HStack",
|
|
919
976
|
display: "inline-flex",
|
|
@@ -945,7 +1002,10 @@ function Heading({
|
|
|
945
1002
|
return props.lineClamp && props.trim ? /* @__PURE__ */ jsx(
|
|
946
1003
|
Component,
|
|
947
1004
|
{
|
|
948
|
-
className: classNames(
|
|
1005
|
+
className: classNames(
|
|
1006
|
+
getVersionedClassname("sui-Heading"),
|
|
1007
|
+
className?.replace("sui-line-clamp", "")
|
|
1008
|
+
),
|
|
949
1009
|
style,
|
|
950
1010
|
"data-ui": "Heading",
|
|
951
1011
|
...rest,
|
|
@@ -954,7 +1014,7 @@ function Heading({
|
|
|
954
1014
|
) : /* @__PURE__ */ jsx(
|
|
955
1015
|
Component,
|
|
956
1016
|
{
|
|
957
|
-
className: classNames("sui-Heading", className),
|
|
1017
|
+
className: classNames(getVersionedClassname("sui-Heading"), className),
|
|
958
1018
|
style,
|
|
959
1019
|
"data-ui": "Heading",
|
|
960
1020
|
...rest,
|
|
@@ -977,7 +1037,7 @@ function IconButton(props) {
|
|
|
977
1037
|
Button,
|
|
978
1038
|
{
|
|
979
1039
|
as: as || "button",
|
|
980
|
-
className: classNames("sui-IconButton", className),
|
|
1040
|
+
className: classNames(getVersionedClassname("sui-IconButton"), className),
|
|
981
1041
|
style,
|
|
982
1042
|
"data-ui": "IconButton",
|
|
983
1043
|
...rest,
|
|
@@ -1006,7 +1066,7 @@ function Indicator({
|
|
|
1006
1066
|
Box,
|
|
1007
1067
|
{
|
|
1008
1068
|
as: Component,
|
|
1009
|
-
className: classNames("sui-Indicator", className),
|
|
1069
|
+
className: classNames(getVersionedClassname("sui-Indicator"), className),
|
|
1010
1070
|
style,
|
|
1011
1071
|
"data-ui": "Indicator",
|
|
1012
1072
|
width: "5px",
|
|
@@ -1031,7 +1091,7 @@ function IndicatorStack(props) {
|
|
|
1031
1091
|
HStack,
|
|
1032
1092
|
{
|
|
1033
1093
|
as: as || "div",
|
|
1034
|
-
className: classNames("sui-IndicatorStack", className),
|
|
1094
|
+
className: classNames(getVersionedClassname("sui-IndicatorStack"), className),
|
|
1035
1095
|
style,
|
|
1036
1096
|
"data-ui": "IndicatorStack",
|
|
1037
1097
|
...rest,
|
|
@@ -1129,7 +1189,7 @@ function Inline(props) {
|
|
|
1129
1189
|
return /* @__PURE__ */ jsx(
|
|
1130
1190
|
Component,
|
|
1131
1191
|
{
|
|
1132
|
-
className: classNames("sui-Inline", className),
|
|
1192
|
+
className: classNames(getVersionedClassname("sui-Inline"), className),
|
|
1133
1193
|
style,
|
|
1134
1194
|
"data-ui": "Inline",
|
|
1135
1195
|
...rest,
|
|
@@ -1143,7 +1203,7 @@ const linkProps = {
|
|
|
1143
1203
|
},
|
|
1144
1204
|
underlined: {
|
|
1145
1205
|
type: "boolean",
|
|
1146
|
-
className: "
|
|
1206
|
+
className: "underlined"
|
|
1147
1207
|
}
|
|
1148
1208
|
};
|
|
1149
1209
|
function Link({ underlined = !0, ...props }) {
|
|
@@ -1154,7 +1214,7 @@ function Link({ underlined = !0, ...props }) {
|
|
|
1154
1214
|
return /* @__PURE__ */ jsx(
|
|
1155
1215
|
"a",
|
|
1156
1216
|
{
|
|
1157
|
-
className: classNames("sui-Link", className),
|
|
1217
|
+
className: classNames(getVersionedClassname("sui-Link"), className),
|
|
1158
1218
|
style,
|
|
1159
1219
|
"data-ui": "Link",
|
|
1160
1220
|
...openInNewTab ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
@@ -1202,7 +1262,16 @@ const listItemProps = {
|
|
|
1202
1262
|
};
|
|
1203
1263
|
function ListRoot(props) {
|
|
1204
1264
|
const { as, children, className, style, ...rest } = getProps(props, {});
|
|
1205
|
-
return /* @__PURE__ */ jsx(
|
|
1265
|
+
return /* @__PURE__ */ jsx(
|
|
1266
|
+
as || "ul",
|
|
1267
|
+
{
|
|
1268
|
+
className: classNames(getVersionedClassname("sui-List"), className),
|
|
1269
|
+
style,
|
|
1270
|
+
"data-ui": "List",
|
|
1271
|
+
...rest,
|
|
1272
|
+
children
|
|
1273
|
+
}
|
|
1274
|
+
);
|
|
1206
1275
|
}
|
|
1207
1276
|
function ListItem({ density = "regular", ...props }) {
|
|
1208
1277
|
const { children, className, style, trailing, ...rest } = getProps(
|
|
@@ -1213,7 +1282,7 @@ function ListItem({ density = "regular", ...props }) {
|
|
|
1213
1282
|
Flex,
|
|
1214
1283
|
{
|
|
1215
1284
|
as: "li",
|
|
1216
|
-
className: classNames("sui-ListItem", className),
|
|
1285
|
+
className: classNames(getVersionedClassname("sui-ListItem"), className),
|
|
1217
1286
|
style,
|
|
1218
1287
|
"data-ui": "ListItem",
|
|
1219
1288
|
alignItems: "center",
|
|
@@ -1231,7 +1300,7 @@ function ListItemText(props) {
|
|
|
1231
1300
|
Flex,
|
|
1232
1301
|
{
|
|
1233
1302
|
as: as || "div",
|
|
1234
|
-
className: classNames("sui-ListItemText", className),
|
|
1303
|
+
className: classNames(getVersionedClassname("sui-ListItemText"), className),
|
|
1235
1304
|
style,
|
|
1236
1305
|
"data-ui": "ListItemText",
|
|
1237
1306
|
flexDirection: "column",
|
|
@@ -1251,7 +1320,7 @@ function ListItemImage(props) {
|
|
|
1251
1320
|
return /* @__PURE__ */ jsx(
|
|
1252
1321
|
"img",
|
|
1253
1322
|
{
|
|
1254
|
-
className: classNames("sui-ListItemImage sui-radius2", className),
|
|
1323
|
+
className: classNames(getVersionedClassname("sui-ListItemImage"), "sui-radius2", className),
|
|
1255
1324
|
style,
|
|
1256
1325
|
"data-ui": "ListItemImage",
|
|
1257
1326
|
...rest
|
|
@@ -1263,24 +1332,6 @@ const List = ListRoot;
|
|
|
1263
1332
|
ListRoot.Item = ListItem;
|
|
1264
1333
|
ListRoot.ItemText = ListItemText;
|
|
1265
1334
|
ListRoot.ItemImage = ListItemImage;
|
|
1266
|
-
const pressAreaProps = {
|
|
1267
|
-
as: {
|
|
1268
|
-
type: "string"
|
|
1269
|
-
}
|
|
1270
|
-
};
|
|
1271
|
-
function PressArea(props) {
|
|
1272
|
-
const { as, children, className, style, ...rest } = getProps(props, pressAreaProps);
|
|
1273
|
-
return /* @__PURE__ */ jsx(
|
|
1274
|
-
as || "button",
|
|
1275
|
-
{
|
|
1276
|
-
className: classNames("sui-PressArea", "sui-width-full", className),
|
|
1277
|
-
style,
|
|
1278
|
-
"data-ui": "PressArea",
|
|
1279
|
-
...rest,
|
|
1280
|
-
children
|
|
1281
|
-
}
|
|
1282
|
-
);
|
|
1283
|
-
}
|
|
1284
1335
|
const radioProps = {
|
|
1285
1336
|
error: {
|
|
1286
1337
|
type: "boolean"
|
|
@@ -1295,7 +1346,7 @@ function Radio(props) {
|
|
|
1295
1346
|
return /* @__PURE__ */ jsxs(
|
|
1296
1347
|
Label,
|
|
1297
1348
|
{
|
|
1298
|
-
className: classNames("sui-Radio", className),
|
|
1349
|
+
className: classNames(getVersionedClassname("sui-Radio"), className),
|
|
1299
1350
|
style,
|
|
1300
1351
|
"data-ui": "Radio",
|
|
1301
1352
|
disabled,
|
|
@@ -1306,7 +1357,7 @@ function Radio(props) {
|
|
|
1306
1357
|
{
|
|
1307
1358
|
as: "input",
|
|
1308
1359
|
type: "radio",
|
|
1309
|
-
className: "sui-RadioInput",
|
|
1360
|
+
className: getVersionedClassname("sui-RadioInput"),
|
|
1310
1361
|
disabled,
|
|
1311
1362
|
...rest
|
|
1312
1363
|
}
|
|
@@ -1315,7 +1366,7 @@ function Radio(props) {
|
|
|
1315
1366
|
Box,
|
|
1316
1367
|
{
|
|
1317
1368
|
as: "span",
|
|
1318
|
-
className: classNames("sui-RadioMark", error && "sui-error"),
|
|
1369
|
+
className: classNames(getVersionedClassname("sui-RadioMark"), error && "sui-error"),
|
|
1319
1370
|
position: "relative",
|
|
1320
1371
|
radius: "full",
|
|
1321
1372
|
width: "17px",
|
|
@@ -1327,10 +1378,6 @@ function Radio(props) {
|
|
|
1327
1378
|
}
|
|
1328
1379
|
);
|
|
1329
1380
|
}
|
|
1330
|
-
const UI_VERSION = "0.0.1-alpha.17";
|
|
1331
|
-
function Root(props) {
|
|
1332
|
-
return /* @__PURE__ */ jsx("div", { "data-ui": "Root", "data-sui-version": UI_VERSION, children: props.children });
|
|
1333
|
-
}
|
|
1334
1381
|
const skipToContentProps = {
|
|
1335
1382
|
hash: {
|
|
1336
1383
|
type: "string"
|
|
@@ -1348,7 +1395,8 @@ function SkipToContent(props) {
|
|
|
1348
1395
|
href: hash,
|
|
1349
1396
|
underlined: !1,
|
|
1350
1397
|
className: classNames(
|
|
1351
|
-
"sui-SkipToContent
|
|
1398
|
+
getVersionedClassname("sui-SkipToContent"),
|
|
1399
|
+
"sui-position-absolute sui-top2 sui-left2 sui-display-inline-block sui-z-index sui-py2 sui-px3 sui-radius2 sui-text-body1",
|
|
1352
1400
|
className
|
|
1353
1401
|
),
|
|
1354
1402
|
style,
|
|
@@ -1373,7 +1421,7 @@ function Switch(props) {
|
|
|
1373
1421
|
return /* @__PURE__ */ jsxs(
|
|
1374
1422
|
Label,
|
|
1375
1423
|
{
|
|
1376
|
-
className: classNames("sui-Switch", className),
|
|
1424
|
+
className: classNames(getVersionedClassname("sui-Switch"), className),
|
|
1377
1425
|
style,
|
|
1378
1426
|
"data-ui": "Switch",
|
|
1379
1427
|
disabled: props.disabled,
|
|
@@ -1385,7 +1433,7 @@ function Switch(props) {
|
|
|
1385
1433
|
as: "input",
|
|
1386
1434
|
type: "checkbox",
|
|
1387
1435
|
role: "switch",
|
|
1388
|
-
className: "sui-SwitchInput",
|
|
1436
|
+
className: getVersionedClassname("sui-SwitchInput"),
|
|
1389
1437
|
disabled,
|
|
1390
1438
|
...rest
|
|
1391
1439
|
}
|
|
@@ -1394,7 +1442,7 @@ function Switch(props) {
|
|
|
1394
1442
|
Flex,
|
|
1395
1443
|
{
|
|
1396
1444
|
as: "span",
|
|
1397
|
-
className: classNames("sui-SwitchMark", error && "sui-error"),
|
|
1445
|
+
className: classNames(getVersionedClassname("sui-SwitchMark"), error && "sui-error"),
|
|
1398
1446
|
alignItems: "center",
|
|
1399
1447
|
radius: 6,
|
|
1400
1448
|
"aria-hidden": "true"
|
|
@@ -1472,7 +1520,11 @@ function Tooltip({ placement = "bottom", ...props }) {
|
|
|
1472
1520
|
/* @__PURE__ */ jsx(
|
|
1473
1521
|
Box,
|
|
1474
1522
|
{
|
|
1475
|
-
className: classNames(
|
|
1523
|
+
className: classNames(
|
|
1524
|
+
getVersionedClassname("sui-Tooltip"),
|
|
1525
|
+
dismissed ? getVersionedClassname("sui-Tooltip-Dismissed") : "",
|
|
1526
|
+
className
|
|
1527
|
+
),
|
|
1476
1528
|
role: "tooltip",
|
|
1477
1529
|
style: {
|
|
1478
1530
|
...style,
|
|
@@ -1509,7 +1561,7 @@ function TooltipGroup(props) {
|
|
|
1509
1561
|
return /* @__PURE__ */ jsx(
|
|
1510
1562
|
Component,
|
|
1511
1563
|
{
|
|
1512
|
-
className: classNames("sui-TooltipGroup", className),
|
|
1564
|
+
className: classNames(getVersionedClassname("sui-TooltipGroup"), className),
|
|
1513
1565
|
style: {
|
|
1514
1566
|
...style,
|
|
1515
1567
|
...isActive && {
|
|
@@ -1538,7 +1590,7 @@ function VStack(props) {
|
|
|
1538
1590
|
Flex,
|
|
1539
1591
|
{
|
|
1540
1592
|
as: as || "div",
|
|
1541
|
-
className: classNames("sui-VStack", className),
|
|
1593
|
+
className: classNames(getVersionedClassname("sui-VStack"), className),
|
|
1542
1594
|
style,
|
|
1543
1595
|
"data-ui": "VStack",
|
|
1544
1596
|
flexDirection: "column",
|
|
@@ -1547,6 +1599,24 @@ function VStack(props) {
|
|
|
1547
1599
|
}
|
|
1548
1600
|
);
|
|
1549
1601
|
}
|
|
1602
|
+
const pressAreaProps = {
|
|
1603
|
+
as: {
|
|
1604
|
+
type: "string"
|
|
1605
|
+
}
|
|
1606
|
+
};
|
|
1607
|
+
function PressArea(props) {
|
|
1608
|
+
const { as, children, className, style, ...rest } = getProps(props, pressAreaProps);
|
|
1609
|
+
return /* @__PURE__ */ jsx(
|
|
1610
|
+
as || "button",
|
|
1611
|
+
{
|
|
1612
|
+
className: classNames(getVersionedClassname("sui-PressArea"), "sui-width-full", className),
|
|
1613
|
+
style,
|
|
1614
|
+
"data-ui": "PressArea",
|
|
1615
|
+
...rest,
|
|
1616
|
+
children
|
|
1617
|
+
}
|
|
1618
|
+
);
|
|
1619
|
+
}
|
|
1550
1620
|
export {
|
|
1551
1621
|
Box,
|
|
1552
1622
|
Button,
|
|
@@ -1569,7 +1639,6 @@ export {
|
|
|
1569
1639
|
List,
|
|
1570
1640
|
PressArea,
|
|
1571
1641
|
Radio,
|
|
1572
|
-
Root,
|
|
1573
1642
|
SkipToContent,
|
|
1574
1643
|
Spinner,
|
|
1575
1644
|
Switch,
|