Skip to content

Commit 40e14de

Browse files
Docked composer (#3062)
* docked composer is working * test commit * add snapshots * cleanup code, add test * add component docs * fix indentation * remove unused imports * add body prop * remove expand button, show minimize or expand button depending on composer state, add class name parameter, add assitive text parameters, add story for minimized state * update props * fix browser test * remove boilerplate comments, rename callbacks to be onRequest*, use generated id for all components, use default props Co-authored-by: Greg Hui <[email protected]>
1 parent f70cfaf commit 40e14de

File tree

11 files changed

+935
-0
lines changed

11 files changed

+935
-0
lines changed

Diff for: components/component-docs.json

+108
Original file line numberDiff line numberDiff line change
@@ -6657,6 +6657,114 @@
66576657
"SLDS-component-path": "/components/datepickers",
66586658
"dependencies": []
66596659
},
6660+
"docked-composer": {
6661+
"description": "The Docked Composer is a persistent utility bar that allows a user to continually use the app to complete tasks or gather information while expanding/collapsing a composer window. [component blueprint guidelines](https://www.lightningdesignsystem.com/components/docked-composer/).",
6662+
"displayName": "DockedComposer",
6663+
"methods": [
6664+
{
6665+
"name": "getId",
6666+
"docblock": null,
6667+
"modifiers": [],
6668+
"params": [],
6669+
"returns": null
6670+
}
6671+
],
6672+
"props": {
6673+
"id": {
6674+
"type": {
6675+
"name": "string"
6676+
},
6677+
"required": false,
6678+
"description": "HTML id for component.\n_Tested with snapshot testing._"
6679+
},
6680+
"isOpen": {
6681+
"type": {
6682+
"name": "bool"
6683+
},
6684+
"required": false,
6685+
"description": "Whether the docked composer is open or closed.\n_Tested with snapshot testing._"
6686+
},
6687+
"header": {
6688+
"type": {
6689+
"name": "union",
6690+
"value": [
6691+
{
6692+
"name": "string"
6693+
},
6694+
{
6695+
"name": "node"
6696+
}
6697+
]
6698+
},
6699+
"required": false,
6700+
"description": "Text or node to display in the header.\n_Tested with snapshot testing._"
6701+
},
6702+
"body": {
6703+
"type": {
6704+
"name": "node"
6705+
},
6706+
"required": false,
6707+
"description": "Body of the composer.\n_Tested with snapshot testing._"
6708+
},
6709+
"assistiveText": {
6710+
"type": {
6711+
"name": "shape",
6712+
"value": {
6713+
"expandButton": {
6714+
"name": "string",
6715+
"required": false
6716+
},
6717+
"minimizeButton": {
6718+
"name": "string",
6719+
"required": false
6720+
},
6721+
"closeButton": {
6722+
"name": "string",
6723+
"required": false
6724+
}
6725+
}
6726+
},
6727+
"required": false,
6728+
"description": "**Assistive text for accessibility**\nThis object is merged with the default props object on every render.\n* `expandButton`: This is a visually hidden label for expand button shown when the composer is minimized.\n* `minimizeButton`: This is a visually hidden label for minimize button shown when the composer is expanded.\n* `closeButton`: This is a visually hidden label for close button.\n_Tested with snapshot testing._",
6729+
"defaultValue": {
6730+
"value": "{\n\texpandButton: 'Expand',\n\tminimizeButton: 'Minimize',\n\tcloseButton: 'Close',\n}",
6731+
"computed": false
6732+
}
6733+
},
6734+
"classNameContainer": {
6735+
"type": {
6736+
"name": "string"
6737+
},
6738+
"required": false,
6739+
"description": "Additional class name added to the container with slds-docked_container class.\n_Tested with snapshot testing._"
6740+
},
6741+
"events": {
6742+
"type": {
6743+
"name": "shape",
6744+
"value": {
6745+
"onRequestMinimize": {
6746+
"name": "func",
6747+
"required": false
6748+
},
6749+
"onRequestExpand": {
6750+
"name": "func",
6751+
"required": false
6752+
},
6753+
"onRequestClose": {
6754+
"name": "func",
6755+
"required": false
6756+
}
6757+
}
6758+
},
6759+
"required": false,
6760+
"description": "Event Callbacks\n* `onRequestMinimize`: Called when minimize button is clicked.\n* `onRequestExpand`: Called when the expand button is clicked.\n* `onRequestClose`: Called when the close button is clicked.\n_Tested with Mocha testing._"
6761+
}
6762+
},
6763+
"route": "docked-composers",
6764+
"display-name": "Docked Composers",
6765+
"SLDS-component-path": "/components/docked-composer",
6766+
"dependencies": []
6767+
},
66606768
"dynamic-icon": {
66616769
"description": "A set of delightful animated icons.",
66626770
"methods": [

0 commit comments

Comments
 (0)