-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
138 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import Component, { html, css } from '../script/Component.js'; | ||
import { updateChildrenAttribute } from '../script/DOM.js'; | ||
/* eslint-disable no-unused-vars */ | ||
import UIFAB from './fab.js'; | ||
import UITooltip from './tooltip.js'; | ||
/* eslint-enable no-unused-vars */ | ||
|
||
const attributes = { | ||
/** */ | ||
content(root, value) { updateChildrenAttribute(root, 'ui-tooltip', 'content', value) }, | ||
/** */ | ||
x(root, value) { updateChildrenAttribute(root, 'ui-tooltip', 'x', value) }, | ||
/** */ | ||
y(root, value) { updateChildrenAttribute(root, 'ui-tooltip', 'y', value) } | ||
} | ||
|
||
const properties = { | ||
/** */ | ||
disabled(root, value) { updateChildrenAttribute(root, 'ui-button', 'disabled', value) } | ||
} | ||
|
||
const style = css` | ||
:host { | ||
display: block; | ||
} | ||
slot { | ||
display: block; | ||
}`; | ||
|
||
/** FABTooltip {UIFABTooltip} @class @ui @component <ui-fb-tooltip /> | ||
* Floating Action Button with tooltip | ||
*/ | ||
export default class UIFABTooltip extends Component { | ||
static template = html` | ||
<template> | ||
<style>${style}</style> | ||
<ui-tooltip><ui-fab><slot></slot></ui-fab></ui-tooltip> | ||
</template>`; | ||
|
||
/** Создание элемента в DOM (DOM доступен) / mount @lifecycle | ||
* @param {ShadowRoot} node корневой узел элемента | ||
* @return {UIFABTooltip} @this текущий компонент | ||
*/ | ||
mount(node) { | ||
super.mount(node, attributes, properties); | ||
return this; | ||
} | ||
} | ||
|
||
Component.init(UIFABTooltip, 'ui-fab-tooltip', { attributes, properties }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters