let
| No | -- | null
| -- |
-| contentProps | No | let
| No | {}
| {}
| -- |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :----------- | :------- | :--------------- | :------- | ---------------------------------------- | ----------------- | ------------------------------------------------------ |
+| ref | No | let
| Yes | null | HTMLSpanElement
| null
| Obtain a reference to the popover content HTML element |
+| className | No | let
| No | -- | null
| -- |
+| contentProps | No | let
| No | {}
| {}
| -- |
### Slots
@@ -4541,22 +4542,20 @@ None.
### Props
-| Prop name | Required | Kind | Reactive | Type | Default value | Description |
-| :-------------- | :------- | :--------------- | :------- | --------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------ |
-| refIcon | No | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the icon HTML element |
-| refTooltip | No | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the tooltip HTML element |
-| ref | No | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the trigger text HTML element |
-| open | No | let
| Yes | boolean
| false
| Set to `true` to open the tooltip |
-| align | No | let
| No | "start" | "center" | "end"
| "center"
| Set the alignment of the tooltip relative to the icon |
-| direction | No | let
| No | "top" | "right" | "bottom" | "left"
| "bottom"
| Set the direction of the tooltip relative to the button |
-| hideIcon | No | let
| No | boolean
| false
| Set to `true` to hide the tooltip icon |
-| icon | No | let
| No | typeof import("svelte").SvelteComponent
| undefined
| Specify the icon to render for the tooltip button.let
| No | string
| ""
| Specify the ARIA label for the tooltip button |
-| iconName | No | let
| No | string
| ""
| Specify the icon name attribute |
-| tabindex | No | let
| No | string
| "0"
| Set the button tabindex |
-| tooltipId | No | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the tooltip |
-| triggerId | No | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the tooltip button |
-| triggerText | No | let
| No | string
| ""
| Set the tooltip button text |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :------- | :--------------- | :------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------ |
+| refIcon | No | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the icon HTML element |
+| refTooltip | No | let
| Yes | -- | null
| Obtain a reference to the tooltip HTML element |
+| ref | No | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the trigger text HTML element |
+| open | No | let
| Yes | boolean
| false
| Set to `true` to open the tooltip |
+| align | No | let
| No | "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "left-bottom" | "left-top" | "right" | "right-bottom" | "right-top"
| "bottom"
| Set the alignment of the tooltip relative to the icon |
+| icon | No | let
| No | typeof import("svelte").SvelteComponent
| undefined
| Specify the icon to render for the tooltip button.let
| No | string
| ""
| Specify the ARIA label for the tooltip button |
+| iconName | No | let
| No | string
| ""
| Specify the icon name attribute |
+| tabindex | No | let
| No | string
| "0"
| Set the button tabindex |
+| tooltipId | No | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the tooltip |
+| triggerId | No | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the tooltip button |
+| triggerText | No | let
| No | string
| ""
| Set the tooltip button textnull
|
| close | dispatched | null
|
-| click | forwarded | -- |
-| mousedown | forwarded | -- |
## `TooltipDefinition`
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index 222ed167..83a68ca1 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -9006,6 +9006,18 @@
"isRequired": false,
"constant": false,
"reactive": false
+ },
+ {
+ "name": "ref",
+ "kind": "let",
+ "description": "Obtain a reference to the popover content HTML element",
+ "type": "null | HTMLSpanElement",
+ "value": "null",
+ "isFunction": false,
+ "isFunctionDeclaration": false,
+ "isRequired": false,
+ "constant": false,
+ "reactive": true
}
],
"moduleExports": [],
@@ -13990,19 +14002,7 @@
"name": "align",
"kind": "let",
"description": "Set the alignment of the tooltip relative to the icon",
- "type": "\"start\" | \"center\" | \"end\"",
- "value": "\"center\"",
- "isFunction": false,
- "isFunctionDeclaration": false,
- "isRequired": false,
- "constant": false,
- "reactive": false
- },
- {
- "name": "direction",
- "kind": "let",
- "description": "Set the direction of the tooltip relative to the button",
- "type": "\"top\" | \"right\" | \"bottom\" | \"left\"",
+ "type": "\"top\" | \"top-left\" | \"top-right\" | \"bottom\" | \"bottom-left\" | \"bottom-right\" | \"left\" | \"left-bottom\" | \"left-top\" | \"right\" | \"right-bottom\" | \"right-top\"",
"value": "\"bottom\"",
"isFunction": false,
"isFunctionDeclaration": false,
@@ -14022,18 +14022,6 @@
"constant": false,
"reactive": true
},
- {
- "name": "hideIcon",
- "kind": "let",
- "description": "Set to `true` to hide the tooltip icon",
- "type": "boolean",
- "value": "false",
- "isFunction": false,
- "isFunctionDeclaration": false,
- "isRequired": false,
- "constant": false,
- "reactive": false
- },
{
"name": "icon",
"kind": "let",
@@ -14108,7 +14096,7 @@
{
"name": "triggerText",
"kind": "let",
- "description": "Set the tooltip button text",
+ "description": "Set the tooltip button text\nThis is deprecated. Use default slot instead",
"type": "string",
"value": "\"\"",
"isFunction": false,
@@ -14133,7 +14121,6 @@
"name": "refTooltip",
"kind": "let",
"description": "Obtain a reference to the tooltip HTML element",
- "type": "null | HTMLDivElement",
"value": "null",
"isFunction": false,
"isFunctionDeclaration": false,
@@ -14172,9 +14159,7 @@
],
"events": [
{ "type": "dispatched", "name": "open", "detail": "null" },
- { "type": "dispatched", "name": "close", "detail": "null" },
- { "type": "forwarded", "name": "click", "element": "div" },
- { "type": "forwarded", "name": "mousedown", "element": "div" }
+ { "type": "dispatched", "name": "close", "detail": "null" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
diff --git a/docs/src/pages/components/Tooltip.svx b/docs/src/pages/components/Tooltip.svx
index 7b34025e..cd877b9d 100644
--- a/docs/src/pages/components/Tooltip.svx
+++ b/docs/src/pages/components/Tooltip.svx
@@ -13,69 +13,46 @@ components: ["Tooltip", "TooltipFooter"]
By default, the tooltip is triggered by an information icon.
- Resources are provisioned based on your account's organization. -
+ Resources are provisioned based on your account's organization.- Resources are provisioned based on your account's organization. -
+ Resources are provisioned based on your account's organization.Top
Right
Bottom
Left
Start
End
Center
- Resources are provisioned based on your account's organization. -
+ Resources are provisioned based on your account's organization.- Resources are provisioned based on your account's organization. -
+ Resources are provisioned based on your account's organization.- Resources are provisioned based on your account's organization. -
+ Resources are provisioned based on your account's organization.- Resources are provisioned based on your account's organization. -
-Resources are provisioned based on your account's organization.
+Resources are provisioned based on your account's organization.
+ Resources are provisioned based on your account's organization.Resources are provisioned based on your account's organization.
+Top
-Right
-Bottom
-Left
-Resources are provisioned based on your account's organization.
+