Socket
Socket
Sign inDemoInstall

@duetds/components

Package Overview
Dependencies
Maintainers
2
Versions
593
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@duetds/components - npm Package Compare versions

Comparing version 0.0.1-alpha.46 to 0.0.1-alpha.47

lib/cjs/es5/build/chunk-e639420f.js

2

lib/cjs/es5/duet.components.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Duet: Host Data, ES Module/es5 Target
exports.COMPONENTS = [["duet-button", "2m50rmmg", 1, [["accessibleControls", 1, 0, "accessible-controls", 2], ["accessibleExpanded", 1, 0, "accessible-expanded", 4], ["accessibleLabel", 1, 0, "accessible-label", 2], ["accessiblePressed", 1, 0, "accessible-pressed", 4], ["disabled", 1, 0, 1, 4], ["element", 64], ["expand", 1, 0, 1, 4], ["external", 1, 0, 1, 4], ["icon", 1, 0, 1, 2], ["iconRight", 1, 0, "icon-right", 4], ["identifier", 1, 0, 1, 2], ["submit", 1, 0, 1, 4], ["theme", 1, 0, 1, 2], ["url", 1, 0, 1, 2], ["variation", 1, 0, 1, 2]], 1], ["duet-card", "oamrhz8m", 1, [["cardTitle", 1, 0, "card-title", 2], ["element", 64], ["padding", 1, 0, 1, 2], ["theme", 1, 0, 1, 2], ["url", 1, 0, 1, 2]], 1], ["duet-grid", "4eyir5tm", 1, [["element", 64]]], ["duet-grid-cell", "myjarhpv", 1, [["element", 64]]], ["duet-header", "1pvwee9c", 1, [["element", 64], ["position", 1, 0, 1, 2], ["theme", 1, 0, 1, 2]], 1], ["duet-heading", "qslwkqd4", 1, [["element", 64], ["level", 1, 0, 1, 2], ["theme", 1, 0, 1, 2]], 1], ["duet-input", "w8y5gm6a", 1, [["accessibleActiveDescendant", 1, 0, "accessible-active-descendant", 2], ["accessibleAutocomplete", 1, 0, "accessible-autocomplete", 2], ["accessibleControls", 1, 0, "accessible-controls", 2], ["accessibleOwns", 1, 0, "accessible-owns", 2], ["autoComplete", 1, 0, "auto-complete", 2], ["autofocus", 1, 0, 1, 4], ["disabled", 1, 0, 1, 4], ["element", 64], ["expand", 1, 0, 1, 4], ["helpText", 1, 0, "help-text", 2], ["identifier", 1, 0, 1, 2], ["inputPrefix", 1, 0, "input-prefix", 2], ["inputSuffix", 1, 0, "input-suffix", 2], ["label", 1, 0, 1, 2], ["labelHidden", 1, 0, "label-hidden", 4], ["maxLength", 1, 0, "max-length", 8], ["minLength", 1, 0, "min-length", 8], ["name", 1, 0, 1, 2], ["pattern", 1, 0, 1, 2], ["placeholder", 1, 0, 1, 2], ["required", 1, 0, 1, 4], ["role", 1, 0, 1, 2], ["spellCheck", 1, 0, "spell-check", 4], ["theme", 1, 0, 1, 2], ["type", 1, 0, 1, 2], ["value", 2, 1, 1, 2]], 1], ["duet-layout", "yscspavc", 1, [["element", 64], ["variation", 1, 0, 1, 2]], 1], ["duet-paragraph", "hm35g0ru", 1, [["element", 64], ["theme", 1, 0, 1, 2]], 1], ["duet-spinner", "2m50rmmg", 1, [["accessibleLabel", 1, 0, "accessible-label", 2], ["color", 1, 0, 1, 2], ["size", 1, 0, 1, 2]], 1]];
exports.COMPONENTS = [["duet-button", "duet-button", 1, [["accessibleControls", 1, 0, "accessible-controls", 2], ["accessibleExpanded", 1, 0, "accessible-expanded", 4], ["accessibleLabel", 1, 0, "accessible-label", 2], ["accessiblePressed", 1, 0, "accessible-pressed", 4], ["disabled", 1, 0, 1, 4], ["element", 64], ["expand", 1, 0, 1, 4], ["external", 1, 0, 1, 4], ["icon", 1, 0, 1, 2], ["iconRight", 1, 0, "icon-right", 4], ["identifier", 1, 0, 1, 2], ["submit", 1, 0, 1, 4], ["theme", 1, 0, 1, 2], ["url", 1, 0, 1, 2], ["variation", 1, 0, 1, 2]], 1], ["duet-card", "duet-card", 1, [["cardTitle", 1, 0, "card-title", 2], ["element", 64], ["padding", 1, 0, 1, 2], ["theme", 1, 0, 1, 2], ["url", 1, 0, 1, 2]], 1], ["duet-grid", "duet-grid", 1, [["element", 64]]], ["duet-grid-cell", "duet-grid-cell", 1, [["element", 64]]], ["duet-header", "duet-header", 1, [["element", 64], ["position", 1, 0, 1, 2], ["theme", 1, 0, 1, 2]], 1], ["duet-heading", "duet-heading", 1, [["element", 64], ["level", 1, 0, 1, 2], ["theme", 1, 0, 1, 2]], 1], ["duet-input", "duet-input", 1, [["accessibleActiveDescendant", 1, 0, "accessible-active-descendant", 2], ["accessibleAutocomplete", 1, 0, "accessible-autocomplete", 2], ["accessibleControls", 1, 0, "accessible-controls", 2], ["accessibleOwns", 1, 0, "accessible-owns", 2], ["autoComplete", 1, 0, "auto-complete", 2], ["autofocus", 1, 0, 1, 4], ["disabled", 1, 0, 1, 4], ["element", 64], ["expand", 1, 0, 1, 4], ["helpText", 1, 0, "help-text", 2], ["identifier", 1, 0, 1, 2], ["inputPrefix", 1, 0, "input-prefix", 2], ["inputSuffix", 1, 0, "input-suffix", 2], ["label", 1, 0, 1, 2], ["labelHidden", 1, 0, "label-hidden", 4], ["maxLength", 1, 0, "max-length", 8], ["minLength", 1, 0, "min-length", 8], ["name", 1, 0, 1, 2], ["pattern", 1, 0, 1, 2], ["placeholder", 1, 0, 1, 2], ["required", 1, 0, 1, 4], ["role", 1, 0, 1, 2], ["spellCheck", 1, 0, "spell-check", 4], ["theme", 1, 0, 1, 2], ["type", 1, 0, 1, 2], ["value", 2, 1, 1, 2]], 1], ["duet-layout", "duet-layout", 1, [["element", 64], ["variation", 1, 0, 1, 2]], 1], ["duet-paragraph", "duet-paragraph", 1, [["element", 64], ["theme", 1, 0, 1, 2]], 1], ["duet-prototype-header", "duet-prototype-header", 1, [["element", 64]]], ["duet-spinner", "duet-button", 1, [["accessibleLabel", 1, 0, "accessible-label", 2], ["color", 1, 0, 1, 2], ["size", 1, 0, 1, 2]], 1]];

