@workday/canvas-kit-docs 15.1.12 → 15.1.14

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.
@@ -177013,7 +177013,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
177013
177013
  "value": "DOMRect"
177014
177014
  }
177015
177015
  },
177016
- "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`.",
177016
+ "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`. If an `anchorElement` is also provided, Popper listens to its\nscroll containers and uses it for clipping, so the Popper still updates when it scrolls.",
177017
177017
  "declarations": [
177018
177018
  {
177019
177019
  "name": "getAnchorClientRect",
@@ -206796,7 +206796,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
206796
206796
  "value": "DOMRect"
206797
206797
  }
206798
206798
  },
206799
- "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`.",
206799
+ "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`. If an `anchorElement` is also provided, Popper listens to its\nscroll containers and uses it for clipping, so the Popper still updates when it scrolls.",
206800
206800
  "declarations": [
206801
206801
  {
206802
206802
  "name": "getAnchorClientRect",
@@ -272167,6 +272167,31 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
272167
272167
  "name": "usePopupPopper"
272168
272168
  }
272169
272169
  },
272170
+ {
272171
+ "name": "menuPopperOffset",
272172
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/menu/lib/MenuPopper.tsx",
272173
+ "description": "The `[skidding, distance]` offset every menu popper sits at relative to its anchor.",
272174
+ "declarations": [
272175
+ {
272176
+ "name": "menuPopperOffset",
272177
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/menu/lib/MenuPopper.tsx"
272178
+ }
272179
+ ],
272180
+ "tags": {},
272181
+ "type": {
272182
+ "kind": "tuple",
272183
+ "value": [
272184
+ {
272185
+ "kind": "primitive",
272186
+ "value": "number"
272187
+ },
272188
+ {
272189
+ "kind": "primitive",
272190
+ "value": "number"
272191
+ }
272192
+ ]
272193
+ }
272194
+ },
272170
272195
  {
272171
272196
  "name": "defaultMenuPopperOptions",
272172
272197
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/menu/lib/MenuPopper.tsx",
@@ -272225,11 +272250,17 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
272225
272250
  "parameters": [],
272226
272251
  "members": [],
272227
272252
  "returnType": {
272228
- "kind": "array",
272229
- "value": {
272230
- "kind": "primitive",
272231
- "value": "number"
272232
- }
272253
+ "kind": "union",
272254
+ "value": [
272255
+ {
272256
+ "kind": "primitive",
272257
+ "value": "number"
272258
+ },
272259
+ {
272260
+ "kind": "primitive",
272261
+ "value": "number"
272262
+ }
272263
+ ]
272233
272264
  }
272234
272265
  },
272235
272266
  "type": {
@@ -272237,11 +272268,17 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
272237
272268
  "parameters": [],
272238
272269
  "members": [],
272239
272270
  "returnType": {
272240
- "kind": "array",
272241
- "value": {
272242
- "kind": "primitive",
272243
- "value": "number"
272244
- }
272271
+ "kind": "union",
272272
+ "value": [
272273
+ {
272274
+ "kind": "primitive",
272275
+ "value": "number"
272276
+ },
272277
+ {
272278
+ "kind": "primitive",
272279
+ "value": "number"
272280
+ }
272281
+ ]
272245
272282
  }
272246
272283
  },
272247
272284
  "required": true,
@@ -272267,11 +272304,17 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
272267
272304
  "parameters": [],
272268
272305
  "members": [],
272269
272306
  "returnType": {
272270
- "kind": "array",
272271
- "value": {
272272
- "kind": "primitive",
272273
- "value": "number"
272274
- }
272307
+ "kind": "union",
272308
+ "value": [
272309
+ {
272310
+ "kind": "primitive",
272311
+ "value": "number"
272312
+ },
272313
+ {
272314
+ "kind": "primitive",
272315
+ "value": "number"
272316
+ }
272317
+ ]
272275
272318
  }
272276
272319
  },
272277
272320
  "type": {
@@ -272279,11 +272322,17 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
272279
272322
  "parameters": [],
272280
272323
  "members": [],
272281
272324
  "returnType": {
272282
- "kind": "array",
272283
- "value": {
272284
- "kind": "primitive",
272285
- "value": "number"
272286
- }
272325
+ "kind": "union",
272326
+ "value": [
272327
+ {
272328
+ "kind": "primitive",
272329
+ "value": "number"
272330
+ },
272331
+ {
272332
+ "kind": "primitive",
272333
+ "value": "number"
272334
+ }
272335
+ ]
272287
272336
  }
272288
272337
  },
272289
272338
  "required": true,
