123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376 |
- import {
- Build,
- H,
- Host,
- createEvent,
- forceUpdate,
- getAssetPath,
- h,
- proxyCustomElement
- } from "./chunk-P6MX663D.js";
- import "./chunk-A5ICIBVI.js";
- // node_modules/@esri/calcite-components/dist/components/interfaces.js
- var StatusIcons;
- (function(StatusIcons2) {
- StatusIcons2["green"] = "checkCircle";
- StatusIcons2["yellow"] = "exclamationMarkTriangle";
- StatusIcons2["red"] = "exclamationMarkTriangle";
- StatusIcons2["blue"] = "lightbulb";
- })(StatusIcons || (StatusIcons = {}));
- // node_modules/@esri/calcite-components/dist/components/dom.js
- function getElementDir(el) {
- const prop = "dir";
- const selector = `[${prop}]`;
- const closest = closestElementCrossShadowBoundary(el, selector);
- return closest ? closest.getAttribute(prop) : "ltr";
- }
- function getRootNode(el) {
- return el.getRootNode();
- }
- function getHost(root) {
- return root.host || null;
- }
- function closestElementCrossShadowBoundary(element, selector) {
- function closestFrom(el) {
- return el ? el.closest(selector) || closestFrom(getHost(getRootNode(el))) : null;
- }
- return closestFrom(element);
- }
- var defaultSlotSelector = ":not([slot])";
- function getSlotted(element, slotName, options) {
- if (slotName && !Array.isArray(slotName) && typeof slotName !== "string") {
- options = slotName;
- slotName = null;
- }
- const slotSelector = slotName ? Array.isArray(slotName) ? slotName.map((name) => `[slot="${name}"]`).join(",") : `[slot="${slotName}"]` : defaultSlotSelector;
- if (options === null || options === void 0 ? void 0 : options.all) {
- return queryMultiple(element, slotSelector, options);
- }
- return querySingle(element, slotSelector, options);
- }
- function getDirectChildren(el, selector) {
- return el ? Array.from(el.children || []).filter((child) => child === null || child === void 0 ? void 0 : child.matches(selector)) : [];
- }
- function queryMultiple(element, slotSelector, options) {
- let matches = slotSelector === defaultSlotSelector ? getDirectChildren(element, defaultSlotSelector) : Array.from(element.querySelectorAll(slotSelector));
- matches = options && options.direct === false ? matches : matches.filter((el) => el.parentElement === element);
- matches = (options === null || options === void 0 ? void 0 : options.matches) ? matches.filter((el) => el === null || el === void 0 ? void 0 : el.matches(options.matches)) : matches;
- const selector = options === null || options === void 0 ? void 0 : options.selector;
- return selector ? matches.map((item) => Array.from(item.querySelectorAll(selector))).reduce((previousValue, currentValue) => [...previousValue, ...currentValue], []).filter((match) => !!match) : matches;
- }
- function querySingle(element, slotSelector, options) {
- let match = slotSelector === defaultSlotSelector ? getDirectChildren(element, defaultSlotSelector)[0] || null : element.querySelector(slotSelector);
- match = options && options.direct === false ? match : (match === null || match === void 0 ? void 0 : match.parentElement) === element ? match : null;
- match = (options === null || options === void 0 ? void 0 : options.matches) ? (match === null || match === void 0 ? void 0 : match.matches(options.matches)) ? match : null : match;
- const selector = options === null || options === void 0 ? void 0 : options.selector;
- return selector ? match === null || match === void 0 ? void 0 : match.querySelector(selector) : match;
- }
- function setRequestedIcon(iconObject, iconValue, matchedValue) {
- if (typeof iconValue === "string" && iconValue !== "") {
- return iconValue;
- } else if (iconValue === "") {
- return iconObject[matchedValue];
- }
- }
- function toAriaBoolean(value) {
- return (!!value).toString();
- }
- // node_modules/@esri/calcite-components/dist/components/observers.js
- function createObserver(type, callback, options) {
- const Observer = getObserver(type);
- return Build.isBrowser ? new Observer(callback, options) : void 0;
- }
- function getObserver(type) {
- return type === "intersection" ? window.IntersectionObserver : type === "mutation" ? window.MutationObserver : window.ResizeObserver;
- }
- // node_modules/@esri/calcite-components/dist/components/conditionalSlot.js
- var observed = new Set();
- var mutationObserver;
- var observerOptions = { childList: true };
- function connectConditionalSlotComponent(component) {
- if (!mutationObserver) {
- mutationObserver = createObserver("mutation", processMutations);
- }
- mutationObserver.observe(component.el, observerOptions);
- }
- function disconnectConditionalSlotComponent(component) {
- observed.delete(component.el);
- processMutations(mutationObserver.takeRecords());
- mutationObserver.disconnect();
- for (const [element] of observed.entries()) {
- mutationObserver.observe(element, observerOptions);
- }
- }
- function processMutations(mutations) {
- mutations.forEach(({ target }) => {
- forceUpdate(target);
- });
- }
- // node_modules/@esri/calcite-components/dist/components/icon.js
- var CSS = {
- icon: "icon",
- flipRtl: "flip-rtl"
- };
- var iconCache = {};
- var requestCache = {};
- var scaleToPx = {
- s: 16,
- m: 24,
- l: 32
- };
- async function fetchIcon({ icon, scale }) {
- const size = scaleToPx[scale];
- const name = normalizeIconName(icon);
- const filled = name.charAt(name.length - 1) === "F";
- const iconName = filled ? name.substring(0, name.length - 1) : name;
- const id = `${iconName}${size}${filled ? "F" : ""}`;
- if (iconCache[id]) {
- return iconCache[id];
- }
- if (!requestCache[id]) {
- requestCache[id] = fetch(getAssetPath(`./assets/icon/${id}.json`)).then((resp) => resp.json()).catch(() => {
- console.error(`"${id}" is not a valid calcite-ui-icon name`);
- return "";
- });
- }
- const path = await requestCache[id];
- iconCache[id] = path;
- return path;
- }
- function normalizeIconName(name) {
- const numberLeadingName = !isNaN(Number(name.charAt(0)));
- const parts = name.split("-");
- if (parts.length === 1) {
- return numberLeadingName ? `i${name}` : name;
- }
- return parts.map((part, index) => {
- if (index === 0) {
- return numberLeadingName ? `i${part.toUpperCase()}` : part;
- }
- return part.charAt(0).toUpperCase() + part.slice(1);
- }).join("");
- }
- var iconCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:-ms-inline-flexbox;display:inline-flex;color:var(--calcite-ui-icon-color)}:host([scale=s]){height:1rem;width:1rem;min-width:1rem;min-height:1rem}:host([scale=m]){height:1.5rem;width:1.5rem;min-width:1.5rem;min-height:1.5rem}:host([scale=l]){height:2rem;width:2rem;min-width:2rem;min-height:2rem}.flip-rtl{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.svg{display:block}";
- var Icon = proxyCustomElement(class extends H {
- constructor() {
- super();
- this.__registerHost();
- this.__attachShadow();
- this.icon = null;
- this.flipRtl = false;
- this.scale = "m";
- this.visible = false;
- }
- connectedCallback() {
- this.waitUntilVisible(() => {
- this.visible = true;
- this.loadIconPathData();
- });
- }
- disconnectedCallback() {
- var _a;
- (_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
- this.intersectionObserver = null;
- }
- async componentWillLoad() {
- this.loadIconPathData();
- }
- render() {
- const { el, flipRtl, pathData, scale, textLabel } = this;
- const dir = getElementDir(el);
- const size = scaleToPx[scale];
- const semantic = !!textLabel;
- const paths = [].concat(pathData || "");
- return h(Host, { "aria-hidden": toAriaBoolean(!semantic), "aria-label": semantic ? textLabel : null, role: semantic ? "img" : null }, h("svg", { class: {
- [CSS.flipRtl]: dir === "rtl" && flipRtl,
- svg: true
- }, fill: "currentColor", height: "100%", viewBox: `0 0 ${size} ${size}`, width: "100%", xmlns: "http://www.w3.org/2000/svg" }, paths.map((path) => typeof path === "string" ? h("path", { d: path }) : h("path", { d: path.d, opacity: "opacity" in path ? path.opacity : 1 }))));
- }
- async loadIconPathData() {
- const { icon, scale, visible } = this;
- if (!Build.isBrowser || !icon || !visible) {
- return;
- }
- this.pathData = await fetchIcon({ icon, scale });
- }
- waitUntilVisible(callback) {
- this.intersectionObserver = createObserver("intersection", (entries) => {
- entries.forEach((entry) => {
- if (entry.isIntersecting) {
- this.intersectionObserver.disconnect();
- this.intersectionObserver = null;
- callback();
- }
- });
- }, { rootMargin: "50px" });
- if (!this.intersectionObserver) {
- callback();
- return;
- }
- this.intersectionObserver.observe(this.el);
- }
- static get assetsDirs() {
- return ["assets"];
- }
- get el() {
- return this;
- }
- static get watchers() {
- return {
- "icon": ["loadIconPathData"],
- "scale": ["loadIconPathData"]
- };
- }
- static get style() {
- return iconCss;
- }
- }, [1, "calcite-icon", {
- "icon": [513],
- "flipRtl": [516, "flip-rtl"],
- "scale": [513],
- "textLabel": [1, "text-label"],
- "pathData": [32],
- "visible": [32]
- }]);
- function defineCustomElement() {
- if (typeof customElements === "undefined") {
- return;
- }
- const components = ["calcite-icon"];
- components.forEach((tagName) => {
- switch (tagName) {
- case "calcite-icon":
- if (!customElements.get(tagName)) {
- customElements.define(tagName, Icon);
- }
- break;
- }
- });
- }
- defineCustomElement();
- // node_modules/@esri/calcite-components/dist/components/calcite-notice.js
- var TEXT = {
- close: "Close"
- };
- var SLOTS = {
- title: "title",
- message: "message",
- link: "link",
- actionsEnd: "actions-end"
- };
- var CSS2 = {
- actionsEnd: "actions-end",
- close: "notice-close",
- container: "container",
- content: "notice-content",
- icon: "notice-icon"
- };
- var noticeCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([scale=s]){--calcite-notice-spacing-token-small:0.5rem;--calcite-notice-spacing-token-large:0.75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-top:0.125rem;margin-bottom:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-top:0.125rem;margin-bottom:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-top:0.125rem;margin-bottom:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:0.5rem}:host([scale=m]){--calcite-notice-spacing-token-small:0.75rem;--calcite-notice-spacing-token-large:1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-top:0.125rem;margin-bottom:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-top:0.125rem;margin-bottom:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-top:0.125rem;margin-bottom:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small:1rem;--calcite-notice-spacing-token-large:1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-top:0.125rem;margin-bottom:0.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-top:0.125rem;margin-bottom:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-top:0.125rem;margin-bottom:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width:auto}:host([width=half]){--calcite-notice-width:50%}:host([width=full]){--calcite-notice-width:100%}:host{margin-left:auto;margin-right:auto;display:none;max-width:100%;-ms-flex-align:center;align-items:center;width:var(--calcite-notice-width)}.container{pointer-events:none;margin-top:0px;margin-bottom:0px;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;width:100%;background-color:var(--calcite-ui-foreground-1);opacity:0;max-height:0;text-align:start;-webkit-transition:var(--calcite-animation-timing);transition:var(--calcite-animation-timing);-webkit-border-start:0px solid;border-inline-start:0px solid;-webkit-box-shadow:0 0 0 0 transparent;box-shadow:0 0 0 0 transparent}.notice-close{outline-offset:0;outline-color:transparent;-webkit-transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;transition:outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out}.notice-close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host{display:-ms-flexbox;display:flex}:host([active]) .container{pointer-events:auto;display:-ms-flexbox;display:flex;max-height:100%;-ms-flex-align:center;align-items:center;border-width:2px;opacity:1;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0px;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0px;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);-webkit-margin-end:var(--calcite-notice-spacing-token-small);margin-inline-end:var(--calcite-notice-spacing-token-small)}.notice-content{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:var(--calcite-animation-timing);transition-duration:var(--calcite-animation-timing);-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;padding:var(--calcite-notice-spacing-token-small) var(--calcite-notice-spacing-token-large);-ms-flex:0 0 auto;flex:0 0 auto;display:-ms-flexbox;display:flex;min-width:0px;-ms-flex-direction:column;flex-direction:column;overflow-wrap:break-word;-ms-flex:1 1 0px;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){-webkit-padding-start:var(--calcite-notice-spacing-token-large);padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding:var(--calcite-notice-spacing-token-small) var(--calcite-notice-spacing-token-large)}.notice-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:var(--calcite-animation-timing);transition-duration:var(--calcite-animation-timing);-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;padding:var(--calcite-notice-spacing-token-small) var(--calcite-notice-spacing-token-large);-ms-flex:0 0 auto;flex:0 0 auto}.notice-close{display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-item-align:stretch;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:var(--calcite-animation-timing);transition-duration:var(--calcite-animation-timing);-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-delay:0s;transition-delay:0s;padding:var(--calcite-notice-spacing-token-small) var(--calcite-notice-spacing-token-large);-ms-flex:0 0 auto;flex:0 0 auto;-webkit-appearance:none}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.notice-close:active{background-color:var(--calcite-ui-foreground-3)}.actions-end{display:-ms-flexbox;display:flex;-ms-flex-item-align:stretch;align-self:stretch}:host([color=blue]) .container{border-color:var(--calcite-ui-brand)}:host([color=blue]) .container .notice-icon{color:var(--calcite-ui-brand)}:host([color=red]) .container{border-color:var(--calcite-ui-danger)}:host([color=red]) .container .notice-icon{color:var(--calcite-ui-danger)}:host([color=yellow]) .container{border-color:var(--calcite-ui-warning)}:host([color=yellow]) .container .notice-icon{color:var(--calcite-ui-warning)}:host([color=green]) .container{border-color:var(--calcite-ui-success)}:host([color=green]) .container .notice-icon{color:var(--calcite-ui-success)}";
- var Notice = proxyCustomElement(class extends H {
- constructor() {
- super();
- this.__registerHost();
- this.__attachShadow();
- this.calciteNoticeClose = createEvent(this, "calciteNoticeClose", 7);
- this.calciteNoticeOpen = createEvent(this, "calciteNoticeOpen", 7);
- this.active = false;
- this.color = "blue";
- this.dismissible = false;
- this.intlClose = TEXT.close;
- this.scale = "m";
- this.width = "auto";
- this.close = () => {
- this.active = false;
- this.calciteNoticeClose.emit();
- };
- }
- updateRequestedIcon() {
- this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
- }
- connectedCallback() {
- connectConditionalSlotComponent(this);
- }
- disconnectedCallback() {
- disconnectConditionalSlotComponent(this);
- }
- componentWillLoad() {
- this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
- }
- render() {
- const { el } = this;
- const closeButton = h("button", { "aria-label": this.intlClose, class: CSS2.close, onClick: this.close, ref: (el2) => this.closeButton = el2 }, h("calcite-icon", { icon: "x", scale: this.scale === "l" ? "m" : "s" }));
- const hasActionEnd = getSlotted(el, SLOTS.actionsEnd);
- return h("div", { class: CSS2.container }, this.requestedIcon ? h("div", { class: CSS2.icon }, h("calcite-icon", { icon: this.requestedIcon, scale: this.scale === "l" ? "m" : "s" })) : null, h("div", { class: CSS2.content }, h("slot", { name: SLOTS.title }), h("slot", { name: SLOTS.message }), h("slot", { name: SLOTS.link })), hasActionEnd ? h("div", { class: CSS2.actionsEnd }, h("slot", { name: SLOTS.actionsEnd })) : null, this.dismissible ? closeButton : null);
- }
- async setFocus() {
- const noticeLinkEl = this.el.querySelector("calcite-link");
- if (!this.closeButton && !noticeLinkEl) {
- return;
- }
- if (noticeLinkEl) {
- noticeLinkEl.setFocus();
- } else if (this.closeButton) {
- this.closeButton.focus();
- }
- }
- get el() {
- return this;
- }
- static get watchers() {
- return {
- "icon": ["updateRequestedIcon"],
- "color": ["updateRequestedIcon"]
- };
- }
- static get style() {
- return noticeCss;
- }
- }, [1, "calcite-notice", {
- "active": [1540],
- "color": [513],
- "dismissible": [516],
- "icon": [520],
- "intlClose": [1, "intl-close"],
- "scale": [513],
- "width": [513],
- "setFocus": [64]
- }]);
- function defineCustomElement$1() {
- if (typeof customElements === "undefined") {
- return;
- }
- const components = ["calcite-notice", "calcite-icon"];
- components.forEach((tagName) => {
- switch (tagName) {
- case "calcite-notice":
- if (!customElements.get(tagName)) {
- customElements.define(tagName, Notice);
- }
- break;
- case "calcite-icon":
- if (!customElements.get(tagName)) {
- defineCustomElement();
- }
- break;
- }
- });
- }
- defineCustomElement$1();
- var CalciteNotice = Notice;
- var defineCustomElement2 = defineCustomElement$1;
- export {
- CalciteNotice,
- defineCustomElement2 as defineCustomElement
- };
- /*!
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
- * v1.0.0-beta.82
- */
- //# sourceMappingURL=calcite-notice-BQXO4DEI.js.map
|