@kartverket/geonorge-web-components 4.0.9 → 4.0.11

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.
Files changed (65) hide show
  1. package/BodyText.js +1 -1
  2. package/BodyText.js.map +1 -1
  3. package/BreadcrumbList.js +1 -1
  4. package/BreadcrumbList.js.map +1 -1
  5. package/ContentContainer.js +1 -1
  6. package/ContentContainer.js.map +1 -1
  7. package/DownloadItem.js +1 -1
  8. package/DownloadItem.js.map +1 -1
  9. package/GeonorgeFooter.js +1 -1
  10. package/GeonorgeFooter.js.map +1 -1
  11. package/GnAccordion.js +1 -1
  12. package/GnAccordion.js.map +1 -1
  13. package/GnBadgeList.js +1 -1
  14. package/GnBadgeList.js.map +1 -1
  15. package/GnBreadcrumbList.js +1 -1
  16. package/GnBreadcrumbList.js.map +1 -1
  17. package/GnButton.js +1 -1
  18. package/GnButton.js.map +1 -1
  19. package/GnDialog.js +1 -1
  20. package/GnDialog.js.map +1 -1
  21. package/GnFieldContainer.js +1 -1
  22. package/GnFieldContainer.js.map +1 -1
  23. package/GnIcon.js +1 -1
  24. package/GnIcon.js.map +1 -1
  25. package/GnInput.js +1 -1
  26. package/GnInput.js.map +1 -1
  27. package/GnLabel.js +1 -1
  28. package/GnLabel.js.map +1 -1
  29. package/GnList.js +1 -1
  30. package/GnList.js.map +1 -1
  31. package/GnSelect.js +1 -1
  32. package/GnSelect.js.map +1 -1
  33. package/GnShortcutButton.js +1 -1
  34. package/GnShortcutButton.js.map +1 -1
  35. package/GnSrOnly.js +1 -1
  36. package/GnSrOnly.js.map +1 -1
  37. package/GnTable.js +1 -1
  38. package/GnTable.js.map +1 -1
  39. package/GnTextarea.js +1 -1
  40. package/GnTextarea.js.map +1 -1
  41. package/HeadingText.js +1 -1
  42. package/HeadingText.js.map +1 -1
  43. package/MainMenu.js +1 -1
  44. package/MainMenu.js.map +1 -1
  45. package/MainNavigation.js +1 -1
  46. package/MainNavigation.js.map +1 -1
  47. package/MainSearchField.js +1 -1
  48. package/MainSearchField.js.map +1 -1
  49. package/MapItem.js +1 -1
  50. package/MapItem.js.map +1 -1
  51. package/NavigationTabContent.js +1 -1
  52. package/NavigationTabContent.js.map +1 -1
  53. package/NavigationTabHeading.js +1 -1
  54. package/NavigationTabHeading.js.map +1 -1
  55. package/NavigationTabs.js +1 -1
  56. package/NavigationTabs.js.map +1 -1
  57. package/SearchTypeSelector.js +1 -1
  58. package/SearchTypeSelector.js.map +1 -1
  59. package/UserAccount.js +1 -1
  60. package/UserAccount.js.map +1 -1
  61. package/index.css +1 -1
  62. package/index.css.map +1 -1
  63. package/index.js +1 -1
  64. package/index.js.map +1 -1
  65. package/package.json +6 -1
