q2-tecton-elements 1.52.1 → 1.52.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/click-elsewhere_2.cjs.entry.js +2 -13
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +38 -14
- package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +18 -15
- package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +1 -3
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +3 -4
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +1 -2
- package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/collection/components/q2-action-group/q2-action-group.js +41 -14
- package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js +97 -65
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar.js +22 -17
- package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +0 -27
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +5 -9
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +14 -59
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pill/q2-pill.js +5 -2
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +0 -49
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +3 -16
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-select/q2-select.js +3 -5
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +5 -4
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +0 -49
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/components/q2-action-group.js +40 -14
- package/dist/components/q2-action-group.js.map +1 -1
- package/dist/components/q2-calendar.js +18 -16
- package/dist/components/q2-calendar.js.map +1 -1
- package/dist/components/q2-dropdown.js +1 -4
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-pill.js +1 -1
- package/dist/components/q2-pill.js.map +1 -1
- package/dist/components/q2-popover2.js +3 -15
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-select2.js +3 -5
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-tag.js +1 -3
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/esm/click-elsewhere_2.entry.js +2 -13
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +38 -14
- package/dist/esm/q2-action-group.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +18 -15
- package/dist/esm/q2-calendar.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +1 -3
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-pill.entry.js +1 -1
- package/dist/esm/q2-pill.entry.js.map +1 -1
- package/dist/esm/q2-select.entry.js +3 -4
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-tag.entry.js +1 -2
- package/dist/esm/q2-tag.entry.js.map +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +21 -33
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-action-group.entry.js +58 -32
- package/dist/q2-tecton-elements/q2-action-group.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-calendar.entry.js +259 -256
- package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +6 -8
- package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-pill.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-select.entry.js +6 -7
- package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tag.entry.js +12 -13
- package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
- package/dist/types/components/q2-action-group/q2-action-group.d.ts +4 -0
- package/dist/types/components/q2-calendar/q2-calendar.d.ts +10 -5
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +6 -2
- package/dist/types/components/q2-pill/q2-pill.d.ts +5 -1
- package/dist/types/components/q2-popover/q2-popover.d.ts +0 -1
- package/dist/types/components/q2-select/q2-select.d.ts +1 -1
- package/dist/types/components/q2-tag/q2-tag.d.ts +6 -2
- package/dist/types/components.d.ts +8 -0
- package/package.json +3 -3
|
@@ -1,27 +1,19 @@
|
|
|
1
|
-
import { r as t, h as
|
|
1
|
+
import { r as t, h as e } from "./index-7a5365e2.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { n as i } from "./index-d18e2a20.js";
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const o = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host(:not([hidden])){display:block;width:100%;--comp-default-btn-group-margin:var(--app-scale-5x, 25px) 0;margin:var(--tct-btn-group-margin, var(--comp-default-btn-group-margin))}.container{width:100%;display:flex;gap:var(--tct-btn-group-gap, var(--app-scale-2x, 10px))}.container.vertical{flex-direction:var(--tct-btn-group-vertical-flex-direction, column)}.container.vertical ::slotted(q2-btn){display:block;width:100%}.container.horizontal{justify-content:var(--tct-btn-group-horizontal-justify-content, flex-start);flex-direction:var(--tct-btn-group-horizontal-flex-direction, row-reverse);align-items:var(--tct-btn-group-horizontal-align-items, center);flex-wrap:var(--tct-btn-group-horizontal-flex-wrap, wrap)}.container.horizontal.full-width{flex-wrap:nowrap}.container.vertical ::slotted(q2-btn),.container.horizontal.full-width ::slotted(q2-btn){display:block;width:100%}";
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// #endregion
|
|
13
|
-
// #region Component Lifecycle Events
|
|
14
|
-
// #endregion
|
|
15
|
-
// #region Listeners
|
|
16
|
-
// #endregion
|
|
17
|
-
// #region Public Methods API
|
|
18
|
-
// #endregion
|
|
19
|
-
// #region Watchers
|
|
7
|
+
const n = o;
|
|
8
|
+
|
|
9
|
+
const r = class {
|
|
10
|
+
constructor(e) {
|
|
11
|
+
t(this, e);
|
|
20
12
|
// #endregion
|
|
21
13
|
// #region Local Methods
|
|
22
14
|
this.handleResize = t => {
|
|
23
|
-
const
|
|
24
|
-
const i = this.orientationThreshold >
|
|
15
|
+
const e = t.detail.entries[0].contentRect.width;
|
|
16
|
+
const i = this.orientationThreshold > e;
|
|
25
17
|
this.autoOrientation = i ? "vertical" : "horizontal";
|
|
26
18
|
};
|
|
27
19
|
this.autoOrientation = "vertical";
|
|
@@ -30,27 +22,61 @@ const e = class {
|
|
|
30
22
|
this.fullWidth = undefined;
|
|
31
23
|
}
|
|
32
24
|
// #endregion
|
|
25
|
+
// #region Events
|
|
26
|
+
// #endregion
|
|
27
|
+
// #region Component Lifecycle Events
|
|
28
|
+
// #endregion
|
|
29
|
+
// #region Listeners
|
|
30
|
+
// #endregion
|
|
31
|
+
// #region Public Methods API
|
|
32
|
+
// #endregion
|
|
33
|
+
// #region Watchers
|
|
34
|
+
toggleHiddenForOneFrame() {
|
|
35
|
+
const {container: t} = this;
|
|
36
|
+
t.style.display = "none";
|
|
37
|
+
// Fixes Safari not making the buttons fill the container when going from horizontal and full-width to vertical
|
|
38
|
+
i((() => i((() => {
|
|
39
|
+
t.style.display = null;
|
|
40
|
+
}))));
|
|
41
|
+
}
|
|
42
|
+
get computedOrientation() {
|
|
43
|
+
let t = this.orientation;
|
|
44
|
+
if (!t) t = "auto";
|
|
45
|
+
return t === "auto" ? this.autoOrientation : t;
|
|
46
|
+
}
|
|
47
|
+
get shouldDisableResizeObserver() {
|
|
48
|
+
let t = this.orientation;
|
|
49
|
+
if (!t) t = "auto";
|
|
50
|
+
return t !== "auto";
|
|
51
|
+
}
|
|
52
|
+
// #endregion
|
|
33
53
|
// #region Render Methods
|
|
34
54
|
render() {
|
|
35
|
-
const {
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
return
|
|
40
|
-
key: "
|
|
55
|
+
const {shouldDisableResizeObserver: t, computedOrientation: i, fullWidth: o} = this;
|
|
56
|
+
const n = [ "container" ];
|
|
57
|
+
if (o && i === "horizontal") n.push("full-width");
|
|
58
|
+
n.push(i);
|
|
59
|
+
return e("q2-resize-observer", {
|
|
60
|
+
key: "bb7ebcc182a63976c198c5073c471b6c3944c0ee",
|
|
41
61
|
onTctResize: this.handleResize,
|
|
42
|
-
disabled:
|
|
43
|
-
},
|
|
44
|
-
key: "
|
|
45
|
-
|
|
62
|
+
disabled: t
|
|
63
|
+
}, e("div", {
|
|
64
|
+
key: "fd586d567fc2d7183cc59e9444554adfde1095eb",
|
|
65
|
+
ref: t => this.container = t,
|
|
66
|
+
class: n.join(" "),
|
|
46
67
|
role: "group"
|
|
47
|
-
},
|
|
48
|
-
key: "
|
|
68
|
+
}, e("slot", {
|
|
69
|
+
key: "4c9a0b77af1371b8c4ee7eafdae2e74d6c8964e9"
|
|
49
70
|
})));
|
|
50
71
|
}
|
|
72
|
+
static get watchers() {
|
|
73
|
+
return {
|
|
74
|
+
orientation: [ "toggleHiddenForOneFrame" ]
|
|
75
|
+
};
|
|
76
|
+
}
|
|
51
77
|
};
|
|
52
78
|
|
|
53
|
-
|
|
79
|
+
r.style = n;
|
|
54
80
|
|
|
55
|
-
export {
|
|
81
|
+
export { r as q2_action_group };
|
|
56
82
|
//# sourceMappingURL=q2-action-group.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["q2ActionGroupCss","Q2ActionGroupStyle0","Q2BtnGroup","this","handleResize","event","width","detail","entries","contentRect","shouldBeVertical","orientationThreshold","autoOrientation","
|
|
1
|
+
{"version":3,"names":["q2ActionGroupCss","Q2ActionGroupStyle0","Q2BtnGroup","this","handleResize","event","width","detail","entries","contentRect","shouldBeVertical","orientationThreshold","autoOrientation","toggleHiddenForOneFrame","container","style","display","nextPaint","computedOrientation","orientation","shouldDisableResizeObserver","render","fullWidth","containerClassNames","push","h","key","onTctResize","disabled","ref","el","class","join","role"],"sources":["src/components/q2-action-group/q2-action-group.scss?tag=q2-action-group&encapsulation=shadow","src/components/q2-action-group/q2-action-group.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host(:not([hidden])) {\n display: block;\n width: 100%;\n --comp-default-btn-group-margin: #{var-list(--app-scale-5x, 25px)} 0;\n margin: var-list(--tct-btn-group-margin, --comp-default-btn-group-margin);\n}\n\n.container {\n width: 100%;\n display: flex;\n gap: var-list(--tct-btn-group-gap, --app-scale-2x, 10px);\n\n &.vertical {\n flex-direction: var-list(--tct-btn-group-vertical-flex-direction, column);\n\n ::slotted(q2-btn) {\n display: block;\n width: 100%;\n }\n }\n\n &.horizontal {\n justify-content: var-list(--tct-btn-group-horizontal-justify-content, flex-start);\n flex-direction: var-list(--tct-btn-group-horizontal-flex-direction, row-reverse);\n align-items: var-list(--tct-btn-group-horizontal-align-items, center);\n flex-wrap: var-list(--tct-btn-group-horizontal-flex-wrap, wrap);\n\n &.full-width {\n flex-wrap: nowrap;\n }\n }\n\n &.vertical,\n &.horizontal.full-width {\n ::slotted(q2-btn) {\n display: block;\n width: 100%;\n }\n }\n}\n","import { Q2ResizeObserverCustomEvent } from '@/components';\nimport { nextPaint } from '@/utils';\nimport { Component, ComponentInterface, h, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'q2-action-group',\n styleUrl: 'q2-action-group.scss',\n shadow: true,\n})\nexport class Q2BtnGroup implements ComponentInterface {\n // #region Own Properties\n\n container: HTMLDivElement;\n\n // #endregion\n // #region Host HTML Element\n\n // #endregion\n // #region State Properties\n\n @State()\n autoOrientation: 'vertical' | 'horizontal' = 'vertical';\n\n // #endregion\n // #region Public Property API\n\n /**\n * The width, in pixels, that determines whether to display the buttons in vertical or horizontal orientation\n *\n * @info\n * The component determines this based on the width of the element itself, not the browser window.\n */\n @Prop({ reflect: false })\n orientationThreshold: number = 440;\n\n /**\n * The orientation of the buttons, which will override the auto orientation.\n *\n * @info\n * This will override and disable the auto determination of the orientation.\n */\n @Prop({ reflect: true })\n orientation: 'auto' | 'vertical' | 'horizontal' = 'auto';\n\n /**\n * Whether the buttons should take up the full width of the container when in horizontal orientation.\n *\n * @warning\n * This will prevent the buttons from wrapping when the container is too small to fit all buttons.\n */\n @Prop({ reflect: true })\n fullWidth: boolean;\n\n // #endregion\n // #region Events\n\n // #endregion\n // #region Component Lifecycle Events\n\n // #endregion\n // #region Listeners\n\n // #endregion\n // #region Public Methods API\n\n // #endregion\n // #region Watchers\n\n @Watch('orientation')\n toggleHiddenForOneFrame() {\n const { container } = this;\n container.style.display = 'none';\n // Fixes Safari not making the buttons fill the container when going from horizontal and full-width to vertical\n nextPaint(() =>\n nextPaint(() => {\n container.style.display = null;\n })\n );\n }\n\n // #endregion\n // #region Local Methods\n\n handleResize = (\n event: Q2ResizeObserverCustomEvent<{\n entries: ResizeObserverEntry[];\n }>\n ) => {\n const width = event.detail.entries[0].contentRect.width;\n const shouldBeVertical = this.orientationThreshold > width;\n this.autoOrientation = shouldBeVertical ? 'vertical' : 'horizontal';\n };\n\n get computedOrientation() {\n let orientation = this.orientation;\n if (!orientation) orientation = 'auto';\n return orientation === 'auto' ? this.autoOrientation : orientation;\n }\n\n get shouldDisableResizeObserver() {\n let orientation = this.orientation;\n if (!orientation) orientation = 'auto';\n return orientation !== 'auto';\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n const { shouldDisableResizeObserver, computedOrientation, fullWidth } = this;\n const containerClassNames = ['container'];\n if (fullWidth && computedOrientation === 'horizontal') containerClassNames.push('full-width');\n containerClassNames.push(computedOrientation);\n\n return (\n <q2-resize-observer\n onTctResize={this.handleResize}\n disabled={shouldDisableResizeObserver}\n >\n <div\n ref={el => (this.container = el)}\n class={containerClassNames.join(' ')}\n role=\"group\"\n >\n <slot />\n </div>\n </q2-resize-observer>\n );\n }\n\n // #endregion\n}\n"],"mappings":";;;;AAAA,MAAMA,IAAmB;;AACzB,MAAAC,IAAeD;;MCQFE,IAAU;;;;;QA0EnBC,KAAAC,eACIC;MAIA,MAAMC,IAAQD,EAAME,OAAOC,QAAQ,GAAGC,YAAYH;MAClD,MAAMI,IAAmBP,KAAKQ,uBAAuBL;MACrDH,KAAKS,kBAAkBF,IAAmB,aAAa;AAAY;2BArE1B;gCAYd;uBASmB;;;;;;;;;;;;;EA2BlD,uBAAAG;IACI,OAAMC,WAAEA,KAAcX;IACtBW,EAAUC,MAAMC,UAAU;;QAE1BC,GAAU,MACNA,GAAU;MACNH,EAAUC,MAAMC,UAAU;AAAI;;EAkB1C,uBAAIE;IACA,IAAIC,IAAchB,KAAKgB;IACvB,KAAKA,GAAaA,IAAc;IAChC,OAAOA,MAAgB,SAAShB,KAAKS,kBAAkBO;;EAG3D,+BAAIC;IACA,IAAID,IAAchB,KAAKgB;IACvB,KAAKA,GAAaA,IAAc;IAChC,OAAOA,MAAgB;;;;EAM3B,MAAAE;IACI,OAAMD,6BAAEA,GAA2BF,qBAAEA,GAAmBI,WAAEA,KAAcnB;IACxE,MAAMoB,IAAsB,EAAC;IAC7B,IAAID,KAAaJ,MAAwB,cAAcK,EAAoBC,KAAK;IAChFD,EAAoBC,KAAKN;IAEzB,OACIO,EAAA;MAAAC,KAAA;MACIC,aAAaxB,KAAKC;MAClBwB,UAAUR;OAEVK,EAAA;MAAAC,KAAA;MACIG,KAAKC,KAAO3B,KAAKW,YAAYgB;MAC7BC,OAAOR,EAAoBS,KAAK;MAChCC,MAAK;OAELR,EAAA;MAAAC,KAAA"}
|