@uzum-tech/ui 1.12.5 → 1.12.7

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
@@ -27133,41 +27133,63 @@
27133
27133
  }
27134
27134
  }
27135
27135
  };
27136
- const variantWeights = {
27137
- display: ["", "medium", "semi-bold", "bold"],
27138
- heading: ["medium", "semi-bold", "bold"],
27139
- title: ["medium", "semi-bold", "bold"],
27140
- body: ["medium", "semi-bold", "bold"]
27141
- };
27136
+ const weightOrder = ["", "thin", "extra-light", "light", "normal", "medium", "semi-bold", "bold", "extra-bold", "black"];
27142
27137
  const fontWeights = {
27138
+ thin: {
27139
+ weight: "100",
27140
+ style: "normal"
27141
+ },
27142
+ "extra-light": {
27143
+ weight: "200",
27144
+ style: "normal"
27145
+ },
27146
+ light: {
27147
+ weight: "300",
27148
+ style: "normal"
27149
+ },
27150
+ normal: {
27151
+ weight: "400",
27152
+ style: "normal"
27153
+ },
27143
27154
  medium: {
27144
27155
  weight: "500",
27145
- style: "medium"
27156
+ style: "normal"
27146
27157
  },
27147
27158
  "semi-bold": {
27148
27159
  weight: "600",
27149
- style: "semibold"
27160
+ style: "normal"
27150
27161
  },
27151
27162
  bold: {
27152
27163
  weight: "700",
27153
- style: "bold"
27164
+ style: "normal"
27165
+ },
27166
+ "extra-bold": {
27167
+ weight: "800",
27168
+ style: "normal"
27169
+ },
27170
+ black: {
27171
+ weight: "900",
27172
+ style: "normal"
27154
27173
  },
27155
27174
  "": {
27156
27175
  weight: "700",
27157
- style: "bold"
27176
+ style: "normal"
27158
27177
  }
27159
27178
  };
27160
27179
  function createVariant(options, category, size, weight) {
27161
27180
  const base = options?.[category]?.[size] ?? defaultVariantOptions[category]?.[size];
27181
+ const effectiveWeight = weight === "" ? base?.defaultFontWeight ?? "" : weight;
27162
27182
  const {
27163
27183
  weight: fontWeight,
27164
27184
  style: fontStyle
27165
- } = fontWeights[weight];
27185
+ } = fontWeights[effectiveWeight] || fontWeights[""];
27186
+ const resolvedFontFamily = base.fontFamily ?? fontFamily;
27187
+ const resolvedFontStyle = base.fontStyle ?? fontStyle;
27166
27188
  return {
27167
- fontFamily,
27189
+ fontFamily: resolvedFontFamily,
27168
27190
  fontSize: base.fontSize,
27169
27191
  fontWeight,
27170
- fontStyle,
27192
+ fontStyle: resolvedFontStyle,
27171
27193
  lineHeight: base.lineHeight,
27172
27194
  letterSpacing: base.letterSpacing,
27173
27195
  tag: base.tag
@@ -27186,30 +27208,11 @@
27186
27208
  });
27187
27209
  return mergedOptions;
27188
27210
  }
