@cypress-design/react-docmenu 0.5.4 → 0.7.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.
@@ -2,5 +2,5 @@ $ yarn build:module && yarn build:types
2
2
  $ rollup -c ./rollup.config.mjs
3
3
  
4
4
  ./index.ts → ./dist/index.umd.js, ./dist/index.es.mjs...
5
- created ./dist/index.umd.js, ./dist/index.es.mjs in 11.7s
5
+ created ./dist/index.umd.js, ./dist/index.es.mjs in 17.8s
6
6
  $ tsc --project ./tsconfig.build.json
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @cypress-design/react-docmenu
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#388](https://github.com/cypress-io/cypress-design/pull/388) [`7839c67`](https://github.com/cypress-io/cypress-design/commit/7839c670d8a83f8339db1a5d4395bd0dd5eaf987) Thanks [@elevatebart](https://github.com/elevatebart)! - make docmenu scroll to active path if necessary
8
+
9
+ ## 0.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`bb4e507`](https://github.com/cypress-io/cypress-design/commit/bb4e507ca14e57e3400f0444446e1b3a0eb598ad) Thanks [@elevatebart](https://github.com/elevatebart)! - add a test and the names of components in dev tools
14
+
15
+ ### Patch Changes
16
+
17
+ - [#387](https://github.com/cypress-io/cypress-design/pull/387) [`05b67c5`](https://github.com/cypress-io/cypress-design/commit/05b67c5389df1c0619d2f01e2b36fb5bd6bb30b9) Thanks [@elevatebart](https://github.com/elevatebart)! - when activePath changes, expand sections that contain the newly activated element
18
+
3
19
  ## 0.5.4
4
20
 
5
21
  ### Patch Changes
@@ -3,7 +3,7 @@
3
3
  import * as React from 'react'
4
4
  import { mount } from 'cypress/react18'
5
5
  import DocMenu from './index'
6
- import assertions from '../assertions'
6
+ import assertions, { BIG_ITEMS_SET } from '../assertions'
7
7
  import { NavGroup, NavItemLink } from '../constants'
8
8
 
9
9
  describe('<DocMenu/>', () => {
@@ -57,75 +57,7 @@ describe('<DocMenu/>', () => {
57
57
  {children}
58
58
  </div>
59
59
  )}
60
- items={[
61
- {
62
- href: '/fooTop',
63
- label: 'Foo Top',
64
- },
65
- {
66
- href: '/test',
67
- label: 'Getting started',
68
- },
69
- {
70
- href: '/faaz',
71
- label:
72
- 'lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam,',
73
- },
74
- {
75
- label: 'Baaaaaaz',
76
- items: [
77
- {
78
- label: 'Bar',
79
- items: [
80
- {
81
- href: '/foo',
82
- label: 'Foo',
83
- },
84
- {
85
- href: '/test',
86
- label: 'Getting started',
87
- },
88
- ],
89
- },
90
- {
91
- label: 'Code',
92
- collapsed: true,
93
- items: [
94
- {
95
- href: '/faa',
96
- label: 'sasassa',
97
- },
98
- {
99
- href: '/faa1',
100
- label: 'sasassa2',
101
- },
102
- {
103
- href: '/faa2',
104
- label: 'sasassa3',
105
- },
106
- {
107
- href: '/faa3',
108
- label: 'sasassa4',
109
- },
110
- {
111
- href: '/faa4',
112
- label:
113
- 'lorem ipsum dolor sit amet consectetur adipisicing elit',
114
- },
115
- {
116
- href: '/faa5',
117
- label: 'sasassa5',
118
- },
119
- {
120
- href: '/faa6',
121
- label:
122
- 'lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos',
123
- },
124
- ],
125
- },
126
- ],
127
- },
128
- ]}
60
+ items={BIG_ITEMS_SET}
129
61
  />
130
62
  </div>
131
63
  )
@@ -169,8 +101,89 @@ describe('<DocMenu/>', () => {
169
101
  </div>,
170
102
  )
171
103
  }
172
- assertions(mountStory)
173
- })
174
104
 