@@ -272345,11 +272394,17 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
272345
272394
  "parameters": [],
272346
272395
  "members": [],
272347
272396
  "returnType": {
272348
- "kind": "array",
272349
- "value": {
272350
- "kind": "primitive",
272351
- "value": "number"
272352
- }
272397
+ "kind": "tuple",
272398
+ "value": [
272399
+ {
272400
+ "kind": "primitive",
272401
+ "value": "number"
272402
+ },
272403
+ {
272404
+ "kind": "primitive",
272405
+ "value": "number"
272406
+ }
272407
+ ]
272353
272408
  }
272354
272409
  },
272355
272410
  "description": "",
@@ -272521,7 +272576,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
272521
272576
  "value": "DOMRect"
272522
272577
  }
272523
272578
  },
272524
- "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`.",
272579
+ "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`. If an `anchorElement` is also provided, Popper listens to its\nscroll containers and uses it for clipping, so the Popper still updates when it scrolls.",
272525
272580
  "declarations": [
272526
272581
  {
272527
272582
  "name": "getAnchorClientRect",
@@ -273458,7 +273513,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
273458
273513
  "value": "DOMRect"
273459
273514
  }
273460
273515
  },
273461
- "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`.",
273516
+ "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`. If an `anchorElement` is also provided, Popper listens to its\nscroll containers and uses it for clipping, so the Popper still updates when it scrolls.",
273462
273517
  "declarations": [
273463
273518
  {
273464
273519
  "name": "getAnchorClientRect",
@@ -323478,7 +323533,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
323478
323533
  "value": "DOMRect"
323479
323534
  }
323480
323535
  },
323481
- "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`.",
323536
+ "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`. If an `anchorElement` is also provided, Popper listens to its\nscroll containers and uses it for clipping, so the Popper still updates when it scrolls.",
323482
323537
  "declarations": [
323483
323538
  {
323484
323539
  "name": "getAnchorClientRect",
@@ -328130,7 +328185,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
328130
328185
  "value": "DOMRect"
328131
328186
  }
328132
328187
  },
328133
- "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`.",
328188
+ "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`. If an `anchorElement` is also provided, Popper listens to its\nscroll containers and uses it for clipping, so the Popper still updates when it scrolls.",
328134
328189
  "declarations": [
328135
328190
  {
328136
328191
  "name": "getAnchorClientRect",
@@ -384999,7 +385054,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
384999
385054
  "value": "DOMRect"
385000
385055
  }
385001
385056
  },
