x-ui-design 1.0.9 → 1.0.10

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.
@@ -8,7 +8,7 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
  steps:
10
10
  - name: Run xUIDesign
11
- uses: gabboyajyan/xUIDesign@main
11
+ uses: gabboyajyan/xUIDesign@master
12
12
  env:
13
- DEFAULT_BRANCH: main
13
+ DEFAULT_BRANCH: master
14
14
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/compile.sh CHANGED
@@ -9,7 +9,7 @@ git commit -m "Push command from compile"
9
9
 
10
10
  npm version patch
11
11
 
12
- git push origin main
12
+ git push origin master
13
13
  git push spring-origin main
14
14
 
15
15
  npm publish
package/dist/index.esm.js CHANGED
@@ -4191,7 +4191,8 @@ const Option = ({
4191
4191
  disabled: disabled
4192
4192
  }]),
4193
4193
  style: style,
4194
- onClick: handleClick
4194
+ onClick: handleClick,
4195
+ "data-testid": value || children
4195
4196
  }, title ? {
4196
4197
  title
4197
4198
  } : {}), render ? render(value) : children || value);
@@ -4628,11 +4629,12 @@ const Select = ({
4628
4629
  };
4629
4630
  const selectedOption = useMemo(() => {
4630
4631
  const option = extractedOptions.find(e => e.value === selected || e.label === selected || e.children === selected) || selected;
4632
+ const title = typeof option === 'string' ? option : option?.children || option?.label || option?.value || null;
4631
4633
  return /*#__PURE__*/React.createElement("div", {
4632
4634
  style: {
4633
4635
  display: 'contents'
4634
4636
  }
4635
- }, typeof option === 'string' ? option : option?.children || option?.label || option?.value || null);
4637
+ }, title);
4636
4638
  }, [extractedOptions, selected]) || selected || null;
4637
4639
  const hasMaxTagCount = hasMode && (typeof maxTagCount === 'number' || maxTagCount === 'responsive');
4638
4640
  const container = tagtriggerRef.current;
@@ -4699,7 +4701,8 @@ const Select = ({
4699
4701
  [`${prefixCls}-tag-container-fixHeight ${prefixClsV3}-tag-container-fixHeight`]: !tagtriggerRef.current
4700
4702
  }])
4701
4703
  }, hasMode ? /*#__PURE__*/React.createElement(React.Fragment, null, selectedTags.length ? /*#__PURE__*/React.createElement(React.Fragment, null, tagsToDisplay.map((tag, index) => tagRender ? /*#__PURE__*/React.createElement("div", {
4702
- key: `${index}_${tag}`
4704
+ key: `${index}_${tag}`,
4705
+ "data-testid": tag
4703
4706
  }, tagRender?.({
4704
4707
  label: (() => {
4705
4708
  const option = extractedOptions.find(e => e.value === tag || e.label === tag || e.children === tag);
@@ -4809,7 +4812,8 @@ const Select = ({
4809
4812
  onClick: e => {
4810
4813
  handleSelect(e, searchQuery);
4811
4814
  },
4812
- "data-value": searchQuery
4815
+ "data-value": searchQuery,
4816
+ "data-testid": searchQuery
4813
4817
  }, searchQuery), filteredOptions.length ? filteredOptions.map(({
4814
4818
  children,
4815
4819
  className = '',
@@ -4835,7 +4839,8 @@ const Select = ({
4835
4839
  key: `${index}`
4836
4840
  });
4837
4841
  },
4838
- "data-value": props.value
4842
+ "data-value": props.value,
4843
+ "data-testid": props.value
4839
4844
  }), children || props.label || props.value, menuItemSelectedIcon && hasMode && isSelected && /*#__PURE__*/React.createElement("span", {
4840
4845
  className: `${prefixCls}-selected-icon ${prefixClsV3}-selected-icon`
4841
4846
  }, menuItemSelectedIcon === true ? /*#__PURE__*/React.createElement(CheckIcon, null) : menuItemSelectedIcon));