175
- // pseudo text
176
- // lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quos
105
+ assertions(mountStory, () => {
106
+ const SUT = () => {
107
+ const [pathState, setPathState] = React.useState<string>('/foo')
108
+ return (
109
+ <>
110
+ <button onClick={() => setPathState('/kephren')}>
111
+ Set path to /kephren
112
+ </button>
113
+ <DocMenu
114
+ items={[
115
+ {
116
+ label: 'Section 1',
117
+ items: [
118
+ { href: '/foo', label: 'Foo' },
119
+ {
120
+ label: 'Subsection',
121
+ items: [{ href: '/sub', label: 'Sub' }],
122
+ },
123
+ ],
124
+ },
125
+ {
126
+ label: 'Pyramid',
127
+ items: [{ href: '/kephren', label: 'Kephren' }],
128
+ collapsed: true,
129
+ },
130
+ ]}
131
+ LinkComponent={({ href, children, style, ...props }) => (
132
+ <button
133
+ onClick={() => setPathState(href)}
134
+ {...props}
135
+ style={{ ...style, textAlign: 'left' }}
136
+ >
137
+ {children}
138
+ </button>
139
+ )}
140
+ activePath={pathState}
141
+ collapsible
142
+ />
143
+ </>
144
+ )
145
+ }
146
+ mount(<SUT />)
147
+ })
148
+
149
+ it('scrolls the active item into view', { viewportHeight: 200 }, () => {
150
+ const SUT = () => {
151
+ const [pathState, setPathState] = React.useState<string>('/foo')
152
+ return (
153
+ <>
154
+ <button
155
+ onClick={() => setPathState('/faa6')}
156
+ className="p-2 m-2 rounded bg-gray-100 border border-gray-300"
157
+ >
158
+ Set path to <code>/faa6</code>
159
+ </button>
160
+ <DocMenu
161
+ items={BIG_ITEMS_SET}
162
+ LinkComponent={({ href, children, style, ...props }) => (
163
+ <button
164
+ onClick={() => setPathState(href)}
165
+ {...props}
166
+ style={{ ...style, textAlign: 'left' }}
167
+ >
168
+ {children}
169
+ </button>
170
+ )}
171
+ activePath={pathState}
172
+ collapsible
173
+ />
174
+ </>
175
+ )
176
+ }
177
+ mount(<SUT />)
178
+
179
+ cy.findByText('Code').click()
180
+ cy.contains('Set path to').click()
181
+ cy.contains('Quisquam, quos').then(($el) => {
182
+ const windowInnerHeight = Cypress.config(`viewportHeight`)
183
+
184
+ const rect = ($el?.[0] as any).getBoundingClientRect()
185
+
186
+ expect(windowInnerHeight).to.be.greaterThan(rect.top)
187
+ })
188
+ })
189
+ })
package/_DocGroup.tsx CHANGED
@@ -63,6 +63,12 @@ export const DocGroup = React.forwardRef<DocGroupForward, DocGroupProps>(
63
63
  React.useState<NodeJS.Timeout>()
64
64
  const $groupElements = React.useRef<DocGroupElementsForward>(null)
65
65
 
66
+ React.useEffect(() => {
67
+ if (hasActiveItemRecursivelyMemo && !open) {
68
+ setOpen(true)
69
+ }
70
+ }, [hasActiveItemRecursivelyMemo, activePath, open])
71
+
66
72
  const toggleMenu = (localOpen: boolean) => {
67
73
  if (!collapsible || markerIsMoving) return
68
74
  setMarkerIsMoving(true)
@@ -197,6 +203,8 @@ export const DocGroup = React.forwardRef<DocGroupForward, DocGroupProps>(
197
203
  },
198
204
  )
199
205
 
206
+ DocGroup.displayName = 'DocMenuDocGroup'
207
+
200
208
  export interface DocGroupElementsProps
201
209
  extends React.HTMLAttributes<HTMLUListElement> {
202
210
  items: (NavGroup | NavItemLink)[]
@@ -312,3 +320,5 @@ export const DocGroupElements = React.forwardRef<
312
320
  )
313
321
  },
314
322
  )
323
+
324
+ DocGroupElements.displayName = 'DocMenuDocGroupElements'
package/_DocLink.tsx CHANGED
@@ -30,22 +30,16 @@ export interface DocLinkForward {
30
30
  }
31
31
 
