tanxin-ui 0.5.9 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1485,6 +1485,20 @@ function colorHsl(color, index2) {
1485
1485
  v: getValue$2(hsv[2], i2, isLight2)
1486
1486
  }).toHslString().replace(/hsl\((.*)\)/, "$1");
1487
1487
  }
1488
+ function updateColor(style, hexColor, colorName) {
1489
+ for (let i2 = 1; i2 <= 10; i2++) {
1490
+ style["--" + colorName + "-" + i2] = colorPalette(hexColor, i2);
1491
+ style["--" + colorName + "-" + i2 + "-hsl"] = colorHsl(hexColor, i2);
1492
+ }
1493
+ if (colorName == "primary") {
1494
+ style["--border-color-hover"] = "var(--primary-6)";
1495
+ style["--bg-color-selected"] = "var(--primary-6)";
1496
+ style["--bg-color-selected-light"] = "hsla(var(--primary-6-hsl) , 14%)";
1497
+ style["--primary-color"] = "var(--primary-6)";
1498
+ style["--primary-color-shadow"] = "hsla(var(--primary-6-hsl) , 20%)";
1499
+ style["--primary-color-shadow-secondary"] = "hsla(var(--primary-6-hsl) , 15%)";
1500
+ }
1501
+ }
1488
1502
  const configProviderProps = {
1489
1503
  rootPrefixCls: PropTypes.string.def("t"),
1490
1504
  theme: PropTypes.string.def("light"),
@@ -1503,7 +1517,7 @@ var ConfigProvider = defineComponent({
1503
1517
  if (props.colors != void 0) {
1504
1518
  for (const key in props.colors) {
1505
1519
  if (props.colors[key]) {
1506
- updateColor(style, key);
1520
+ updateColor(style, props.colors[key], key);
1507
1521
  }
1508
1522
  }
1509
1523
  }
@@ -1514,21 +1528,6 @@ var ConfigProvider = defineComponent({
1514
1528
  [`theme-${props.theme}`]: props.theme != "light"
1515
1529
  }];
1516
1530
  });
1517
- const updateColor = (style, colorName) => {
1518
- const hexColor = props.colors[colorName];
1519
- for (let i2 = 1; i2 <= 10; i2++) {
1520
- style["--" + colorName + "-" + i2] = colorPalette(hexColor, i2);
1521
- style["--" + colorName + "-" + i2 + "-hsl"] = colorHsl(hexColor, i2);
1522
- }
1523
- if (colorName == "primary") {
1524
- style["--border-color-hover"] = "var(--primary-6)";
1525
- style["--bg-color-selected"] = "var(--primary-6)";
1526
- style["--bg-color-selected-light"] = "hsla(var(--primary-6-hsl) , 14%)";
1527
- style["--primary-color"] = "var(--primary-6)";
1528
- style["--primary-color-shadow"] = "hsla(var(--primary-6-hsl) , 20%)";
1529
- style["--primary-color-shadow-secondary"] = "hsla(var(--primary-6-hsl) , 15%)";
1530
- }
1531
- };
1532
1531
  const configProvider = {
1533
1532
  rootPrefixCls: computed(() => props.rootPrefixCls),
1534
1533
  customStyles: computed(() => styles.value)
@@ -11876,8 +11875,7 @@ var MessageList = defineComponent({
11876
11875
  const messageArr = reactive([]);
11877
11876
  const render = () => {
11878
11877
  let _slot;
11879
- const transitionProps = getTransitionGroupProps("move-up");
11880
- console.log("transitionProps=", transitionProps);
11878
+ getTransitionGroupProps("move-up");
11881
11879
  return createVNode(Fragment, null, [createVNode(resolveComponent("transition-group"), {
11882
11880
  "tag": "div",
11883
11881
  "name": "message-animation",
@@ -15920,7 +15918,9 @@ var Modal = defineComponent({
15920
15918
  });
15921
15919
  const containerStyles = computed(() => {
15922
15920
  const configContext = injectConfig();
15923
- const style = cloneDeep(configContext.customStyles.value);
15921
+ let style = cloneDeep(configContext.customStyles.value);
15922
+ if (style == void 0)
15923
+ style = {};
15924
15924
  if (props.width && !fullscreen.value) {
15925
15925
  style[`width`] = dialogPosition.value ? "100%" : getLength(props.width);
15926
15926
  style[`max-width`] = dialogPosition.value ? "100%" : "94%";
@@ -16615,7 +16615,9 @@ var Drawer = defineComponent({
16615
16615
  });
16616
16616
  const containerStyles = computed(() => {
16617
16617
  const configContext = injectConfig();
16618
- const style = cloneDeep(configContext.customStyles.value);
16618
+ let style = cloneDeep(configContext.customStyles.value);
16619
+ if (style == void 0)
16620
+ style = {};
16619
16621
  if (props.width && !fullscreen.value)
16620
16622
  ;
16621
16623
  return style;