@aquera/nile-elements 0.0.84 → 0.0.86
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/README.md +7 -0
- package/demo/index.html +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +131 -2
- package/dist/nile-detail/index.cjs.js +2 -0
- package/dist/nile-detail/index.cjs.js.map +1 -0
- package/dist/nile-detail/index.esm.js +1 -0
- package/dist/nile-detail/nile-detail.cjs.js +2 -0
- package/dist/nile-detail/nile-detail.cjs.js.map +1 -0
- package/dist/nile-detail/nile-detail.css.cjs.js +2 -0
- package/dist/nile-detail/nile-detail.css.cjs.js.map +1 -0
- package/dist/nile-detail/nile-detail.css.esm.js +93 -0
- package/dist/nile-detail/nile-detail.esm.js +34 -0
- package/dist/nile-title/index.cjs.js +2 -0
- package/dist/nile-title/index.cjs.js.map +1 -0
- package/dist/nile-title/index.esm.js +1 -0
- package/dist/nile-title/nile-title.cjs.js +2 -0
- package/dist/nile-title/nile-title.cjs.js.map +1 -0
- package/dist/nile-title/nile-title.css.cjs.js +2 -0
- package/dist/nile-title/nile-title.css.cjs.js.map +1 -0
- package/dist/nile-title/nile-title.css.esm.js +5 -0
- package/dist/nile-title/nile-title.esm.js +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-detail/index.d.ts +1 -0
- package/dist/src/nile-detail/index.js +2 -0
- package/dist/src/nile-detail/index.js.map +1 -0
- package/dist/src/nile-detail/nile-detail.css.d.ts +12 -0
- package/dist/src/nile-detail/nile-detail.css.js +105 -0
- package/dist/src/nile-detail/nile-detail.css.js.map +1 -0
- package/dist/src/nile-detail/nile-detail.d.ts +70 -0
- package/dist/src/nile-detail/nile-detail.js +225 -0
- package/dist/src/nile-detail/nile-detail.js.map +1 -0
- package/dist/src/nile-title/index.d.ts +1 -0
- package/dist/src/nile-title/index.js +2 -0
- package/dist/src/nile-title/index.js.map +1 -0
- package/dist/src/nile-title/nile-title.css.d.ts +12 -0
- package/dist/src/nile-title/nile-title.css.js +17 -0
- package/dist/src/nile-title/nile-title.css.js.map +1 -0
- package/dist/src/nile-title/nile-title.d.ts +42 -0
- package/dist/src/nile-title/nile-title.js +66 -0
- package/dist/src/nile-title/nile-title.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/src/index.ts +3 -1
- package/src/nile-detail/index.ts +1 -0
- package/src/nile-detail/nile-detail.css.ts +107 -0
- package/src/nile-detail/nile-detail.ts +236 -0
- package/src/nile-title/index.ts +1 -0
- package/src/nile-title/nile-title.css.ts +19 -0
- package/src/nile-title/nile-title.ts +69 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
import{__decorate as i}from"tslib";import{x as t}from"../index-0a3007c5.esm.js";import{s}from"./nile-detail.css.esm.js";import{N as e}from"../internal/nile-element.esm.js";import{s as a,a as o,b as r}from"../internal/animate.esm.js";import{classMap as n}from"lit/directives/class-map.js";import{query as l,customElement as h}from"lit/decorators.js";import{s as d,g as m}from"../utilities/animation-registry.esm.js";import{w as c}from"../internal/event.esm.js";import{w as p}from"../internal/watch.esm.js";import{n as f}from"../property-09139d3c.esm.js";import"lit";let y=class extends e{constructor(){super(...arguments),this.open=!1,this.disabled=!1}firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0"}handleSummaryClick(){this.disabled||(this.open?this.hide():this.show(),this.header.focus())}handleSummaryKeyDown(i){"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==i.key&&"ArrowLeft"!==i.key||(i.preventDefault(),this.hide()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(i.preventDefault(),this.show())}async handleOpenChange(){if(this.open){if(this.emit("nile-show",{cancelable:!0}).defaultPrevented)return void(this.open=!1);await a(this.body),this.body.hidden=!1;const{keyframes:i,options:t}=m(this,"details.show",{dir:"ltr"});await o(this.body,r(i,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("nile-after-show")}else{if(this.emit("nile-hide",{cancelable:!0}).defaultPrevented)return void(this.open=!0);await a(this.body);const{keyframes:i,options:t}=m(this,"details.hide",{dir:"ltr"});await o(this.body,r(i,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("nile-after-hide")}}async show(){if(!this.open&&!this.disabled)return this.open=!0,c(this,"nile-after-show")}async hide(){if(this.open&&!this.disabled)return this.open=!1,c(this,"nile-after-hide")}render(){return t`
|
2
|
+
<div
|
3
|
+
part="base"
|
4
|
+
class=${n({details:!0,"details--open":this.open,"details--disabled":this.disabled,"details--rtl":!1})}
|
5
|
+
>
|
6
|
+
<div
|
7
|
+
part="header"
|
8
|
+
id="header"
|
9
|
+
class="details__header"
|
10
|
+
role="button"
|
11
|
+
aria-expanded=${this.open?"true":"false"}
|
12
|
+
aria-controls="content"
|
13
|
+
aria-disabled=${this.disabled?"true":"false"}
|
14
|
+
tabindex=${this.disabled?"-1":"0"}
|
15
|
+
@click=${this.handleSummaryClick}
|
16
|
+
@keydown=${this.handleSummaryKeyDown}
|
17
|
+
>
|
18
|
+
<slot name="summary" part="summary" class="details__summary">${this.summary}</slot>
|
19
|
+
|
20
|
+
<span part="summary-icon" class="details__summary-icon">
|
21
|
+
<slot name="expand-icon">
|
22
|
+
<nile-icon name="arrowright"></nile-icon>
|
23
|
+
</slot>
|
24
|
+
<slot name="collapse-icon">
|
25
|
+
<nile-icon name="arrowright"></nile-icon>
|
26
|
+
</slot>
|
27
|
+
</span>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="details__body" role="region" aria-labelledby="header">
|
31
|
+
<slot part="content" id="content" class="details__content"></slot>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
`}};y.styles=s,i([l(".details")],y.prototype,"details",void 0),i([l(".details__header")],y.prototype,"header",void 0),i([l(".details__body")],y.prototype,"body",void 0),i([l(".details__expand-icon-slot")],y.prototype,"expandIconSlot",void 0),i([f({type:Boolean,reflect:!0})],y.prototype,"open",void 0),i([f()],y.prototype,"summary",void 0),i([f({type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),i([p("open",{waitUntilFirstUpdate:!0})],y.prototype,"handleOpenChange",null),y=i([h("nile-accordion")],y),d("details.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}}),d("details.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}});export{y as N};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["./nile-title.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-title.css.cjs.js","../internal/nile-element.cjs.js","lit","../property-217fe924.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileTitleCjsJs){_export("NileTitle",_nileTitleCjsJs.N);},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileTitleCssCjsJs){},function(_internalNileElementCjsJs){},function(_lit){},function(_property002CjsJs){}],execute:function execute(){}};});
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
export{N as NileTitle}from"./nile-title.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"./nile-title.css.esm.js";import"../internal/nile-element.esm.js";import"lit";import"../property-09139d3c.esm.js";
|
@@ -0,0 +1,2 @@
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-title.css.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var t,e,s,r,i,o,_templateObject,_templateObject2,p;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){e=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.customElement;},function(_nileTitleCssCjsJs){r=_nileTitleCssCjsJs.s;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;},function(_property002CjsJs){o=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",p=/*#__PURE__*/function(_i){function p(){var _this;_classCallCheck(this,p);_this=_callSuper(this,p,arguments),_this.headerText="",_this.pageTitle="";return _this;}_inherits(p,_i);return _createClass(p,[{key:"updated",value:function updated(t){_get(_getPrototypeOf(p.prototype),"updated",this).call(this,t),this.updateDocumentTitle();}},{key:"updateDocumentTitle",value:function updateDocumentTitle(){document.title=this.pageTitle||this.headerText;}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral([" "," "])),this.headerText?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" "," "])),this.headerText):"");}}],[{key:"styles",get:function get(){return[r];}}]);}(i));t([o({type:String})],p.prototype,"headerText",void 0),t([o({type:String})],p.prototype,"pageTitle",void 0),_export("N",p=t([s("nile-title")],p));}};});
|
2
|
+
//# sourceMappingURL=nile-title.cjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nile-title.cjs.js","sources":["../../../src/nile-title/nile-title.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-title.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile title component.\n *\n * @tag nile-title\n *\n */\n@customElement('nile-title')\nexport class NileTitle extends NileElement {\n @property({ type: String }) headerText = '';\n\n @property({ type: String }) pageTitle = '';\n\n /**\n * The styles for nile-title\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Called when the component is updated\n */\n protected updated(_changedProperties: Map<string | number | symbol, unknown>): void {\n super.updated(_changedProperties);\n this.updateDocumentTitle();\n }\n\n /**\n * Updates the document title based on pageTitle or headerText\n */\n private updateDocumentTitle(): void {\n document.title = this.pageTitle || this.headerText;\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html` ${this.headerText ? html` ${this.headerText} ` : ''} `;\n }\n\n /* #endregion */\n}\n\nexport default NileTitle;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-title': NileTitle;\n }\n}\n"],"names":["NileTitle","_i","p","constructor","this","headerText","pageTitle","_this","_inherits","_createClass","key","value","updated","_changedProperties","super","updateDocumentTitle","document","title","render","html","_templateObject","_taggedTemplateLiteral","_templateObject2","get","styles","NileElement","__decorate","property","type","String","prototype","customElement"],"m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AAc,eACF/B"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var s,_templateObject,o;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){s=_index001CjsJs.i;}],execute:function execute(){_export("s",o=s(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t:host {\n font: 500 20px / 30px var(--nile-font-family-sans-serif);\n\t}\n"]))));}};});
|
2
|
+
//# sourceMappingURL=nile-title.css.cjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nile-title.css.cjs.js","sources":["../../../src/nile-title/nile-title.css.ts"],"sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit-element';\n\n/**\n * Title CSS\n */\nexport const styles = css`\n\t:host {\n font: 500 20px / 30px var(--nile-font-family-sans-serif);\n\t}\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{__decorate as t}from"tslib";import{x as e}from"../index-0a3007c5.esm.js";import{customElement as s}from"lit/decorators.js";import{s as r}from"./nile-title.css.esm.js";import{N as i}from"../internal/nile-element.esm.js";import{n as o}from"../property-09139d3c.esm.js";import"lit";let m=class extends i{constructor(){super(...arguments),this.headerText="",this.pageTitle=""}static get styles(){return[r]}updated(t){super.updated(t),this.updateDocumentTitle()}updateDocumentTitle(){document.title=this.pageTitle||this.headerText}render(){return e` ${this.headerText?e` ${this.headerText} `:""} `}};t([o({type:String})],m.prototype,"headerText",void 0),t([o({type:String})],m.prototype,"pageTitle",void 0),m=t([s("nile-title")],m);export{m as N};
|
package/dist/src/index.d.ts
CHANGED
@@ -69,4 +69,6 @@ export { NileTree } from './nile-tree';
|
|
69
69
|
export { NileTreeItem } from './nile-tree-item';
|
70
70
|
export { NileListItem } from './nile-list-item';
|
71
71
|
export { NileList } from './nile-list';
|
72
|
+
export { NileDetail } from './nile-detail';
|
72
73
|
export { NileDivider } from './nile-divider';
|
74
|
+
export { NileTitle } from './nile-title';
|
package/dist/src/index.js
CHANGED
@@ -69,5 +69,7 @@ export { NileTree } from './nile-tree';
|
|
69
69
|
export { NileTreeItem } from './nile-tree-item';
|
70
70
|
export { NileListItem } from './nile-list-item';
|
71
71
|
export { NileList } from './nile-list';
|
72
|
+
export { NileDetail } from './nile-detail';
|
72
73
|
export { NileDivider } from './nile-divider';
|
74
|
+
export { NileTitle } from './nile-title';
|
73
75
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,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,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileSidebar } from './nile-sidebar';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSelect } from './nile-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\nexport { NileCalendar } from './nile-calendar';\nexport { NileLink } from './nile-link';\nexport { NileButtonToggleGroup } from './nile-button-toggle-group';\nexport { NileButtonToggle } from './nile-button-toggle';\nexport { NileSwitcher } from './nile-switcher';\nexport { NileContentEditor } from './nile-content-editor';\nexport { NileDialog } from './nile-dialog';\nexport { NileErrorNotification } from './nile-error-notification';\nexport { NileTabGroup } from './nile-tab-group';\nexport { NileTab } from './nile-tab';\nexport { NileTabPanel } from './nile-tab-panel';\nexport { NileCodeEditor } from './nile-code-editor';\nexport { NileToast } from './nile-toast';\nexport { NileBreadcrumb } from './nile-breadcrumb';\nexport { NileBreadcrumbItem } from './nile-breadcrumb-item';\nexport { NileFormGroup } from './nile-form-group';\nexport { NileCard } from './nile-card';\nexport { NilePopover } from './nile-popover';\nexport { NileButtonFilter } from './nile-button-filter';\nexport { NileCircularProgressbar } from './nile-circular-progressbar';\nexport { NileSidebarMenu } from './nile-sidebar-menu';\nexport { NileSidebarMenuItems } from './nile-sidebar-menu-items';\nexport { NileSidebarWrapper } from './nile-sidebar-wrapper';\nexport { NileTableCellItem } from './nile-table-cell-item';\nexport { NileTableRow } from './nile-table-row';\nexport { NileTableBody } from './nile-table-body';\nexport { NileTableHeaderItem } from './nile-table-header-item';\nexport { NileAvatar } from './nile-avatar';\nexport { NilePageHeader } from './nile-page-header';\nexport { NileEmptyState } from './nile-empty-state';\nexport { NileHero } from './nile-hero';\nexport { NileStepperItem } from './nile-stepper-item';\nexport { NileStepper } from './nile-stepper';\nexport { NileHeroHeader } from './nile-hero-header';\nexport { NileVerticalStepperItem } from './nile-vertical-stepper-item';\nexport { NileFormatDate } from './nile-format-date';\nexport { NileSplitPanel } from './nile-split-panel';\nexport { NileTree } from './nile-tree';\nexport { NileTreeItem } from './nile-tree-item';\nexport { NileListItem } from './nile-list-item';\nexport { NileList } from './nile-list';\nexport { NileDivider } from './nile-divider'
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAA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M,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileSidebar } from './nile-sidebar';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSelect } from './nile-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\nexport { NileCalendar } from './nile-calendar';\nexport { NileLink } from './nile-link';\nexport { NileButtonToggleGroup } from './nile-button-toggle-group';\nexport { NileButtonToggle } from './nile-button-toggle';\nexport { NileSwitcher } from './nile-switcher';\nexport { NileContentEditor } from './nile-content-editor';\nexport { NileDialog } from './nile-dialog';\nexport { NileErrorNotification } from './nile-error-notification';\nexport { NileTabGroup } from './nile-tab-group';\nexport { NileTab } from './nile-tab';\nexport { NileTabPanel } from './nile-tab-panel';\nexport { NileCodeEditor } from './nile-code-editor';\nexport { NileToast } from './nile-toast';\nexport { NileBreadcrumb } from './nile-breadcrumb';\nexport { NileBreadcrumbItem } from './nile-breadcrumb-item';\nexport { NileFormGroup } from './nile-form-group';\nexport { NileCard } from './nile-card';\nexport { NilePopover } from './nile-popover';\nexport { NileButtonFilter } from './nile-button-filter';\nexport { NileCircularProgressbar } from './nile-circular-progressbar';\nexport { NileSidebarMenu } from './nile-sidebar-menu';\nexport { NileSidebarMenuItems } from './nile-sidebar-menu-items';\nexport { NileSidebarWrapper } from './nile-sidebar-wrapper';\nexport { NileTableCellItem } from './nile-table-cell-item';\nexport { NileTableRow } from './nile-table-row';\nexport { NileTableBody } from './nile-table-body';\nexport { NileTableHeaderItem } from './nile-table-header-item';\nexport { NileAvatar } from './nile-avatar';\nexport { NilePageHeader } from './nile-page-header';\nexport { NileEmptyState } from './nile-empty-state';\nexport { NileHero } from './nile-hero';\nexport { NileStepperItem } from './nile-stepper-item';\nexport { NileStepper } from './nile-stepper';\nexport { NileHeroHeader } from './nile-hero-header';\nexport { NileVerticalStepperItem } from './nile-vertical-stepper-item';\nexport { NileFormatDate } from './nile-format-date';\nexport { NileSplitPanel } from './nile-split-panel';\nexport { NileTree } from './nile-tree';\nexport { NileTreeItem } from './nile-tree-item';\nexport { NileListItem } from './nile-list-item';\nexport { NileList } from './nile-list';\nexport { NileDetail } from './nile-detail';\nexport { NileDivider } from './nile-divider';\nexport { NileTitle } from './nile-title';\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { NileDetail } from './nile-detail';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-detail/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { NileDetail } from './nile-detail';\n"]}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Detail CSS
|
9
|
+
*/
|
10
|
+
export declare const styles: import("lit-element").CSSResult;
|
11
|
+
declare const _default: import("lit-element").CSSResult[];
|
12
|
+
export default _default;
|
@@ -0,0 +1,105 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import { css } from 'lit-element';
|
8
|
+
/**
|
9
|
+
* Detail CSS
|
10
|
+
*/
|
11
|
+
export const styles = css `
|
12
|
+
|
13
|
+
:host {
|
14
|
+
box-sizing: border-box;
|
15
|
+
}
|
16
|
+
|
17
|
+
:host *,
|
18
|
+
:host *::before,
|
19
|
+
:host *::after {
|
20
|
+
box-sizing: inherit;
|
21
|
+
}
|
22
|
+
|
23
|
+
[hidden] {
|
24
|
+
display: none !important;
|
25
|
+
}
|
26
|
+
|
27
|
+
:host {
|
28
|
+
display: block;
|
29
|
+
}
|
30
|
+
|
31
|
+
.details {
|
32
|
+
border: solid 1px hsl(240 5.9% 90%);
|
33
|
+
border-radius: 0.25rem;
|
34
|
+
background-color: #FFFFFF;
|
35
|
+
overflow-anchor: none;
|
36
|
+
}
|
37
|
+
|
38
|
+
.details--disabled {
|
39
|
+
opacity: 0.5;
|
40
|
+
}
|
41
|
+
|
42
|
+
.details__header {
|
43
|
+
display: flex;
|
44
|
+
align-items: center;
|
45
|
+
border-radius: inherit;
|
46
|
+
padding: 1rem;
|
47
|
+
user-select: none;
|
48
|
+
cursor: pointer;
|
49
|
+
}
|
50
|
+
|
51
|
+
.details__header:focus {
|
52
|
+
outline: none;
|
53
|
+
}
|
54
|
+
|
55
|
+
.details__header:focus-visible {
|
56
|
+
outline: solid 3px hsl(200.4, 98%, 39.4%);
|
57
|
+
outline-offset: calc(1px + 1px);
|
58
|
+
}
|
59
|
+
|
60
|
+
.details--disabled .details__header {
|
61
|
+
cursor: not-allowed;
|
62
|
+
}
|
63
|
+
|
64
|
+
.details--disabled .details__header:focus-visible {
|
65
|
+
outline: none;
|
66
|
+
box-shadow: none;
|
67
|
+
}
|
68
|
+
|
69
|
+
.details__summary {
|
70
|
+
flex: 1 1 auto;
|
71
|
+
display: flex;
|
72
|
+
align-items: center;
|
73
|
+
}
|
74
|
+
|
75
|
+
.details__summary-icon {
|
76
|
+
flex: 0 0 auto;
|
77
|
+
display: flex;
|
78
|
+
align-items: center;
|
79
|
+
transition: 250ms rotate ease;
|
80
|
+
}
|
81
|
+
|
82
|
+
.details--open .details__summary-icon {
|
83
|
+
rotate: 90deg;
|
84
|
+
}
|
85
|
+
|
86
|
+
.details--open.details--rtl .details__summary-icon {
|
87
|
+
rotate: -90deg;
|
88
|
+
}
|
89
|
+
|
90
|
+
.details--open slot[name='expand-icon'],
|
91
|
+
.details:not(.details--open) slot[name='collapse-icon'] {
|
92
|
+
display: none;
|
93
|
+
}
|
94
|
+
|
95
|
+
.details__body {
|
96
|
+
overflow: hidden;
|
97
|
+
}
|
98
|
+
|
99
|
+
.details__content {
|
100
|
+
display: block;
|
101
|
+
padding: 1rem;
|
102
|
+
}
|
103
|
+
`;
|
104
|
+
export default [styles];
|
105
|
+
//# sourceMappingURL=nile-detail.css.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nile-detail.css.js","sourceRoot":"","sources":["../../../src/nile-detail/nile-detail.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit-element';\n\n/**\n * Detail CSS\n */\nexport const styles = css`\n\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n display: block;\n }\n\n .details {\n border: solid 1px hsl(240 5.9% 90%);\n border-radius: 0.25rem;\n background-color: #FFFFFF;\n overflow-anchor: none;\n }\n\n .details--disabled {\n opacity: 0.5;\n }\n\n .details__header {\n display: flex;\n align-items: center;\n border-radius: inherit;\n padding: 1rem;\n user-select: none;\n cursor: pointer;\n }\n\n .details__header:focus {\n outline: none;\n }\n\n .details__header:focus-visible {\n outline: solid 3px hsl(200.4, 98%, 39.4%);\n outline-offset: calc(1px + 1px);\n }\n\n .details--disabled .details__header {\n cursor: not-allowed;\n }\n\n .details--disabled .details__header:focus-visible {\n outline: none;\n box-shadow: none;\n }\n\n .details__summary {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n }\n\n .details__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n }\n\n .details--open .details__summary-icon {\n rotate: 90deg;\n }\n\n .details--open.details--rtl .details__summary-icon {\n rotate: -90deg;\n }\n\n .details--open slot[name='expand-icon'],\n .details:not(.details--open) slot[name='collapse-icon'] {\n display: none;\n }\n\n .details__body {\n overflow: hidden;\n }\n\n .details__content {\n display: block;\n padding: 1rem;\n }\n`;\n\nexport default [styles];\n"]}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import { TemplateResult } from 'lit-element';
|
8
|
+
import NileElement from '../internal/nile-element';
|
9
|
+
import type { CSSResultGroup } from 'lit';
|
10
|
+
/**
|
11
|
+
* Nile detail component.
|
12
|
+
*
|
13
|
+
* @tag nile-accordion
|
14
|
+
*
|
15
|
+
*/
|
16
|
+
export declare class NileDetail extends NileElement {
|
17
|
+
/**
|
18
|
+
* @summary Details show a brief summary and expand to show additional content.
|
19
|
+
*
|
20
|
+
* @dependency nile-icon
|
21
|
+
*
|
22
|
+
* @slot - The details' main content.
|
23
|
+
* @slot summary - The details' summary. Alternatively, you can use the `summary` attribute.
|
24
|
+
* @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<nile-icon>`.
|
25
|
+
* @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<nile-icon>`.
|
26
|
+
*
|
27
|
+
* @event nile-show - Emitted when the details opens.
|
28
|
+
* @event nile-after-show - Emitted after the details opens and all animations are complete.
|
29
|
+
* @event nile-hide - Emitted when the details closes.
|
30
|
+
* @event nile-after-hide - Emitted after the details closes and all animations are complete.
|
31
|
+
*
|
32
|
+
* @csspart base - The component's base wrapper.
|
33
|
+
* @csspart header - The header that wraps both the summary and the expand/collapse icon.
|
34
|
+
* @csspart summary - The container that wraps the summary.
|
35
|
+
* @csspart summary-icon - The container that wraps the expand/collapse icons.
|
36
|
+
* @csspart content - The details content.
|
37
|
+
*
|
38
|
+
* @animation details.show - The animation to use when showing details. You can use `height: auto` with this animation.
|
39
|
+
* @animation details.hide - The animation to use when hiding details. You can use `height: auto` with this animation.
|
40
|
+
*/
|
41
|
+
static styles: CSSResultGroup;
|
42
|
+
details: HTMLElement;
|
43
|
+
header: HTMLElement;
|
44
|
+
body: HTMLElement;
|
45
|
+
expandIconSlot: HTMLSlotElement;
|
46
|
+
/**
|
47
|
+
* Indicates whether or not the details is open. You can toggle this attribute to show and hide the details, or you
|
48
|
+
* can use the `show()` and `hide()` methods and this attribute will reflect the details' open state.
|
49
|
+
*/
|
50
|
+
open: boolean;
|
51
|
+
/** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */
|
52
|
+
summary: string;
|
53
|
+
/** Disables the details so it can't be toggled. */
|
54
|
+
disabled: boolean;
|
55
|
+
firstUpdated(): void;
|
56
|
+
private handleSummaryClick;
|
57
|
+
private handleSummaryKeyDown;
|
58
|
+
handleOpenChange(): Promise<void>;
|
59
|
+
/** Shows the details. */
|
60
|
+
show(): Promise<void>;
|
61
|
+
/** Hides the details */
|
62
|
+
hide(): Promise<void>;
|
63
|
+
render(): TemplateResult<1>;
|
64
|
+
}
|
65
|
+
export default NileDetail;
|
66
|
+
declare global {
|
67
|
+
interface HTMLElementTagNameMap {
|
68
|
+
'nile-accordion': NileDetail;
|
69
|
+
}
|
70
|
+
}
|
@@ -0,0 +1,225 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import { __decorate } from "tslib";
|
8
|
+
import { html, property } from 'lit-element';
|
9
|
+
import { styles } from './nile-detail.css';
|
10
|
+
import NileElement from '../internal/nile-element';
|
11
|
+
import { animateTo, shimKeyframesHeightAuto, stopAnimations } from '../internal/animate';
|
12
|
+
import { classMap } from 'lit/directives/class-map.js';
|
13
|
+
import { customElement, query } from 'lit/decorators.js';
|
14
|
+
import { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';
|
15
|
+
import { waitForEvent } from '../internal/event';
|
16
|
+
import { watch } from '../internal/watch';
|
17
|
+
/**
|
18
|
+
* Nile detail component.
|
19
|
+
*
|
20
|
+
* @tag nile-accordion
|
21
|
+
*
|
22
|
+
*/
|
23
|
+
let NileDetail = class NileDetail extends NileElement {
|
24
|
+
constructor() {
|
25
|
+
/**
|
26
|
+
* @summary Details show a brief summary and expand to show additional content.
|
27
|
+
*
|
28
|
+
* @dependency nile-icon
|
29
|
+
*
|
30
|
+
* @slot - The details' main content.
|
31
|
+
* @slot summary - The details' summary. Alternatively, you can use the `summary` attribute.
|
32
|
+
* @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<nile-icon>`.
|
33
|
+
* @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<nile-icon>`.
|
34
|
+
*
|
35
|
+
* @event nile-show - Emitted when the details opens.
|
36
|
+
* @event nile-after-show - Emitted after the details opens and all animations are complete.
|
37
|
+
* @event nile-hide - Emitted when the details closes.
|
38
|
+
* @event nile-after-hide - Emitted after the details closes and all animations are complete.
|
39
|
+
*
|
40
|
+
* @csspart base - The component's base wrapper.
|
41
|
+
* @csspart header - The header that wraps both the summary and the expand/collapse icon.
|
42
|
+
* @csspart summary - The container that wraps the summary.
|
43
|
+
* @csspart summary-icon - The container that wraps the expand/collapse icons.
|
44
|
+
* @csspart content - The details content.
|
45
|
+
*
|
46
|
+
* @animation details.show - The animation to use when showing details. You can use `height: auto` with this animation.
|
47
|
+
* @animation details.hide - The animation to use when hiding details. You can use `height: auto` with this animation.
|
48
|
+
*/
|
49
|
+
super(...arguments);
|
50
|
+
/**
|
51
|
+
* Indicates whether or not the details is open. You can toggle this attribute to show and hide the details, or you
|
52
|
+
* can use the `show()` and `hide()` methods and this attribute will reflect the details' open state.
|
53
|
+
*/
|
54
|
+
this.open = false;
|
55
|
+
/** Disables the details so it can't be toggled. */
|
56
|
+
this.disabled = false;
|
57
|
+
}
|
58
|
+
firstUpdated() {
|
59
|
+
this.body.hidden = !this.open;
|
60
|
+
this.body.style.height = this.open ? 'auto' : '0';
|
61
|
+
}
|
62
|
+
handleSummaryClick() {
|
63
|
+
if (!this.disabled) {
|
64
|
+
if (this.open) {
|
65
|
+
this.hide();
|
66
|
+
}
|
67
|
+
else {
|
68
|
+
this.show();
|
69
|
+
}
|
70
|
+
this.header.focus();
|
71
|
+
}
|
72
|
+
}
|
73
|
+
handleSummaryKeyDown(event) {
|
74
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
75
|
+
event.preventDefault();
|
76
|
+
if (this.open) {
|
77
|
+
this.hide();
|
78
|
+
}
|
79
|
+
else {
|
80
|
+
this.show();
|
81
|
+
}
|
82
|
+
}
|
83
|
+
if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {
|
84
|
+
event.preventDefault();
|
85
|
+
this.hide();
|
86
|
+
}
|
87
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {
|
88
|
+
event.preventDefault();
|
89
|
+
this.show();
|
90
|
+
}
|
91
|
+
}
|
92
|
+
async handleOpenChange() {
|
93
|
+
if (this.open) {
|
94
|
+
// Show
|
95
|
+
const nileShow = this.emit('nile-show', { cancelable: true });
|
96
|
+
if (nileShow.defaultPrevented) {
|
97
|
+
this.open = false;
|
98
|
+
return;
|
99
|
+
}
|
100
|
+
await stopAnimations(this.body);
|
101
|
+
this.body.hidden = false;
|
102
|
+
const { keyframes, options } = getAnimation(this, 'details.show', { dir: 'ltr' });
|
103
|
+
await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);
|
104
|
+
this.body.style.height = 'auto';
|
105
|
+
this.emit('nile-after-show');
|
106
|
+
}
|
107
|
+
else {
|
108
|
+
// Hide
|
109
|
+
const nileHide = this.emit('nile-hide', { cancelable: true });
|
110
|
+
if (nileHide.defaultPrevented) {
|
111
|
+
this.open = true;
|
112
|
+
return;
|
113
|
+
}
|
114
|
+
await stopAnimations(this.body);
|
115
|
+
const { keyframes, options } = getAnimation(this, 'details.hide', { dir: 'ltr' });
|
116
|
+
await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);
|
117
|
+
this.body.hidden = true;
|
118
|
+
this.body.style.height = 'auto';
|
119
|
+
this.emit('nile-after-hide');
|
120
|
+
}
|
121
|
+
}
|
122
|
+
/** Shows the details. */
|
123
|
+
async show() {
|
124
|
+
if (this.open || this.disabled) {
|
125
|
+
return undefined;
|
126
|
+
}
|
127
|
+
this.open = true;
|
128
|
+
return waitForEvent(this, 'nile-after-show');
|
129
|
+
}
|
130
|
+
/** Hides the details */
|
131
|
+
async hide() {
|
132
|
+
if (!this.open || this.disabled) {
|
133
|
+
return undefined;
|
134
|
+
}
|
135
|
+
this.open = false;
|
136
|
+
return waitForEvent(this, 'nile-after-hide');
|
137
|
+
}
|
138
|
+
render() {
|
139
|
+
const isRtl = false;
|
140
|
+
return html `
|
141
|
+
<div
|
142
|
+
part="base"
|
143
|
+
class=${classMap({
|
144
|
+
details: true,
|
145
|
+
'details--open': this.open,
|
146
|
+
'details--disabled': this.disabled,
|
147
|
+
'details--rtl': isRtl
|
148
|
+
})}
|
149
|
+
>
|
150
|
+
<div
|
151
|
+
part="header"
|
152
|
+
id="header"
|
153
|
+
class="details__header"
|
154
|
+
role="button"
|
155
|
+
aria-expanded=${this.open ? 'true' : 'false'}
|
156
|
+
aria-controls="content"
|
157
|
+
aria-disabled=${this.disabled ? 'true' : 'false'}
|
158
|
+
tabindex=${this.disabled ? '-1' : '0'}
|
159
|
+
@click=${this.handleSummaryClick}
|
160
|
+
@keydown=${this.handleSummaryKeyDown}
|
161
|
+
>
|
162
|
+
<slot name="summary" part="summary" class="details__summary">${this.summary}</slot>
|
163
|
+
|
164
|
+
<span part="summary-icon" class="details__summary-icon">
|
165
|
+
<slot name="expand-icon">
|
166
|
+
<nile-icon name="arrowright"></nile-icon>
|
167
|
+
</slot>
|
168
|
+
<slot name="collapse-icon">
|
169
|
+
<nile-icon name="arrowright"></nile-icon>
|
170
|
+
</slot>
|
171
|
+
</span>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div class="details__body" role="region" aria-labelledby="header">
|
175
|
+
<slot part="content" id="content" class="details__content"></slot>
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
`;
|
179
|
+
}
|
180
|
+
};
|
181
|
+
NileDetail.styles = styles;
|
182
|
+
__decorate([
|
183
|
+
query('.details')
|
184
|
+
], NileDetail.prototype, "details", void 0);
|
185
|
+
__decorate([
|
186
|
+
query('.details__header')
|
187
|
+
], NileDetail.prototype, "header", void 0);
|
188
|
+
__decorate([
|
189
|
+
query('.details__body')
|
190
|
+
], NileDetail.prototype, "body", void 0);
|
191
|
+
__decorate([
|
192
|
+
query('.details__expand-icon-slot')
|
193
|
+
], NileDetail.prototype, "expandIconSlot", void 0);
|
194
|
+
__decorate([
|
195
|
+
property({ type: Boolean, reflect: true })
|
196
|
+
], NileDetail.prototype, "open", void 0);
|
197
|
+
__decorate([
|
198
|
+
property()
|
199
|
+
], NileDetail.prototype, "summary", void 0);
|
200
|
+
__decorate([
|
201
|
+
property({ type: Boolean, reflect: true })
|
202
|
+
], NileDetail.prototype, "disabled", void 0);
|
203
|
+
__decorate([
|
204
|
+
watch('open', { waitUntilFirstUpdate: true })
|
205
|
+
], NileDetail.prototype, "handleOpenChange", null);
|
206
|
+
NileDetail = __decorate([
|
207
|
+
customElement('nile-accordion')
|
208
|
+
], NileDetail);
|
209
|
+
export { NileDetail };
|
210
|
+
setDefaultAnimation('details.show', {
|
211
|
+
keyframes: [
|
212
|
+
{ height: '0', opacity: '0' },
|
213
|
+
{ height: 'auto', opacity: '1' }
|
214
|
+
],
|
215
|
+
options: { duration: 250, easing: 'linear' }
|
216
|
+
});
|
217
|
+
setDefaultAnimation('details.hide', {
|
218
|
+
keyframes: [
|
219
|
+
{ height: 'auto', opacity: '1' },
|
220
|
+
{ height: '0', opacity: '0' }
|
221
|
+
],
|
222
|
+
options: { duration: 250, easing: 'linear' }
|
223
|
+
});
|
224
|
+
export default NileDetail;
|
225
|
+
//# sourceMappingURL=nile-detail.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nile-detail.js","sourceRoot":"","sources":["../../../src/nile-detail/nile-detail.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAE,QAAQ,EAAiC,MAAM,aAAa,CAAC;AACvF,OAAO,EAAC,MAAM,EA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,mBAAmB,CAAC,cAAc,EAAE;IACpC,SAAS,EAAE;QACT,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;QAC7B,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;KACjC;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,mBAAmB,CAAC,cAAc,EAAE;IACpC,SAAS,EAAE;QACT,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;QAChC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;KAC9B;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport {styles} from './nile-detail.css';\nimport NileElement from '../internal/nile-element';\nimport { animateTo, shimKeyframesHeightAuto, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile detail component.\n *\n * @tag nile-accordion\n *\n */\n@customElement('nile-accordion')\nexport class NileDetail extends NileElement {\n\n/**\n * @summary Details show a brief summary and expand to show additional content.\n *\n * @dependency nile-icon\n *\n * @slot - The details' main content.\n * @slot summary - The details' summary. Alternatively, you can use the `summary` attribute.\n * @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<nile-icon>`.\n * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<nile-icon>`.\n *\n * @event nile-show - Emitted when the details opens.\n * @event nile-after-show - Emitted after the details opens and all animations are complete.\n * @event nile-hide - Emitted when the details closes.\n * @event nile-after-hide - Emitted after the details closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart header - The header that wraps both the summary and the expand/collapse icon.\n * @csspart summary - The container that wraps the summary.\n * @csspart summary-icon - The container that wraps the expand/collapse icons.\n * @csspart content - The details content.\n *\n * @animation details.show - The animation to use when showing details. You can use `height: auto` with this animation.\n * @animation details.hide - The animation to use when hiding details. You can use `height: auto` with this animation.\n */\n\nstatic styles: CSSResultGroup = styles;\n\n\n@query('.details') details: HTMLElement;\n@query('.details__header') header: HTMLElement;\n@query('.details__body') body: HTMLElement;\n@query('.details__expand-icon-slot') expandIconSlot: HTMLSlotElement;\n\n/**\n * Indicates whether or not the details is open. You can toggle this attribute to show and hide the details, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the details' open state.\n */\n@property({ type: Boolean, reflect: true }) open = false;\n\n/** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */\n@property() summary: string;\n\n/** Disables the details so it can't be toggled. */\n@property({ type: Boolean, reflect: true }) disabled = false;\n\nfirstUpdated() {\n this.body.hidden = !this.open;\n this.body.style.height = this.open ? 'auto' : '0';\n}\n\nprivate handleSummaryClick() {\n if (!this.disabled) {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n\n this.header.focus();\n }\n}\n\nprivate handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n}\n\n@watch('open', { waitUntilFirstUpdate: true })\nasync handleOpenChange() {\n if (this.open) {\n // Show\n const nileShow = this.emit('nile-show', { cancelable: true });\n if (nileShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n await stopAnimations(this.body);\n this.body.hidden = false;\n\n const { keyframes, options } = getAnimation(this, 'details.show', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = 'auto';\n\n this.emit('nile-after-show');\n } else {\n // Hide\n const nileHide = this.emit('nile-hide', { cancelable: true });\n if (nileHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n await stopAnimations(this.body);\n\n const { keyframes, options } = getAnimation(this, 'details.hide', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.hidden = true;\n this.body.style.height = 'auto';\n\n this.emit('nile-after-hide');\n }\n}\n\n/** Shows the details. */\nasync show() {\n if (this.open || this.disabled) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n}\n\n/** Hides the details */\nasync hide() {\n if (!this.open || this.disabled) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n}\n\nrender() {\n const isRtl = false;\n\n return html`\n <div\n part=\"base\"\n class=${classMap({\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n 'details--rtl': isRtl\n })}\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"details__header\"\n role=\"button\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-controls=\"content\"\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"summary\" part=\"summary\" class=\"details__summary\">${this.summary}</slot>\n\n <span part=\"summary-icon\" class=\"details__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"details__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" class=\"details__content\"></slot>\n </div>\n </div>\n `;\n}\n}\n\nsetDefaultAnimation('details.show', {\nkeyframes: [\n { height: '0', opacity: '0' },\n { height: 'auto', opacity: '1' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nsetDefaultAnimation('details.hide', {\nkeyframes: [\n { height: 'auto', opacity: '1' },\n { height: '0', opacity: '0' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nexport default NileDetail;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-accordion': NileDetail;\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { NileTitle } from './nile-title';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-title/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { NileTitle } from './nile-title';"]}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Title CSS
|
9
|
+
*/
|
10
|
+
export declare const styles: import("lit-element").CSSResult;
|
11
|
+
declare const _default: import("lit-element").CSSResult[];
|
12
|
+
export default _default;
|