@dnncommunity/dnn-elements 0.15.1 → 0.15.2
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_17.cjs.entry.js +3 -3
- package/dist/cjs/dnn-button_17.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn.cjs.js +2 -2
- package/dist/cjs/dnn.cjs.js.map +1 -1
- package/dist/cjs/{index-514ef6dd.js → index-81382452.js} +404 -239
- package/dist/cjs/index-81382452.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/dnn-button/dnn-button.js +195 -192
- package/dist/collection/components/dnn-button/dnn-button.stories.js +1 -1
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.js +85 -99
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.stories.js +1 -1
- package/dist/collection/components/dnn-chevron/dnn-chevron.js +92 -87
- package/dist/collection/components/dnn-chevron/dnn-chevron.stories.js +1 -1
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.js +102 -90
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.stories.js +1 -1
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.js +105 -141
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.stories.js +1 -1
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.js +122 -137
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.stories.js +1 -1
- package/dist/collection/components/dnn-image-cropper/CornerType.js +1 -1
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.js +129 -133
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.stories.js +1 -1
- package/dist/collection/components/dnn-modal/dnn-modal.css +5 -0
- package/dist/collection/components/dnn-modal/dnn-modal.js +136 -133
- package/dist/collection/components/dnn-modal/dnn-modal.js.map +1 -1
- package/dist/collection/components/dnn-modal/dnn-modal.stories.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.js +164 -223
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.stories.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/localization-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/permissions-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/role-group-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/role-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/searched-user-interface.js +1 -1
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.js +101 -94
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.stories.js +1 -1
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.js +55 -54
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.stories.js +1 -1
- package/dist/collection/components/dnn-tab/dnn-tab.js +69 -59
- package/dist/collection/components/dnn-tab/dnn-tab.stories.js +1 -1
- package/dist/collection/components/dnn-tabs/dnn-tabs.js +19 -16
- package/dist/collection/components/dnn-tabs/dnn-tabs.stories.js +1 -1
- package/dist/collection/components/dnn-toggle/dnn-toggle.js +83 -75
- package/dist/collection/components/dnn-toggle/dnn-toggle.stories.js +1 -1
- package/dist/collection/components/dnn-toggle/toggle-interface.js +1 -1
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.js +79 -77
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.stories.js +1 -1
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js +20 -24
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.js +1 -1
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js +117 -111
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.js +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/utilities/colorInfo.js +1 -1
- package/dist/collection/utilities/debounce.js +1 -1
- package/dist/collection/utilities/dnnServicesFramework.js +1 -1
- package/dist/collection/utilities/mouseUtilities.js +1 -1
- package/dist/dnn/dnn.esm.js +1 -1
- package/dist/dnn/dnn.esm.js.map +1 -1
- package/dist/dnn/dnn.js +2 -1
- package/dist/dnn/p-21f18e37.system.js +3 -0
- package/dist/dnn/p-21f18e37.system.js.map +1 -0
- package/dist/dnn/p-2a79ad5b.system.entry.js +11 -0
- package/dist/dnn/p-2a79ad5b.system.entry.js.map +1 -0
- package/dist/dnn/{p-5bcf3629.system.js → p-52139080.system.js} +2 -2
- package/dist/dnn/{p-5bcf3629.system.js.map → p-52139080.system.js.map} +1 -1
- package/dist/dnn/{p-909f2db9.entry.js → p-6cc227ab.entry.js} +3 -3
- package/dist/dnn/p-6cc227ab.entry.js.map +1 -0
- package/dist/dnn/p-97d752ed.js +3 -0
- package/dist/dnn/p-97d752ed.js.map +1 -0
- package/dist/esm/dnn-button_17.entry.js +3 -3
- package/dist/esm/dnn-button_17.entry.js.map +1 -1
- package/dist/esm/dnn.js +2 -2
- package/dist/esm/dnn.js.map +1 -1
- package/dist/esm/{index-59e0950f.js → index-e9a3fcad.js} +404 -239
- package/dist/esm/index-e9a3fcad.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm-es5/dnn-button_17.entry.js +2 -2
- package/dist/esm-es5/dnn-button_17.entry.js.map +1 -1
- package/dist/esm-es5/dnn.js +1 -1
- package/dist/esm-es5/dnn.js.map +1 -1
- package/dist/esm-es5/index-e9a3fcad.js +3 -0
- package/dist/esm-es5/index-e9a3fcad.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/components.d.ts +73 -17
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/loader/package.json +1 -0
- package/package.json +14 -14
- package/dist/cjs/index-514ef6dd.js.map +0 -1
- package/dist/dnn/p-3155c8a8.system.entry.js +0 -11
- package/dist/dnn/p-3155c8a8.system.entry.js.map +0 -1
- package/dist/dnn/p-7ffdbed1.js +0 -2
- package/dist/dnn/p-7ffdbed1.js.map +0 -1
- package/dist/dnn/p-909f2db9.entry.js.map +0 -1
- package/dist/dnn/p-b8064287.system.js +0 -2
- package/dist/dnn/p-b8064287.system.js.map +0 -1
- package/dist/esm/index-59e0950f.js.map +0 -1
- package/dist/esm-es5/index-59e0950f.js +0 -2
- package/dist/esm-es5/index-59e0950f.js.map +0 -1
|
@@ -4,11 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6
6
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
8
|
-
|
|
7
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
8
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
+
else
|
|
10
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
11
|
+
if (d = decorators[i])
|
|
12
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
14
|
};
|
|
11
|
-
import {
|
|
15
|
+
import { h } from "@stencil/core";
|
|
12
16
|
import { ColorInfo } from '../../utilities/colorInfo';
|
|
13
17
|
import { Debounce } from "../../utilities/debounce";
|
|
14
18
|
/** Color Picker for Dnn */
|
|
@@ -283,152 +287,112 @@ export class DnnColorPicker {
|
|
|
283
287
|
const red = this.currentColor.red;
|
|
284
288
|
const green = this.currentColor.green;
|
|
285
289
|
const blue = this.currentColor.blue;
|
|
286
|
-
return (h("div", { class: "dnn-color-picker" },
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
h("div", { class: "dnn-color-bar" },
|
|
294
|
-
h("div", { class: "dnn-color-result", style: {
|
|
295
|
-
backgroundColor: '#' + this.getHex(),
|
|
296
|
-
boxShadow: "0 0 2px 1px " + "#" + this.getContrast()
|
|
297
|
-
} }),
|
|
298
|
-
h("div", { class: "dnn-color-hue", ref: (element) => this.hueRange = element, onMouseDown: this.handleHueMouseDown.bind(this) },
|
|
299
|
-
h("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(hue), style: { left: (hue / 359 * 100).toString() + "%" }, onKeyDown: (e) => this.handleHueKeyDown(e) })))),
|
|
300
|
-
h("div", { class: "dnn-color-fields" },
|
|
301
|
-
h("div", { class: "dnn-rgb-color-fields", style: { display: this.rgbDisplay } },
|
|
302
|
-
h("div", { class: "dnn-rgb-color-field" },
|
|
303
|
-
h("label", null, "R"),
|
|
304
|
-
h("input", { type: "number", min: "0", max: "255", step: "1", class: "red", value: red, "aria-label": "red value", onChange: (e) => this.handleComponentValueChange(e, 'red') })),
|
|
305
|
-
h("div", { class: "dnn-rgb-color-field" },
|
|
306
|
-
h("label", null, "G"),
|
|
307
|
-
h("input", { type: "number", min: "0", max: "255", class: "green", value: green, "aria-label": "green value", onChange: (e) => this.handleComponentValueChange(e, 'green') })),
|
|
308
|
-
h("div", { class: "dnn-rgb-color-field" },
|
|
309
|
-
h("label", null, "B"),
|
|
310
|
-
h("input", { type: "number", min: "0", max: "255", class: "blue", value: blue, "aria-label": "blue value", onChange: (e) => this.handleComponentValueChange(e, 'blue') })),
|
|
311
|
-
h("div", { class: "dnn-color-mode-switch" },
|
|
312
|
-
h("button", { id: "rgb-switch", onClick: this.switchColorMode.bind(this), "aria-label": "switch to hexadecimal value entry" },
|
|
313
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
314
|
-
h("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
315
|
-
h("path", { d: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z" }))))),
|
|
316
|
-
h("div", { class: "dnn-hsl-color-fields", style: { display: this.hslDisplay } },
|
|
317
|
-
h("div", { class: "dnn-hsl-color-field" },
|
|
318
|
-
h("label", null, "H"),
|
|
319
|
-
h("input", { type: "number", min: "0", max: "359", step: 1, value: Math.round(hue), "aria-label": "Hue", onChange: (e) => this.handleHSLChange(e, 'hue') })),
|
|
320
|
-
h("div", { class: "dnn-hsl-color-field" },
|
|
321
|
-
h("label", null, "S"),
|
|
322
|
-
h("input", { type: "number", min: "0", max: "100", step: 1, value: Math.round(saturation * 100), "aria-label": "Saturation", onChange: (e) => this.handleHSLChange(e, 'saturation') })),
|
|
323
|
-
h("div", { class: "dnn-hsl-color-field" },
|
|
324
|
-
h("label", null, "L"),
|
|
325
|
-
h("input", { type: "number", min: "0", max: "100", step: 1, value: Math.round(lightness * 100), "aria-label": "Lightness", onChange: (e) => this.handleHSLChange(e, 'lightness') })),
|
|
326
|
-
h("div", { class: "dnn-color-mode-switch" },
|
|
327
|
-
h("button", { id: "hsl-switch", onClick: this.switchColorMode.bind(this), "aria-label": "Switch to red, green, blue entry mode" },
|
|
328
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
329
|
-
h("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
330
|
-
h("path", { d: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z" }))))),
|
|
331
|
-
h("div", { class: "dnn-hex-color-fields", style: { display: this.hexDisplay } },
|
|
332
|
-
h("div", { class: "dnn-hex-color-field" },
|
|
333
|
-
h("label", null, "HEX"),
|
|
334
|
-
h("div", { class: "hex-input" },
|
|
335
|
-
h("input", { type: "text", "aria-label": "Hexadecimal value", value: this.getHex(), onChange: e => this.handleHexChange(e.target.value) }),
|
|
336
|
-
h("button", { class: "copy", "aria-label": "copy value" },
|
|
337
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
338
|
-
h("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
339
|
-
h("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" }))))),
|
|
340
|
-
h("div", { class: "dnn-color-mode-switch" },
|
|
341
|
-
h("button", { id: "hex-switch", onClick: this.switchColorMode.bind(this), "aria-label": "Switch to hue saturation lightness values" },
|
|
342
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
343
|
-
h("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
344
|
-
h("path", { d: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z" }))))))));
|
|
290
|
+
return (h("div", { class: "dnn-color-picker" }, h("div", { class: "dnn-color-sliders" }, h("div", { class: "dnn-color-s-b", ref: (element) => this.saturationLightnessBox = element, style: { backgroundColor: `hsl(${hue},100%,50%)` }, onMouseDown: this.handleSaturationLightnessMouseDown.bind(this) }, h("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: {
|
|
291
|
+
left: Math.round(saturation * 100) + "%",
|
|
292
|
+
bottom: Math.round(lightness * 100) + "%"
|
|
293
|
+
}, onKeyDown: (e) => this.handleSaturationLightnessKeyDown(e) })), h("div", { class: "dnn-color-bar" }, h("div", { class: "dnn-color-result", style: {
|
|
294
|
+
backgroundColor: '#' + this.getHex(),
|
|
295
|
+
boxShadow: "0 0 2px 1px " + "#" + this.getContrast()
|
|
296
|
+
} }), h("div", { class: "dnn-color-hue", ref: (element) => this.hueRange = element, onMouseDown: this.handleHueMouseDown.bind(this) }, h("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(hue), style: { left: (hue / 359 * 100).toString() + "%" }, onKeyDown: (e) => this.handleHueKeyDown(e) })))), h("div", { class: "dnn-color-fields" }, h("div", { class: "dnn-rgb-color-fields", style: { display: this.rgbDisplay } }, h("div", { class: "dnn-rgb-color-field" }, h("label", null, "R"), h("input", { type: "number", min: "0", max: "255", step: "1", class: "red", value: red, "aria-label": "red value", onChange: (e) => this.handleComponentValueChange(e, 'red') })), h("div", { class: "dnn-rgb-color-field" }, h("label", null, "G"), h("input", { type: "number", min: "0", max: "255", class: "green", value: green, "aria-label": "green value", onChange: (e) => this.handleComponentValueChange(e, 'green') })), h("div", { class: "dnn-rgb-color-field" }, h("label", null, "B"), h("input", { type: "number", min: "0", max: "255", class: "blue", value: blue, "aria-label": "blue value", onChange: (e) => this.handleComponentValueChange(e, 'blue') })), h("div", { class: "dnn-color-mode-switch" }, h("button", { id: "rgb-switch", onClick: this.switchColorMode.bind(this), "aria-label": "switch to hexadecimal value entry" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0z", fill: "none" }), h("path", { d: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z" }))))), h("div", { class: "dnn-hsl-color-fields", style: { display: this.hslDisplay } }, h("div", { class: "dnn-hsl-color-field" }, h("label", null, "H"), h("input", { type: "number", min: "0", max: "359", step: 1, value: Math.round(hue), "aria-label": "Hue", onChange: (e) => this.handleHSLChange(e, 'hue') })), h("div", { class: "dnn-hsl-color-field" }, h("label", null, "S"), h("input", { type: "number", min: "0", max: "100", step: 1, value: Math.round(saturation * 100), "aria-label": "Saturation", onChange: (e) => this.handleHSLChange(e, 'saturation') })), h("div", { class: "dnn-hsl-color-field" }, h("label", null, "L"), h("input", { type: "number", min: "0", max: "100", step: 1, value: Math.round(lightness * 100), "aria-label": "Lightness", onChange: (e) => this.handleHSLChange(e, 'lightness') })), h("div", { class: "dnn-color-mode-switch" }, h("button", { id: "hsl-switch", onClick: this.switchColorMode.bind(this), "aria-label": "Switch to red, green, blue entry mode" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0z", fill: "none" }), h("path", { d: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z" }))))), h("div", { class: "dnn-hex-color-fields", style: { display: this.hexDisplay } }, h("div", { class: "dnn-hex-color-field" }, h("label", null, "HEX"), h("div", { class: "hex-input" }, h("input", { type: "text", "aria-label": "Hexadecimal value", value: this.getHex(), onChange: e => this.handleHexChange(e.target.value) }), h("button", { class: "copy", "aria-label": "copy value" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0z", fill: "none" }), h("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" }))))), h("div", { class: "dnn-color-mode-switch" }, h("button", { id: "hex-switch", onClick: this.switchColorMode.bind(this), "aria-label": "Switch to hue saturation lightness values" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0z", fill: "none" }), h("path", { d: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z" }))))))));
|
|
345
297
|
}
|
|
346
298
|
static get is() { return "dnn-color-picker"; }
|
|
347
299
|
static get encapsulation() { return "shadow"; }
|
|
348
|
-
static get originalStyleUrls() {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
"
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
"original": "string",
|
|
378
|
-
"resolved": "string",
|
|
379
|
-
"references": {}
|
|
380
|
-
},
|
|
381
|
-
"required": false,
|
|
382
|
-
"optional": false,
|
|
383
|
-
"docs": {
|
|
384
|
-
"tags": [{
|
|
385
|
-
"name": "example",
|
|
386
|
-
"text": "100% renders a perfect square"
|
|
387
|
-
}],
|
|
388
|
-
"text": "Sets the width-height ratio of the color picker saturation-lightness box."
|
|
389
|
-
},
|
|
390
|
-
"attribute": "color-box-height",
|
|
391
|
-
"reflect": false,
|
|
392
|
-
"defaultValue": "\"50%\""
|
|
393
|
-
}
|
|
394
|
-
}; }
|
|
395
|
-
static get states() { return {
|
|
396
|
-
"currentColor": {},
|
|
397
|
-
"rgbDisplay": {},
|
|
398
|
-
"hslDisplay": {},
|
|
399
|
-
"hexDisplay": {}
|
|
400
|
-
}; }
|
|
401
|
-
static get events() { return [{
|
|
402
|
-
"method": "colorChanged",
|
|
403
|
-
"name": "colorChanged",
|
|
404
|
-
"bubbles": true,
|
|
405
|
-
"cancelable": true,
|
|
406
|
-
"composed": true,
|
|
407
|
-
"docs": {
|
|
408
|
-
"tags": [{
|
|
409
|
-
"name": "see",
|
|
410
|
-
"text": ".. /../utilities/colorInfo.ts"
|
|
411
|
-
}],
|
|
412
|
-
"text": "Fires up when the color is changed and emits a ColorInfo object"
|
|
300
|
+
static get originalStyleUrls() {
|
|
301
|
+
return {
|
|
302
|
+
"$": ["dnn-color-picker.scss"]
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
static get styleUrls() {
|
|
306
|
+
return {
|
|
307
|
+
"$": ["dnn-color-picker.css"]
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
static get properties() {
|
|
311
|
+
return {
|
|
312
|
+
"color": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"mutable": false,
|
|
315
|
+
"complexType": {
|
|
316
|
+
"original": "string",
|
|
317
|
+
"resolved": "string",
|
|
318
|
+
"references": {}
|
|
319
|
+
},
|
|
320
|
+
"required": false,
|
|
321
|
+
"optional": false,
|
|
322
|
+
"docs": {
|
|
323
|
+
"tags": [],
|
|
324
|
+
"text": "Sets the initial color, must be a valid 8 character hexadecimal string without the # sign."
|
|
325
|
+
},
|
|
326
|
+
"attribute": "color",
|
|
327
|
+
"reflect": false,
|
|
328
|
+
"defaultValue": "\"FFFFFF\""
|
|
413
329
|
},
|
|
414
|
-
"
|
|
415
|
-
"
|
|
416
|
-
"
|
|
417
|
-
"
|
|
418
|
-
"
|
|
419
|
-
|
|
420
|
-
|
|
330
|
+
"colorBoxHeight": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"mutable": false,
|
|
333
|
+
"complexType": {
|
|
334
|
+
"original": "string",
|
|
335
|
+
"resolved": "string",
|
|
336
|
+
"references": {}
|
|
337
|
+
},
|
|
338
|
+
"required": false,
|
|
339
|
+
"optional": false,
|
|
340
|
+
"docs": {
|
|
341
|
+
"tags": [{
|
|
342
|
+
"name": "example",
|
|
343
|
+
"text": "100% renders a perfect square"
|
|
344
|
+
}],
|
|
345
|
+
"text": "Sets the width-height ratio of the color picker saturation-lightness box."
|
|
346
|
+
},
|
|
347
|
+
"attribute": "color-box-height",
|
|
348
|
+
"reflect": false,
|
|
349
|
+
"defaultValue": "\"50%\""
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
static get states() {
|
|
354
|
+
return {
|
|
355
|
+
"currentColor": {},
|
|
356
|
+
"rgbDisplay": {},
|
|
357
|
+
"hslDisplay": {},
|
|
358
|
+
"hexDisplay": {}
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
static get events() {
|
|
362
|
+
return [{
|
|
363
|
+
"method": "colorChanged",
|
|
364
|
+
"name": "colorChanged",
|
|
365
|
+
"bubbles": true,
|
|
366
|
+
"cancelable": true,
|
|
367
|
+
"composed": true,
|
|
368
|
+
"docs": {
|
|
369
|
+
"tags": [{
|
|
370
|
+
"name": "see",
|
|
371
|
+
"text": ".. /../utilities/colorInfo.ts"
|
|
372
|
+
}],
|
|
373
|
+
"text": "Fires up when the color is changed and emits a ColorInfo object"
|
|
374
|
+
},
|
|
375
|
+
"complexType": {
|
|
376
|
+
"original": "ColorInfo",
|
|
377
|
+
"resolved": "ColorInfo",
|
|
378
|
+
"references": {
|
|
379
|
+
"ColorInfo": {
|
|
380
|
+
"location": "import",
|
|
381
|
+
"path": "../../utilities/colorInfo"
|
|
382
|
+
}
|
|
421
383
|
}
|
|
422
384
|
}
|
|
423
|
-
}
|
|
424
|
-
|
|
385
|
+
}];
|
|
386
|
+
}
|
|
425
387
|
static get elementRef() { return "el"; }
|
|
426
|
-
static get watchers() {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
388
|
+
static get watchers() {
|
|
389
|
+
return [{
|
|
390
|
+
"propName": "currentColor",
|
|
391
|
+
"methodName": "handeCurrentColorChanged"
|
|
392
|
+
}];
|
|
393
|
+
}
|
|
430
394
|
}
|
|
431
395
|
__decorate([
|
|
432
396
|
Debounce(100)
|
|
433
397
|
], DnnColorPicker.prototype, "colorChangedHandler", null);
|
|
434
|
-
//# sourceMappingURL=dnn-color-picker.js.map
|
|
398
|
+
//# sourceMappingURL=dnn-color-picker.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
2
|
export class DnnDropzone {
|
|
3
3
|
constructor() {
|
|
4
4
|
/** Localization strings */
|
|
@@ -118,149 +118,134 @@ export class DnnDropzone {
|
|
|
118
118
|
}
|
|
119
119
|
render() {
|
|
120
120
|
var _a, _b, _c, _d, _e, _f;
|
|
121
|
-
return (h(Host, { ref: e => this.dropzone = e, class: "dropzone", onDragOver: this.handleDragOver, onDrop: this.handleDrop, onDragLeave: () => this.dropzone.classList.remove("dropping") },
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
h("
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
_c.uploadFile),
|
|
139
|
-
this.canTakeSnapshots &&
|
|
140
|
-
[
|
|
141
|
-
h("p", null,
|
|
142
|
-
"- ", (_d = this.resx) === null || _d === void 0 ? void 0 :
|
|
143
|
-
_d.or,
|
|
144
|
-
" -"),
|
|
145
|
-
h("button", { onClick: () => this.takeSnapshot() },
|
|
146
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
147
|
-
h("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
148
|
-
h("circle", { cx: "12", cy: "12", r: "3.2" }),
|
|
149
|
-
h("path", { d: "M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z" })), (_e = this.resx) === null || _e === void 0 ? void 0 :
|
|
150
|
-
_e.takePicture)
|
|
151
|
-
]
|
|
152
|
-
],
|
|
153
|
-
this.takingPicture &&
|
|
154
|
-
h("div", { class: "video-preview" },
|
|
155
|
-
h("video", { ref: e => this.videoPreview = e }),
|
|
156
|
-
h("button", { onClick: () => this.applySnapshot() },
|
|
157
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
158
|
-
h("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
159
|
-
h("circle", { cx: "12", cy: "12", r: "3.2" }),
|
|
160
|
-
h("path", { d: "M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z" })),
|
|
161
|
-
"\u00A0", (_f = this.resx) === null || _f === void 0 ? void 0 :
|
|
162
|
-
_f.capture))));
|
|
121
|
+
return (h(Host, { ref: e => this.dropzone = e, class: "dropzone", onDragOver: this.handleDragOver, onDrop: this.handleDrop, onDragLeave: () => this.dropzone.classList.remove("dropping") }, !this.takingPicture &&
|
|
122
|
+
[
|
|
123
|
+
h("p", null, (_a = this.resx) === null || _a === void 0 ? void 0 : _a.dragAndDropFile),
|
|
124
|
+
h("p", null, "- ", (_b = this.resx) === null || _b === void 0 ? void 0 :
|
|
125
|
+
_b.or, " -"),
|
|
126
|
+
h("label", { class: "upload-file" }, h("input", { type: "file", ref: el => this.fileInput = el, onChange: e => this.handleUploadButton(e.target) }), h("span", null, h("svg", { 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" }, h("g", null, h("rect", { fill: "none", height: "24", width: "24" })), h("g", null, h("path", { d: "M5,20h14v-2H5V20z M5,10h4v6h6v-6h4l-7-7L5,10z" })))), "\u00A0", (_c = this.resx) === null || _c === void 0 ? void 0 :
|
|
127
|
+
_c.uploadFile),
|
|
128
|
+
this.canTakeSnapshots &&
|
|
129
|
+
[
|
|
130
|
+
h("p", null, "- ", (_d = this.resx) === null || _d === void 0 ? void 0 :
|
|
131
|
+
_d.or, " -"),
|
|
132
|
+
h("button", { onClick: () => this.takeSnapshot() }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0z", fill: "none" }), h("circle", { cx: "12", cy: "12", r: "3.2" }), h("path", { d: "M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z" })), (_e = this.resx) === null || _e === void 0 ? void 0 :
|
|
133
|
+
_e.takePicture)
|
|
134
|
+
]
|
|
135
|
+
], this.takingPicture &&
|
|
136
|
+
h("div", { class: "video-preview" }, h("video", { ref: e => this.videoPreview = e }), h("button", { onClick: () => this.applySnapshot() }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0z", fill: "none" }), h("circle", { cx: "12", cy: "12", r: "3.2" }), h("path", { d: "M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z" })), "\u00A0", (_f = this.resx) === null || _f === void 0 ? void 0 :
|
|
137
|
+
_f.capture))));
|
|
163
138
|
}
|
|
164
139
|
static get is() { return "dnn-dropzone"; }
|
|
165
140
|
static get encapsulation() { return "shadow"; }
|
|
166
|
-
static get originalStyleUrls() {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"
|
|
141
|
+
static get originalStyleUrls() {
|
|
142
|
+
return {
|
|
143
|
+
"$": ["dnn-dropzone.scss"]
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
static get styleUrls() {
|
|
147
|
+
return {
|
|
148
|
+
"$": ["dnn-dropzone.css"]
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
static get properties() {
|
|
152
|
+
return {
|
|
153
|
+
"resx": {
|
|
154
|
+
"type": "unknown",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "{\n dragAndDropFile: string;\n capture: string;\n or: string;\n takePicture: string;\n uploadFile: string;\n }",
|
|
158
|
+
"resolved": "{ dragAndDropFile: string; capture: string; or: string; takePicture: string; uploadFile: string; }",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": false,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": "Localization strings"
|
|
166
|
+
},
|
|
167
|
+
"defaultValue": "{\n dragAndDropFile: \"Drag and drop a file\",\n capture: \"Capture\",\n or: \"or\",\n takePicture: \"Take a picture\",\n uploadFile: \"Upload a file\",\n }"
|
|
180
168
|
},
|
|
181
|
-
"
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
"
|
|
185
|
-
|
|
169
|
+
"allowedExtensions": {
|
|
170
|
+
"type": "unknown",
|
|
171
|
+
"mutable": false,
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "string[]",
|
|
174
|
+
"resolved": "string[]",
|
|
175
|
+
"references": {}
|
|
176
|
+
},
|
|
177
|
+
"required": false,
|
|
178
|
+
"optional": false,
|
|
179
|
+
"docs": {
|
|
180
|
+
"tags": [],
|
|
181
|
+
"text": "A list of allowed file extensions.\nIf not specified, any file is allowed.\nEx: [\"jpg\", \"jped\", \"gif\", \"png\"]"
|
|
182
|
+
}
|
|
186
183
|
},
|
|
187
|
-
"
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
"
|
|
184
|
+
"allowCameraMode": {
|
|
185
|
+
"type": "boolean",
|
|
186
|
+
"mutable": false,
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "boolean",
|
|
189
|
+
"resolved": "boolean",
|
|
190
|
+
"references": {}
|
|
191
|
+
},
|
|
192
|
+
"required": false,
|
|
193
|
+
"optional": false,
|
|
194
|
+
"docs": {
|
|
195
|
+
"tags": [],
|
|
196
|
+
"text": "If true, will allow the user to take a snapshot\nusing the device camera. (only works over https)."
|
|
197
|
+
},
|
|
198
|
+
"attribute": "allow-camera-mode",
|
|
199
|
+
"reflect": false,
|
|
200
|
+
"defaultValue": "false"
|
|
196
201
|
},
|
|
197
|
-
"
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
"
|
|
201
|
-
|
|
202
|
+
"captureQuality": {
|
|
203
|
+
"type": "number",
|
|
204
|
+
"mutable": false,
|
|
205
|
+
"complexType": {
|
|
206
|
+
"original": "number",
|
|
207
|
+
"resolved": "number",
|
|
208
|
+
"references": {}
|
|
209
|
+
},
|
|
210
|
+
"required": false,
|
|
211
|
+
"optional": false,
|
|
212
|
+
"docs": {
|
|
213
|
+
"tags": [],
|
|
214
|
+
"text": "Specifies the jpeg quality for when the device\ncamera is used to generate a picture.\nNeeds to be a number between 0 and 1 and defaults to 0.8"
|
|
215
|
+
},
|
|
216
|
+
"attribute": "capture-quality",
|
|
217
|
+
"reflect": false,
|
|
218
|
+
"defaultValue": "0.8"
|
|
202
219
|
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
"
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
"
|
|
216
|
-
"
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
},
|
|
230
|
-
"required": false,
|
|
231
|
-
"optional": false,
|
|
232
|
-
"docs": {
|
|
233
|
-
"tags": [],
|
|
234
|
-
"text": "Specifies the jpeg quality for when the device\ncamera is used to generate a picture.\nNeeds to be a number between 0 and 1 and defaults to 0.8"
|
|
235
|
-
},
|
|
236
|
-
"attribute": "capture-quality",
|
|
237
|
-
"reflect": false,
|
|
238
|
-
"defaultValue": "0.8"
|
|
239
|
-
}
|
|
240
|
-
}; }
|
|
241
|
-
static get states() { return {
|
|
242
|
-
"canTakeSnapshots": {},
|
|
243
|
-
"takingPicture": {}
|
|
244
|
-
}; }
|
|
245
|
-
static get events() { return [{
|
|
246
|
-
"method": "filesSelected",
|
|
247
|
-
"name": "filesSelected",
|
|
248
|
-
"bubbles": true,
|
|
249
|
-
"cancelable": true,
|
|
250
|
-
"composed": true,
|
|
251
|
-
"docs": {
|
|
252
|
-
"tags": [],
|
|
253
|
-
"text": "Fires when file were selected."
|
|
254
|
-
},
|
|
255
|
-
"complexType": {
|
|
256
|
-
"original": "File[]",
|
|
257
|
-
"resolved": "File[]",
|
|
258
|
-
"references": {
|
|
259
|
-
"File": {
|
|
260
|
-
"location": "global"
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
static get states() {
|
|
223
|
+
return {
|
|
224
|
+
"canTakeSnapshots": {},
|
|
225
|
+
"takingPicture": {}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
static get events() {
|
|
229
|
+
return [{
|
|
230
|
+
"method": "filesSelected",
|
|
231
|
+
"name": "filesSelected",
|
|
232
|
+
"bubbles": true,
|
|
233
|
+
"cancelable": true,
|
|
234
|
+
"composed": true,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Fires when file were selected."
|
|
238
|
+
},
|
|
239
|
+
"complexType": {
|
|
240
|
+
"original": "File[]",
|
|
241
|
+
"resolved": "File[]",
|
|
242
|
+
"references": {
|
|
243
|
+
"File": {
|
|
244
|
+
"location": "global"
|
|
245
|
+
}
|
|
261
246
|
}
|
|
262
247
|
}
|
|
263
|
-
}
|
|
264
|
-
|
|
248
|
+
}];
|
|
249
|
+
}
|
|
265
250
|
}
|
|
266
|
-
//# sourceMappingURL=dnn-dropzone.js.map
|
|
251
|
+
//# sourceMappingURL=dnn-dropzone.js.map
|