@uzum-tech/ui 2.3.3 → 2.3.5

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 (44) hide show
  1. package/dist/index.js +688 -619
  2. package/dist/index.mjs +688 -619
  3. package/dist/index.prod.js +2 -2
  4. package/dist/index.prod.mjs +2 -2
  5. package/es/chat/src/Chat.d.ts +363 -3120
  6. package/es/chat/src/Chat.mjs +13 -240
  7. package/es/chat/src/ChatListItems.d.ts +4 -4
  8. package/es/chat/src/ChatMainArea.d.ts +36 -10
  9. package/es/chat/src/ChatMainArea.mjs +49 -3
  10. package/es/chat/src/ChatMessages.d.ts +3 -3
  11. package/es/chat/src/interface.d.ts +2814 -2
  12. package/es/chat/src/interface.mjs +244 -1
  13. package/es/components.d.ts +310 -224
  14. package/es/image/index.d.ts +2 -2
  15. package/es/image/index.mjs +2 -1
  16. package/es/image/src/ImagePreview.d.ts +60 -184
  17. package/es/image/src/ImagePreview.mjs +12 -18
  18. package/es/image/src/interface.d.ts +156 -3
  19. package/es/image/src/interface.mjs +23 -1
  20. package/es/image/src/public-types.d.ts +11 -5
  21. package/es/image/src/styles/index.cssr.mjs +11 -1
  22. package/es/version.d.ts +1 -1
  23. package/es/version.mjs +1 -1
  24. package/lib/chat/src/Chat.d.ts +363 -3120
  25. package/lib/chat/src/Chat.js +15 -180
  26. package/lib/chat/src/ChatListItems.d.ts +4 -4
  27. package/lib/chat/src/ChatMainArea.d.ts +36 -10
  28. package/lib/chat/src/ChatMainArea.js +48 -3
  29. package/lib/chat/src/ChatMessages.d.ts +3 -3
  30. package/lib/chat/src/interface.d.ts +2814 -2
  31. package/lib/chat/src/interface.js +183 -1
  32. package/lib/components.d.ts +310 -224
  33. package/lib/image/index.d.ts +2 -2
  34. package/lib/image/index.js +3 -2
  35. package/lib/image/src/ImagePreview.d.ts +60 -184
  36. package/lib/image/src/ImagePreview.js +18 -17
  37. package/lib/image/src/interface.d.ts +156 -3
  38. package/lib/image/src/interface.js +12 -1
  39. package/lib/image/src/public-types.d.ts +11 -5
  40. package/lib/image/src/styles/index.cssr.js +11 -1
  41. package/lib/version.d.ts +1 -1
  42. package/lib/version.js +1 -1
  43. package/package.json +1 -1
  44. package/web-types.json +55 -3
package/dist/index.mjs CHANGED
@@ -47881,6 +47881,261 @@ var _UUploadDragger = defineComponent({
47881
47881
  }
47882
47882
  });
47883
47883
 
