@hexure/ui 1.14.9 → 1.14.11

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.
@@ -4,6 +4,7 @@ interface OptionProps {
4
4
  label?: string;
5
5
  value: string | number;
6
6
  color?: string;
7
+ dataItemid?: string;
7
8
  }
8
9
  export interface ChecklistProps extends AccessibleProps {
9
10
  disabled?: boolean;
package/dist/esm/index.js CHANGED
@@ -3710,8 +3710,8 @@ const Checklist = (_a) => {
3710
3710
  React.createElement(Options$1, { "data-itemid": `${baseId}-options` }, options.map((option, i) => {
3711
3711
  const label = `${option.label || option.value}`;
3712
3712
  const checked = selected.includes(option.value);
3713
- const optionId = `${baseId}-option-${i}`;
3714
- return (React.createElement(Checkbox, Object.assign({ "data-itemid": `${optionId}-checkbox`, key: i }, accessibleProps, { checked: checked, color: option.color, disabled: disabled, onChange: handleChange.bind(null, option) }), label));
3713
+ const optionId = option.dataItemid || `${baseId}-option-${i}`;
3714
+ return (React.createElement(Checkbox, Object.assign({ dataItemid: `${optionId}-checkbox`, key: i }, accessibleProps, { checked: checked, color: option.color, disabled: disabled, onChange: handleChange.bind(null, option) }), label));
3715
3715
  }))));
3716
3716
  };
3717
3717
 
@@ -6451,7 +6451,7 @@ const Tabs = (_a) => {
6451
6451
  const baseId = dataItemid || 'tabs';
6452
6452
  return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }), tabs.map((_a, i) => {
6453
6453
  var { isActive, label, badgeCount, errorBadge, onClick } = _a, accessibleProps = __rest(_a, ["isActive", "label", "badgeCount", "errorBadge", "onClick"]);
6454
- const tabId = `${baseId}-tab-${i}`;
6454
+ const tabId = `${baseId}-tab-${label.replace(/\s+/g, '-').toLowerCase()}`;
6455
6455
  return (React.createElement(Tab, Object.assign({ "$isActive": isActive || false, key: i, onClick: isActive ? undefined : onClick }, accessibleProps, { "data-itemid": `${tabId}-tab`, title: accessibleProps === null || accessibleProps === void 0 ? void 0 : accessibleProps.title }),
6456
6456
  badgeCount ? (React.createElement(Badge, { "$isError": errorBadge || false, "data-itemid": `${tabId}-badge` }, badgeCount)) : null,
6457
6457
  label));