@@ -443,2 +443,18 @@ {

{
"tag": "duet-prototype-header",
"dependencies": [],
"componentClass": "DuetPrototypeHeader",
"componentPath": "components/duet-prototype-header/duet-prototype-header.js",
"styles": {
"$": {
"stylePaths": [
"components/duet-prototype-header/duet-prototype-header.scss"
]
}
},
"hostElement": {
"name": "element"
}
},
{
"tag": "duet-spinner",

@@ -445,0 +461,0 @@ "dependencies": [],

@@ -6,13 +6,46 @@ import { applyThemeClasses } from "../../utils/applyThemeClasses";

constructor() {
/**
* If a button expands or collapses adjacent content, then use the ariaExpanded prop to add the aria-expanded attribute to the button. Set the value to convey the current expanded (true) or collapsed (false) state of the content.
*/
this.accessibleExpanded = false;
/**
* Tells screen reader the element is pressed.
*/
this.accessiblePressed = false;
/**
* Style variation of the button. Can be one of: default, primary, secondary, negative, loading, destructive, plain.
*/
this.variation = "default";
/**
* Theme of the button. Can be one of: default, turva.
*/
this.theme = "default";
/**
* Expands the button to fill 100% of the container width.
*/
this.expand = false;
/**
* Makes the button component disabled. This prevents users from being able to interact with the button, and conveys its inactive state to assistive technologies.
*/
this.disabled = false;
/**
* Allows the button to submit a form.
*/
this.submit = false;
/**
* Forces URL to open in a new browser tab. Used together with URL prop.
*/
this.external = false;
/**
* Icon to display to the left of the button content
*/
this.icon = "";
/**
* Show icon on the right side of the button content.
*/
this.iconRight = false;
}
/**
* Handle click event
*/
handleClick(e) {

@@ -24,2 +57,5 @@ if (!this.disabled) {

}
/**
* Handle blur event
*/
handleBlur(e) {

@@ -31,2 +67,5 @@ if (!this.disabled) {

}
/**
* Handle focus event
*/
handleFocus(e) {

@@ -38,7 +77,14 @@ if (!this.disabled) {

}
/**
* componentDidLoad() function
*/
componentDidLoad() {
// When component loads, check if global Turva theme exists.
applyThemeClasses(this.element);
// Create mutation observer and apply needed theme classes
// inside Shadow DOM when necessary.
this.mutationObserver = new MutationObserver(() => {
applyThemeClasses(this.element);
});
// Observe for className changes in <html> element.
this.mutationObserver.observe(document.documentElement, {

@@ -50,9 +96,18 @@ attributes: true,

}
/**
* componentDidUnload() function
*/
componentDidUnload() {
this.mutationObserver.disconnect();
}
/**
* render() function
* Always the last one in the class.
*/
render() {
// If user wants expanded component, add necessary classes
if (this.expand) {
this.element.classList.add("duet-expand");
}
// Set constants for button type and classes used.
const type = this.submit ? "submit" : "button";

@@ -70,2 +125,3 @@ const containerClasses = classNames("duet-button-container", {

});
// If URL prop exists render an anchor instead of a button.
if (this.url) {

@@ -75,5 +131,6 @@ return (h("div", { class: containerClasses },

h("span", { class: "duet-button-contents" },
this.icon !== "" ? (h("span", { class: iconClasses, innerHTML: duetIcons[this.icon].svg })) : (""),
this.icon !== "" ? h("span", { class: iconClasses, innerHTML: duetIcons[this.icon].svg }) : "",
h("slot", null))),
this.variation === "loading" ? h("duet-spinner", null) : ""));
// If URL prop doesn’t exist, render a regular button.
}

@@ -84,3 +141,3 @@ else {

h("span", { class: "duet-button-contents" },
this.icon !== "" ? (h("span", { class: iconClasses, innerHTML: duetIcons[this.icon].svg })) : (""),
this.icon !== "" ? h("span", { class: iconClasses, innerHTML: duetIcons[this.icon].svg }) : "",
h("slot", null))),

@@ -87,0 +144,0 @@ this.variation === "loading" ? h("duet-spinner", null) : ""));

@@ -5,11 +5,27 @@ import { applyThemeClasses } from "../../utils/applyThemeClasses";

constructor() {
/**
* The content for the card title
*/
this.cardTitle = "";
/**
* The padding for the card. Can be one of: large, medium, small.
*/
this.padding = "small";
/**
* Theme of the card. Can be one of: default, turva.
*/
this.theme = "default";
}
/**
* componentDidLoad() function
*/
componentDidLoad() {
// When component loads, check if global Turva theme exists.
applyThemeClasses(this.element);
// Create mutation observer and apply needed theme classes
// inside Shadow DOM when necessary.
this.mutationObserver = new MutationObserver(() => {
applyThemeClasses(this.element);
});
// Observe for className changes in <html> element.
this.mutationObserver.observe(document.documentElement, {

@@ -21,9 +37,18 @@ attributes: true,

}
/**
* componentDidUnload() function
*/
componentDidUnload() {
this.mutationObserver.disconnect();
}
/**
* render() function
* Always the last one in the class.
*/
render() {
// Set constants for card type and classes used.
const cardClasses = classNames("duet-card", `${this.padding}`, {
"duet-theme-turva": this.theme === "turva",
});
// If URL prop exists render an anchor instead of a div
if (this.url) {

@@ -33,2 +58,3 @@ return (h("a", { href: this.url, class: cardClasses },

h("slot", null)));
// If URL prop doesn’t exist, render a regular div
}

@@ -35,0 +61,0 @@ else {

export class DuetGridCell {
/**
* render() function
* Always the last one in the class.
*/
render() {

@@ -3,0 +7,0 @@ return (h("div", { class: "duet-grid-cell" },

export class DuetGrid {
/**
* render() function
* Always the last one in the class.
*/
render() {

@@ -3,0 +7,0 @@ return (h("div", { class: "duet-grid" },

@@ -5,10 +5,23 @@ import { applyThemeClasses } from "../../utils/applyThemeClasses";

constructor() {
/**
* Theme of the card. Can be one of: default, turva.
*/
this.theme = "default";
/**
* CSS Position for the header. Can be one of: relative, absolute, fixed.
*/
this.position = "fixed";
}
/**
* componentDidLoad() function
*/
componentDidLoad() {
// When component loads, check if global Turva theme exists.
applyThemeClasses(this.element);
// Create mutation observer and apply needed theme classes
// inside Shadow DOM when necessary.
this.mutationObserver = new MutationObserver(() => {
applyThemeClasses(this.element);
});
// Observe for className changes in <html> element.
this.mutationObserver.observe(document.documentElement, {

@@ -20,9 +33,18 @@ attributes: true,

}
/**
* componentDidUnload() function
*/
componentDidUnload() {
this.mutationObserver.disconnect();
}
/**
* render() function
* Always the last one in the class.
*/
render() {
// Set constants for card type and classes used.
const headerClasses = classNames("duet-header", {
"duet-theme-turva": this.theme === "turva",
});
// Set correct position
this.element.style.setProperty("position", this.position);

@@ -29,0 +51,0 @@ return (h("header", { class: headerClasses },

@@ -5,10 +5,23 @@ import { applyThemeClasses } from "../../utils/applyThemeClasses";

constructor() {
/**
* The heading level used for the heading. Can be one of: h1, h2, h3, h4, h5, h6.
*/
this.level = "h2";
/**
* Theme of the card. Can be one of: default, turva.
*/
this.theme = "default";
}
/**
* componentDidLoad() function
*/
componentDidLoad() {
// When component loads, check if global Turva theme exists.
applyThemeClasses(this.element);
// Create mutation observer and apply needed theme classes
// inside Shadow DOM when necessary.
this.mutationObserver = new MutationObserver(() => {
applyThemeClasses(this.element);
});
// Observe for className changes in <html> element.
this.mutationObserver.observe(document.documentElement, {

@@ -20,6 +33,14 @@ attributes: true,

}
/**
* componentDidUnload() function
*/
componentDidUnload() {
this.mutationObserver.disconnect();
}
/**
* render() function
* Always the last one in the class.
*/
render() {
// Set constants for heading type and classes used.
const headingClasses = classNames("duet-heading", `${this.level}`, {

@@ -26,0 +47,0 @@ "duet-theme-turva": this.theme === "turva",

@@ -6,13 +6,46 @@ import { applyThemeClasses } from "../../utils/applyThemeClasses";

constructor() {
/**
* Theme of the input. Can be one of: default, turva.
*/
this.theme = "default";
/**
* Expands the input to fill 100% of the container width.
*/
this.expand = false;
/**
* Makes the input component disabled. This prevents users from being able to interact with the input, and conveys its inactive state to assistive technologies.
*/
this.disabled = false;
/**
* Automatically focus the input.
*/
this.autofocus = false;
/**
* Set whether the input is required or not.
*/
this.required = false;
/**
* Type of the input. Can be one of: text, email, number, password, search, tel, time.
*/
this.type = "text";
/**
* Label for the input.
*/
this.label = "label";
/**
* Visually hide the label, but still show it to screen readers.
*/
this.labelHidden = false;
/**
* Indicate whether value should have spelling checked
*/
this.spellCheck = false;
/**
* Enable or disable automatic completion by the browser
*/
this.autoComplete = "on";
}
/**
* Handle click event
*/
handleClick(e) {

@@ -24,2 +57,5 @@ if (!this.disabled) {

}
/**
* Handle user input event
*/
handleInput(e) {

@@ -31,2 +67,5 @@ if (!this.disabled) {

}
/**
* Handle blur event
*/
handleBlur(e) {

@@ -38,2 +77,5 @@ if (!this.disabled) {

}
/**
* Handle focus event
*/
handleFocus(e) {

@@ -45,7 +87,14 @@ if (!this.disabled) {

}
/**
* componentDidLoad() function
*/
componentDidLoad() {
// When component loads, check if global Turva theme exists.
applyThemeClasses(this.element);
// Create mutation observer and apply needed theme classes
// inside Shadow DOM when necessary.
this.mutationObserver = new MutationObserver(() => {
applyThemeClasses(this.element);
});
// Observe for className changes in <html> element.
this.mutationObserver.observe(document.documentElement, {

@@ -57,9 +106,18 @@ attributes: true,

}
/**
* componentDidUnload() function
*/
componentDidUnload() {
this.mutationObserver.disconnect();
}
/**
* render() function
* Always the last one in the class.
*/
render() {
// If user wants expanded component, add necessary classes
if (this.expand) {
this.element.classList.add("duet-expand");
}
// Set constants for input type and classes used.
const containerClasses = classNames("duet-input-container", {

@@ -73,2 +131,3 @@ "duet-theme-turva": this.theme === "turva",

});
// Set validation regexes
let regexType = false;

@@ -75,0 +134,0 @@ if (this.type === "tel") {

export class DuetLayout {
constructor() {
/**
* Layout variation. Can be one of: one-column, two-column.
*/
this.variation = "one-column";
}
/**
* render() function
* Always the last one in the class.
*/
render() {

@@ -6,0 +13,0 @@ return (h("div", { class: "duet-layout" },

@@ -5,9 +5,19 @@ import { applyThemeClasses } from "../../utils/applyThemeClasses";

constructor() {
/**
* Theme of the card. Can be one of: default, turva.
*/
this.theme = "default";
}
/**
* componentDidLoad() function
*/
componentDidLoad() {
// When component loads, check if global Turva theme exists.
applyThemeClasses(this.element);
// Create mutation observer and apply needed theme classes
// inside Shadow DOM when necessary.
this.mutationObserver = new MutationObserver(() => {
applyThemeClasses(this.element);
});
// Observe for className changes in <html> element.
this.mutationObserver.observe(document.documentElement, {

@@ -19,6 +29,14 @@ attributes: true,

}
/**
* componentDidUnload() function
*/
componentDidUnload() {
this.mutationObserver.disconnect();
}
/**
* render() function
* Always the last one in the class.
*/
render() {
// Set constants for heading type and classes used.
const paragraphClasses = classNames("duet-paragraph", {

@@ -25,0 +43,0 @@ "duet-theme-turva": this.theme === "turva",

@@ -5,5 +5,15 @@ import tokens from "@duetds/tokens";

constructor() {
/**
* Color of the spinner, as a design token. Example: “tokens.colorPrimary”.
*/
this.color = tokens.colorGrayLightest;
/**
* Size variation of the spinner. Can be one of: small, medium, large.
*/
this.size = "small";
}
/**
* render() function
* Always the last one in the class.
*/
render() {

@@ -10,0 +20,0 @@ const classes = classNames("duet-spinner", `${this.size}`);

export function applyThemeClasses(element) {
// First, check whether the component has Turva theme enabled locally.
if (element.getAttribute("theme") !== "turva") {
// If Turva theme isn’t enabled locally, set constants.
// The last child is the root node of Duet component.
const themeClass = "duet-theme-turva";
const shadowNode = element.shadowRoot.lastChild;
const hasClass = document.documentElement.classList.contains(themeClass);
// If global Turva theme is active, enable it for our component.
if (shadowNode && hasClass) {
shadowNode.classList.add(themeClass);
// If global turva theme isn’t active, disable it for our component.
}

@@ -9,0 +14,0 @@ else if (shadowNode && !hasClass) {

@@ -0,1 +1,2 @@

// tslint:disable-next-line:no-empty
export function noop() { }

@@ -2,0 +3,0 @@ export function createUniqueId(prefix) {

@@ -1,1 +0,134 @@

!function(e,t,r,n,s,i,u,o,d,c,a,l,p,h){for(a=e.Duet=e.Duet||{},(l=t.createElement("style")).innerHTML=d+"{visibility:hidden}.hydrated{visibility:inherit}",l.setAttribute("data-styles",""),p=t.head.querySelector("meta[charset]"),t.head.insertBefore(l,p?p.nextSibling:t.head.firstChild),function(e,t,r){(e["s-apps"]=e["s-apps"]||[]).push("Duet"),r.componentOnReady||(r.componentOnReady=function(){var t=this;function r(r){if(t.nodeName.indexOf("-")>0){for(var n=e["s-apps"],s=0,i=0;i<n.length;i++)if(e[n[i]].componentOnReady){if(e[n[i]].componentOnReady(t,r))return;s++}if(s<n.length)return void(e["s-cr"]=e["s-cr"]||[]).push([t,r])}r(null)}return e.Promise?new e.Promise(r):{then:r}})}(e,0,c),s=s||a.resourcesUrl,l=(p=t.querySelectorAll("script")).length-1;l>=0&&!(h=p[l]).src&&!h.hasAttribute("data-resources-url");l--);p=h.getAttribute("data-resources-url"),!s&&p&&(s=p),!s&&h.src&&(s=(p=h.src.split("/").slice(0,-1)).join("/")+(p.length?"/":"")+"duet/"),l=t.createElement("script"),function(e,t,r,n){return!(t.search.indexOf("core=esm")>0)&&(!(!(t.search.indexOf("core=es5")>0||"file:"===t.protocol)&&e.customElements&&e.customElements.define&&e.fetch&&e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")&&"noModule"in r)||function(e){try{return new Function('import("")'),!1}catch(e){}return!0}())}(e,e.location,l)?l.src=s+"duet.sblhfxf0.js":(l.src=s+"duet.b8fwpbjs.js",l.setAttribute("type","module"),l.setAttribute("crossorigin",!0)),l.setAttribute("data-resources-url",s),l.setAttribute("data-namespace","duet"),t.head.appendChild(l)}(window,document,0,0,0,0,0,0,"duet-button,duet-card,duet-grid,duet-grid-cell,duet-header,duet-heading,duet-input,duet-layout,duet-paragraph,duet-spinner",HTMLElement.prototype);
(function(win, doc, namespace, fsNamespace, resourcesUrl, appCore, appCoreSsr, appCorePolyfilled, hydratedCssClass, components) {
function init(win, doc, namespace, fsNamespace, resourcesUrl, appCore, appCorePolyfilled, hydratedCssClass, cmpTags, HTMLElementPrototype, App, x, y, scriptElm) {
// create global namespace if it doesn't already exist
App = win[namespace] = win[namespace] || {};
if (cmpTags) {
// auto hide components until they been fully hydrated
// reusing the "x" and "i" variables from the args for funzies
x = doc.createElement('style');
x.innerHTML = cmpTags + '{visibility:hidden}.' + hydratedCssClass + '{visibility:inherit}';
x.setAttribute('data-styles', '');
y = doc.head.querySelector('meta[charset]');
doc.head.insertBefore(x, y ? y.nextSibling : doc.head.firstChild);
}
createComponentOnReadyPrototype(win, namespace, HTMLElementPrototype);
resourcesUrl = resourcesUrl || App.resourcesUrl;
// figure out the script element for this current script
y = doc.querySelectorAll('script');
for (x = y.length - 1; x >= 0; x--) {
scriptElm = y[x];
if (scriptElm.src || scriptElm.hasAttribute('data-resources-url')) {
break;
}
}
// get the resource path attribute on this script element
y = scriptElm.getAttribute('data-resources-url');
if (!resourcesUrl && y) {
// the script element has a data-resources-url attribute, always use that
resourcesUrl = y;
}
if (!resourcesUrl && scriptElm.src) {
// we don't have an exact resourcesUrl, so let's
// figure it out relative to this script's src and app's filesystem namespace
y = scriptElm.src.split('/').slice(0, -1);
resourcesUrl = (y.join('/')) + (y.length ? '/' : '') + fsNamespace + '/';
}
// request the core this browser needs
// test for native support of custom elements and fetch
// if either of those are not supported, then use the core w/ polyfills
// also check if the page was build with ssr or not
x = doc.createElement('script');
if (usePolyfills(win, win.location, x, 'import("")')) {
// requires the es5/polyfilled core
x.src = resourcesUrl + appCorePolyfilled;
}
else {
// let's do this!
x.src = resourcesUrl + appCore;
x.setAttribute('type', 'module');
x.setAttribute('crossorigin', true);
}
x.setAttribute('data-resources-url', resourcesUrl);
x.setAttribute('data-namespace', fsNamespace);
doc.head.appendChild(x);
}
function usePolyfills(win, location, scriptElm, dynamicImportTest) {
// fyi, dev mode has verbose if/return statements
// but it minifies to a nice 'lil one-liner ;)
if (location.search.indexOf('core=esm') > 0) {
// force esm build
return false;
}
if ((location.search.indexOf('core=es5') > 0) ||
(location.protocol === 'file:') ||
(!(win.customElements && win.customElements.define)) ||
(!win.fetch) ||
(!(win.CSS && win.CSS.supports && win.CSS.supports('color', 'var(--c)'))) ||
(!('noModule' in scriptElm))) {
// es5 build w/ polyfills
return true;
}
// final test to see if this browser support dynamic imports
return doesNotSupportsDynamicImports(dynamicImportTest);
}
function doesNotSupportsDynamicImports(dynamicImportTest) {
try {
new Function(dynamicImportTest);
return false;
}
catch (e) { }
return true;
}
function createComponentOnReadyPrototype(win, namespace, HTMLElementPrototype) {
(win['s-apps'] = win['s-apps'] || []).push(namespace);
if (!HTMLElementPrototype.componentOnReady) {
HTMLElementPrototype.componentOnReady = function componentOnReady() {
/*tslint:disable*/
var elm = this;
function executor(resolve) {
if (elm.nodeName.indexOf('-') > 0) {
// window hasn't loaded yet and there's a
// good chance this is a custom element
var apps = win['s-apps'];
var appsReady = 0;
// loop through all the app namespaces
for (var i = 0; i < apps.length; i++) {
// see if this app has "componentOnReady" setup
if (win[apps[i]].componentOnReady) {
// this app's core has loaded call its "componentOnReady"
if (win[apps[i]].componentOnReady(elm, resolve)) {
// this component does belong to this app and would
// have fired off the resolve fn
// let's stop here, we're good
return;
}
appsReady++;
}
}
if (appsReady < apps.length) {
// not all apps are ready yet
// add it to the queue to be figured out when they are
(win['s-cr'] = win['s-cr'] || []).push([elm, resolve]);
return;
}
}
// not a recognized app component
resolve(null);
}
// callback wasn't provided, let's return a promise
if (win.Promise) {
// use native/polyfilled promise
return new win.Promise(executor);
}
// promise may not have been polyfilled yet
return { then: executor };
};
}
}
init(win, doc, namespace, fsNamespace, resourcesUrl, appCore, appCoreSsr, appCorePolyfilled, hydratedCssClass, components);
})(window, document, "Duet","duet",0,"duet.core.js","duet.core.pf.js","hydrated","duet-button,duet-card,duet-grid,duet-grid-cell,duet-header,duet-heading,duet-input,duet-layout,duet-paragraph,duet-prototype-header,duet-spinner",HTMLElement.prototype);
// Duet: Host Data, ES Module/es2017 Target
export const COMPONENTS = [["duet-button","2m50rmmg",1,[["accessibleControls",1,0,"accessible-controls",2],["accessibleExpanded",1,0,"accessible-expanded",4],["accessibleLabel",1,0,"accessible-label",2],["accessiblePressed",1,0,"accessible-pressed",4],["disabled",1,0,1,4],["element",64],["expand",1,0,1,4],["external",1,0,1,4],["icon",1,0,1,2],["iconRight",1,0,"icon-right",4],["identifier",1,0,1,2],["submit",1,0,1,4],["theme",1,0,1,2],["url",1,0,1,2],["variation",1,0,1,2]],1],["duet-card","oamrhz8m",1,[["cardTitle",1,0,"card-title",2],["element",64],["padding",1,0,1,2],["theme",1,0,1,2],["url",1,0,1,2]],1],["duet-grid","4eyir5tm",1,[["element",64]]],["duet-grid-cell","myjarhpv",1,[["element",64]]],["duet-header","1pvwee9c",1,[["element",64],["position",1,0,1,2],["theme",1,0,1,2]],1],["duet-heading","qslwkqd4",1,[["element",64],["level",1,0,1,2],["theme",1,0,1,2]],1],["duet-input","w8y5gm6a",1,[["accessibleActiveDescendant",1,0,"accessible-active-descendant",2],["accessibleAutocomplete",1,0,"accessible-autocomplete",2],["accessibleControls",1,0,"accessible-controls",2],["accessibleOwns",1,0,"accessible-owns",2],["autoComplete",1,0,"auto-complete",2],["autofocus",1,0,1,4],["disabled",1,0,1,4],["element",64],["expand",1,0,1,4],["helpText",1,0,"help-text",2],["identifier",1,0,1,2],["inputPrefix",1,0,"input-prefix",2],["inputSuffix",1,0,"input-suffix",2],["label",1,0,1,2],["labelHidden",1,0,"label-hidden",4],["maxLength",1,0,"max-length",8],["minLength",1,0,"min-length",8],["name",1,0,1,2],["pattern",1,0,1,2],["placeholder",1,0,1,2],["required",1,0,1,4],["role",1,0,1,2],["spellCheck",1,0,"spell-check",4],["theme",1,0,1,2],["type",1,0,1,2],["value",2,1,1,2]],1],["duet-layout","yscspavc",1,[["element",64],["variation",1,0,1,2]],1],["duet-paragraph","hm35g0ru",1,[["element",64],["theme",1,0,1,2]],1],["duet-spinner","2m50rmmg",1,[["accessibleLabel",1,0,"accessible-label",2],["color",1,0,1,2],["size",1,0,1,2]],1]]
export const COMPONENTS = [["duet-button","duet-button",1,[["accessibleControls",1,0,"accessible-controls",2],["accessibleExpanded",1,0,"accessible-expanded",4],["accessibleLabel",1,0,"accessible-label",2],["accessiblePressed",1,0,"accessible-pressed",4],["disabled",1,0,1,4],["element",64],["expand",1,0,1,4],["external",1,0,1,4],["icon",1,0,1,2],["iconRight",1,0,"icon-right",4],["identifier",1,0,1,2],["submit",1,0,1,4],["theme",1,0,1,2],["url",1,0,1,2],["variation",1,0,1,2]],1],["duet-card","duet-card",1,[["cardTitle",1,0,"card-title",2],["element",64],["padding",1,0,1,2],["theme",1,0,1,2],["url",1,0,1,2]],1],["duet-grid","duet-grid",1,[["element",64]]],["duet-grid-cell","duet-grid-cell",1,[["element",64]]],["duet-header","duet-header",1,[["element",64],["position",1,0,1,2],["theme",1,0,1,2]],1],["duet-heading","duet-heading",1,[["element",64],["level",1,0,1,2],["theme",1,0,1,2]],1],["duet-input","duet-input",1,[["accessibleActiveDescendant",1,0,"accessible-active-descendant",2],["accessibleAutocomplete",1,0,"accessible-autocomplete",2],["accessibleControls",1,0,"accessible-controls",2],["accessibleOwns",1,0,"accessible-owns",2],["autoComplete",1,0,"auto-complete",2],["autofocus",1,0,1,4],["disabled",1,0,1,4],["element",64],["expand",1,0,1,4],["helpText",1,0,"help-text",2],["identifier",1,0,1,2],["inputPrefix",1,0,"input-prefix",2],["inputSuffix",1,0,"input-suffix",2],["label",1,0,1,2],["labelHidden",1,0,"label-hidden",4],["maxLength",1,0,"max-length",8],["minLength",1,0,"min-length",8],["name",1,0,1,2],["pattern",1,0,1,2],["placeholder",1,0,1,2],["required",1,0,1,4],["role",1,0,1,2],["spellCheck",1,0,"spell-check",4],["theme",1,0,1,2],["type",1,0,1,2],["value",2,1,1,2]],1],["duet-layout","duet-layout",1,[["element",64],["variation",1,0,1,2]],1],["duet-paragraph","duet-paragraph",1,[["element",64],["theme",1,0,1,2]],1],["duet-prototype-header","duet-prototype-header",1,[["element",64]]],["duet-spinner","duet-button",1,[["accessibleLabel",1,0,"accessible-label",2],["color",1,0,1,2],["size",1,0,1,2]],1]]
// Duet: Host Data, ES Module/es5 Target
export var COMPONENTS = [["duet-button","2m50rmmg",1,[["accessibleControls",1,0,"accessible-controls",2],["accessibleExpanded",1,0,"accessible-expanded",4],["accessibleLabel",1,0,"accessible-label",2],["accessiblePressed",1,0,"accessible-pressed",4],["disabled",1,0,1,4],["element",64],["expand",1,0,1,4],["external",1,0,1,4],["icon",1,0,1,2],["iconRight",1,0,"icon-right",4],["identifier",1,0,1,2],["submit",1,0,1,4],["theme",1,0,1,2],["url",1,0,1,2],["variation",1,0,1,2]],1],["duet-card","oamrhz8m",1,[["cardTitle",1,0,"card-title",2],["element",64],["padding",1,0,1,2],["theme",1,0,1,2],["url",1,0,1,2]],1],["duet-grid","4eyir5tm",1,[["element",64]]],["duet-grid-cell","myjarhpv",1,[["element",64]]],["duet-header","1pvwee9c",1,[["element",64],["position",1,0,1,2],["theme",1,0,1,2]],1],["duet-heading","qslwkqd4",1,[["element",64],["level",1,0,1,2],["theme",1,0,1,2]],1],["duet-input","w8y5gm6a",1,[["accessibleActiveDescendant",1,0,"accessible-active-descendant",2],["accessibleAutocomplete",1,0,"accessible-autocomplete",2],["accessibleControls",1,0,"accessible-controls",2],["accessibleOwns",1,0,"accessible-owns",2],["autoComplete",1,0,"auto-complete",2],["autofocus",1,0,1,4],["disabled",1,0,1,4],["element",64],["expand",1,0,1,4],["helpText",1,0,"help-text",2],["identifier",1,0,1,2],["inputPrefix",1,0,"input-prefix",2],["inputSuffix",1,0,"input-suffix",2],["label",1,0,1,2],["labelHidden",1,0,"label-hidden",4],["maxLength",1,0,"max-length",8],["minLength",1,0,"min-length",8],["name",1,0,1,2],["pattern",1,0,1,2],["placeholder",1,0,1,2],["required",1,0,1,4],["role",1,0,1,2],["spellCheck",1,0,"spell-check",4],["theme",1,0,1,2],["type",1,0,1,2],["value",2,1,1,2]],1],["duet-layout","yscspavc",1,[["element",64],["variation",1,0,1,2]],1],["duet-paragraph","hm35g0ru",1,[["element",64],["theme",1,0,1,2]],1],["duet-spinner","2m50rmmg",1,[["accessibleLabel",1,0,"accessible-label",2],["color",1,0,1,2],["size",1,0,1,2]],1]]
export var COMPONENTS = [["duet-button","duet-button",1,[["accessibleControls",1,0,"accessible-controls",2],["accessibleExpanded",1,0,"accessible-expanded",4],["accessibleLabel",1,0,"accessible-label",2],["accessiblePressed",1,0,"accessible-pressed",4],["disabled",1,0,1,4],["element",64],["expand",1,0,1,4],["external",1,0,1,4],["icon",1,0,1,2],["iconRight",1,0,"icon-right",4],["identifier",1,0,1,2],["submit",1,0,1,4],["theme",1,0,1,2],["url",1,0,1,2],["variation",1,0,1,2]],1],["duet-card","duet-card",1,[["cardTitle",1,0,"card-title",2],["element",64],["padding",1,0,1,2],["theme",1,0,1,2],["url",1,0,1,2]],1],["duet-grid","duet-grid",1,[["element",64]]],["duet-grid-cell","duet-grid-cell",1,[["element",64]]],["duet-header","duet-header",1,[["element",64],["position",1,0,1,2],["theme",1,0,1,2]],1],["duet-heading","duet-heading",1,[["element",64],["level",1,0,1,2],["theme",1,0,1,2]],1],["duet-input","duet-input",1,[["accessibleActiveDescendant",1,0,"accessible-active-descendant",2],["accessibleAutocomplete",1,0,"accessible-autocomplete",2],["accessibleControls",1,0,"accessible-controls",2],["accessibleOwns",1,0,"accessible-owns",2],["autoComplete",1,0,"auto-complete",2],["autofocus",1,0,1,4],["disabled",1,0,1,4],["element",64],["expand",1,0,1,4],["helpText",1,0,"help-text",2],["identifier",1,0,1,2],["inputPrefix",1,0,"input-prefix",2],["inputSuffix",1,0,"input-suffix",2],["label",1,0,1,2],["labelHidden",1,0,"label-hidden",4],["maxLength",1,0,"max-length",8],["minLength",1,0,"min-length",8],["name",1,0,1,2],["pattern",1,0,1,2],["placeholder",1,0,1,2],["required",1,0,1,4],["role",1,0,1,2],["spellCheck",1,0,"spell-check",4],["theme",1,0,1,2],["type",1,0,1,2],["value",2,1,1,2]],1],["duet-layout","duet-layout",1,[["element",64],["variation",1,0,1,2]],1],["duet-paragraph","duet-paragraph",1,[["element",64],["theme",1,0,1,2]],1],["duet-prototype-header","duet-prototype-header",1,[["element",64]]],["duet-spinner","duet-button",1,[["accessibleLabel",1,0,"accessible-label",2],["color",1,0,1,2],["size",1,0,1,2]],1]]

@@ -480,2 +480,5 @@ /* tslint:disable */

interface DuetPrototypeHeader {}
interface DuetPrototypeHeaderAttributes extends StencilHTMLAttributes {}
interface DuetSpinner {

@@ -522,2 +525,3 @@ /**

'DuetParagraph': Components.DuetParagraph;
'DuetPrototypeHeader': Components.DuetPrototypeHeader;
'DuetSpinner': Components.DuetSpinner;

@@ -536,2 +540,3 @@ }

'duet-paragraph': Components.DuetParagraphAttributes;
'duet-prototype-header': Components.DuetPrototypeHeaderAttributes;
'duet-spinner': Components.DuetSpinnerAttributes;

@@ -595,2 +600,8 @@ }

interface HTMLDuetPrototypeHeaderElement extends Components.DuetPrototypeHeader, HTMLStencilElement {}
var HTMLDuetPrototypeHeaderElement: {
prototype: HTMLDuetPrototypeHeaderElement;
new (): HTMLDuetPrototypeHeaderElement;
};
interface HTMLDuetSpinnerElement extends Components.DuetSpinner, HTMLStencilElement {}

@@ -612,2 +623,3 @@ var HTMLDuetSpinnerElement: {

'duet-paragraph': HTMLDuetParagraphElement
'duet-prototype-header': HTMLDuetPrototypeHeaderElement
'duet-spinner': HTMLDuetSpinnerElement

@@ -626,2 +638,3 @@ }

'duet-paragraph': HTMLDuetParagraphElement;
'duet-prototype-header': HTMLDuetPrototypeHeaderElement;
'duet-spinner': HTMLDuetSpinnerElement;

@@ -628,0 +641,0 @@ }

@@ -301,2 +301,7 @@ {

{
"label": "duet-prototype-header",
"description": "---\ntitle: Prototype Header\nname: duet-prototype-header\nstatus: prototype\nreleased: 0.0.1-alpha.43\nintro: Header is used to display the logo, primary navigation, and any additional menus. It’s always visible at the top of the interfaces and can be configured to stay visible over other content.\ndescription: Header contains your application’s primary navigation items that perform an action when clicked. Each action in the header should navigate to a URL or trigger another action like a modal overlay.\nplatforms: Web only\ntags:\n - docs-components\nexamples:\n - <duet-prototype-header></duet-prototype-header>\n---",
"attributes": []
},
{
"label": "duet-spinner",

@@ -303,0 +308,0 @@ "description": "---\ntitle: Spinner\nname: duet-spinner\nstatus: prototype\nreleased: 0.0.1-alpha.37\nintro: Spinners are used to indicate users that their action is being processed. Duet’s spinner is built entirely with HTML and CSS, and doesn’t rely on JavaScript.\ndescription: \"You can customize the size and color of the spinner with the provided properties. Spinner comes in three sizes: small, medium and large.\"\nplatforms: Web only\nappearance: negative\nexamples:\n - <duet-spinner size=\"small\"></duet-spinner>\n - <duet-spinner size=\"medium\"></duet-spinner>\n - <duet-spinner size=\"large\"></duet-spinner>\ntags:\n - docs-components\n---",

{
"name": "@duetds/components",
"version": "0.0.1-alpha.46",
"version": "0.0.1-alpha.47",
"description": "This package includes Duet Components and related tools.",

@@ -42,7 +42,7 @@ "author": "Viljami Salminen <ext-viljami.salminen@lahitapiola.fi>",

},
"gitHead": "d86ddf3d67c41fb482d2c2208dcad292e5bc9b02",
"gitHead": "ffcdbfd698a3d08af3fc7e500b8b3844b92dffd5",
"devDependencies": {
"@duetds/fonts": "^1.1.2",
"@duetds/icons": "^1.0.6",
"@duetds/tokens": "^1.2.5",
"@duetds/fonts": "^1.1.3",
"@duetds/icons": "^1.0.7",
"@duetds/tokens": "^1.2.6",
"@stencil/core": "^0.18.1",

@@ -49,0 +49,0 @@ "@stencil/sass": "^0.2.1",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc