@workday/canvas-kit-docs 9.1.0-439-next.0 → 9.1.0-445-next.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/es6/lib/docs.js
CHANGED
|
@@ -117840,6 +117840,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
117840
117840
|
"value": "bottom"
|
|
117841
117841
|
}
|
|
117842
117842
|
},
|
|
117843
|
+
{
|
|
117844
|
+
"kind": "property",
|
|
117845
|
+
"name": "fallbackPlacements",
|
|
117846
|
+
"required": false,
|
|
117847
|
+
"type": {
|
|
117848
|
+
"kind": "array",
|
|
117849
|
+
"value": {
|
|
117850
|
+
"kind": "symbol",
|
|
117851
|
+
"name": "Placement",
|
|
117852
|
+
"value": "Placement"
|
|
117853
|
+
}
|
|
117854
|
+
},
|
|
117855
|
+
"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.",
|
|
117856
|
+
"declarations": [
|
|
117857
|
+
{
|
|
117858
|
+
"name": "fallbackPlacements",
|
|
117859
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/PopupPopper.tsx"
|
|
117860
|
+
}
|
|
117861
|
+
],
|
|
117862
|
+
"tags": {}
|
|
117863
|
+
},
|
|
117843
117864
|
{
|
|
117844
117865
|
"kind": "property",
|
|
117845
117866
|
"name": "popperOptions",
|
|
@@ -149321,6 +149342,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
149321
149342
|
"value": "bottom"
|
|
149322
149343
|
}
|
|
149323
149344
|
},
|
|
149345
|
+
{
|
|
149346
|
+
"kind": "property",
|
|
149347
|
+
"name": "fallbackPlacements",
|
|
149348
|
+
"required": false,
|
|
149349
|
+
"type": {
|
|
149350
|
+
"kind": "array",
|
|
149351
|
+
"value": {
|
|
149352
|
+
"kind": "symbol",
|
|
149353
|
+
"name": "Placement",
|
|
149354
|
+
"value": "Placement"
|
|
149355
|
+
}
|
|
149356
|
+
},
|
|
149357
|
+
"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.",
|
|
149358
|
+
"declarations": [
|
|
149359
|
+
{
|
|
149360
|
+
"name": "fallbackPlacements",
|
|
149361
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx"
|
|
149362
|
+
}
|
|
149363
|
+
],
|
|
149364
|
+
"tags": {}
|
|
149365
|
+
},
|
|
149324
149366
|
{
|
|
149325
149367
|
"kind": "property",
|
|
149326
149368
|
"name": "onPlacementChange",
|
|
@@ -178373,6 +178415,81 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
178373
178415
|
}
|
|
178374
178416
|
}
|
|
178375
178417
|
},
|
|
178418
|
+
{
|
|
178419
|
+
"name": "Placement",
|
|
178420
|
+
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts",
|
|
178421
|
+
"description": "",
|
|
178422
|
+
"declarations": [
|
|
178423
|
+
{
|
|
178424
|
+
"name": "Placement",
|
|
178425
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts"
|
|
178426
|
+
}
|
|
178427
|
+
],
|
|
178428
|
+
"tags": {},
|
|
178429
|
+
"type": {
|
|
178430
|
+
"kind": "type",
|
|
178431
|
+
"typeParameters": [],
|
|
178432
|
+
"value": {
|
|
178433
|
+
"kind": "symbol",
|
|
178434
|
+
"name": "PopperJS.Placement",
|
|
178435
|
+
"value": "Placement"
|
|
178436
|
+
}
|
|
178437
|
+
}
|
|
178438
|
+
},
|
|
178439
|
+
{
|
|
178440
|
+
"name": "Options",
|
|
178441
|
+
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts",
|
|
178442
|
+
"description": "",
|
|
178443
|
+
"declarations": [
|
|
178444
|
+
{
|
|
178445
|
+
"name": "Options",
|
|
178446
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts"
|
|
178447
|
+
}
|
|
178448
|
+
],
|
|
178449
|
+
"tags": {},
|
|
178450
|
+
"type": {
|
|
178451
|
+
"kind": "object",
|
|
178452
|
+
"properties": [
|
|
178453
|
+
{
|
|
178454
|
+
"kind": "property",
|
|
178455
|
+
"name": "fallbackPlacements",
|
|
178456
|
+
"required": true,
|
|
178457
|
+
"type": {
|
|
178458
|
+
"kind": "array",
|
|
178459
|
+
"value": {
|
|
178460
|
+
"kind": "symbol",
|
|
178461
|
+
"name": "Placement",
|
|
178462
|
+
"value": "Placement"
|
|
178463
|
+
}
|
|
178464
|
+
},
|
|
178465
|
+
"description": "",
|
|
178466
|
+
"declarations": [
|
|
178467
|
+
{
|
|
178468
|
+
"name": "fallbackPlacements",
|
|
178469
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts"
|
|
178470
|
+
}
|
|
178471
|
+
],
|
|
178472
|
+
"tags": {}
|
|
178473
|
+
}
|
|
178474
|
+
]
|
|
178475
|
+
}
|
|
178476
|
+
},
|
|
178477
|
+
{
|
|
178478
|
+
"name": "fallbackPlacementsModifier",
|
|
178479
|
+
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts",
|
|
178480
|
+
"description": "",
|
|
178481
|
+
"declarations": [
|
|
178482
|
+
{
|
|
178483
|
+
"name": "fallbackPlacementsModifier",
|
|
178484
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/fallbackPlacements.ts"
|
|
178485
|
+
}
|
|
178486
|
+
],
|
|
178487
|
+
"tags": {},
|
|
178488
|
+
"type": {
|
|
178489
|
+
"kind": "symbol",
|
|
178490
|
+
"name": "name"
|
|
178491
|
+
}
|
|
178492
|
+
},
|
|
178376
178493
|
{
|
|
178377
178494
|
"name": "getTransformFromPlacement",
|
|
178378
178495
|
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/getTransformFromPlacement.ts",
|
|
@@ -181624,6 +181741,26 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
181624
181741
|
}
|
|
181625
181742
|
}
|
|
181626
181743
|
},
|
|
181744
|
+
{
|
|
181745
|
+
"name": "defaultFallbackPlacements",
|
|
181746
|
+
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx",
|
|
181747
|
+
"description": "",
|
|
181748
|
+
"declarations": [
|
|
181749
|
+
{
|
|
181750
|
+
"name": "defaultFallbackPlacements",
|
|
181751
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx"
|
|
181752
|
+
}
|
|
181753
|
+
],
|
|
181754
|
+
"tags": {},
|
|
181755
|
+
"type": {
|
|
181756
|
+
"kind": "array",
|
|
181757
|
+
"value": {
|
|
181758
|
+
"kind": "symbol",
|
|
181759
|
+
"name": "Placement",
|
|
181760
|
+
"value": "Placement"
|
|
181761
|
+
}
|
|
181762
|
+
}
|
|
181763
|
+
},
|
|
181627
181764
|
{
|
|
181628
181765
|
"name": "PopperProps",
|
|
181629
181766
|
"fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx",
|
|
@@ -181838,6 +181975,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
181838
181975
|
"value": "bottom"
|
|
181839
181976
|
}
|
|
181840
181977
|
},
|
|
181978
|
+
{
|
|
181979
|
+
"kind": "property",
|
|
181980
|
+
"name": "fallbackPlacements",
|
|
181981
|
+
"required": false,
|
|
181982
|
+
"type": {
|
|
181983
|
+
"kind": "array",
|
|
181984
|
+
"value": {
|
|
181985
|
+
"kind": "symbol",
|
|
181986
|
+
"name": "Placement",
|
|
181987
|
+
"value": "Placement"
|
|
181988
|
+
}
|
|
181989
|
+
},
|
|
181990
|
+
"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.",
|
|
181991
|
+
"declarations": [
|
|
181992
|
+
{
|
|
181993
|
+
"name": "fallbackPlacements",
|
|
181994
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx"
|
|
181995
|
+
}
|
|
181996
|
+
],
|
|
181997
|
+
"tags": {}
|
|
181998
|
+
},
|
|
181841
181999
|
{
|
|
181842
182000
|
"kind": "property",
|
|
181843
182001
|
"name": "onPlacementChange",
|
|
@@ -183412,6 +183570,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
183412
183570
|
"value": "bottom"
|
|
183413
183571
|
}
|
|
183414
183572
|
},
|
|
183573
|
+
{
|
|
183574
|
+
"kind": "property",
|
|
183575
|
+
"name": "fallbackPlacements",
|
|
183576
|
+
"required": false,
|
|
183577
|
+
"type": {
|
|
183578
|
+
"kind": "array",
|
|
183579
|
+
"value": {
|
|
183580
|
+
"kind": "symbol",
|
|
183581
|
+
"name": "Placement",
|
|
183582
|
+
"value": "Placement"
|
|
183583
|
+
}
|
|
183584
|
+
},
|
|
183585
|
+
"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.",
|
|
183586
|
+
"declarations": [
|
|
183587
|
+
{
|
|
183588
|
+
"name": "fallbackPlacements",
|
|
183589
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/PopupPopper.tsx"
|
|
183590
|
+
}
|
|
183591
|
+
],
|
|
183592
|
+
"tags": {}
|
|
183593
|
+
},
|
|
183415
183594
|
{
|
|
183416
183595
|
"kind": "property",
|
|
183417
183596
|
"name": "popperOptions",
|
|
@@ -193568,6 +193747,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
193568
193747
|
"default": "bottom"
|
|
193569
193748
|
}
|
|
193570
193749
|
},
|
|
193750
|
+
{
|
|
193751
|
+
"kind": "property",
|
|
193752
|
+
"name": "fallbackPlacements",
|
|
193753
|
+
"required": false,
|
|
193754
|
+
"type": {
|
|
193755
|
+
"kind": "array",
|
|
193756
|
+
"value": {
|
|
193757
|
+
"kind": "symbol",
|
|
193758
|
+
"name": "Placement",
|
|
193759
|
+
"value": "Placement"
|
|
193760
|
+
}
|
|
193761
|
+
},
|
|
193762
|
+
"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.",
|
|
193763
|
+
"declarations": [
|
|
193764
|
+
{
|
|
193765
|
+
"name": "fallbackPlacements",
|
|
193766
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx"
|
|
193767
|
+
}
|
|
193768
|
+
],
|
|
193769
|
+
"tags": {}
|
|
193770
|
+
},
|
|
193571
193771
|
{
|
|
193572
193772
|
"kind": "property",
|
|
193573
193773
|
"name": "onPlacementChange",
|
|
@@ -193899,6 +194099,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
193899
194099
|
"value": "bottom"
|
|
193900
194100
|
}
|
|
193901
194101
|
},
|
|
194102
|
+
{
|
|
194103
|
+
"kind": "property",
|
|
194104
|
+
"name": "fallbackPlacements",
|
|
194105
|
+
"required": false,
|
|
194106
|
+
"type": {
|
|
194107
|
+
"kind": "array",
|
|
194108
|
+
"value": {
|
|
194109
|
+
"kind": "symbol",
|
|
194110
|
+
"name": "Placement",
|
|
194111
|
+
"value": "Placement"
|
|
194112
|
+
}
|
|
194113
|
+
},
|
|
194114
|
+
"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.",
|
|
194115
|
+
"declarations": [
|
|
194116
|
+
{
|
|
194117
|
+
"name": "fallbackPlacements",
|
|
194118
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/popup/lib/Popper.tsx"
|
|
194119
|
+
}
|
|
194120
|
+
],
|
|
194121
|
+
"tags": {}
|
|
194122
|
+
},
|
|
193902
194123
|
{
|
|
193903
194124
|
"kind": "property",
|
|
193904
194125
|
"name": "onPlacementChange",
|
|
@@ -232103,6 +232324,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
232103
232324
|
"kind": "string",
|
|
232104
232325
|
"value": "top"
|
|
232105
232326
|
}
|
|
232327
|
+
},
|
|
232328
|
+
{
|
|
232329
|
+
"kind": "property",
|
|
232330
|
+
"name": "fallbackPlacements",
|
|
232331
|
+
"required": false,
|
|
232332
|
+
"type": {
|
|
232333
|
+
"kind": "array",
|
|
232334
|
+
"value": {
|
|
232335
|
+
"kind": "symbol",
|
|
232336
|
+
"name": "Placement",
|
|
232337
|
+
"value": "Placement"
|
|
232338
|
+
}
|
|
232339
|
+
},
|
|
232340
|
+
"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.",
|
|
232341
|
+
"declarations": [
|
|
232342
|
+
{
|
|
232343
|
+
"name": "fallbackPlacements",
|
|
232344
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tooltip/lib/OverflowTooltip.tsx"
|
|
232345
|
+
}
|
|
232346
|
+
],
|
|
232347
|
+
"tags": {}
|
|
232106
232348
|
}
|
|
232107
232349
|
]
|
|
232108
232350
|
}
|
|
@@ -232205,6 +232447,27 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
|
|
|
232205
232447
|
"value": "top"
|
|
232206
232448
|
}
|
|
232207
232449
|
},
|
|
232450
|
+
{
|
|
232451
|
+
"kind": "property",
|
|
232452
|
+
"name": "fallbackPlacements",
|
|
232453
|
+
"required": false,
|
|
232454
|
+
"type": {
|
|
232455
|
+
"kind": "array",
|
|
232456
|
+
"value": {
|
|
232457
|
+
"kind": "symbol",
|
|
232458
|
+
"name": "Placement",
|
|
232459
|
+
"value": "Placement"
|
|
232460
|
+
}
|
|
232461
|
+
},
|
|
232462
|
+
"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.",
|
|
232463
|
+
"declarations": [
|
|
232464
|
+
{
|
|
232465
|
+
"name": "fallbackPlacements",
|
|
232466
|
+
"filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tooltip/lib/Tooltip.tsx"
|
|
232467
|
+
}
|
|
232468
|
+
],
|
|
232469
|
+
"tags": {}
|
|
232470
|
+
},
|
|
232208
232471
|
{
|
|
232209
232472
|
"kind": "property",
|
|
232210
232473
|
"name": "type",
|
package/dist/es6/lib/specs.js
CHANGED
|
@@ -1823,6 +1823,70 @@ module.exports = {specifications: [
|
|
|
1823
1823
|
}
|
|
1824
1824
|
]
|
|
1825
1825
|
},
|
|
1826
|
+
{
|
|
1827
|
+
"type": "file",
|
|
1828
|
+
"name": "Dialog.spec.ts",
|
|
1829
|
+
"children": [
|
|
1830
|
+
{
|
|
1831
|
+
"type": "describe",
|
|
1832
|
+
"name": "Popup",
|
|
1833
|
+
"children": [
|
|
1834
|
+
{
|
|
1835
|
+
"type": "describe",
|
|
1836
|
+
"name": "given the [Testing/Popups/Dialog, DialogWithFallbackPlacements] example is rendered",
|
|
1837
|
+
"children": [
|
|
1838
|
+
{
|
|
1839
|
+
"type": "describe",
|
|
1840
|
+
"name": "check the fallback placements",
|
|
1841
|
+
"children": [
|
|
1842
|
+
{
|
|
1843
|
+
"type": "describe",
|
|
1844
|
+
"name": "when the preferred placement is set to bottom",
|
|
1845
|
+
"children": [
|
|
1846
|
+
{
|
|
1847
|
+
"type": "it",
|
|
1848
|
+
"name": "should show the fallback placement: top"
|
|
1849
|
+
}
|
|
1850
|
+
]
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
"type": "describe",
|
|
1854
|
+
"name": "when the preferred placement is set to top",
|
|
1855
|
+
"children": [
|
|
1856
|
+
{
|
|
1857
|
+
"type": "it",
|
|
1858
|
+
"name": "should show the fallback placement: bottom"
|
|
1859
|
+
}
|
|
1860
|
+
]
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
"type": "describe",
|
|
1864
|
+
"name": "when the preferred placement is set to right",
|
|
1865
|
+
"children": [
|
|
1866
|
+
{
|
|
1867
|
+
"type": "it",
|
|
1868
|
+
"name": "should show the fallback placement: left"
|
|
1869
|
+
}
|
|
1870
|
+
]
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
"type": "describe",
|
|
1874
|
+
"name": "when the preferred placement is set to right",
|
|
1875
|
+
"children": [
|
|
1876
|
+
{
|
|
1877
|
+
"type": "it",
|
|
1878
|
+
"name": "should show the fallback placement: bottom"
|
|
1879
|
+
}
|
|
1880
|
+
]
|
|
1881
|
+
}
|
|
1882
|
+
]
|
|
1883
|
+
}
|
|
1884
|
+
]
|
|
1885
|
+
}
|
|
1886
|
+
]
|
|
1887
|
+
}
|
|
1888
|
+
]
|
|
1889
|
+
},
|
|
1826
1890
|
{
|
|
1827
1891
|
"type": "file",
|
|
1828
1892
|
"name": "ExpandableContainer.spec.ts",
|
|
@@ -2179,6 +2243,48 @@ module.exports = {specifications: [
|
|
|
2179
2243
|
]
|
|
2180
2244
|
}
|
|
2181
2245
|
]
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
"type": "describe",
|
|
2249
|
+
"name": "given the [Testing/Popups/Menu, MenuWithFallbackPlacements] example is rendered",
|
|
2250
|
+
"children": [
|
|
2251
|
+
{
|
|
2252
|
+
"type": "describe",
|
|
2253
|
+
"name": "check the fallback placements",
|
|
2254
|
+
"children": [
|
|
2255
|
+
{
|
|
2256
|
+
"type": "describe",
|
|
2257
|
+
"name": "when the preferred placement is set to top",
|
|
2258
|
+
"children": [
|
|
2259
|
+
{
|
|
2260
|
+
"type": "it",
|
|
2261
|
+
"name": "should show the fallback placement: bottom"
|
|
2262
|
+
}
|
|
2263
|
+
]
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
"type": "describe",
|
|
2267
|
+
"name": "when the preferred placement is set to right",
|
|
2268
|
+
"children": [
|
|
2269
|
+
{
|
|
2270
|
+
"type": "it",
|
|
2271
|
+
"name": "should show the fallback placement: left"
|
|
2272
|
+
}
|
|
2273
|
+
]
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
"type": "describe",
|
|
2277
|
+
"name": "when the preferred placement is set to right",
|
|
2278
|
+
"children": [
|
|
2279
|
+
{
|
|
2280
|
+
"type": "it",
|
|
2281
|
+
"name": "should show the fallback placement: bottom"
|
|
2282
|
+
}
|
|
2283
|
+
]
|
|
2284
|
+
}
|
|
2285
|
+
]
|
|
2286
|
+
}
|
|
2287
|
+
]
|
|
2182
2288
|
}
|
|
2183
2289
|
]
|
|
2184
2290
|
}
|
|
@@ -3477,6 +3583,48 @@ module.exports = {specifications: [
|
|
|
3477
3583
|
]
|
|
3478
3584
|
}
|
|
3479
3585
|
]
|
|
3586
|
+
},
|
|
3587
|
+
{
|
|
3588
|
+
"type": "describe",
|
|
3589
|
+
"name": "given the [Testing/Popups/Popup, PopupWithFallbackPlacements] example is rendered",
|
|
3590
|
+
"children": [
|
|
3591
|
+
{
|
|
3592
|
+
"type": "describe",
|
|
3593
|
+
"name": "check the fallback placements",
|
|
3594
|
+
"children": [
|
|
3595
|
+
{
|
|
3596
|
+
"type": "describe",
|
|
3597
|
+
"name": "when the preferred placement is set to top",
|
|
3598
|
+
"children": [
|
|
3599
|
+
{
|
|
3600
|
+
"type": "it",
|
|
3601
|
+
"name": "should show the fallback placement: bottom"
|
|
3602
|
+
}
|
|
3603
|
+
]
|
|
3604
|
+
},
|
|
3605
|
+
{
|
|
3606
|
+
"type": "describe",
|
|
3607
|
+
"name": "when the preferred placement is set to right",
|
|
3608
|
+
"children": [
|
|
3609
|
+
{
|
|
3610
|
+
"type": "it",
|
|
3611
|
+
"name": "should show the fallback placement: left"
|
|
3612
|
+
}
|
|
3613
|
+
]
|
|
3614
|
+
},
|
|
3615
|
+
{
|
|
3616
|
+
"type": "describe",
|
|
3617
|
+
"name": "when the preferred placement is set to right",
|
|
3618
|
+
"children": [
|
|
3619
|
+
{
|
|
3620
|
+
"type": "it",
|
|
3621
|
+
"name": "should show the fallback placement: bottom"
|
|
3622
|
+
}
|
|
3623
|
+
]
|
|
3624
|
+
}
|
|
3625
|
+
]
|
|
3626
|
+
}
|
|
3627
|
+
]
|
|
3480
3628
|
}
|
|
3481
3629
|
]
|
|
3482
3630
|
}
|
|
@@ -7647,6 +7795,48 @@ module.exports = {specifications: [
|
|
|
7647
7795
|
]
|
|
7648
7796
|
}
|
|
7649
7797
|
]
|
|
7798
|
+
},
|
|
7799
|
+
{
|
|
7800
|
+
"type": "describe",
|
|
7801
|
+
"name": "given the [Testing/Popups/Tooltip, TooltipWithFallbackPlacements] example is rendered",
|
|
7802
|
+
"children": [
|
|
7803
|
+
{
|
|
7804
|
+
"type": "describe",
|
|
7805
|
+
"name": "check the fallback placements",
|
|
7806
|
+
"children": [
|
|
7807
|
+
{
|
|
7808
|
+
"type": "describe",
|
|
7809
|
+
"name": "when the preferred placement is set to top",
|
|
7810
|
+
"children": [
|
|
7811
|
+
{
|
|
7812
|
+
"type": "it",
|
|
7813
|
+
"name": "should show the fallback placement: bottom"
|
|
7814
|
+
}
|
|
7815
|
+
]
|
|
7816
|
+
},
|
|
7817
|
+
{
|
|
7818
|
+
"type": "describe",
|
|
7819
|
+
"name": "when the preferred placement is set to left",
|
|
7820
|
+
"children": [
|
|
7821
|
+
{
|
|
7822
|
+
"type": "it",
|
|
7823
|
+
"name": "should show the fallback placement: right"
|
|
7824
|
+
}
|
|
7825
|
+
]
|
|
7826
|
+
},
|
|
7827
|
+
{
|
|
7828
|
+
"type": "describe",
|
|
7829
|
+
"name": "when the preferred placement is set to left",
|
|
7830
|
+
"children": [
|
|
7831
|
+
{
|
|
7832
|
+
"type": "it",
|
|
7833
|
+
"name": "should show the fallback placement: bottom"
|
|
7834
|
+
}
|
|
7835
|
+
]
|
|
7836
|
+
}
|
|
7837
|
+
]
|
|
7838
|
+
}
|
|
7839
|
+
]
|
|
7650
7840
|
}
|
|
7651
7841
|
]
|
|
7652
7842
|
}
|
|
@@ -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.1.0-
|
|
3
|
+
"version": "9.1.0-445-next.0",
|
|
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.1.0-
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^9.1.0-
|
|
49
|
-
"@workday/canvas-kit-react": "^9.1.0-
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^9.1.0-445-next.0",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^9.1.0-445-next.0",
|
|
49
|
+
"@workday/canvas-kit-react": "^9.1.0-445-next.0",
|
|
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": "2517711b2e8cd1567a044a59d4f9ae01c95d67af"
|
|
61
61
|
}
|