47884
+ function self$11(vars) {
47885
+ const {
47886
+ opacityDisabled,
47887
+ elementsPrimary,
47888
+ brandPrimary500,
47889
+ fontBodyMedium,
47890
+ fontBodySmall,
47891
+ fontBodyLarge,
47892
+ fontHeadingSmall,
47893
+ fontTitleMedium,
47894
+ fontHeadingLarge
47895
+ } = vars;
47896
+ return {
47897
+ tertiaryColor: elementsPrimary,
47898
+ primaryColor: brandPrimary500,
47899
+ fontSize: fontBodyMedium,
47900
+ sizeTiny: fontBodySmall,
47901
+ sizeSmall: fontBodyLarge,
47902
+ sizeMedium: fontTitleMedium,
47903
+ sizeLarge: fontHeadingSmall,
47904
+ sizeHuge: fontHeadingLarge,
47905
+ opacitySpinning: opacityDisabled
47906
+ };
47907
+ }
47908
+ const spinLight = {
47909
+ name: "Spin",
47910
+ common: derived,
47911
+ self: self$11
47912
+ };
47913
+
47914
+ const spinDark = {
47915
+ name: "Spin",
47916
+ common: derived$1,
47917
+ self: self$11
47918
+ };
47919
+
47920
+ var style$19 = c$1([c$1("@keyframes spin-rotate", `
47921
+ from {
47922
+ transform: rotate(0);
47923
+ }
47924
+ to {
47925
+ transform: rotate(360deg);
47926
+ }
47927
+ `), cB("spin-container", {
47928
+ position: "relative"
47929
+ }, [cB("spin-body", `
47930
+ position: absolute;
47931
+ top: 50%;
47932
+ left: 50%;
47933
+ transform: translateX(-50%) translateY(-50%);
47934
+ `, [fadeInTransition()])]), cB("spin-body", `
47935
+ display: inline-flex;
47936
+ align-items: center;
47937
+ justify-content: center;
47938
+ flex-direction: column;
47939
+ `), cB("spin", `
47940
+ display: inline-flex;
47941
+ height: var(--u-size);
47942
+ width: var(--u-size);
47943
+ font-size: var(--u-size);
47944
+ color: var(--u-color);
47945
+ `, [cM("rotate", `
47946
+ animation: spin-rotate 2s linear infinite;
47947
+ `)]), cB("spin-description", `
47948
+ display: inline-block;
47949
+ font-size: var(--u-font-size);
47950
+ color: var(--u-text-color);
47951
+ transition: color .3s var(--u-bezier);
47952
+ margin-top: 8px;
47953
+ `), cB("spin-content", `
47954
+ opacity: 1;
47955
+ transition: opacity .3s var(--u-bezier);
47956
+ pointer-events: all;
47957
+ `, [cM("spinning", `
47958
+ user-select: none;
47959
+ -webkit-user-select: none;
47960
+ pointer-events: none;
47961
+ opacity: var(--u-opacity-spinning);
47962
+ `)])]);
47963
+
47964
+ const STROKE_WIDTH = {
47965
+ tiny: 22,
47966
+ small: 20,
47967
+ medium: 18,
47968
+ large: 16,
47969
+ huge: 14
47970
+ };
47971
+ const spinProps = {
47972
+ ...useTheme.props,
47973
+ contentClass: String,
47974
+ contentStyle: [Object, String],
47975
+ description: String,
47976
+ stroke: String,
47977
+ size: {
47978
+ type: [String, Number],
47979
+ default: "medium"
47980
+ },
47981
+ show: {
47982
+ type: Boolean,
47983
+ default: true
47984
+ },
47985
+ strokeWidth: Number,
47986
+ rotate: {
47987
+ type: Boolean,
47988
+ default: true
47989
+ },
47990
+ scale: Number,
47991
+ radius: Number,
47992
+ spinning: {
47993
+ type: Boolean,
47994
+ validator: () => {
47995
+ return true;
47996
+ },
47997
+ default: void 0
47998
+ },
47999
+ color: {
48000
+ type: [String],
48001
+ default: "primary"
48002
+ },
48003
+ delay: Number
48004
+ };
48005
+ var _USpin = defineComponent({
48006
+ name: "Spin",
48007
+ props: spinProps,
48008
+ slots: Object,
48009
+ setup(props) {
48010
+ {
48011
+ watchEffect(() => {
48012
+ if (props.spinning !== void 0) {
48013
+ warnOnce(
48014
+ "spin",
48015
+ "`spinning` is deprecated, please use `show` instead."
48016
+ );
48017
+ }
48018
+ });
48019
+ }
48020
+ const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
48021
+ const themeRef = useTheme(
48022
+ "Spin",
48023
+ "-spin",
48024
+ style$19,
48025
+ spinLight,
48026
+ props,
48027
+ mergedClsPrefixRef
48028
+ );
48029
+ const cssVarsRef = computed(() => {
48030
+ const { size: spinSize, color } = props;
48031
+ const {
48032
+ common: { cubicBezierEaseInOut },
48033
+ self
48034
+ } = themeRef.value;
48035
+ const { opacitySpinning, tertiaryColor, primaryColor } = self;
48036
+ const size = typeof spinSize === "number" ? pxfy(spinSize) : self[createKey("size", spinSize)];
48037
+ return {
48038
+ "--u-bezier": cubicBezierEaseInOut,
48039
+ "--u-opacity-spinning": opacitySpinning,
48040
+ "--u-size": size,
48041
+ "--u-color": color === "tertiary" ? tertiaryColor : color === "primary" ? primaryColor : color,
48042
+ "--u-text-color": color === "tertiary" ? tertiaryColor : color === "primary" ? primaryColor : color
48043
+ };
48044
+ });
48045
+ const themeClassHandle = inlineThemeDisabled ? useThemeClass(
48046
+ "spin",
48047
+ computed(() => {
48048
+ const { size } = props;
48049
+ return typeof size === "number" ? String(size) : size[0];
48050
+ }),
48051
+ cssVarsRef,
48052
+ props
48053
+ ) : void 0;
48054
+ const compitableShow = useCompitable(props, ["spinning", "show"]);
48055
+ const activeRef = ref(false);
48056
+ watchEffect((onCleanup) => {
48057
+ let timerId;
48058
+ if (compitableShow.value) {
48059
+ const { delay } = props;
48060
+ if (delay) {
48061
+ timerId = window.setTimeout(() => {
48062
+ activeRef.value = true;
48063
+ }, props.delay);
48064
+ onCleanup(() => {
48065
+ clearTimeout(timerId);
48066
+ });
48067
+ return;
48068
+ }
48069
+ }
48070
+ activeRef.value = compitableShow.value;
48071
+ });
48072
+ return {
48073
+ mergedClsPrefix: mergedClsPrefixRef,
48074
+ active: activeRef,
48075
+ mergedStrokeWidth: computed(() => {
48076
+ const { strokeWidth } = props;
48077
+ if (strokeWidth !== void 0)
48078
+ return strokeWidth;
48079
+ const { size } = props;
48080
+ return STROKE_WIDTH[typeof size === "number" ? "medium" : size];
48081
+ }),
48082
+ cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
48083
+ themeClass: themeClassHandle?.themeClass,
48084
+ onRender: themeClassHandle?.onRender
48085
+ };
48086
+ },
48087
+ render() {
48088
+ const { $slots, mergedClsPrefix, description } = this;
48089
+ const rotate = $slots.icon && this.rotate;
48090
+ const descriptionNode = (description || $slots.description) && /* @__PURE__ */ h("div", { class: `${mergedClsPrefix}-spin-description` }, description || $slots.description?.());
48091
+ const icon = $slots.icon ? /* @__PURE__ */ h("div", { class: [`${mergedClsPrefix}-spin-body`, this.themeClass] }, /* @__PURE__ */ h(
48092
+ "div",
48093
+ {
48094
+ class: [
48095
+ `${mergedClsPrefix}-spin`,
48096
+ rotate && `${mergedClsPrefix}-spin--rotate`
48097
+ ],
48098
+ style: $slots.default ? "" : this.cssVars
48099
+ },
48100
+ $slots.icon()
48101
+ ), descriptionNode) : /* @__PURE__ */ h("div", { class: [`${mergedClsPrefix}-spin-body`, this.themeClass] }, /* @__PURE__ */ h(
48102
+ UBaseLoading,
48103
+ {
48104
+ clsPrefix: mergedClsPrefix,
48105
+ style: $slots.default ? "" : this.cssVars,
48106
+ stroke: this.stroke,
48107
+ "stroke-width": this.mergedStrokeWidth,
48108
+ radius: this.radius,
48109
+ scale: this.scale,
48110
+ class: `${mergedClsPrefix}-spin`
48111
+ }
48112
+ ), descriptionNode);
48113
+ this.onRender?.();
48114
+ return $slots.default ? /* @__PURE__ */ h(
48115
+ "div",
48116
+ {
48117
+ class: [`${mergedClsPrefix}-spin-container`, this.themeClass],
48118
+ style: this.cssVars
48119
+ },
48120
+ /* @__PURE__ */ h(
48121
+ "div",
48122
+ {
48123
+ class: [
48124
+ `${mergedClsPrefix}-spin-content`,
48125
+ this.active && `${mergedClsPrefix}-spin-content--spinning`,
48126
+ this.contentClass
48127
+ ],
48128
+ style: this.contentStyle
48129
+ },
48130
+ $slots
48131
+ ),
48132
+ /* @__PURE__ */ h(Transition, { name: "fade-in-transition" }, {
48133
+ default: () => this.active ? icon : null
48134
+ })
48135
+ ) : icon;
48136
+ }
48137
+ });
48138
+
47884
48139
  const buttonGroupDark = {
47885
48140
  name: "ButtonGroup",
47886
48141
  common: derived$1
@@ -47925,7 +48180,7 @@ const cardDark = {
47925
48180
  self: self$1c
47926
48181
  };
47927
48182
 
47928
- function self$11(vars) {
48183
+ function self$10(vars) {
47929
48184
  const {
47930
48185
  textPrimary,
47931
48186
  fontBodyMedium,
@@ -47953,12 +48208,12 @@ function self$11(vars) {
47953
48208
  const codeLight = {
47954
48209
  name: "Code",
47955
48210
  common: derived,
47956
- self: self$11
48211
+ self: self$10
47957
48212
  };
47958
48213
 
47959
- function self$10(vars) {
48214
+ function self$$(vars) {
47960
48215
  return {
47961
- ...self$11(vars),
48216
+ ...self$10(vars),
47962
48217
  // extracted from hljs atom-one-dark.scss
47963
48218
  "mono-3": "#5c6370",
47964
48219
  "hue-1": "#56b6c2",
@@ -47974,10 +48229,10 @@ function self$10(vars) {
47974
48229
  const codeDark = {
47975
48230
  name: "Code",
47976
48231
  common: derived$1,
47977
- self: self$10
48232
+ self: self$$
47978
48233
  };
47979
48234
 
47980
- function self$$(vars) {
48235
+ function self$_(vars) {
47981
48236
  const {
47982
48237
  cubicBezierEaseInOut
47983
48238
  } = vars;
@@ -47988,13 +48243,13 @@ function self$$(vars) {
47988
48243
  const collapseTransitionLight = {
47989
48244
  name: "CollapseTransition",
47990
48245
  common: derived,
47991
- self: self$$
48246
+ self: self$_
47992
48247
  };
47993
48248
 
47994
48249
  const collapseTransitionDark = {
47995
48250
  name: "CollapseTransition",
47996
48251
  common: derived$1,
47997
- self: self$$
48252
+ self: self$_
47998
48253
  };
47999
48254
 
48000
48255
  var rtlStyle$g = cB("collapse-transition", [cM("rtl", `
@@ -48007,7 +48262,7 @@ const collapseTransitionRtl = {
48007
48262
  style: rtlStyle$g
48008
48263
  };
48009
48264
 
48010
- function self$_(vars) {
48265
+ function self$Z(vars) {
48011
48266
  const {
48012
48267
  fontWeight,
48013
48268
  fontBodyLarge,
@@ -48047,13 +48302,13 @@ function self$_(vars) {
48047
48302
  const collapseLight = {
48048
48303
  name: "Collapse",
48049
48304
  common: derived,
48050
- self: self$_
48305
+ self: self$Z
48051
48306
  };
48052
48307
 
48053
48308
  const collapseDark = {
48054
48309
  name: "Collapse",
48055
48310
  common: derived$1,
48056
- self: self$_
48311
+ self: self$Z
48057
48312
  };
48058
48313
 
48059
48314
  var rtlStyle$f = cB("collapse", [cM("rtl", `
@@ -48076,7 +48331,7 @@ const collapseRtl = {
48076
48331
  style: rtlStyle$f
48077
48332
  };
48078
48333
 
48079
- function self$Z(vars) {
48334
+ function self$Y(vars) {
48080
48335
  const {
48081
48336
  borderRadius,
48082
48337
  fontBodySmall,
@@ -48163,7 +48418,7 @@ const dropdownLight = createTheme$1({
48163
48418
  peers: {
48164
48419
  Popover: popoverLight
48165
48420
  },
48166
- self: self$Z
48421
+ self: self$Y
48167
48422
  });
48168
48423
 
48169
48424
  const dropdownDark = {
@@ -48172,7 +48427,7 @@ const dropdownDark = {
48172
48427
  peers: {
48173
48428
  Popover: popoverDark
48174
48429
  },
48175
- self: self$Z
48430
+ self: self$Y
48176
48431
  };
48177
48432
 
48178
48433
  const popselect = {
@@ -48184,7 +48439,7 @@ const popselect = {
48184
48439
  }
48185
48440
  };
48186
48441
 
48187
- function self$Y(vars) {
48442
+ function self$X(vars) {
48188
48443
  const {
48189
48444
  shadowDepth2
48190
48445
  } = vars;
@@ -48199,10 +48454,10 @@ const popselectLight = createTheme$1({
48199
48454
  Popover: popoverLight,
48200
48455
  InternalSelectMenu: internalSelectMenuLight
48201
48456
  },
48202
- self: self$Y
48457
+ self: self$X
48203
48458
  });
48204
48459
 
48205
- function self$X(vars) {
48460
+ function self$W(vars) {
48206
48461
  const {
48207
48462
  brandPrimary100,
48208
48463
  transparencySecondary,
@@ -48300,7 +48555,7 @@ const paginationLight = createTheme$1({
48300
48555
  Input: inputLight,
48301
48556
  Popselect: popselectLight
48302
48557
  },
48303
- self: self$X
48558
+ self: self$W
48304
48559
  });
48305
48560
 
48306
48561
  const paginationDark = {
@@ -48311,7 +48566,7 @@ const paginationDark = {
48311
48566
  Input: inputDark,
48312
48567
  Popselect: popselect
48313
48568
  },
48314
- self: self$X
48569
+ self: self$W
48315
48570
  };
48316
48571
 
48317
48572
  var rtlStyle$e = cB("pagination", [cM("rtl", `
@@ -48328,7 +48583,7 @@ const paginationRtl = {
48328
48583
  peers: [inputRtl]
48329
48584
  };
48330
48585
 
48331
- function self$W(vars) {
48586
+ function self$V(vars) {
48332
48587
  const {
48333
48588
  heightTiny,
48334
48589
  heightSmall,
@@ -48420,13 +48675,13 @@ function self$W(vars) {
48420
48675
  const radioLight = {
48421
48676
  name: "Radio",
48422
48677
  common: derived,
48423
- self: self$W
48678
+ self: self$V
48424
48679
  };
48425
48680
 
48426
48681
  const radioDark = {
48427
48682
  name: "Radio",
48428
48683
  common: derived$1,
48429
- self: self$W
48684
+ self: self$V
48430
48685
  };
48431
48686
 
48432
48687
  var rtlStyle$d = c$1([cB("radio", [cM("rtl", `
@@ -48454,7 +48709,7 @@ const radioRtl = {
48454
48709
  style: rtlStyle$d
48455
48710
  };
48456
48711
 
48457
- function self$V(vars) {
48712
+ function self$U(vars) {
48458
48713
  const {
48459
48714
  borderRadius,
48460
48715
  opacityDisabled,
@@ -48555,7 +48810,7 @@ const dataTableLight = createTheme$1({
48555
48810
  Ellipsis: ellipsisLight,
48556
48811
  Dropdown: dropdownLight
48557
48812
  },
48558
- self: self$V
48813
+ self: self$U
48559
48814
  });
48560
48815
 
48561
48816
  const dataTableDark = {
@@ -48572,10 +48827,10 @@ const dataTableDark = {
48572
48827
  Ellipsis: ellipsisDark,
48573
48828
  Dropdown: dropdownDark
48574
48829
  },
48575
- self: self$V
48830
+ self: self$U
48576
48831
  };
48577
48832
 
48578
- function self$U(vars) {
48833
+ function self$T(vars) {
48579
48834
  const {
48580
48835
  opacityDisabled,
48581
48836
  borderRadius,
@@ -48617,7 +48872,7 @@ const timePickerLight = createTheme$1({
48617
48872
  Button: buttonLight,
48618
48873
  Input: inputLight
48619
48874
  },
48620
- self: self$U
48875
+ self: self$T
48621
48876
  });
48622
48877
 
48623
48878
  const timePickerDark = {
@@ -48628,7 +48883,7 @@ const timePickerDark = {
48628
48883
  Button: buttonDark,
48629
48884
  Input: inputDark
48630
48885
  },
48631
- self: self$U
48886
+ self: self$T
48632
48887
  };
48633
48888
 
48634
48889
  const itemWidth = "38px";
@@ -48674,7 +48929,7 @@ var commonVars$6 = {
48674
48929
  calendarRightPaddingYearrange: "0"
48675
48930
  };
48676
48931
 
48677
- function self$T(vars) {
48932
+ function self$S(vars) {
48678
48933
  const {
48679
48934
  iconMedium,
48680
48935
  fontWeightStrong,
@@ -48775,7 +49030,7 @@ const datePickerLight = createTheme$1({
48775
49030
  Scrollbar: scrollbarLight,
48776
49031
  Select: internalSelectionLight
48777
49032
  },
48778
- self: self$T
49033
+ self: self$S
48779
49034
  });
48780
49035
 
48781
49036
  const datePickerDark = {
@@ -48788,10 +49043,10 @@ const datePickerDark = {
48788
49043
  Scrollbar: scrollbarDark,
48789
49044
  Select: internalSelectionDark
48790
49045
  },
48791
- self: self$T
49046
+ self: self$S
48792
49047
  };
48793
49048
 
48794
- function self$S(vars) {
49049
+ function self$R(vars) {
48795
49050
  const {
48796
49051
  borderRadius,
48797
49052
  lineHeightBodyLarge,
@@ -48841,13 +49096,13 @@ function self$S(vars) {
48841
49096
  const descriptionsLight = {
48842
49097
  name: "Descriptions",
48843
49098
  common: derived,
48844
- self: self$S
49099
+ self: self$R
48845
49100
  };
48846
49101
 
48847
49102
  const descriptionsDark = {
48848
49103
  name: "Descriptions",
48849
49104
  common: derived$1,
48850
- self: self$S
49105
+ self: self$R
48851
49106
  };
48852
49107
 
48853
49108
  var commonVars$5 = {
@@ -48861,7 +49116,7 @@ var commonVars$5 = {
48861
49116
  closeBorderRadius: "100px"
48862
49117
  };
48863
49118
 
48864
- function self$R(vars) {
49119
+ function self$Q(vars) {
48865
49120
  const {
48866
49121
  borderRadius,
48867
49122
  containerPrimary,
@@ -48918,7 +49173,7 @@ const dialogLight = createTheme$1({
48918
49173
  peers: {
48919
49174
  Button: buttonLight
48920
49175
  },
48921
- self: self$R
49176
+ self: self$Q
48922
49177
  });
48923
49178
 
48924
49179
  const dialogDark = {
@@ -48927,10 +49182,10 @@ const dialogDark = {
48927
49182
  peers: {
48928
49183
  Button: buttonDark
48929
49184
  },
48930
- self: self$R
49185
+ self: self$Q
48931
49186
  };
48932
49187
 
48933
- function self$Q(vars) {
49188
+ function self$P(vars) {
48934
49189
  const {
48935
49190
  elementsQuaternary,
48936
49191
  textPrimary,
@@ -48950,13 +49205,13 @@ function self$Q(vars) {
48950
49205
  const dividerLight = {
48951
49206
  name: "Divider",
48952
49207
  common: derived,
48953
- self: self$Q
49208
+ self: self$P
48954
49209
  };
48955
49210
 
48956
49211
  const dividerDark = {
48957
49212
  name: "Divider",
48958
49213
  common: derived$1,
48959
- self: self$Q
49214
+ self: self$P
48960
49215
  };
48961
49216
 
48962
49217
  var commonVars$4 = {
@@ -48972,7 +49227,7 @@ var commonVars$4 = {
48972
49227
  contentBorderRadius: "24px"
48973
49228
  };
48974
49229
 
48975
- function self$P(vars) {
49230
+ function self$O(vars) {
48976
49231
  const {
48977
49232
  containerPrimary,
48978
49233
  textPrimary,
@@ -49021,7 +49276,7 @@ const drawerLight = createTheme$1({
49021
49276
  peers: {
49022
49277
  Scrollbar: scrollbarLight
49023
49278
  },
49024
- self: self$P
49279
+ self: self$O
49025
49280
  });
49026
49281
 
49027
49282
  const drawerDark = {
@@ -49030,7 +49285,7 @@ const drawerDark = {
49030
49285
  peers: {
49031
49286
  Scrollbar: scrollbarDark
49032
49287
  },
49033
- self: self$P
49288
+ self: self$O
49034
49289
  };
49035
49290
 
49036
49291
  var rtlStyle$c = cB("drawer", [cM("rtl", `
@@ -49064,7 +49319,7 @@ const dynamicInputDark = {
49064
49319
  }
49065
49320
  };
49066
49321
 
49067
- function self$O() {
49322
+ function self$N() {
49068
49323
  return commonVariables$1;
49069
49324
  }
49070
49325
  const dynamicInputLight = createTheme$1({
@@ -49074,7 +49329,7 @@ const dynamicInputLight = createTheme$1({
49074
49329
  Input: inputLight,
49075
49330
  Button: buttonLight
49076
49331
  },
49077
- self: self$O
49332
+ self: self$N
49078
49333
  });
49079
49334
 
49080
49335
  var rtlStyle$b = cB("input-number", [cM("rtl", `
@@ -49115,12 +49370,12 @@ const spaceDark = {
49115
49370
  }
49116
49371
  };
49117
49372
 
49118
- function self$N() {
49373
+ function self$M() {
49119
49374
  return commonVars$3;
49120
49375
  }
49121
49376
  const spaceLight = {
49122
49377
  name: "Space",
49123
- self: self$N
49378
+ self: self$M
49124
49379
  };
49125
49380
 
49126
49381
  var rtlStyle$9 = cB("space", [cM("rtl", `
@@ -49192,7 +49447,7 @@ const floatButtonGroupDark = {
49192
49447
  }
49193
49448
  };
49194
49449
 
49195
- function self$M(vars) {
49450
+ function self$L(vars) {
49196
49451
  const {
49197
49452
  containerPrimary,
49198
49453
  elementsQuaternary,
@@ -49208,7 +49463,7 @@ function self$M(vars) {
49208
49463
  const themeLight$4 = {
49209
49464
  name: "FloatButtonGroup",
49210
49465
  common: derived,
49211
- self: self$M
49466
+ self: self$L
49212
49467
  };
49213
49468
 
49214
49469
  const floatButtonDark = {
@@ -49243,7 +49498,7 @@ const floatButtonDark = {
49243
49498
  }
49244
49499
  };
49245
49500
 
49246
- function self$L(vars) {
49501
+ function self$K(vars) {
49247
49502
  const {
49248
49503
  containerPrimary,
49249
49504
  textPrimary,
@@ -49272,10 +49527,10 @@ function self$L(vars) {
49272
49527
  const themeLight$3 = {
49273
49528
  name: "FloatButton",
49274
49529
  common: derived,
49275
- self: self$L
49530
+ self: self$K
49276
49531
  };
49277
49532
 
49278
- function self$K(vars) {
49533
+ function self$J(vars) {
49279
49534
  const {
49280
49535
  heightSmall,
49281
49536
  heightMedium,
@@ -49330,16 +49585,16 @@ function self$K(vars) {
49330
49585
  const formLight = {
49331
49586
  name: "Form",
49332
49587
  common: derived,
49333
- self: self$K
49588
+ self: self$J
49334
49589
  };
49335
49590
 
49336
49591
  const formItemDark = {
49337
49592
  name: "Form",
49338
49593
  common: derived$1,
49339
- self: self$K
49594
+ self: self$J
49340
49595
  };
49341
49596
 
49342
- function self$J(vars) {
49597
+ function self$I(vars) {
49343
49598
  const {
49344
49599
  brandPrimary500,
49345
49600
  staticGreen,
@@ -49376,16 +49631,16 @@ function self$J(vars) {
49376
49631
  const gradientTextLight = {
49377
49632
  name: "GradientText",
49378
49633
  common: derived,
49379
- self: self$J
49634
+ self: self$I
49380
49635
  };
49381
49636
 
49382
49637
  const gradientTextDark = {
49383
49638
  name: "GradientText",
49384
49639
  common: derived$1,
49385
- self: self$J
49640
+ self: self$I
49386
49641
  };
49387
49642
 
49388
- function self$I(vars) {
49643
+ function self$H(vars) {
49389
49644
  const {
49390
49645
  textSecondary
49391
49646
  } = vars;
@@ -49400,7 +49655,7 @@ const inputNumberLight = createTheme$1({
49400
49655
  Button: buttonLight,
49401
49656
  Input: inputLight
49402
49657
  },
49403
- self: self$I
49658
+ self: self$H
49404
49659
  });
49405
49660
 
49406
49661
  const inputNumberDark = {
@@ -49410,10 +49665,10 @@ const inputNumberDark = {
49410
49665
  Button: buttonDark,
49411
49666
  Input: inputDark
49412
49667
  },
49413
- self: self$I
49668
+ self: self$H
49414
49669
  };
49415
49670
 
49416
- function self$H() {
49671
+ function self$G() {
49417
49672
  return {
49418
49673
  inputWidthSmall: "44px",
49419
49674
  inputWidthMedium: "50px",
@@ -49429,7 +49684,7 @@ const inputOtpLight = createTheme$1({
49429
49684
  peers: {
49430
49685
  Input: inputLight
49431
49686
  },
49432
- self: self$H
49687
+ self: self$G
49433
49688
  });
49434
49689
 
49435
49690
  const inputOtpDark = {
@@ -49438,7 +49693,7 @@ const inputOtpDark = {
49438
49693
  peers: {
49439
49694
  Input: inputDark
49440
49695
  },
49441
- self: self$H
49696
+ self: self$G
49442
49697
  };
49443
49698
 
49444
49699
  var rtlStyle$8 = cB("input-otp", [cM("rtl", `
@@ -49450,7 +49705,7 @@ const inputOtpRtl = {
49450
49705
  style: rtlStyle$8
49451
49706
  };
49452
49707
 
49453
- function self$G(vars) {
49708
+ function self$F(vars) {
49454
49709
  const {
49455
49710
  textPrimary,
49456
49711
  textQuaternary,
@@ -49496,7 +49751,7 @@ const layoutLight = createTheme$1({
49496
49751
  peers: {
49497
49752
  Scrollbar: scrollbarLight
49498
49753
  },
49499
- self: self$G
49754
+ self: self$F
49500
49755
  });
49501
49756
 
49502
49757
  const layoutDark = {
@@ -49505,7 +49760,7 @@ const layoutDark = {
49505
49760
  peers: {
49506
49761
  Scrollbar: scrollbarDark
49507
49762
  },
49508
- self: self$G
49763
+ self: self$F
49509
49764
  };
49510
49765
 
49511
49766
  const rowDark = {
@@ -49542,7 +49797,7 @@ const rowRtl = {
49542
49797
  style: rtlStyle$7
49543
49798
  };
49544
49799
 
49545
- function self$F(vars) {
49800
+ function self$E(vars) {
49546
49801
  const {
49547
49802
  brandPrimary500,
49548
49803
  staticRed
@@ -49556,16 +49811,16 @@ function self$F(vars) {
49556
49811
  const loadingBarLight = {
49557
49812
  name: "LoadingBar",
49558
49813
  common: derived,
49559
- self: self$F
49814
+ self: self$E
49560
49815
  };
49561
49816
 
49562
49817
  const loadingBarDark = {
49563
49818
  name: "LoadingBar",
49564
49819
  common: derived$1,
49565
- self: self$F
49820
+ self: self$E
49566
49821
  };
49567
49822
 
49568
- function self$E(vars) {
49823
+ function self$D(vars) {
49569
49824
  const {
49570
49825
  fontBodyMedium,
49571
49826
  textPrimary,
@@ -49588,7 +49843,7 @@ const logLight = createTheme$1({
49588
49843
  Scrollbar: scrollbarLight,
49589
49844
  Code: codeLight
49590
49845
  },
49591
- self: self$E
49846
+ self: self$D
49592
49847
  });
49593
49848
 
49594
49849
  const logDark = {
@@ -49598,25 +49853,25 @@ const logDark = {
49598
49853
  Scrollbar: scrollbarDark,
49599
49854
  Code: codeDark
49600
49855
  },
49601
- self: self$E
49856
+ self: self$D
49602
49857
  };
49603
49858
 
49604
- function self$D() {
49859
+ function self$C() {
49605
49860
  return {};
49606
49861
  }
49607
49862
  const marqueeLight = {
49608
49863
  name: "Marquee",
49609
49864
  common: derived,
49610
- self: self$D
49865
+ self: self$C
49611
49866
  };
49612
49867
 
49613
49868
  const marqueeDark = {
49614
49869
  name: "Marquee",
49615
49870
  common: derived$1,
49616
- self: self$D
49871
+ self: self$C
49617
49872
  };
49618
49873
 
49619
- function self$C(vars) {
49874
+ function self$B(vars) {
49620
49875
  const {
49621
49876
  shadowDepth2
49622
49877
  } = vars;
@@ -49631,7 +49886,7 @@ const mentionLight = createTheme$1({
49631
49886
  InternalSelectMenu: internalSelectMenuLight,
49632
49887
  Input: inputLight
49633
49888
  },
49634
- self: self$C
49889
+ self: self$B
49635
49890
  });
49636
49891
 
49637
49892
  const listDark = {
@@ -49641,7 +49896,7 @@ const listDark = {
49641
49896
  InternalSelectMenu: internalSelectMenuDark,
49642
49897
  Input: inputDark
49643
49898
  },
49644
- self: self$C
49899
+ self: self$B
49645
49900
  };
49646
49901
 
49647
49902
  function createPartialInvertedVars(color, activeItemColor, activeTextColor, groupTextColor) {
@@ -49684,7 +49939,7 @@ function createPartialInvertedVars(color, activeItemColor, activeTextColor, grou
49684
49939
  groupTextColorInverted: groupTextColor
49685
49940
  };
49686
49941
  }
49687
- function self$B(vars) {
49942
+ function self$A(vars) {
49688
49943
  const {
49689
49944
  textSecondary,
49690
49945
  borderRadiusSmall,
@@ -49752,7 +50007,7 @@ const menuLight = createTheme$1({
49752
50007
  Tooltip: tooltipLight,
49753
50008
  Dropdown: dropdownLight
49754
50009
  },
49755
- self: self$B
50010
+ self: self$A
49756
50011
  });
49757
50012
 
49758
50013
  const menuDark = {
@@ -49762,10 +50017,10 @@ const menuDark = {
49762
50017
  Tooltip: tooltipDark,
49763
50018
  Dropdown: dropdownDark
49764
50019
  },
49765
- self: self$B
50020
+ self: self$A
49766
50021
  };
49767
50022
 
49768
- function self$A(vars) {
50023
+ function self$z(vars) {
49769
50024
  const {
49770
50025
  transparencyModal,
49771
50026
  containerPrimary,
@@ -49789,7 +50044,7 @@ const modalLight = createTheme$1({
49789
50044
  Dialog: dialogLight,
49790
50045
  Card: cardLight
49791
50046
  },
49792
- self: self$A
50047
+ self: self$z
49793
50048
  });
49794
50049
 
49795
50050
  const modalDark = {
@@ -49800,7 +50055,7 @@ const modalDark = {
49800
50055
  Dialog: dialogDark,
49801
50056
  Card: cardDark$1
49802
50057
  },
49803
- self: self$A
50058
+ self: self$z
49804
50059
  };
49805
50060
 
49806
50061
  var commonVars$2 = {
@@ -49809,7 +50064,7 @@ var commonVars$2 = {
49809
50064
  closeBorderRadius: "50px"
49810
50065
  };
49811
50066
 
49812
- function self$z(vars) {
50067
+ function self$y(vars) {
49813
50068
  const {
49814
50069
  fontWeightStrong,
49815
50070
  lineHeightBodyMedium,
@@ -49942,7 +50197,7 @@ const notificationLight = createTheme$1({
49942
50197
  peers: {
49943
50198
  Scrollbar: scrollbarLight
49944
50199
  },
49945
- self: self$z
50200
+ self: self$y
49946
50201
  });
49947
50202
 
49948
50203
  const notificationDark = {
@@ -49951,7 +50206,7 @@ const notificationDark = {
49951
50206
  peers: {
49952
50207
  Scrollbar: scrollbarDark
49953
50208
  },
49954
- self: self$z
50209
+ self: self$y
49955
50210
  };
49956
50211
 
49957
50212
  var rtlStyle$6 = cB("notification", [cM("rtl", `
@@ -49981,7 +50236,7 @@ const notificationRtl = {
49981
50236
  style: rtlStyle$6
49982
50237
  };
49983
50238
 
49984
- function self$y(vars) {
50239
+ function self$x(vars) {
49985
50240
  const {
49986
50241
  fontWeightStrong,
49987
50242
  fontTitleSmall,
@@ -50007,13 +50262,13 @@ function self$y(vars) {
50007
50262
  const pageHeaderLight = createTheme$1({
50008
50263
  name: "PageHeader",
50009
50264
  common: derived,
50010
- self: self$y
50265
+ self: self$x
50011
50266
  });
50012
50267
 
50013
50268
  const pageHeaderDark = {
50014
50269
  name: "PageHeader",
50015
50270
  common: derived$1,
50016
- self: self$y
50271
+ self: self$x
50017
50272
  };
50018
50273
 
50019
50274
  var rtlStyle$5 = cB("page-header-wrapper", [cM("rtl", [cB("page-header-header", `
@@ -50040,7 +50295,7 @@ var rtl = {
50040
50295
  style: rtlStyle$5
50041
50296
  };
50042
50297
 
50043
- function self$x(vars) {
50298
+ function self$w(vars) {
50044
50299
  const {
50045
50300
  fontBodyMedium,
50046
50301
  staticOrange
@@ -50058,7 +50313,7 @@ const popconfirmLight = createTheme$1({
50058
50313
  Button: buttonLight,
50059
50314
  Popover: popoverLight
50060
50315
  },
50061
- self: self$x
50316
+ self: self$w
50062
50317
  });
50063
50318
 
50064
50319
  const popconfirmDark = {
@@ -50068,10 +50323,10 @@ const popconfirmDark = {
50068
50323
  Button: buttonDark,
50069
50324
  Popover: popoverDark
50070
50325
  },
50071
- self: self$x
50326
+ self: self$w
50072
50327
  };
50073
50328
 
50074
- function self$w(vars) {
50329
+ function self$v(vars) {
50075
50330
  const {
50076
50331
  elementsQuinary,
50077
50332
  brandSecondary600
@@ -50087,16 +50342,16 @@ function self$w(vars) {
50087
50342
  const themeLight$2 = {
50088
50343
  name: "Rate",
50089
50344
  common: derived,
50090
- self: self$w
50345
+ self: self$v
50091
50346
  };
50092
50347
 
50093
50348
  const rateDark = {
50094
50349
  name: "Rate",
50095
50350
  common: derived$1,
50096
- self: self$w
50351
+ self: self$v
50097
50352
  };
50098
50353
 
50099
- function self$v(vars) {
50354
+ function self$u(vars) {
50100
50355
  const {
50101
50356
  fontHeadingSmall,
50102
50357
  fontHeadingMedium,
@@ -50145,16 +50400,16 @@ function self$v(vars) {
50145
50400
  const resultLight = {
50146
50401
  name: "Result",
50147
50402
  common: derived,
50148
- self: self$v
50403
+ self: self$u
50149
50404
  };
50150
50405
 
50151
50406
  const resultDark = {
50152
50407
  name: "Result",
50153
50408
  common: derived$1,
50154
- self: self$v
50409
+ self: self$u
50155
50410
  };
50156
50411
 
50157
- function self$u(vars) {
50412
+ function self$t(vars) {
50158
50413
  const {
50159
50414
  borderRadius,
50160
50415
  opacityDisabled,
@@ -50201,48 +50456,12 @@ function self$u(vars) {
50201
50456
  const sliderLight = {
50202
50457
  name: "Slider",
50203
50458
  common: derived,
50204
- self: self$u
50459
+ self: self$t
50205
50460
  };
50206
50461
 
50207
50462
  const sliderDark = {
50208
50463
  name: "Slider",
50209
50464
  common: derived$1,
50210
- self: self$u
50211
- };
50212
-
50213
- function self$t(vars) {
50214
- const {
50215
- opacityDisabled,
50216
- elementsPrimary,
50217
- brandPrimary500,
50218
- fontBodyMedium,
50219
- fontBodySmall,
50220
- fontBodyLarge,
50221
- fontHeadingSmall,
50222
- fontTitleMedium,
50223
- fontHeadingLarge
50224
- } = vars;
50225
- return {
50226
- tertiaryColor: elementsPrimary,
50227
- primaryColor: brandPrimary500,
50228
- fontSize: fontBodyMedium,
50229
- sizeTiny: fontBodySmall,
50230
- sizeSmall: fontBodyLarge,
50231
- sizeMedium: fontTitleMedium,
50232
- sizeLarge: fontHeadingSmall,
50233
- sizeHuge: fontHeadingLarge,
50234
- opacitySpinning: opacityDisabled
50235
- };
50236
- }
50237
- const spinLight = {
50238
- name: "Spin",
50239
- common: derived,
50240
- self: self$t
50241
- };
50242
-
50243
- const spinDark = {
50244
- name: "Spin",
50245
- common: derived$1,
50246
50465
  self: self$t
50247
50466
  };
50248
50467
 
@@ -51159,8 +51378,31 @@ const imagePreviewSharedProps = {
51159
51378
  renderToolbar: Function
51160
51379
  };
51161
51380
  const imageContextKey = createInjectionKey("u-image");
51381
+ const BLEEDING = 32;
51382
+ const imagePreviewProps = {
51383
+ ...imagePreviewSharedProps,
51384
+ src: String,
51385
+ show: {
51386
+ type: Boolean,
51387
+ default: void 0
51388
+ },
51389
+ defaultShow: Boolean,
51390
+ "onUpdate:show": [Function, Array],
51391
+ loading: {
51392
+ type: Boolean,
51393
+ default: false
51394
+ },
51395
+ spinProps: {
51396
+ type: Object,
51397
+ default: void 0
51398
+ },
51399
+ onUpdateShow: [Function, Array],
51400
+ onNext: Function,
51401
+ onPrev: Function,
51402
+ onClose: [Function, Array]
51403
+ };
51162
51404
 
51163
- var style$19 = c$1([c$1("body >", [cB("image-container", "position: fixed;")]), cB("image-preview-container", `
51405
+ var style$18 = c$1([c$1("body >", [cB("image-container", "position: fixed;")]), cB("image-preview-container", `
51164
51406
  position: fixed;
51165
51407
  left: 0;
51166
51408
  right: 0;
@@ -51194,7 +51436,17 @@ var style$19 = c$1([c$1("body >", [cB("image-container", "position: fixed;")]),
51194
51436
  padding: 0 8px;
51195
51437
  font-size: 28px;
51196
51438
  cursor: pointer;
51197
- `), fadeInTransition()]), cB("image-preview-wrapper", `
51439
+ `), fadeInTransition()]), cB("image-preview-loading", `
51440
+ position: absolute;
51441
+ left: 0;
51442
+ right: 0;
51443
+ top: 0;
51444
+ bottom: 0;
51445
+ display: flex;
51446
+ align-items: center;
51447
+ justify-content: center;
51448
+ pointer-events: none;
51449
+ `), cB("image-preview-wrapper", `
51198
51450
  position: absolute;
51199
51451
  left: 0;
51200
51452
  right: 0;
@@ -51220,31 +51472,17 @@ var style$19 = c$1([c$1("body >", [cB("image-container", "position: fixed;")]),
51220
51472
  border-radius: inherit;
51221
51473
  `)])]);
51222
51474
 
51223
- const BLEEDING = 32;
51224
- const imagePreviewProps = {
51225
- ...imagePreviewSharedProps,
51226
- src: String,
51227
- show: {
51228
- type: Boolean,
51229
- default: void 0
51230
- },
51231
- defaultShow: Boolean,
51232
- "onUpdate:show": [Function, Array],
51233
- onUpdateShow: [Function, Array],
51234
- onNext: Function,
51235
- onPrev: Function,
51236
- onClose: [Function, Array]
51237
- };
51238
51475
  var _UImagePreview = defineComponent({
51239
51476
  name: "ImagePreview",
51240
51477
  props: imagePreviewProps,
51478
+ slots: Object,
51241
51479
  setup(props) {
51242
51480
  const { src } = toRefs(props);
51243
51481
  const { mergedClsPrefixRef } = useConfig(props);
51244
51482
  const themeRef = useTheme(
51245
51483
  "Image",
51246
51484
  "-image",
51247
- style$19,
51485
+ style$18,
51248
51486
  imageLight,
51249
51487
  props,
51250
51488
  mergedClsPrefixRef
@@ -51739,7 +51977,7 @@ var _UImagePreview = defineComponent({
51739
51977
  class: `${clsPrefix}-image-preview-wrapper`,
51740
51978
  ref: "previewWrapperRef"
51741
51979
  },
51742
- /* @__PURE__ */ h(
51980
+ !this.loading ? /* @__PURE__ */ h(
51743
51981
  "img",
51744
51982
  {
51745
51983
  ...previewedImgProps,
@@ -51755,13 +51993,18 @@ var _UImagePreview = defineComponent({
51755
51993
  ref: "previewRef",
51756
51994
  onDragstart: this.handleDragStart
51757
51995
  }
51758
- )
51996
+ ) : null
51759
51997
  ),
51760
51998
  [[vShow, this.mergedShow]]
51761
51999
  );
51762
52000
  }
51763
52001
  }
51764
- )
52002
+ ),
52003
+ this.mergedShow && this.loading && /* @__PURE__ */ h("div", { class: `${clsPrefix}-image-preview-loading` }, /* @__PURE__ */ h(_USpin, { ...this.spinProps }, {
52004
+ default: this.$slots["spin-default"],
52005
+ icon: this.$slots["spin-icon"],
52006
+ description: this.$slots["spin-description"]
52007
+ }))
51765
52008
  ),
51766
52009
  [[zindexable, { enabled: this.mergedShow }]]
51767
52010
  );
@@ -52153,225 +52396,6 @@ var _UImage = defineComponent({
52153
52396
  }
52154
52397
  });
52155
52398
 
52156
- var style$18 = c$1([c$1("@keyframes spin-rotate", `
52157
- from {
52158
- transform: rotate(0);
52159
- }
52160
- to {
52161
- transform: rotate(360deg);
52162
- }
52163
- `), cB("spin-container", {
52164
- position: "relative"
52165
- }, [cB("spin-body", `
52166
- position: absolute;
52167
- top: 50%;
52168
- left: 50%;
52169
- transform: translateX(-50%) translateY(-50%);
52170
- `, [fadeInTransition()])]), cB("spin-body", `
52171
- display: inline-flex;
52172
- align-items: center;
52173
- justify-content: center;
52174
- flex-direction: column;
52175
- `), cB("spin", `
52176
- display: inline-flex;
52177
- height: var(--u-size);
52178
- width: var(--u-size);
52179
- font-size: var(--u-size);
52180
- color: var(--u-color);
52181
- `, [cM("rotate", `
52182
- animation: spin-rotate 2s linear infinite;
52183
- `)]), cB("spin-description", `
52184
- display: inline-block;
52185
- font-size: var(--u-font-size);
52186
- color: var(--u-text-color);
52187
- transition: color .3s var(--u-bezier);
52188
- margin-top: 8px;
52189
- `), cB("spin-content", `
52190
- opacity: 1;
52191
- transition: opacity .3s var(--u-bezier);
52192
- pointer-events: all;
52193
- `, [cM("spinning", `
52194
- user-select: none;
52195
- -webkit-user-select: none;
52196
- pointer-events: none;
52197
- opacity: var(--u-opacity-spinning);
52198
- `)])]);
52199
-
52200
- const STROKE_WIDTH = {
52201
- tiny: 22,
52202
- small: 20,
52203
- medium: 18,
52204
- large: 16,
52205
- huge: 14
52206
- };
52207
- const spinProps = {
52208
- ...useTheme.props,
52209
- contentClass: String,
52210
- contentStyle: [Object, String],
52211
- description: String,
52212
- stroke: String,
52213
- size: {
52214
- type: [String, Number],
52215
- default: "medium"
52216
- },
52217
- show: {
52218
- type: Boolean,
52219
- default: true
52220
- },
52221
- strokeWidth: Number,
52222
- rotate: {
52223
- type: Boolean,
52224
- default: true
52225
- },
52226
- scale: Number,
52227
- radius: Number,
52228
- spinning: {
52229
- type: Boolean,
52230
- validator: () => {
52231
- return true;
52232
- },
52233
- default: void 0
52234
- },
52235
- color: {
52236
- type: [String],
52237
- default: "primary"
52238
- },
52239
- delay: Number
52240
- };
52241
- var _USpin = defineComponent({
52242
- name: "Spin",
52243
- props: spinProps,
52244
- slots: Object,
52245
- setup(props) {
52246
- {
52247
- watchEffect(() => {
52248
- if (props.spinning !== void 0) {
52249
- warnOnce(
52250
- "spin",
52251
- "`spinning` is deprecated, please use `show` instead."
52252
- );
52253
- }
52254
- });
52255
- }
52256
- const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
52257
- const themeRef = useTheme(
52258
- "Spin",
52259
- "-spin",
52260
- style$18,
52261
- spinLight,
52262
- props,
52263
- mergedClsPrefixRef
52264
- );
52265
- const cssVarsRef = computed(() => {
52266
- const { size: spinSize, color } = props;
52267
- const {
52268
- common: { cubicBezierEaseInOut },
52269
- self
52270
- } = themeRef.value;
52271
- const { opacitySpinning, tertiaryColor, primaryColor } = self;
52272
- const size = typeof spinSize === "number" ? pxfy(spinSize) : self[createKey("size", spinSize)];
52273
- return {
52274
- "--u-bezier": cubicBezierEaseInOut,
52275
- "--u-opacity-spinning": opacitySpinning,
52276
- "--u-size": size,
52277
- "--u-color": color === "tertiary" ? tertiaryColor : color === "primary" ? primaryColor : color,
52278
- "--u-text-color": color === "tertiary" ? tertiaryColor : color === "primary" ? primaryColor : color
52279
- };
52280
- });
52281
- const themeClassHandle = inlineThemeDisabled ? useThemeClass(
52282
- "spin",
52283
- computed(() => {
52284
- const { size } = props;
52285
- return typeof size === "number" ? String(size) : size[0];
52286
- }),
52287
- cssVarsRef,
52288
- props
52289
- ) : void 0;
52290
- const compitableShow = useCompitable(props, ["spinning", "show"]);
52291
- const activeRef = ref(false);
52292
- watchEffect((onCleanup) => {
52293
- let timerId;
52294
- if (compitableShow.value) {
52295
- const { delay } = props;
52296
- if (delay) {
52297
- timerId = window.setTimeout(() => {
52298
- activeRef.value = true;
52299
- }, props.delay);
52300
- onCleanup(() => {
52301
- clearTimeout(timerId);
52302
- });
52303
- return;
52304
- }
52305
- }
52306
- activeRef.value = compitableShow.value;
52307
- });
52308
- return {
52309
- mergedClsPrefix: mergedClsPrefixRef,
52310
- active: activeRef,
52311
- mergedStrokeWidth: computed(() => {
52312
- const { strokeWidth } = props;
52313
- if (strokeWidth !== void 0)
52314
- return strokeWidth;
52315
- const { size } = props;
52316
- return STROKE_WIDTH[typeof size === "number" ? "medium" : size];
52317
- }),
52318
- cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
52319
- themeClass: themeClassHandle?.themeClass,
52320
- onRender: themeClassHandle?.onRender
52321
- };
52322
- },
52323
- render() {
52324
- const { $slots, mergedClsPrefix, description } = this;
52325
- const rotate = $slots.icon && this.rotate;
52326
- const descriptionNode = (description || $slots.description) && /* @__PURE__ */ h("div", { class: `${mergedClsPrefix}-spin-description` }, description || $slots.description?.());
52327
- const icon = $slots.icon ? /* @__PURE__ */ h("div", { class: [`${mergedClsPrefix}-spin-body`, this.themeClass] }, /* @__PURE__ */ h(
52328
- "div",
52329
- {
52330
- class: [
52331
- `${mergedClsPrefix}-spin`,
52332
- rotate && `${mergedClsPrefix}-spin--rotate`
52333
- ],
52334
- style: $slots.default ? "" : this.cssVars
52335
- },
52336
- $slots.icon()
52337
- ), descriptionNode) : /* @__PURE__ */ h("div", { class: [`${mergedClsPrefix}-spin-body`, this.themeClass] }, /* @__PURE__ */ h(
52338
- UBaseLoading,
52339
- {
52340
- clsPrefix: mergedClsPrefix,
52341
- style: $slots.default ? "" : this.cssVars,
52342
- stroke: this.stroke,
52343
- "stroke-width": this.mergedStrokeWidth,
52344
- radius: this.radius,
52345
- scale: this.scale,
52346
- class: `${mergedClsPrefix}-spin`
52347
- }
52348
- ), descriptionNode);
52349
- this.onRender?.();
52350
- return $slots.default ? /* @__PURE__ */ h(
52351
- "div",
52352
- {
52353
- class: [`${mergedClsPrefix}-spin-container`, this.themeClass],
52354
- style: this.cssVars
52355
- },
52356
- /* @__PURE__ */ h(
52357
- "div",
52358
- {
52359
- class: [
52360
- `${mergedClsPrefix}-spin-content`,
52361
- this.active && `${mergedClsPrefix}-spin-content--spinning`,
52362
- this.contentClass
52363
- ],
52364
- style: this.contentStyle
52365
- },
52366
- $slots
52367
- ),
52368
- /* @__PURE__ */ h(Transition, { name: "fade-in-transition" }, {
52369
- default: () => this.active ? icon : null
52370
- })
52371
- ) : icon;
52372
- }
52373
- });
52374
-
52375
52399
  function useUploadActionsRender(options) {
52376
52400
  const {
52377
52401
  clsPrefix,
@@ -55477,6 +55501,249 @@ const markTypeToServiceVariantMap = {
55477
55501
  ["event" /* EVENT */]: MessageBubbleServiceVariant.EVENT,
55478
55502
  ["divider" /* DIVIDER */]: MessageBubbleServiceVariant.DIVIDER
55479
55503
  };
55504
+ const chatProps = {
55505
+ ...useTheme.props,
55506
+ chatItems: {
55507
+ type: Array,
55508
+ default: () => []
55509
+ },
55510
+ selectedChatId: {
55511
+ type: [String, Number],
55512
+ default: void 0
55513
+ },
55514
+ inputValue: {
55515
+ type: String,
55516
+ default: void 0
55517
+ },
55518
+ messages: {
55519
+ type: Array,
55520
+ default: () => []
55521
+ },
55522
+ typingChatIds: {
55523
+ type: Array,
55524
+ default: () => []
55525
+ },
55526
+ disabled: {
55527
+ type: Boolean,
55528
+ default: false
55529
+ },
55530
+ listEmptyProps: {
55531
+ type: Object,
55532
+ default: void 0
55533
+ },
55534
+ listHeaderTitle: {
55535
+ type: [String, Function],
55536
+ default: "Chats"
55537
+ },
55538
+ listHeaderActions: {
55539
+ type: Array,
55540
+ default: () => []
55541
+ },
55542
+ listHeaderButtonProps: {
55543
+ type: Object,
55544
+ default: void 0
55545
+ },
55546
+ listHeaderIconProps: {
55547
+ type: Object,
55548
+ default: void 0
55549
+ },
55550
+ listItemAvatarProps: {
55551
+ type: Object,
55552
+ default: void 0
55553
+ },
55554
+ listItemBadgeProps: {
55555
+ type: Object,
55556
+ default: void 0
55557
+ },
55558
+ headerTitle: {
55559
+ type: [String, Function],
55560
+ default: void 0
55561
+ },
55562
+ headerActions: {
55563
+ type: Array,
55564
+ default: () => []
55565
+ },
55566
+ headerButtonProps: {
55567
+ type: Object,
55568
+ default: void 0
55569
+ },
55570
+ headerIconProps: {
55571
+ type: Object,
55572
+ default: void 0
55573
+ },
55574
+ headerShareButtonProps: {
55575
+ type: Object,
55576
+ default: void 0
55577
+ },
55578
+ headerProfileButtonProps: {
55579
+ type: Object,
55580
+ default: void 0
55581
+ },
55582
+ headerCloseButtonProps: {
55583
+ type: Object,
55584
+ default: void 0
55585
+ },
55586
+ headerShareIconProps: {
55587
+ type: Object,
55588
+ default: void 0
55589
+ },
55590
+ headerProfileIconProps: {
55591
+ type: Object,
55592
+ default: void 0
55593
+ },
55594
+ messageSenderAvatarProps: {
55595
+ type: Object,
55596
+ default: void 0
55597
+ },
55598
+ messageUploadProps: {
55599
+ type: Object,
55600
+ default: void 0
55601
+ },
55602
+ messageButtonProps: {
55603
+ type: Object,
55604
+ default: void 0
55605
+ },
55606
+ footerInputProps: {
55607
+ type: Object,
55608
+ default: void 0
55609
+ },
55610
+ footerButtonProps: {
55611
+ type: Object,
55612
+ default: void 0
55613
+ },
55614
+ footerUploadProps: {
55615
+ type: Object,
55616
+ default: void 0
55617
+ },
55618
+ footerUploadTriggerProps: {
55619
+ type: Object,
55620
+ default: void 0
55621
+ },
55622
+ footerIconProps: {
55623
+ type: Object,
55624
+ default: void 0
55625
+ },
55626
+ footerSuffixIconProps: {
55627
+ type: Object,
55628
+ default: void 0
55629
+ },
55630
+ emptyProps: {
55631
+ type: Object,
55632
+ default: void 0
55633
+ },
55634
+ retryText: {
55635
+ type: String,
55636
+ default: void 0
55637
+ },
55638
+ typingText: {
55639
+ type: String,
55640
+ default: void 0
55641
+ },
55642
+ closeButtonText: {
55643
+ type: String,
55644
+ default: void 0
55645
+ },
55646
+ shareButtonTooltip: {
55647
+ type: String,
55648
+ default: void 0
55649
+ },
55650
+ profileButtonTooltip: {
55651
+ type: String,
55652
+ default: void 0
55653
+ },
55654
+ unreadNotificationText: {
55655
+ type: String,
55656
+ default: void 0
55657
+ },
55658
+ chatItemsLoading: {
55659
+ type: Boolean,
55660
+ default: false
55661
+ },
55662
+ chatItemsLoadingCount: {
55663
+ type: Number,
55664
+ default: 10
55665
+ },
55666
+ messagesLoading: {
55667
+ type: Boolean,
55668
+ default: false
55669
+ },
55670
+ messagesLoadingCount: {
55671
+ type: Number,
55672
+ default: 10
55673
+ },
55674
+ height: {
55675
+ type: [String, Number],
55676
+ default: 800
55677
+ },
55678
+ onChatSelect: {
55679
+ type: Function,
55680
+ default: void 0
55681
+ },
55682
+ onMessageRetry: {
55683
+ type: Function,
55684
+ default: void 0
55685
+ },
55686
+ bubbleActions: {
55687
+ type: Array,
55688
+ default: void 0
55689
+ },
55690
+ onChatClose: {
55691
+ type: Function,
55692
+ default: void 0
55693
+ },
55694
+ onChatShare: {
55695
+ type: Function,
55696
+ default: void 0
55697
+ },
55698
+ onUserProfile: {
55699
+ type: Function,
55700
+ default: void 0
55701
+ },
55702
+ onAttachmentUpload: {
55703
+ type: Function,
55704
+ default: void 0
55705
+ },
55706
+ onAttachmentDownload: {
55707
+ type: Function,
55708
+ default: void 0
55709
+ },
55710
+ onFilterChange: {
55711
+ type: Function,
55712
+ default: void 0
55713
+ },
55714
+ onFooterInputChange: {
55715
+ type: Function,
55716
+ default: void 0
55717
+ },
55718
+ onNetworkError: {
55719
+ type: Function,
55720
+ default: void 0
55721
+ },
55722
+ onUploadError: {
55723
+ type: Function,
55724
+ default: void 0
55725
+ },
55726
+ onSendError: {
55727
+ type: Function,
55728
+ default: void 0
55729
+ },
55730
+ onChatItemsScrollToTop: {
55731
+ type: Function,
55732
+ default: void 0
55733
+ },
55734
+ onChatItemsScrollToBottom: {
55735
+ type: Function,
55736
+ default: void 0
55737
+ },
55738
+ onMessagesScrollToTop: {
55739
+ type: Function,
55740
+ default: void 0
55741
+ },
55742
+ onMessagesScrollToBottom: {
55743
+ type: Function,
55744
+ default: void 0
55745
+ }
55746
+ };
55480
55747
 
55481
55748
  var style$15 = cB("chat", `
55482
55749
  height: 100%;
@@ -56306,6 +56573,10 @@ const chatMainAreaProps = {
56306
56573
  type: Object,
56307
56574
  default: void 0
56308
56575
  },
56576
+ inputValue: {
56577
+ type: String,
56578
+ default: void 0
56579
+ },
56309
56580
  messages: {
56310
56581
  type: Array,
56311
56582
  default: () => []
@@ -56422,6 +56693,10 @@ const chatMainAreaProps = {
56422
56693
  type: Function,
56423
56694
  default: void 0
56424
56695
  },
56696
+ "onUpdate:inputValue": {
56697
+ type: Function,
56698
+ default: void 0
56699
+ },
56425
56700
  onChatClose: {
56426
56701
  type: Function,
56427
56702
  default: void 0
@@ -56474,6 +56749,10 @@ var _UChatMainArea = defineComponent({
56474
56749
  const headerProfileIconPropsRef = UChat?.headerProfileIconPropsRef ?? toRef(props, "headerProfileIconProps");
56475
56750
  const messageUploadPropsRef = UChat?.messageUploadPropsRef ?? toRef(props, "messageUploadProps");
56476
56751
  const footerInputPropsRef = UChat?.footerInputPropsRef ?? toRef(props, "footerInputProps");
56752
+ const safeFooterInputPropsRef = computed(() => {
56753
+ const { value, ...rest } = footerInputPropsRef.value ?? {};
56754
+ return rest;
56755
+ });
56477
56756
  const footerButtonPropsRef = UChat?.footerButtonPropsRef ?? toRef(props, "footerButtonProps");
56478
56757
  const footerUploadPropsRef = UChat?.footerUploadPropsRef ?? toRef(props, "footerUploadProps");
56479
56758
  const footerIconPropsRef = UChat?.footerIconPropsRef ?? toRef(props, "footerIconProps");
@@ -56598,7 +56877,22 @@ var _UChatMainArea = defineComponent({
56598
56877
  );
56599
56878
  const messagesBodyRef = ref();
56600
56879
  const inputRef = ref();
56601
- const inputValue = ref("");
56880
+ const uncontrolledInputValueRef = ref(props.inputValue ?? "");
56881
+ const handleInputValueChange = UChat?.handleInputValueChange ?? ((value) => {
56882
+ uncontrolledInputValueRef.value = value;
56883
+ props["onUpdate:inputValue"]?.(value);
56884
+ });
56885
+ const inputValue = computed({
56886
+ get: () => {
56887
+ if (UChat) {
56888
+ return UChat.inputValueRef.value ?? "";
56889
+ }
56890
+ return props.inputValue !== void 0 ? props.inputValue : uncontrolledInputValueRef.value;
56891
+ },
56892
+ set: (value) => {
56893
+ handleInputValueChange(value);
56894
+ }
56895
+ });
56602
56896
  const attachmentFileList = ref([]);
56603
56897
  const uploadedAttachmentsMap = ref(/* @__PURE__ */ new Map());
56604
56898
  const lastScrollTop = ref(0);
@@ -57173,13 +57467,14 @@ var _UChatMainArea = defineComponent({
57173
57467
  }
57174
57468
  },
57175
57469
  onKeydown: (e) => {
57470
+ footerInputPropsRef.value?.onKeydown?.(e);
57176
57471
  if (e.key === "Enter" && !e.shiftKey) {
57177
57472
  e.preventDefault();
57178
57473
  e.stopPropagation();
57179
57474
  void handleSendMessage();
57180
57475
  }
57181
57476
  },
57182
- ...footerInputPropsRef.value
57477
+ ...safeFooterInputPropsRef.value
57183
57478
  },
57184
57479
  {
57185
57480
  prefix: () => renderEditingBlock(),
@@ -57213,6 +57508,8 @@ var _UChatMainArea = defineComponent({
57213
57508
  mergedClsPrefixRef,
57214
57509
  mergedThemeRef,
57215
57510
  selectedChatRef,
57511
+ inputValueRef: inputValue,
57512
+ handleInputValueChange,
57216
57513
  messagesRef,
57217
57514
  typingChatIdsRef,
57218
57515
  messagesLoadingRef,
@@ -58982,250 +59279,12 @@ var ChatSidebar = defineComponent({
58982
59279
  }
58983
59280
  });
58984
59281
 
58985
- const chatProps = {
58986
- ...useTheme.props,
58987
- chatItems: {
58988
- type: Array,
58989
- default: () => []
58990
- },
58991
- selectedChatId: {
58992
- type: [String, Number],
58993
- default: void 0
58994
- },
58995
- messages: {
58996
- type: Array,
58997
- default: () => []
58998
- },
58999
- typingChatIds: {
59000
- type: Array,
59001
- default: () => []
59002
- },
59003
- disabled: {
59004
- type: Boolean,
59005
- default: false
59006
- },
59007
- listEmptyProps: {
59008
- type: Object,
59009
- default: void 0
59010
- },
59011
- listHeaderTitle: {
59012
- type: [String, Function],
59013
- default: "Chats"
59014
- },
59015
- listHeaderActions: {
59016
- type: Array,
59017
- default: () => []
59018
- },
59019
- listHeaderButtonProps: {
59020
- type: Object,
59021
- default: void 0
59022
- },
59023
- listHeaderIconProps: {
59024
- type: Object,
59025
- default: void 0
59026
- },
59027
- listItemAvatarProps: {
59028
- type: Object,
59029
- default: void 0
59030
- },
59031
- listItemBadgeProps: {
59032
- type: Object,
59033
- default: void 0
59034
- },
59035
- headerTitle: {
59036
- type: [String, Function],
59037
- default: void 0
59038
- },
59039
- headerActions: {
59040
- type: Array,
59041
- default: () => []
59042
- },
59043
- headerButtonProps: {
59044
- type: Object,
59045
- default: void 0
59046
- },
59047
- headerIconProps: {
59048
- type: Object,
59049
- default: void 0
59050
- },
59051
- headerShareButtonProps: {
59052
- type: Object,
59053
- default: void 0
59054
- },
59055
- headerProfileButtonProps: {
59056
- type: Object,
59057
- default: void 0
59058
- },
59059
- headerCloseButtonProps: {
59060
- type: Object,
59061
- default: void 0
59062
- },
59063
- headerShareIconProps: {
59064
- type: Object,
59065
- default: void 0
59066
- },
59067
- headerProfileIconProps: {
59068
- type: Object,
59069
- default: void 0
59070
- },
59071
- messageSenderAvatarProps: {
59072
- type: Object,
59073
- default: void 0
59074
- },
59075
- messageUploadProps: {
59076
- type: Object,
59077
- default: void 0
59078
- },
59079
- messageButtonProps: {
59080
- type: Object,
59081
- default: void 0
59082
- },
59083
- footerInputProps: {
59084
- type: Object,
59085
- default: void 0
59086
- },
59087
- footerButtonProps: {
59088
- type: Object,
59089
- default: void 0
59090
- },
59091
- footerUploadProps: {
59092
- type: Object,
59093
- default: void 0
59094
- },
59095
- footerUploadTriggerProps: {
59096
- type: Object,
59097
- default: void 0
59098
- },
59099
- footerIconProps: {
59100
- type: Object,
59101
- default: void 0
59102
- },
59103
- footerSuffixIconProps: {
59104
- type: Object,
59105
- default: void 0
59106
- },
59107
- emptyProps: {
59108
- type: Object,
59109
- default: void 0
59110
- },
59111
- retryText: {
59112
- type: String,
59113
- default: void 0
59114
- },
59115
- typingText: {
59116
- type: String,
59117
- default: void 0
59118
- },
59119
- closeButtonText: {
59120
- type: String,
59121
- default: void 0
59122
- },
59123
- shareButtonTooltip: {
59124
- type: String,
59125
- default: void 0
59126
- },
59127
- profileButtonTooltip: {
59128
- type: String,
59129
- default: void 0
59130
- },
59131
- unreadNotificationText: {
59132
- type: String,
59133
- default: void 0
59134
- },
59135
- chatItemsLoading: {
59136
- type: Boolean,
59137
- default: false
59138
- },
59139
- chatItemsLoadingCount: {
59140
- type: Number,
59141
- default: 10
59142
- },
59143
- messagesLoading: {
59144
- type: Boolean,
59145
- default: false
59146
- },
59147
- messagesLoadingCount: {
59148
- type: Number,
59149
- default: 10
59150
- },
59151
- height: {
59152
- type: [String, Number],
59153
- default: 800
59154
- },
59155
- onChatSelect: {
59156
- type: Function,
59157
- default: void 0
59158
- },
59159
- onMessageRetry: {
59160
- type: Function,
59161
- default: void 0
59162
- },
59163
- bubbleActions: {
59164
- type: Array,
59165
- default: void 0
59166
- },
59167
- onChatClose: {
59168
- type: Function,
59169
- default: void 0
59170
- },
59171
- onChatShare: {
59172
- type: Function,
59173
- default: void 0
59174
- },
59175
- onUserProfile: {
59176
- type: Function,
59177
- default: void 0
59178
- },
59179
- onAttachmentUpload: {
59180
- type: Function,
59181
- default: void 0
59182
- },
59183
- onAttachmentDownload: {
59184
- type: Function,
59185
- default: void 0
59186
- },
59187
- onFilterChange: {
59188
- type: Function,
59189
- default: void 0
59190
- },
59191
- onFooterInputChange: {
59192
- type: Function,
59193
- default: void 0
59194
- },
59195
- onNetworkError: {
59196
- type: Function,
59197
- default: void 0
59198
- },
59199
- onUploadError: {
59200
- type: Function,
59201
- default: void 0
59202
- },
59203
- onSendError: {
59204
- type: Function,
59205
- default: void 0
59206
- },
59207
- onChatItemsScrollToTop: {
59208
- type: Function,
59209
- default: void 0
59210
- },
59211
- onChatItemsScrollToBottom: {
59212
- type: Function,
59213
- default: void 0
59214
- },
59215
- onMessagesScrollToTop: {
59216
- type: Function,
59217
- default: void 0
59218
- },
59219
- onMessagesScrollToBottom: {
59220
- type: Function,
59221
- default: void 0
59222
- }
59223
- };
59224
59282
  var _UChat = defineComponent({
59225
59283
  name: "Chat",
59226
59284
  props: chatProps,
59227
59285
  emits: [
59228
59286
  "update:selectedChatId",
59287
+ "update:inputValue",
59229
59288
  "message-send",
59230
59289
  "message-retry",
59231
59290
  "attachment-upload",
@@ -59346,6 +59405,14 @@ var _UChat = defineComponent({
59346
59405
  const mergedSelectedChatIdRef = computed(() => {
59347
59406
  return props.selectedChatId !== void 0 ? props.selectedChatId : uncontrolledSelectedChatIdRef.value;
59348
59407
  });
59408
+ const uncontrolledInputValueRef = ref(props.inputValue ?? "");
59409
+ const mergedInputValueRef = computed(() => {
59410
+ return props.inputValue !== void 0 ? props.inputValue : uncontrolledInputValueRef.value;
59411
+ });
59412
+ const handleInputValueChange = (value) => {
59413
+ uncontrolledInputValueRef.value = value;
59414
+ emit("update:inputValue", value);
59415
+ };
59349
59416
  const selectedChatRef = computed(() => {
59350
59417
  return props.chatItems?.find(
59351
59418
  (item) => item.id === mergedSelectedChatIdRef.value
@@ -59459,6 +59526,8 @@ var _UChat = defineComponent({
59459
59526
  chatItemsRef: toRef(props, "chatItems"),
59460
59527
  selectedChatIdRef: mergedSelectedChatIdRef,
59461
59528
  selectedChatRef,
59529
+ inputValueRef: mergedInputValueRef,
59530
+ handleInputValueChange,
59462
59531
  messagesRef: filteredMessagesRef,
59463
59532
  typingChatIdsRef: toRef(props, "typingChatIds"),
59464
59533
  chatItemsLoadingRef: toRef(props, "chatItemsLoading"),
@@ -117631,7 +117700,7 @@ function useThemeVars() {
117631
117700
  });
117632
117701
  }
117633
117702
 
117634
- var version = "2.3.3";
117703
+ var version = "2.3.5";
117635
117704
 
117636
117705
  function create({
117637
117706
  componentPrefix = "U",