aidos-ui 5.0.0 → 5.0.1

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.js CHANGED
@@ -1,8 +1,8 @@
1
- import React33, { useId, useContext, useMemo, cloneElement, useState, useRef, useEffect, useCallback, useSyncExternalStore, createContext, startTransition } from 'react';
2
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
1
+ import React34, { useState, useId, useContext, useMemo, cloneElement, useRef, useEffect, useCallback, useSyncExternalStore, createContext, startTransition } from 'react';
2
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import { Icon as Icon$1 } from '@iconify/react';
4
4
 
5
- // src/BaseView.tsx
5
+ // src/Avatar.tsx
6
6
 
7
7
  // src/hash.ts
8
8
  function hash(source, modulus) {
@@ -604,9 +604,9 @@ var styles = {
604
604
  flexShrink: 1
605
605
  }
606
606
  };
607
- var BaseView = React33.forwardRef(function BaseView2({ jss, children, tag, grow, shrink, relative, ...otherProps }, ref) {
607
+ var BaseView = React34.forwardRef(function BaseView2({ jss, children, tag, grow, shrink, relative, ...otherProps }, ref) {
608
608
  const Tag = tag ?? "div";
609
- return React33.createElement(
609
+ return React34.createElement(
610
610
  Tag,
611
611
  {
612
612
  ...otherProps,
@@ -621,6 +621,279 @@ var BaseView = React33.forwardRef(function BaseView2({ jss, children, tag, grow,
621
621
  children
622
622
  );
623
623
  });
624
+ var styles2 = {
625
+ root: {
626
+ display: "flex",
627
+ justifyContent: "center",
628
+ alignItems: "center",
629
+ " svg": {
630
+ height: "inherit",
631
+ width: "inherit"
632
+ }
633
+ },
634
+ xsmall: {
635
+ height: 8,
636
+ width: 8
637
+ },
638
+ small: {
639
+ height: 12,
640
+ width: 12
641
+ },
642
+ medium: {
643
+ height: 18,
644
+ width: 18
645
+ },
646
+ large: {
647
+ height: 24,
648
+ width: 24
649
+ },
650
+ xlarge: {
651
+ height: 32,
652
+ width: 32
653
+ },
654
+ xxlarge: {
655
+ height: 48,
656
+ width: 48
657
+ },
658
+ xxxlarge: {
659
+ height: 64,
660
+ width: 64
661
+ }
662
+ };
663
+ function Icon({
664
+ icon,
665
+ size,
666
+ color,
667
+ ariaLabel
668
+ }) {
669
+ return /* @__PURE__ */ jsx(
670
+ BaseView,
671
+ {
672
+ "aria-label": ariaLabel,
673
+ jss: [
674
+ styles2.root,
675
+ size === "xsmall" && styles2.xsmall,
676
+ size === "small" && styles2.small,
677
+ size === "medium" && styles2.medium,
678
+ size === "large" && styles2.large,
679
+ size === "xlarge" && styles2.xlarge,
680
+ size === "xxlarge" && styles2.xxlarge,
681
+ size === "xxxlarge" && styles2.xxxlarge,
682
+ getTextColor(color)
683
+ ],
684
+ children: /* @__PURE__ */ jsx(Icon$1, { icon: `lucide:${icon}`, width: "100%", height: "100%" })
685
+ }
686
+ );
687
+ }
688
+
689
+ // src/typography.ts
690
+ var fontSize = {
691
+ xsmall: cssVar("--font-xsmall"),
692
+ small: cssVar("--font-small"),
693
+ medium: cssVar("--font-medium"),
694
+ large: cssVar("--font-large"),
695
+ xlarge: cssVar("--font-xlarge"),
696
+ xxlarge: cssVar("--font-xxlarge"),
697
+ xxxlarge: cssVar("--font-xxxlarge")
698
+ };
699
+ var lineHeight = {
700
+ xsmall: 14 / 10,
701
+ small: 16 / 12,
702
+ medium: 20 / 14,
703
+ large: 24 / 18,
704
+ xlarge: 28 / 22,
705
+ xxlarge: 34 / 28,
706
+ xxxlarge: 42 / 36
707
+ };
708
+ function getTypography(size) {
709
+ return {
710
+ fontSize: fontSize[size],
711
+ lineHeight: lineHeight[size]
712
+ };
713
+ }
714
+ function Text({
715
+ children,
716
+ color = "primary",
717
+ size = "medium",
718
+ align = "none",
719
+ bold = false,
720
+ ellipsis = "default",
721
+ grow,
722
+ type: Type = "span",
723
+ jss,
724
+ htmlFor,
725
+ ...elementProps
726
+ }) {
727
+ if (ellipsis === "default") {
728
+ ellipsis = Type === "span" || Type === "label";
729
+ }
730
+ const isHeading = Type === "h1" || Type === "h2" || Type === "h3" || Type === "h4";
731
+ const className = toClassnames([
732
+ getTextColor(color),
733
+ { ...getTypography(size), padding: 0, margin: 0 },
734
+ isHeading && { fontWeight: "inherit" },
735
+ bold && { fontWeight: 600 },
736
+ align === "center" && { textAlign: "center" },
737
+ ellipsis && {
738
+ overflow: "hidden",
739
+ textOverflow: "ellipsis",
740
+ whiteSpace: "nowrap"
741
+ },
742
+ grow && { flexGrow: 1 },
743
+ jss
744
+ ]);
745
+ return /* @__PURE__ */ jsx(Type, { ...elementProps, className, htmlFor, children });
746
+ }
747
+ function Label({ size = "medium", type = "label", ...rest }) {
748
+ return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
749
+ }
750
+ function Span({ size = "medium", type = "span", ...rest }) {
751
+ return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
752
+ }
753
+ function P({ size = "medium", type = "p", ...rest }) {
754
+ return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
755
+ }
756
+ function H1({ size = "xxlarge", type = "h1", ...rest }) {
757
+ return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
758
+ }
759
+ function H2({ size = "xlarge", type = "h2", ...rest }) {
760
+ return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
761
+ }
762
+ function H3({ size = "large", type = "h3", ...rest }) {
763
+ return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
764
+ }
765
+ function H4({ size = "medium", type = "h4", ...rest }) {
766
+ return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
767
+ }
768
+ function Li({ size = "medium", type = "li", ...rest }) {
769
+ return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
770
+ }
771
+ var dimensions = {
772
+ small: 24,
773
+ medium: 34,
774
+ large: 48
775
+ };
776
+ var textSizes = {
777
+ small: "small",
778
+ medium: "medium",
779
+ large: "large"
780
+ };
781
+ function normalizeName(name) {
782
+ return name.normalize("NFKC").trim();
783
+ }
784
+ function getInitial(name) {
785
+ const normalized = normalizeName(name);
786
+ if (normalized === "") return null;
787
+ const meaningfulCharacter = normalized.match(/[\p{L}\p{N}]/u)?.[0];
788
+ const character = meaningfulCharacter ?? Array.from(normalized)[0];
789
+ return Array.from(character.toLocaleUpperCase())[0] ?? null;
790
+ }
791
+ function getGradient(name) {
792
+ const seed = hash(normalizeName(name).toLocaleLowerCase());
793
+ const firstHue = seed % 360;
794
+ const secondHue = (firstHue + 35 + seed % 55) % 360;
795
+ return `radial-gradient(circle at 24% 18%, hsl(${secondHue} 68% 58%), transparent 54%), linear-gradient(145deg, hsl(${firstHue} 62% 48%), hsl(${secondHue} 58% 38%))`;
796
+ }
797
+ var Avatar = React34.forwardRef(function Avatar2({ name, src, size = "medium", badge, jss }, ref) {
798
+ const [failedSrc, setFailedSrc] = useState();
799
+ const dimension = dimensions[size];
800
+ const initial = getInitial(name);
801
+ const showImage = src != null && src !== "" && failedSrc !== src;
802
+ return /* @__PURE__ */ jsxs(
803
+ BaseView,
804
+ {
805
+ ref,
806
+ tag: "span",
807
+ role: "img",
808
+ "aria-label": name || "User",
809
+ jss: [
810
+ {
811
+ position: "relative",
812
+ display: "inline-flex",
813
+ width: dimension,
814
+ height: dimension,
815
+ flex: `0 0 ${dimension}px`,
816
+ verticalAlign: "middle"
817
+ },
818
+ jss
819
+ ],
820
+ children: [
821
+ /* @__PURE__ */ jsxs(
822
+ BaseView,
823
+ {
824
+ tag: "span",
825
+ jss: {
826
+ position: "relative",
827
+ display: "flex",
828
+ width: "100%",
829
+ height: "100%",
830
+ alignItems: "center",
831
+ justifyContent: "center",
832
+ overflow: "hidden",
833
+ borderRadius: "50%",
834
+ background: getGradient(name),
835
+ color: cssVar("--light-text"),
836
+ userSelect: "none"
837
+ },
838
+ children: [
839
+ initial == null ? /* @__PURE__ */ jsx(Icon, { icon: "user", size: textSizes[size], color: "light" }) : /* @__PURE__ */ jsx(
840
+ Span,
841
+ {
842
+ size: textSizes[size],
843
+ color: "light",
844
+ bold: true,
845
+ "aria-hidden": "true",
846
+ jss: { lineHeight: 1, textShadow: "0 1px 2px rgba(0, 0, 0, 0.2)" },
847
+ children: initial
848
+ }
849
+ ),
850
+ showImage && /* @__PURE__ */ jsx(
851
+ "img",
852
+ {
853
+ ref: (image) => {
854
+ if (image?.complete && image.naturalWidth === 0) {
855
+ setFailedSrc(src);
856
+ }
857
+ },
858
+ src,
859
+ alt: "",
860
+ draggable: false,
861
+ onError: () => setFailedSrc(src),
862
+ style: {
863
+ position: "absolute",
864
+ inset: 0,
865
+ width: "100%",
866
+ height: "100%",
867
+ objectFit: "cover"
868
+ }
869
+ },
870
+ src
871
+ )
872
+ ]
873
+ }
874
+ ),
875
+ badge != null && /* @__PURE__ */ jsx(
876
+ BaseView,
877
+ {
878
+ tag: "span",
879
+ "aria-hidden": "true",
880
+ jss: {
881
+ position: "absolute",
882
+ right: 0,
883
+ bottom: 0,
884
+ display: "flex",
885
+ borderRadius: "50%",
886
+ boxShadow: `0 0 0 2px ${cssVar("--overlay-background")}`,
887
+ pointerEvents: "none"
888
+ },
889
+ children: badge
890
+ }
891
+ )
892
+ ]
893
+ }
894
+ );
895
+ });
896
+ Avatar.displayName = "Avatar";
624
897
  var sizes2 = {
625
898
  xsmall: 4,
626
899
  small: 6,
@@ -652,7 +925,7 @@ function Badge({
652
925
  }
653
926
 
654
927
  // src/Interactable.tsx
655
- var styles2 = {
928
+ var styles3 = {
656
929
  root: {
657
930
  cursor: "pointer",
658
931
  display: "inline-flex",
@@ -725,18 +998,18 @@ function getInteractableJSS({
725
998
  border
726
999
  }) {
727
1000
  return [
728
- styles2.root,
729
- color === "primary" && styles2.primary,
730
- color === "secondary" && styles2.secondary,
731
- color === "negative" && styles2.negative,
732
- color === "inverse" && styles2.inverse,
1001
+ styles3.root,
1002
+ color === "primary" && styles3.primary,
1003
+ color === "secondary" && styles3.secondary,
1004
+ color === "negative" && styles3.negative,
1005
+ color === "inverse" && styles3.inverse,
733
1006
  border && {
734
1007
  border: `1px solid ${getCSSColor(color, disabled, bare)}`
735
1008
  },
736
- bare && styles2.bare,
737
- disabled && styles2.disabled,
1009
+ bare && styles3.bare,
1010
+ disabled && styles3.disabled,
738
1011
  !bare && !disabled && { boxShadow: cssVar("--shadow-sm") },
739
- styles2.opacityHover,
1012
+ styles3.opacityHover,
740
1013
  animateInteraction && !disabled && {
741
1014
  position: "relative",
742
1015
  ":active": {
@@ -814,7 +1087,7 @@ var getInteractableListItemJSS = ({
814
1087
  }
815
1088
  ];
816
1089
  };
817
- var BaseButton = React33.forwardRef(function BaseButton2({
1090
+ var BaseButton = React34.forwardRef(function BaseButton2({
818
1091
  onClick,
819
1092
  children,
820
1093
  jss,
@@ -855,90 +1128,7 @@ var BaseButton = React33.forwardRef(function BaseButton2({
855
1128
  }
856
1129
  );
857
1130
  });
858
-
859
- // src/typography.ts
860
- var fontSize = {
861
- xsmall: cssVar("--font-xsmall"),
862
- small: cssVar("--font-small"),
863
- medium: cssVar("--font-medium"),
864
- large: cssVar("--font-large"),
865
- xlarge: cssVar("--font-xlarge"),
866
- xxlarge: cssVar("--font-xxlarge"),
867
- xxxlarge: cssVar("--font-xxxlarge")
868
- };
869
- var lineHeight = {
870
- xsmall: 14 / 10,
871
- small: 16 / 12,
872
- medium: 20 / 14,
873
- large: 24 / 18,
874
- xlarge: 28 / 22,
875
- xxlarge: 34 / 28,
876
- xxxlarge: 42 / 36
877
- };
878
- function getTypography(size) {
879
- return {
880
- fontSize: fontSize[size],
881
- lineHeight: lineHeight[size]
882
- };
883
- }
884
- function Text({
885
- children,
886
- color = "primary",
887
- size = "medium",
888
- align = "none",
889
- bold = false,
890
- ellipsis = "default",
891
- grow,
892
- type: Type = "span",
893
- jss,
894
- htmlFor,
895
- ...elementProps
896
- }) {
897
- if (ellipsis === "default") {
898
- ellipsis = Type === "span" || Type === "label";
899
- }
900
- const isHeading = Type === "h1" || Type === "h2" || Type === "h3" || Type === "h4";
901
- const className = toClassnames([
902
- getTextColor(color),
903
- { ...getTypography(size), padding: 0, margin: 0 },
904
- isHeading && { fontWeight: "inherit" },
905
- bold && { fontWeight: 600 },
906
- align === "center" && { textAlign: "center" },
907
- ellipsis && {
908
- overflow: "hidden",
909
- textOverflow: "ellipsis",
910
- whiteSpace: "nowrap"
911
- },
912
- grow && { flexGrow: 1 },
913
- jss
914
- ]);
915
- return /* @__PURE__ */ jsx(Type, { ...elementProps, className, htmlFor, children });
916
- }
917
- function Label({ size = "medium", type = "label", ...rest }) {
918
- return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
919
- }
920
- function Span({ size = "medium", type = "span", ...rest }) {
921
- return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
922
- }
923
- function P({ size = "medium", type = "p", ...rest }) {
924
- return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
925
- }
926
- function H1({ size = "xxlarge", type = "h1", ...rest }) {
927
- return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
928
- }
929
- function H2({ size = "xlarge", type = "h2", ...rest }) {
930
- return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
931
- }
932
- function H3({ size = "large", type = "h3", ...rest }) {
933
- return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
934
- }
935
- function H4({ size = "medium", type = "h4", ...rest }) {
936
- return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
937
- }
938
- function Li({ size = "medium", type = "li", ...rest }) {
939
- return /* @__PURE__ */ jsx(Text, { size, type, ...rest });
940
- }
941
- var BaseInput = React33.forwardRef(function BaseInput2({
1131
+ var BaseInput = React34.forwardRef(function BaseInput2({
942
1132
  jss,
943
1133
  label,
944
1134
  labelPosition = "end",
@@ -971,8 +1161,8 @@ var BaseInput = React33.forwardRef(function BaseInput2({
971
1161
  label && labelPosition === "end" && labelElement
972
1162
  ] });
973
1163
  });
974
- var BaseLinkComponentOverrideContext = React33.createContext((props) => /* @__PURE__ */ jsx("a", { ...props }));
975
- var BaseLink = React33.forwardRef(function BaseLink2({
1164
+ var BaseLinkComponentOverrideContext = React34.createContext((props) => /* @__PURE__ */ jsx("a", { ...props }));
1165
+ var BaseLink = React34.forwardRef(function BaseLink2({
976
1166
  onClick,
977
1167
  children,
978
1168
  jss,
@@ -1017,7 +1207,7 @@ var BaseLink = React33.forwardRef(function BaseLink2({
1017
1207
  }
1018
1208
  );
1019
1209
  });
1020
- var FlexLayout = React33.forwardRef(function FlexLayout2({
1210
+ var FlexLayout = React34.forwardRef(function FlexLayout2({
1021
1211
  jss,
1022
1212
  gap = "none",
1023
1213
  justify = "none",
@@ -1045,10 +1235,10 @@ var FlexLayout = React33.forwardRef(function FlexLayout2({
1045
1235
  }
1046
1236
  );
1047
1237
  });
1048
- var Column = React33.forwardRef(function Column2(props, ref) {
1238
+ var Column = React34.forwardRef(function Column2(props, ref) {
1049
1239
  return /* @__PURE__ */ jsx(FlexLayout, { ref, direction: "column", ...props });
1050
1240
  });
1051
- var BaseList = React33.forwardRef(function BaseList2({ jss, ...otherProps }, ref) {
1241
+ var BaseList = React34.forwardRef(function BaseList2({ jss, ...otherProps }, ref) {
1052
1242
  return /* @__PURE__ */ jsx(
1053
1243
  Column,
1054
1244
  {
@@ -1069,10 +1259,10 @@ var BaseList = React33.forwardRef(function BaseList2({ jss, ...otherProps }, ref
1069
1259
  }
1070
1260
  );
1071
1261
  });
1072
- var BaseListAddOn = React33.forwardRef(function BaseListAddOn2(props, ref) {
1262
+ var BaseListAddOn = React34.forwardRef(function BaseListAddOn2(props, ref) {
1073
1263
  return /* @__PURE__ */ jsx(BaseView, { ...props, ref });
1074
1264
  });
1075
- var Row = React33.forwardRef(function Row2(props, ref) {
1265
+ var Row = React34.forwardRef(function Row2(props, ref) {
1076
1266
  return /* @__PURE__ */ jsx(FlexLayout, { ref, direction: "row", ...props });
1077
1267
  });
1078
1268
  function TextPairing({
@@ -1157,7 +1347,7 @@ function TextPairing({
1157
1347
  }
1158
1348
  return textElement;
1159
1349
  }
1160
- var BaseListItem = React33.forwardRef(function BaseListItem2({
1350
+ var BaseListItem = React34.forwardRef(function BaseListItem2({
1161
1351
  children,
1162
1352
  jss,
1163
1353
  headline,
@@ -1227,71 +1417,7 @@ function Box({
1227
1417
  }
1228
1418
  );
1229
1419
  }
1230
- var styles3 = {
1231
- root: {
1232
- display: "flex",
1233
- justifyContent: "center",
1234
- alignItems: "center",
1235
- " svg": {
1236
- height: "inherit",
1237
- width: "inherit"
1238
- }
1239
- },
1240
- xsmall: {
1241
- height: 8,
1242
- width: 8
1243
- },
1244
- small: {
1245
- height: 12,
1246
- width: 12
1247
- },
1248
- medium: {
1249
- height: 18,
1250
- width: 18
1251
- },
1252
- large: {
1253
- height: 24,
1254
- width: 24
1255
- },
1256
- xlarge: {
1257
- height: 32,
1258
- width: 32
1259
- },
1260
- xxlarge: {
1261
- height: 48,
1262
- width: 48
1263
- },
1264
- xxxlarge: {
1265
- height: 64,
1266
- width: 64
1267
- }
1268
- };
1269
- function Icon({
1270
- icon,
1271
- size,
1272
- color,
1273
- ariaLabel
1274
- }) {
1275
- return /* @__PURE__ */ jsx(
1276
- BaseView,
1277
- {
1278
- "aria-label": ariaLabel,
1279
- jss: [
1280
- styles3.root,
1281
- size === "xsmall" && styles3.xsmall,
1282
- size === "small" && styles3.small,
1283
- size === "medium" && styles3.medium,
1284
- size === "large" && styles3.large,
1285
- size === "xlarge" && styles3.xlarge,
1286
- size === "xxlarge" && styles3.xxlarge,
1287
- size === "xxxlarge" && styles3.xxxlarge,
1288
- getTextColor(color)
1289
- ],
1290
- children: /* @__PURE__ */ jsx(Icon$1, { icon: `lucide:${icon}`, width: "100%", height: "100%" })
1291
- }
1292
- );
1293
- }
1294
- var Button = React33.forwardRef(function Button2({
1420
+ var Button = React34.forwardRef(function Button2({
1295
1421
  children,
1296
1422
  color,
1297
1423
  bare,
@@ -1561,7 +1687,7 @@ var THU = dateFormatter.format(new Date(2e3, 1, 10));
1561
1687
  var FRI = dateFormatter.format(new Date(2e3, 1, 11));
1562
1688
  var SAT = dateFormatter.format(new Date(2e3, 1, 12));
1563
1689
  var SUN = dateFormatter.format(new Date(2e3, 1, 13));
1564
- var Calendar = React33.forwardRef(function Calendar2({
1690
+ var Calendar = React34.forwardRef(function Calendar2({
1565
1691
  date,
1566
1692
  cell,
1567
1693
  header,
@@ -1814,7 +1940,7 @@ function Circle({
1814
1940
  }
1815
1941
  );
1816
1942
  }
1817
- var IconButton = React33.forwardRef(function IconButton2({ icon, color, bare, disabled, jss, label, ...buttonProps }, ref) {
1943
+ var IconButton = React34.forwardRef(function IconButton2({ icon, color, bare, disabled, jss, label, ...buttonProps }, ref) {
1818
1944
  return /* @__PURE__ */ jsxs(
1819
1945
  BaseButton,
1820
1946
  {
@@ -1871,7 +1997,7 @@ function Toggle({
1871
1997
  }
1872
1998
  );
1873
1999
  }
1874
- var DarkModeContext = React33.createContext({
2000
+ var DarkModeContext = React34.createContext({
1875
2001
  enabled: false,
1876
2002
  toggle: () => {
1877
2003
  }
@@ -1938,7 +2064,7 @@ function DarkModeToggle() {
1938
2064
  }
1939
2065
  );
1940
2066
  }
1941
- var InputFrame = React33.forwardRef(function InputFrame2({ children, jss, ...rowProps }, ref) {
2067
+ var InputFrame = React34.forwardRef(function InputFrame2({ children, jss, ...rowProps }, ref) {
1942
2068
  return /* @__PURE__ */ jsx(
1943
2069
  Row,
1944
2070
  {
@@ -1977,7 +2103,7 @@ var InputFrame = React33.forwardRef(function InputFrame2({ children, jss, ...row
1977
2103
  }
1978
2104
  );
1979
2105
  });
1980
- var NumericInputSegment = React33.forwardRef(
2106
+ var NumericInputSegment = React34.forwardRef(
1981
2107
  function NumericInputSegment2({
1982
2108
  value,
1983
2109
  label,
@@ -2534,7 +2660,7 @@ function DateCalendar({
2534
2660
  )
2535
2661
  ] });
2536
2662
  }
2537
- var DateInput = React33.forwardRef(function DateInput2({
2663
+ var DateInput = React34.forwardRef(function DateInput2({
2538
2664
  date,
2539
2665
  onDateChange,
2540
2666
  label,
@@ -2719,7 +2845,7 @@ var styles6 = {
2719
2845
  }
2720
2846
  }
2721
2847
  };
2722
- var DatetimeInput = React33.forwardRef(function DatetimeInput2({ date, onDateChange, jss, icon, addOn, ...inputProps }, ref) {
2848
+ var DatetimeInput = React34.forwardRef(function DatetimeInput2({ date, onDateChange, jss, icon, addOn, ...inputProps }, ref) {
2723
2849
  return /* @__PURE__ */ jsxs(Row, { jss: styles6.root, children: [
2724
2850
  icon && /* @__PURE__ */ jsx(Box, { padding: "medium", children: /* @__PURE__ */ jsx(Icon, { size: "medium", color: "secondary", icon }) }),
2725
2851
  /* @__PURE__ */ jsx(
@@ -2805,7 +2931,7 @@ var Dialog = ({
2805
2931
  /* @__PURE__ */ jsx(BaseView, { jss: styles8.content, children })
2806
2932
  ] });
2807
2933
  };
2808
- var DialogContext = React33.createContext({
2934
+ var DialogContext = React34.createContext({
2809
2935
  setDialog: () => {
2810
2936
  }
2811
2937
  });
@@ -2892,7 +3018,7 @@ function guid() {
2892
3018
  return v.toString(16);
2893
3019
  });
2894
3020
  }
2895
- var IconLink = React33.forwardRef(function IconLink2({ icon, color, bare, disabled, jss, ...otherProps }, ref) {
3021
+ var IconLink = React34.forwardRef(function IconLink2({ icon, color, bare, disabled, jss, ...otherProps }, ref) {
2896
3022
  return /* @__PURE__ */ jsx(
2897
3023
  BaseLink,
2898
3024
  {
@@ -2924,7 +3050,7 @@ var IconLink = React33.forwardRef(function IconLink2({ icon, color, bare, disabl
2924
3050
  }
2925
3051
  );
2926
3052
  });
2927
- var Link = React33.forwardRef(function Link2({
3053
+ var Link = React34.forwardRef(function Link2({
2928
3054
  children,
2929
3055
  color,
2930
3056
  bare,
@@ -3030,7 +3156,7 @@ function List({
3030
3156
  }
3031
3157
  );
3032
3158
  }
3033
- var ListButtonItem = React33.forwardRef(function ListButtonItem2({
3159
+ var ListButtonItem = React34.forwardRef(function ListButtonItem2({
3034
3160
  onClick,
3035
3161
  color = "secondary",
3036
3162
  disabled = false,
@@ -3089,10 +3215,10 @@ function ListHeaderItem({
3089
3215
  }
3090
3216
  );
3091
3217
  }
3092
- var ListItem = React33.forwardRef(function ListItem2(props, ref) {
3218
+ var ListItem = React34.forwardRef(function ListItem2(props, ref) {
3093
3219
  return /* @__PURE__ */ jsx(BaseListItem, { ...props, jss: props.jss, ref, children: ({ content }) => content });
3094
3220
  });
3095
- var ListLinkItem = React33.forwardRef(function ListLinkItem2({
3221
+ var ListLinkItem = React34.forwardRef(function ListLinkItem2({
3096
3222
  onClick,
3097
3223
  href,
3098
3224
  disabled = false,
@@ -3651,13 +3777,13 @@ function Providers({
3651
3777
  initialValue: false,
3652
3778
  loadingValue: false
3653
3779
  });
3654
- const toggleDarkMode = React33.useCallback(
3780
+ const toggleDarkMode = React34.useCallback(
3655
3781
  () => setDarkModeEnabled((x) => !x),
3656
3782
  [setDarkModeEnabled]
3657
3783
  );
3658
3784
  return /* @__PURE__ */ jsx(JSSProvider, { themes, children: /* @__PURE__ */ jsx(DarkModeProvider, { enabled: darkModeEnabled, toggle: toggleDarkMode, children: /* @__PURE__ */ jsx(DialogProvider, { children }) }) });
3659
3785
  }
3660
- var RangeInput = React33.forwardRef(function RangeInput2({
3786
+ var RangeInput = React34.forwardRef(function RangeInput2({
3661
3787
  value,
3662
3788
  onValueChange,
3663
3789
  jssRoot,
@@ -3724,7 +3850,7 @@ var RangeInput = React33.forwardRef(function RangeInput2({
3724
3850
  }
3725
3851
  );
3726
3852
  });
3727
- var StackContext = React33.createContext({
3853
+ var StackContext = React34.createContext({
3728
3854
  subscribe: () => {
3729
3855
  return () => {
3730
3856
  };
@@ -3864,7 +3990,7 @@ function Select({
3864
3990
  );
3865
3991
  }
3866
3992
  function stateMachineContextFactory(stateMachineConfig) {
3867
- const StateMachineContext = React33.createContext({
3993
+ const StateMachineContext = React34.createContext({
3868
3994
  subscribe: () => {
3869
3995
  throw new Error("Not implemented");
3870
3996
  },
@@ -3972,7 +4098,7 @@ function createStorage({
3972
4098
  }
3973
4099
  function useStorage(selector) {
3974
4100
  const [localState, setLocalState] = useState(() => selector(state.current));
3975
- const { subscribe } = React33.useContext(StorageContext);
4101
+ const { subscribe } = React34.useContext(StorageContext);
3976
4102
  useEffect(() => {
3977
4103
  return subscribe((newState) => {
3978
4104
  const newLocalState = selector(newState);
@@ -3982,11 +4108,11 @@ function createStorage({
3982
4108
  return localState;
3983
4109
  }
3984
4110
  function useMutation() {
3985
- const { mutate } = React33.useContext(StorageContext);
4111
+ const { mutate } = React34.useContext(StorageContext);
3986
4112
  return mutate;
3987
4113
  }
3988
4114
  function usePersist() {
3989
- const { persist } = React33.useContext(StorageContext);
4115
+ const { persist } = React34.useContext(StorageContext);
3990
4116
  return persist;
3991
4117
  }
3992
4118
  const dbPromise = new Promise((resolve, reject) => {
@@ -4106,7 +4232,7 @@ function Sublist({
4106
4232
  jss,
4107
4233
  secondaryAddOn
4108
4234
  }) {
4109
- const [collapsed, setCollapsed] = React33.useState(initialState.collapsed);
4235
+ const [collapsed, setCollapsed] = React34.useState(initialState.collapsed);
4110
4236
  return /* @__PURE__ */ jsxs(Fragment, { children: [
4111
4237
  /* @__PURE__ */ jsx(
4112
4238
  ListButtonItem,
@@ -4511,7 +4637,7 @@ function Tabs({
4511
4637
  }
4512
4638
  );
4513
4639
  }
4514
- var TextArea = React33.forwardRef(function TextArea2({
4640
+ var TextArea = React34.forwardRef(function TextArea2({
4515
4641
  jss,
4516
4642
  onValueChange,
4517
4643
  value,
@@ -4549,7 +4675,7 @@ var TextArea = React33.forwardRef(function TextArea2({
4549
4675
  }
4550
4676
  );
4551
4677
  });
4552
- var TextInput = React33.forwardRef(function TextInput2({
4678
+ var TextInput = React34.forwardRef(function TextInput2({
4553
4679
  value,
4554
4680
  onValueChange,
4555
4681
  jssRoot,
@@ -4661,7 +4787,7 @@ function parseSegments2(segments, base) {
4661
4787
  minute
4662
4788
  );
4663
4789
  }
4664
- var TimeInput = React33.forwardRef(function TimeInput2({
4790
+ var TimeInput = React34.forwardRef(function TimeInput2({
4665
4791
  time,
4666
4792
  onTimeChange,
4667
4793
  label,
@@ -4929,6 +5055,6 @@ function usePromise(promiseFactory, inputs, initialValue) {
4929
5055
  return [value, error];
4930
5056
  }
4931
5057
 
4932
- export { Badge, BaseButton, BaseInput, BaseLink, BaseLinkComponentOverrideContext, BaseList, BaseListAddOn, BaseListItem, BaseView, Box, Button, ButtonGroup, Calendar, Card, Checkbox, Circle, Column, DESKTOP_MEDIA, DarkModeContext, DarkModeProvider, DarkModeToggle, DateInput, DatetimeInput, Dialog, DialogProvider, FlexLayout, H1, H2, H3, H4, Icon, IconButton, IconLink, JSSProvider, JSServerStyles, LAPTOP, LAPTOP_MEDIA, Label, Li, Link, List, ListButtonItem, ListDivider, ListHeaderItem, ListItem, ListLinkItem, ListSpacer, MOBILE, MOBILE_MEDIA, MenuIcon, NavigationSplitView, OnVisible, P, Popover, PopoverTrigger, ProgressBar, ProgressCircle, Providers, RangeInput, RootView, Row, Select, Span, StackContextProvider, StaticCheckbox, Sublist, SubmitIconInput, TABLET, TABLET_MEDIA, TabBar, Table, Tabs, Text, TextArea, TextInput, TextInputWithState, TextPairing, TimeInput, Toggle, Tooltip, baseStyles, createEmitter, createStorage, cssVar, darkTheme, desktop, getBackground, getBaseStyles, getColorValue, getCookie, getMargin, getMaterial, getPadding, getSize, getSpacing, getTextColor, guid, hasCookie, hash, laptop, lightTheme, mobile, numberToBase, sizes3 as sizes, stateMachineContextFactory, tablet, timeFormatter, toClassnames, useCookie, useDialog, useIsTopOfStack, useKeyboard, useNavigation, usePromise, useRefEffect, useStream };
5058
+ export { Avatar, Badge, BaseButton, BaseInput, BaseLink, BaseLinkComponentOverrideContext, BaseList, BaseListAddOn, BaseListItem, BaseView, Box, Button, ButtonGroup, Calendar, Card, Checkbox, Circle, Column, DESKTOP_MEDIA, DarkModeContext, DarkModeProvider, DarkModeToggle, DateInput, DatetimeInput, Dialog, DialogProvider, FlexLayout, H1, H2, H3, H4, Icon, IconButton, IconLink, JSSProvider, JSServerStyles, LAPTOP, LAPTOP_MEDIA, Label, Li, Link, List, ListButtonItem, ListDivider, ListHeaderItem, ListItem, ListLinkItem, ListSpacer, MOBILE, MOBILE_MEDIA, MenuIcon, NavigationSplitView, OnVisible, P, Popover, PopoverTrigger, ProgressBar, ProgressCircle, Providers, RangeInput, RootView, Row, Select, Span, StackContextProvider, StaticCheckbox, Sublist, SubmitIconInput, TABLET, TABLET_MEDIA, TabBar, Table, Tabs, Text, TextArea, TextInput, TextInputWithState, TextPairing, TimeInput, Toggle, Tooltip, baseStyles, createEmitter, createStorage, cssVar, darkTheme, desktop, getBackground, getBaseStyles, getColorValue, getCookie, getMargin, getMaterial, getPadding, getSize, getSpacing, getTextColor, guid, hasCookie, hash, laptop, lightTheme, mobile, numberToBase, sizes3 as sizes, stateMachineContextFactory, tablet, timeFormatter, toClassnames, useCookie, useDialog, useIsTopOfStack, useKeyboard, useNavigation, usePromise, useRefEffect, useStream };
4933
5059
  //# sourceMappingURL=index.js.map
4934
5060
  //# sourceMappingURL=index.js.map