32
32
  export const DocLink = React.forwardRef<DocLinkForward, DocLinkProps>(
33
- (
34
- {
35
- item: { label, ...itemRest },
36
- depth,
37
- markerIsMoving,
38
- context,
39
- onActive,
40
- LinkComponent,
41
- },
42
- ref,
43
- ) => {
33
+ ({ item, depth, markerIsMoving, context, onActive, LinkComponent }, ref) => {
44
34
  const activeLIRef = React.useRef<HTMLLIElement>(null)
45
35
 
46
- const { collapsible, activePath } = context
36
+ const active = React.useMemo(
37
+ () => item.href === context.activePath,
38
+ [item.href, context.activePath],
39
+ )
47
40
 
48
- const active = itemRest.href === activePath
41
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
42
+ const { label, ...itemRest } = item
49
43
 
50
44
  const setActiveMarkerPosition = () => {
51
45
  if (active) {
@@ -62,6 +56,27 @@ export const DocLink = React.forwardRef<DocLinkForward, DocLinkProps>(
62
56
  // send the top position to the parent
63
57
  React.useEffect(setActiveMarkerPosition, [onActive, active])
64
58
 
59
+ React.useEffect(() => {
60
+ if (active && activeLIRef.current) {
61
+ // if active check if the item is visible in the
62
+ // viewport and scrollIntoView if not
63
+ const rect = activeLIRef.current.getBoundingClientRect()
64
+
65
+ if (rect.top > 0 && rect.bottom < window.innerHeight) {
66
+ return
67
+ }
68
+
69
+ if (rect.left > 0 && rect.right < window.innerWidth) {
70
+ return
71
+ }
72
+
73
+ activeLIRef.current.scrollIntoView({
74
+ block: 'nearest',
75
+ inline: 'nearest',
76
+ })
77
+ }
78
+ }, [active])
79
+
65
80
  React.useImperativeHandle(ref, () => ({
66
81
  setActiveMarkerPosition,
67
82
  }))
@@ -86,15 +101,18 @@ export const DocLink = React.forwardRef<DocLinkForward, DocLinkProps>(
86
101
  'left-[6.5px] absolute top-[4px] bottom-[4px] w-[4px] z-10 rounded-full',
87
102
  {
88
103
  hidden: !markerIsMoving || !active,
89
- 'group-hover:block bg-gray-300': !active && collapsible,
104
+ 'group-hover:block bg-gray-300':
105
+ !active && context.collapsible,
90
106
  'bg-indigo-500 dark:bg-indigo-400': active && markerIsMoving,
91
107
  },
92
108
  )}
93
109
  />
94
110
  ) : null}
95
- {label}
111
+ {item.label}
96
112
  </LinkComponent>
97
113
  </li>
98
114
  )
99
115
  },
100
116
  )
117
+
118
+ DocLink.displayName = 'DocMenuDocLink'
@@ -1 +1 @@
1
- {"version":3,"file":"_DocGroup.d.ts","sourceRoot":"./","sources":["_DocGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAEjB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAEL,KAAK,OAAO,EAEZ,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,CAAC,IAAI,EAAE;QAAE,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CAAC;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAA;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAC,CAAA;AAEF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACzD,aAAa,EAAE,iBAAiB,CAAA;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,uBAAuB,EAAE,MAAM,IAAI,CAAA;CACpC;AAED,eAAO,MAAM,OAAO,qFAoFnB,CAAA"}
package/dist/index.es.mjs CHANGED
@@ -162,10 +162,11 @@ const classes = {
162
162
  };
163
163
 
164
164
  var DocLink = React.forwardRef(function (_a, ref) {
165
- 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;
165
+ var item = _a.item, depth = _a.depth, markerIsMoving = _a.markerIsMoving, context = _a.context, onActive = _a.onActive, LinkComponent = _a.LinkComponent;
166
166
  var activeLIRef = React.useRef(null);
167
- var collapsible = context.collapsible, activePath = context.activePath;
168
- var active = itemRest.href === activePath;
167
+ var active = React.useMemo(function () { return item.href === context.activePath; }, [item.href, context.activePath]);
168
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
169
+ item.label; var itemRest = __rest$1(item, ["label"]);
169
170
  var setActiveMarkerPosition = function () {
170
171
  var _a;
171
172
  if (active) {
@@ -179,6 +180,23 @@ var DocLink = React.forwardRef(function (_a, ref) {
179
180
  // on mount, if the item is active,
180
181
  // send the top position to the parent
181
182
  React.useEffect(setActiveMarkerPosition, [onActive, active]);
183
+ React.useEffect(function () {
184
+ if (active && activeLIRef.current) {
185
+ // if active check if the item is visible in the
186
+ // viewport and scrollIntoView if not
187
+ var rect = activeLIRef.current.getBoundingClientRect();
188
+ if (rect.top > 0 && rect.bottom < window.innerHeight) {
189
+ return;
190
+ }
191
+ if (rect.left > 0 && rect.right < window.innerWidth) {
192
+ return;
193
+ }
194
+ activeLIRef.current.scrollIntoView({
195
+ block: 'nearest',
196
+ inline: 'nearest',
197
+ });
198
+ }
199
+ }, [active]);
182
200
  React.useImperativeHandle(ref, function () { return ({
183
201
  setActiveMarkerPosition: setActiveMarkerPosition,
184
202
  }); });
@@ -193,11 +211,12 @@ var DocLink = React.forwardRef(function (_a, ref) {
193
211
  } }),
194
212
  depth >= 0 ? (React.createElement("div", { className: clsx('left-[6.5px] absolute top-[4px] bottom-[4px] w-[4px] z-10 rounded-full', {
195
213
  hidden: !markerIsMoving || !active,
196
- 'group-hover:block bg-gray-300': !active && collapsible,
214
+ 'group-hover:block bg-gray-300': !active && context.collapsible,
197
215
  'bg-indigo-500 dark:bg-indigo-400': active && markerIsMoving,
198
216
  }) })) : null,
199
- label)));
217
+ item.label)));
200
218
  });