@@ -1 +1 @@
1
- {"version":3,"file":"GnFieldContainer.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,KAEtBD,EAAe,SAAIA,EAAe,UAAK,CAAC,EAAGA,EAAe,SAAoB,iBAAIC,IACnF,CATD,CASGK,MAAM,I,kCCHTH,EAAOD,QAAU,SAAUK,GACzB,IAAIC,EAAO,GA4EX,OAzEAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAU,GACVC,OAA+B,IAAZF,EAAK,GAoB5B,OAnBIA,EAAK,KACPC,GAAW,cAAcE,OAAOH,EAAK,GAAI,QAEvCA,EAAK,KACPC,GAAW,UAAUE,OAAOH,EAAK,GAAI,OAEnCE,IACFD,GAAW,SAASE,OAAOH,EAAK,GAAGI,OAAS,EAAI,IAAID,OAAOH,EAAK,IAAM,GAAI,OAE5EC,GAAWN,EAAuBK,GAC9BE,IACFD,GAAW,KAETD,EAAK,KACPC,GAAW,KAETD,EAAK,KACPC,GAAW,KAENA,CACT,IAAGI,KAAK,GACV,EAGAT,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oE,OAAO,GAAO,ECFpC2F,EAAoB,K","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./stories/gn-field-container/gn-field-container.html","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/./stories/gn-field-container/template.scss","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/./stories/gn-field-container/gn-field-container.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"GnFieldContainer\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","export default \"<template>\\n <slot></slot>\\n</template>\\n\";","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{margin-bottom:16px}:host([block]){display:block}:host:not([block]){display:inline-block}:host([inlineblock]){margin-right:16px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/gn-field-container/template.scss\"],\"names\":[],\"mappings\":\"AAAA,MACI,kBAAA,CAGJ,eACI,aAAA,CAGJ,mBACI,oBAAA,CAGJ,qBACI,iBAAA\",\"sourcesContent\":[\":host {\\n margin-bottom: 16px;\\n}\\n\\n:host([block]) {\\n display: block;\\n}\\n\\n:host:not([block]) {\\n display: inline-block;\\n}\\n\\n:host([inlineblock]) {\\n margin-right: 16px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","// Dependencies\nimport { Component, CustomElement, CustomElementOptions } from \"super-custom-elements\";\n\ninterface GnFieldContainerOptions extends CustomElementOptions {}\n\n@Component({\n tag: \"gn-field-container\",\n template: import(\"./gn-field-container.html\"),\n style: import(\"./template.scss\")\n})\nexport class GnFieldContainer extends CustomElement {\n constructor() {\n super();\n }\n\n setup(options?: GnFieldContainerOptions): void {}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(9950);\n"],"names":["root","factory","exports","module","define","amd","self","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","id","_k","push","Listen","eventName","selector","target","methodName","constructor","listeners","handler","addEventListeners","targetRoot","shadowRoot","listener","eventTarget","querySelector","addEventListener","e","call","Dispatch","propertyName","Object","defineProperty","get","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Watch","attrName","watchAttributes","toKebabCase","propsInit","str","replace","toLowerCase","toCamelCase","m","toUpperCase","tryParseInt","value","parseInt","NaN","parseFloat","getElement","document","getShadowRootElement","customElement","CustomElement","HTMLElement","super","connect","isConnected","appendChild","Toggle","propName","hasAttribute","attrValue","getAttribute","test","set","oldValue","console","warn","__connected","props","setAttribute","removeAttribute","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","___CSS_LOADER_EXPORT___","Prop","onAttributeChange","initializeProps","prop","plainAttributes","keys","forEach","v","cycleProps","getProps","attribValue","new","Component","args","tag","prototype","name","showShadowRoot","shadow","attachShadow","mode","observedAttributes","x","attributeChangedCallback","newValue","methodToCall","old","connectedCallback","render","template","createElement","innerHTML","getStyle","Promise","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","style","ready","resolve","_","customElements","GnFieldContainer","setup","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
1
+ {"version":3,"file":"GnFieldContainer.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,KAEtBD,EAAe,SAAIA,EAAe,UAAK,CAAC,EAAGA,EAAe,SAAoB,iBAAIC,IACnF,CATD,CASGK,MAAM,I,oGCNLC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACL,EAAOM,GAAI,wIAAyI,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wDAAwD,MAAQ,GAAG,SAAW,mEAAmE,eAAiB,CAAC,mMAAmM,WAAa,MAEhkB,S,4CCPA,sD,SCMAN,EAAOD,QAAU,SAAUQ,GACzB,IAAIC,EAAO,GA4EX,OAzEAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAU,GACVC,OAA+B,IAAZF,EAAK,GAoB5B,OAnBIA,EAAK,KACPC,GAAW,cAAcE,OAAOH,EAAK,GAAI,QAEvCA,EAAK,KACPC,GAAW,UAAUE,OAAOH,EAAK,GAAI,OAEnCE,IACFD,GAAW,SA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AAEkI,OAAO,GAAO,ECFpC6B,EAAoB,K","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/./stories/gn-field-container/template.scss","webpack://geonorge/./stories/gn-field-container/gn-field-container.html","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./stories/gn-field-container/gn-field-container.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"GnFieldContainer\"] = factory();\n})(self, () => {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{margin-bottom:16px}:host([block]){display:block}:host:not([block]){display:inline-block}:host([inlineblock]){margin-right:16px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/gn-field-container/template.scss\"],\"names\":[],\"mappings\":\"AAAA,MACI,kBAAA,CAGJ,eACI,aAAA,CAGJ,mBACI,oBAAA,CAGJ,qBACI,iBAAA\",\"sourcesContent\":[\":host {\\n margin-bottom: 16px;\\n}\\n\\n:host([block]) {\\n display: block;\\n}\\n\\n:host:not([block]) {\\n display: inline-block;\\n}\\n\\n:host([inlineblock]) {\\n margin-right: 16px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","export default \"<template>\\n <slot></slot>\\n</template>\\n\";","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","// Dependencies\nimport { Component, CustomElement, CustomElementOptions } from \"super-custom-elements\";\n\ninterface GnFieldContainerOptions extends CustomElementOptions {}\n\n@Component({\n tag: \"gn-field-container\",\n template: import(\"./gn-field-container.html\"),\n style: import(\"./template.scss\")\n})\nexport class GnFieldContainer extends CustomElement {\n constructor() {\n super();\n }\n\n setup(options?: GnFieldContainerOptions): void {}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(9950);\n"],"names":["root","factory","exports","module","define","amd","self","___CSS_LOADER_EXPORT___","push","id","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","Component","args","target","tag","toKebabCase","prototype","constructor","name","customElement","super","props","showShadowRoot","shadow","shadowRoot","attachShadow","mode","observedAttributes","Object","keys","propsInit","x","attributeChangedCallback","oldValue","newValue","onAttributeChange","set","toCamelCase","watchAttributes","methodToCall","__connected","old","new","connectedCallback","render","addEventListeners","initializeProps","template","document","createElement","innerHTML","getStyle","Promise","appendChild","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","style","ready","resolve","_","customElements","get","CustomElement","HTMLElement","connect","selector","isConnected","querySelector","getElement","getShadowRootElement","Listen","eventName","methodName","listeners","handler","targetRoot","listener","eventTarget","addEventListener","e","call","Dispatch","propertyName","defineProperty","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Prop","propName","attrName","getAttribute","value","tryParseInt","setAttribute","hasAttribute","prop","plainAttributes","forEach","v","cycleProps","getProps","attribValue","Toggle","attrValue","test","console","warn","removeAttribute","str","replace","toLowerCase","m","toUpperCase","parseInt","NaN","parseFloat","Watch","GnFieldContainer","setup","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
package/GnIcon.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.GnIcon=e())}(self,(()=>(()=>{var t={164:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,s,r){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(n)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(i[l]=!0)}for(var a=0;a<t.length;a++){var u=[].concat(t[a]);n&&i[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),s&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=s):u[4]="".concat(s)),e.push(u))}},e}},169:(t,e,o)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const n=o(2466);e.Listen=(t,e)=>(o,n)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:e,eventName:t,handler:o[n]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const o of t.constructor.listeners){const n=o.selector?e.querySelector(o.selector)?e.querySelector(o.selector):null:t;n&&n.addEventListener(o.eventName,(e=>{o.handler.call(t,e)}))}}},e.Dispatch=t=>(e,o)=>{Object.defineProperty(e,o,{get:function(){const e=this;return{emit(s){const r=t||n.toDotCase(o);e.dispatchEvent(new CustomEvent(r,s))}}}})}},248:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18"><circle cx="9" cy="9" r="8.5" fill="#8fff33" stroke="#333"></circle><g fill="#333"><circle cx="6" cy="6" r="1.5"></circle><circle cx="12" cy="6" r="1.5"></circle></g><g stroke="#333" stroke-miterlimit="10"><path d="M9.1 14.915c-2 0-4.584-1.86-4.6-4.086m4.6 4.086c2 0 4.408-2.129 4.4-4.111" fill="none" stroke-width="1.399"></path><path d="M9.622 11.403l-4.546.003m.989-.025l6.855.049" fill="url(#C)" stroke-width="1.22"></path></g><g fill="#333"><path d="M5.224 11.744h7.391v1.869H5.224zm1.338 2.379h3.844v.467H6.562z"></path><path d="M6.775 13.571h4.226v.743H6.775z"></path></g><path d="M3.738 8.792h11.001v2.081H3.738z" fill="#8fff33"></path></svg>'},1063:(t,e,o)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const n=o(2466);e.Watch=t=>(e,o)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[n.toKebabCase(t)]=o,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},1268:t=>{t.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18 18" style="enable-background:new 0 0 18 18;" xml:space="preserve"><style type="text/css"> .__Pci0kwJ__st0{fill:#ff4a2e;stroke:#333333;stroke-miterlimit:10;} .__Pci0kwJ__st1{fill:#333333;} .__Pci0kwJ__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__Pci0kwJ__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style><circle class="__Pci0kwJ__st0 " cx="9" cy="9" r="8.5"></circle><circle class="__Pci0kwJ__st1 " cx="6" cy="6" r="1.5"></circle><circle class="__Pci0kwJ__st1 " cx="12" cy="6" r="1.5"></circle><path class="__Pci0kwJ__st2 " d="M8.8,14.4"></path><path class="__Pci0kwJ__st3 " d="M8.9,11c2,0,3.8,0.9,4.6,2 M8.9,11c-2,0-3.6,0.9-4.4,2"></path></svg>'},1322:(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>n});const n='<template>\n <span id="icon"> </span>\n</template>\n'},1941:t=>{t.exports='<svg viewBox="0 0 18 18" style="enable-background:new 0 0 18 18;" xmlns="http://www.w3.org/2000/svg"><defs><style type="text/css"> .__2A8fAMn__st0{fill:#ffEb3b;stroke:#333333;stroke-miterlimit:10;} .__2A8fAMn__st1{fill:#333333;} .__2A8fAMn__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__2A8fAMn__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style></defs><circle class="__2A8fAMn__st0 " cx="9" cy="9" r="8.5"></circle><circle class="__2A8fAMn__st1 " cx="6" cy="6" r="1.5"></circle><circle class="__2A8fAMn__st1 " cx="12" cy="6" r="1.5"></circle><path class="__2A8fAMn__st2 " d="M8.8,14.4"></path><path class="__2A8fAMn__st3 " d="M9.1,13c-2,0-3.8-0.9-4.6-2 M9.1,13c2,0,3.6-0.9,4.4-2"></path></svg>'},2148:function(t,e,o){"use strict";var n,s=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o);var s=Object.getOwnPropertyDescriptor(e,o);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,n,s)}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__decorate||function(t,e,o,n){var s,r=arguments.length,i=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(r<3?s(i):r>3?s(e,o,i):s(e,o))||i);return r>3&&i&&Object.defineProperty(e,o,i),i},c=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[e.length]=o);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o=n(t),i=0;i<o.length;i++)"default"!==o[i]&&s(e,t,o[i]);return r(e,t),e}),l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GnIcon=void 0;const a=o(3128),u=l(o(1268)),h=l(o(248)),p=l(o(1941)),d=l(o(3100));let f=class extends a.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}getGeonorgeIcon(t){switch(t){case"status-deficient":return u.default;case"status-good":return h.default;case"status-satisfactory":return p.default;case"status-useable":return d.default;default:return null}}renderIcon(t){this.iconElement=(0,a.getShadowRootElement)(this,"#icon"),this.iconElement.innerHTML=this.getGeonorgeIcon(t)}setIconWidth(t){this.iconElement=(0,a.getShadowRootElement)(this,"#icon"),this.iconElement.style.width=(null==t?void 0:t.length)?t:"1em"}setIconHeight(t){this.iconElement=(0,a.getShadowRootElement)(this,"#icon"),this.iconElement.style.height=(null==t?void 0:t.length)?t:"1em"}connectedCallback(){this.renderIcon(this.icon),this.setIconWidth(this.width),this.setIconHeight(this.height)}iconChanged(){this.icon&&this.renderIcon(this.icon)}widthChanged(){this.setIconWidth(this.width)}heightChanged(){this.setIconHeight(this.height)}static setup(t,e){}};e.GnIcon=f,f.elementSelector="gn-icon",i([(0,a.Prop)()],f.prototype,"id",void 0),i([(0,a.Prop)()],f.prototype,"icon",void 0),i([(0,a.Prop)()],f.prototype,"width",void 0),i([(0,a.Prop)()],f.prototype,"height",void 0),i([(0,a.Watch)("icon")],f.prototype,"iconChanged",null),i([(0,a.Watch)("width")],f.prototype,"widthChanged",null),i([(0,a.Watch)("height")],f.prototype,"heightChanged",null),e.GnIcon=f=i([(0,a.Component)({tag:"gn-icon",template:Promise.resolve().then((()=>c(o(1322)))),style:Promise.resolve().then((()=>c(o(9173))))})],f)},2466:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},3100:t=>{t.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18 18" style="enable-background:new 0 0 18 18;" xml:space="preserve"><style type="text/css"> .__3phJTh6__st0{fill:#ffEb3b;stroke:#333333;stroke-miterlimit:10;} .__3phJTh6__st1{fill:#333333;} .__3phJTh6__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__3phJTh6__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style><circle class="__3phJTh6__st0 " cx="9" cy="9" r="8.5"></circle><circle class="__3phJTh6__st1 " cx="6" cy="6" r="1.5"></circle><circle class="__3phJTh6__st1 " cx="12" cy="6" r="1.5"></circle><path class="__3phJTh6__st2 " d="M8.8,14.4"></path><line class="__3phJTh6__st3 " x1="4.5" y1="12" x2="13.5" y2="12"></line></svg>'},3128:function(t,e,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[o]}})}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),s=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||n(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),s(o(8631),e),s(o(3704),e),s(o(3365),e),s(o(169),e),s(o(6999),e),s(o(3982),e),s(o(8861),e),s(o(1063),e)},3365:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},3704:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=o},3982:(t,e,o)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const n=o(2466);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const o=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==o||""==o:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==o&&null!==o?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},5052:t=>{"use strict";t.exports=function(t){var e=t[1],o=t[3];if(!o)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),r="/*# ".concat(s," */");return[e].concat([r]).join("\n")}return[e].join("\n")}},6999:(t,e,o)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const n=o(2466);e.Prop=()=>(t,e)=>{const o=n.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(o)},set:function(t){if(this.__connected){const s=this.props[e];this.props[e]=n.tryParseInt(t),"object"!=typeof t?this.setAttribute(o,t):this.onAttributeChange(o,s,t,!1)}else this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let o of(t=>{const e=t.constructor.watchAttributes,o=Object.assign({},e);Object.keys(o).forEach((t=>o[t]=""));const n=Object.assign(Object.assign({},o),t.constructor.propsInit);return Object.keys(n)})(t)){if(e)if(null==e[n.toKebabCase(o)])e[n.toKebabCase(o)]="";else{const s=t.props[o]||t.getAttribute(n.toKebabCase(o));"function"==typeof t[e[o]]&&t[e[o]]({new:s})}t.constructor.propsInit[o]&&(t.hasAttribute(n.toKebabCase(o))||(t[o]=t.constructor.propsInit[o]))}}},8631:function(t,e,o){"use strict";var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(s,r){function i(t){try{l(n.next(t))}catch(t){r(t)}}function c(t){try{l(n.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,c)}l((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const s=o(169),r=o(6999),i=o(2466);e.Component=t=>e=>{var o;const c=t.tag||i.toKebabCase(e.prototype.constructor.name),l=((o=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>i.toKebabCase(t)))}attributeChangedCallback(t,e,o){this.onAttributeChange(t,e,o)}onAttributeChange(t,e,o,n=!0){if(e!=o){n&&(this[i.toCamelCase(t)]=o);const s=this.constructor.watchAttributes;if(s&&s[t]){const n=s[t];this.__connected&&"function"==typeof this[n]&&this[n]({old:e,new:o})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return n(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,s.addEventListeners(this),r.initializeProps(this)}))}render(){return n(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return n(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),o=document.createRange().createContextualFragment(e);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return n(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,o.ready=new Promise(((t,e)=>t(!0))),o);return customElements.get(c)||customElements.define(c,l),l}},8861:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},9173:(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>c});var n=o(5052),s=o.n(n),r=o(164),i=o.n(r)()(s());i.push([t.id,":host{display:inline-block}#icon{display:block}","",{version:3,sources:["webpack://./stories/gn-icon/template.scss"],names:[],mappings:"AAAA,MACI,oBAAA,CAGJ,MACI,aAAA",sourcesContent:[":host {\n display: inline-block;\n}\n\n#icon {\n display: block;\n}\n"],sourceRoot:""}]);const c=i}},e={};function o(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={id:n,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(2148)})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.GnIcon=e())}(self,(()=>(()=>{var t={9173(t,e,o){"use strict";o.r(e),o.d(e,{default:()=>c});var n=o(5052),s=o.n(n),r=o(164),i=o.n(r)()(s());i.push([t.id,":host{display:inline-block}#icon{display:block}","",{version:3,sources:["webpack://./stories/gn-icon/template.scss"],names:[],mappings:"AAAA,MACI,oBAAA,CAGJ,MACI,aAAA",sourcesContent:[":host {\n display: inline-block;\n}\n\n#icon {\n display: block;\n}\n"],sourceRoot:""}]);const c=i},1322(t,e,o){"use strict";o.r(e),o.d(e,{default:()=>n});const n='<template>\n <span id="icon"> </span>\n</template>\n'},164(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,s,r){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(n)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(i[l]=!0)}for(var a=0;a<t.length;a++){var u=[].concat(t[a]);n&&i[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),s&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=s):u[4]="".concat(s)),e.push(u))}},e}},5052(t){"use strict";t.exports=function(t){var e=t[1],o=t[3];if(!o)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),r="/*# ".concat(s," */");return[e].concat([r]).join("\n")}return[e].join("\n")}},8631(t,e,o){"use strict";var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(s,r){function i(t){try{l(n.next(t))}catch(t){r(t)}}function c(t){try{l(n.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,c)}l((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const s=o(169),r=o(6999),i=o(2466);e.Component=t=>e=>{var o;const c=t.tag||i.toKebabCase(e.prototype.constructor.name),l=((o=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>i.toKebabCase(t)))}attributeChangedCallback(t,e,o){this.onAttributeChange(t,e,o)}onAttributeChange(t,e,o,n=!0){if(e!=o){n&&(this[i.toCamelCase(t)]=o);const s=this.constructor.watchAttributes;if(s&&s[t]){const n=s[t];this.__connected&&"function"==typeof this[n]&&this[n]({old:e,new:o})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return n(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,s.addEventListeners(this),r.initializeProps(this)}))}render(){return n(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return n(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),o=document.createRange().createContextualFragment(e);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return n(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,o.ready=new Promise(((t,e)=>t(!0))),o);return customElements.get(c)||customElements.define(c,l),l}},3704(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=o},3365(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},3128(t,e,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[o]}})}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),s=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||n(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),s(o(8631),e),s(o(3704),e),s(o(3365),e),s(o(169),e),s(o(6999),e),s(o(3982),e),s(o(8861),e),s(o(1063),e)},169(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const n=o(2466);e.Listen=(t,e)=>(o,n)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:e,eventName:t,handler:o[n]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const o of t.constructor.listeners){const n=o.selector?e.querySelector(o.selector)?e.querySelector(o.selector):null:t;n&&n.addEventListener(o.eventName,(e=>{o.handler.call(t,e)}))}}},e.Dispatch=t=>(e,o)=>{Object.defineProperty(e,o,{get:function(){const e=this;return{emit(s){const r=t||n.toDotCase(o);e.dispatchEvent(new CustomEvent(r,s))}}}})}},6999(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const n=o(2466);e.Prop=()=>(t,e)=>{const o=n.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(o)},set:function(t){if(this.__connected){const s=this.props[e];this.props[e]=n.tryParseInt(t),"object"!=typeof t?this.setAttribute(o,t):this.onAttributeChange(o,s,t,!1)}else this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let o of(t=>{const e=t.constructor.watchAttributes,o=Object.assign({},e);Object.keys(o).forEach((t=>o[t]=""));const n=Object.assign(Object.assign({},o),t.constructor.propsInit);return Object.keys(n)})(t)){if(e)if(null==e[n.toKebabCase(o)])e[n.toKebabCase(o)]="";else{const s=t.props[o]||t.getAttribute(n.toKebabCase(o));"function"==typeof t[e[o]]&&t[e[o]]({new:s})}t.constructor.propsInit[o]&&(t.hasAttribute(n.toKebabCase(o))||(t[o]=t.constructor.propsInit[o]))}}},3982(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const n=o(2466);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const o=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==o||""==o:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==o&&null!==o?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},8861(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2466(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},1063(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const n=o(2466);e.Watch=t=>(e,o)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[n.toKebabCase(t)]=o,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},1268(t){t.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18 18" style="enable-background:new 0 0 18 18;" xml:space="preserve"><style type="text/css"> .__Pci0kwJ__st0{fill:#ff4a2e;stroke:#333333;stroke-miterlimit:10;} .__Pci0kwJ__st1{fill:#333333;} .__Pci0kwJ__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__Pci0kwJ__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style><circle class="__Pci0kwJ__st0 " cx="9" cy="9" r="8.5"></circle><circle class="__Pci0kwJ__st1 " cx="6" cy="6" r="1.5"></circle><circle class="__Pci0kwJ__st1 " cx="12" cy="6" r="1.5"></circle><path class="__Pci0kwJ__st2 " d="M8.8,14.4"></path><path class="__Pci0kwJ__st3 " d="M8.9,11c2,0,3.8,0.9,4.6,2 M8.9,11c-2,0-3.6,0.9-4.4,2"></path></svg>'},248(t){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18"><circle cx="9" cy="9" r="8.5" fill="#8fff33" stroke="#333"></circle><g fill="#333"><circle cx="6" cy="6" r="1.5"></circle><circle cx="12" cy="6" r="1.5"></circle></g><g stroke="#333" stroke-miterlimit="10"><path d="M9.1 14.915c-2 0-4.584-1.86-4.6-4.086m4.6 4.086c2 0 4.408-2.129 4.4-4.111" fill="none" stroke-width="1.399"></path><path d="M9.622 11.403l-4.546.003m.989-.025l6.855.049" fill="url(#C)" stroke-width="1.22"></path></g><g fill="#333"><path d="M5.224 11.744h7.391v1.869H5.224zm1.338 2.379h3.844v.467H6.562z"></path><path d="M6.775 13.571h4.226v.743H6.775z"></path></g><path d="M3.738 8.792h11.001v2.081H3.738z" fill="#8fff33"></path></svg>'},1941(t){t.exports='<svg viewBox="0 0 18 18" style="enable-background:new 0 0 18 18;" xmlns="http://www.w3.org/2000/svg"><defs><style type="text/css"> .__2A8fAMn__st0{fill:#ffEb3b;stroke:#333333;stroke-miterlimit:10;} .__2A8fAMn__st1{fill:#333333;} .__2A8fAMn__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__2A8fAMn__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style></defs><circle class="__2A8fAMn__st0 " cx="9" cy="9" r="8.5"></circle><circle class="__2A8fAMn__st1 " cx="6" cy="6" r="1.5"></circle><circle class="__2A8fAMn__st1 " cx="12" cy="6" r="1.5"></circle><path class="__2A8fAMn__st2 " d="M8.8,14.4"></path><path class="__2A8fAMn__st3 " d="M9.1,13c-2,0-3.8-0.9-4.6-2 M9.1,13c2,0,3.6-0.9,4.4-2"></path></svg>'},3100(t){t.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18 18" style="enable-background:new 0 0 18 18;" xml:space="preserve"><style type="text/css"> .__3phJTh6__st0{fill:#ffEb3b;stroke:#333333;stroke-miterlimit:10;} .__3phJTh6__st1{fill:#333333;} .__3phJTh6__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__3phJTh6__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style><circle class="__3phJTh6__st0 " cx="9" cy="9" r="8.5"></circle><circle class="__3phJTh6__st1 " cx="6" cy="6" r="1.5"></circle><circle class="__3phJTh6__st1 " cx="12" cy="6" r="1.5"></circle><path class="__3phJTh6__st2 " d="M8.8,14.4"></path><line class="__3phJTh6__st3 " x1="4.5" y1="12" x2="13.5" y2="12"></line></svg>'},2148(t,e,o){"use strict";var n,s=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o);var s=Object.getOwnPropertyDescriptor(e,o);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,n,s)}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__decorate||function(t,e,o,n){var s,r=arguments.length,i=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(r<3?s(i):r>3?s(e,o,i):s(e,o))||i);return r>3&&i&&Object.defineProperty(e,o,i),i},c=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[e.length]=o);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o=n(t),i=0;i<o.length;i++)"default"!==o[i]&&s(e,t,o[i]);return r(e,t),e}),l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GnIcon=void 0;const a=o(3128),u=l(o(1268)),h=l(o(248)),p=l(o(1941)),d=l(o(3100));let f=class extends a.CustomElement{constructor(){super()}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}getGeonorgeIcon(t){switch(t){case"status-deficient":return u.default;case"status-good":return h.default;case"status-satisfactory":return p.default;case"status-useable":return d.default;default:return null}}renderIcon(t){this.iconElement=(0,a.getShadowRootElement)(this,"#icon"),this.iconElement.innerHTML=this.getGeonorgeIcon(t)}setIconWidth(t){this.iconElement=(0,a.getShadowRootElement)(this,"#icon"),this.iconElement.style.width=(null==t?void 0:t.length)?t:"1em"}setIconHeight(t){this.iconElement=(0,a.getShadowRootElement)(this,"#icon"),this.iconElement.style.height=(null==t?void 0:t.length)?t:"1em"}connectedCallback(){this.renderIcon(this.icon),this.setIconWidth(this.width),this.setIconHeight(this.height)}iconChanged(){this.icon&&this.renderIcon(this.icon)}widthChanged(){this.setIconWidth(this.width)}heightChanged(){this.setIconHeight(this.height)}static setup(t,e){}};e.GnIcon=f,f.elementSelector="gn-icon",i([(0,a.Prop)()],f.prototype,"id",void 0),i([(0,a.Prop)()],f.prototype,"icon",void 0),i([(0,a.Prop)()],f.prototype,"width",void 0),i([(0,a.Prop)()],f.prototype,"height",void 0),i([(0,a.Watch)("icon")],f.prototype,"iconChanged",null),i([(0,a.Watch)("width")],f.prototype,"widthChanged",null),i([(0,a.Watch)("height")],f.prototype,"heightChanged",null),e.GnIcon=f=i([(0,a.Component)({tag:"gn-icon",template:Promise.resolve().then((()=>c(o(1322)))),style:Promise.resolve().then((()=>c(o(9173))))})],f)}},e={};function o(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={id:n,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(2148)})()));
2
2
  //# sourceMappingURL=GnIcon.js.map
