@cypress-design/react-docmenu 0.5.3 → 0.5.4

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
@@ -183,10 +183,10 @@ const classes = {
183
183
  };
184
184
 
185
185
  var DocLink = React__namespace.forwardRef(function (_a, ref) {
186
- var item = _a.item, depth = _a.depth, markerIsMoving = _a.markerIsMoving, context = _a.context, onActive = _a.onActive, LinkComponent = _a.LinkComponent;
186
+ var _b = _a.item, label = _b.label, itemRest = __rest$1(_b, ["label"]), depth = _a.depth, markerIsMoving = _a.markerIsMoving, context = _a.context, onActive = _a.onActive, LinkComponent = _a.LinkComponent;
187
187
  var activeLIRef = React__namespace.useRef(null);
188
188
  var collapsible = context.collapsible, activePath = context.activePath;
189
- var active = item.href === activePath;
189
+ var active = itemRest.href === activePath;
190
190
  var setActiveMarkerPosition = function () {
191
191
  var _a;
192
192
  if (active) {
@@ -204,20 +204,20 @@ var DocLink = React__namespace.forwardRef(function (_a, ref) {
204
204
  setActiveMarkerPosition: setActiveMarkerPosition,
205
205
  }); });
206
206
  return (React__namespace.createElement("li", { ref: activeLIRef, className: "list-none p-0" },
207
- React__namespace.createElement(LinkComponent, { className: clsx('group relative block w-full pl-[24px]', {
207
+ React__namespace.createElement(LinkComponent, __assign$1({}, itemRest, { className: clsx('group relative block w-full pl-[24px]', {
208
208
  'text-indigo-500 dark:text-indigo-400': active,
209
209
  'text-gray-700 dark:text-gray-500': !active,
210
210
  'py-[8px] text-[16px] leading-[24px]': depth < 0,
211
211
  'leading-[20px] text-[14px] py-[12px]': depth >= 0,
212
- }), href: item.href, style: {
212
+ }), style: {
213
213
  paddingLeft: depth >= 0 ? "".concat(depth * 12 + 48, "px") : undefined,
214
- } },
214
+ } }),
215
215
  depth >= 0 ? (React__namespace.createElement("div", { className: clsx('left-[6.5px] absolute top-[4px] bottom-[4px] w-[4px] z-10 rounded-full', {
216
216
  hidden: !markerIsMoving || !active,
217
217
  'group-hover:block bg-gray-300': !active && collapsible,
218
218
  'bg-indigo-500 dark:bg-indigo-400': active && markerIsMoving,
219
219
  }) })) : null,
220
- item.label)));
220
+ label)));
221
221
  });
222
222
 
223
223
  var hasActiveItemRecursively = function (items, localActivePath) {
@@ -307,12 +307,15 @@ var DocGroup = React__namespace.forwardRef(function (_a, ref) {
307
307
  _b['text-indigo-500 dark:text-indigo-400'] = activePath === group.href,
308
308
  _b['text-gray-900 dark:text-gray-100'] = hasActiveItemRecursivelyMemo && activePath !== group.href,
309
309
  _b['text-gray-800 dark:text-gray-200'] = !hasActiveItemRecursivelyMemo && activePath !== group.href,
310
- _b)) },
310
+ _b)), style: {
311
+ paddingLeft: depth >= 1 ? "".concat((depth - 1) * 12 + 48, "px") : undefined,
312
+ } },
311
313
  collapsible ? (React__namespace.createElement(IconChevronDownSmall, { "stroke-color": "gray-400", size: depth ? '8' : '16', className: clsx(classes.expandedIcon, {
312
314
  'rotate-0': open,
313
315
  '-rotate-90': !open,
314
- 'ml-[28px]': depth,
315
- }) })) : null,
316
+ }), style: {
317
+ marginLeft: depth >= 1 ? "".concat((depth - 1) * 12 + 28, "px") : undefined,
318
+ } })) : null,
316
319
  group.label),
317
320
  React__namespace.createElement("div", { className: clsx('relative', collapsible
318
321
  ? {
@@ -415,4 +418,4 @@ var DocMenu = function (_a) {
415
418
  module.exports = DocMenu;
416
419
  //# sourceMappingURL=index.umd.js.map
417
420
 
418
- /* <wind-keep class="container relative absolute h-[36px] w-[4px] z-50 rounded-full bg-indigo-500 dark:bg-indigo-400 ml-[6.5px] mt-[4px] transition ease-in-out text-indigo-500 dark:text-indigo-400 text-gray-900 dark:text-gray-100 text-gray-800 dark:text-gray-200 rotate-0 -rotate-90 ml-[28px] transition-all grid grid-rows-[0fr] grid-rows-[1fr] overflow-hidden filter list-none p-0 block w-full pl-[24px] text-gray-700 dark:text-gray-500 py-[8px] text-[16px] leading-[24px] leading-[20px] text-[14px] py-[12px] left-[6.5px] top-[4px] bottom-[4px] z-10 hidden group-hover:block bg-gray-300 text-indigo-400 text-gray-500 bg-indigo-400 left-0 transform transition-transform text-gray-400 dark:text-gray-700 flex py-[10px] items-center text-start font-medium pl-[48px] left-[8px] top-0 w-[1px] h-full bg-gray-100 dark:bg-gray-900"> */
421
+ /* <wind-keep class="container relative absolute h-[36px] w-[4px] z-50 rounded-full bg-indigo-500 dark:bg-indigo-400 ml-[6.5px] mt-[4px] transition ease-in-out text-indigo-500 dark:text-indigo-400 text-gray-900 dark:text-gray-100 text-gray-800 dark:text-gray-200 rotate-0 -rotate-90 transition-all grid grid-rows-[0fr] grid-rows-[1fr] overflow-hidden filter list-none p-0 block w-full pl-[24px] text-gray-700 dark:text-gray-500 py-[8px] text-[16px] leading-[24px] leading-[20px] text-[14px] py-[12px] left-[6.5px] top-[4px] bottom-[4px] z-10 hidden group-hover:block bg-gray-300 text-indigo-400 text-gray-500 bg-indigo-400 left-0 transform transition-transform text-gray-400 dark:text-gray-700 flex py-[10px] items-center text-start font-medium pl-[48px] left-[8px] top-0 w-[1px] h-full bg-gray-100 dark:bg-gray-900"> */