219
+ DocLink.displayName = 'DocMenuDocLink';
201
220
 
202
221
  var hasActiveItemRecursively = function (items, localActivePath) {
203
222
  return items.some(function (item) {
@@ -217,6 +236,11 @@ var DocGroup = React.forwardRef(function (_a, ref) {
217
236
  var _e = React.useState(!group.collapsed), open = _e[0], setOpen = _e[1];
218
237
  var _f = React.useState(), markerIsMovingTimeout = _f[0], setMarkerIsMovingTimeout = _f[1];
219
238
  var $groupElements = React.useRef(null);
239
+ React.useEffect(function () {
240
+ if (hasActiveItemRecursivelyMemo && !open) {
241
+ setOpen(true);
242
+ }
243
+ }, [hasActiveItemRecursivelyMemo, activePath, open]);
220
244
  var toggleMenu = function (localOpen) {
221
245
  if (!collapsible || markerIsMoving)
222
246
  return;
@@ -306,6 +330,7 @@ var DocGroup = React.forwardRef(function (_a, ref) {
306
330
  open && collapsible && depth === 0 ? (React.createElement("div", { className: classes.openListBorderLeft })) : null,
307
331
  React.createElement(DocGroupElements, { ref: $groupElements, className: "overflow-hidden", items: group.items, depth: depth, context: context, markerIsMoving: markerIsMoving, onActivePosition: setActivePosition, updateMarkerPosition: onUpdateMarkerPosition, LinkComponent: LinkComponent }))));
308
332
  });
333
+ DocGroup.displayName = 'DocMenuDocGroup';
309
334
  var DocGroupElements = React.forwardRef(function (_a, ref) {
310
335
  var items = _a.items, _b = _a.depth, depth = _b === void 0 ? 0 : _b, onActivePosition = _a.onActivePosition, updateMarkerPosition = _a.updateMarkerPosition, markerIsMoving = _a.markerIsMoving, LinkComponent = _a.LinkComponent, className = _a.className, context = _a.context, rest = __rest$1(_a, ["items", "depth", "onActivePosition", "updateMarkerPosition", "markerIsMoving", "LinkComponent", "className", "context"]);
311
336
  var $groups = React.useRef([]);
@@ -350,6 +375,7 @@ var DocGroupElements = React.forwardRef(function (_a, ref) {
350
375
  }, LinkComponent: LinkComponent }));
351
376
  })));
352
377
  });
378
+ DocGroupElements.displayName = 'DocMenuDocGroupElements';
353
379
 
354
380
  var DocMenu = function (_a) {
355
381
  var items = _a.items, _b = _a.activePath, activePath = _b === void 0 ? '<unknown>' : _b, _c = _a.collapsible, collapsible = _c === void 0 ? true : _c, _d = _a.LinkComponent, LinkComponent = _d === void 0 ? 'a' : _d, rest = __rest$1(_a, ["items", "activePath", "collapsible", "LinkComponent"]);
@@ -397,4 +423,4 @@ var DocMenu = function (_a) {
397
423
  export { DocMenu as default };
398
424
  //# sourceMappingURL=index.es.mjs.map
399
425
 
400
- /* <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"> */
426
+ /* <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 visible block inline 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"> */