@dnncommunity/dnn-elements 0.14.0-beta.2 → 0.14.0-beta.6
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/cjs/dnn-button.cjs.entry.js +1 -1
- package/dist/cjs/dnn-button.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-button_16.cjs.entry.js +33 -30
- package/dist/cjs/dnn-button_16.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/dnn-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-chevron.cjs.entry.js +1 -1
- package/dist/cjs/dnn-chevron.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-collapsible.cjs.entry.js +1 -1
- package/dist/cjs/dnn-collapsible.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-color-picker.cjs.entry.js +1 -1
- package/dist/cjs/dnn-color-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-dropzone.cjs.entry.js +1 -1
- package/dist/cjs/dnn-dropzone.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-image-cropper.cjs.entry.js +1 -1
- package/dist/cjs/dnn-image-cropper.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-modal.cjs.entry.js +1 -1
- package/dist/cjs/dnn-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-searchbox.cjs.entry.js +1 -1
- package/dist/cjs/dnn-searchbox.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-tabs.cjs.entry.js +1 -1
- package/dist/cjs/dnn-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-toggle.cjs.entry.js +1 -1
- package/dist/cjs/dnn-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-treeview-item.cjs.entry.js +1 -1
- package/dist/cjs/dnn-treeview-item.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-vertical-overflow-menu.cjs.entry.js +14 -15
- package/dist/cjs/dnn-vertical-overflow-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn-vertical-splitview.cjs.entry.js +7 -3
- package/dist/cjs/dnn-vertical-splitview.cjs.entry.js.map +1 -1
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.css +4 -25
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js +14 -14
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js.map +1 -1
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.css +8 -1
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js +6 -2
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js.map +1 -1
- package/dist/dnn/app-globals-497eb362.system.js +2 -0
- package/dist/dnn/app-globals-497eb362.system.js.map +1 -0
- package/dist/dnn/css-shim-856c55de.system.js +2 -0
- package/dist/dnn/css-shim-856c55de.system.js.map +1 -0
- package/dist/dnn/debounce-eef81bf7.system.js +2 -0
- package/dist/dnn/debounce-eef81bf7.system.js.map +1 -0
- package/dist/dnn/dnn-button.entry.js +1 -1
- package/dist/dnn/dnn-button.entry.js.map +1 -1
- package/dist/dnn/dnn-button.system.entry.js +2 -0
- package/dist/dnn/dnn-button.system.entry.js.map +1 -0
- package/dist/dnn/dnn-checkbox.entry.js +1 -1
- package/dist/dnn/dnn-checkbox.entry.js.map +1 -1
- package/dist/dnn/dnn-checkbox.system.entry.js +2 -0
- package/dist/dnn/dnn-checkbox.system.entry.js.map +1 -0
- package/dist/dnn/dnn-chevron.entry.js +1 -1
- package/dist/dnn/dnn-chevron.entry.js.map +1 -1
- package/dist/dnn/dnn-chevron.system.entry.js +2 -0
- package/dist/dnn/dnn-chevron.system.entry.js.map +1 -0
- package/dist/dnn/dnn-collapsible.entry.js +1 -1
- package/dist/dnn/dnn-collapsible.entry.js.map +1 -1
- package/dist/dnn/dnn-collapsible.system.entry.js +2 -0
- package/dist/dnn/dnn-collapsible.system.entry.js.map +1 -0
- package/dist/dnn/dnn-color-picker.entry.js +1 -1
- package/dist/dnn/dnn-color-picker.entry.js.map +1 -1
- package/dist/dnn/dnn-color-picker.system.entry.js +12 -0
- package/dist/dnn/dnn-color-picker.system.entry.js.map +1 -0
- package/dist/dnn/dnn-dropzone.entry.js +1 -1
- package/dist/dnn/dnn-dropzone.entry.js.map +1 -1
- package/dist/dnn/dnn-dropzone.system.entry.js +2 -0
- package/dist/dnn/dnn-dropzone.system.entry.js.map +1 -0
- package/dist/dnn/dnn-image-cropper.entry.js +1 -1
- package/dist/dnn/dnn-image-cropper.entry.js.map +1 -1
- package/dist/dnn/dnn-image-cropper.system.entry.js +2 -0
- package/dist/dnn/dnn-image-cropper.system.entry.js.map +1 -0
- package/dist/dnn/dnn-modal.entry.js +1 -1
- package/dist/dnn/dnn-modal.entry.js.map +1 -1
- package/dist/dnn/dnn-modal.system.entry.js +2 -0
- package/dist/dnn/dnn-modal.system.entry.js.map +1 -0
- package/dist/dnn/dnn-searchbox.entry.js +1 -1
- package/dist/dnn/dnn-searchbox.entry.js.map +1 -1
- package/dist/dnn/dnn-searchbox.system.entry.js +2 -0
- package/dist/dnn/dnn-searchbox.system.entry.js.map +1 -0
- package/dist/dnn/dnn-sort-icon.system.entry.js +2 -0
- package/dist/dnn/dnn-sort-icon.system.entry.js.map +1 -0
- package/dist/dnn/dnn-tab.system.entry.js +2 -0
- package/dist/dnn/dnn-tab.system.entry.js.map +1 -0
- package/dist/dnn/dnn-tabs.entry.js +1 -1
- package/dist/dnn/dnn-tabs.entry.js.map +1 -1
- package/dist/dnn/dnn-tabs.system.entry.js +2 -0
- package/dist/dnn/dnn-tabs.system.entry.js.map +1 -0
- package/dist/dnn/dnn-toggle.entry.js +1 -1
- package/dist/dnn/dnn-toggle.entry.js.map +1 -1
- package/dist/dnn/dnn-toggle.system.entry.js +2 -0
- package/dist/dnn/dnn-toggle.system.entry.js.map +1 -0
- package/dist/dnn/dnn-treeview-item.entry.js +1 -1
- package/dist/dnn/dnn-treeview-item.entry.js.map +1 -1
- package/dist/dnn/dnn-treeview-item.system.entry.js +2 -0
- package/dist/dnn/dnn-treeview-item.system.entry.js.map +1 -0
- package/dist/dnn/dnn-vertical-overflow-menu.entry.js +14 -15
- package/dist/dnn/dnn-vertical-overflow-menu.entry.js.map +1 -1
- package/dist/dnn/dnn-vertical-overflow-menu.system.entry.js +2 -0
- package/dist/dnn/dnn-vertical-overflow-menu.system.entry.js.map +1 -0
- package/dist/dnn/dnn-vertical-splitview.entry.js +7 -3
- package/dist/dnn/dnn-vertical-splitview.entry.js.map +1 -1
- package/dist/dnn/dnn-vertical-splitview.system.entry.js +2 -0
- package/dist/dnn/dnn-vertical-splitview.system.entry.js.map +1 -0
- package/dist/dnn/dnn.js +130 -0
- package/dist/dnn/dnn.system.js +2 -0
- package/dist/dnn/dnn.system.js.map +1 -0
- package/dist/dnn/dom-938307ec.system.js +22 -0
- package/dist/dnn/dom-938307ec.system.js.map +1 -0
- package/dist/dnn/index-5c2c8f16.system.js +2 -0
- package/dist/dnn/index-5c2c8f16.system.js.map +1 -0
- package/dist/dnn/index.system.js +2 -0
- package/dist/dnn/index.system.js.map +1 -0
- package/dist/dnn/mouseUtilities-e7e4e78f.system.js +2 -0
- package/dist/dnn/mouseUtilities-e7e4e78f.system.js.map +1 -0
- package/dist/dnn/p-142c6f85.system.js +2 -0
- package/dist/dnn/p-142c6f85.system.js.map +1 -0
- package/dist/dnn/p-24a552b2.system.entry.js +11 -0
- package/dist/dnn/p-24a552b2.system.entry.js.map +1 -0
- package/dist/dnn/p-3fbd1ad6.system.js +2 -0
- package/dist/dnn/p-3fbd1ad6.system.js.map +1 -0
- package/dist/dnn/p-646cfb1b.system.js +2 -0
- package/dist/dnn/p-646cfb1b.system.js.map +1 -0
- package/dist/dnn/p-bdfc3291.entry.js +11 -0
- package/dist/dnn/p-bdfc3291.entry.js.map +1 -0
- package/dist/dnn/p-fb637662.system.js +2 -0
- package/dist/dnn/p-fb637662.system.js.map +1 -0
- package/dist/dnn/shadow-css-d573707f.system.js +14 -0
- package/dist/dnn/shadow-css-d573707f.system.js.map +1 -0
- package/dist/esm/dnn-button.entry.js +1 -1
- package/dist/esm/dnn-button.entry.js.map +1 -1
- package/dist/esm/dnn-button_16.entry.js +33 -30
- package/dist/esm/dnn-button_16.entry.js.map +1 -1
- package/dist/esm/dnn-checkbox.entry.js +1 -1
- package/dist/esm/dnn-checkbox.entry.js.map +1 -1
- package/dist/esm/dnn-chevron.entry.js +1 -1
- package/dist/esm/dnn-chevron.entry.js.map +1 -1
- package/dist/esm/dnn-collapsible.entry.js +1 -1
- package/dist/esm/dnn-collapsible.entry.js.map +1 -1
- package/dist/esm/dnn-color-picker.entry.js +1 -1
- package/dist/esm/dnn-color-picker.entry.js.map +1 -1
- package/dist/esm/dnn-dropzone.entry.js +1 -1
- package/dist/esm/dnn-dropzone.entry.js.map +1 -1
- package/dist/esm/dnn-image-cropper.entry.js +1 -1
- package/dist/esm/dnn-image-cropper.entry.js.map +1 -1
- package/dist/esm/dnn-modal.entry.js +1 -1
- package/dist/esm/dnn-modal.entry.js.map +1 -1
- package/dist/esm/dnn-searchbox.entry.js +1 -1
- package/dist/esm/dnn-searchbox.entry.js.map +1 -1
- package/dist/esm/dnn-tabs.entry.js +1 -1
- package/dist/esm/dnn-tabs.entry.js.map +1 -1
- package/dist/esm/dnn-toggle.entry.js +1 -1
- package/dist/esm/dnn-toggle.entry.js.map +1 -1
- package/dist/esm/dnn-treeview-item.entry.js +1 -1
- package/dist/esm/dnn-treeview-item.entry.js.map +1 -1
- package/dist/esm/dnn-vertical-overflow-menu.entry.js +14 -15
- package/dist/esm/dnn-vertical-overflow-menu.entry.js.map +1 -1
- package/dist/esm/dnn-vertical-splitview.entry.js +7 -3
- package/dist/esm/dnn-vertical-splitview.entry.js.map +1 -1
- package/dist/esm-es5/debounce-06f55268.js +2 -0
- package/dist/esm-es5/debounce-06f55268.js.map +1 -0
- package/dist/esm-es5/dnn-button_16.entry.js +11 -0
- package/dist/esm-es5/dnn-button_16.entry.js.map +1 -0
- package/dist/esm-es5/dnn.js +2 -0
- package/dist/esm-es5/dnn.js.map +1 -0
- package/dist/esm-es5/index-212d30ec.js +2 -0
- package/dist/esm-es5/index-212d30ec.js.map +1 -0
- package/dist/esm-es5/index.js +2 -0
- package/dist/esm-es5/index.js.map +1 -0
- package/dist/esm-es5/loader.js +2 -0
- package/dist/esm-es5/loader.js.map +1 -0
- package/dist/types/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.d.ts +0 -1
- package/dist/types/components/dnn-vertical-splitview/dnn-vertical-splitview.d.ts +1 -0
- package/loader/index.js +1 -1
- package/package.json +1 -1
- package/dist/dnn/p-bdc4d389.entry.js +0 -11
- package/dist/dnn/p-bdc4d389.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dnn-checkbox.entry.esm.js","mappings":";;AAAA,MAAM,cAAc,GAAG,
|
|
1
|
+
{"file":"dnn-checkbox.entry.esm.js","mappings":";;AAAA,MAAM,cAAc,GAAG,qfAAqf;;ICO/f,WAAW;EALxB;;;;IASyB,YAAO,GAAwB,KAAK,CAAC;;IAGpD,oBAAe,GAAY,KAAK,CAAC;GA0D1C;EAhDS,WAAW;IACjB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAC;MACxB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;MAC7B,IAAI,CAAC,UAAU,EAAE,CAAC;MAClB,OAAO;KACR;IACD,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,EAAC;MACxB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;MACrB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;MAC1C,IAAI,CAAC,UAAU,EAAE,CAAC;MAClB,OAAO;KACR;IACD,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAC;MAC7B,IAAI,CAAC,OA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AW,EAAC,KAAK,EAAC,4BAA4B,uBAAmB,eAAe,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,IAAC,aAAG,YAAM,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,GAAE,CAAI,EAAA,aAAG,aAAG,aAAG,YAAM,CAAC,EAAC,wGAAwG,GAAE,CAAI,CAAI,CAAI,CAAM,CAEnV,EACT,aAAO,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IAAE,eAAa,CAAQ,CAC/E,EACP;GACH;;;;;;;","names":[],"sources":["./src/components/dnn-checkbox/dnn-checkbox.scss?tag=dnn-checkbox&encapsulation=shadow","./src/components/dnn-checkbox/dnn-checkbox.tsx"],"sourcesContent":[":host {\r\n /**\r\n * @prop --focus-color: The color to outline the checkbox when hovered or focused, default to the dnn primary color.\r\n */\r\n --focus-color: var(--dnn-color-primary, #3792ED);\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.25rem;\r\n margin: 3px;\r\n}\r\nbutton{\r\n background-color: transparent;\r\n border: 0;\r\n padding: 0;\r\n margin: 0;\r\n outline: none;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n svg.undefined{\r\n opacity: 0.45;\r\n }\r\n &:focus{\r\n box-shadow: 0 0 2px 2px var(--focus-color);\r\n }\r\n}","import { Component, Element, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'dnn-checkbox',\r\n styleUrl: 'dnn-checkbox.scss',\r\n shadow: true,\r\n})\r\nexport class DnnCheckbox {\r\n @Element() el: HTMLDnnCheckboxElement;\r\n\r\n /** Defines if the checkbox is checked (true) or unchecked (false) or in an intermediate state (undefined) */\r\n @Prop({mutable: true}) checked: boolean | undefined = false;\r\n\r\n /** Defines if clicking the checkbox will go through the intermediate state between checked and unchecked (tri-state) */\r\n @Prop() useIntermediate: boolean = false;\r\n\r\n /** The value for this checkbox (not to be confused with its checked state). */\r\n @Prop() value: string;\r\n\r\n /** Fires up when the checkbox checked property changes. */\r\n @Event() checkedchange: EventEmitter<boolean | undefined>;\r\n \r\n private button: HTMLButtonElement;\r\n\r\n private changeState(): void {\r\n if (!this.useIntermediate){\r\n this.checked = !this.checked;\r\n this.emitEvents();\r\n return;\r\n }\r\n if (this.checked === true){\r\n this.checked = false;\r\n this.button.classList.remove(\"undefined\");\r\n this.emitEvents();\r\n return;\r\n }\r\n if (this.checked === undefined){\r\n this.checked = true;\r\n this.button.classList.remove(\"undefined\");\r\n this.emitEvents();\r\n return;\r\n }\r\n if (this.checked === false){\r\n this.checked = undefined;\r\n this.button.classList.add(\"undefined\");\r\n this.emitEvents();\r\n return;\r\n }\r\n }\r\n\r\n private emitEvents() {\r\n this.checkedchange.emit(this.checked);\r\n }\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <button class=\"icon\" onClick={() => this.changeState()} ref={el => this.button = el}>\r\n {this.checked === false &&\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"/></svg>\r\n }\r\n {this.checked === true &&\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"/></svg>\r\n }\r\n {this.checked === undefined &&\r\n <svg class=\"undefined\" xmlns=\"http://www.w3.org/2000/svg\" enable-background=\"new 0 0 24 24\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><g><g><path d=\"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13H7v-2h10V13z\"/></g></g></g></svg>\r\n }\r\n </button>\r\n <label htmlFor={this.el.id} onClick={() => this.changeState()}><slot></slot></label>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./index-5c2c8f16.system.js"],(function(e){"use strict";var t,n,i,c,s;return{setters:[function(e){t=e.r;n=e.e;i=e.h;c=e.f;s=e.g}],execute:function(){var h=":host{--focus-color:var(--dnn-color-primary, #3792ED);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:0.25rem;margin:3px}button{background-color:transparent;border:0;padding:0;margin:0;outline:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}button svg.undefined{opacity:0.45}button:focus{-webkit-box-shadow:0 0 2px 2px var(--focus-color);box-shadow:0 0 2px 2px var(--focus-color)}";var r=e("dnn_checkbox",function(){function e(e){t(this,e);this.checkedchange=n(this,"checkedchange",7);this.checked=false;this.useIntermediate=false}e.prototype.changeState=function(){if(!this.useIntermediate){this.checked=!this.checked;this.emitEvents();return}if(this.checked===true){this.checked=false;this.button.classList.remove("undefined");this.emitEvents();return}if(this.checked===undefined){this.checked=true;this.button.classList.remove("undefined");this.emitEvents();return}if(this.checked===false){this.checked=undefined;this.button.classList.add("undefined");this.emitEvents();return}};e.prototype.emitEvents=function(){this.checkedchange.emit(this.checked)};e.prototype.render=function(){var e=this;return i(c,null,i("button",{class:"icon",onClick:function(){return e.changeState()},ref:function(t){return e.button=t}},this.checked===false&&i("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},i("path",{d:"M0 0h24v24H0z",fill:"none"}),i("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),this.checked===true&&i("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},i("path",{d:"M0 0h24v24H0z",fill:"none"}),i("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),this.checked===undefined&&i("svg",{class:"undefined",xmlns:"http://www.w3.org/2000/svg","enable-background":"new 0 0 24 24",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},i("g",null,i("rect",{fill:"none",height:"24",width:"24"})),i("g",null,i("g",null,i("g",null,i("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13H7v-2h10V13z"})))))),i("label",{htmlFor:this.el.id,onClick:function(){return e.changeState()}},i("slot",null)))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());r.style=h}}}));
|
|
2
|
+
//# sourceMappingURL=dnn-checkbox.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/components/dnn-checkbox/dnn-checkbox.scss?tag=dnn-checkbox&encapsulation=shadow","src/components/dnn-checkbox/dnn-checkbox.tsx"],"names":["dnnCheckboxCss","DnnCheckbox","exports","class_1","hostRef","this","checked","useIntermediate","prototype","changeState","emitEvents","button","classList","remove","undefined","add","checkedchange","emit","render","_this","h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OAAA,CAAMW,EAAE,yIAEpJ1B,KAAKC,UAAYQ,WAChBM,EAAA,MAAA,CAAKE,MAAM,YAAYI,MAAM,6BAA4BM,oBAAmB,gBAAgBL,OAAO,OAAOC,QAAQ,YAAYC,MAAM,OAAOC,KAAK,WAAUV,EAAA,IAAA,KAAGA,EAAA,OAAA,CAAMU,KAAK,OAAOH,OAAO,KAAKE,MAAM,QAAUT,EAAA,IAAA,KAAGA,EAAA,IAAA,KAAGA,EAAA,IAAA,KAAGA,EAAA,OAAA,CAAMW,EAAE,gHAGhOX,EAAA,QAAA,CAAOa,QAAS5B,KAAKoB,GAAGS,GAAIX,QAAS,WAAM,OAAAJ,EAAKV,gBAAeW,EAAA,OAAA,8HA7D/C","sourcesContent":[":host {\r\n /**\r\n * @prop --focus-color: The color to outline the checkbox when hovered or focused, default to the dnn primary color.\r\n */\r\n --focus-color: var(--dnn-color-primary, #3792ED);\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.25rem;\r\n margin: 3px;\r\n}\r\nbutton{\r\n background-color: transparent;\r\n border: 0;\r\n padding: 0;\r\n margin: 0;\r\n outline: none;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n svg.undefined{\r\n opacity: 0.45;\r\n }\r\n &:focus{\r\n box-shadow: 0 0 2px 2px var(--focus-color);\r\n }\r\n}","import { Component, Element, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'dnn-checkbox',\r\n styleUrl: 'dnn-checkbox.scss',\r\n shadow: true,\r\n})\r\nexport class DnnCheckbox {\r\n @Element() el: HTMLDnnCheckboxElement;\r\n\r\n /** Defines if the checkbox is checked (true) or unchecked (false) or in an intermediate state (undefined) */\r\n @Prop({mutable: true}) checked: boolean | undefined = false;\r\n\r\n /** Defines if clicking the checkbox will go through the intermediate state between checked and unchecked (tri-state) */\r\n @Prop() useIntermediate: boolean = false;\r\n\r\n /** The value for this checkbox (not to be confused with its checked state). */\r\n @Prop() value: string;\r\n\r\n /** Fires up when the checkbox checked property changes. */\r\n @Event() checkedchange: EventEmitter<boolean | undefined>;\r\n \r\n private button: HTMLButtonElement;\r\n\r\n private changeState(): void {\r\n if (!this.useIntermediate){\r\n this.checked = !this.checked;\r\n this.emitEvents();\r\n return;\r\n }\r\n if (this.checked === true){\r\n this.checked = false;\r\n this.button.classList.remove(\"undefined\");\r\n this.emitEvents();\r\n return;\r\n }\r\n if (this.checked === undefined){\r\n this.checked = true;\r\n this.button.classList.remove(\"undefined\");\r\n this.emitEvents();\r\n return;\r\n }\r\n if (this.checked === false){\r\n this.checked = undefined;\r\n this.button.classList.add(\"undefined\");\r\n this.emitEvents();\r\n return;\r\n }\r\n }\r\n\r\n private emitEvents() {\r\n this.checkedchange.emit(this.checked);\r\n }\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <button class=\"icon\" onClick={() => this.changeState()} ref={el => this.button = el}>\r\n {this.checked === false &&\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"/></svg>\r\n }\r\n {this.checked === true &&\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"/></svg>\r\n }\r\n {this.checked === undefined &&\r\n <svg class=\"undefined\" xmlns=\"http://www.w3.org/2000/svg\" enable-background=\"new 0 0 24 24\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><g><rect fill=\"none\" height=\"24\" width=\"24\"/></g><g><g><g><path d=\"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13H7v-2h10V13z\"/></g></g></g></svg>\r\n }\r\n </button>\r\n <label htmlFor={this.el.id} onClick={() => this.changeState()}><slot></slot></label>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host } from './index-3e56049b.js';
|
|
2
2
|
|
|
3
|
-
const dnnChevronCss = ":host{display:inline-block}button{border:none;padding:0px;margin:0px;min-width:15px;min-height:15px;display:flex;justify-content:center;align-items:center;background-color:transparent;outline:none}svg{height:2em;width:2em;transition:all 300ms ease-in-out}button:focus svg,button:hover svg{color:var(--dnn-color-primary)}:host([expanded]) svg{transform:rotate(90deg)}";
|
|
3
|
+
const dnnChevronCss = ":host{display:inline-block}button{border:none;padding:0px;margin:0px;min-width:15px;min-height:15px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background-color:transparent;outline:none}svg{height:2em;width:2em;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out}button:focus svg,button:hover svg{color:var(--dnn-color-primary)}:host([expanded]) svg{-webkit-transform:rotate(90deg);transform:rotate(90deg)}";
|
|
4
4
|
|
|
5
5
|
let DnnChevron = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dnn-chevron.entry.esm.js","mappings":";;AAAA,MAAM,aAAa,GAAG,
|
|
1
|
+
{"file":"dnn-chevron.entry.esm.js","mappings":";;AAAA,MAAM,aAAa,GAAG,wfAAwf;;ICSjgB,UAAU;EALvB;;;;IAQU,eAAU,GAAY,QAAQ,CAAC;;IAG/B,iBAAY,GAAY,UAAU,CAAC;;IAGL,aAAQ,GAAa,KAAK,CAAC;GAsBlE;EAhBC,qBAAqB,CAAC,QAAiB;IACrC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GAC7B;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,4BAAoB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,UAAU,EACrE,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,IAE7C,WAAK,KAAK,EAAC,4BAA4B,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,IAAC,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAE,EAAA,YAAM,CAAC,EAAC,gDAAgD,GAAE,CAAM,CACpM,CACJ,EACP;GACH;;;;;;;;;","names":[],"sources":["./src/components/dnn-chevron/dnn-chevron.scss?tag=dnn-chevron&encapsulation=shadow","./src/components/dnn-chevron/dnn-chevron.tsx"],"sourcesContent":[":host {\r\n display: inline-block;\r\n}\r\nbutton{\r\n border: none;\r\n padding: 0px;\r\n margin: 0px;\r\n min-width: 15px;\r\n min-height: 15px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background-color: transparent;\r\n outline: none;\r\n}\r\nsvg{\r\n height:2em;\r\n width:2em;\r\n transition: all 300ms ease-in-out;\r\n}\r\n\r\n// FOCUS\r\nbutton:focus, button:hover{\r\n svg{\r\n color: var(--dnn-color-primary);\r\n }\r\n}\r\n\r\n// EXPANDED\r\n:host([expanded]){\r\n svg{\r\n transform: rotate(90deg);\r\n }\r\n}","import { Component, Host, h, Prop, Event } from '@stencil/core';\r\nimport { EventEmitter } from '@stencil/core';\r\nimport { Watch } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'dnn-chevron',\r\n styleUrl: 'dnn-chevron.scss',\r\n shadow: true\r\n})\r\nexport class DnnChevron {\r\n\r\n /** Expand text for screen readers */\r\n @Prop() expandText?: string = \"expand\";\r\n\r\n /** Collapse text for screen readers */\r\n @Prop() collapseText?: string = \"collapse\";\r\n\r\n /** Is the chevron expanded */\r\n @Prop({mutable: true, reflect: true}) expanded?: boolean = false;\r\n\r\n /** Fires up when the expanded status changes */\r\n @Event() changed: EventEmitter;\r\n\r\n @Watch('expanded')\r\n handleExpandedChanged(newValue: boolean) {\r\n this.changed.emit(newValue);\r\n }\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <button aria-label={this.expanded ? this.collapseText : this.expandText}\r\n onClick={() => this.expanded = !this.expanded}\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/></svg>\r\n </button>\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"version":3}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./index-5c2c8f16.system.js"],(function(e){"use strict";var t,n,i,a;return{setters:[function(e){t=e.r;n=e.e;i=e.h;a=e.f}],execute:function(){var r=":host{display:inline-block}button{border:none;padding:0px;margin:0px;min-width:15px;min-height:15px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background-color:transparent;outline:none}svg{height:2em;width:2em;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out}button:focus svg,button:hover svg{color:var(--dnn-color-primary)}:host([expanded]) svg{-webkit-transform:rotate(90deg);transform:rotate(90deg)}";var s=e("dnn_chevron",function(){function e(e){t(this,e);this.changed=n(this,"changed",7);this.expandText="expand";this.collapseText="collapse";this.expanded=false}e.prototype.handleExpandedChanged=function(e){this.changed.emit(e)};e.prototype.render=function(){var e=this;return i(a,null,i("button",{"aria-label":this.expanded?this.collapseText:this.expandText,onClick:function(){return e.expanded=!e.expanded}},i("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},i("path",{d:"M0 0h24v24H0z",fill:"none"}),i("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}))))};Object.defineProperty(e,"watchers",{get:function(){return{expanded:["handleExpandedChanged"]}},enumerable:false,configurable:true});return e}());s.style=r}}}));
|
|
2
|
+
//# sourceMappingURL=dnn-chevron.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/components/dnn-chevron/dnn-chevron.scss?tag=dnn-chevron&encapsulation=shadow","src/components/dnn-chevron/dnn-chevron.tsx"],"names":["dnnChevronCss","DnnChevron","exports","class_1","hostRef","this","expandText","collapseText","expanded","prototype","handleExpandedChanged","newValue","changed","emit","render","_this","h","Host","aria-label","onClick","xmlns","height","viewBox","width","fill","d"],"mappings":"8JAAA,IAAMA,EAAgB,6fCSTC,EAAUC,EAAA,cAAA,WALvB,SAAAC,EAAAC,8CAQUC,KAAAC,WAAsB,SAGtBD,KAAAE,aAAwB,WAGMF,KAAAG,SAAqB,MAM3DL,EAAAM,UAAAC,sBAAA,SAAsBC,GACpBN,KAAKO,QAAQC,KAAKF,IAGpBR,EAAAM,UAAAK,OAAA,WAAA,IAAAC,EAAAV,KACE,OACEW,EAACC,EAAI,KACHD,EAAA,SAAA,CAAAE,aAAoBb,KAAKG,SAAWH,KAAKE,aAAeF,KAAKC,WAC3Da,QAAS,WAAM,OAAAJ,EAAKP,UAAYO,EAAKP,WAErCQ,EAAA,MAAA,CAAKI,MAAM,6BAA6BC,OAAO,OAAOC,QAAQ,YAAYC,MAAM,OAAOC,KAAK,WAAUR,EAAA,OAAA,CAAMS,EAAE,gBAAgBD,KAAK,SAAQR,EAAA,OAAA,CAAMS,EAAE,oMAzBtI","sourcesContent":[":host {\r\n display: inline-block;\r\n}\r\nbutton{\r\n border: none;\r\n padding: 0px;\r\n margin: 0px;\r\n min-width: 15px;\r\n min-height: 15px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background-color: transparent;\r\n outline: none;\r\n}\r\nsvg{\r\n height:2em;\r\n width:2em;\r\n transition: all 300ms ease-in-out;\r\n}\r\n\r\n// FOCUS\r\nbutton:focus, button:hover{\r\n svg{\r\n color: var(--dnn-color-primary);\r\n }\r\n}\r\n\r\n// EXPANDED\r\n:host([expanded]){\r\n svg{\r\n transform: rotate(90deg);\r\n }\r\n}","import { Component, Host, h, Prop, Event } from '@stencil/core';\r\nimport { EventEmitter } from '@stencil/core';\r\nimport { Watch } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'dnn-chevron',\r\n styleUrl: 'dnn-chevron.scss',\r\n shadow: true\r\n})\r\nexport class DnnChevron {\r\n\r\n /** Expand text for screen readers */\r\n @Prop() expandText?: string = \"expand\";\r\n\r\n /** Collapse text for screen readers */\r\n @Prop() collapseText?: string = \"collapse\";\r\n\r\n /** Is the chevron expanded */\r\n @Prop({mutable: true, reflect: true}) expanded?: boolean = false;\r\n\r\n /** Fires up when the expanded status changes */\r\n @Event() changed: EventEmitter;\r\n\r\n @Watch('expanded')\r\n handleExpandedChanged(newValue: boolean) {\r\n this.changed.emit(newValue);\r\n }\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <button aria-label={this.expanded ? this.collapseText : this.expandText}\r\n onClick={() => this.expanded = !this.expanded}\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/></svg>\r\n </button>\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-3e56049b.js';
|
|
2
2
|
import { D as Debounce } from './debounce-06f55268.js';
|
|
3
3
|
|
|
4
|
-
const dnnCollapsibleCss = ":host{display:block}:host #container{height:0;overflow:hidden;transition:height 300ms ease-in-out}";
|
|
4
|
+
const dnnCollapsibleCss = ":host{display:block}:host #container{height:0;overflow:hidden;-webkit-transition:height 300ms ease-in-out;transition:height 300ms ease-in-out}";
|
|
5
5
|
|
|
6
6
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7
7
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dnn-collapsible.entry.esm.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,
|
|
1
|
+
{"file":"dnn-collapsible.entry.esm.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,gJAAgJ;;;;;;;;;;;;ICQ7J,cAAc;EAL3B;;;;IAUyB,aAAQ,GAAY,KAAK,CAAC;;IAGzC,uBAAkB,GAAY,GAAG,CAAC;IAEjC,cAAS,GAAY,KAAK,CAAC;GAmGrC;EAhGC,qBAAqB,CAAC,QAAiB;IACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACtB,qBAAqB,CAAC;MACpB,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,YAAY,CAAmB,CAAC;MACnF,IAAI,QAAQ,EAAC;QACX,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,YAAY,GAAG,IAAI,CAAC;OACxD;WACG;QACF,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;OAChC;KACF,CAAC,CAAC;IAEH,qBAAqB,CAAC;MACpB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;MACvB,IAAI,CAAC,2BAA2B,CAAC,IAAI,EAAE,CAAC;KACzC,CAAC,CAAC;GACJ;;EAKD,MAAM,UAAU;IACd,IAAI,CAAC,m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,CAAC;IAC7B,UAAU,CAAC,OAAO,CAAC,OAAO;MACxB,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAC,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;KACjH,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACtD,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;MAClC,IAAI,CAAC,UAAU,EAAE,CAAC;KACnB,CAAC,CAAC;GACJ;EAED,oBAAoB;IAClB,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC;GACpC;;EAGD,MAAM;IACJ,QACE,EAAC,IAAI,QACH,WAAK,EAAE,EAAC,WAAW,IACf,eAAa,CACX,CACD,EACP;GACH;;;;;;;EA3EA,QAAQ,EAAE;gDAIV;;;;;","names":[],"sources":["./src/components/dnn-collapsible/dnn-collapsible.scss?tag=dnn-collapsible&encapsulation=shadow","./src/components/dnn-collapsible/dnn-collapsible.tsx"],"sourcesContent":[":host {\r\n display: block;\r\n #container{\r\n height:0;\r\n overflow: hidden;\r\n transition: height 300ms ease-in-out;\r\n }\r\n}","import { Component, Host, h, Prop, Element, Watch, State, Method, Event, EventEmitter, Listen } from '@stencil/core';\r\nimport { Debounce } from '../../utilities/debounce';\r\n\r\n@Component({\r\n tag: \"dnn-collapsible\",\r\n styleUrl: \"dnn-collapsible.scss\",\r\n shadow: true\r\n})\r\nexport class DnnCollapsible {\r\n\r\n @Element() el: HTMLDnnCollapsibleElement;\r\n\r\n /** Defines if the panel is expanded or not. */\r\n @Prop({reflect: true}) expanded: boolean = false;\r\n\r\n /** Defines the transition time in ms, defaults to 100ms */\r\n @Prop() transitionDuration?: number = 150;\r\n\r\n @State() animating: boolean = false;\r\n\r\n @Watch(\"expanded\")\r\n handleExpandedChanged(newValue: boolean){\r\n this.animating = true;\r\n requestAnimationFrame(() => {\r\n const container = this.el.shadowRoot.querySelector(\"#container\") as HTMLDivElement;\r\n if (newValue){\r\n container.style.height = container.scrollHeight + \"px\";\r\n }\r\n else{\r\n container.style.height = \"0px\";\r\n }\r\n });\r\n \r\n requestAnimationFrame(() => {\r\n this.animating = false;\r\n this.dnnCollapsibleHeightChanged.emit();\r\n });\r\n }\r\n\r\n /** Updates the component height, use to update after a slot content changes. */\r\n @Debounce()\r\n @Method()\r\n async updateSize() {\r\n this.updateComponentSize();\r\n }\r\n\r\n private updateComponentSize(){\r\n if (this.expanded){\r\n this.animating = true;\r\n requestAnimationFrame(() => {\r\n const container = this.el.shadowRoot.querySelector(\"#container\") as HTMLDivElement;\r\n let newHeight = 0;\r\n container.querySelector('slot').assignedElements().forEach(node => {\r\n newHeight += node.scrollHeight;\r\n });\r\n container.style.height = newHeight + \"px\";\r\n });\r\n }\r\n }\r\n\r\n /** Fires whenever the collapsible height has changed */\r\n @Event() dnnCollapsibleHeightChanged: EventEmitter<void>;\r\n\r\n @Listen('dnnCollapsibleHeightChanged')\r\n handleOtherCollapsibleHeightChanged(){\r\n setTimeout(() => {\r\n this.updateComponentSize();\r\n }, this.transitionDuration);\r\n }\r\n\r\n private mutationObserver: MutationObserver;\r\n\r\n private handleMutation(mutationList){\r\n mutationList.forEach(mutation => {\r\n requestAnimationFrame(() => {\r\n mutation.target.closest('dnn-collapsible').updateSize();\r\n });\r\n });\r\n }\r\n\r\n componentWillLoad() {\r\n this.mutationObserver = new MutationObserver((mutationList) => {\r\n this.handleMutation(mutationList);\r\n });\r\n }\r\n\r\n componentDidLoad(){\r\n const container = this.el.shadowRoot.querySelector('#container') as HTMLDivElement;\r\n container.style.transitionDuration = this.transitionDuration + 'ms';\r\n\r\n // Monitor for content changes and update own height\r\n const childNodes = [this.el];\r\n childNodes.forEach(element => {\r\n this.mutationObserver.observe(element, {attributes: true, characterData: true, childList: true, subtree: true});\r\n });\r\n\r\n const slot = this.el.shadowRoot.querySelector('slot');\r\n slot.addEventListener(\"slotchange\", () => {\r\n this.updateSize();\r\n });\r\n }\r\n\r\n disconnectedCallback(){\r\n this.mutationObserver.disconnect();\r\n }\r\n /*eslint-enable @stencil/own-methods-must-be-private */\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <div id=\"container\">\r\n <slot></slot>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"version":3}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function u(e){try{s(i["throw"](e))}catch(e){o(e)}}function s(e){e.done?n(e.value):r(e.value).then(a,u)}s((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(e){return function(t){return s([e,t])}}function s(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./index-5c2c8f16.system.js","./debounce-eef81bf7.system.js"],(function(e){"use strict";var t,n,i,r,o,a;return{setters:[function(e){t=e.r;n=e.e;i=e.h;r=e.f;o=e.g},function(e){a=e.D}],execute:function(){var u=":host{display:block}:host #container{height:0;overflow:hidden;-webkit-transition:height 300ms ease-in-out;transition:height 300ms ease-in-out}";var s=undefined&&undefined.__decorate||function(e,t,n,i){var r=arguments.length,o=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,n,i);else for(var u=e.length-1;u>=0;u--)if(a=e[u])o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o;return r>3&&o&&Object.defineProperty(t,n,o),o};var l=e("dnn_collapsible",function(){function e(e){t(this,e);this.dnnCollapsibleHeightChanged=n(this,"dnnCollapsibleHeightChanged",7);this.expanded=false;this.transitionDuration=150;this.animating=false}e.prototype.handleExpandedChanged=function(e){var t=this;this.animating=true;requestAnimationFrame((function(){var n=t.el.shadowRoot.querySelector("#container");if(e){n.style.height=n.scrollHeight+"px"}else{n.style.height="0px"}}));requestAnimationFrame((function(){t.animating=false;t.dnnCollapsibleHeightChanged.emit()}))};e.prototype.updateSize=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.updateComponentSize();return[2]}))}))};e.prototype.updateComponentSize=function(){var e=this;if(this.expanded){this.animating=true;requestAnimationFrame((function(){var t=e.el.shadowRoot.querySelector("#container");var n=0;t.querySelector("slot").assignedElements().forEach((function(e){n+=e.scrollHeight}));t.style.height=n+"px"}))}};e.prototype.handleOtherCollapsibleHeightChanged=function(){var e=this;setTimeout((function(){e.updateComponentSize()}),this.transitionDuration)};e.prototype.handleMutation=function(e){e.forEach((function(e){requestAnimationFrame((function(){e.target.closest("dnn-collapsible").updateSize()}))}))};e.prototype.componentWillLoad=function(){var e=this;this.mutationObserver=new MutationObserver((function(t){e.handleMutation(t)}))};e.prototype.componentDidLoad=function(){var e=this;var t=this.el.shadowRoot.querySelector("#container");t.style.transitionDuration=this.transitionDuration+"ms";var n=[this.el];n.forEach((function(t){e.mutationObserver.observe(t,{attributes:true,characterData:true,childList:true,subtree:true})}));var i=this.el.shadowRoot.querySelector("slot");i.addEventListener("slotchange",(function(){e.updateSize()}))};e.prototype.disconnectedCallback=function(){this.mutationObserver.disconnect()};e.prototype.render=function(){return i(r,null,i("div",{id:"container"},i("slot",null)))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{expanded:["handleExpandedChanged"]}},enumerable:false,configurable:true});return e}());s([a()],l.prototype,"updateSize",null);l.style=u}}}));
|
|
2
|
+
//# sourceMappingURL=dnn-collapsible.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/components/dnn-collapsible/dnn-collapsible.scss?tag=dnn-collapsible&encapsulation=shadow","src/components/dnn-collapsible/dnn-collapsible.tsx"],"names":["dnnCollapsibleCss","DnnCollapsible","exports","class_1","hostRef","this","expanded","transitionDuration","animating","prototype","handleExpandedChanged","newValue","_this","requestAnimationFrame","container","el","shadowRoot","querySelector","style","height","scrollHeight","dnnCollapsibleHeightChanged","emit","updateSize","updateComponentSize","newHeight","assignedElements","forEach","node","handleOtherCollapsibleHeightChanged","setTimeout","handleMutation","mutationList","mutation","target","closest","componentWillLoad","mutationObserver","MutationObserver","componentDidLoad","childNodes","element","observe","attributes","characterData","childList","subtree","slot","addEventListener","disconnectedCallback","disconnect","render","h","Host","id","Debounce"],"mappings":"opDAAA,IAAMA,EAAoB,ggBCQbC,EAAcC,EAAA,kBAAA,WAL3B,SAAAC,EAAAC,sFAUyBC,KAAAC,SAAoB,MAGnCD,KAAAE,mBAA8B,IAE7BF,KAAAG,UAAqB,MAG9BL,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,WAAY,KAAMC,cAAe,KAAMC,UAAW,KAAMC,QAAS,UAG3G,IAAMC,EAAO1C,KAAKU,GAAGC,WAAWC,cAAc,QAC9C8B,EAAKC,iBAAiB,cAAc,WAClCpC,EAAKW,iBAITpB,EAAAM,UAAAwC,qBAAA,WACE5C,KAAKgC,iBAAiBa,cAIxB/C,EAAAM,UAAA0C,OAAA,WACE,OACEC,EAACC,EAAI,KACHD,EAAA,MAAA,CAAKE,GAAG,aACJF,EAAA,OAAA,kQAvGe,OAgCxBG","sourcesContent":[":host {\r\n display: block;\r\n #container{\r\n height:0;\r\n overflow: hidden;\r\n transition: height 300ms ease-in-out;\r\n }\r\n}","import { Component, Host, h, Prop, Element, Watch, State, Method, Event, EventEmitter, Listen } from '@stencil/core';\r\nimport { Debounce } from '../../utilities/debounce';\r\n\r\n@Component({\r\n tag: \"dnn-collapsible\",\r\n styleUrl: \"dnn-collapsible.scss\",\r\n shadow: true\r\n})\r\nexport class DnnCollapsible {\r\n\r\n @Element() el: HTMLDnnCollapsibleElement;\r\n\r\n /** Defines if the panel is expanded or not. */\r\n @Prop({reflect: true}) expanded: boolean = false;\r\n\r\n /** Defines the transition time in ms, defaults to 100ms */\r\n @Prop() transitionDuration?: number = 150;\r\n\r\n @State() animating: boolean = false;\r\n\r\n @Watch(\"expanded\")\r\n handleExpandedChanged(newValue: boolean){\r\n this.animating = true;\r\n requestAnimationFrame(() => {\r\n const container = this.el.shadowRoot.querySelector(\"#container\") as HTMLDivElement;\r\n if (newValue){\r\n container.style.height = container.scrollHeight + \"px\";\r\n }\r\n else{\r\n container.style.height = \"0px\";\r\n }\r\n });\r\n \r\n requestAnimationFrame(() => {\r\n this.animating = false;\r\n this.dnnCollapsibleHeightChanged.emit();\r\n });\r\n }\r\n\r\n /** Updates the component height, use to update after a slot content changes. */\r\n @Debounce()\r\n @Method()\r\n async updateSize() {\r\n this.updateComponentSize();\r\n }\r\n\r\n private updateComponentSize(){\r\n if (this.expanded){\r\n this.animating = true;\r\n requestAnimationFrame(() => {\r\n const container = this.el.shadowRoot.querySelector(\"#container\") as HTMLDivElement;\r\n let newHeight = 0;\r\n container.querySelector('slot').assignedElements().forEach(node => {\r\n newHeight += node.scrollHeight;\r\n });\r\n container.style.height = newHeight + \"px\";\r\n });\r\n }\r\n }\r\n\r\n /** Fires whenever the collapsible height has changed */\r\n @Event() dnnCollapsibleHeightChanged: EventEmitter<void>;\r\n\r\n @Listen('dnnCollapsibleHeightChanged')\r\n handleOtherCollapsibleHeightChanged(){\r\n setTimeout(() => {\r\n this.updateComponentSize();\r\n }, this.transitionDuration);\r\n }\r\n\r\n private mutationObserver: MutationObserver;\r\n\r\n private handleMutation(mutationList){\r\n mutationList.forEach(mutation => {\r\n requestAnimationFrame(() => {\r\n mutation.target.closest('dnn-collapsible').updateSize();\r\n });\r\n });\r\n }\r\n\r\n componentWillLoad() {\r\n this.mutationObserver = new MutationObserver((mutationList) => {\r\n this.handleMutation(mutationList);\r\n });\r\n }\r\n\r\n componentDidLoad(){\r\n const container = this.el.shadowRoot.querySelector('#container') as HTMLDivElement;\r\n container.style.transitionDuration = this.transitionDuration + 'ms';\r\n\r\n // Monitor for content changes and update own height\r\n const childNodes = [this.el];\r\n childNodes.forEach(element => {\r\n this.mutationObserver.observe(element, {attributes: true, characterData: true, childList: true, subtree: true});\r\n });\r\n\r\n const slot = this.el.shadowRoot.querySelector('slot');\r\n slot.addEventListener(\"slotchange\", () => {\r\n this.updateSize();\r\n });\r\n }\r\n\r\n disconnectedCallback(){\r\n this.mutationObserver.disconnect();\r\n }\r\n /*eslint-enable @stencil/own-methods-must-be-private */\r\n\r\n render() {\r\n return (\r\n <Host>\r\n <div id=\"container\">\r\n <slot></slot>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"]}
|
|
@@ -192,7 +192,7 @@ class ColorInfo {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
const dnnColorPickerCss = ".dnn-color-picker{padding:15px;max-width:400px}.dnn-color-picker .dnn-color-sliders{display:flex;flex-direction:column;min-width:200px}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b{border:1px solid #ccc;padding-bottom:var(--color-box-height, 50%);position:relative;background-color:red}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;background:linear-gradient(to right, white, red);mix-blend-mode:saturation}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b:after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;background:linear-gradient(to bottom, white, black);mix-blend-mode:luminosity}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b button{position:absolute;bottom:calc(50% - 4px);left:calc(50% - 4px);width:8px;height:8px;z-index:3;display:block;background:none;border:none;margin-left:-4px;margin-bottom:-4px;padding:7px;background-color:#fff;border-radius:50%}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b button:before{content:\"\";position:absolute;top:-1px;left:-1px;border-radius:50%}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b button:after{content:\"\";position:absolute;top:0px;left:0px;border-radius:50%;width:10px;height:10px;border:2px solid #ccc}.dnn-color-picker .dnn-color-sliders .dnn-color-bar{display:flex;align-items:center;margin-top:15px}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-result{flex-direction:column;width:50px;height:50px;border-radius:50%;background:red}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-hue{flex:auto;margin-left:10px;height:16px;border:1px solid #ccc;position:relative;background:linear-gradient(to right, #f00 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 84%, #f00 100%)}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-hue button{width:10px;height:20px;position:absolute;top:-2px;left:calc(50% - 4px);border:0;padding:0;background-color:transparent;padding-left:-8px}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-hue button:before{content:\"\";position:absolute;top:-2px;left:0px;border-radius:3px;width:100%;height:100%;border:1px solid #ccc;background-color:#fff}.dnn-color-picker .dnn-color-fields{display:flex;flex-direction:column;justify-content:space-between}.dnn-color-picker .dnn-color-fields .dnn-color-mode-switch{display:flex;align-items:flex-end;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-color-mode-switch button{background-color:transparent;border:none}.dnn-color-picker .dnn-color-fields .dnn-color-mode-switch button svg{width:3em;height:3em;pointer-events:none;outline:none}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields{display:flex;justify-content:space-evenly}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field{display:flex;flex-direction:column;flex:auto;text-align:center;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field label{padding-bottom:0.25em}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input{border-radius:var(--dnn-button-radius, 3px);border:1px solid #ccc;padding:0.5em;padding-left:1.3em;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input.red{border-color:red}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input.green{border-color:green}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input.blue{border-color:blue}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields{display:flex;justify-content:space-evenly}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields .dnn-hsl-color-field{display:flex;flex-direction:column;flex:auto;text-align:center;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields .dnn-hsl-color-field label{padding-bottom:0.25em}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields .dnn-hsl-color-field input{border-radius:var(--dnn-button-radius, 3px);border:1px solid #ccc;padding:0.5em;padding-left:1.3em;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields{display:flex;justify-content:space-evenly}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field{display:flex;flex-direction:column;flex:auto;text-align:center;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field label{padding-bottom:0.25em}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input{position:relative;border-radius:var(--dnn-button-radius, 3px);border:1px solid #ccc;padding:0.323em;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input input{border:0;padding:0;margin:0;width:100%;height:100%;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input button{position:absolute;height:100%;top:0;right:1em;background-color:transparent;border:0;padding:0;margin:0}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input button svg{min-width:1em}";
|
|
195
|
+
const dnnColorPickerCss = ".dnn-color-picker{padding:15px;max-width:400px}.dnn-color-picker .dnn-color-sliders{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:200px}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b{border:1px solid #ccc;padding-bottom:var(--color-box-height, 50%);position:relative;background-color:red}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;background:-webkit-gradient(linear, left top, right top, from(white), to(red));background:linear-gradient(to right, white, red);mix-blend-mode:saturation}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b:after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;background:-webkit-gradient(linear, left top, left bottom, from(white), to(black));background:linear-gradient(to bottom, white, black);mix-blend-mode:luminosity}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b button{position:absolute;bottom:calc(50% - 4px);left:calc(50% - 4px);width:8px;height:8px;z-index:3;display:block;background:none;border:none;margin-left:-4px;margin-bottom:-4px;padding:7px;background-color:#fff;border-radius:50%}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b button:before{content:\"\";position:absolute;top:-1px;left:-1px;border-radius:50%}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b button:after{content:\"\";position:absolute;top:0px;left:0px;border-radius:50%;width:10px;height:10px;border:2px solid #ccc}.dnn-color-picker .dnn-color-sliders .dnn-color-bar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-top:15px}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-result{-ms-flex-direction:column;flex-direction:column;width:50px;height:50px;border-radius:50%;background:red}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-hue{-ms-flex:auto;flex:auto;margin-left:10px;height:16px;border:1px solid #ccc;position:relative;background:-webkit-gradient(linear, left top, right top, color-stop(0, #f00), color-stop(17%, #ff0), color-stop(33%, #0f0), color-stop(50%, #0ff), color-stop(67%, #00f), color-stop(84%, #f0f), to(#f00));background:linear-gradient(to right, #f00 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 84%, #f00 100%)}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-hue button{width:10px;height:20px;position:absolute;top:-2px;left:calc(50% - 4px);border:0;padding:0;background-color:transparent;padding-left:-8px}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-hue button:before{content:\"\";position:absolute;top:-2px;left:0px;border-radius:3px;width:100%;height:100%;border:1px solid #ccc;background-color:#fff}.dnn-color-picker .dnn-color-fields{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}.dnn-color-picker .dnn-color-fields .dnn-color-mode-switch{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-color-mode-switch button{background-color:transparent;border:none}.dnn-color-picker .dnn-color-fields .dnn-color-mode-switch button svg{width:3em;height:3em;pointer-events:none;outline:none}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields{display:-ms-flexbox;display:flex;-ms-flex-pack:space-evenly;justify-content:space-evenly}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:auto;flex:auto;text-align:center;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field label{padding-bottom:0.25em}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input{border-radius:var(--dnn-button-radius, 3px);border:1px solid #ccc;padding:0.5em;padding-left:1.3em;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input.red{border-color:red}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input.green{border-color:green}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input.blue{border-color:blue}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields{display:-ms-flexbox;display:flex;-ms-flex-pack:space-evenly;justify-content:space-evenly}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields .dnn-hsl-color-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:auto;flex:auto;text-align:center;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields .dnn-hsl-color-field label{padding-bottom:0.25em}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields .dnn-hsl-color-field input{border-radius:var(--dnn-button-radius, 3px);border:1px solid #ccc;padding:0.5em;padding-left:1.3em;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields{display:-ms-flexbox;display:flex;-ms-flex-pack:space-evenly;justify-content:space-evenly}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:auto;flex:auto;text-align:center;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field label{padding-bottom:0.25em}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input{position:relative;border-radius:var(--dnn-button-radius, 3px);border:1px solid #ccc;padding:0.323em;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input input{border:0;padding:0;margin:0;width:100%;height:100%;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input button{position:absolute;height:100%;top:0;right:1em;background-color:transparent;border:0;padding:0;margin:0}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input button svg{min-width:1em}";
|
|
196
196
|
|
|
197
197
|
/** Reusable DNN UI component to pick a color
|
|
198
198
|
* @copyright Copyright (c) .NET Foundation. All rights reserved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dnn-color-picker.entry.esm.js","mappings":";;;AAAA;;;;;MAMa,SAAS;EAAtB;IAEY,SAAI,GAAW,CAAC,CAAC;IAWjB,gBAAW,GAAW,CAAC,CAAC;IAWxB,eAAU,GAAW,CAAC,CAAC;GAgJlC;;;;EAlKG,IAAI,GAAG,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE;EAC/B,IAAI,GAAG,CAAC,KAAa;IACjB,IAAI,KAAK,GAAG,CAAC,EAAE;MAAE,KAAK,GAAG,CAAC,CAAC;KAAE;IAC7B,IAAI,KAAK,GAAG,GAAG,EAAE;MAAE,KAAK,GAAG,GAAG,CAAC;KAAE;IACjC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;GACrB;;;;EAMD,IAAI,UAAU,KAAK,OAAO,IAAI,CAAC,WAAW,CAAC,EAAE;EAC7C,IAAI,UAAU,CAAC,KAAa;IACxB,IAAI,KAAK,GAAG,CAAC,EAAE;MAAE,KAAK,GAAG,CAAC,CAAC;KAAE;IAC7B,IAAI,KAAK,GAAG,CAAC,EAAE;MAAE,KAAK,GAAG,CAAC,CAAC;KAAE;IAC7B,IA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AAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,IAAC,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAE,EAAA,YAAM,CAAC,EAAC,iIAAiI,GAAE,CAAM,CACvR,CACP,CACJ,EACN,WAAK,KAAK,EAAC,uBAAuB,IAC9B,cACI,EAAE,EAAC,YAAY,EACf,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,gBAC7B,2CAA2C,IAEtD,WAAK,KAAK,EAAC,4BAA4B,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,IAAC,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAE,EAAA,YAAM,CAAC,EAAC,iEAAiE,GAAE,CAAM,CACvN,CACP,CACJ,CACJ,CACJ,EACR;GACL;;;;;;AAnYD;EADC,QAAQ,CAAC,GAAG,CAAC;yDAGb;;;;;","names":[],"sources":["./src/utilities/colorInfo.ts","./src/components/dnn-color-picker/dnn-color-picker.scss?tag=dnn-color-picker&encapsulation=shadow","./src/components/dnn-color-picker/dnn-color-picker.tsx"],"sourcesContent":["/** Color utility class with hsl and rgb converters\r\n * based on math at https://en.wikipedia.org/wiki/HSL_and_HSV\r\n * @copyright Copyright (c) .NET Foundation. All rights reserved.\r\n * @license MIT \r\n */\r\n\r\nexport class ColorInfo{\r\n\r\n private _hue: number = 0;\r\n /** gets the color hue\r\n * @returns a number between 0 and 359, could contain decimals\r\n */\r\n get hue() { return this._hue; }\r\n set hue(value: number){\r\n if (value < 0) { value = 0; }\r\n if (value > 359) { value = 359; }\r\n this._hue = value;\r\n }\r\n\r\n private _saturation: number = 0;\r\n /** gets the color saturation\r\n * @returns a number between 0 and 1, could contain decimals\r\n */\r\n get saturation() { return this._saturation; }\r\n set saturation(value: number) {\r\n if (value < 0) { value = 0; }\r\n if (value > 1) { value = 1; }\r\n this._saturation = value;\r\n }\r\n\r\n private _lightness: number = 0;\r\n /** gets the color lightness\r\n * @returns a number between 0 and 1, could contain decimals\r\n */\r\n get lightness() { return this._lightness; }\r\n set lightness(value: number) {\r\n if (value < 0) { value = 0; }\r\n if (value > 1) { value = 1; }\r\n this._lightness = value;\r\n }\r\n\r\n /** gets or sets the red component \r\n * @returns an integer between 0 and 255\r\n */\r\n get red() {\r\n return this.getRGB().red;\r\n }\r\n set red(value) {\r\n this.setHSL(value, this.green, this.blue);\r\n }\r\n\r\n /** gets or sets the green component\r\n * @returns an integer between 0 and 255\r\n */\r\n get green() {\r\n return this.getRGB().green;\r\n }\r\n set green(value: number) {\r\n this.setHSL(this.red, value, this.blue);\r\n }\r\n\r\n /** gets or sets the blue component\r\n * @returns an integer between 0 and 255\r\n */\r\n get blue() {\r\n return this.getRGB().blue;\r\n }\r\n set blue(value: number) {\r\n this.setHSL(this.red, this.green, value);\r\n }\r\n\r\n /** gets or sets the hex color value, expresses as 6 hexadecimal characters.\r\n * @returns hex representation of the color\r\n */\r\n get hex() {\r\n var r = this.getHex(this.red);\r\n var g = this.getHex(this.green);\r\n var b = this.getHex(this.blue);\r\n return r + g + b;\r\n }\r\n set hex(value: string){\r\n this.red = parseInt(value.substr(0,2));\r\n this.green = parseInt(value.substr(2,2));\r\n this.blue = parseInt(value.substr(4,2));\r\n }\r\n\r\n /** gets white or black color that is a good oposite to the current color\r\n * @returns - \"000000\" or \"FFFFFF\"\r\n */\r\n get contrastColor() {\r\n const brightness = (this.red*299 + this.green*587 + this.blue*114) / 1000\r\n if (brightness > 127){\r\n return \"000000\";\r\n }\r\n return \"FFFFFF\";\r\n }\r\n\r\n private getRGB() {\r\n const chroma = (1 - Math.abs((2 * this._lightness) - 1)) * this.saturation;\r\n // find the quandrant of the hue\r\n const quadrant = this._hue / 60;\r\n // calculate the offset from the quandrant center\r\n const offset = chroma * (1 - Math.abs(quadrant % 2 - 1));\r\n\r\n // Apply the chroma to the primary component and the offset to the 2nd most important component\r\n let r = 0, g = 0, b = 0;\r\n if (0 <= quadrant && quadrant <= 1) {\r\n r = chroma; g = offset; // red to yellow\r\n } else if (1 <= quadrant && quadrant <= 2) {\r\n g = chroma; r = offset; // yellow to green\r\n } else if (2 <= quadrant && quadrant <= 3) {\r\n g = chroma; b = offset; // green to cyan\r\n } else if (3 <= quadrant && quadrant <= 4) {\r\n b = chroma; g = offset; // cyan to blue\r\n } else if (4 <= quadrant && quadrant <= 5) {\r\n b = chroma; r = offset; // blue to magenta\r\n } else if (5 <= quadrant && quadrant <= 6) {\r\n r = chroma; b = offset; // magenta to red\r\n }\r\n // calculate the bias to add to all channels to match the lightness\r\n const bias = this._lightness - (chroma / 2);\r\n\r\n return {\r\n red: Math.round((r + bias) * 255),\r\n green: Math.round((g + bias) * 255),\r\n blue: Math.round((b + bias) * 255)\r\n }\r\n }\r\n\r\n private setHSL(red: number, green: number, blue: number) {\r\n // GENERAL DATA\r\n // all math is based on values from 0 to 1\r\n const r = red/255, g = green/255, b = blue/255;\r\n // we need to max, min and the difference between them to derive hsl\r\n const min = Math.min(r, g, b);\r\n const max = Math.max(r, g, b);\r\n const diff = max - min;\r\n let h = 0, s = 0, l = 0;\r\n\r\n // HUE\r\n if (diff === 0) { // neutral\r\n h = 0;\r\n } else if (max === r) { // red (magenta to yellow range)\r\n h = 60 * ((g - b) / diff);\r\n } else if (max === g) { // green (yellow to cyan range)\r\n h = 60 * (2 + ((b - r) / diff));\r\n } else if (max === b) { // blue (cyan to magenta range)\r\n h = 60 * (4 + ((r - g) / diff));\r\n }\r\n if (h < 0) { h = h + 360} // ensures positive hues only\r\n if (h > 359) { h = 359} // ensures we never return 360 for simplicity since it is the same as 0\r\n\r\n // LIGHTNESS\r\n l = (max + min) / 2;\r\n\r\n // SATURATION\r\n if (max === 0 || min === 1) { // pure black or white have no saturation\r\n s = 0;\r\n } else {\r\n s = (max - l) / (Math.min(l, 1 - l));\r\n }\r\n\r\n this._hue = h;\r\n this._saturation = s;\r\n this._lightness = l;\r\n }\r\n\r\n private getHex(value: number){\r\n var hex = value.toString(16);\r\n if (hex.length < 2){\r\n hex = \"0\" + hex;\r\n }\r\n return hex;\r\n }\r\n} ",".dnn-color-picker{\r\n padding: 15px;\r\n max-width: 400px;\r\n .dnn-color-sliders{\r\n display:flex;\r\n flex-direction: column;\r\n min-width: 200px;\r\n .dnn-color-s-b{\r\n border: 1px solid #ccc;\r\n padding-bottom: var(--color-box-height, 50%);\r\n position: relative;\r\n background-color: red;\r\n &:before{\r\n content: '';\r\n position: absolute;\r\n top:0;\r\n left:0;\r\n width: 100%;\r\n height:100%;\r\n z-index:1;\r\n background: linear-gradient(to right, white, red);\r\n mix-blend-mode: saturation;\r\n }\r\n &:after{\r\n content: '';\r\n position: absolute;\r\n top:0;\r\n left:0;\r\n width: 100%;\r\n height:100%;\r\n z-index:2;\r\n background: linear-gradient(to bottom, white, black);\r\n mix-blend-mode: luminosity;\r\n }\r\n button{\r\n position: absolute;\r\n bottom: calc(50% - 4px);\r\n left: calc(50% - 4px);\r\n width: 8px;\r\n height: 8px;\r\n z-index: 3;\r\n display: block;\r\n background: none;\r\n border: none;\r\n margin-left: -4px;\r\n margin-bottom: -4px;\r\n padding: 7px;\r\n background-color: #fff;\r\n border-radius: 50%;\r\n &:before{\r\n content:'';\r\n position: absolute;\r\n top: -1px;\r\n left: -1px;\r\n border-radius: 50%;\r\n }\r\n &:after{\r\n content:'';\r\n position: absolute;\r\n top: 0px;\r\n left: 0px;\r\n border-radius: 50%;\r\n width: 10px;\r\n height: 10px;\r\n border: 2px solid #ccc;\r\n }\r\n } \r\n }\r\n .dnn-color-bar {\r\n display: flex;\r\n align-items: center;\r\n margin-top: 15px;\r\n .dnn-color-result {\r\n flex-direction: column;\r\n width: 50px;\r\n height: 50px;\r\n border-radius: 50%;\r\n background: red;\r\n }\r\n .dnn-color-hue{\r\n flex: auto;\r\n margin-left: 10px;\r\n height: 16px;\r\n border: 1px solid #ccc;\r\n position: relative;\r\n background: linear-gradient(\r\n to right, \r\n #f00 0, \r\n #ff0 17%,\r\n #0f0 33%,\r\n #0ff 50%,\r\n #00f 67%,\r\n #f0f 84%,\r\n #f00 100%\r\n );\r\n button{\r\n width: 10px;\r\n height: 20px;\r\n position: absolute;\r\n top: -2px;\r\n left: calc(50% - 4px);\r\n border: 0;\r\n padding: 0;\r\n background-color: transparent;\r\n padding-left: -8px;\r\n &:before{\r\n content:'';\r\n position: absolute;\r\n top: -2px;\r\n left: 0px;\r\n border-radius: 3px;\r\n width: 100%;\r\n height: 100%;\r\n border: 1px solid #ccc;\r\n background-color: #fff;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n .dnn-color-fields{\r\n display:flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n .dnn-color-mode-switch {\r\n display: flex;\r\n align-items: flex-end;\r\n padding: .5em;\r\n button {\r\n background-color: transparent;\r\n border: none;\r\n svg {\r\n width: 3em;\r\n height: 3em;\r\n pointer-events: none;\r\n outline: none;\r\n }\r\n }\r\n }\r\n .dnn-rgb-color-fields {\r\n display: flex;\r\n justify-content: space-evenly;\r\n .dnn-rgb-color-field {\r\n display: flex;\r\n flex-direction: column;\r\n flex: auto;\r\n text-align: center;\r\n padding: .5em;\r\n label {\r\n padding-bottom: .25em;\r\n }\r\n input{\r\n border-radius: var(--dnn-button-radius, 3px);\r\n border: 1px solid #ccc;\r\n padding: 0.5em;\r\n padding-left: 1.3em;\r\n text-align: center;\r\n &.red{\r\n border-color: red;\r\n }\r\n &.green{\r\n border-color: green; \r\n }\r\n &.blue{\r\n border-color: blue;\r\n } \r\n }\r\n }\r\n }\r\n .dnn-hsl-color-fields {\r\n display: flex;\r\n justify-content: space-evenly;\r\n .dnn-hsl-color-field {\r\n display: flex;\r\n flex-direction: column;\r\n flex: auto;\r\n text-align: center;\r\n padding: .5em;\r\n label {\r\n padding-bottom: .25em;\r\n }\r\n input{\r\n border-radius: var(--dnn-button-radius, 3px);\r\n border: 1px solid #ccc;\r\n padding: 0.5em;\r\n padding-left: 1.3em;\r\n text-align: center;\r\n }\r\n }\r\n }\r\n .dnn-hex-color-fields {\r\n display: flex;\r\n justify-content: space-evenly;\r\n .dnn-hex-color-field {\r\n display: flex;\r\n flex-direction: column;\r\n flex: auto;\r\n text-align: center;\r\n padding: .5em;\r\n label {\r\n padding-bottom: .25em;\r\n }\r\n .hex-input{\r\n position: relative;\r\n border-radius: var(--dnn-button-radius, 3px);\r\n border: 1px solid #ccc;\r\n padding: 0.323em;\r\n text-align: center;\r\n input{\r\n border:0;\r\n padding:0;\r\n margin:0;\r\n width:100%;\r\n height:100%;\r\n text-align:center;\r\n }\r\n button{\r\n position: absolute;\r\n height: 100%;\r\n top: 0;\r\n right: 1em;\r\n background-color: transparent;\r\n border:0;\r\n padding:0;\r\n margin:0;\r\n svg{\r\n min-width: 1em;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n} ","/** Reusable DNN UI component to pick a color\r\n * @copyright Copyright (c) .NET Foundation. All rights reserved.\r\n * @license MIT \r\n */\r\n\r\nimport { Component, h, State, Element, Prop, EventEmitter, Event, Watch } from \"@stencil/core\";\r\nimport { ColorInfo } from '../../utilities/colorInfo';\r\nimport { Debounce } from \"../../utilities/debounce\";\r\n\r\n/** Color Picker for Dnn */\r\n@Component({\r\n tag: 'dnn-color-picker',\r\n styleUrl: 'dnn-color-picker.scss',\r\n shadow: true\r\n})\r\nexport class DnnColorPicker {\r\n\r\n @Element() el: HTMLDnnColorPickerElement;\r\n\r\n /** Sets the initial color, must be a valid 8 character hexadecimal string without the # sign. */\r\n @Prop() color: string = \"FFFFFF\";\r\n\r\n /** Sets the width-height ratio of the color picker saturation-lightness box.\r\n * @example 100% renders a perfect square\r\n */\r\n @Prop() colorBoxHeight: string = \"50%\";\r\n \r\n @State() currentColor: ColorInfo;\r\n @State() rgbDisplay: string = \"flex\";\r\n @State() hslDisplay: string = \"none\";\r\n @State() hexDisplay: string = \"none\";\r\n\r\n /** Fires up when the color is changed and emits a ColorInfo object\r\n * @see ../../utilities/colorInfo.ts\r\n */\r\n @Event() colorChanged: EventEmitter<ColorInfo>;\r\n\r\n @Debounce(100)\r\n private colorChangedHandler(color: ColorInfo) {\r\n this.colorChanged.emit(color);\r\n }\r\n\r\n @Watch(\"currentColor\")\r\n handeCurrentColorChanged(newValue: ColorInfo){\r\n this.colorChangedHandler(newValue);\r\n }\r\n \r\n private saturationLightnessBox?: HTMLDivElement;\r\n private hueRange?: HTMLDivElement;\r\n\r\n\r\n componentWillLoad() {\r\n this.handleHexChange(this.color);\r\n }\r\n\r\n componentDidLoad() {\r\n (this.el as unknown as HTMLElement).style.setProperty(\"--color-box-height\", this.colorBoxHeight.toString());\r\n }\r\n \r\n private getHex() {\r\n return this.getDoublet(this.currentColor.red) + this.getDoublet(this.currentColor.green) + this.getDoublet(this.currentColor.blue);\r\n }\r\n\r\n private getContrast() {\r\n return this.currentColor.contrastColor;\r\n }\r\n\r\n private getDoublet(value: number){\r\n const valueString = value.toString(16).toUpperCase();\r\n if (valueString.length === 1){\r\n return '0' + valueString;\r\n }\r\n return valueString;\r\n }\r\n\r\n private handleSaturationLightnessMouseDown = (e) => {\r\n e.preventDefault();\r\n this.handleDragLightnessSaturation(e);\r\n window.addEventListener('mousemove', this.handleDragLightnessSaturation);\r\n window.addEventListener('mouseup', this.handleSaturationLightnessMouseUp);\r\n }\r\n\r\n private handleDragLightnessSaturation = (e) => {\r\n const rect = this.saturationLightnessBox.getBoundingClientRect(); \r\n\r\n let x = e.clientX - rect.left; \r\n if (x < 0) { x = 0}\r\n if (x > rect.width) { x = rect.width}\r\n x = x/rect.width;\r\n\r\n let y = e.clientY - rect.top;\r\n if (y < 0) { y = 0}\r\n if (y > rect.height) { y = rect.height}\r\n y = 1 - (y/rect.height);\r\n\r\n const newColor = new ColorInfo();\r\n newColor.hue = this.currentColor.hue;\r\n newColor.saturation = x;\r\n newColor.lightness = y;\r\n this.currentColor = newColor;\r\n }\r\n\r\n private handleSaturationLightnessMouseUp = () => {\r\n window.removeEventListener('mousemove', this.handleDragLightnessSaturation);\r\n window.removeEventListener('mouseup', this.handleSaturationLightnessMouseUp);\r\n }\r\n\r\n private handleHueMouseDown = (e) => {\r\n e.preventDefault();\r\n this.handleDragHue(e);\r\n window.addEventListener('mousemove', this.handleDragHue);\r\n window.addEventListener('mouseup', this.handleHueMouseUp); \r\n }\r\n\r\n private handleHueMouseUp = () => {\r\n window.removeEventListener('mousemove', this.handleDragHue);\r\n window.removeEventListener('mouseup', this.handleHueMouseUp); \r\n }\r\n\r\n private handleDragHue = (e) => {\r\n const rect = this.hueRange.getBoundingClientRect(); \r\n\r\n let x = e.clientX - rect.left;\r\n if (x < 0) { x = 0}\r\n if (x > rect.width) { x = rect.width}\r\n x = x/rect.width*360; \r\n\r\n const newColor = new ColorInfo();\r\n newColor.hue = x;\r\n newColor.saturation = this.currentColor.saturation;\r\n newColor.lightness = this.currentColor.lightness;\r\n this.currentColor = newColor;\r\n }\r\n\r\n private handleComponentValueChange = (e, channel) => {\r\n let value = parseInt(e.target.value);\r\n if (isNaN(value)) { return }\r\n const newColor = new ColorInfo();\r\n if (value < 0) { value = 0; }\r\n if (value > 255) { value = 255; }\r\n let r = this.currentColor.red;\r\n let g = this.currentColor.green;\r\n let b = this.currentColor.blue;\r\n switch (channel) {\r\n case 'red':\r\n r = value;\r\n break;\r\n case 'green':\r\n g = value;\r\n break;\r\n case 'blue':\r\n b = value;\r\n break;\r\n default:\r\n break;\r\n }\r\n newColor.green = g;\r\n newColor.red = r;\r\n newColor.blue = b;\r\n this.currentColor = newColor;\r\n }\r\n\r\n private handleHSLChange = (e, component) => { \r\n let value = parseInt(e.target.value);\r\n if (isNaN(value)) {return}\r\n const newColor = new ColorInfo();\r\n if (value != null) { \r\n let h = this.currentColor.hue;\r\n let s = this.currentColor.saturation;\r\n let l = this.currentColor.lightness;\r\n switch (component) {\r\n case \"hue\":\r\n if (value < 0) { value = 0}\r\n if (value > 359) { value = 0}\r\n h = value;\r\n break;\r\n case \"saturation\":\r\n if (value < 0) { value = 0}\r\n if (value > 100) { value = 100}\r\n s = value / 100;\r\n break;\r\n case \"lightness\":\r\n if (value < 0) { value = 0}\r\n if (value > 100) { value = 100}\r\n l = value / 100;\r\n break; \r\n default:\r\n break; \r\n }\r\n newColor.hue = h;\r\n newColor.saturation = s;\r\n newColor.lightness = l;\r\n this.currentColor = newColor;\r\n }\r\n }\r\n\r\n private handleHexChange(value: string){\r\n const newColor = new ColorInfo();\r\n if (value.match(/^(?:[\\da-f]{3}|[\\da-f]{6})$/i).length > 0) {\r\n if (value.length === 3){\r\n let expanded = value[0] + value[0] + value[1] + value[1] + value[2] + value [2];\r\n value = expanded;\r\n }\r\n newColor.red = parseInt(value.substr(0,2), 16);\r\n newColor.green = parseInt(value.substr(2,2), 16);\r\n newColor.blue = parseInt(value.substr(4,2), 16);\r\n }\r\n else{\r\n newColor.red = this.currentColor.red;\r\n newColor.green = this.currentColor.green;\r\n newColor.blue = this.currentColor.blue;\r\n }\r\n this.currentColor = newColor;\r\n }\r\n\r\n private switchColorMode(e) {\r\n switch(e.target.id) {\r\n case \"rgb-switch\":\r\n this.rgbDisplay = \"none\";\r\n this.hslDisplay = \"none\";\r\n this.hexDisplay = \"flex\";\r\n break;\r\n case \"hex-switch\":\r\n this.rgbDisplay = \"none\";\r\n this.hslDisplay = \"flex\";\r\n this.hexDisplay = \"none\";\r\n break;\r\n case \"hsl-switch\":\r\n this.rgbDisplay = \"flex\";\r\n this.hslDisplay = \"none\";\r\n this.hexDisplay = \"none\";\r\n break;\r\n default:\r\n this.rgbDisplay = \"flex\";\r\n this.hslDisplay = \"none\";\r\n this.hexDisplay = \"none\";\r\n }\r\n }\r\n\r\n private handleSaturationLightnessKeyDown = (e) => { \r\n let newColor = new ColorInfo();\r\n newColor.hue = this.currentColor.hue;\r\n newColor.saturation = this.currentColor.saturation;\r\n newColor.lightness = this.currentColor.lightness;\r\n\r\n let value = 0.01;\r\n if (e.shiftKey) { value = 0.1 ;}\r\n\r\n switch (e.key) {\r\n case \"ArrowUp\":\r\n newColor.lightness += value;\r\n break;\r\n case \"ArrowDown\":\r\n newColor.lightness -= value;\r\n break;\r\n case \"ArrowLeft\":\r\n newColor.saturation -= value;\r\n break;\r\n case \"ArrowRight\":\r\n newColor.saturation += value;\r\n default:\r\n break; \r\n }\r\n this.currentColor = newColor;\r\n }\r\n\r\n private handleHueKeyDown = (e) => {\r\n let newColor = new ColorInfo();\r\n newColor.hue = this.currentColor.hue;\r\n newColor.saturation = this.currentColor.saturation;\r\n newColor.lightness = this.currentColor.lightness;\r\n\r\n let value = 1;\r\n if (e.shiftKey) { value = 10}\r\n\r\n switch (e.key) {\r\n case \"ArrowLeft\":\r\n newColor.hue -= value;\r\n break;\r\n case \"ArrowRight\":\r\n newColor.hue += value;\r\n default:\r\n break;\r\n }\r\n this.currentColor = newColor;\r\n }\r\n\r\n render() {\r\n const hue = this.currentColor.hue;\r\n const saturation = this.currentColor.saturation;\r\n const lightness = this.currentColor.lightness;\r\n const red = this.currentColor.red;\r\n const green = this.currentColor.green;\r\n const blue = this.currentColor.blue;\r\n\r\n return (\r\n <div class=\"dnn-color-picker\">\r\n <div class=\"dnn-color-sliders\">\r\n <div class=\"dnn-color-s-b\" ref={(element) => this.saturationLightnessBox = element as HTMLDivElement}\r\n style={{backgroundColor: `hsl(${hue},100%,50%)`}}\r\n onMouseDown={this.handleSaturationLightnessMouseDown.bind(this)}\r\n >\r\n <button class=\"dnn-s-b-picker\"\r\n aria-label=\"Press up or down to adjust lightness, left or right to adjust saturation, hold shift to move by 10%\"\r\n role=\"slider\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"100\"\r\n aria-valuetext={`Saturation: ${Math.round(this.currentColor.saturation*100)}%, Lightness: ${Math.round(this.currentColor.lightness*100)}%`}\r\n style={{\r\n left: Math.round(saturation * 100) + \"%\",\r\n bottom: Math.round(lightness * 100) + \"%\"\r\n }}\r\n onKeyDown={(e) => this.handleSaturationLightnessKeyDown(e)}\r\n />\r\n </div>\r\n <div class=\"dnn-color-bar\">\r\n <div class=\"dnn-color-result\" style={{\r\n backgroundColor: '#' + this.getHex(),\r\n boxShadow: \"0 0 2px 1px \" + \"#\" + this.getContrast()\r\n }} \r\n />\r\n <div class=\"dnn-color-hue\"\r\n ref={(element) => this.hueRange = element as HTMLDivElement}\r\n onMouseDown={this.handleHueMouseDown.bind(this)}\r\n >\r\n <button class=\"dnn-hue-picker\"\r\n aria-label=\"Press left or right to adjust hue, hold shift to move by 10 degrees\"\r\n role=\"slider\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"359\"\r\n aria-valuenow={Math.round(hue)}\r\n style={{left: (hue/359*100).toString() + \"%\"}}\r\n onKeyDown={(e) => this.handleHueKeyDown(e)}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"dnn-color-fields\">\r\n <div class=\"dnn-rgb-color-fields\" style={{display: this.rgbDisplay}}>\r\n <div class=\"dnn-rgb-color-field\">\r\n <label>R</label>\r\n <input type=\"number\" min=\"0\" max=\"255\" step=\"1\" class=\"red\" value={red} aria-label=\"red value\"\r\n onChange={(e) => this.handleComponentValueChange(e, 'red')}\r\n />\r\n </div>\r\n <div class=\"dnn-rgb-color-field\">\r\n <label>G</label>\r\n <input type=\"number\" min=\"0\" max=\"255\" class=\"green\" value={green} aria-label=\"green value\"\r\n onChange={(e) => this.handleComponentValueChange(e, 'green')}\r\n />\r\n </div>\r\n <div class=\"dnn-rgb-color-field\">\r\n <label>B</label>\r\n <input type=\"number\" min=\"0\" max=\"255\" class=\"blue\" value={blue} aria-label=\"blue value\"\r\n onChange={(e) => this.handleComponentValueChange(e, 'blue')}\r\n />\r\n </div>\r\n <div class=\"dnn-color-mode-switch\">\r\n <button\r\n id=\"rgb-switch\"\r\n onClick={this.switchColorMode.bind(this)}\r\n aria-label=\"switch to hexadecimal value entry\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z\"/></svg>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"dnn-hsl-color-fields\" style={{display: this.hslDisplay}}>\r\n <div class=\"dnn-hsl-color-field\">\r\n <label>H</label>\r\n <input type=\"number\" min=\"0\" max=\"359\" step={1} value={Math.round(hue)} aria-label=\"Hue\"\r\n onChange={(e) => this.handleHSLChange(e, 'hue')}\r\n />\r\n </div>\r\n <div class=\"dnn-hsl-color-field\">\r\n <label>S</label>\r\n <input type=\"number\" min=\"0\" max=\"100\" step={1} value={Math.round(saturation*100)} aria-label=\"Saturation\"\r\n onChange={(e) => this.handleHSLChange(e, 'saturation')}\r\n />\r\n </div>\r\n <div class=\"dnn-hsl-color-field\">\r\n <label>L</label>\r\n <input type=\"number\" min=\"0\" max=\"100\" step={1} value={Math.round(lightness*100)} aria-label=\"Lightness\"\r\n onChange={(e) => this.handleHSLChange(e, 'lightness')}\r\n />\r\n </div>\r\n <div class=\"dnn-color-mode-switch\">\r\n <button\r\n id=\"hsl-switch\"\r\n onClick={this.switchColorMode.bind(this)}\r\n aria-label=\"Switch to red, green, blue entry mode\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z\"/></svg>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"dnn-hex-color-fields\" style={{display: this.hexDisplay}}>\r\n <div class=\"dnn-hex-color-field\">\r\n <label>HEX</label>\r\n <div class=\"hex-input\">\r\n <input type=\"text\" aria-label=\"Hexadecimal value\"\r\n value={this.getHex()}\r\n onChange={e => this.handleHexChange((e.target as HTMLInputElement).value)}\r\n />\r\n <button\r\n class=\"copy\"\r\n aria-label=\"copy value\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"/></svg>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"dnn-color-mode-switch\">\r\n <button\r\n id=\"hex-switch\"\r\n onClick={this.switchColorMode.bind(this)}\r\n aria-label=\"Switch to hue saturation lightness values\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z\"/></svg>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}"],"version":3}
|
|
1
|
+
{"file":"dnn-color-picker.entry.esm.js","mappings":";;;AAAA;;;;;MAMa,SAAS;EAAtB;IAEY,SAAI,GAAW,CAAC,CAAC;IAWjB,gBAAW,GAAW,CAAC,CAAC;IAWxB,eAAU,GAAW,CAAC,CAAC;GAgJlC;;;;EAlKG,IAAI,GAAG,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE;EAC/B,IAAI,GAAG,CAAC,KAAa;IACjB,IAAI,KAAK,GAAG,CAAC,EAAE;MAAE,KAAK,GAAG,CAAC,CAAC;KAAE;IAC7B,IAAI,KAAK,GAAG,GAAG,EAAE;MAAE,KAAK,GAAG,GAAG,CAAC;KAAE;IACjC,IAAI,CAAC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aAAO,IAAI,EAAC,MAAM,gBAAY,mBAAmB,EAC7C,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,EACpB,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,eAAe,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,GAC3E,EACF,cACI,KAAK,EAAC,MAAM,gBACD,YAAY,IAEvB,WAAK,KAAK,EAAC,4BAA4B,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,IAAC,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAE,EAAA,YAAM,CAAC,EAAC,iIAAiI,GAAE,CAAM,CACvR,CACP,CACJ,EACN,WAAK,KAAK,EAAC,uBAAuB,IAC9B,cACI,EAAE,EAAC,YAAY,EACf,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,gBAC7B,2CAA2C,IAEtD,WAAK,KAAK,EAAC,4BAA4B,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,IAAC,YAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAE,EAAA,YAAM,CAAC,EAAC,iEAAiE,GAAE,CAAM,CACvN,CACP,CACJ,CACJ,CACJ,EACR;GACL;;;;;;AAnYD;EADC,QAAQ,CAAC,GAAG,CAAC;yDAGb;;;;;","names":[],"sources":["./src/utilities/colorInfo.ts","./src/components/dnn-color-picker/dnn-color-picker.scss?tag=dnn-color-picker&encapsulation=shadow","./src/components/dnn-color-picker/dnn-color-picker.tsx"],"sourcesContent":["/** Color utility class with hsl and rgb converters\r\n * based on math at https://en.wikipedia.org/wiki/HSL_and_HSV\r\n * @copyright Copyright (c) .NET Foundation. All rights reserved.\r\n * @license MIT \r\n */\r\n\r\nexport class ColorInfo{\r\n\r\n private _hue: number = 0;\r\n /** gets the color hue\r\n * @returns a number between 0 and 359, could contain decimals\r\n */\r\n get hue() { return this._hue; }\r\n set hue(value: number){\r\n if (value < 0) { value = 0; }\r\n if (value > 359) { value = 359; }\r\n this._hue = value;\r\n }\r\n\r\n private _saturation: number = 0;\r\n /** gets the color saturation\r\n * @returns a number between 0 and 1, could contain decimals\r\n */\r\n get saturation() { return this._saturation; }\r\n set saturation(value: number) {\r\n if (value < 0) { value = 0; }\r\n if (value > 1) { value = 1; }\r\n this._saturation = value;\r\n }\r\n\r\n private _lightness: number = 0;\r\n /** gets the color lightness\r\n * @returns a number between 0 and 1, could contain decimals\r\n */\r\n get lightness() { return this._lightness; }\r\n set lightness(value: number) {\r\n if (value < 0) { value = 0; }\r\n if (value > 1) { value = 1; }\r\n this._lightness = value;\r\n }\r\n\r\n /** gets or sets the red component \r\n * @returns an integer between 0 and 255\r\n */\r\n get red() {\r\n return this.getRGB().red;\r\n }\r\n set red(value) {\r\n this.setHSL(value, this.green, this.blue);\r\n }\r\n\r\n /** gets or sets the green component\r\n * @returns an integer between 0 and 255\r\n */\r\n get green() {\r\n return this.getRGB().green;\r\n }\r\n set green(value: number) {\r\n this.setHSL(this.red, value, this.blue);\r\n }\r\n\r\n /** gets or sets the blue component\r\n * @returns an integer between 0 and 255\r\n */\r\n get blue() {\r\n return this.getRGB().blue;\r\n }\r\n set blue(value: number) {\r\n this.setHSL(this.red, this.green, value);\r\n }\r\n\r\n /** gets or sets the hex color value, expresses as 6 hexadecimal characters.\r\n * @returns hex representation of the color\r\n */\r\n get hex() {\r\n var r = this.getHex(this.red);\r\n var g = this.getHex(this.green);\r\n var b = this.getHex(this.blue);\r\n return r + g + b;\r\n }\r\n set hex(value: string){\r\n this.red = parseInt(value.substr(0,2));\r\n this.green = parseInt(value.substr(2,2));\r\n this.blue = parseInt(value.substr(4,2));\r\n }\r\n\r\n /** gets white or black color that is a good oposite to the current color\r\n * @returns - \"000000\" or \"FFFFFF\"\r\n */\r\n get contrastColor() {\r\n const brightness = (this.red*299 + this.green*587 + this.blue*114) / 1000\r\n if (brightness > 127){\r\n return \"000000\";\r\n }\r\n return \"FFFFFF\";\r\n }\r\n\r\n private getRGB() {\r\n const chroma = (1 - Math.abs((2 * this._lightness) - 1)) * this.saturation;\r\n // find the quandrant of the hue\r\n const quadrant = this._hue / 60;\r\n // calculate the offset from the quandrant center\r\n const offset = chroma * (1 - Math.abs(quadrant % 2 - 1));\r\n\r\n // Apply the chroma to the primary component and the offset to the 2nd most important component\r\n let r = 0, g = 0, b = 0;\r\n if (0 <= quadrant && quadrant <= 1) {\r\n r = chroma; g = offset; // red to yellow\r\n } else if (1 <= quadrant && quadrant <= 2) {\r\n g = chroma; r = offset; // yellow to green\r\n } else if (2 <= quadrant && quadrant <= 3) {\r\n g = chroma; b = offset; // green to cyan\r\n } else if (3 <= quadrant && quadrant <= 4) {\r\n b = chroma; g = offset; // cyan to blue\r\n } else if (4 <= quadrant && quadrant <= 5) {\r\n b = chroma; r = offset; // blue to magenta\r\n } else if (5 <= quadrant && quadrant <= 6) {\r\n r = chroma; b = offset; // magenta to red\r\n }\r\n // calculate the bias to add to all channels to match the lightness\r\n const bias = this._lightness - (chroma / 2);\r\n\r\n return {\r\n red: Math.round((r + bias) * 255),\r\n green: Math.round((g + bias) * 255),\r\n blue: Math.round((b + bias) * 255)\r\n }\r\n }\r\n\r\n private setHSL(red: number, green: number, blue: number) {\r\n // GENERAL DATA\r\n // all math is based on values from 0 to 1\r\n const r = red/255, g = green/255, b = blue/255;\r\n // we need to max, min and the difference between them to derive hsl\r\n const min = Math.min(r, g, b);\r\n const max = Math.max(r, g, b);\r\n const diff = max - min;\r\n let h = 0, s = 0, l = 0;\r\n\r\n // HUE\r\n if (diff === 0) { // neutral\r\n h = 0;\r\n } else if (max === r) { // red (magenta to yellow range)\r\n h = 60 * ((g - b) / diff);\r\n } else if (max === g) { // green (yellow to cyan range)\r\n h = 60 * (2 + ((b - r) / diff));\r\n } else if (max === b) { // blue (cyan to magenta range)\r\n h = 60 * (4 + ((r - g) / diff));\r\n }\r\n if (h < 0) { h = h + 360} // ensures positive hues only\r\n if (h > 359) { h = 359} // ensures we never return 360 for simplicity since it is the same as 0\r\n\r\n // LIGHTNESS\r\n l = (max + min) / 2;\r\n\r\n // SATURATION\r\n if (max === 0 || min === 1) { // pure black or white have no saturation\r\n s = 0;\r\n } else {\r\n s = (max - l) / (Math.min(l, 1 - l));\r\n }\r\n\r\n this._hue = h;\r\n this._saturation = s;\r\n this._lightness = l;\r\n }\r\n\r\n private getHex(value: number){\r\n var hex = value.toString(16);\r\n if (hex.length < 2){\r\n hex = \"0\" + hex;\r\n }\r\n return hex;\r\n }\r\n} ",".dnn-color-picker{\r\n padding: 15px;\r\n max-width: 400px;\r\n .dnn-color-sliders{\r\n display:flex;\r\n flex-direction: column;\r\n min-width: 200px;\r\n .dnn-color-s-b{\r\n border: 1px solid #ccc;\r\n padding-bottom: var(--color-box-height, 50%);\r\n position: relative;\r\n background-color: red;\r\n &:before{\r\n content: '';\r\n position: absolute;\r\n top:0;\r\n left:0;\r\n width: 100%;\r\n height:100%;\r\n z-index:1;\r\n background: linear-gradient(to right, white, red);\r\n mix-blend-mode: saturation;\r\n }\r\n &:after{\r\n content: '';\r\n position: absolute;\r\n top:0;\r\n left:0;\r\n width: 100%;\r\n height:100%;\r\n z-index:2;\r\n background: linear-gradient(to bottom, white, black);\r\n mix-blend-mode: luminosity;\r\n }\r\n button{\r\n position: absolute;\r\n bottom: calc(50% - 4px);\r\n left: calc(50% - 4px);\r\n width: 8px;\r\n height: 8px;\r\n z-index: 3;\r\n display: block;\r\n background: none;\r\n border: none;\r\n margin-left: -4px;\r\n margin-bottom: -4px;\r\n padding: 7px;\r\n background-color: #fff;\r\n border-radius: 50%;\r\n &:before{\r\n content:'';\r\n position: absolute;\r\n top: -1px;\r\n left: -1px;\r\n border-radius: 50%;\r\n }\r\n &:after{\r\n content:'';\r\n position: absolute;\r\n top: 0px;\r\n left: 0px;\r\n border-radius: 50%;\r\n width: 10px;\r\n height: 10px;\r\n border: 2px solid #ccc;\r\n }\r\n } \r\n }\r\n .dnn-color-bar {\r\n display: flex;\r\n align-items: center;\r\n margin-top: 15px;\r\n .dnn-color-result {\r\n flex-direction: column;\r\n width: 50px;\r\n height: 50px;\r\n border-radius: 50%;\r\n background: red;\r\n }\r\n .dnn-color-hue{\r\n flex: auto;\r\n margin-left: 10px;\r\n height: 16px;\r\n border: 1px solid #ccc;\r\n position: relative;\r\n background: linear-gradient(\r\n to right, \r\n #f00 0, \r\n #ff0 17%,\r\n #0f0 33%,\r\n #0ff 50%,\r\n #00f 67%,\r\n #f0f 84%,\r\n #f00 100%\r\n );\r\n button{\r\n width: 10px;\r\n height: 20px;\r\n position: absolute;\r\n top: -2px;\r\n left: calc(50% - 4px);\r\n border: 0;\r\n padding: 0;\r\n background-color: transparent;\r\n padding-left: -8px;\r\n &:before{\r\n content:'';\r\n position: absolute;\r\n top: -2px;\r\n left: 0px;\r\n border-radius: 3px;\r\n width: 100%;\r\n height: 100%;\r\n border: 1px solid #ccc;\r\n background-color: #fff;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n .dnn-color-fields{\r\n display:flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n .dnn-color-mode-switch {\r\n display: flex;\r\n align-items: flex-end;\r\n padding: .5em;\r\n button {\r\n background-color: transparent;\r\n border: none;\r\n svg {\r\n width: 3em;\r\n height: 3em;\r\n pointer-events: none;\r\n outline: none;\r\n }\r\n }\r\n }\r\n .dnn-rgb-color-fields {\r\n display: flex;\r\n justify-content: space-evenly;\r\n .dnn-rgb-color-field {\r\n display: flex;\r\n flex-direction: column;\r\n flex: auto;\r\n text-align: center;\r\n padding: .5em;\r\n label {\r\n padding-bottom: .25em;\r\n }\r\n input{\r\n border-radius: var(--dnn-button-radius, 3px);\r\n border: 1px solid #ccc;\r\n padding: 0.5em;\r\n padding-left: 1.3em;\r\n text-align: center;\r\n &.red{\r\n border-color: red;\r\n }\r\n &.green{\r\n border-color: green; \r\n }\r\n &.blue{\r\n border-color: blue;\r\n } \r\n }\r\n }\r\n }\r\n .dnn-hsl-color-fields {\r\n display: flex;\r\n justify-content: space-evenly;\r\n .dnn-hsl-color-field {\r\n display: flex;\r\n flex-direction: column;\r\n flex: auto;\r\n text-align: center;\r\n padding: .5em;\r\n label {\r\n padding-bottom: .25em;\r\n }\r\n input{\r\n border-radius: var(--dnn-button-radius, 3px);\r\n border: 1px solid #ccc;\r\n padding: 0.5em;\r\n padding-left: 1.3em;\r\n text-align: center;\r\n }\r\n }\r\n }\r\n .dnn-hex-color-fields {\r\n display: flex;\r\n justify-content: space-evenly;\r\n .dnn-hex-color-field {\r\n display: flex;\r\n flex-direction: column;\r\n flex: auto;\r\n text-align: center;\r\n padding: .5em;\r\n label {\r\n padding-bottom: .25em;\r\n }\r\n .hex-input{\r\n position: relative;\r\n border-radius: var(--dnn-button-radius, 3px);\r\n border: 1px solid #ccc;\r\n padding: 0.323em;\r\n text-align: center;\r\n input{\r\n border:0;\r\n padding:0;\r\n margin:0;\r\n width:100%;\r\n height:100%;\r\n text-align:center;\r\n }\r\n button{\r\n position: absolute;\r\n height: 100%;\r\n top: 0;\r\n right: 1em;\r\n background-color: transparent;\r\n border:0;\r\n padding:0;\r\n margin:0;\r\n svg{\r\n min-width: 1em;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n} ","/** Reusable DNN UI component to pick a color\r\n * @copyright Copyright (c) .NET Foundation. All rights reserved.\r\n * @license MIT \r\n */\r\n\r\nimport { Component, h, State, Element, Prop, EventEmitter, Event, Watch } from \"@stencil/core\";\r\nimport { ColorInfo } from '../../utilities/colorInfo';\r\nimport { Debounce } from \"../../utilities/debounce\";\r\n\r\n/** Color Picker for Dnn */\r\n@Component({\r\n tag: 'dnn-color-picker',\r\n styleUrl: 'dnn-color-picker.scss',\r\n shadow: true\r\n})\r\nexport class DnnColorPicker {\r\n\r\n @Element() el: HTMLDnnColorPickerElement;\r\n\r\n /** Sets the initial color, must be a valid 8 character hexadecimal string without the # sign. */\r\n @Prop() color: string = \"FFFFFF\";\r\n\r\n /** Sets the width-height ratio of the color picker saturation-lightness box.\r\n * @example 100% renders a perfect square\r\n */\r\n @Prop() colorBoxHeight: string = \"50%\";\r\n \r\n @State() currentColor: ColorInfo;\r\n @State() rgbDisplay: string = \"flex\";\r\n @State() hslDisplay: string = \"none\";\r\n @State() hexDisplay: string = \"none\";\r\n\r\n /** Fires up when the color is changed and emits a ColorInfo object\r\n * @see ../../utilities/colorInfo.ts\r\n */\r\n @Event() colorChanged: EventEmitter<ColorInfo>;\r\n\r\n @Debounce(100)\r\n private colorChangedHandler(color: ColorInfo) {\r\n this.colorChanged.emit(color);\r\n }\r\n\r\n @Watch(\"currentColor\")\r\n handeCurrentColorChanged(newValue: ColorInfo){\r\n this.colorChangedHandler(newValue);\r\n }\r\n \r\n private saturationLightnessBox?: HTMLDivElement;\r\n private hueRange?: HTMLDivElement;\r\n\r\n\r\n componentWillLoad() {\r\n this.handleHexChange(this.color);\r\n }\r\n\r\n componentDidLoad() {\r\n (this.el as unknown as HTMLElement).style.setProperty(\"--color-box-height\", this.colorBoxHeight.toString());\r\n }\r\n \r\n private getHex() {\r\n return this.getDoublet(this.currentColor.red) + this.getDoublet(this.currentColor.green) + this.getDoublet(this.currentColor.blue);\r\n }\r\n\r\n private getContrast() {\r\n return this.currentColor.contrastColor;\r\n }\r\n\r\n private getDoublet(value: number){\r\n const valueString = value.toString(16).toUpperCase();\r\n if (valueString.length === 1){\r\n return '0' + valueString;\r\n }\r\n return valueString;\r\n }\r\n\r\n private handleSaturationLightnessMouseDown = (e) => {\r\n e.preventDefault();\r\n this.handleDragLightnessSaturation(e);\r\n window.addEventListener('mousemove', this.handleDragLightnessSaturation);\r\n window.addEventListener('mouseup', this.handleSaturationLightnessMouseUp);\r\n }\r\n\r\n private handleDragLightnessSaturation = (e) => {\r\n const rect = this.saturationLightnessBox.getBoundingClientRect(); \r\n\r\n let x = e.clientX - rect.left; \r\n if (x < 0) { x = 0}\r\n if (x > rect.width) { x = rect.width}\r\n x = x/rect.width;\r\n\r\n let y = e.clientY - rect.top;\r\n if (y < 0) { y = 0}\r\n if (y > rect.height) { y = rect.height}\r\n y = 1 - (y/rect.height);\r\n\r\n const newColor = new ColorInfo();\r\n newColor.hue = this.currentColor.hue;\r\n newColor.saturation = x;\r\n newColor.lightness = y;\r\n this.currentColor = newColor;\r\n }\r\n\r\n private handleSaturationLightnessMouseUp = () => {\r\n window.removeEventListener('mousemove', this.handleDragLightnessSaturation);\r\n window.removeEventListener('mouseup', this.handleSaturationLightnessMouseUp);\r\n }\r\n\r\n private handleHueMouseDown = (e) => {\r\n e.preventDefault();\r\n this.handleDragHue(e);\r\n window.addEventListener('mousemove', this.handleDragHue);\r\n window.addEventListener('mouseup', this.handleHueMouseUp); \r\n }\r\n\r\n private handleHueMouseUp = () => {\r\n window.removeEventListener('mousemove', this.handleDragHue);\r\n window.removeEventListener('mouseup', this.handleHueMouseUp); \r\n }\r\n\r\n private handleDragHue = (e) => {\r\n const rect = this.hueRange.getBoundingClientRect(); \r\n\r\n let x = e.clientX - rect.left;\r\n if (x < 0) { x = 0}\r\n if (x > rect.width) { x = rect.width}\r\n x = x/rect.width*360; \r\n\r\n const newColor = new ColorInfo();\r\n newColor.hue = x;\r\n newColor.saturation = this.currentColor.saturation;\r\n newColor.lightness = this.currentColor.lightness;\r\n this.currentColor = newColor;\r\n }\r\n\r\n private handleComponentValueChange = (e, channel) => {\r\n let value = parseInt(e.target.value);\r\n if (isNaN(value)) { return }\r\n const newColor = new ColorInfo();\r\n if (value < 0) { value = 0; }\r\n if (value > 255) { value = 255; }\r\n let r = this.currentColor.red;\r\n let g = this.currentColor.green;\r\n let b = this.currentColor.blue;\r\n switch (channel) {\r\n case 'red':\r\n r = value;\r\n break;\r\n case 'green':\r\n g = value;\r\n break;\r\n case 'blue':\r\n b = value;\r\n break;\r\n default:\r\n break;\r\n }\r\n newColor.green = g;\r\n newColor.red = r;\r\n newColor.blue = b;\r\n this.currentColor = newColor;\r\n }\r\n\r\n private handleHSLChange = (e, component) => { \r\n let value = parseInt(e.target.value);\r\n if (isNaN(value)) {return}\r\n const newColor = new ColorInfo();\r\n if (value != null) { \r\n let h = this.currentColor.hue;\r\n let s = this.currentColor.saturation;\r\n let l = this.currentColor.lightness;\r\n switch (component) {\r\n case \"hue\":\r\n if (value < 0) { value = 0}\r\n if (value > 359) { value = 0}\r\n h = value;\r\n break;\r\n case \"saturation\":\r\n if (value < 0) { value = 0}\r\n if (value > 100) { value = 100}\r\n s = value / 100;\r\n break;\r\n case \"lightness\":\r\n if (value < 0) { value = 0}\r\n if (value > 100) { value = 100}\r\n l = value / 100;\r\n break; \r\n default:\r\n break; \r\n }\r\n newColor.hue = h;\r\n newColor.saturation = s;\r\n newColor.lightness = l;\r\n this.currentColor = newColor;\r\n }\r\n }\r\n\r\n private handleHexChange(value: string){\r\n const newColor = new ColorInfo();\r\n if (value.match(/^(?:[\\da-f]{3}|[\\da-f]{6})$/i).length > 0) {\r\n if (value.length === 3){\r\n let expanded = value[0] + value[0] + value[1] + value[1] + value[2] + value [2];\r\n value = expanded;\r\n }\r\n newColor.red = parseInt(value.substr(0,2), 16);\r\n newColor.green = parseInt(value.substr(2,2), 16);\r\n newColor.blue = parseInt(value.substr(4,2), 16);\r\n }\r\n else{\r\n newColor.red = this.currentColor.red;\r\n newColor.green = this.currentColor.green;\r\n newColor.blue = this.currentColor.blue;\r\n }\r\n this.currentColor = newColor;\r\n }\r\n\r\n private switchColorMode(e) {\r\n switch(e.target.id) {\r\n case \"rgb-switch\":\r\n this.rgbDisplay = \"none\";\r\n this.hslDisplay = \"none\";\r\n this.hexDisplay = \"flex\";\r\n break;\r\n case \"hex-switch\":\r\n this.rgbDisplay = \"none\";\r\n this.hslDisplay = \"flex\";\r\n this.hexDisplay = \"none\";\r\n break;\r\n case \"hsl-switch\":\r\n this.rgbDisplay = \"flex\";\r\n this.hslDisplay = \"none\";\r\n this.hexDisplay = \"none\";\r\n break;\r\n default:\r\n this.rgbDisplay = \"flex\";\r\n this.hslDisplay = \"none\";\r\n this.hexDisplay = \"none\";\r\n }\r\n }\r\n\r\n private handleSaturationLightnessKeyDown = (e) => { \r\n let newColor = new ColorInfo();\r\n newColor.hue = this.currentColor.hue;\r\n newColor.saturation = this.currentColor.saturation;\r\n newColor.lightness = this.currentColor.lightness;\r\n\r\n let value = 0.01;\r\n if (e.shiftKey) { value = 0.1 ;}\r\n\r\n switch (e.key) {\r\n case \"ArrowUp\":\r\n newColor.lightness += value;\r\n break;\r\n case \"ArrowDown\":\r\n newColor.lightness -= value;\r\n break;\r\n case \"ArrowLeft\":\r\n newColor.saturation -= value;\r\n break;\r\n case \"ArrowRight\":\r\n newColor.saturation += value;\r\n default:\r\n break; \r\n }\r\n this.currentColor = newColor;\r\n }\r\n\r\n private handleHueKeyDown = (e) => {\r\n let newColor = new ColorInfo();\r\n newColor.hue = this.currentColor.hue;\r\n newColor.saturation = this.currentColor.saturation;\r\n newColor.lightness = this.currentColor.lightness;\r\n\r\n let value = 1;\r\n if (e.shiftKey) { value = 10}\r\n\r\n switch (e.key) {\r\n case \"ArrowLeft\":\r\n newColor.hue -= value;\r\n break;\r\n case \"ArrowRight\":\r\n newColor.hue += value;\r\n default:\r\n break;\r\n }\r\n this.currentColor = newColor;\r\n }\r\n\r\n render() {\r\n const hue = this.currentColor.hue;\r\n const saturation = this.currentColor.saturation;\r\n const lightness = this.currentColor.lightness;\r\n const red = this.currentColor.red;\r\n const green = this.currentColor.green;\r\n const blue = this.currentColor.blue;\r\n\r\n return (\r\n <div class=\"dnn-color-picker\">\r\n <div class=\"dnn-color-sliders\">\r\n <div class=\"dnn-color-s-b\" ref={(element) => this.saturationLightnessBox = element as HTMLDivElement}\r\n style={{backgroundColor: `hsl(${hue},100%,50%)`}}\r\n onMouseDown={this.handleSaturationLightnessMouseDown.bind(this)}\r\n >\r\n <button class=\"dnn-s-b-picker\"\r\n aria-label=\"Press up or down to adjust lightness, left or right to adjust saturation, hold shift to move by 10%\"\r\n role=\"slider\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"100\"\r\n aria-valuetext={`Saturation: ${Math.round(this.currentColor.saturation*100)}%, Lightness: ${Math.round(this.currentColor.lightness*100)}%`}\r\n style={{\r\n left: Math.round(saturation * 100) + \"%\",\r\n bottom: Math.round(lightness * 100) + \"%\"\r\n }}\r\n onKeyDown={(e) => this.handleSaturationLightnessKeyDown(e)}\r\n />\r\n </div>\r\n <div class=\"dnn-color-bar\">\r\n <div class=\"dnn-color-result\" style={{\r\n backgroundColor: '#' + this.getHex(),\r\n boxShadow: \"0 0 2px 1px \" + \"#\" + this.getContrast()\r\n }} \r\n />\r\n <div class=\"dnn-color-hue\"\r\n ref={(element) => this.hueRange = element as HTMLDivElement}\r\n onMouseDown={this.handleHueMouseDown.bind(this)}\r\n >\r\n <button class=\"dnn-hue-picker\"\r\n aria-label=\"Press left or right to adjust hue, hold shift to move by 10 degrees\"\r\n role=\"slider\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"359\"\r\n aria-valuenow={Math.round(hue)}\r\n style={{left: (hue/359*100).toString() + \"%\"}}\r\n onKeyDown={(e) => this.handleHueKeyDown(e)}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"dnn-color-fields\">\r\n <div class=\"dnn-rgb-color-fields\" style={{display: this.rgbDisplay}}>\r\n <div class=\"dnn-rgb-color-field\">\r\n <label>R</label>\r\n <input type=\"number\" min=\"0\" max=\"255\" step=\"1\" class=\"red\" value={red} aria-label=\"red value\"\r\n onChange={(e) => this.handleComponentValueChange(e, 'red')}\r\n />\r\n </div>\r\n <div class=\"dnn-rgb-color-field\">\r\n <label>G</label>\r\n <input type=\"number\" min=\"0\" max=\"255\" class=\"green\" value={green} aria-label=\"green value\"\r\n onChange={(e) => this.handleComponentValueChange(e, 'green')}\r\n />\r\n </div>\r\n <div class=\"dnn-rgb-color-field\">\r\n <label>B</label>\r\n <input type=\"number\" min=\"0\" max=\"255\" class=\"blue\" value={blue} aria-label=\"blue value\"\r\n onChange={(e) => this.handleComponentValueChange(e, 'blue')}\r\n />\r\n </div>\r\n <div class=\"dnn-color-mode-switch\">\r\n <button\r\n id=\"rgb-switch\"\r\n onClick={this.switchColorMode.bind(this)}\r\n aria-label=\"switch to hexadecimal value entry\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z\"/></svg>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"dnn-hsl-color-fields\" style={{display: this.hslDisplay}}>\r\n <div class=\"dnn-hsl-color-field\">\r\n <label>H</label>\r\n <input type=\"number\" min=\"0\" max=\"359\" step={1} value={Math.round(hue)} aria-label=\"Hue\"\r\n onChange={(e) => this.handleHSLChange(e, 'hue')}\r\n />\r\n </div>\r\n <div class=\"dnn-hsl-color-field\">\r\n <label>S</label>\r\n <input type=\"number\" min=\"0\" max=\"100\" step={1} value={Math.round(saturation*100)} aria-label=\"Saturation\"\r\n onChange={(e) => this.handleHSLChange(e, 'saturation')}\r\n />\r\n </div>\r\n <div class=\"dnn-hsl-color-field\">\r\n <label>L</label>\r\n <input type=\"number\" min=\"0\" max=\"100\" step={1} value={Math.round(lightness*100)} aria-label=\"Lightness\"\r\n onChange={(e) => this.handleHSLChange(e, 'lightness')}\r\n />\r\n </div>\r\n <div class=\"dnn-color-mode-switch\">\r\n <button\r\n id=\"hsl-switch\"\r\n onClick={this.switchColorMode.bind(this)}\r\n aria-label=\"Switch to red, green, blue entry mode\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z\"/></svg>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"dnn-hex-color-fields\" style={{display: this.hexDisplay}}>\r\n <div class=\"dnn-hex-color-field\">\r\n <label>HEX</label>\r\n <div class=\"hex-input\">\r\n <input type=\"text\" aria-label=\"Hexadecimal value\"\r\n value={this.getHex()}\r\n onChange={e => this.handleHexChange((e.target as HTMLInputElement).value)}\r\n />\r\n <button\r\n class=\"copy\"\r\n aria-label=\"copy value\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"/></svg>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"dnn-color-mode-switch\">\r\n <button\r\n id=\"hex-switch\"\r\n onClick={this.switchColorMode.bind(this)}\r\n aria-label=\"Switch to hue saturation lightness values\"\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\" fill=\"#000000\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z\"/></svg>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}"],"version":3}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
System.register(["./index-5c2c8f16.system.js","./debounce-eef81bf7.system.js"],(function(e){"use strict";var n,t,o,r,i;return{setters:[function(e){n=e.r;t=e.e;o=e.h;r=e.g},function(e){i=e.D}],execute:function(){
|
|
2
|
+
/** Color utility class with hsl and rgb converters
|
|
3
|
+
* based on math at https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
4
|
+
* @copyright Copyright (c) .NET Foundation. All rights reserved.
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
var l=function(){function e(){this._hue=0;this._saturation=0;this._lightness=0}Object.defineProperty(e.prototype,"hue",{get:function(){return this._hue},set:function(e){if(e<0){e=0}if(e>359){e=359}this._hue=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"saturation",{get:function(){return this._saturation},set:function(e){if(e<0){e=0}if(e>1){e=1}this._saturation=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"lightness",{get:function(){return this._lightness},set:function(e){if(e<0){e=0}if(e>1){e=1}this._lightness=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"red",{get:function(){return this.getRGB().red},set:function(e){this.setHSL(e,this.green,this.blue)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"green",{get:function(){return this.getRGB().green},set:function(e){this.setHSL(this.red,e,this.blue)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blue",{get:function(){return this.getRGB().blue},set:function(e){this.setHSL(this.red,this.green,e)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hex",{get:function(){var e=this.getHex(this.red);var n=this.getHex(this.green);var t=this.getHex(this.blue);return e+n+t},set:function(e){this.red=parseInt(e.substr(0,2));this.green=parseInt(e.substr(2,2));this.blue=parseInt(e.substr(4,2))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contrastColor",{get:function(){var e=(this.red*299+this.green*587+this.blue*114)/1e3;if(e>127){return"000000"}return"FFFFFF"},enumerable:false,configurable:true});e.prototype.getRGB=function(){var e=(1-Math.abs(2*this._lightness-1))*this.saturation;var n=this._hue/60;var t=e*(1-Math.abs(n%2-1));var o=0,r=0,i=0;if(0<=n&&n<=1){o=e;r=t}else if(1<=n&&n<=2){r=e;o=t}else if(2<=n&&n<=3){r=e;i=t}else if(3<=n&&n<=4){i=e;r=t}else if(4<=n&&n<=5){i=e;o=t}else if(5<=n&&n<=6){o=e;i=t}var l=this._lightness-e/2;return{red:Math.round((o+l)*255),green:Math.round((r+l)*255),blue:Math.round((i+l)*255)}};e.prototype.setHSL=function(e,n,t){var o=e/255,r=n/255,i=t/255;var l=Math.min(o,r,i);var s=Math.max(o,r,i);var a=s-l;var d=0,c=0,u=0;if(a===0){d=0}else if(s===o){d=60*((r-i)/a)}else if(s===r){d=60*(2+(i-o)/a)}else if(s===i){d=60*(4+(o-r)/a)}if(d<0){d=d+360}if(d>359){d=359}u=(s+l)/2;if(s===0||l===1){c=0}else{c=(s-u)/Math.min(u,1-u)}this._hue=d;this._saturation=c;this._lightness=u};e.prototype.getHex=function(e){var n=e.toString(16);if(n.length<2){n="0"+n}return n};return e}();var s='.dnn-color-picker{padding:15px;max-width:400px}.dnn-color-picker .dnn-color-sliders{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:200px}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b{border:1px solid #ccc;padding-bottom:var(--color-box-height, 50%);position:relative;background-color:red}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;background:-webkit-gradient(linear, left top, right top, from(white), to(red));background:linear-gradient(to right, white, red);mix-blend-mode:saturation}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:2;background:-webkit-gradient(linear, left top, left bottom, from(white), to(black));background:linear-gradient(to bottom, white, black);mix-blend-mode:luminosity}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b button{position:absolute;bottom:calc(50% - 4px);left:calc(50% - 4px);width:8px;height:8px;z-index:3;display:block;background:none;border:none;margin-left:-4px;margin-bottom:-4px;padding:7px;background-color:#fff;border-radius:50%}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b button:before{content:"";position:absolute;top:-1px;left:-1px;border-radius:50%}.dnn-color-picker .dnn-color-sliders .dnn-color-s-b button:after{content:"";position:absolute;top:0px;left:0px;border-radius:50%;width:10px;height:10px;border:2px solid #ccc}.dnn-color-picker .dnn-color-sliders .dnn-color-bar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-top:15px}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-result{-ms-flex-direction:column;flex-direction:column;width:50px;height:50px;border-radius:50%;background:red}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-hue{-ms-flex:auto;flex:auto;margin-left:10px;height:16px;border:1px solid #ccc;position:relative;background:-webkit-gradient(linear, left top, right top, color-stop(0, #f00), color-stop(17%, #ff0), color-stop(33%, #0f0), color-stop(50%, #0ff), color-stop(67%, #00f), color-stop(84%, #f0f), to(#f00));background:linear-gradient(to right, #f00 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 84%, #f00 100%)}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-hue button{width:10px;height:20px;position:absolute;top:-2px;left:calc(50% - 4px);border:0;padding:0;background-color:transparent;padding-left:-8px}.dnn-color-picker .dnn-color-sliders .dnn-color-bar .dnn-color-hue button:before{content:"";position:absolute;top:-2px;left:0px;border-radius:3px;width:100%;height:100%;border:1px solid #ccc;background-color:#fff}.dnn-color-picker .dnn-color-fields{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}.dnn-color-picker .dnn-color-fields .dnn-color-mode-switch{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-color-mode-switch button{background-color:transparent;border:none}.dnn-color-picker .dnn-color-fields .dnn-color-mode-switch button svg{width:3em;height:3em;pointer-events:none;outline:none}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields{display:-ms-flexbox;display:flex;-ms-flex-pack:space-evenly;justify-content:space-evenly}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:auto;flex:auto;text-align:center;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field label{padding-bottom:0.25em}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input{border-radius:var(--dnn-button-radius, 3px);border:1px solid #ccc;padding:0.5em;padding-left:1.3em;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input.red{border-color:red}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input.green{border-color:green}.dnn-color-picker .dnn-color-fields .dnn-rgb-color-fields .dnn-rgb-color-field input.blue{border-color:blue}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields{display:-ms-flexbox;display:flex;-ms-flex-pack:space-evenly;justify-content:space-evenly}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields .dnn-hsl-color-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:auto;flex:auto;text-align:center;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields .dnn-hsl-color-field label{padding-bottom:0.25em}.dnn-color-picker .dnn-color-fields .dnn-hsl-color-fields .dnn-hsl-color-field input{border-radius:var(--dnn-button-radius, 3px);border:1px solid #ccc;padding:0.5em;padding-left:1.3em;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields{display:-ms-flexbox;display:flex;-ms-flex-pack:space-evenly;justify-content:space-evenly}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:auto;flex:auto;text-align:center;padding:0.5em}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field label{padding-bottom:0.25em}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input{position:relative;border-radius:var(--dnn-button-radius, 3px);border:1px solid #ccc;padding:0.323em;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input input{border:0;padding:0;margin:0;width:100%;height:100%;text-align:center}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input button{position:absolute;height:100%;top:0;right:1em;background-color:transparent;border:0;padding:0;margin:0}.dnn-color-picker .dnn-color-fields .dnn-hex-color-fields .dnn-hex-color-field .hex-input button svg{min-width:1em}';
|
|
8
|
+
/** Reusable DNN UI component to pick a color
|
|
9
|
+
* @copyright Copyright (c) .NET Foundation. All rights reserved.
|
|
10
|
+
* @license MIT
|
|
11
|
+
*/var a=undefined&&undefined.__decorate||function(e,n,t,o){var r=arguments.length,i=r<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,t):o,l;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(e,n,t,o);else for(var s=e.length-1;s>=0;s--)if(l=e[s])i=(r<3?l(i):r>3?l(n,t,i):l(n,t))||i;return r>3&&i&&Object.defineProperty(n,t,i),i};var d=e("dnn_color_picker",function(){function e(e){var o=this;n(this,e);this.colorChanged=t(this,"colorChanged",7);this.color="FFFFFF";this.colorBoxHeight="50%";this.rgbDisplay="flex";this.hslDisplay="none";this.hexDisplay="none";this.handleSaturationLightnessMouseDown=function(e){e.preventDefault();o.handleDragLightnessSaturation(e);window.addEventListener("mousemove",o.handleDragLightnessSaturation);window.addEventListener("mouseup",o.handleSaturationLightnessMouseUp)};this.handleDragLightnessSaturation=function(e){var n=o.saturationLightnessBox.getBoundingClientRect();var t=e.clientX-n.left;if(t<0){t=0}if(t>n.width){t=n.width}t=t/n.width;var r=e.clientY-n.top;if(r<0){r=0}if(r>n.height){r=n.height}r=1-r/n.height;var i=new l;i.hue=o.currentColor.hue;i.saturation=t;i.lightness=r;o.currentColor=i};this.handleSaturationLightnessMouseUp=function(){window.removeEventListener("mousemove",o.handleDragLightnessSaturation);window.removeEventListener("mouseup",o.handleSaturationLightnessMouseUp)};this.handleHueMouseDown=function(e){e.preventDefault();o.handleDragHue(e);window.addEventListener("mousemove",o.handleDragHue);window.addEventListener("mouseup",o.handleHueMouseUp)};this.handleHueMouseUp=function(){window.removeEventListener("mousemove",o.handleDragHue);window.removeEventListener("mouseup",o.handleHueMouseUp)};this.handleDragHue=function(e){var n=o.hueRange.getBoundingClientRect();var t=e.clientX-n.left;if(t<0){t=0}if(t>n.width){t=n.width}t=t/n.width*360;var r=new l;r.hue=t;r.saturation=o.currentColor.saturation;r.lightness=o.currentColor.lightness;o.currentColor=r};this.handleComponentValueChange=function(e,n){var t=parseInt(e.target.value);if(isNaN(t)){return}var r=new l;if(t<0){t=0}if(t>255){t=255}var i=o.currentColor.red;var s=o.currentColor.green;var a=o.currentColor.blue;switch(n){case"red":i=t;break;case"green":s=t;break;case"blue":a=t;break;default:break}r.green=s;r.red=i;r.blue=a;o.currentColor=r};this.handleHSLChange=function(e,n){var t=parseInt(e.target.value);if(isNaN(t)){return}var r=new l;if(t!=null){var i=o.currentColor.hue;var s=o.currentColor.saturation;var a=o.currentColor.lightness;switch(n){case"hue":if(t<0){t=0}if(t>359){t=0}i=t;break;case"saturation":if(t<0){t=0}if(t>100){t=100}s=t/100;break;case"lightness":if(t<0){t=0}if(t>100){t=100}a=t/100;break;default:break}r.hue=i;r.saturation=s;r.lightness=a;o.currentColor=r}};this.handleSaturationLightnessKeyDown=function(e){var n=new l;n.hue=o.currentColor.hue;n.saturation=o.currentColor.saturation;n.lightness=o.currentColor.lightness;var t=.01;if(e.shiftKey){t=.1}switch(e.key){case"ArrowUp":n.lightness+=t;break;case"ArrowDown":n.lightness-=t;break;case"ArrowLeft":n.saturation-=t;break;case"ArrowRight":n.saturation+=t;default:break}o.currentColor=n};this.handleHueKeyDown=function(e){var n=new l;n.hue=o.currentColor.hue;n.saturation=o.currentColor.saturation;n.lightness=o.currentColor.lightness;var t=1;if(e.shiftKey){t=10}switch(e.key){case"ArrowLeft":n.hue-=t;break;case"ArrowRight":n.hue+=t;default:break}o.currentColor=n}}e.prototype.colorChangedHandler=function(e){this.colorChanged.emit(e)};e.prototype.handeCurrentColorChanged=function(e){this.colorChangedHandler(e)};e.prototype.componentWillLoad=function(){this.handleHexChange(this.color)};e.prototype.componentDidLoad=function(){this.el.style.setProperty("--color-box-height",this.colorBoxHeight.toString())};e.prototype.getHex=function(){return this.getDoublet(this.currentColor.red)+this.getDoublet(this.currentColor.green)+this.getDoublet(this.currentColor.blue)};e.prototype.getContrast=function(){return this.currentColor.contrastColor};e.prototype.getDoublet=function(e){var n=e.toString(16).toUpperCase();if(n.length===1){return"0"+n}return n};e.prototype.handleHexChange=function(e){var n=new l;if(e.match(/^(?:[\da-f]{3}|[\da-f]{6})$/i).length>0){if(e.length===3){var t=e[0]+e[0]+e[1]+e[1]+e[2]+e[2];e=t}n.red=parseInt(e.substr(0,2),16);n.green=parseInt(e.substr(2,2),16);n.blue=parseInt(e.substr(4,2),16)}else{n.red=this.currentColor.red;n.green=this.currentColor.green;n.blue=this.currentColor.blue}this.currentColor=n};e.prototype.switchColorMode=function(e){switch(e.target.id){case"rgb-switch":this.rgbDisplay="none";this.hslDisplay="none";this.hexDisplay="flex";break;case"hex-switch":this.rgbDisplay="none";this.hslDisplay="flex";this.hexDisplay="none";break;case"hsl-switch":this.rgbDisplay="flex";this.hslDisplay="none";this.hexDisplay="none";break;default:this.rgbDisplay="flex";this.hslDisplay="none";this.hexDisplay="none"}};e.prototype.render=function(){var e=this;var n=this.currentColor.hue;var t=this.currentColor.saturation;var r=this.currentColor.lightness;var i=this.currentColor.red;var l=this.currentColor.green;var s=this.currentColor.blue;return o("div",{class:"dnn-color-picker"},o("div",{class:"dnn-color-sliders"},o("div",{class:"dnn-color-s-b",ref:function(n){return e.saturationLightnessBox=n},style:{backgroundColor:"hsl("+n+",100%,50%)"},onMouseDown:this.handleSaturationLightnessMouseDown.bind(this)},o("button",{class:"dnn-s-b-picker","aria-label":"Press up or down to adjust lightness, left or right to adjust saturation, hold shift to move by 10%",role:"slider","aria-valuemin":"0","aria-valuemax":"100","aria-valuetext":"Saturation: "+Math.round(this.currentColor.saturation*100)+"%, Lightness: "+Math.round(this.currentColor.lightness*100)+"%",style:{left:Math.round(t*100)+"%",bottom:Math.round(r*100)+"%"},onKeyDown:function(n){return e.handleSaturationLightnessKeyDown(n)}})),o("div",{class:"dnn-color-bar"},o("div",{class:"dnn-color-result",style:{backgroundColor:"#"+this.getHex(),boxShadow:"0 0 2px 1px "+"#"+this.getContrast()}}),o("div",{class:"dnn-color-hue",ref:function(n){return e.hueRange=n},onMouseDown:this.handleHueMouseDown.bind(this)},o("button",{class:"dnn-hue-picker","aria-label":"Press left or right to adjust hue, hold shift to move by 10 degrees",role:"slider","aria-valuemin":"0","aria-valuemax":"359","aria-valuenow":Math.round(n),style:{left:(n/359*100).toString()+"%"},onKeyDown:function(n){return e.handleHueKeyDown(n)}})))),o("div",{class:"dnn-color-fields"},o("div",{class:"dnn-rgb-color-fields",style:{display:this.rgbDisplay}},o("div",{class:"dnn-rgb-color-field"},o("label",null,"R"),o("input",{type:"number",min:"0",max:"255",step:"1",class:"red",value:i,"aria-label":"red value",onChange:function(n){return e.handleComponentValueChange(n,"red")}})),o("div",{class:"dnn-rgb-color-field"},o("label",null,"G"),o("input",{type:"number",min:"0",max:"255",class:"green",value:l,"aria-label":"green value",onChange:function(n){return e.handleComponentValueChange(n,"green")}})),o("div",{class:"dnn-rgb-color-field"},o("label",null,"B"),o("input",{type:"number",min:"0",max:"255",class:"blue",value:s,"aria-label":"blue value",onChange:function(n){return e.handleComponentValueChange(n,"blue")}})),o("div",{class:"dnn-color-mode-switch"},o("button",{id:"rgb-switch",onClick:this.switchColorMode.bind(this),"aria-label":"switch to hexadecimal value entry"},o("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},o("path",{d:"M0 0h24v24H0z",fill:"none"}),o("path",{d:"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"}))))),o("div",{class:"dnn-hsl-color-fields",style:{display:this.hslDisplay}},o("div",{class:"dnn-hsl-color-field"},o("label",null,"H"),o("input",{type:"number",min:"0",max:"359",step:1,value:Math.round(n),"aria-label":"Hue",onChange:function(n){return e.handleHSLChange(n,"hue")}})),o("div",{class:"dnn-hsl-color-field"},o("label",null,"S"),o("input",{type:"number",min:"0",max:"100",step:1,value:Math.round(t*100),"aria-label":"Saturation",onChange:function(n){return e.handleHSLChange(n,"saturation")}})),o("div",{class:"dnn-hsl-color-field"},o("label",null,"L"),o("input",{type:"number",min:"0",max:"100",step:1,value:Math.round(r*100),"aria-label":"Lightness",onChange:function(n){return e.handleHSLChange(n,"lightness")}})),o("div",{class:"dnn-color-mode-switch"},o("button",{id:"hsl-switch",onClick:this.switchColorMode.bind(this),"aria-label":"Switch to red, green, blue entry mode"},o("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},o("path",{d:"M0 0h24v24H0z",fill:"none"}),o("path",{d:"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"}))))),o("div",{class:"dnn-hex-color-fields",style:{display:this.hexDisplay}},o("div",{class:"dnn-hex-color-field"},o("label",null,"HEX"),o("div",{class:"hex-input"},o("input",{type:"text","aria-label":"Hexadecimal value",value:this.getHex(),onChange:function(n){return e.handleHexChange(n.target.value)}}),o("button",{class:"copy","aria-label":"copy value"},o("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},o("path",{d:"M0 0h24v24H0z",fill:"none"}),o("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"}))))),o("div",{class:"dnn-color-mode-switch"},o("button",{id:"hex-switch",onClick:this.switchColorMode.bind(this),"aria-label":"Switch to hue saturation lightness values"},o("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},o("path",{d:"M0 0h24v24H0z",fill:"none"}),o("path",{d:"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"})))))))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{currentColor:["handeCurrentColorChanged"]}},enumerable:false,configurable:true});return e}());a([i(100)],d.prototype,"colorChangedHandler",null);d.style=s}}}));
|
|
12
|
+
//# sourceMappingURL=dnn-color-picker.system.entry.js.map
|