@esri/calcite-components 1.0.0-next.372 → 1.0.0-next.376
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/assets/calcite-date-picker/nls/pt-BR.json +31 -0
- package/dist/calcite/assets/calcite-date-picker/nls/pt-PT.json +3 -3
- package/dist/calcite/calcite.esm.js +1 -1
- package/dist/calcite/p-05ad8606.system.entry.js +5 -0
- package/dist/calcite/{p-32d61433.system.entry.js → p-2f0d280a.system.entry.js} +1 -1
- package/dist/calcite/{p-617c3f30.system.entry.js → p-3dd50bac.system.entry.js} +1 -1
- package/dist/calcite/{p-f12c35de.system.entry.js → p-4d81b84b.system.entry.js} +2 -2
- package/dist/calcite/{p-7a6c932d.system.entry.js → p-4d88c604.system.entry.js} +1 -1
- package/dist/calcite/p-4e258f5c.entry.js +5 -0
- package/dist/calcite/{p-92d9b81d.system.entry.js → p-6a2ac09a.system.entry.js} +1 -1
- package/dist/calcite/{p-82491929.entry.js → p-6e37af80.entry.js} +1 -1
- package/dist/calcite/p-6eb1302b.entry.js +5 -0
- package/dist/calcite/p-7409e609.system.js +5 -0
- package/dist/calcite/p-7415264e.system.entry.js +5 -0
- package/dist/calcite/p-76c53ab5.entry.js +5 -0
- package/dist/calcite/{p-f24ddc56.system.entry.js → p-80eb08b3.system.entry.js} +1 -1
- package/dist/calcite/p-8a413063.js +5 -0
- package/dist/calcite/{p-ee14736a.entry.js → p-8c126095.entry.js} +1 -1
- package/dist/calcite/{p-2e324a56.system.entry.js → p-92711575.system.entry.js} +2 -2
- package/dist/calcite/p-99b729f6.entry.js +5 -0
- package/dist/calcite/p-99d32fc3.system.js +1 -1
- package/dist/calcite/p-a49d1a11.system.entry.js +5 -0
- package/dist/calcite/p-a5660ba5.entry.js +5 -0
- package/dist/calcite/p-aceeb62f.entry.js +5 -0
- package/dist/calcite/p-b3e034cb.entry.js +5 -0
- package/dist/calcite/p-b78f6de5.system.entry.js +5 -0
- package/dist/calcite/p-bab0c984.entry.js +5 -0
- package/dist/calcite/{p-39d4d1b1.system.entry.js → p-bd6cbbbd.system.entry.js} +1 -1
- package/dist/calcite/p-c39e7451.entry.js +5 -0
- package/dist/calcite/{p-8709d314.system.entry.js → p-c93dbb93.system.entry.js} +1 -1
- package/dist/calcite/{p-baca86e3.entry.js → p-cb3a8861.entry.js} +1 -1
- package/dist/calcite/p-d2bcb3ae.entry.js +5 -0
- package/dist/calcite/p-d6f6b6c1.entry.js +5 -0
- package/dist/calcite/p-dd8b6d4f.system.entry.js +5 -0
- package/dist/calcite/p-e05aa070.entry.js +5 -0
- package/dist/calcite/p-e66c335c.entry.js +5 -0
- package/dist/calcite/p-f3102bbb.system.entry.js +5 -0
- package/dist/calcite/p-f3a85d19.system.entry.js +5 -0
- package/dist/calcite/{p-3cdf0ad5.system.entry.js → p-fd3c4738.system.entry.js} +1 -1
- package/dist/calcite/p-fe6e3ff9.entry.js +5 -0
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +6 -3
- package/dist/cjs/calcite-action-menu.cjs.entry.js +1 -4
- package/dist/cjs/calcite-alert.cjs.entry.js +4 -6
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +1 -1
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-graph_2.cjs.entry.js +7 -3
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +38 -13
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input.cjs.entry.js +11 -7
- package/dist/cjs/calcite-modal.cjs.entry.js +1 -1
- package/dist/cjs/calcite-notice.cjs.entry.js +4 -6
- package/dist/cjs/calcite-panel.cjs.entry.js +17 -1
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +13 -0
- package/dist/cjs/calcite-radio-button.cjs.entry.js +0 -4
- package/dist/cjs/calcite-shell_3.cjs.entry.js +7 -4
- package/dist/cjs/calcite-tree_2.cjs.entry.js +14 -7
- package/dist/cjs/calcite.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{resources-11763017.js → resources-f70fb01b.js} +3 -0
- package/dist/collection/components/calcite-accordion/calcite-accordion.css +5 -5
- package/dist/collection/components/calcite-accordion/calcite-accordion.js +5 -1
- package/dist/collection/components/calcite-accordion-item/calcite-accordion-item.css +2 -16
- package/dist/collection/components/calcite-action-menu/calcite-action-menu.js +1 -4
- package/dist/collection/components/calcite-alert/calcite-alert.js +8 -7
- package/dist/collection/components/calcite-date-picker/assets/calcite-date-picker/nls/pt-BR.json +31 -0
- package/dist/collection/components/calcite-date-picker/assets/calcite-date-picker/nls/pt-PT.json +3 -3
- package/dist/collection/components/calcite-date-picker/utils.js +3 -0
- package/dist/collection/components/calcite-dropdown/calcite-dropdown.js +2 -2
- package/dist/collection/components/calcite-inline-editable/calcite-inline-editable.js +39 -14
- package/dist/collection/components/calcite-input/calcite-input.js +12 -8
- package/dist/collection/components/calcite-modal/calcite-modal.js +1 -1
- package/dist/collection/components/calcite-notice/calcite-notice.js +4 -6
- package/dist/collection/components/calcite-panel/calcite-panel.js +41 -5
- package/dist/collection/components/calcite-radio-button/calcite-radio-button.js +0 -4
- package/dist/collection/components/calcite-radio-button-group/calcite-radio-button-group.js +13 -0
- package/dist/collection/components/calcite-shell/calcite-shell.js +9 -7
- package/dist/collection/components/calcite-slider/calcite-slider.js +7 -3
- package/dist/collection/components/calcite-time-picker/calcite-time-picker.js +1 -1
- package/dist/collection/components/calcite-tree-item/calcite-tree-item.js +16 -7
- package/dist/components/calcite-accordion-item.js +1 -1
- package/dist/components/calcite-accordion.js +5 -2
- package/dist/components/calcite-action-menu2.js +1 -4
- package/dist/components/calcite-alert.js +5 -7
- package/dist/components/calcite-date-picker2.js +3 -0
- package/dist/components/calcite-dropdown2.js +2 -2
- package/dist/components/calcite-inline-editable.js +39 -14
- package/dist/components/calcite-input2.js +12 -8
- package/dist/components/calcite-modal.js +1 -1
- package/dist/components/calcite-notice.js +4 -6
- package/dist/components/calcite-panel.js +19 -2
- package/dist/components/calcite-radio-button-group.js +13 -0
- package/dist/components/calcite-radio-button.js +0 -4
- package/dist/components/calcite-shell.js +7 -4
- package/dist/components/calcite-slider.js +7 -3
- package/dist/components/calcite-time-picker2.js +1 -1
- package/dist/components/calcite-tree-item.js +14 -7
- package/dist/custom-elements/index.js +125 -61
- package/dist/esm/calcite-accordion_2.entry.js +6 -3
- package/dist/esm/calcite-action-menu.entry.js +1 -4
- package/dist/esm/calcite-alert.entry.js +5 -7
- package/dist/esm/calcite-date-picker_4.entry.js +1 -1
- package/dist/esm/calcite-dropdown_3.entry.js +2 -2
- package/dist/esm/calcite-graph_2.entry.js +7 -3
- package/dist/esm/calcite-inline-editable.entry.js +39 -14
- package/dist/esm/calcite-input-date-picker.entry.js +1 -1
- package/dist/esm/calcite-input-time-picker_2.entry.js +1 -1
- package/dist/esm/calcite-input.entry.js +12 -8
- package/dist/esm/calcite-modal.entry.js +1 -1
- package/dist/esm/calcite-notice.entry.js +4 -6
- package/dist/esm/calcite-panel.entry.js +17 -1
- package/dist/esm/calcite-radio-button-group.entry.js +13 -0
- package/dist/esm/calcite-radio-button.entry.js +0 -4
- package/dist/esm/calcite-shell_3.entry.js +7 -4
- package/dist/esm/calcite-tree_2.entry.js +14 -7
- package/dist/esm/calcite.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{resources-c768953c.js → resources-f02a1ab5.js} +3 -0
- package/dist/esm-es5/calcite-accordion_2.entry.js +1 -1
- package/dist/esm-es5/calcite-action-menu.entry.js +2 -2
- package/dist/esm-es5/calcite-alert.entry.js +1 -1
- package/dist/esm-es5/calcite-date-picker_4.entry.js +1 -1
- package/dist/esm-es5/calcite-dropdown_3.entry.js +1 -1
- package/dist/esm-es5/calcite-graph_2.entry.js +1 -1
- package/dist/esm-es5/calcite-inline-editable.entry.js +1 -1
- package/dist/esm-es5/calcite-input-date-picker.entry.js +1 -1
- package/dist/esm-es5/calcite-input-time-picker_2.entry.js +1 -1
- package/dist/esm-es5/calcite-input.entry.js +1 -1
- package/dist/esm-es5/calcite-modal.entry.js +1 -1
- package/dist/esm-es5/calcite-notice.entry.js +1 -1
- package/dist/esm-es5/calcite-panel.entry.js +2 -2
- package/dist/esm-es5/calcite-radio-button-group.entry.js +1 -1
- package/dist/esm-es5/calcite-radio-button.entry.js +1 -1
- package/dist/esm-es5/calcite-shell_3.entry.js +1 -1
- package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
- package/dist/esm-es5/calcite.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/resources-f02a1ab5.js +5 -0
- package/dist/extras/docs-json.json +12 -1
- package/dist/types/components/calcite-alert/calcite-alert.d.ts +0 -3
- package/dist/types/components/calcite-inline-editable/calcite-inline-editable.d.ts +3 -1
- package/dist/types/components/calcite-input/calcite-input.d.ts +2 -4
- package/dist/types/components/calcite-notice/calcite-notice.d.ts +0 -3
- package/dist/types/components/calcite-panel/calcite-panel.d.ts +12 -0
- package/dist/types/components/calcite-radio-button-group/calcite-radio-button-group.d.ts +2 -0
- package/dist/types/components/calcite-slider/calcite-slider.d.ts +1 -0
- package/dist/types/components/calcite-tree-item/calcite-tree-item.d.ts +2 -0
- package/dist/types/components.d.ts +4 -0
- package/hydrate/index.js +124 -62
- package/package.json +6 -2
- package/readme.md +2 -6
- package/dist/calcite/p-06fbc0f2.system.entry.js +0 -5
- package/dist/calcite/p-08be120f.entry.js +0 -5
- package/dist/calcite/p-0b552c00.system.entry.js +0 -5
- package/dist/calcite/p-20e3fc50.entry.js +0 -5
- package/dist/calcite/p-500300b5.entry.js +0 -5
- package/dist/calcite/p-5f5bfaa5.entry.js +0 -5
- package/dist/calcite/p-647d22ef.js +0 -5
- package/dist/calcite/p-64a5e88c.entry.js +0 -5
- package/dist/calcite/p-6969dabb.entry.js +0 -5
- package/dist/calcite/p-8ba8a357.system.js +0 -5
- package/dist/calcite/p-9716c57c.entry.js +0 -5
- package/dist/calcite/p-97375cc0.entry.js +0 -5
- package/dist/calcite/p-99422223.system.entry.js +0 -5
- package/dist/calcite/p-a50e52f1.entry.js +0 -5
- package/dist/calcite/p-abe7730b.entry.js +0 -5
- package/dist/calcite/p-b9adf89d.system.entry.js +0 -5
- package/dist/calcite/p-c5b3d90c.entry.js +0 -5
- package/dist/calcite/p-c6cb0aa2.entry.js +0 -5
- package/dist/calcite/p-cd9d106b.system.entry.js +0 -5
- package/dist/calcite/p-dba7c714.system.entry.js +0 -5
- package/dist/calcite/p-e5c2a6eb.entry.js +0 -5
- package/dist/calcite/p-e63f0806.entry.js +0 -5
- package/dist/calcite/p-fbd68dbf.system.entry.js +0 -5
- package/dist/esm-es5/resources-c768953c.js +0 -5
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLElement, createEvent, h, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
6
|
|
|
7
|
-
const calciteAccordionCss = "@-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-accordion-item-spacing-unit:0.25rem;--calcite-accordion-icon-margin:0.5rem;--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-accordion-item-spacing-unit:0.5rem;--calcite-accordion-icon-margin:0.75rem;--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-accordion-item-spacing-unit:0.75rem;--calcite-accordion-icon-margin:1rem;--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:block;max-width:100%;border-width:1px;border-bottom-width:0px;border-style:solid;border-color:var(--calcite-ui-border-2);line-height:1.5rem;--calcite-accordion-item-border:var(--calcite-ui-border-2);--calcite-accordion-item-background:var(--calcite-ui-foreground-1)}:
|
|
7
|
+
const calciteAccordionCss = "@-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-accordion-item-spacing-unit:0.25rem;--calcite-accordion-icon-margin:0.5rem;--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-accordion-item-spacing-unit:0.5rem;--calcite-accordion-icon-margin:0.75rem;--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-accordion-item-spacing-unit:0.75rem;--calcite-accordion-icon-margin:1rem;--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:block;max-width:100%;border-width:1px;border-bottom-width:0px;border-style:solid;border-color:var(--calcite-ui-border-2);line-height:1.5rem;--calcite-accordion-item-border:var(--calcite-ui-border-2);--calcite-accordion-item-background:var(--calcite-ui-foreground-1)}.accordion--transparent{border-color:transparent;--calcite-accordion-item-border:transparent;--calcite-accordion-item-background:transparent}.accordion--minimal{--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 0;border-color:transparent}";
|
|
8
8
|
|
|
9
9
|
let CalciteAccordion$1 = class extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -51,7 +51,10 @@ let CalciteAccordion$1 = class extends HTMLElement {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return h("
|
|
54
|
+
return (h("div", { class: {
|
|
55
|
+
"accordion--transparent": this.appearance === "transparent",
|
|
56
|
+
"accordion--minimal": this.appearance === "minimal"
|
|
57
|
+
} }, h("slot", null)));
|
|
55
58
|
}
|
|
56
59
|
//--------------------------------------------------------------------------
|
|
57
60
|
//
|
|
@@ -144,10 +144,7 @@ let CalciteActionMenu = class extends HTMLElement {
|
|
|
144
144
|
};
|
|
145
145
|
this.getActions = () => {
|
|
146
146
|
const { el } = this;
|
|
147
|
-
const
|
|
148
|
-
const actionElements = assignedActions.length
|
|
149
|
-
? assignedActions
|
|
150
|
-
: Array.from(el.querySelectorAll("calcite-action:not([slot=trigger])"));
|
|
147
|
+
const actionElements = getSlotted(el, { all: true, matches: "calcite-action" });
|
|
151
148
|
this.updateActions(actionElements);
|
|
152
149
|
this.actionElements = actionElements;
|
|
153
150
|
this.connectMenuButtonEl();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
|
-
import { s as setRequestedIcon } from './dom.js';
|
|
6
|
+
import { s as setRequestedIcon, b as getSlotted } from './dom.js';
|
|
7
7
|
import { S as StatusIcons } from './interfaces.js';
|
|
8
8
|
import { d as defineCustomElement$3 } from './calcite-chip2.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './calcite-icon2.js';
|
|
@@ -122,9 +122,6 @@ let CalciteAlert$1 = class extends HTMLElement {
|
|
|
122
122
|
componentWillLoad() {
|
|
123
123
|
this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
|
|
124
124
|
}
|
|
125
|
-
componentDidLoad() {
|
|
126
|
-
this.alertLinkEl = this.el.querySelectorAll("calcite-link")[0];
|
|
127
|
-
}
|
|
128
125
|
disconnectedCallback() {
|
|
129
126
|
window.clearTimeout(this.autoDismissTimeoutId);
|
|
130
127
|
}
|
|
@@ -165,11 +162,12 @@ let CalciteAlert$1 = class extends HTMLElement {
|
|
|
165
162
|
//--------------------------------------------------------------------------
|
|
166
163
|
/** Sets focus on the component. */
|
|
167
164
|
async setFocus() {
|
|
168
|
-
|
|
165
|
+
const alertLinkEl = getSlotted(this.el, { selector: "calcite-link" });
|
|
166
|
+
if (!this.closeButton && !alertLinkEl) {
|
|
169
167
|
return;
|
|
170
168
|
}
|
|
171
|
-
else if (
|
|
172
|
-
|
|
169
|
+
else if (alertLinkEl) {
|
|
170
|
+
alertLinkEl.setFocus();
|
|
173
171
|
}
|
|
174
172
|
else if (this.closeButton) {
|
|
175
173
|
this.closeButton.focus();
|
|
@@ -22,6 +22,9 @@ function getSupportedLocale(lang = "") {
|
|
|
22
22
|
lang = lang.toLowerCase();
|
|
23
23
|
if (lang.includes("-")) {
|
|
24
24
|
lang = lang.replace(/(\w+)-(\w+)/, (_match, language, region) => `${language}-${region.toUpperCase()}`);
|
|
25
|
+
if (!locales.includes(lang)) {
|
|
26
|
+
lang = lang.split("-")[0];
|
|
27
|
+
}
|
|
25
28
|
}
|
|
26
29
|
return locales.includes(lang) ? lang : "en";
|
|
27
30
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
|
-
import { f as focusElement } from './dom.js';
|
|
6
|
+
import { b as getSlotted, f as focusElement } from './dom.js';
|
|
7
7
|
import { C as CSS, u as updatePopper, c as createPopper } from './popper.js';
|
|
8
8
|
import { c as createObserver } from './observers.js';
|
|
9
9
|
|
|
@@ -76,7 +76,7 @@ let CalciteDropdown = class extends HTMLElement {
|
|
|
76
76
|
//--------------------------------------------------------------------------
|
|
77
77
|
this.updateItems = () => {
|
|
78
78
|
this.updateSelectedItems();
|
|
79
|
-
this.triggers =
|
|
79
|
+
this.triggers = getSlotted(this.el, "dropdown-trigger", { all: true });
|
|
80
80
|
this.items = Array.from(this.el.querySelectorAll("calcite-dropdown-item"));
|
|
81
81
|
this.reposition();
|
|
82
82
|
};
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLElement, createEvent, h, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
|
-
import { g as getElementProp } from './dom.js';
|
|
6
|
+
import { g as getElementProp, b as getSlotted } from './dom.js';
|
|
7
7
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label.js';
|
|
8
|
+
import { c as createObserver } from './observers.js';
|
|
8
9
|
import { d as defineCustomElement$4 } from './calcite-button2.js';
|
|
9
10
|
import { d as defineCustomElement$3 } from './calcite-icon2.js';
|
|
10
11
|
import { d as defineCustomElement$2 } from './calcite-loader2.js';
|
|
@@ -59,26 +60,31 @@ let CalciteInlineEditable$1 = class extends HTMLElement {
|
|
|
59
60
|
* @default "Save"
|
|
60
61
|
*/
|
|
61
62
|
this.intlConfirmChanges = TEXT.intlConfirmChanges;
|
|
63
|
+
this.mutationObserver = createObserver("mutation", () => this.mutationObserverCallback());
|
|
62
64
|
this.transitionEnd = () => {
|
|
63
65
|
if (!this.editingEnabled && !!this.shouldEmitCancel) {
|
|
64
66
|
this.calciteInlineEditableEditCancel.emit();
|
|
65
67
|
}
|
|
66
68
|
};
|
|
67
69
|
this.enableEditing = () => {
|
|
68
|
-
|
|
70
|
+
var _a, _b;
|
|
71
|
+
this.valuePriorToEditing = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.value;
|
|
69
72
|
this.editingEnabled = true;
|
|
70
|
-
this.inputElement.setFocus();
|
|
73
|
+
(_b = this.inputElement) === null || _b === void 0 ? void 0 : _b.setFocus();
|
|
71
74
|
this.calciteInlineEditableEnableEditingChange.emit();
|
|
72
75
|
};
|
|
73
76
|
this.disableEditing = () => {
|
|
74
77
|
this.editingEnabled = false;
|
|
75
78
|
};
|
|
76
79
|
this.cancelEditing = () => {
|
|
77
|
-
this.inputElement
|
|
80
|
+
if (this.inputElement) {
|
|
81
|
+
this.inputElement.value = this.valuePriorToEditing;
|
|
82
|
+
}
|
|
78
83
|
this.disableEditing();
|
|
79
84
|
this.enableEditingButton.setFocus();
|
|
80
85
|
};
|
|
81
86
|
this.escapeKeyHandler = async (e) => {
|
|
87
|
+
var _a;
|
|
82
88
|
if (e.key !== "Escape") {
|
|
83
89
|
if (e.key === "Tab" && this.shouldShowControls) {
|
|
84
90
|
if (!e.shiftKey && e.target === this.inputElement) {
|
|
@@ -88,7 +94,7 @@ let CalciteInlineEditable$1 = class extends HTMLElement {
|
|
|
88
94
|
if (!!e.shiftKey && e.target === this.cancelEditingButton) {
|
|
89
95
|
e.preventDefault();
|
|
90
96
|
e.stopPropagation();
|
|
91
|
-
this.inputElement.setFocus();
|
|
97
|
+
(_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.setFocus();
|
|
92
98
|
}
|
|
93
99
|
}
|
|
94
100
|
return;
|
|
@@ -130,10 +136,14 @@ let CalciteInlineEditable$1 = class extends HTMLElement {
|
|
|
130
136
|
};
|
|
131
137
|
}
|
|
132
138
|
disabledWatcher(disabled) {
|
|
133
|
-
this.inputElement
|
|
139
|
+
if (this.inputElement) {
|
|
140
|
+
this.inputElement.disabled = disabled;
|
|
141
|
+
}
|
|
134
142
|
}
|
|
135
143
|
editingEnabledWatcher(newValue, oldValue) {
|
|
136
|
-
this.inputElement
|
|
144
|
+
if (this.inputElement) {
|
|
145
|
+
this.inputElement.editingEnabled = newValue;
|
|
146
|
+
}
|
|
137
147
|
if (!newValue && !!oldValue) {
|
|
138
148
|
this.shouldEmitCancel = true;
|
|
139
149
|
}
|
|
@@ -144,17 +154,15 @@ let CalciteInlineEditable$1 = class extends HTMLElement {
|
|
|
144
154
|
//
|
|
145
155
|
//--------------------------------------------------------------------------
|
|
146
156
|
connectedCallback() {
|
|
157
|
+
var _a;
|
|
147
158
|
connectLabel(this);
|
|
159
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
|
|
160
|
+
this.mutationObserverCallback();
|
|
148
161
|
}
|
|
149
162
|
disconnectedCallback() {
|
|
163
|
+
var _a;
|
|
150
164
|
disconnectLabel(this);
|
|
151
|
-
|
|
152
|
-
componentWillLoad() {
|
|
153
|
-
this.inputElement = this.el.querySelector("calcite-input");
|
|
154
|
-
this.inputElement.disabled = this.disabled;
|
|
155
|
-
this.inputElement.label = this.inputElement.label || getLabelText(this);
|
|
156
|
-
this.scale =
|
|
157
|
-
this.scale || this.inputElement.scale || getElementProp(this.el, "scale", undefined);
|
|
165
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
158
166
|
}
|
|
159
167
|
render() {
|
|
160
168
|
return (h("div", { class: CSS.wrapper, onClick: this.enableEditingHandler, onKeyDown: this.escapeKeyHandler, onTransitionEnd: this.transitionEnd }, h("div", { class: CSS.inputWrapper }, h("slot", null)), h("div", { class: CSS.controlsWrapper }, h("calcite-button", { appearance: "transparent", class: CSS.enableEditingButton, color: "neutral", disabled: this.disabled, iconStart: "pencil", label: this.intlEnableEditing, onClick: this.enableEditingHandler, ref: (el) => (this.enableEditingButton = el), scale: this.scale, style: {
|
|
@@ -194,9 +202,26 @@ let CalciteInlineEditable$1 = class extends HTMLElement {
|
|
|
194
202
|
// Private Methods
|
|
195
203
|
//
|
|
196
204
|
//--------------------------------------------------------------------------
|
|
205
|
+
mutationObserverCallback() {
|
|
206
|
+
var _a;
|
|
207
|
+
this.updateSlottedInput();
|
|
208
|
+
this.scale =
|
|
209
|
+
this.scale || ((_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.scale) || getElementProp(this.el, "scale", undefined);
|
|
210
|
+
}
|
|
197
211
|
onLabelClick() {
|
|
198
212
|
this.setFocus();
|
|
199
213
|
}
|
|
214
|
+
updateSlottedInput() {
|
|
215
|
+
const inputElement = getSlotted(this.el, {
|
|
216
|
+
matches: "calcite-input"
|
|
217
|
+
});
|
|
218
|
+
this.inputElement = inputElement;
|
|
219
|
+
if (!inputElement) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
this.inputElement.disabled = this.disabled;
|
|
223
|
+
this.inputElement.label = this.inputElement.label || getLabelText(this);
|
|
224
|
+
}
|
|
200
225
|
get shouldShowControls() {
|
|
201
226
|
return this.editingEnabled && this.controls;
|
|
202
227
|
}
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
|
-
import { T as TEXT, s as setRequestedIcon, g as getElementProp, a as getElementDir, C as CSS_UTILITY } from './dom.js';
|
|
6
|
+
import { T as TEXT, b as getSlotted, s as setRequestedIcon, g as getElementProp, a as getElementDir, C as CSS_UTILITY } from './dom.js';
|
|
7
7
|
import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label.js';
|
|
8
8
|
import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form.js';
|
|
9
9
|
import { d as delocalizeNumberString, g as getDecimalSeparator, l as localizeNumberString } from './locale.js';
|
|
10
10
|
import { i as isValidNumber, p as parseNumberString, s as sanitizeNumberString, n as numberKeys } from './number.js';
|
|
11
11
|
import { d as decimalPlaces } from './math.js';
|
|
12
|
+
import { c as createObserver } from './observers.js';
|
|
12
13
|
import { d as defineCustomElement$2 } from './calcite-icon2.js';
|
|
13
14
|
import { d as defineCustomElement$1 } from './calcite-progress2.js';
|
|
14
15
|
|
|
@@ -110,6 +111,7 @@ let CalciteInput = class extends HTMLElement {
|
|
|
110
111
|
this.childElType = "input";
|
|
111
112
|
/** whether the value of the input was changed as a result of user typing or not */
|
|
112
113
|
this.internalValueChange = false;
|
|
114
|
+
this.mutationObserver = createObserver("mutation", () => this.setDisabledAction());
|
|
113
115
|
//--------------------------------------------------------------------------
|
|
114
116
|
//
|
|
115
117
|
// Private Methods
|
|
@@ -148,7 +150,8 @@ let CalciteInput = class extends HTMLElement {
|
|
|
148
150
|
}
|
|
149
151
|
};
|
|
150
152
|
this.inputFocusHandler = (event) => {
|
|
151
|
-
|
|
153
|
+
const slottedActionEl = getSlotted(this.el, "action");
|
|
154
|
+
if (event.target !== slottedActionEl) {
|
|
152
155
|
this.setFocus();
|
|
153
156
|
}
|
|
154
157
|
this.calciteInputFocus.emit({
|
|
@@ -392,6 +395,7 @@ let CalciteInput = class extends HTMLElement {
|
|
|
392
395
|
//
|
|
393
396
|
//--------------------------------------------------------------------------
|
|
394
397
|
connectedCallback() {
|
|
398
|
+
var _a;
|
|
395
399
|
this.scale = getElementProp(this.el, "scale", this.scale);
|
|
396
400
|
this.status = getElementProp(this.el, "status", this.status);
|
|
397
401
|
this.inlineEditableEl = this.el.closest("calcite-inline-editable");
|
|
@@ -408,10 +412,14 @@ let CalciteInput = class extends HTMLElement {
|
|
|
408
412
|
}
|
|
409
413
|
connectLabel(this);
|
|
410
414
|
connectForm(this);
|
|
415
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
|
|
416
|
+
this.setDisabledAction();
|
|
411
417
|
}
|
|
412
418
|
disconnectedCallback() {
|
|
419
|
+
var _a;
|
|
413
420
|
disconnectLabel(this);
|
|
414
421
|
disconnectForm(this);
|
|
422
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
415
423
|
}
|
|
416
424
|
componentWillLoad() {
|
|
417
425
|
var _a, _b;
|
|
@@ -420,10 +428,6 @@ let CalciteInput = class extends HTMLElement {
|
|
|
420
428
|
this.minString = (_b = this.min) === null || _b === void 0 ? void 0 : _b.toString();
|
|
421
429
|
this.requestedIcon = setRequestedIcon(INPUT_TYPE_ICONS, this.icon, this.type);
|
|
422
430
|
}
|
|
423
|
-
componentDidLoad() {
|
|
424
|
-
this.slottedActionEl = this.el.querySelector("[slot=action]");
|
|
425
|
-
this.setDisabledAction();
|
|
426
|
-
}
|
|
427
431
|
componentShouldUpdate(newValue, oldValue, property) {
|
|
428
432
|
if (this.type === "number" && property === "value" && newValue && !isValidNumber(newValue)) {
|
|
429
433
|
this.setValue({
|
|
@@ -495,10 +499,10 @@ let CalciteInput = class extends HTMLElement {
|
|
|
495
499
|
}
|
|
496
500
|
}
|
|
497
501
|
setDisabledAction() {
|
|
498
|
-
|
|
502
|
+
const slottedActionEl = getSlotted(this.el, "action");
|
|
503
|
+
if (!slottedActionEl) {
|
|
499
504
|
return;
|
|
500
505
|
}
|
|
501
|
-
const slottedActionEl = this.slottedActionEl;
|
|
502
506
|
this.disabled
|
|
503
507
|
? slottedActionEl.setAttribute("disabled", "")
|
|
504
508
|
: slottedActionEl.removeAttribute("disabled");
|
|
@@ -227,7 +227,7 @@ let CalciteModal$1 = class extends HTMLElement {
|
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
this.updateFooterVisibility = () => {
|
|
230
|
-
this.hasFooter = !!this.el
|
|
230
|
+
this.hasFooter = !!getSlotted(this.el, [SLOTS.back, SLOTS.primary, SLOTS.secondary]);
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
//--------------------------------------------------------------------------
|
|
@@ -80,9 +80,6 @@ let CalciteNotice$1 = class extends HTMLElement {
|
|
|
80
80
|
componentWillLoad() {
|
|
81
81
|
this.requestedIcon = setRequestedIcon(StatusIcons, this.icon, this.color);
|
|
82
82
|
}
|
|
83
|
-
componentDidLoad() {
|
|
84
|
-
this.noticeLinkEl = this.el.querySelector("calcite-link");
|
|
85
|
-
}
|
|
86
83
|
render() {
|
|
87
84
|
const { el } = this;
|
|
88
85
|
const closeButton = (h("button", { "aria-label": this.intlClose, class: CSS.close, onClick: this.close, ref: (el) => (this.closeButton = el) }, h("calcite-icon", { icon: "x", scale: this.scale === "l" ? "m" : "s" })));
|
|
@@ -96,11 +93,12 @@ let CalciteNotice$1 = class extends HTMLElement {
|
|
|
96
93
|
//--------------------------------------------------------------------------
|
|
97
94
|
/** Sets focus on the component. */
|
|
98
95
|
async setFocus() {
|
|
99
|
-
|
|
96
|
+
const noticeLinkEl = this.el.querySelector("calcite-link");
|
|
97
|
+
if (!this.closeButton && !noticeLinkEl) {
|
|
100
98
|
return;
|
|
101
99
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
100
|
+
if (noticeLinkEl) {
|
|
101
|
+
noticeLinkEl.setFocus();
|
|
104
102
|
}
|
|
105
103
|
else if (this.closeButton) {
|
|
106
104
|
this.closeButton.focus();
|
|
@@ -157,6 +157,20 @@ let CalcitePanel$1 = class extends HTMLElement {
|
|
|
157
157
|
}
|
|
158
158
|
(_c = this.containerEl) === null || _c === void 0 ? void 0 : _c.focus();
|
|
159
159
|
}
|
|
160
|
+
/** Scrolls panel content to a particular set of coordinates.
|
|
161
|
+
*
|
|
162
|
+
* ```
|
|
163
|
+
* myCalcitePanel.scrollContentTo({
|
|
164
|
+
* left: 0, // Specifies the number of pixels along the X axis to scroll the window or element.
|
|
165
|
+
* top: 0, // Specifies the number of pixels along the Y axis to scroll the window or element
|
|
166
|
+
* behavior: "auto" // Specifies whether the scrolling should animate smoothly (smooth), or happen instantly in a single jump (auto, the default value).
|
|
167
|
+
* });
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
async scrollContentTo(options) {
|
|
171
|
+
var _a;
|
|
172
|
+
(_a = this.panelScrollEl) === null || _a === void 0 ? void 0 : _a.scrollTo(options);
|
|
173
|
+
}
|
|
160
174
|
// --------------------------------------------------------------------------
|
|
161
175
|
//
|
|
162
176
|
// Render Methods
|
|
@@ -225,7 +239,9 @@ let CalcitePanel$1 = class extends HTMLElement {
|
|
|
225
239
|
renderContent() {
|
|
226
240
|
const { el } = this;
|
|
227
241
|
const hasFab = getSlotted(el, SLOTS.fab);
|
|
228
|
-
|
|
242
|
+
const defaultSlotNode = h("slot", { key: "default-slot" });
|
|
243
|
+
const contentWrapperKey = "content-wrapper";
|
|
244
|
+
return hasFab ? (h("div", { class: { [CSS.contentWrapper]: true, [CSS.contentHeight]: true }, key: contentWrapperKey, onScroll: this.panelScrollHandler, ref: (el) => (this.panelScrollEl = el), tabIndex: 0 }, h("section", { class: CSS.contentContainer }, defaultSlotNode), this.renderFab())) : (h("section", { class: { [CSS.contentWrapper]: true, [CSS.contentContainer]: true }, key: contentWrapperKey, onScroll: this.panelScrollHandler, ref: (el) => (this.panelScrollEl = el), tabIndex: 0 }, defaultSlotNode));
|
|
229
245
|
}
|
|
230
246
|
renderFab() {
|
|
231
247
|
return (h("div", { class: CSS.fabContainer }, h("slot", { name: SLOTS.fab })));
|
|
@@ -257,7 +273,8 @@ CalcitePanel$1 = /*@__PURE__*/ proxyCustomElement(CalcitePanel$1, [1, "calcite-p
|
|
|
257
273
|
"heading": [1],
|
|
258
274
|
"summary": [1],
|
|
259
275
|
"menuOpen": [516, "menu-open"],
|
|
260
|
-
"setFocus": [64]
|
|
276
|
+
"setFocus": [64],
|
|
277
|
+
"scrollContentTo": [64]
|
|
261
278
|
}]);
|
|
262
279
|
function defineCustomElement$1() {
|
|
263
280
|
if (typeof customElements === "undefined") {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLElement, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
6
|
+
import { c as createObserver } from './observers.js';
|
|
6
7
|
|
|
7
8
|
const calciteRadioButtonGroupCss = "@-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-flexbox;display:flex;max-width:100vw}:host([layout=horizontal]){-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}:host([layout=horizontal][scale=s]){gap:1rem}:host([layout=horizontal][scale=m]){gap:1.25rem}:host([layout=horizontal][scale=l]){gap:1.5rem}:host([layout=vertical]){-ms-flex-direction:column;flex-direction:column}";
|
|
8
9
|
|
|
@@ -27,6 +28,12 @@ let CalciteRadioButtonGroup$1 = class extends HTMLElement {
|
|
|
27
28
|
this.required = false;
|
|
28
29
|
/** The scale (size) of the radio button group. */
|
|
29
30
|
this.scale = "m";
|
|
31
|
+
// --------------------------------------------------------------------------
|
|
32
|
+
//
|
|
33
|
+
// Private Properties
|
|
34
|
+
//
|
|
35
|
+
// --------------------------------------------------------------------------
|
|
36
|
+
this.mutationObserver = createObserver("mutation", () => this.passPropsToRadioButtons());
|
|
30
37
|
//--------------------------------------------------------------------------
|
|
31
38
|
//
|
|
32
39
|
// Private Methods
|
|
@@ -63,7 +70,13 @@ let CalciteRadioButtonGroup$1 = class extends HTMLElement {
|
|
|
63
70
|
//
|
|
64
71
|
//--------------------------------------------------------------------------
|
|
65
72
|
connectedCallback() {
|
|
73
|
+
var _a;
|
|
66
74
|
this.passPropsToRadioButtons();
|
|
75
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
|
|
76
|
+
}
|
|
77
|
+
disconnectedCallback() {
|
|
78
|
+
var _a;
|
|
79
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
67
80
|
}
|
|
68
81
|
//--------------------------------------------------------------------------
|
|
69
82
|
//
|
|
@@ -142,10 +142,6 @@ let CalciteRadioButton$1 = class extends HTMLElement {
|
|
|
142
142
|
}
|
|
143
143
|
nameChanged() {
|
|
144
144
|
this.checkLastRadioButton();
|
|
145
|
-
const currentValue = this.rootNode.querySelector(`input[name="${this.name}"]:checked`);
|
|
146
|
-
if (!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.value)) {
|
|
147
|
-
this.uncheckAllRadioButtonsInGroup();
|
|
148
|
-
}
|
|
149
145
|
}
|
|
150
146
|
//--------------------------------------------------------------------------
|
|
151
147
|
//
|
|
@@ -59,16 +59,19 @@ let CalciteShell$1 = class extends HTMLElement {
|
|
|
59
59
|
return hasHeader ? h("slot", { key: "header", name: SLOTS.header }) : null;
|
|
60
60
|
}
|
|
61
61
|
renderContent() {
|
|
62
|
+
const defaultSlotNode = h("slot", { key: "default-slot" });
|
|
63
|
+
const centerRowSlotNode = h("slot", { key: "center-row-slot", name: SLOTS.centerRow });
|
|
64
|
+
const contentContainerKey = "content-container";
|
|
62
65
|
const content = !!this.contentBehind
|
|
63
66
|
? [
|
|
64
67
|
h("div", { class: {
|
|
65
68
|
[CSS.content]: true,
|
|
66
|
-
[CSS.contentBehind]:
|
|
67
|
-
} },
|
|
68
|
-
|
|
69
|
+
[CSS.contentBehind]: true
|
|
70
|
+
}, key: contentContainerKey }, defaultSlotNode),
|
|
71
|
+
centerRowSlotNode
|
|
69
72
|
]
|
|
70
73
|
: [
|
|
71
|
-
h("div", { class: CSS.content
|
|
74
|
+
h("div", { class: CSS.content, key: contentContainerKey }, defaultSlotNode, centerRowSlotNode)
|
|
72
75
|
];
|
|
73
76
|
return content;
|
|
74
77
|
}
|
|
@@ -93,9 +93,7 @@ let CalciteSlider$1 = class extends HTMLElement {
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
this.dragEnd = (event) => {
|
|
96
|
-
|
|
97
|
-
document.removeEventListener("pointerup", this.dragEnd);
|
|
98
|
-
document.removeEventListener("pointercancel", this.dragEnd);
|
|
96
|
+
this.removeDragListeners();
|
|
99
97
|
this.focusActiveHandle(event.clientX);
|
|
100
98
|
if (this.lastDragPropValue != this[this.dragProp]) {
|
|
101
99
|
this.emitChange();
|
|
@@ -130,6 +128,7 @@ let CalciteSlider$1 = class extends HTMLElement {
|
|
|
130
128
|
disconnectedCallback() {
|
|
131
129
|
disconnectLabel(this);
|
|
132
130
|
disconnectForm(this);
|
|
131
|
+
this.removeDragListeners();
|
|
133
132
|
}
|
|
134
133
|
componentWillLoad() {
|
|
135
134
|
this.isRange = !!(this.maxValue || this.maxValue === 0);
|
|
@@ -465,6 +464,11 @@ let CalciteSlider$1 = class extends HTMLElement {
|
|
|
465
464
|
emitChange() {
|
|
466
465
|
this.calciteSliderChange.emit();
|
|
467
466
|
}
|
|
467
|
+
removeDragListeners() {
|
|
468
|
+
document.removeEventListener("pointermove", this.dragUpdate);
|
|
469
|
+
document.removeEventListener("pointerup", this.dragEnd);
|
|
470
|
+
document.removeEventListener("pointercancel", this.dragEnd);
|
|
471
|
+
}
|
|
468
472
|
/**
|
|
469
473
|
* Set the prop value if changed at the component level
|
|
470
474
|
* @param valueProp
|
|
@@ -737,7 +737,7 @@ let CalciteTimePicker = class extends HTMLElement {
|
|
|
737
737
|
[CSS.showMeridiem]: showMeridiem,
|
|
738
738
|
[CSS.showSecond]: this.showSecond,
|
|
739
739
|
[CSS[`scale-${this.scale}`]]: true
|
|
740
|
-
} }, h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlHourUp, class: {
|
|
740
|
+
}, dir: "ltr" }, h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlHourUp, class: {
|
|
741
741
|
[CSS.button]: true,
|
|
742
742
|
[CSS.buttonHourUp]: true,
|
|
743
743
|
[CSS.buttonTopLeft]: true
|
|
@@ -55,7 +55,7 @@ let CalciteTreeItem$1 = class extends HTMLElement {
|
|
|
55
55
|
this.expanded = !this.expanded;
|
|
56
56
|
if (this.selectionMode !== TreeSelectionMode.Ancestors) {
|
|
57
57
|
this.calciteTreeItemSelect.emit({
|
|
58
|
-
modifyCurrentSelection:
|
|
58
|
+
modifyCurrentSelection: this.isSelectionMultiLike,
|
|
59
59
|
forceToggle: true
|
|
60
60
|
});
|
|
61
61
|
}
|
|
@@ -89,6 +89,11 @@ let CalciteTreeItem$1 = class extends HTMLElement {
|
|
|
89
89
|
expandedHandler(newValue) {
|
|
90
90
|
this.updateParentIsExpanded(this.el, newValue);
|
|
91
91
|
}
|
|
92
|
+
getselectionMode() {
|
|
93
|
+
this.isSelectionMultiLike =
|
|
94
|
+
this.selectionMode === TreeSelectionMode.Multi ||
|
|
95
|
+
this.selectionMode === TreeSelectionMode.MultiChildren;
|
|
96
|
+
}
|
|
92
97
|
//--------------------------------------------------------------------------
|
|
93
98
|
//
|
|
94
99
|
// Lifecycle
|
|
@@ -140,7 +145,8 @@ let CalciteTreeItem$1 = class extends HTMLElement {
|
|
|
140
145
|
[CSS.chevron]: true,
|
|
141
146
|
[CSS_UTILITY.rtl]: rtl
|
|
142
147
|
}, "data-test-id": "icon", icon: ICONS.chevronRight, onClick: this.iconClickHandler, scale: "s" })) : null;
|
|
143
|
-
const
|
|
148
|
+
const defaultSlotNode = h("slot", { key: "default-slot" });
|
|
149
|
+
const checkbox = this.selectionMode === TreeSelectionMode.Ancestors ? (h("label", { class: CSS.checkboxLabel, key: "checkbox-label" }, h("calcite-checkbox", { checked: this.selected, class: CSS.checkbox, "data-test-id": "checkbox", indeterminate: this.hasChildren && this.indeterminate, scale: this.scale, tabIndex: -1 }), defaultSlotNode)) : null;
|
|
144
150
|
const selectedIcon = showBulletPoint
|
|
145
151
|
? ICONS.bulletPoint
|
|
146
152
|
: showCheckmark
|
|
@@ -155,7 +161,7 @@ let CalciteTreeItem$1 = class extends HTMLElement {
|
|
|
155
161
|
return (h(Host, { "aria-expanded": this.hasChildren ? this.expanded.toString() : undefined, "aria-hidden": hidden.toString(), "aria-selected": this.selected ? "true" : showCheckmark ? "false" : undefined, "calcite-hydrated-hidden": hidden, role: "treeitem", tabindex: this.parentExpanded || this.depth === 1 ? "0" : "-1" }, h("div", { class: {
|
|
156
162
|
[CSS.nodeContainer]: true,
|
|
157
163
|
[CSS_UTILITY.rtl]: rtl
|
|
158
|
-
}, "data-selection-mode": this.selectionMode, ref: (el) => (this.defaultSlotWrapper = el) }, chevron, bulletOrCheckIcon, checkbox ? checkbox :
|
|
164
|
+
}, "data-selection-mode": this.selectionMode, ref: (el) => (this.defaultSlotWrapper = el) }, chevron, bulletOrCheckIcon, checkbox ? checkbox : defaultSlotNode), h("div", { class: {
|
|
159
165
|
[CSS.childrenContainer]: true,
|
|
160
166
|
[CSS_UTILITY.rtl]: rtl
|
|
161
167
|
}, "data-test-id": "calcite-tree-children", onClick: this.childrenClickHandler, ref: (el) => (this.childrenSlotWrapper = el), role: this.hasChildren ? "group" : undefined }, h("slot", { name: SLOTS.children }))));
|
|
@@ -174,7 +180,7 @@ let CalciteTreeItem$1 = class extends HTMLElement {
|
|
|
174
180
|
window.open(link.href, target);
|
|
175
181
|
}
|
|
176
182
|
this.calciteTreeItemSelect.emit({
|
|
177
|
-
modifyCurrentSelection:
|
|
183
|
+
modifyCurrentSelection: this.selectionMode === TreeSelectionMode.Ancestors || this.isSelectionMultiLike,
|
|
178
184
|
forceToggle: false
|
|
179
185
|
});
|
|
180
186
|
}
|
|
@@ -183,7 +189,7 @@ let CalciteTreeItem$1 = class extends HTMLElement {
|
|
|
183
189
|
switch (e.key) {
|
|
184
190
|
case " ":
|
|
185
191
|
this.calciteTreeItemSelect.emit({
|
|
186
|
-
modifyCurrentSelection:
|
|
192
|
+
modifyCurrentSelection: this.isSelectionMultiLike,
|
|
187
193
|
forceToggle: false
|
|
188
194
|
});
|
|
189
195
|
e.preventDefault();
|
|
@@ -198,7 +204,7 @@ let CalciteTreeItem$1 = class extends HTMLElement {
|
|
|
198
204
|
}
|
|
199
205
|
else {
|
|
200
206
|
this.calciteTreeItemSelect.emit({
|
|
201
|
-
modifyCurrentSelection:
|
|
207
|
+
modifyCurrentSelection: this.isSelectionMultiLike,
|
|
202
208
|
forceToggle: false
|
|
203
209
|
});
|
|
204
210
|
}
|
|
@@ -269,7 +275,8 @@ let CalciteTreeItem$1 = class extends HTMLElement {
|
|
|
269
275
|
}
|
|
270
276
|
get el() { return this; }
|
|
271
277
|
static get watchers() { return {
|
|
272
|
-
"expanded": ["expandedHandler"]
|
|
278
|
+
"expanded": ["expandedHandler"],
|
|
279
|
+
"selectionMode": ["getselectionMode"]
|
|
273
280
|
}; }
|
|
274
281
|
static get style() { return calciteTreeItemCss; }
|
|
275
282
|
};
|