@workday/canvas-kit-docs 9.0.8 → 9.0.9
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/es6/lib/docs.js
CHANGED
|
@@ -117794,6 +117794,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
117794
117794
|
"value": "bottom"
|
|
117795
117795
|
}
|
|
117796
117796
|
},
|
|
117797
|
+
{
|
|
117798
|
+
"kind": "property",
|
|
117799
|
+
"name": "fallbackPlacements",
|
|
117800
|
+
"required": false,
|
|
117801
|
+
"type": {
|
|
117802
|
+
"kind": "array",
|
|
117803
|
+
"value": {
|
|
117804
|
+
"kind": "symbol",
|
|
117805
|
+
"name": "Placement",
|
|
117806
|
+
"value": "Placement"
|
|
117807
|
+
}
|
|
117808
|
+
},
|
|
117809
|
+
"description": "Define fallback placements by providing a list of {@link Placement} in array (in order of preference).\nThe default preference is following the order of `top`, `right`, `bottom`, and `left`. Once the initial\nand opposite placements are not available, the fallback placements will be in use. Use an empty array to\ndisable the fallback placements.",
|
|
117810
|
+
"declarations": [
|
|
117811
|
+
{
|
|
117812
|
+
"name": "fallbackPlacements",
|
|
117813
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/PopupPopper.tsx"
|
|
117814
|
+
}
|
|
117815
|
+
],
|
|
117816
|
+
"tags": {}
|
|
117817
|
+
},
|
|
117797
117818
|
{
|
|
117798
117819
|
"kind": "property",
|
|
117799
117820
|
"name": "popperOptions",
|
|
@@ -149275,6 +149296,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
149275
149296
|
"value": "bottom"
|
|
149276
149297
|
}
|
|
149277
149298
|
},
|
|
149299
|
+
{
|
|
149300
|
+
"kind": "property",
|
|
149301
|
+
"name": "fallbackPlacements",
|
|
149302
|
+
"required": false,
|
|
149303
|
+
"type": {
|
|
149304
|
+
"kind": "array",
|
|
149305
|
+
"value": {
|
|
149306
|
+
"kind": "symbol",
|
|
149307
|
+
"name": "Placement",
|
|
149308
|
+
"value": "Placement"
|
|
149309
|
+
}
|
|
149310
|
+
},
|
|
149311
|
+
"description": "Define fallback placements by providing a list of {@link Placement} in array (in order of preference).\nThe default preference is following the order of `top`, `right`, `bottom`, and `left`. Once the initial\nand opposite placements are not available, the fallback placements will be in use. Use an empty array to\ndisable the fallback placements.",
|
|
149312
|
+
"declarations": [
|
|
149313
|
+
{
|
|
149314
|
+
"name": "fallbackPlacements",
|
|
149315
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx"
|
|
149316
|
+
}
|
|
149317
|
+
],
|
|
149318
|
+
"tags": {}
|
|
149319
|
+
},
|
|
149278
149320
|
{
|
|
149279
149321
|
"kind": "property",
|
|
149280
149322
|
"name": "onPlacementChange",
|
|
@@ -178327,6 +178369,81 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
178327
178369
|
}
|
|
178328
178370
|
}
|
|
178329
178371
|
},
|
|
178372
|
+
{
|
|
178373
|
+
"name": "Placement",
|
|
178374
|
+
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts",
|
|
178375
|
+
"description": "",
|
|
178376
|
+
"declarations": [
|
|
178377
|
+
{
|
|
178378
|
+
"name": "Placement",
|
|
178379
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts"
|
|
178380
|
+
}
|
|
178381
|
+
],
|
|
178382
|
+
"tags": {},
|
|
178383
|
+
"type": {
|
|
178384
|
+
"kind": "type",
|
|
178385
|
+
"typeParameters": [],
|
|
178386
|
+
"value": {
|
|
178387
|
+
"kind": "symbol",
|
|
178388
|
+
"name": "PopperJS.Placement",
|
|
178389
|
+
"value": "Placement"
|
|
178390
|
+
}
|
|
178391
|
+
}
|
|
178392
|
+
},
|
|
178393
|
+
{
|
|
178394
|
+
"name": "Options",
|
|
178395
|
+
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts",
|
|
178396
|
+
"description": "",
|
|
178397
|
+
"declarations": [
|
|
178398
|
+
{
|
|
178399
|
+
"name": "Options",
|
|
178400
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts"
|
|
178401
|
+
}
|
|
178402
|
+
],
|
|
178403
|
+
"tags": {},
|
|
178404
|
+
"type": {
|
|
178405
|
+
"kind": "object",
|
|
178406
|
+
"properties": [
|
|
178407
|
+
{
|
|
178408
|
+
"kind": "property",
|
|
178409
|
+
"name": "fallbackPlacements",
|
|
178410
|
+
"required": true,
|
|
178411
|
+
"type": {
|
|
178412
|
+
"kind": "array",
|
|
178413
|
+
"value": {
|
|
178414
|
+
"kind": "symbol",
|
|
178415
|
+
"name": "Placement",
|
|
178416
|
+
"value": "Placement"
|
|
178417
|
+
}
|
|
178418
|
+
},
|
|
178419
|
+
"description": "",
|
|
178420
|
+
"declarations": [
|
|
178421
|
+
{
|
|
178422
|
+
"name": "fallbackPlacements",
|
|
178423
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts"
|
|
178424
|
+
}
|
|
178425
|
+
],
|
|
178426
|
+
"tags": {}
|
|
178427
|
+
}
|
|
178428
|
+
]
|
|
178429
|
+
}
|
|
178430
|
+
},
|
|
178431
|
+
{
|
|
178432
|
+
"name": "fallbackPlacementsModifier",
|
|
178433
|
+
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts",
|
|
178434
|
+
"description": "",
|
|
178435
|
+
"declarations": [
|
|
178436
|
+
{
|
|
178437
|
+
"name": "fallbackPlacementsModifier",
|
|
178438
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts"
|
|
178439
|
+
}
|
|
178440
|
+
],
|
|
178441
|
+
"tags": {},
|
|
178442
|
+
"type": {
|
|
178443
|
+
"kind": "symbol",
|
|
178444
|
+
"name": "name"
|
|
178445
|
+
}
|
|
178446
|
+
},
|
|
178330
178447
|
{
|
|
178331
178448
|
"name": "getTransformFromPlacement",
|
|
178332
178449
|
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/getTransformFromPlacement.ts",
|
|
@@ -181578,6 +181695,26 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
181578
181695
|
}
|
|
181579
181696
|
}
|
|
181580
181697
|
},
|
|
181698
|
+
{
|
|
181699
|
+
"name": "defaultFallbackPlacements",
|
|
181700
|
+
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx",
|
|
181701
|
+
"description": "",
|
|
181702
|
+
"declarations": [
|
|
181703
|
+
{
|
|
181704
|
+
"name": "defaultFallbackPlacements",
|
|
181705
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx"
|
|
181706
|
+
}
|
|
181707
|
+
],
|
|
181708
|
+
"tags": {},
|
|
181709
|
+
"type": {
|
|
181710
|
+
"kind": "array",
|
|
181711
|
+
"value": {
|
|
181712
|
+
"kind": "symbol",
|
|
181713
|
+
"name": "Placement",
|
|
181714
|
+
"value": "Placement"
|
|
181715
|
+
}
|
|
181716
|
+
}
|
|
181717
|
+
},
|
|
181581
181718
|
{
|
|
181582
181719
|
"name": "PopperProps",
|
|
181583
181720
|
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx",
|
|
@@ -181792,6 +181929,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
181792
181929
|
"value": "bottom"
|
|
181793
181930
|
}
|
|
181794
181931
|
},
|
|
181932
|
+
{
|
|
181933
|
+
"kind": "property",
|
|
181934
|
+
"name": "fallbackPlacements",
|
|
181935
|
+
"required": false,
|
|
181936
|
+
"type": {
|
|
181937
|
+
"kind": "array",
|
|
181938
|
+
"value": {
|
|
181939
|
+
"kind": "symbol",
|
|
181940
|
+
"name": "Placement",
|
|
181941
|
+
"value": "Placement"
|
|
181942
|
+
}
|
|
181943
|
+
},
|
|
181944
|
+
"description": "Define fallback placements by providing a list of {@link Placement} in array (in order of preference).\nThe default preference is following the order of `top`, `right`, `bottom`, and `left`. Once the initial\nand opposite placements are not available, the fallback placements will be in use. Use an empty array to\ndisable the fallback placements.",
|
|
181945
|
+
"declarations": [
|
|
181946
|
+
{
|
|
181947
|
+
"name": "fallbackPlacements",
|
|
181948
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx"
|
|
181949
|
+
}
|
|
181950
|
+
],
|
|
181951
|
+
"tags": {}
|
|
181952
|
+
},
|
|
181795
181953
|
{
|
|
181796
181954
|
"kind": "property",
|
|
181797
181955
|
"name": "onPlacementChange",
|
|
@@ -183366,6 +183524,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
183366
183524
|
"value": "bottom"
|
|
183367
183525
|
}
|
|
183368
183526
|
},
|
|
183527
|
+
{
|
|
183528
|
+
"kind": "property",
|
|
183529
|
+
"name": "fallbackPlacements",
|
|
183530
|
+
"required": false,
|
|
183531
|
+
"type": {
|
|
183532
|
+
"kind": "array",
|
|
183533
|
+
"value": {
|
|
183534
|
+
"kind": "symbol",
|
|
183535
|
+
"name": "Placement",
|
|
183536
|
+
"value": "Placement"
|
|
183537
|
+
}
|
|
183538
|
+
},
|
|
183539
|
+
"description": "Define fallback placements by providing a list of {@link Placement} in array (in order of preference).\nThe default preference is following the order of `top`, `right`, `bottom`, and `left`. Once the initial\nand opposite placements are not available, the fallback placements will be in use. Use an empty array to\ndisable the fallback placements.",
|
|
183540
|
+
"declarations": [
|
|
183541
|
+
{
|
|
183542
|
+
"name": "fallbackPlacements",
|
|
183543
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/PopupPopper.tsx"
|
|
183544
|
+
}
|
|
183545
|
+
],
|
|
183546
|
+
"tags": {}
|
|
183547
|
+
},
|
|
183369
183548
|
{
|
|
183370
183549
|
"kind": "property",
|
|
183371
183550
|
"name": "popperOptions",
|
|
@@ -193522,6 +193701,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
193522
193701
|
"default": "bottom"
|
|
193523
193702
|
}
|
|
193524
193703
|
},
|
|
193704
|
+
{
|
|
193705
|
+
"kind": "property",
|
|
193706
|
+
"name": "fallbackPlacements",
|
|
193707
|
+
"required": false,
|
|
193708
|
+
"type": {
|
|
193709
|
+
"kind": "array",
|
|
193710
|
+
"value": {
|
|
193711
|
+
"kind": "symbol",
|
|
193712
|
+
"name": "Placement",
|
|
193713
|
+
"value": "Placement"
|
|
193714
|
+
}
|
|
193715
|
+
},
|
|
193716
|
+
"description": "Define fallback placements by providing a list of {@link Placement} in array (in order of preference).\nThe default preference is following the order of `top`, `right`, `bottom`, and `left`. Once the initial\nand opposite placements are not available, the fallback placements will be in use. Use an empty array to\ndisable the fallback placements.",
|
|
193717
|
+
"declarations": [
|
|
193718
|
+
{
|
|
193719
|
+
"name": "fallbackPlacements",
|
|
193720
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx"
|
|
193721
|
+
}
|
|
193722
|
+
],
|
|
193723
|
+
"tags": {}
|
|
193724
|
+
},
|
|
193525
193725
|
{
|
|
193526
193726
|
"kind": "property",
|
|
193527
193727
|
"name": "onPlacementChange",
|
|
@@ -193853,6 +194053,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
193853
194053
|
"value": "bottom"
|
|
193854
194054
|
}
|
|
193855
194055
|
},
|
|
194056
|
+
{
|
|
194057
|
+
"kind": "property",
|
|
194058
|
+
"name": "fallbackPlacements",
|
|
194059
|
+
"required": false,
|
|
194060
|
+
"type": {
|
|
194061
|
+
"kind": "array",
|
|
194062
|
+
"value": {
|
|
194063
|
+
"kind": "symbol",
|
|
194064
|
+
"name": "Placement",
|
|
194065
|
+
"value": "Placement"
|
|
194066
|
+
}
|
|
194067
|
+
},
|
|
194068
|
+
"description": "Define fallback placements by providing a list of {@link Placement} in array (in order of preference).\nThe default preference is following the order of `top`, `right`, `bottom`, and `left`. Once the initial\nand opposite placements are not available, the fallback placements will be in use. Use an empty array to\ndisable the fallback placements.",
|
|
194069
|
+
"declarations": [
|
|
194070
|
+
{
|
|
194071
|
+
"name": "fallbackPlacements",
|
|
194072
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx"
|
|
194073
|
+
}
|
|
194074
|
+
],
|
|
194075
|
+
"tags": {}
|
|
194076
|
+
},
|
|
193856
194077
|
{
|
|
193857
194078
|
"kind": "property",
|
|
193858
194079
|
"name": "onPlacementChange",
|
|
@@ -232057,6 +232278,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
232057
232278
|
"kind": "string",
|
|
232058
232279
|
"value": "top"
|
|
232059
232280
|
}
|
|
232281
|
+
},
|
|
232282
|
+
{
|
|
232283
|
+
"kind": "property",
|
|
232284
|
+
"name": "fallbackPlacements",
|
|
232285
|
+
"required": false,
|
|
232286
|
+
"type": {
|
|
232287
|
+
"kind": "array",
|
|
232288
|
+
"value": {
|
|
232289
|
+
"kind": "symbol",
|
|
232290
|
+
"name": "Placement",
|
|
232291
|
+
"value": "Placement"
|
|
232292
|
+
}
|
|
232293
|
+
},
|
|
232294
|
+
"description": "Define fallback placements by providing a list of {@link Placement} in array (in order of preference).\nThe default preference is following the order of `top`, `right`, `bottom`, and `left`. Once the initial\nand opposite placements are not available, the fallback placements will be in use. Use an empty array to\ndisable the fallback placements.",
|
|
232295
|
+
"declarations": [
|
|
232296
|
+
{
|
|
232297
|
+
"name": "fallbackPlacements",
|
|
232298
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tooltip/lib/OverflowTooltip.tsx"
|
|
232299
|
+
}
|
|
232300
|
+
],
|
|
232301
|
+
"tags": {}
|
|
232060
232302
|
}
|
|
232061
232303
|
]
|
|
232062
232304
|
}
|
|
@@ -232159,6 +232401,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
232159
232401
|
"value": "top"
|
|
232160
232402
|
}
|
|
232161
232403
|
},
|
|
232404
|
+
{
|
|
232405
|
+
"kind": "property",
|
|
232406
|
+
"name": "fallbackPlacements",
|
|
232407
|
+
"required": false,
|
|
232408
|
+
"type": {
|
|
232409
|
+
"kind": "array",
|
|
232410
|
+
"value": {
|
|
232411
|
+
"kind": "symbol",
|
|
232412
|
+
"name": "Placement",
|
|
232413
|
+
"value": "Placement"
|
|
232414
|
+
}
|
|
232415
|
+
},
|
|
232416
|
+
"description": "Define fallback placements by providing a list of {@link Placement} in array (in order of preference).\nThe default preference is following the order of `top`, `right`, `bottom`, and `left`. Once the initial\nand opposite placements are not available, the fallback placements will be in use. Use an empty array to\ndisable the fallback placements.",
|
|
232417
|
+
"declarations": [
|
|
232418
|
+
{
|
|
232419
|
+
"name": "fallbackPlacements",
|
|
232420
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tooltip/lib/Tooltip.tsx"
|
|
232421
|
+
}
|
|
232422
|
+
],
|
|
232423
|
+
"tags": {}
|
|
232424
|
+
},
|
|
232162
232425
|
{
|
|
232163
232426
|
"kind": "property",
|
|
232164
232427
|
"name": "type",
|
package/dist/es6/lib/specs.js
CHANGED
|
@@ -1801,6 +1801,70 @@ module.exports = {specifications: [
|
|
|
1801
1801
|
}
|
|
1802
1802
|
]
|
|
1803
1803
|
},
|
|
1804
|
+
{
|
|
1805
|
+
"type": "file",
|
|
1806
|
+
"name": "Dialog.spec.ts",
|
|
1807
|
+
"children": [
|
|
1808
|
+
{
|
|
1809
|
+
"type": "describe",
|
|
1810
|
+
"name": "Popup",
|
|
1811
|
+
"children": [
|
|
1812
|
+
{
|
|
1813
|
+
"type": "describe",
|
|
1814
|
+
"name": "given the [Testing/Popups/Dialog, DialogWithFallbackPlacements] example is rendered",
|
|
1815
|
+
"children": [
|
|
1816
|
+
{
|
|
1817
|
+
"type": "describe",
|
|
1818
|
+
"name": "check the fallback placements",
|
|
1819
|
+
"children": [
|
|
1820
|
+
{
|
|
1821
|
+
"type": "describe",
|
|
1822
|
+
"name": "when the preferred placement is set to bottom",
|
|
1823
|
+
"children": [
|
|
1824
|
+
{
|
|
1825
|
+
"type": "it",
|
|
1826
|
+
"name": "should show the fallback placement: top"
|
|
1827
|
+
}
|
|
1828
|
+
]
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
"type": "describe",
|
|
1832
|
+
"name": "when the preferred placement is set to top",
|
|
1833
|
+
"children": [
|
|
1834
|
+
{
|
|
1835
|
+
"type": "it",
|
|
1836
|
+
"name": "should show the fallback placement: bottom"
|
|
1837
|
+
}
|
|
1838
|
+
]
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
"type": "describe",
|
|
1842
|
+
"name": "when the preferred placement is set to right",
|
|
1843
|
+
"children": [
|
|
1844
|
+
{
|
|
1845
|
+
"type": "it",
|
|
1846
|
+
"name": "should show the fallback placement: left"
|
|
1847
|
+
}
|
|
1848
|
+
]
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
"type": "describe",
|
|
1852
|
+
"name": "when the preferred placement is set to right",
|
|
1853
|
+
"children": [
|
|
1854
|
+
{
|
|
1855
|
+
"type": "it",
|
|
1856
|
+
"name": "should show the fallback placement: bottom"
|
|
1857
|
+
}
|
|
1858
|
+
]
|
|
1859
|
+
}
|
|
1860
|
+
]
|
|
1861
|
+
}
|
|
1862
|
+
]
|
|
1863
|
+
}
|
|
1864
|
+
]
|
|
1865
|
+
}
|
|
1866
|
+
]
|
|
1867
|
+
},
|
|
1804
1868
|
{
|
|
1805
1869
|
"type": "file",
|
|
1806
1870
|
"name": "ExpandableContainer.spec.ts",
|
|
@@ -2157,6 +2221,48 @@ module.exports = {specifications: [
|
|
|
2157
2221
|
]
|
|
2158
2222
|
}
|
|
2159
2223
|
]
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
"type": "describe",
|
|
2227
|
+
"name": "given the [Testing/Popups/Menu, MenuWithFallbackPlacements] example is rendered",
|
|
2228
|
+
"children": [
|
|
2229
|
+
{
|
|
2230
|
+
"type": "describe",
|
|
2231
|
+
"name": "check the fallback placements",
|
|
2232
|
+
"children": [
|
|
2233
|
+
{
|
|
2234
|
+
"type": "describe",
|
|
2235
|
+
"name": "when the preferred placement is set to top",
|
|
2236
|
+
"children": [
|
|
2237
|
+
{
|
|
2238
|
+
"type": "it",
|
|
2239
|
+
"name": "should show the fallback placement: bottom"
|
|
2240
|
+
}
|
|
2241
|
+
]
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
"type": "describe",
|
|
2245
|
+
"name": "when the preferred placement is set to right",
|
|
2246
|
+
"children": [
|
|
2247
|
+
{
|
|
2248
|
+
"type": "it",
|
|
2249
|
+
"name": "should show the fallback placement: left"
|
|
2250
|
+
}
|
|
2251
|
+
]
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
"type": "describe",
|
|
2255
|
+
"name": "when the preferred placement is set to right",
|
|
2256
|
+
"children": [
|
|
2257
|
+
{
|
|
2258
|
+
"type": "it",
|
|
2259
|
+
"name": "should show the fallback placement: bottom"
|
|
2260
|
+
}
|
|
2261
|
+
]
|
|
2262
|
+
}
|
|
2263
|
+
]
|
|
2264
|
+
}
|
|
2265
|
+
]
|
|
2160
2266
|
}
|
|
2161
2267
|
]
|
|
2162
2268
|
}
|
|
@@ -3455,6 +3561,48 @@ module.exports = {specifications: [
|
|
|
3455
3561
|
]
|
|
3456
3562
|
}
|
|
3457
3563
|
]
|
|
3564
|
+
},
|
|
3565
|
+
{
|
|
3566
|
+
"type": "describe",
|
|
3567
|
+
"name": "given the [Testing/Popups/Popup, PopupWithFallbackPlacements] example is rendered",
|
|
3568
|
+
"children": [
|
|
3569
|
+
{
|
|
3570
|
+
"type": "describe",
|
|
3571
|
+
"name": "check the fallback placements",
|
|
3572
|
+
"children": [
|
|
3573
|
+
{
|
|
3574
|
+
"type": "describe",
|
|
3575
|
+
"name": "when the preferred placement is set to top",
|
|
3576
|
+
"children": [
|
|
3577
|
+
{
|
|
3578
|
+
"type": "it",
|
|
3579
|
+
"name": "should show the fallback placement: bottom"
|
|
3580
|
+
}
|
|
3581
|
+
]
|
|
3582
|
+
},
|
|
3583
|
+
{
|
|
3584
|
+
"type": "describe",
|
|
3585
|
+
"name": "when the preferred placement is set to right",
|
|
3586
|
+
"children": [
|
|
3587
|
+
{
|
|
3588
|
+
"type": "it",
|
|
3589
|
+
"name": "should show the fallback placement: left"
|
|
3590
|
+
}
|
|
3591
|
+
]
|
|
3592
|
+
},
|
|
3593
|
+
{
|
|
3594
|
+
"type": "describe",
|
|
3595
|
+
"name": "when the preferred placement is set to right",
|
|
3596
|
+
"children": [
|
|
3597
|
+
{
|
|
3598
|
+
"type": "it",
|
|
3599
|
+
"name": "should show the fallback placement: bottom"
|
|
3600
|
+
}
|
|
3601
|
+
]
|
|
3602
|
+
}
|
|
3603
|
+
]
|
|
3604
|
+
}
|
|
3605
|
+
]
|
|
3458
3606
|
}
|
|
3459
3607
|
]
|
|
3460
3608
|
}
|
|
@@ -7625,6 +7773,48 @@ module.exports = {specifications: [
|
|
|
7625
7773
|
]
|
|
7626
7774
|
}
|
|
7627
7775
|
]
|
|
7776
|
+
},
|
|
7777
|
+
{
|
|
7778
|
+
"type": "describe",
|
|
7779
|
+
"name": "given the [Testing/Popups/Tooltip, TooltipWithFallbackPlacements] example is rendered",
|
|
7780
|
+
"children": [
|
|
7781
|
+
{
|
|
7782
|
+
"type": "describe",
|
|
7783
|
+
"name": "check the fallback placements",
|
|
7784
|
+
"children": [
|
|
7785
|
+
{
|
|
7786
|
+
"type": "describe",
|
|
7787
|
+
"name": "when the preferred placement is set to top",
|
|
7788
|
+
"children": [
|
|
7789
|
+
{
|
|
7790
|
+
"type": "it",
|
|
7791
|
+
"name": "should show the fallback placement: bottom"
|
|
7792
|
+
}
|
|
7793
|
+
]
|
|
7794
|
+
},
|
|
7795
|
+
{
|
|
7796
|
+
"type": "describe",
|
|
7797
|
+
"name": "when the preferred placement is set to left",
|
|
7798
|
+
"children": [
|
|
7799
|
+
{
|
|
7800
|
+
"type": "it",
|
|
7801
|
+
"name": "should show the fallback placement: right"
|
|
7802
|
+
}
|
|
7803
|
+
]
|
|
7804
|
+
},
|
|
7805
|
+
{
|
|
7806
|
+
"type": "describe",
|
|
7807
|
+
"name": "when the preferred placement is set to left",
|
|
7808
|
+
"children": [
|
|
7809
|
+
{
|
|
7810
|
+
"type": "it",
|
|
7811
|
+
"name": "should show the fallback placement: bottom"
|
|
7812
|
+
}
|
|
7813
|
+
]
|
|
7814
|
+
}
|
|
7815
|
+
]
|
|
7816
|
+
}
|
|
7817
|
+
]
|
|
7628
7818
|
}
|
|
7629
7819
|
]
|
|
7630
7820
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Basic from './examples/MediaModal';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Media Modal example
|
|
5
|
+
|
|
6
|
+
These are modals that have an image or video as the primary content. The example can use a special
|
|
7
|
+
`MediaContainer` component that allows for media to take up more space in the Modal.
|
|
8
|
+
|
|
9
|
+
<ExampleCodeBlock code={Basic} />
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {Modal} from '@workday/canvas-kit-react/modal';
|
|
3
|
+
import {Box, BoxProps, Flex} from '@workday/canvas-kit-react/layout';
|
|
4
|
+
import {Text} from '@workday/canvas-kit-react/text';
|
|
5
|
+
import {PrimaryButton} from '@workday/canvas-kit-react/button';
|
|
6
|
+
import {spaceNumbers} from '@workday/canvas-kit-react/tokens';
|
|
7
|
+
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
8
|
+
|
|
9
|
+
const MediaImage = createComponent('img')({
|
|
10
|
+
displayName: 'Media.Image',
|
|
11
|
+
Component: (elemProps: React.ImgHTMLAttributes<HTMLImageElement>, ref, Element) => {
|
|
12
|
+
const [loaded, setLoaded] = React.useState(false);
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Box
|
|
16
|
+
as={Element}
|
|
17
|
+
ref={ref}
|
|
18
|
+
display="block"
|
|
19
|
+
backgroundColor="frenchVanilla200"
|
|
20
|
+
transition="opacity ease 200ms"
|
|
21
|
+
width="100%"
|
|
22
|
+
height={293}
|
|
23
|
+
style={{opacity: loaded ? 1 : 0}}
|
|
24
|
+
onLoad={() => setLoaded(true)}
|
|
25
|
+
{...elemProps}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const Media = createComponent('div')({
|
|
32
|
+
displayName: 'Media',
|
|
33
|
+
subComponents: {Image: MediaImage},
|
|
34
|
+
Component: ({children, ...elemProps}: BoxProps, ref, Element) => {
|
|
35
|
+
return (
|
|
36
|
+
<Box
|
|
37
|
+
as={Element}
|
|
38
|
+
ref={ref}
|
|
39
|
+
width={`calc(100% + ${spaceNumbers.l * 2}px)`}
|
|
40
|
+
marginLeft={`-${spaceNumbers.l}px`}
|
|
41
|
+
marginTop="m"
|
|
42
|
+
marginBottom="s"
|
|
43
|
+
{...elemProps}
|
|
44
|
+
>
|
|
45
|
+
{children}
|
|
46
|
+
</Box>
|
|
47
|
+
);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export default () => {
|
|
52
|
+
return (
|
|
53
|
+
<Modal>
|
|
54
|
+
<Modal.Target>Open Media Modal</Modal.Target>
|
|
55
|
+
<Modal.Overlay>
|
|
56
|
+
<Modal.Card>
|
|
57
|
+
<Modal.CloseIcon aria-label="Close" size="small" />
|
|
58
|
+
<Media>
|
|
59
|
+
<Media.Image
|
|
60
|
+
src="https://www.theuiaa.org/wp-content/uploads/2017/11/RTM19-banner-web.jpg"
|
|
61
|
+
alt="Sunrise in the mountains"
|
|
62
|
+
/>
|
|
63
|
+
</Media>
|
|
64
|
+
<Modal.Heading>TED's Secret to Public Speaking</Modal.Heading>
|
|
65
|
+
<Modal.Body>
|
|
66
|
+
<Text as="p" marginTop={0} marginBottom="m">
|
|
67
|
+
The secret to great public speaking, according to former actor Martin Danielson, is as
|
|
68
|
+
simple as one, two, three.
|
|
69
|
+
</Text>
|
|
70
|
+
<Flex gap="s">
|
|
71
|
+
<Modal.CloseButton as={PrimaryButton}>Learn More</Modal.CloseButton>
|
|
72
|
+
</Flex>
|
|
73
|
+
</Modal.Body>
|
|
74
|
+
</Modal.Card>
|
|
75
|
+
</Modal.Overlay>
|
|
76
|
+
</Modal>
|
|
77
|
+
);
|
|
78
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.9",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@emotion/styled": "^11.6.0",
|
|
46
46
|
"@storybook/csf": "0.0.1",
|
|
47
|
-
"@workday/canvas-kit-labs-react": "^9.0.
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^9.0.
|
|
49
|
-
"@workday/canvas-kit-react": "^9.0.
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^9.0.9",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^9.0.9",
|
|
49
|
+
"@workday/canvas-kit-react": "^9.0.9",
|
|
50
50
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
51
51
|
"markdown-to-jsx": "^6.10.3",
|
|
52
52
|
"ts-node": "^10.9.1"
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"mkdirp": "^1.0.3",
|
|
58
58
|
"typescript": "4.2"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "31743535a5f56b8412783810e8ffbd5f856f7a6e"
|
|
61
61
|
}
|