385002
- "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`.",
385057
+ "description": "When provided, this optional callback will be used to determine positioning for the Popper element\ninstead of calling `getBoundingClientRect` on the `anchorElement` prop. Use this when you need\ncomplete control over positioning. When this prop is specified, it is safe to pass `null` into the\n`anchorElement` prop. If `null` is passed into the `anchorElement` prop, an `owner` will not be\nprovided for the `PopupStack`. If an `anchorElement` is also provided, Popper listens to its\nscroll containers and uses it for clipping, so the Popper still updates when it scrolls.",
385003
385058
  "declarations": [
385004
385059
  {
385005
385060
  "name": "getAnchorClientRect",
@@ -5039,6 +5039,286 @@ module.exports = {specifications: [
5039
5039
  }
5040
5040
  ]
5041
5041
  },
5042
+ {
5043
+ "type": "file",
5044
+ "name": "SubmenuPlacement",
5045
+ "children": [
5046
+ {
5047
+ "type": "describe",
5048
+ "name": "Submenu placement",
5049
+ "children": [
5050
+ {
5051
+ "type": "describe",
5052
+ "name": "given a scrollable ltr menu at the start edge",
5053
+ "children": [
5054
+ {
5055
+ "type": "it",
5056
+ "name": "should pass axe checks"
5057
+ },
5058
+ {
5059
+ "type": "it",
5060
+ "name": "should open beside the parent on the right"
5061
+ },
5062
+ {
5063
+ "type": "describe",
5064
+ "name": "when the parent menu is scrolled",
5065
+ "children": [
5066
+ {
5067
+ "type": "it",
5068
+ "name": "should remain beside the parent without covering it"
5069
+ }
5070
+ ]
5071
+ }
5072
+ ]
5073
+ },
5074
+ {
5075
+ "type": "describe",
5076
+ "name": "given a scrollable ltr menu at the end edge",
5077
+ "children": [
5078
+ {
5079
+ "type": "it",
5080
+ "name": "should pass axe checks"
5081
+ },
5082
+ {
5083
+ "type": "it",
5084
+ "name": "should open beside the parent on the left"
5085
+ },
5086
+ {
5087
+ "type": "describe",
5088
+ "name": "when the parent menu is scrolled",
5089
+ "children": [
5090
+ {
5091
+ "type": "it",
5092
+ "name": "should remain beside the parent without covering it"
5093
+ }
5094
+ ]
5095
+ }
5096
+ ]
5097
+ },
5098
+ {
5099
+ "type": "describe",
5100
+ "name": "given a scrollable rtl menu at the start edge",
5101
+ "children": [
5102
+ {
5103
+ "type": "it",
5104
+ "name": "should pass axe checks"
5105
+ },
5106
+ {
5107
+ "type": "it",
5108
+ "name": "should open beside the parent on the left"
5109
+ },
5110
+ {
5111
+ "type": "describe",
5112
+ "name": "when the parent menu is scrolled",
5113
+ "children": [
5114
+ {
5115
+ "type": "it",
5116
+ "name": "should remain beside the parent without covering it"
5117
+ }
5118
+ ]
5119
+ }
5120
+ ]
5121
+ },
5122
+ {
5123
+ "type": "describe",
5124
+ "name": "given a scrollable rtl menu at the end edge",
5125
+ "children": [
5126
+ {
5127
+ "type": "it",
5128
+ "name": "should pass axe checks"
5129
+ },
5130
+ {
5131
+ "type": "it",
5132
+ "name": "should open beside the parent on the right"
5133
+ },
5134
+ {
5135
+ "type": "describe",
5136
+ "name": "when the parent menu is scrolled",
5137
+ "children": [
5138
+ {
5139
+ "type": "it",
5140
+ "name": "should remain beside the parent without covering it"
5141
+ }
5142
+ ]
5143
+ }
5144
+ ]
5145
+ },
5146
+ {
5147
+ "type": "describe",
5148
+ "name": "given an explicit submenu placement",
5149
+ "children": [
5150
+ {
5151
+ "type": "it",
5152
+ "name": "should preserve the custom placement"
5153
+ },
5154
+ {
5155
+ "type": "it",
5156
+ "name": "should pass axe checks"
5157
+ }
5158
+ ]
5159
+ },
5160
+ {
5161
+ "type": "describe",
5162
+ "name": "given an empty fallback list at the right edge",
5163
+ "children": [
5164
+ {
5165
+ "type": "it",
5166
+ "name": "should still allow the opposite placement"
5167
+ },
5168
+ {
5169
+ "type": "it",
5170
+ "name": "should pass axe checks"
5171
+ }
5172
+ ]
5173
+ },
5174
+ {
5175
+ "type": "describe",
5176
+ "name": "given custom Popper options",
5177
+ "children": [
5178
+ {
5179
+ "type": "it",
5180
+ "name": "should preserve the custom offset from the parent menu"
5181
+ },
5182
+ {
5183
+ "type": "it",
5184
+ "name": "should pass axe checks"
5185
+ }
5186
+ ]
5187
+ },
5188
+ {
5189
+ "type": "describe",
5190
+ "name": "given a ltr viewport too narrow for either side",
5191
+ "children": [
5192
+ {
5193
+ "type": "it",
5194
+ "name": "should pass axe checks"
5195
+ },
5196
+ {
5197
+ "type": "it",
5198
+ "name": "should fall back below the parent"
5199
+ },
5200
+ {
5201
+ "type": "it",
5202
+ "name": "should align with the parent's left edge"
5203
+ },
5204
+ {
5205
+ "type": "it",
5206
+ "name": "should stay inside the viewport horizontally"
5207
+ }
5208
+ ]
5209
+ },
5210
+ {
5211
+ "type": "describe",
5212
+ "name": "given a rtl viewport too narrow for either side",
5213
+ "children": [
5214
+ {
5215
+ "type": "it",
5216
+ "name": "should pass axe checks"
5217
+ },
5218
+ {
5219
+ "type": "it",
5220
+ "name": "should fall back below the parent"
5221
+ },
5222
+ {
5223
+ "type": "it",
5224
+ "name": "should align with the parent's right edge"
5225
+ },
5226
+ {
5227
+ "type": "it",
5228
+ "name": "should stay inside the viewport horizontally"
5229
+ }
5230
+ ]
5231
+ },
5232
+ {
5233
+ "type": "describe",
5234
+ "name": "given a parent menu near the bottom of a narrow viewport",
5235
+ "children": [
5236
+ {
5237
+ "type": "it",
5238
+ "name": "should pass axe checks"
5239
+ },
5240
+ {
5241
+ "type": "it",
5242
+ "name": "should fall back above the parent"
5243
+ }
5244
+ ]
5245
+ },
5246
+ {
5247
+ "type": "describe",
5248
+ "name": "given a 320x568 viewport too short to clear the parent",
5249
+ "children": [
5250
+ {
5251
+ "type": "it",
5252
+ "name": "should pass axe checks"
5253
+ },
5254
+ {
5255
+ "type": "it",
5256
+ "name": "should still fall back below the parent"
5257
+ },
5258
+ {
5259
+ "type": "it",
5260
+ "name": "should stay inside the viewport"
5261
+ },
5262
+ {
5263
+ "type": "describe",
5264
+ "name": "when the parent menu is then scrolled",
5265
+ "children": [
5266
+ {
5267
+ "type": "it",
5268
+ "name": "should keep the vertical placement"
5269
+ },
5270
+ {
5271
+ "type": "it",
5272
+ "name": "should stay inside the viewport"
5273
+ },
5274
+ {
5275
+ "type": "it",
5276
+ "name": "should not move while the parent keeps scrolling"
5277
+ }
5278
+ ]
5279
+ }
5280
+ ]
5281
+ },
5282
+ {
5283
+ "type": "describe",
5284
+ "name": "given a 360x568 viewport too short to clear the parent",
5285
+ "children": [
5286
+ {
5287
+ "type": "it",
5288
+ "name": "should pass axe checks"
5289
+ },
5290
+ {
5291
+ "type": "it",
5292
+ "name": "should still fall back below the parent"
5293
+ },
5294
+ {
5295
+ "type": "it",
5296
+ "name": "should stay inside the viewport"
5297
+ },
5298
+ {
5299
+ "type": "describe",
5300
+ "name": "when the parent menu is then scrolled",
5301
+ "children": [
5302
+ {
5303
+ "type": "it",
5304
+ "name": "should keep the vertical placement"
5305
+ },
5306
+ {
5307
+ "type": "it",
5308
+ "name": "should stay inside the viewport"
5309
+ },
5310
+ {
5311
+ "type": "it",
5312
+ "name": "should not move while the parent keeps scrolling"
5313
+ }
5314
+ ]
5315
+ }
5316
+ ]
5317
+ }
5318
+ ]
5319
+ }
5320
+ ]
5321
+ },
5042
5322
  {
5043
5323
  "type": "file",
5044
5324
  "name": "Switch",
@@ -18,11 +18,11 @@ export const packageJSONFile = `{
18
18
  "@emotion/react": "11.11.4",
19
19
  "@types/react": "18.2.60",
20
20
  "@types/react-dom": "18.2.19",
21
- "@workday/canvas-kit-labs-react": "15.1.12",
22
- "@workday/canvas-kit-preview-react": "15.1.12",
23
- "@workday/canvas-kit-react": "15.1.12",
24
- "@workday/canvas-kit-react-fonts": "^15.1.12",
25
- "@workday/canvas-kit-styling": "15.1.12",
21
+ "@workday/canvas-kit-labs-react": "15.1.14",
22
+ "@workday/canvas-kit-preview-react": "15.1.14",
23
+ "@workday/canvas-kit-react": "15.1.14",
24
+ "@workday/canvas-kit-react-fonts": "^15.1.14",
25
+ "@workday/canvas-kit-styling": "15.1.14",
26
26
  "@workday/canvas-system-icons-web": "4.0.2",
27
27
  "@workday/canvas-expressive-icons-web": "1.0.1",
28
28
  "@workday/canvas-tokens-web": "4.2.0"
@@ -19,11 +19,11 @@ export const packageJSONFile = `{
19
19
  "@emotion/react": "11.11.4",
20
20
  "@types/react": "18.2.60",
21
21
  "@types/react-dom": "18.2.19",
22
- "@workday/canvas-kit-labs-react": "15.1.12",
23
- "@workday/canvas-kit-preview-react": "15.1.12",
24
- "@workday/canvas-kit-react": "15.1.12",
25
- "@workday/canvas-kit-react-fonts": "^15.1.12",
26
- "@workday/canvas-kit-styling": "15.1.12",
22
+ "@workday/canvas-kit-labs-react": "15.1.14",
23
+ "@workday/canvas-kit-preview-react": "15.1.14",
24
+ "@workday/canvas-kit-react": "15.1.14",
25
+ "@workday/canvas-kit-react-fonts": "^15.1.14",
26
+ "@workday/canvas-kit-styling": "15.1.14",
27
27
  "@workday/canvas-system-icons-web": "4.0.2",
28
28
  "@workday/canvas-expressive-icons-web": "1.0.1",
29
29
  "@workday/canvas-tokens-web": "4.2.0"
@@ -0,0 +1,63 @@
1
+ import {CanvasProvider} from '@workday/canvas-kit-react/common';
2
+ import {Flex} from '@workday/canvas-kit-react/layout';
3
+ import {Menu, menuCardStencil} from '@workday/canvas-kit-react/menu';
4
+ import {PopperProps} from '@workday/canvas-kit-react/popup';
5
+ import {createStencil, createStyles, px2rem} from '@workday/canvas-kit-styling';
6
+
7
+ const containerStencil = createStencil({
8
+ base: {},
9
+ modifiers: {
10
+ atEnd: {true: {justifyContent: 'flex-end'}},
11
+ alignBottom: {true: {position: 'fixed', bottom: 0, left: 0, right: 0}},
12
+ },
13
+ });
14
+
15
+ // A fixed height makes the parent list scroll independently of the page.
16
+ const cardStyles = createStyles({[menuCardStencil.vars.maxHeight]: px2rem(280)});
17
+
18
+ export default ({
19
+ dir = 'ltr',
20
+ atEnd = false,
21
+ alignBottom = false,
22
+ submenuPopperProps,
23
+ }: {
24
+ dir?: 'ltr' | 'rtl';
25
+ atEnd?: boolean;
26
+ alignBottom?: boolean;
27
+ submenuPopperProps?: Pick<PopperProps, 'placement' | 'fallbackPlacements' | 'popperOptions'>;
28
+ }) => (
29
+ <CanvasProvider dir={dir}>
30
+ <Flex cs={containerStencil({atEnd, alignBottom})}>
31
+ <Menu>
32
+ <Menu.Target>Open Menu</Menu.Target>
33
+ <Menu.Popper>
34
+ <Menu.Card cs={cardStyles} data-testid="scrollable-menu">
35
+ <Menu.List>
36
+ <Menu.Item data-id="first">First Item</Menu.Item>
37
+ <Menu.Item data-id="second">Second Item</Menu.Item>
38
+ <Menu.Submenu>
39
+ <Menu.Submenu.TargetItem data-id="submenu">More Items</Menu.Submenu.TargetItem>
40
+ <Menu.Submenu.Popper {...submenuPopperProps}>
41
+ <Menu.Submenu.Card>
42
+ <Menu.Submenu.List data-testid="submenu">
43
+ {Array.from({length: 6}, (_, index) => (
44
+ <Menu.Submenu.Item key={index} data-id={`sub-${index}`}>
45
+ Additional Menu Item {index + 1}
46
+ </Menu.Submenu.Item>
47
+ ))}
48
+ </Menu.Submenu.List>
49
+ </Menu.Submenu.Card>
50
+ </Menu.Submenu.Popper>
51
+ </Menu.Submenu>
52
+ {Array.from({length: 15}, (_, index) => (
53
+ <Menu.Item key={index} data-id={`item-${index}`}>
54
+ Item {index + 1}
55
+ </Menu.Item>
56
+ ))}
57
+ </Menu.List>
58
+ </Menu.Card>
59
+ </Menu.Popper>
60
+ </Menu>
61
+ </Flex>
62
+ </CanvasProvider>
63
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "15.1.12",
3
+ "version": "15.1.14",
4
4
  "description": "Documentation components of Canvas Kit components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -47,10 +47,10 @@
47
47
  "@stackblitz/sdk": "^1.11.0",
48
48
  "@storybook/csf": "0.0.1",
49
49
  "@workday/canvas-expressive-icons-web": "1.0.2",
50
- "@workday/canvas-kit-labs-react": "^15.1.12",
51
- "@workday/canvas-kit-preview-react": "^15.1.12",
52
- "@workday/canvas-kit-react": "^15.1.12",
53
- "@workday/canvas-kit-styling": "^15.1.12",
50
+ "@workday/canvas-kit-labs-react": "^15.1.14",
51
+ "@workday/canvas-kit-preview-react": "^15.1.14",
52
+ "@workday/canvas-kit-react": "^15.1.14",
53
+ "@workday/canvas-kit-styling": "^15.1.14",
54
54
  "@workday/canvas-system-icons-web": "4.2.0",
55
55
  "@workday/canvas-tokens-web": "4.4.0",
56
56
  "markdown-to-jsx": "^7.2.0",
@@ -63,5 +63,5 @@
63
63
  "mkdirp": "^1.0.3",
64
64
  "typescript": "5.0"
65
65
  },
66
- "gitHead": "14e5d60c1526174d2420843610f67314fa0e540e"
66
+ "gitHead": "c11faa4de782aa959ab56dbe2d96014e4d034fef"
67
67
  }