@cypress-design/react-docmenu 0.7.1 → 1.0.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.
package/dist/index.umd.js CHANGED
@@ -115,7 +115,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
115
115
  };
116
116
 
117
117
  var compileReactIconProperties = function (_a) {
118
- var body = _a.body, defs = _a.defs, compiledClasses = _a.compiledClasses, size = _a.size, name = _a.name, attributes = __rest(_a, ["body", "defs", "compiledClasses", "size", "name"]);
118
+ var body = _a.body, defs = _a.defs, compiledClasses = _a.compiledClasses, size = _a.size, name = _a.name, alt = _a.alt, attributes = __rest(_a, ["body", "defs", "compiledClasses", "size", "name", "alt"]);
119
119
  var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
120
120
  if (!iconsRegistry.ICON_COLOR_PROP_NAMES.includes(attrName) &&
121
121
  attrName !== 'name') {
@@ -142,7 +142,11 @@ var compileReactIconProperties = function (_a) {
142
142
  }
143
143
  }, [defs, name, size]);
144
144
  var componentProps = __assign({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
145
- __html: body,
145
+ __html: alt
146
+ ? "<title>".concat(alt.replace(/[><]/g, function (s) {
147
+ return s === '>' ? '&gt;' : '&lt;';
148
+ }), "</title>").concat(body)
149
+ : body,
146
150
  }, className: undefined }, filteredAttributes);
147
151
  if (attributes.className) {
148
152
  compiledClasses.push(attributes.className);
@@ -164,10 +168,10 @@ function useIconProps(props, iconBodiesAndDefs, availableSizes, name) {
164
168
  }
165
169
  var IconChevronDownSmall = function (props) { return React__namespace.createElement('svg', useIconProps(props, {
166
170
  "8": {
167
- "body": "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 2.5 3 3 3-3\" class=\"icon-dark\"/>"
171
+ "body": "<path d=\"m1 2.5 3 3 3-3\" stroke=\"currentColor\" class=\"icon-dark\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
168
172
  },
169
173
  "16": {
170
- "body": "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m4 6 4 4 4-4\" class=\"icon-dark\"/>"
174
+ "body": "<path d=\"m4 6 4 4 4-4\" stroke=\"currentColor\" class=\"icon-dark\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
171
175
  }
172
176
  }, ["8", "16"], "chevron-down-small")); };
173
177