package/GnIcon.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"GnIcon.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,KAEtBD,EAAe,SAAIA,EAAe,UAAK,CAAC,EAAGA,EAAe,SAAU,OAAIC,IACzE,CATD,CASGK,MAAM,I,kCCHTH,EAAOD,QAAU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L,GAAUA,EAAOkL,WAC7B,IAAOlL,EAAiB,QACxB,IAAM,EAEP,OADA4K,EAAoBO,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdL,EAAoBO,EAAI,CAACpL,EAASsL,KACjC,IAAI,IAAIC,KAAOD,EACXT,EAAoBW,EAAEF,EAAYC,KAASV,EAAoBW,EAAExL,EAASuL,IAC5ExI,OAAOC,eAAehD,EAASuL,EAAK,CAAEE,YAAY,EAAMxI,IAAKqI,EAAWC,IAE1E,ECNDV,EAAoBW,EAAI,CAACE,EAAKxD,IAAUnF,OAAO6F,UAAU+C,eAAe/I,KAAK8I,EAAKxD,GCClF2C,EAAoBe,EAAK5L,IACH,oBAAX6L,QAA0BA,OAAOC,aAC1C/I,OAAOC,eAAehD,EAAS6L,OAAOC,YAAa,CAAE/F,MAAO,WAE7DhD,OAAOC,eAAehD,EAAS,aAAc,CAAE+F,OAAO,GAAO,ECFpC8E,EAAoB,K","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/./assets/svg/icons/status-good.svg","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./assets/svg/icons/status-deficient.svg","webpack://geonorge/./stories/gn-icon/gn-icon.html","webpack://geonorge/./assets/svg/icons/status-satisfactory.svg","webpack://geonorge/./stories/gn-icon/gn-icon.ts","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/./assets/svg/icons/status-useable.svg","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/./stories/gn-icon/template.scss","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"GnIcon\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 18 18\\\"><circle cx=\\\"9\\\" cy=\\\"9\\\" r=\\\"8.5\\\" fill=\\\"#8fff33\\\" stroke=\\\"#333\\\"></circle><g fill=\\\"#333\\\"><circle cx=\\\"6\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><circle cx=\\\"12\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle></g><g stroke=\\\"#333\\\" stroke-miterlimit=\\\"10\\\"><path d=\\\"M9.1 14.915c-2 0-4.584-1.86-4.6-4.086m4.6 4.086c2 0 4.408-2.129 4.4-4.111\\\" fill=\\\"none\\\" stroke-width=\\\"1.399\\\"></path><path d=\\\"M9.622 11.403l-4.546.003m.989-.025l6.855.049\\\" fill=\\\"url(#C)\\\" stroke-width=\\\"1.22\\\"></path></g><g fill=\\\"#333\\\"><path d=\\\"M5.224 11.744h7.391v1.869H5.224zm1.338 2.379h3.844v.467H6.562z\\\"></path><path d=\\\"M6.775 13.571h4.226v.743H6.775z\\\"></path></g><path d=\\\"M3.738 8.792h11.001v2.081H3.738z\\\" fill=\\\"#8fff33\\\"></path></svg>\"","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","module.exports = \"<svg version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" x=\\\"0px\\\" y=\\\"0px\\\" viewBox=\\\"0 0 18 18\\\" style=\\\"enable-background:new 0 0 18 18;\\\" xml:space=\\\"preserve\\\"><style type=\\\"text/css\\\"> .__Pci0kwJ__st0{fill:#ff4a2e;stroke:#333333;stroke-miterlimit:10;} .__Pci0kwJ__st1{fill:#333333;} .__Pci0kwJ__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__Pci0kwJ__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style><circle class=\\\"__Pci0kwJ__st0 \\\" cx=\\\"9\\\" cy=\\\"9\\\" r=\\\"8.5\\\"></circle><circle class=\\\"__Pci0kwJ__st1 \\\" cx=\\\"6\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><circle class=\\\"__Pci0kwJ__st1 \\\" cx=\\\"12\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><path class=\\\"__Pci0kwJ__st2 \\\" d=\\\"M8.8,14.4\\\"></path><path class=\\\"__Pci0kwJ__st3 \\\" d=\\\"M8.9,11c2,0,3.8,0.9,4.6,2 M8.9,11c-2,0-3.6,0.9-4.4,2\\\"></path></svg>\"","export default \"<template>\\n <span id=\\\"icon\\\"> </span>\\n</template>\\n\";","module.exports = \"<svg viewBox=\\\"0 0 18 18\\\" style=\\\"enable-background:new 0 0 18 18;\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><defs><style type=\\\"text/css\\\"> .__2A8fAMn__st0{fill:#ffEb3b;stroke:#333333;stroke-miterlimit:10;} .__2A8fAMn__st1{fill:#333333;} .__2A8fAMn__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__2A8fAMn__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style></defs><circle class=\\\"__2A8fAMn__st0 \\\" cx=\\\"9\\\" cy=\\\"9\\\" r=\\\"8.5\\\"></circle><circle class=\\\"__2A8fAMn__st1 \\\" cx=\\\"6\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><circle class=\\\"__2A8fAMn__st1 \\\" cx=\\\"12\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><path class=\\\"__2A8fAMn__st2 \\\" d=\\\"M8.8,14.4\\\"></path><path class=\\\"__2A8fAMn__st3 \\\" d=\\\"M9.1,13c-2,0-3.8-0.9-4.6-2 M9.1,13c2,0,3.6-0.9,4.4-2\\\"></path></svg>\"","// Dependencies\nimport {\n Component,\n CustomElement,\n CustomElementOptions,\n Prop,\n Watch,\n getShadowRootElement\n} from \"super-custom-elements\";\n\n// Assets\nimport StatusDeficient from \"../../assets/svg/icons/status-deficient.svg\";\nimport StatusGood from \"../../assets/svg/icons/status-good.svg\";\nimport StatusSatisfactory from \"../../assets/svg/icons/status-satisfactory.svg\";\nimport StatusUseable from \"../../assets/svg/icons/status-useable.svg\";\n\ninterface GnIconOptions extends CustomElementOptions {}\n\n@Component({\n tag: \"gn-icon\",\n template: import(\"./gn-icon.html\"),\n style: import(\"./template.scss\")\n})\nexport class GnIcon extends CustomElement {\n private static readonly elementSelector = \"gn-icon\";\n private iconElement: HTMLAnchorElement;\n\n @Prop() id: string;\n @Prop() icon: string;\n @Prop() width: string;\n @Prop() height: string;\n\n constructor() {\n super();\n }\n\n setup(options?: GnIconOptions): void {\n this.connect(options.container);\n if (options.id) {\n this.id = options.id;\n }\n }\n\n getGeonorgeIcon(environment: string) {\n switch (environment) {\n case \"status-deficient\":\n return StatusDeficient;\n case \"status-good\":\n return StatusGood;\n case \"status-satisfactory\":\n return StatusSatisfactory;\n case \"status-useable\":\n return StatusUseable;\n default:\n return null;\n }\n }\n\n renderIcon(icon: string) {\n this.iconElement = getShadowRootElement(this, \"#icon\");\n this.iconElement.innerHTML = this.getGeonorgeIcon(icon);\n }\n\n setIconWidth(width: string) {\n this.iconElement = getShadowRootElement(this, \"#icon\");\n this.iconElement.style.width = width?.length ? width : \"1em\";\n }\n\n setIconHeight(height: string) {\n this.iconElement = getShadowRootElement(this, \"#icon\");\n this.iconElement.style.height = height?.length ? height : \"1em\";\n }\n\n connectedCallback() {\n this.renderIcon(this.icon);\n this.setIconWidth(this.width);\n this.setIconHeight(this.height);\n }\n\n @Watch(\"icon\")\n iconChanged() {\n if (this.icon) {\n this.renderIcon(this.icon);\n }\n }\n\n @Watch(\"width\")\n widthChanged() {\n this.setIconWidth(this.width);\n }\n\n @Watch(\"height\")\n heightChanged() {\n this.setIconHeight(this.height);\n }\n\n public static setup(selector: string, options: GnIconOptions) {}\n}\n","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","module.exports = \"<svg version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" x=\\\"0px\\\" y=\\\"0px\\\" viewBox=\\\"0 0 18 18\\\" style=\\\"enable-background:new 0 0 18 18;\\\" xml:space=\\\"preserve\\\"><style type=\\\"text/css\\\"> .__3phJTh6__st0{fill:#ffEb3b;stroke:#333333;stroke-miterlimit:10;} .__3phJTh6__st1{fill:#333333;} .__3phJTh6__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__3phJTh6__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style><circle class=\\\"__3phJTh6__st0 \\\" cx=\\\"9\\\" cy=\\\"9\\\" r=\\\"8.5\\\"></circle><circle class=\\\"__3phJTh6__st1 \\\" cx=\\\"6\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><circle class=\\\"__3phJTh6__st1 \\\" cx=\\\"12\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><path class=\\\"__3phJTh6__st2 \\\" d=\\\"M8.8,14.4\\\"></path><line class=\\\"__3phJTh6__st3 \\\" x1=\\\"4.5\\\" y1=\\\"12\\\" x2=\\\"13.5\\\" y2=\\\"12\\\"></line></svg>\"","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:inline-block}#icon{display:block}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/gn-icon/template.scss\"],\"names\":[],\"mappings\":\"AAAA,MACI,oBAAA,CAGJ,MACI,aAAA\",\"sourcesContent\":[\":host {\\n display: inline-block;\\n}\\n\\n#icon {\\n display: block;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(2148);\n"],"names":["root","factory","exports","module","define","amd","self","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","id","_k","push","Listen","eventName","selector","target","methodName","constructor","listeners","handler","addEventListeners","targetRoot","shadowRoot","listener","eventTarget","querySelector","addEventListener","e","call","Dispatch","propertyName","Object","defineProperty","get","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Watch","attrName","watchAttributes","toKebabCase","propsInit","GnIcon","CustomElement","super","setup","connect","container","getGeonorgeIcon","environment","renderIcon","icon","iconElement","getShadowRootElement","innerHTML","setIconWidth","width","style","setIconHeight","height","connectedCallback","iconChanged","widthChanged","heightChanged","elementSelector","Prop","Component","tag","template","str","replace","toLowerCase","toCamelCase","m","toUpperCase","tryParseInt","value","parseInt","NaN","parseFloat","getElement","document","customElement","HTMLElement","isConnected","appendChild","Toggle","propName","hasAttribute","attrValue","getAttribute","test","set","oldValue","console","warn","__connected","props","setAttribute","removeAttribute","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","onAttributeChange","initializeProps","prop","plainAttributes","keys","forEach","v","cycleProps","getProps","attribValue","new","args","prototype","name","showShadowRoot","shadow","attachShadow","mode","observedAttributes","x","attributeChangedCallback","newValue","methodToCall","old","render","createElement","getStyle","Promise","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","ready","resolve","_","customElements","___CSS_LOADER_EXPORT___","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
1
+ {"version":3,"file":"GnIcon.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,KAEtBD,EAAe,SAAIA,EAAe,UAAK,CAAC,EAAGA,EAAe,SAAU,OAAIC,IACzE,CATD,CASGK,MAAM,I,oGCNLC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACL,EAAOM,GAAI,kDAAmD,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,6CAA6C,MAAQ,GAAG,SAAW,iCAAiC,eAAiB,CAAC,+EAA+E,WAAa,MAEzU,S,yDCPA,iE,sBCMAN,EAAOD,QAAU,SAAUQ,GACzB,IAAIC,EAAO,GA4EX,OAzEAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAU,GACVC,OAA+B,IAAZF,EAAK,GAoB5B,OAnBIA,EAAK,KACPC,GAAW,cAAcE,OAAOH,EAAK,GAAI,QAEvCA,EAAK,KACPC,GAAW,UAAUE,OAAOH,EAAK,GAAI,OAEnCE,IACFD,GAAW,SAASE,OAAOH,EAAK,GAAGI,OAAS,EAAI,IAAID,OAAOH,EAAK,IAAM,GAAI,OAE5EC,GAAWN,EAAuBK,GAC9BE,IACFD,GAAW,KAETD,EAAK,KACPC,GAAW,KAETD,EAAK,KACPC,GAAW,KAENA,CACT,IAAGI,KAAK,GACV,EAGAT,EAAKU,EAAI,SAAWC,EAASC,EAAOC,EAAQC,EAAUC,GAC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,IADC,IAAA6B,OAAM,S,gCAQP,IADC,IAAAA,OAAM,U,iCAMP,IADC,IAAAA,OAAM,W,2CApEEC,EAAM,IALlB,IAAAtH,WAAU,CACPG,IAAK,UACLiC,SAAU,QAAF,wBAAS,SACjBkB,MAAO,QAAF,wBAAS,YAELgE,E,GCtBTgB,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBrJ,IAAjBsJ,EACH,OAAOA,EAAa/K,QAGrB,IAAIC,EAAS2K,EAAyBE,GAAY,CACjDvK,GAAIuK,EAEJ9K,QAAS,CAAC,GAOX,OAHAgL,EAAoBF,GAAU1D,KAAKnH,EAAOD,QAASC,EAAQA,EAAOD,QAAS6K,GAGpE5K,EAAOD,OACf,C,OCrBA6K,EAAoBI,EAAKhL,IACxB,IAAIiL,EAASjL,GAAUA,EAAOkL,WAC7B,IAAOlL,EAAiB,QACxB,IAAM,EAEP,OADA4K,EAAoBO,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdL,EAAoBO,EAAI,CAACpL,EAASsL,KACjC,IAAI,IAAIC,KAAOD,EACXT,EAAoBW,EAAEF,EAAYC,KAASV,EAAoBW,EAAExL,EAASuL,IAC5EhI,OAAOgE,eAAevH,EAASuL,EAAK,CAAEE,YAAY,EAAMxF,IAAKqF,EAAWC,IAE1E,ECNDV,EAAoBW,EAAI,CAACE,EAAKpD,IAAU/E,OAAOZ,UAAUgJ,eAAevE,KAAKsE,EAAKpD,GCClFuC,EAAoBe,EAAK5L,IACH,oBAAX6L,QAA0BA,OAAOC,aAC1CvI,OAAOgE,eAAevH,EAAS6L,OAAOC,YAAa,CAAE5D,MAAO,WAE7D3E,OAAOgE,eAAevH,EAAS,aAAc,CAAEkI,OAAO,GAAO,ECFpC2C,EAAoB,K","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/./stories/gn-icon/template.scss","webpack://geonorge/./stories/gn-icon/gn-icon.html","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./assets/svg/icons/status-deficient.svg","webpack://geonorge/./assets/svg/icons/status-good.svg","webpack://geonorge/./assets/svg/icons/status-satisfactory.svg","webpack://geonorge/./assets/svg/icons/status-useable.svg","webpack://geonorge/./stories/gn-icon/gn-icon.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"GnIcon\"] = factory();\n})(self, () => {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:inline-block}#icon{display:block}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/gn-icon/template.scss\"],\"names\":[],\"mappings\":\"AAAA,MACI,oBAAA,CAGJ,MACI,aAAA\",\"sourcesContent\":[\":host {\\n display: inline-block;\\n}\\n\\n#icon {\\n display: block;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","export default \"<template>\\n <span id=\\\"icon\\\"> </span>\\n</template>\\n\";","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","module.exports = \"<svg version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" x=\\\"0px\\\" y=\\\"0px\\\" viewBox=\\\"0 0 18 18\\\" style=\\\"enable-background:new 0 0 18 18;\\\" xml:space=\\\"preserve\\\"><style type=\\\"text/css\\\"> .__Pci0kwJ__st0{fill:#ff4a2e;stroke:#333333;stroke-miterlimit:10;} .__Pci0kwJ__st1{fill:#333333;} .__Pci0kwJ__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__Pci0kwJ__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style><circle class=\\\"__Pci0kwJ__st0 \\\" cx=\\\"9\\\" cy=\\\"9\\\" r=\\\"8.5\\\"></circle><circle class=\\\"__Pci0kwJ__st1 \\\" cx=\\\"6\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><circle class=\\\"__Pci0kwJ__st1 \\\" cx=\\\"12\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><path class=\\\"__Pci0kwJ__st2 \\\" d=\\\"M8.8,14.4\\\"></path><path class=\\\"__Pci0kwJ__st3 \\\" d=\\\"M8.9,11c2,0,3.8,0.9,4.6,2 M8.9,11c-2,0-3.6,0.9-4.4,2\\\"></path></svg>\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 18 18\\\"><circle cx=\\\"9\\\" cy=\\\"9\\\" r=\\\"8.5\\\" fill=\\\"#8fff33\\\" stroke=\\\"#333\\\"></circle><g fill=\\\"#333\\\"><circle cx=\\\"6\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><circle cx=\\\"12\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle></g><g stroke=\\\"#333\\\" stroke-miterlimit=\\\"10\\\"><path d=\\\"M9.1 14.915c-2 0-4.584-1.86-4.6-4.086m4.6 4.086c2 0 4.408-2.129 4.4-4.111\\\" fill=\\\"none\\\" stroke-width=\\\"1.399\\\"></path><path d=\\\"M9.622 11.403l-4.546.003m.989-.025l6.855.049\\\" fill=\\\"url(#C)\\\" stroke-width=\\\"1.22\\\"></path></g><g fill=\\\"#333\\\"><path d=\\\"M5.224 11.744h7.391v1.869H5.224zm1.338 2.379h3.844v.467H6.562z\\\"></path><path d=\\\"M6.775 13.571h4.226v.743H6.775z\\\"></path></g><path d=\\\"M3.738 8.792h11.001v2.081H3.738z\\\" fill=\\\"#8fff33\\\"></path></svg>\"","module.exports = \"<svg viewBox=\\\"0 0 18 18\\\" style=\\\"enable-background:new 0 0 18 18;\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><defs><style type=\\\"text/css\\\"> .__2A8fAMn__st0{fill:#ffEb3b;stroke:#333333;stroke-miterlimit:10;} .__2A8fAMn__st1{fill:#333333;} .__2A8fAMn__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__2A8fAMn__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style></defs><circle class=\\\"__2A8fAMn__st0 \\\" cx=\\\"9\\\" cy=\\\"9\\\" r=\\\"8.5\\\"></circle><circle class=\\\"__2A8fAMn__st1 \\\" cx=\\\"6\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><circle class=\\\"__2A8fAMn__st1 \\\" cx=\\\"12\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><path class=\\\"__2A8fAMn__st2 \\\" d=\\\"M8.8,14.4\\\"></path><path class=\\\"__2A8fAMn__st3 \\\" d=\\\"M9.1,13c-2,0-3.8-0.9-4.6-2 M9.1,13c2,0,3.6-0.9,4.4-2\\\"></path></svg>\"","module.exports = \"<svg version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" x=\\\"0px\\\" y=\\\"0px\\\" viewBox=\\\"0 0 18 18\\\" style=\\\"enable-background:new 0 0 18 18;\\\" xml:space=\\\"preserve\\\"><style type=\\\"text/css\\\"> .__3phJTh6__st0{fill:#ffEb3b;stroke:#333333;stroke-miterlimit:10;} .__3phJTh6__st1{fill:#333333;} .__3phJTh6__st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;} .__3phJTh6__st3{fill:none;stroke:#333333;stroke-miterlimit:10;} </style><circle class=\\\"__3phJTh6__st0 \\\" cx=\\\"9\\\" cy=\\\"9\\\" r=\\\"8.5\\\"></circle><circle class=\\\"__3phJTh6__st1 \\\" cx=\\\"6\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><circle class=\\\"__3phJTh6__st1 \\\" cx=\\\"12\\\" cy=\\\"6\\\" r=\\\"1.5\\\"></circle><path class=\\\"__3phJTh6__st2 \\\" d=\\\"M8.8,14.4\\\"></path><line class=\\\"__3phJTh6__st3 \\\" x1=\\\"4.5\\\" y1=\\\"12\\\" x2=\\\"13.5\\\" y2=\\\"12\\\"></line></svg>\"","// Dependencies\nimport {\n Component,\n CustomElement,\n CustomElementOptions,\n Prop,\n Watch,\n getShadowRootElement\n} from \"super-custom-elements\";\n\n// Assets\nimport StatusDeficient from \"../../assets/svg/icons/status-deficient.svg\";\nimport StatusGood from \"../../assets/svg/icons/status-good.svg\";\nimport StatusSatisfactory from \"../../assets/svg/icons/status-satisfactory.svg\";\nimport StatusUseable from \"../../assets/svg/icons/status-useable.svg\";\n\ninterface GnIconOptions extends CustomElementOptions {}\n\n@Component({\n tag: \"gn-icon\",\n template: import(\"./gn-icon.html\"),\n style: import(\"./template.scss\")\n})\nexport class GnIcon extends CustomElement {\n private static readonly elementSelector = \"gn-icon\";\n private iconElement: HTMLAnchorElement;\n\n @Prop() id: string;\n @Prop() icon: string;\n @Prop() width: string;\n @Prop() height: string;\n\n constructor() {\n super();\n }\n\n setup(options?: GnIconOptions): void {\n this.connect(options.container);\n if (options.id) {\n this.id = options.id;\n }\n }\n\n getGeonorgeIcon(environment: string) {\n switch (environment) {\n case \"status-deficient\":\n return StatusDeficient;\n case \"status-good\":\n return StatusGood;\n case \"status-satisfactory\":\n return StatusSatisfactory;\n case \"status-useable\":\n return StatusUseable;\n default:\n return null;\n }\n }\n\n renderIcon(icon: string) {\n this.iconElement = getShadowRootElement(this, \"#icon\");\n this.iconElement.innerHTML = this.getGeonorgeIcon(icon);\n }\n\n setIconWidth(width: string) {\n this.iconElement = getShadowRootElement(this, \"#icon\");\n this.iconElement.style.width = width?.length ? width : \"1em\";\n }\n\n setIconHeight(height: string) {\n this.iconElement = getShadowRootElement(this, \"#icon\");\n this.iconElement.style.height = height?.length ? height : \"1em\";\n }\n\n connectedCallback() {\n this.renderIcon(this.icon);\n this.setIconWidth(this.width);\n this.setIconHeight(this.height);\n }\n\n @Watch(\"icon\")\n iconChanged() {\n if (this.icon) {\n this.renderIcon(this.icon);\n }\n }\n\n @Watch(\"width\")\n widthChanged() {\n this.setIconWidth(this.width);\n }\n\n @Watch(\"height\")\n heightChanged() {\n this.setIconHeight(this.height);\n }\n\n public static setup(selector: string, options: GnIconOptions) {}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(2148);\n"],"names":["root","factory","exports","module","define","amd","self","___CSS_LOADER_EXPORT___","push","id","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","Component","args","target","tag","toKebabCase","prototype","constructor","name","customElement","super","props","showShadowRoot","shadow","shadowRoot","attachShadow","mode","observedAttributes","Object","keys","propsInit","x","attributeChangedCallback","oldValue","newValue","onAttributeChange","set","toCamelCase","watchAttributes","methodToCall","__connected","old","new","connectedCallback","render","addEventListeners","initializeProps","template","document","createElement","innerHTML","getStyle","Promise","appendChild","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","style","ready","resolve","_","customElements","get","CustomElement","HTMLElement","connect","selector","isConnected","querySelector","getElement","getShadowRootElement","Listen","eventName","methodName","listeners","handler","targetRoot","listener","eventTarget","addEventListener","e","call","Dispatch","propertyName","defineProperty","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Prop","propName","attrName","getAttribute","value","tryParseInt","setAttribute","hasAttribute","prop","plainAttributes","forEach","v","cycleProps","getProps","attribValue","Toggle","attrValue","test","console","warn","removeAttribute","str","replace","toLowerCase","m","toUpperCase","parseInt","NaN","parseFloat","Watch","GnIcon","setup","container","getGeonorgeIcon","environment","renderIcon","icon","iconElement","setIconWidth","width","setIconHeight","height","iconChanged","widthChanged","heightChanged","elementSelector","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
package/GnInput.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.GnInput=e())}(self,(()=>(()=>{"use strict";var t={164:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,r,s){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(n)for(var d=0;d<this.length;d++){var a=this[d][0];null!=a&&(i[a]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);n&&i[c[0]]||(void 0!==s&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),e.push(c))}},e}},169:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const n=o(2466);e.Listen=(t,e)=>(o,n)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:e,eventName:t,handler:o[n]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const o of t.constructor.listeners){const n=o.selector?e.querySelector(o.selector)?e.querySelector(o.selector):null:t;n&&n.addEventListener(o.eventName,(e=>{o.handler.call(t,e)}))}}},e.Dispatch=t=>(e,o)=>{Object.defineProperty(e,o,{get:function(){const e=this;return{emit(r){const s=t||n.toDotCase(o);e.dispatchEvent(new CustomEvent(s,r))}}}})}},1040:(t,e,o)=>{o.r(e),o.d(e,{default:()=>d});var n=o(5052),r=o.n(n),s=o(164),i=o.n(s)()(r());i.push([t.id,':host([block]){display:block}:host(:not([block])){display:inline-block}:host([fullwidth]){display:block}:host([fullwidth]) ::slotted(input){width:100%}:host([width]) ::slotted(input[type=text]),:host([width]) ::slotted(input[type=number]),:host([width]) ::slotted(input[type=email]),:host([width]) ::slotted(input[type=tel]),:host([width]) ::slotted(input[type=date]),:host([width]) ::slotted(input[type=datetime-local]),:host([width]) ::slotted(input[type=time]),:host([width]) ::slotted(input[type=url]),:host([width]) ::slotted(input[type=search]),:host([width]) ::slotted(input[type=password]),:host([width]) ::slotted(input:not([type])){width:100%}::slotted(input[type=text]),::slotted(input[type=number]),::slotted(input[type=email]),::slotted(input[type=tel]),::slotted(input[type=date]),::slotted(input[type=datetime-local]),::slotted(input[type=time]),::slotted(input[type=url]),::slotted(input[type=search]),::slotted(input[type=password]),::slotted(input:not([type])){-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:4px;border-radius:4px;box-sizing:border-box;font-family:"Open Sans",sans-serif;font-size:16px;font-size:12pt;padding:0 8px;height:32px;box-shadow:none;position:relative;z-index:1;background-color:#fff;border:1px solid #d8d8d8;color:#2f3940}::slotted(input[type=text]:disabled),::slotted(input[type=number]:disabled),::slotted(input[type=email]:disabled),::slotted(input[type=tel]:disabled),::slotted(input[type=date]:disabled),::slotted(input[type=datetime-local]:disabled),::slotted(input[type=time]:disabled),::slotted(input[type=url]:disabled),::slotted(input[type=search]:disabled),::slotted(input[type=password]:disabled),::slotted(input:not([type]):disabled){background-color:#f4f4f4;color:#707070;border:1px solid #dedede;cursor:not-allowed}::slotted(input[type=checkbox]),::slotted(input[type=radio]){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid #2f3940;font:inherit;color:currentColor;width:16px;height:16px;margin:0 6px 0 0}::slotted(input[type=checkbox]:checked),::slotted(input[type=radio]:checked){border-color:#3767c7}::slotted(input[type=checkbox]:focus-visible),::slotted(input[type=radio]:focus-visible){outline:max(2px,.1em) solid #3767c7;outline-offset:max(2px,.1em)}::slotted(input[type=checkbox]){-webkit-border-radius:3px;border-radius:3px;vertical-align:text-top}::slotted(input[type=checkbox]:checked)::before{background-color:#3767c7;content:"✓";line-height:13px;color:#fff;display:inline-block;vertical-align:top;width:100%}::slotted(input[type=checkbox]:disabled){background-color:#dedede;border-color:#dedede;cursor:not-allowed}::slotted(input[type=checkbox]:checked:disabled)::before{background-color:#dedede;color:#707070}::slotted(input[type=radio]){-webkit-border-radius:50%;border-radius:50%;transform:translateY(-0.075em);display:inline-grid;place-content:center}::slotted(input[type=radio])::before{-webkit-border-radius:50%;border-radius:50%;content:"";width:8px;height:8px;transform:scale(0);transition:120ms transform ease-in-out}::slotted(input[type=radio]:checked)::before{background-color:#3767c7;transform:scale(1)}::slotted(input[type=radio]:disabled){border-color:#dedede}::slotted(input[type=radio]:checked:disabled)::before{background-color:#dedede;transform:scale(1)}',"",{version:3,sources:["webpack://./stories/gn-input/template.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAAA,eAKA,aACI,CAAA,qBAGJ,oBACI,CAAA,mBAGJ,aACI,CAAA,oCACA,UACI,CAAA,2eAKJ,UAWI,CAAA,sUAIR,uBAWmC,CAAA,oBAAA,CAAA,eAAA,CAAA,yBACM,CAAA,iBAAA,CAAA,qBACrC,CAAA,kCCjDW,CAAA,cDmDX,CAAA,cACA,CAAA,aACA,CAAA,WACA,CAAA,eACA,CAAA,iBACA,CAAA,SACA,CAAA,qBACA,CAAA,wBACA,CAAA,aEpDU,CAAA,yaFwDd,wBE/BsB,CAAA,aAEN,CAAA,wBF0CZ,CAAA,kBACA,CAAA,6DAGJ,uBAEmC,CAAA,oBAAA,CAAA,eAAA,CAAA,wBAC/B,CAAA,YACA,CAAA,kBACA,CAAA,UACA,CAAA,WACA,CAAA,gBACA,CAAA,6EAGJ,oBE5Ee,CAAA,yFFiFf,mCAEI,CAAA,4BACA,CAAA,gCAGJ,yBACyC,CAAA,iBAAA,CAAA,uBACrC,CAAA,gDAIA,wBE7FW,CAAA,WF+FP,CAAA,gBACA,CAAA,UACA,CAAA,oBACA,CAAA,kBACA,CAAA,UACA,CAAA,yCAIR,wBEtFkB,CAAA,oBAAA,CAAA,kBFyFd,CAAA,yDAIA,wBE7Fc,CAAA,aACF,CAAA,6BFkGhB,yBACyC,CAAA,iBAAA,CAAA,8BACrC,CAAA,mBACA,CAAA,oBACA,CAAA,qCACA,yBACyC,CAAA,iBAAA,CAAA,UACrC,CAAA,SACA,CAAA,UACA,CAAA,kBACA,CAAA,sCACA,CAAA,6CAKJ,wBErIW,CAAA,kBFuIP,CAAA,sCAIR,oBEzHkB,CAAA,sDF8Hd,wBE9Hc,CAAA,kBFgIV",sourcesContent:['@use "../../style/mixins/appearance";\n@use "../../style/mixins/border-radius";\n@use "../../style/variables/colors";\n@use "../../style/variables/typography";\n\n:host([block]) {\n display: block;\n}\n\n:host(:not([block])) {\n display: inline-block;\n}\n\n:host([fullwidth]) {\n display: block;\n ::slotted(input) {\n width: 100%;\n }\n}\n\n:host([width]) {\n ::slotted(input[type="text"]),\n ::slotted(input[type="number"]),\n ::slotted(input[type="email"]),\n ::slotted(input[type="tel"]),\n ::slotted(input[type="date"]),\n ::slotted(input[type="datetime-local"]),\n ::slotted(input[type="time"]),\n ::slotted(input[type="url"]),\n ::slotted(input[type="search"]),\n ::slotted(input[type="password"]),\n ::slotted(input:not([type])) {\n width: 100%;\n }\n}\n\n::slotted(input[type="text"]),\n::slotted(input[type="number"]),\n::slotted(input[type="email"]),\n::slotted(input[type="tel"]),\n::slotted(input[type="date"]),\n::slotted(input[type="datetime-local"]),\n::slotted(input[type="time"]),\n::slotted(input[type="url"]),\n::slotted(input[type="search"]),\n::slotted(input[type="password"]),\n::slotted(input:not([type])) {\n @include appearance.appearance(none);\n @include border-radius.border-radius(4px);\n box-sizing: border-box;\n font-family: typography.$default-font;\n font-size: 16px;\n font-size: 12pt;\n padding: 0 8px;\n height: 32px;\n box-shadow: none;\n position: relative;\n z-index: 1;\n background-color: #fff;\n border: 1px solid colors.$default-border;\n color: colors.$default-text;\n}\n\n::slotted(input[type="text"]:disabled),\n::slotted(input[type="number"]:disabled),\n::slotted(input[type="email"]:disabled),\n::slotted(input[type="tel"]:disabled),\n::slotted(input[type="date"]:disabled),\n::slotted(input[type="datetime-local"]:disabled),\n::slotted(input[type="time"]:disabled),\n::slotted(input[type="url"]:disabled),\n::slotted(input[type="search"]:disabled),\n::slotted(input[type="password"]:disabled),\n::slotted(input:not([type]):disabled) {\n background-color: colors.$disabled-background;\n color: colors.$disabled-text;\n border: 1px solid colors.$disabled-border;\n cursor: not-allowed;\n}\n\n::slotted(input[type="checkbox"]),\n::slotted(input[type="radio"]) {\n @include appearance.appearance(none);\n border: 2px solid colors.$default-text;\n font: inherit;\n color: currentColor;\n width: 16px;\n height: 16px;\n margin: 0 6px 0 0;\n}\n\n::slotted(input[type="checkbox"]:checked),\n::slotted(input[type="radio"]:checked) {\n border-color: colors.$primary-text;\n}\n\n::slotted(input[type="checkbox"]:focus-visible),\n::slotted(input[type="radio"]:focus-visible) {\n outline: max(2px, 0.1em) solid colors.$primary-text;\n outline-offset: max(2px, 0.1em);\n}\n\n::slotted(input[type="checkbox"]) {\n @include border-radius.border-radius(3px);\n vertical-align: text-top;\n}\n\n::slotted(input[type="checkbox"]:checked) {\n &::before {\n background-color: colors.$primary-text;\n content: "✓";\n line-height: 13px;\n color: #fff;\n display: inline-block;\n vertical-align: top;\n width: 100%;\n }\n}\n\n::slotted(input[type="checkbox"]:disabled) {\n background-color: colors.$disabled-border;\n border-color: colors.$disabled-border;\n cursor: not-allowed;\n}\n\n::slotted(input[type="checkbox"]:checked:disabled) {\n &::before {\n background-color: colors.$disabled-border;\n color: colors.$disabled-text;\n }\n}\n\n::slotted(input[type="radio"]) {\n @include border-radius.border-radius(50%);\n transform: translateY(-0.075em);\n display: inline-grid;\n place-content: center;\n &::before {\n @include border-radius.border-radius(50%);\n content: "";\n width: 8px;\n height: 8px;\n transform: scale(0);\n transition: 120ms transform ease-in-out;\n }\n}\n\n::slotted(input[type="radio"]:checked) {\n &::before {\n background-color: colors.$primary-text;\n transform: scale(1);\n }\n}\n\n::slotted(input[type="radio"]:disabled) {\n border-color: colors.$disabled-border;\n}\n\n::slotted(input[type="radio"]:checked:disabled) {\n &::before {\n background-color: colors.$disabled-border;\n transform: scale(1);\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 15px;\n',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n\n$primary-background: #3767C7;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #f4f4f4;\n$disabled-border: #dedede;\n$disabled-text: #707070;\n\n\n$light-green: #8fff33;\n$light-yellow: #ffEb3b;\n$light-red: #ff4a2e;\n"],sourceRoot:""}]);const d=i},1063:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const n=o(2466);e.Watch=t=>(e,o)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[n.toKebabCase(t)]=o,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},1534:function(t,e,o){var n,r=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(e,o);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,n,r)}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__decorate||function(t,e,o,n){var r,s=arguments.length,i=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,n);else for(var d=t.length-1;d>=0;d--)(r=t[d])&&(i=(s<3?r(i):s>3?r(e,o,i):r(e,o))||i);return s>3&&i&&Object.defineProperty(e,o,i),i},d=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[e.length]=o);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o=n(t),i=0;i<o.length;i++)"default"!==o[i]&&r(e,t,o[i]);return s(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.GnInput=void 0;const a=o(3128);let l=class extends a.CustomElement{constructor(){super()}widthChanged(){(0,a.getShadowRootElement)(this,"#input-container").style.width=this.width}setup(t){}};e.GnInput=l,i([(0,a.Toggle)()],l.prototype,"block",void 0),i([(0,a.Toggle)()],l.prototype,"fullwidth",void 0),i([(0,a.Prop)()],l.prototype,"width",void 0),i([(0,a.Watch)("width")],l.prototype,"widthChanged",null),e.GnInput=l=i([(0,a.Component)({tag:"gn-input",template:Promise.resolve().then((()=>d(o(6496)))),style:Promise.resolve().then((()=>d(o(1040))))})],l)},2466:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},3128:function(t,e,o){var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[o]}})}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||n(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(o(8631),e),r(o(3704),e),r(o(3365),e),r(o(169),e),r(o(6999),e),r(o(3982),e),r(o(8861),e),r(o(1063),e)},3365:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},3704:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=o},3982:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const n=o(2466);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const o=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==o||""==o:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==o&&null!==o?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},5052:t=>{t.exports=function(t){var e=t[1],o=t[3];if(!o)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),s="/*# ".concat(r," */");return[e].concat([s]).join("\n")}return[e].join("\n")}},6496:(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});const n='<template>\n <div id="input-container" class="input-container">\n <slot></slot>\n </div>\n</template>\n'},6999:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const n=o(2466);e.Prop=()=>(t,e)=>{const o=n.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(o)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=n.tryParseInt(t),"object"!=typeof t?this.setAttribute(o,t):this.onAttributeChange(o,r,t,!1)}else this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let o of(t=>{const e=t.constructor.watchAttributes,o=Object.assign({},e);Object.keys(o).forEach((t=>o[t]=""));const n=Object.assign(Object.assign({},o),t.constructor.propsInit);return Object.keys(n)})(t)){if(e)if(null==e[n.toKebabCase(o)])e[n.toKebabCase(o)]="";else{const r=t.props[o]||t.getAttribute(n.toKebabCase(o));"function"==typeof t[e[o]]&&t[e[o]]({new:r})}t.constructor.propsInit[o]&&(t.hasAttribute(n.toKebabCase(o))||(t[o]=t.constructor.propsInit[o]))}}},8631:function(t,e,o){var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(r,s){function i(t){try{a(n.next(t))}catch(t){s(t)}}function d(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,d)}a((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=o(169),s=o(6999),i=o(2466);e.Component=t=>e=>{var o;const d=t.tag||i.toKebabCase(e.prototype.constructor.name),a=((o=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>i.toKebabCase(t)))}attributeChangedCallback(t,e,o){this.onAttributeChange(t,e,o)}onAttributeChange(t,e,o,n=!0){if(e!=o){n&&(this[i.toCamelCase(t)]=o);const r=this.constructor.watchAttributes;if(r&&r[t]){const n=r[t];this.__connected&&"function"==typeof this[n]&&this[n]({old:e,new:o})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return n(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),s.initializeProps(this)}))}render(){return n(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return n(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),o=document.createRange().createContextualFragment(e);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return n(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,o.ready=new Promise(((t,e)=>t(!0))),o);return customElements.get(d)||customElements.define(d,a),a}},8861:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={id:n,exports:{}};return t[n].call(s.exports,s,s.exports,o),s.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(1534)})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.GnInput=e())}(self,(()=>(()=>{"use strict";var t={1040(t,e,o){o.r(e),o.d(e,{default:()=>d});var n=o(5052),r=o.n(n),s=o(164),i=o.n(s)()(r());i.push([t.id,':host([block]){display:block}:host(:not([block])){display:inline-block}:host([fullwidth]){display:block}:host([fullwidth]) ::slotted(input){width:100%}:host([width]) ::slotted(input[type=text]),:host([width]) ::slotted(input[type=number]),:host([width]) ::slotted(input[type=email]),:host([width]) ::slotted(input[type=tel]),:host([width]) ::slotted(input[type=date]),:host([width]) ::slotted(input[type=datetime-local]),:host([width]) ::slotted(input[type=time]),:host([width]) ::slotted(input[type=url]),:host([width]) ::slotted(input[type=search]),:host([width]) ::slotted(input[type=password]),:host([width]) ::slotted(input:not([type])){width:100%}::slotted(input[type=text]),::slotted(input[type=number]),::slotted(input[type=email]),::slotted(input[type=tel]),::slotted(input[type=date]),::slotted(input[type=datetime-local]),::slotted(input[type=time]),::slotted(input[type=url]),::slotted(input[type=search]),::slotted(input[type=password]),::slotted(input:not([type])){-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-border-radius:4px;border-radius:4px;box-sizing:border-box;font-family:"Open Sans",sans-serif;font-size:16px;font-size:12pt;padding:0 8px;height:32px;box-shadow:none;position:relative;z-index:1;background-color:#fff;border:1px solid #d8d8d8;color:#2f3940}::slotted(input[type=text]:disabled),::slotted(input[type=number]:disabled),::slotted(input[type=email]:disabled),::slotted(input[type=tel]:disabled),::slotted(input[type=date]:disabled),::slotted(input[type=datetime-local]:disabled),::slotted(input[type=time]:disabled),::slotted(input[type=url]:disabled),::slotted(input[type=search]:disabled),::slotted(input[type=password]:disabled),::slotted(input:not([type]):disabled){background-color:#f4f4f4;color:#707070;border:1px solid #dedede;cursor:not-allowed}::slotted(input[type=checkbox]),::slotted(input[type=radio]){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid #2f3940;font:inherit;color:currentColor;width:16px;height:16px;margin:0 6px 0 0}::slotted(input[type=checkbox]:checked),::slotted(input[type=radio]:checked){border-color:#3767c7}::slotted(input[type=checkbox]:focus-visible),::slotted(input[type=radio]:focus-visible){outline:max(2px,.1em) solid #3767c7;outline-offset:max(2px,.1em)}::slotted(input[type=checkbox]){-webkit-border-radius:3px;border-radius:3px;vertical-align:text-top}::slotted(input[type=checkbox]:checked)::before{background-color:#3767c7;content:"✓";line-height:13px;color:#fff;display:inline-block;vertical-align:top;width:100%}::slotted(input[type=checkbox]:disabled){background-color:#dedede;border-color:#dedede;cursor:not-allowed}::slotted(input[type=checkbox]:checked:disabled)::before{background-color:#dedede;color:#707070}::slotted(input[type=radio]){-webkit-border-radius:50%;border-radius:50%;transform:translateY(-0.075em);display:inline-grid;place-content:center}::slotted(input[type=radio])::before{-webkit-border-radius:50%;border-radius:50%;content:"";width:8px;height:8px;transform:scale(0);transition:120ms transform ease-in-out}::slotted(input[type=radio]:checked)::before{background-color:#3767c7;transform:scale(1)}::slotted(input[type=radio]:disabled){border-color:#dedede}::slotted(input[type=radio]:checked:disabled)::before{background-color:#dedede;transform:scale(1)}',"",{version:3,sources:["webpack://./stories/gn-input/template.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss"],names:[],mappings:"AAAA,eAKA,aACI,CAAA,qBAGJ,oBACI,CAAA,mBAGJ,aACI,CAAA,oCACA,UACI,CAAA,2eAKJ,UAWI,CAAA,sUAIR,uBAWmC,CAAA,oBAAA,CAAA,eAAA,CAAA,yBACM,CAAA,iBAAA,CAAA,qBACrC,CAAA,kCCjDW,CAAA,cDmDX,CAAA,cACA,CAAA,aACA,CAAA,WACA,CAAA,eACA,CAAA,iBACA,CAAA,SACA,CAAA,qBACA,CAAA,wBACA,CAAA,aEpDU,CAAA,yaFwDd,wBE/BsB,CAAA,aAEN,CAAA,wBF0CZ,CAAA,kBACA,CAAA,6DAGJ,uBAEmC,CAAA,oBAAA,CAAA,eAAA,CAAA,wBAC/B,CAAA,YACA,CAAA,kBACA,CAAA,UACA,CAAA,WACA,CAAA,gBACA,CAAA,6EAGJ,oBE5Ee,CAAA,yFFiFf,mCAEI,CAAA,4BACA,CAAA,gCAGJ,yBACyC,CAAA,iBAAA,CAAA,uBACrC,CAAA,gDAIA,wBE7FW,CAAA,WF+FP,CAAA,gBACA,CAAA,UACA,CAAA,oBACA,CAAA,kBACA,CAAA,UACA,CAAA,yCAIR,wBEtFkB,CAAA,oBAAA,CAAA,kBFyFd,CAAA,yDAIA,wBE7Fc,CAAA,aACF,CAAA,6BFkGhB,yBACyC,CAAA,iBAAA,CAAA,8BACrC,CAAA,mBACA,CAAA,oBACA,CAAA,qCACA,yBACyC,CAAA,iBAAA,CAAA,UACrC,CAAA,SACA,CAAA,UACA,CAAA,kBACA,CAAA,sCACA,CAAA,6CAKJ,wBErIW,CAAA,kBFuIP,CAAA,sCAIR,oBEzHkB,CAAA,sDF8Hd,wBE9Hc,CAAA,kBFgIV",sourcesContent:['@use "../../style/mixins/appearance";\n@use "../../style/mixins/border-radius";\n@use "../../style/variables/colors";\n@use "../../style/variables/typography";\n\n:host([block]) {\n display: block;\n}\n\n:host(:not([block])) {\n display: inline-block;\n}\n\n:host([fullwidth]) {\n display: block;\n ::slotted(input) {\n width: 100%;\n }\n}\n\n:host([width]) {\n ::slotted(input[type="text"]),\n ::slotted(input[type="number"]),\n ::slotted(input[type="email"]),\n ::slotted(input[type="tel"]),\n ::slotted(input[type="date"]),\n ::slotted(input[type="datetime-local"]),\n ::slotted(input[type="time"]),\n ::slotted(input[type="url"]),\n ::slotted(input[type="search"]),\n ::slotted(input[type="password"]),\n ::slotted(input:not([type])) {\n width: 100%;\n }\n}\n\n::slotted(input[type="text"]),\n::slotted(input[type="number"]),\n::slotted(input[type="email"]),\n::slotted(input[type="tel"]),\n::slotted(input[type="date"]),\n::slotted(input[type="datetime-local"]),\n::slotted(input[type="time"]),\n::slotted(input[type="url"]),\n::slotted(input[type="search"]),\n::slotted(input[type="password"]),\n::slotted(input:not([type])) {\n @include appearance.appearance(none);\n @include border-radius.border-radius(4px);\n box-sizing: border-box;\n font-family: typography.$default-font;\n font-size: 16px;\n font-size: 12pt;\n padding: 0 8px;\n height: 32px;\n box-shadow: none;\n position: relative;\n z-index: 1;\n background-color: #fff;\n border: 1px solid colors.$default-border;\n color: colors.$default-text;\n}\n\n::slotted(input[type="text"]:disabled),\n::slotted(input[type="number"]:disabled),\n::slotted(input[type="email"]:disabled),\n::slotted(input[type="tel"]:disabled),\n::slotted(input[type="date"]:disabled),\n::slotted(input[type="datetime-local"]:disabled),\n::slotted(input[type="time"]:disabled),\n::slotted(input[type="url"]:disabled),\n::slotted(input[type="search"]:disabled),\n::slotted(input[type="password"]:disabled),\n::slotted(input:not([type]):disabled) {\n background-color: colors.$disabled-background;\n color: colors.$disabled-text;\n border: 1px solid colors.$disabled-border;\n cursor: not-allowed;\n}\n\n::slotted(input[type="checkbox"]),\n::slotted(input[type="radio"]) {\n @include appearance.appearance(none);\n border: 2px solid colors.$default-text;\n font: inherit;\n color: currentColor;\n width: 16px;\n height: 16px;\n margin: 0 6px 0 0;\n}\n\n::slotted(input[type="checkbox"]:checked),\n::slotted(input[type="radio"]:checked) {\n border-color: colors.$primary-text;\n}\n\n::slotted(input[type="checkbox"]:focus-visible),\n::slotted(input[type="radio"]:focus-visible) {\n outline: max(2px, 0.1em) solid colors.$primary-text;\n outline-offset: max(2px, 0.1em);\n}\n\n::slotted(input[type="checkbox"]) {\n @include border-radius.border-radius(3px);\n vertical-align: text-top;\n}\n\n::slotted(input[type="checkbox"]:checked) {\n &::before {\n background-color: colors.$primary-text;\n content: "✓";\n line-height: 13px;\n color: #fff;\n display: inline-block;\n vertical-align: top;\n width: 100%;\n }\n}\n\n::slotted(input[type="checkbox"]:disabled) {\n background-color: colors.$disabled-border;\n border-color: colors.$disabled-border;\n cursor: not-allowed;\n}\n\n::slotted(input[type="checkbox"]:checked:disabled) {\n &::before {\n background-color: colors.$disabled-border;\n color: colors.$disabled-text;\n }\n}\n\n::slotted(input[type="radio"]) {\n @include border-radius.border-radius(50%);\n transform: translateY(-0.075em);\n display: inline-grid;\n place-content: center;\n &::before {\n @include border-radius.border-radius(50%);\n content: "";\n width: 8px;\n height: 8px;\n transform: scale(0);\n transition: 120ms transform ease-in-out;\n }\n}\n\n::slotted(input[type="radio"]:checked) {\n &::before {\n background-color: colors.$primary-text;\n transform: scale(1);\n }\n}\n\n::slotted(input[type="radio"]:disabled) {\n border-color: colors.$disabled-border;\n}\n\n::slotted(input[type="radio"]:checked:disabled) {\n &::before {\n background-color: colors.$disabled-border;\n transform: scale(1);\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 15px;\n',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$light-gray: #f6f5f4;\n\n$primary-brand: #FE5000;\n\n$primary-background: #3767C7;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #f4f4f4;\n$disabled-border: #dedede;\n$disabled-text: #707070;\n\n\n$light-green: #8fff33;\n$light-yellow: #ffEb3b;\n$light-red: #ff4a2e;\n"],sourceRoot:""}]);const d=i},6496(t,e,o){o.r(e),o.d(e,{default:()=>n});const n='<template>\n <div id="input-container" class="input-container">\n <slot></slot>\n </div>\n</template>\n'},164(t){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,r,s){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(n)for(var d=0;d<this.length;d++){var a=this[d][0];null!=a&&(i[a]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);n&&i[c[0]]||(void 0!==s&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),o&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=o):c[2]=o),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),e.push(c))}},e}},5052(t){t.exports=function(t){var e=t[1],o=t[3];if(!o)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),s="/*# ".concat(r," */");return[e].concat([s]).join("\n")}return[e].join("\n")}},8631(t,e,o){var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(r,s){function i(t){try{a(n.next(t))}catch(t){s(t)}}function d(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,d)}a((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=o(169),s=o(6999),i=o(2466);e.Component=t=>e=>{var o;const d=t.tag||i.toKebabCase(e.prototype.constructor.name),a=((o=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>i.toKebabCase(t)))}attributeChangedCallback(t,e,o){this.onAttributeChange(t,e,o)}onAttributeChange(t,e,o,n=!0){if(e!=o){n&&(this[i.toCamelCase(t)]=o);const r=this.constructor.watchAttributes;if(r&&r[t]){const n=r[t];this.__connected&&"function"==typeof this[n]&&this[n]({old:e,new:o})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return n(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),s.initializeProps(this)}))}render(){return n(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return n(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),o=document.createRange().createContextualFragment(e);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return n(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,o.ready=new Promise(((t,e)=>t(!0))),o);return customElements.get(d)||customElements.define(d,a),a}},3704(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=o},3365(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},3128(t,e,o){var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[o]}})}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||n(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(o(8631),e),r(o(3704),e),r(o(3365),e),r(o(169),e),r(o(6999),e),r(o(3982),e),r(o(8861),e),r(o(1063),e)},169(t,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const n=o(2466);e.Listen=(t,e)=>(o,n)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:e,eventName:t,handler:o[n]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const o of t.constructor.listeners){const n=o.selector?e.querySelector(o.selector)?e.querySelector(o.selector):null:t;n&&n.addEventListener(o.eventName,(e=>{o.handler.call(t,e)}))}}},e.Dispatch=t=>(e,o)=>{Object.defineProperty(e,o,{get:function(){const e=this;return{emit(r){const s=t||n.toDotCase(o);e.dispatchEvent(new CustomEvent(s,r))}}}})}},6999(t,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const n=o(2466);e.Prop=()=>(t,e)=>{const o=n.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(o)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=n.tryParseInt(t),"object"!=typeof t?this.setAttribute(o,t):this.onAttributeChange(o,r,t,!1)}else this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let o of(t=>{const e=t.constructor.watchAttributes,o=Object.assign({},e);Object.keys(o).forEach((t=>o[t]=""));const n=Object.assign(Object.assign({},o),t.constructor.propsInit);return Object.keys(n)})(t)){if(e)if(null==e[n.toKebabCase(o)])e[n.toKebabCase(o)]="";else{const r=t.props[o]||t.getAttribute(n.toKebabCase(o));"function"==typeof t[e[o]]&&t[e[o]]({new:r})}t.constructor.propsInit[o]&&(t.hasAttribute(n.toKebabCase(o))||(t[o]=t.constructor.propsInit[o]))}}},3982(t,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const n=o(2466);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const o=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==o||""==o:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==o&&null!==o?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},8861(t,e){Object.defineProperty(e,"__esModule",{value:!0})},2466(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},1063(t,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const n=o(2466);e.Watch=t=>(e,o)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[n.toKebabCase(t)]=o,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},1534(t,e,o){var n,r=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(e,o);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,n,r)}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__decorate||function(t,e,o,n){var r,s=arguments.length,i=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,n);else for(var d=t.length-1;d>=0;d--)(r=t[d])&&(i=(s<3?r(i):s>3?r(e,o,i):r(e,o))||i);return s>3&&i&&Object.defineProperty(e,o,i),i},d=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[e.length]=o);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o=n(t),i=0;i<o.length;i++)"default"!==o[i]&&r(e,t,o[i]);return s(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.GnInput=void 0;const a=o(3128);let l=class extends a.CustomElement{constructor(){super()}widthChanged(){(0,a.getShadowRootElement)(this,"#input-container").style.width=this.width}setup(t){}};e.GnInput=l,i([(0,a.Toggle)()],l.prototype,"block",void 0),i([(0,a.Toggle)()],l.prototype,"fullwidth",void 0),i([(0,a.Prop)()],l.prototype,"width",void 0),i([(0,a.Watch)("width")],l.prototype,"widthChanged",null),e.GnInput=l=i([(0,a.Component)({tag:"gn-input",template:Promise.resolve().then((()=>d(o(6496)))),style:Promise.resolve().then((()=>d(o(1040))))})],l)}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={id:n,exports:{}};return t[n].call(s.exports,s,s.exports,o),s.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(1534)})()));
2
2
  //# sourceMappingURL=GnInput.js.map