27189
- function mergeVariantWeights(variantWeightsOptions) {
27190
- if (!variantWeightsOptions) return variantWeights;
27191
- const mergedWeights = {};
27192
- const categories = /* @__PURE__ */new Set([...Object.keys(variantWeights), ...Object.keys(variantWeightsOptions)]);
27193
- categories.forEach(category => {
27194
- const defaultWeights = variantWeights[category] || [];
27195
- const customWeights = variantWeightsOptions[category] || [];
27196
- const combined = [...defaultWeights];
27197
- customWeights.forEach(weight => {
27198
- if (!combined.includes(weight)) {
27199
- combined.push(weight);
27200
- }
27201
- });
27202
- mergedWeights[category] = combined;
27203
- });
27204
- return mergedWeights;
27205
- }
27206
- function createVariantToCssVars(variantOptions, variantWeightsOptions) {
27211
+ function createVariantToCssVars(variantOptions) {
27207
27212
  const configs = {};
27208
- const mergedWeights = mergeVariantWeights(variantWeightsOptions);
27209
27213
  Object.entries(variantOptions).forEach(([category, sizes]) => {
27210
- const weights = mergedWeights[category] || [];
27211
27214
  Object.keys(sizes).forEach(size => {
27212
- weights.forEach(weight => {
27215
+ weightOrder.forEach(weight => {
27213
27216
  const variantKey = `${category}-${size}${weight ? `-${weight}` : ""}`;
27214
27217
  configs[variantKey] = createVariant(variantOptions, category, size, weight);
27215
27218
  });
@@ -27217,16 +27220,16 @@
27217
27220
  });
27218
27221
  return configs;
27219
27222
  }
27220
- function resolveVariantConfigs(variantOptions, variantWeightsOptions) {
27223
+ function resolveVariantConfigs(variantOptions) {
27221
27224
  const hasCustomOptions = variantOptions && Object.keys(variantOptions).length > 0;
27222
- const hasCustomWeights = variantWeightsOptions && Object.keys(variantWeightsOptions).length > 0;
27223
- if (!hasCustomOptions && !hasCustomWeights) {
27225
+ if (!hasCustomOptions) {
27224
27226
  return variantToCssVars;
27225
27227
  }
27226
- return createVariantToCssVars(mergeVariantOptions(variantOptions), variantWeightsOptions);
27228
+ const mergedOptions = mergeVariantOptions(variantOptions);
27229
+ return createVariantToCssVars(mergedOptions);
27227
27230
  }
27228
- function getVariantCssVars(variant, baseVars, fontFamilyVariant, variantOptions, variantWeightsOptions) {
27229
- const variantStyles = variant ? resolveVariantConfigs(variantOptions, variantWeightsOptions)[variant] : void 0;
27231
+ function getVariantCssVars(variant, baseVars, fontFamilyVariant, variantOptions) {
27232
+ const variantStyles = variant ? resolveVariantConfigs(variantOptions)[variant] : void 0;
27230
27233
  if (!variantStyles) {
27231
27234
  return baseVars;
27232
27235
  }
@@ -27241,10 +27244,10 @@
27241
27244
  "--u-variant-letter-spacing": variantStyles.letterSpacing
27242
27245
  };
27243
27246
  }
27244
- function getVariantTag(variant, variantOptions, variantWeightsOptions) {
27245
- return resolveVariantConfigs(variantOptions, variantWeightsOptions)[variant]?.tag;
27247
+ function getVariantTag(variant, variantOptions) {
27248
+ return resolveVariantConfigs(variantOptions)[variant]?.tag;
27246
27249
  }
27247
- const variantToCssVars = createVariantToCssVars(defaultVariantOptions, variantWeights);
27250
+ const variantToCssVars = createVariantToCssVars(defaultVariantOptions);
27248
27251
 
27249
27252
  const internalTextProps = {
27250
27253
  ...useTheme.props,
@@ -27272,6 +27275,9 @@
27272
27275
  type: Object,
27273
27276
  default: () => ({})
27274
27277
  },
27278
+ /**
27279
+ * @deprecated Weight options are fixed internally; kept for backwards compatibility.
27280
+ */
27275
27281
  variantWeightsOptions: {
27276
27282
  type: Object,
27277
27283
  default: () => ({})
@@ -27336,8 +27342,7 @@
27336
27342
  variant,
27337
27343
  baseVars,
27338
27344
  fontFamilyWixMadeforDisplay,
27339
- props.variantOptions,
27340
- props.variantWeightsOptions
27345
+ props.variantOptions
27341
27346
  );
27342
27347
  });
27343
27348
  const themeClassHandle = inlineThemeDisabled ? useThemeClass(
@@ -27346,11 +27351,7 @@
27346
27351
  cssVarsRef,
27347
27352
  props
27348
27353
  ) : void 0;
27349
- const tagToRender = props.tag || props.variant && getVariantTag(
27350
- props.variant,
27351
- props.variantOptions,
27352
- props.variantWeightsOptions
27353
- ) || "span";
27354
+ const tagToRender = props.tag || props.variant && getVariantTag(props.variant, props.variantOptions) || "span";
27354
27355
  return {
27355
27356
  mergedClsPrefix: mergedClsPrefixRef,
27356
27357
  tagToRender,
@@ -56635,7 +56636,7 @@
56635
56636
  multiple: true,
56636
56637
  defaultUpload: false,
56637
56638
  fileList: attachmentFileList.value,
56638
- onUpdateFileList: handleFileListUpdate,
56639
+ onUpdateFileList: !handleOnChange() ? handleFileListUpdate : void 0,
56639
56640
  ...footerUploadPropsRef.value,
56640
56641
  onChange: handleOnChange()
56641
56642
  },
@@ -128207,6 +128208,7 @@
128207
128208
 
128208
128209
  var components = /*#__PURE__*/Object.freeze({
128209
128210
  __proto__: null,
128211
+ ChatAttachmentStatus: ChatAttachmentStatus,
128210
128212
  ChatMarkType: ChatMarkType,
128211
128213
  ChatMessageType: ChatMessageType,
128212
128214
  MessageStatus: MessageStatus,
@@ -128544,7 +128546,7 @@
128544
128546
  watermarkProps: watermarkProps
128545
128547
  });
128546
128548
 
128547
- var version = "1.12.5";
128549
+ var version = "1.12.7";
128548
128550
 
128549
128551
  function create({
128550
128552
  componentPrefix = "U",
@@ -129393,6 +129395,7 @@
129393
129395
  };
129394
129396
  }
129395
129397
 
129398
+ exports.ChatAttachmentStatus = ChatAttachmentStatus;
129396
129399
  exports.ChatMarkType = ChatMarkType;
129397
129400
  exports.ChatMessageType = ChatMessageType;
129398
129401
  exports.MessageStatus = MessageStatus;