@rdlabo/ionic-theme-ios27 1.2.0-2 → 1.2.0-4
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/README.md +15 -2
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/css/ionic-theme-ios27.css +1 -1
- package/dist/css/vertical-bars.css +1 -1
- package/dist/focus-controller/index.d.ts +4 -2
- package/dist/focus-controller/index.d.ts.map +1 -1
- package/dist/focus-controller/index.js +100 -57
- package/dist/focus-controller/index.js.map +1 -0
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -60
- package/dist/index.js.map +1 -0
- package/dist/native/components/index.d.ts +13 -10
- package/dist/native/components/index.d.ts.map +1 -1
- package/dist/native/components/index.js +39 -41
- package/dist/native/components/index.js.map +1 -0
- package/dist/native/components/ion-back-button.d.ts +6 -1
- package/dist/native/components/ion-back-button.d.ts.map +1 -1
- package/dist/native/components/ion-back-button.js +19 -13
- package/dist/native/components/ion-back-button.js.map +1 -0
- package/dist/native/components/ion-button.d.ts +8 -2
- package/dist/native/components/ion-button.d.ts.map +1 -1
- package/dist/native/components/ion-button.js +22 -17
- package/dist/native/components/ion-button.js.map +1 -0
- package/dist/native/components/ion-buttons.d.ts +8 -2
- package/dist/native/components/ion-buttons.d.ts.map +1 -1
- package/dist/native/components/ion-buttons.js +29 -33
- package/dist/native/components/ion-buttons.js.map +1 -0
- package/dist/native/components/ion-fab.d.ts +6 -1
- package/dist/native/components/ion-fab.d.ts.map +1 -1
- package/dist/native/components/ion-fab.js +131 -151
- package/dist/native/components/ion-fab.js.map +1 -0
- package/dist/native/components/ion-menu-button.d.ts +8 -2
- package/dist/native/components/ion-menu-button.d.ts.map +1 -1
- package/dist/native/components/ion-menu-button.js +29 -19
- package/dist/native/components/ion-menu-button.js.map +1 -0
- package/dist/native/components/ion-segment.d.ts +6 -1
- package/dist/native/components/ion-segment.d.ts.map +1 -1
- package/dist/native/components/ion-segment.js +29 -23
- package/dist/native/components/ion-segment.js.map +1 -0
- package/dist/native/components/ion-tab-bar.d.ts +6 -1
- package/dist/native/components/ion-tab-bar.d.ts.map +1 -1
- package/dist/native/components/ion-tab-bar.js +49 -40
- package/dist/native/components/ion-tab-bar.js.map +1 -0
- package/dist/native/components/searchable-tabs.d.ts +17 -15
- package/dist/native/components/searchable-tabs.d.ts.map +1 -1
- package/dist/native/components/searchable-tabs.js +382 -435
- package/dist/native/components/searchable-tabs.js.map +1 -0
- package/dist/native/definitions.d.ts +118 -111
- package/dist/native/definitions.d.ts.map +1 -1
- package/dist/native/definitions.js +0 -1
- package/dist/native/foldable/fold-state.d.ts +5 -0
- package/dist/native/foldable/fold-state.d.ts.map +1 -0
- package/dist/native/foldable/fold-state.js +14 -0
- package/dist/native/foldable/fold-state.js.map +1 -0
- package/dist/native/foldable/types.d.ts +12 -0
- package/dist/native/foldable/types.d.ts.map +1 -0
- package/dist/native/foldable/types.js +0 -0
- package/dist/native/index.d.ts +6 -3
- package/dist/native/index.d.ts.map +1 -1
- package/dist/native/index.js +228 -204
- package/dist/native/index.js.map +1 -0
- package/dist/native/prehide.d.ts +4 -2
- package/dist/native/prehide.d.ts.map +1 -1
- package/dist/native/prehide.js +220 -242
- package/dist/native/prehide.js.map +1 -0
- package/dist/native/runtime.d.ts +3 -1
- package/dist/native/runtime.d.ts.map +1 -1
- package/dist/native/runtime.js +626 -724
- package/dist/native/runtime.js.map +1 -0
- package/dist/native/shared/candidate.d.ts +16 -11
- package/dist/native/shared/candidate.d.ts.map +1 -1
- package/dist/native/shared/candidate.js +96 -95
- package/dist/native/shared/candidate.js.map +1 -0
- package/dist/native/shared/crossfade.d.ts +6 -4
- package/dist/native/shared/crossfade.d.ts.map +1 -1
- package/dist/native/shared/crossfade.js +49 -45
- package/dist/native/shared/crossfade.js.map +1 -0
- package/dist/native/shared/dom.d.ts +7 -5
- package/dist/native/shared/dom.d.ts.map +1 -1
- package/dist/native/shared/dom.js +163 -211
- package/dist/native/shared/dom.js.map +1 -0
- package/dist/native/shared/events.d.ts +8 -6
- package/dist/native/shared/events.d.ts.map +1 -1
- package/dist/native/shared/events.js +12 -7
- package/dist/native/shared/events.js.map +1 -0
- package/dist/native/shared/icons.d.ts +4 -2
- package/dist/native/shared/icons.d.ts.map +1 -1
- package/dist/native/shared/icons.js +59 -53
- package/dist/native/shared/icons.js.map +1 -0
- package/dist/native/shared/modal.d.ts +3 -1
- package/dist/native/shared/modal.d.ts.map +1 -1
- package/dist/native/shared/modal.js +156 -139
- package/dist/native/shared/modal.js.map +1 -0
- package/dist/native/vertical-bars-web.d.ts +3 -1
- package/dist/native/vertical-bars-web.d.ts.map +1 -1
- package/dist/native/vertical-bars-web.js +332 -346
- package/dist/native/vertical-bars-web.js.map +1 -0
- package/dist/native-integration/index.d.ts +10 -8
- package/dist/native-integration/index.d.ts.map +1 -1
- package/dist/native-integration/index.js +102 -100
- package/dist/native-integration/index.js.map +1 -0
- package/dist/native-integration/transition.d.ts +3 -1
- package/dist/native-integration/transition.d.ts.map +1 -1
- package/dist/native-integration/transition.js +15 -6
- package/dist/native-integration/transition.js.map +1 -0
- package/dist/searchbar/index.d.ts +4 -2
- package/dist/searchbar/index.d.ts.map +1 -1
- package/dist/searchbar/index.js +64 -56
- package/dist/searchbar/index.js.map +1 -0
- package/dist/segment/index.d.ts +3 -1
- package/dist/segment/index.d.ts.map +1 -1
- package/dist/segment/index.js +465 -324
- package/dist/segment/index.js.map +1 -0
- package/dist/sheets-of-glass/animations.d.ts +13 -12
- package/dist/sheets-of-glass/animations.d.ts.map +1 -1
- package/dist/sheets-of-glass/animations.js +496 -306
- package/dist/sheets-of-glass/animations.js.map +1 -0
- package/dist/sheets-of-glass/index.d.ts +3 -1
- package/dist/sheets-of-glass/index.d.ts.map +1 -1
- package/dist/sheets-of-glass/index.js +294 -357
- package/dist/sheets-of-glass/index.js.map +1 -0
- package/dist/sheets-of-glass/interfaces.d.ts +11 -9
- package/dist/sheets-of-glass/interfaces.d.ts.map +1 -1
- package/dist/sheets-of-glass/interfaces.js +0 -1
- package/dist/tab-bar-searchable/animations/enter.d.ts +4 -2
- package/dist/tab-bar-searchable/animations/enter.d.ts.map +1 -1
- package/dist/tab-bar-searchable/animations/enter.js +50 -69
- package/dist/tab-bar-searchable/animations/enter.js.map +1 -0
- package/dist/tab-bar-searchable/animations/leave.d.ts +4 -2
- package/dist/tab-bar-searchable/animations/leave.d.ts.map +1 -1
- package/dist/tab-bar-searchable/animations/leave.js +48 -62
- package/dist/tab-bar-searchable/animations/leave.js.map +1 -0
- package/dist/tab-bar-searchable/index.d.ts +5 -3
- package/dist/tab-bar-searchable/index.d.ts.map +1 -1
- package/dist/tab-bar-searchable/index.js +125 -109
- package/dist/tab-bar-searchable/index.js.map +1 -0
- package/dist/transition/index.d.ts +9 -8
- package/dist/transition/index.d.ts.map +1 -1
- package/dist/transition/index.js +203 -192
- package/dist/transition/index.js.map +1 -0
- package/dist/transition/ios.transition.d.ts +7 -5
- package/dist/transition/ios.transition.d.ts.map +1 -1
- package/dist/transition/ios.transition.js +15 -11
- package/dist/transition/ios.transition.js.map +1 -0
- package/dist/utils.d.ts +10 -8
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +58 -66
- package/dist/utils.js.map +1 -0
- package/dist/vertical-bars.d.ts +5 -4
- package/dist/vertical-bars.js +4 -2
- package/docs/iphone-duo-with-original-theme.md +18 -29
- package/docs/iphone-duo.md +44 -204
- package/docs/native-ui-shell.md +15 -11
- package/docs/special-markup.md +2 -0
- package/docs/vertical-bars.md +283 -0
- package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellSearchController.swift +1 -1
- package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellVerticalBars.swift +61 -16
- package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellVerticalSearch.swift +118 -0
- package/ios/Sources/IonicNativeUIShellPlugin/IonicNativeUIShellPlugin.swift +17 -8
- package/ios/Sources/IonicNativeUIShellPlugin/Shared/ShellSnapshot.swift +2 -0
- package/ios/Tests/IonicNativeUIShellPluginTests/ShellSnapshotTests.swift +40 -0
- package/package.json +9 -6
- package/src/native/components/index.ts +3 -2
- package/src/native/components/ion-button.ts +3 -2
- package/src/native/components/ion-buttons.ts +4 -3
- package/src/native/components/ion-menu-button.ts +3 -2
- package/src/native/components/searchable-tabs.ts +8 -11
- package/src/native/definitions.ts +22 -1
- package/src/native/foldable/fold-state.ts +9 -0
- package/src/native/foldable/types.ts +4 -0
- package/src/native/index.ts +17 -3
- package/src/native/prehide.ts +3 -1
- package/src/native/runtime.ts +14 -9
- package/src/native/shared/candidate.ts +39 -10
- package/src/native/shared/dom.ts +4 -4
- package/src/styles/vertical-bars.scss +12 -2
- package/src/tab-bar-searchable/index.ts +40 -9
- package/src/vertical-bars.ts +9 -1
- package/dist/vertical-bars.d.ts.map +0 -1
|
@@ -1,152 +1,132 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const iconWidth = parseFloat(iconStyle.width), iconHeight = parseFloat(iconStyle.height);
|
|
129
|
-
const size = index === 1 ? parseFloat(iconStyle.fontSize) : iconWidth;
|
|
130
|
-
const h = index === 1 ? size : iconHeight;
|
|
131
|
-
if (!source || !(size > 0 && h > 0))
|
|
132
|
-
return;
|
|
133
|
-
if (index === 0) {
|
|
134
|
-
item.iconWidth = size;
|
|
135
|
-
item.iconHeight = h;
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
item.closeIconWidth = size;
|
|
139
|
-
item.closeIconHeight = h;
|
|
140
|
-
item.iconTransition =
|
|
141
|
-
parseFloat(iconStyle.transitionDuration) * (iconStyle.transitionDuration.split(',')[0].trim().endsWith('ms') ? 0.001 : 1);
|
|
142
|
-
}
|
|
143
|
-
candidate.icons.push({ item, source, ...(index === 1 ? { field: 'closeIcon' } : {}) });
|
|
144
|
-
}
|
|
145
|
-
if (!visible && !list)
|
|
146
|
-
return;
|
|
147
|
-
candidate.control.items.push(item);
|
|
148
|
-
if (visible)
|
|
149
|
-
candidate.actions.set(item.id, button);
|
|
150
|
-
}
|
|
151
|
-
return candidate;
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { childElements, excluded, isDark, text } from "../shared/dom.js";
|
|
3
|
+
import { iconSource } from "../shared/icons.js";
|
|
4
|
+
//#region src/native/components/ion-fab.ts
|
|
5
|
+
var ion_fab_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
read: () => read,
|
|
7
|
+
shadowSelector: () => shadowSelector,
|
|
8
|
+
tag: () => tag
|
|
9
|
+
});
|
|
10
|
+
const tag = "ion-fab";
|
|
11
|
+
const shadowSelector = "ion-fab-button, ion-fab-list";
|
|
12
|
+
const hasHostMotion = (style) => style.animationName !== "none" || style.transitionDuration.split(",").some((value) => parseFloat(value) > 0);
|
|
13
|
+
const read = (fab, id) => {
|
|
14
|
+
if (fab.slot !== "fixed" || !fab.parentElement?.matches("ion-content") || fab.contains(fab.ownerDocument.activeElement)) return;
|
|
15
|
+
const children = childElements(fab);
|
|
16
|
+
const main = children.filter((child) => child.matches("ion-fab-button"));
|
|
17
|
+
const lists = children.filter((child) => child.matches("ion-fab-list"));
|
|
18
|
+
if (main.length !== 1 || main.length + lists.length !== children.length) return;
|
|
19
|
+
if (lists.some((list) => list.closest(excluded) || childElements(list).some((child) => !child.matches("ion-fab-button")))) return;
|
|
20
|
+
const buttons = [main[0], ...lists.flatMap((list) => childElements(list))];
|
|
21
|
+
const style = getComputedStyle(fab);
|
|
22
|
+
if (hasHostMotion(style)) return;
|
|
23
|
+
const transform = new DOMMatrixReadOnly(style.transform);
|
|
24
|
+
if (!transform.is2D || transform.a !== 1 || transform.d !== 1 || transform.b || transform.c) return;
|
|
25
|
+
const candidate = {
|
|
26
|
+
element: fab,
|
|
27
|
+
control: {
|
|
28
|
+
id: id(fab),
|
|
29
|
+
kind: tag,
|
|
30
|
+
x: 0,
|
|
31
|
+
y: 0,
|
|
32
|
+
width: innerWidth,
|
|
33
|
+
height: innerHeight,
|
|
34
|
+
dark: isDark(style),
|
|
35
|
+
rtl: style.direction === "rtl",
|
|
36
|
+
items: []
|
|
37
|
+
},
|
|
38
|
+
actions: /* @__PURE__ */ new Map(),
|
|
39
|
+
icons: []
|
|
40
|
+
};
|
|
41
|
+
for (const button of buttons) {
|
|
42
|
+
if (!button.classList.contains("ios") || button.closest(excluded) || button.color || button.type !== "button" || button.href) return;
|
|
43
|
+
if (button.querySelector("input, button, a, img, canvas, video, ion-spinner, ion-avatar, ion-badge")) return;
|
|
44
|
+
const native = button.shadowRoot?.querySelector("[part=native]");
|
|
45
|
+
if (!native) return;
|
|
46
|
+
const s = getComputedStyle(button), n = getComputedStyle(native);
|
|
47
|
+
const alpha = n.backgroundColor.startsWith("rgba(") ? Number(n.backgroundColor.slice(5, -1).split(",")[3]) : 1;
|
|
48
|
+
if (s.backgroundColor !== "rgba(0, 0, 0, 0)" || s.backgroundImage !== "none" || n.backgroundImage.includes("url(") || !n.backdropFilter.includes("blur") || !(alpha > 0 && alpha < 1)) return;
|
|
49
|
+
const width = parseFloat(s.width), height = parseFloat(s.height);
|
|
50
|
+
if (!(width > 0 && height > 0) || Math.abs(width - height) > .5 || !n.borderRadius.includes("50%")) return;
|
|
51
|
+
const list = button.parentElement?.matches("ion-fab-list") ? button.parentElement : void 0;
|
|
52
|
+
const listStyle = list && getComputedStyle(list);
|
|
53
|
+
const laidOut = s.display !== "none" && (!listStyle || listStyle.display !== "none");
|
|
54
|
+
const visible = laidOut && (!list || list.activated && button.show && listStyle.visibility === "visible" && Number(listStyle.opacity) > 0) && s.visibility === "visible" && Number(s.opacity) > 0;
|
|
55
|
+
const matrix = new DOMMatrixReadOnly(s.transform);
|
|
56
|
+
if (!matrix.is2D || matrix.b || matrix.c || matrix.e || matrix.f || matrix.a !== matrix.d || matrix.a < 0) return;
|
|
57
|
+
if (matrix.a !== 1 && (matrix.a !== 0 || !list || button.classList.contains("fab-button-show"))) return;
|
|
58
|
+
if (laidOut && !matrix.isIdentity) {
|
|
59
|
+
const origin = s.transformOrigin.split(" ").map(parseFloat);
|
|
60
|
+
if (Math.abs(origin[0] - width / 2) > .5 || Math.abs(origin[1] - height / 2) > .5) return;
|
|
61
|
+
}
|
|
62
|
+
if (hasHostMotion(s)) return;
|
|
63
|
+
if (listStyle) {
|
|
64
|
+
if (hasHostMotion(listStyle)) return;
|
|
65
|
+
const transform = new DOMMatrixReadOnly(listStyle.transform);
|
|
66
|
+
if (!transform.is2D || transform.a !== 1 || transform.d !== 1 || transform.b || transform.c) return;
|
|
67
|
+
}
|
|
68
|
+
const rect = button.getBoundingClientRect();
|
|
69
|
+
const x = laidOut ? rect.x + rect.width / 2 - width / 2 : 0;
|
|
70
|
+
const y = laidOut ? rect.y + rect.height / 2 - height / 2 : 0;
|
|
71
|
+
if (visible && (x < -1 || y < -1 || x + width > innerWidth + 1 || y + height > innerHeight + 1)) return;
|
|
72
|
+
const label = text(button);
|
|
73
|
+
const item = {
|
|
74
|
+
id: id(button),
|
|
75
|
+
x,
|
|
76
|
+
y,
|
|
77
|
+
width,
|
|
78
|
+
height,
|
|
79
|
+
label,
|
|
80
|
+
accessibilityLabel: button.getAttribute("aria-label") ?? native.getAttribute("aria-label") ?? label,
|
|
81
|
+
disabled: button.disabled || s.pointerEvents === "none",
|
|
82
|
+
selected: button.activated,
|
|
83
|
+
visible,
|
|
84
|
+
fontSize: parseFloat(s.fontSize),
|
|
85
|
+
fontWeight: parseInt(s.fontWeight, 10) || 400,
|
|
86
|
+
color: n.color
|
|
87
|
+
};
|
|
88
|
+
const normal = Array.from(button.querySelectorAll("ion-icon, svg"));
|
|
89
|
+
if (normal.length > 1) return;
|
|
90
|
+
const close = button.shadowRoot?.querySelector("ion-icon[part=close-icon]");
|
|
91
|
+
for (const [index, icon] of [normal[0], close].entries()) {
|
|
92
|
+
if (!icon) {
|
|
93
|
+
if (index === 1 || !label) return;
|
|
94
|
+
else continue;
|
|
95
|
+
}
|
|
96
|
+
const svg = icon.matches("svg") ? icon : icon.shadowRoot?.querySelector("svg");
|
|
97
|
+
if (!svg) return;
|
|
98
|
+
const iconStyle = getComputedStyle(icon);
|
|
99
|
+
const inner = icon.shadowRoot?.querySelector(".icon-inner");
|
|
100
|
+
if (index === 0 && inner && !new DOMMatrixReadOnly(iconStyle.transform).isIdentity) return;
|
|
101
|
+
const transform = new DOMMatrixReadOnly(inner ? getComputedStyle(inner).transform : iconStyle.transform);
|
|
102
|
+
const mirrored = transform.is2D && transform.a === -1 && transform.d === 1 && !transform.b && !transform.c && !transform.e && !transform.f;
|
|
103
|
+
if (index === 0 && !transform.isIdentity && !mirrored) return;
|
|
104
|
+
const source = iconSource(svg, index === 0 && mirrored);
|
|
105
|
+
const iconWidth = parseFloat(iconStyle.width), iconHeight = parseFloat(iconStyle.height);
|
|
106
|
+
const size = index === 1 ? parseFloat(iconStyle.fontSize) : iconWidth;
|
|
107
|
+
const h = index === 1 ? size : iconHeight;
|
|
108
|
+
if (!source || !(size > 0 && h > 0)) return;
|
|
109
|
+
if (index === 0) {
|
|
110
|
+
item.iconWidth = size;
|
|
111
|
+
item.iconHeight = h;
|
|
112
|
+
} else {
|
|
113
|
+
item.closeIconWidth = size;
|
|
114
|
+
item.closeIconHeight = h;
|
|
115
|
+
item.iconTransition = parseFloat(iconStyle.transitionDuration) * (iconStyle.transitionDuration.split(",")[0].trim().endsWith("ms") ? .001 : 1);
|
|
116
|
+
}
|
|
117
|
+
candidate.icons.push({
|
|
118
|
+
item,
|
|
119
|
+
source,
|
|
120
|
+
...index === 1 ? { field: "closeIcon" } : {}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
if (!visible && !list) return;
|
|
124
|
+
candidate.control.items.push(item);
|
|
125
|
+
if (visible) candidate.actions.set(item.id, button);
|
|
126
|
+
}
|
|
127
|
+
return candidate;
|
|
152
128
|
};
|
|
129
|
+
//#endregion
|
|
130
|
+
export { ion_fab_exports, read, shadowSelector, tag };
|
|
131
|
+
|
|
132
|
+
//# sourceMappingURL=ion-fab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ion-fab.js","names":[],"sources":["../../../src/native/components/ion-fab.ts"],"sourcesContent":["import type { Candidate } from '../shared/candidate';\nimport { childElements, excluded, isDark, text } from '../shared/dom';\nimport { iconSource } from '../shared/icons';\nimport type { ShellItem } from '../definitions';\n\nexport const tag = 'ion-fab';\nexport const shadowSelector = 'ion-fab-button, ion-fab-list';\n\nconst hasHostMotion = (style: CSSStyleDeclaration): boolean =>\n style.animationName !== 'none' || style.transitionDuration.split(',').some((value) => parseFloat(value) > 0);\n\n// FAB owns the batch; only its buttons draw glass. Closed lists keep their IDs\n// and resolved artwork, without inventing layout for display:none descendants.\nexport const read = (fab: HTMLElement, id: (element: HTMLElement) => string): Candidate | undefined => {\n if (fab.slot !== 'fixed' || !fab.parentElement?.matches('ion-content') || fab.contains(fab.ownerDocument.activeElement)) return;\n const children = childElements(fab);\n const main = children.filter((child) => child.matches('ion-fab-button'));\n const lists = children.filter((child) => child.matches('ion-fab-list'));\n if (main.length !== 1 || main.length + lists.length !== children.length) return;\n if (lists.some((list) => list.closest(excluded) || childElements(list).some((child) => !child.matches('ion-fab-button')))) return;\n const buttons = [main[0], ...lists.flatMap((list) => childElements(list))] as HTMLIonFabButtonElement[];\n const style = getComputedStyle(fab);\n if (hasHostMotion(style)) return;\n const transform = new DOMMatrixReadOnly(style.transform);\n if (!transform.is2D || transform.a !== 1 || transform.d !== 1 || transform.b || transform.c) return;\n const candidate: Candidate = {\n element: fab,\n control: {\n id: id(fab),\n kind: tag,\n x: 0,\n y: 0,\n width: innerWidth,\n height: innerHeight,\n dark: isDark(style),\n rtl: style.direction === 'rtl',\n items: [],\n },\n actions: new Map(),\n icons: [],\n };\n for (const button of buttons) {\n if (!button.classList.contains('ios') || button.closest(excluded) || button.color || button.type !== 'button' || button.href) return;\n if (button.querySelector('input, button, a, img, canvas, video, ion-spinner, ion-avatar, ion-badge')) return;\n const native = button.shadowRoot?.querySelector<HTMLElement>('[part=native]');\n if (!native) return;\n const s = getComputedStyle(button),\n n = getComputedStyle(native);\n // An opaque custom host/background or custom shape cannot be discarded.\n const alpha = n.backgroundColor.startsWith('rgba(') ? Number(n.backgroundColor.slice(5, -1).split(',')[3]) : 1;\n if (\n s.backgroundColor !== 'rgba(0, 0, 0, 0)' ||\n s.backgroundImage !== 'none' ||\n n.backgroundImage.includes('url(') ||\n !n.backdropFilter.includes('blur') ||\n !(alpha > 0 && alpha < 1)\n )\n return;\n const width = parseFloat(s.width),\n height = parseFloat(s.height);\n if (!(width > 0 && height > 0) || Math.abs(width - height) > 0.5 || !n.borderRadius.includes('50%')) return;\n const list = button.parentElement?.matches('ion-fab-list') ? (button.parentElement as HTMLIonFabListElement) : undefined;\n const listStyle = list && getComputedStyle(list);\n const laidOut = s.display !== 'none' && (!listStyle || listStyle.display !== 'none');\n const visible =\n laidOut &&\n (!list || (list.activated && button.show && listStyle!.visibility === 'visible' && Number(listStyle!.opacity) > 0)) &&\n s.visibility === 'visible' &&\n Number(s.opacity) > 0;\n // Standard scale is centered: even scale(0) retains its actual layout center.\n // Static list translation is already included in the DOM rect (including RTL).\n const matrix = new DOMMatrixReadOnly(s.transform);\n if (!matrix.is2D || matrix.b || matrix.c || matrix.e || matrix.f || matrix.a !== matrix.d || matrix.a < 0) return;\n // Only Ionic's hidden list child may use scale(0). Custom static scaling\n // changes the actual glass/hit area and must retain its Web rendering.\n // Stencil updates show before rendering its host class. Judge the rendered\n // scale against that class so this normal one-frame gap keeps its cover.\n if (matrix.a !== 1 && (matrix.a !== 0 || !list || button.classList.contains('fab-button-show'))) return;\n if (laidOut && !matrix.isIdentity) {\n const origin = s.transformOrigin.split(' ').map(parseFloat);\n if (Math.abs(origin[0] - width / 2) > 0.5 || Math.abs(origin[1] - height / 2) > 0.5) return;\n }\n // Ionic's list appearance is staggered show changes, without a host CSS\n // transition. Custom host animations keep their complete Web rendering.\n if (hasHostMotion(s)) return;\n if (listStyle) {\n if (hasHostMotion(listStyle)) return;\n const transform = new DOMMatrixReadOnly(listStyle.transform);\n if (!transform.is2D || transform.a !== 1 || transform.d !== 1 || transform.b || transform.c) return;\n }\n const rect = button.getBoundingClientRect();\n const x = laidOut ? rect.x + rect.width / 2 - width / 2 : 0;\n const y = laidOut ? rect.y + rect.height / 2 - height / 2 : 0;\n if (visible && (x < -1 || y < -1 || x + width > innerWidth + 1 || y + height > innerHeight + 1)) return;\n const label = text(button);\n const item: ShellItem = {\n id: id(button),\n x,\n y,\n width,\n height,\n label,\n accessibilityLabel: button.getAttribute('aria-label') ?? native.getAttribute('aria-label') ?? label,\n disabled: button.disabled || s.pointerEvents === 'none',\n selected: button.activated,\n visible,\n fontSize: parseFloat(s.fontSize),\n fontWeight: parseInt(s.fontWeight, 10) || 400,\n color: n.color,\n };\n const normal = Array.from(button.querySelectorAll('ion-icon, svg'));\n if (normal.length > 1) return;\n const close = button.shadowRoot?.querySelector<HTMLElement>('ion-icon[part=close-icon]');\n for (const [index, icon] of [normal[0], close].entries()) {\n if (!icon) {\n if (index === 1 || !label) return;\n else continue;\n }\n const svg = icon.matches('svg') ? (icon as SVGElement) : icon.shadowRoot?.querySelector<SVGElement>('svg');\n if (!svg) return;\n const iconStyle = getComputedStyle(icon);\n const inner = icon.shadowRoot?.querySelector('.icon-inner');\n if (index === 0 && inner && !new DOMMatrixReadOnly(iconStyle.transform).isIdentity) return;\n const transform = new DOMMatrixReadOnly(inner ? getComputedStyle(inner).transform : iconStyle.transform);\n const mirrored =\n transform.is2D && transform.a === -1 && transform.d === 1 && !transform.b && !transform.c && !transform.e && !transform.f;\n if (index === 0 && !transform.isIdentity && !mirrored) return;\n const source = iconSource(svg, index === 0 && mirrored);\n const iconWidth = parseFloat(iconStyle.width),\n iconHeight = parseFloat(iconStyle.height);\n // The internal close-icon fills the button vertically; its glyph uses font-size.\n const size = index === 1 ? parseFloat(iconStyle.fontSize) : iconWidth;\n const h = index === 1 ? size : iconHeight;\n if (!source || !(size > 0 && h > 0)) return;\n if (index === 0) {\n item.iconWidth = size;\n item.iconHeight = h;\n } else {\n item.closeIconWidth = size;\n item.closeIconHeight = h;\n item.iconTransition =\n parseFloat(iconStyle.transitionDuration) * (iconStyle.transitionDuration.split(',')[0].trim().endsWith('ms') ? 0.001 : 1);\n }\n candidate.icons.push({ item, source, ...(index === 1 ? { field: 'closeIcon' as const } : {}) });\n }\n if (!visible && !list) return;\n candidate.control.items.push(item);\n if (visible) candidate.actions.set(item.id, button);\n }\n return candidate;\n};\n"],"mappings":";;;;;;;;;AAKA,MAAa,MAAM;AACnB,MAAa,iBAAiB;AAE9B,MAAM,iBAAiB,UACrB,MAAM,kBAAkB,UAAU,MAAM,mBAAmB,MAAM,GAAG,CAAC,CAAC,MAAM,UAAU,WAAW,KAAK,IAAI,CAAC;AAI7G,MAAa,QAAQ,KAAkB,OAAgE;CACrG,IAAI,IAAI,SAAS,WAAW,CAAC,IAAI,eAAe,QAAQ,aAAa,KAAK,IAAI,SAAS,IAAI,cAAc,aAAa,GAAG;CACzH,MAAM,WAAW,cAAc,GAAG;CAClC,MAAM,OAAO,SAAS,QAAQ,UAAU,MAAM,QAAQ,gBAAgB,CAAC;CACvE,MAAM,QAAQ,SAAS,QAAQ,UAAU,MAAM,QAAQ,cAAc,CAAC;CACtE,IAAI,KAAK,WAAW,KAAK,KAAK,SAAS,MAAM,WAAW,SAAS,QAAQ;CACzE,IAAI,MAAM,MAAM,SAAS,KAAK,QAAQ,QAAQ,KAAK,cAAc,IAAI,CAAC,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C,UAAU,KAAK,CAAC,UAAU,KAAK,CAAC,UAAU,KAAK,CAAC,UAAU;GAC1H,IAAI,UAAU,KAAK,CAAC,UAAU,cAAc,CAAC,UAAU;GACvD,MAAM,SAAS,WAAW,KAAK,UAAU,KAAK,QAAQ;GACtD,MAAM,YAAY,WAAW,UAAU,KAAK,GAC1C,aAAa,WAAW,UAAU,MAAM;GAE1C,MAAM,OAAO,UAAU,IAAI,WAAW,UAAU,QAAQ,IAAI;GAC5D,MAAM,IAAI,UAAU,IAAI,OAAO;GAC/B,IAAI,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,IAAI;GACrC,IAAI,UAAU,GAAG;IACf,KAAK,YAAY;IACjB,KAAK,aAAa;GACpB,OAAO;IACL,KAAK,iBAAiB;IACtB,KAAK,kBAAkB;IACvB,KAAK,iBACH,WAAW,UAAU,kBAAkB,KAAK,UAAU,mBAAmB,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,SAAS,IAAI,IAAI,OAAQ;GAC3H;GACA,UAAU,MAAM,KAAK;IAAE;IAAM;IAAQ,GAAI,UAAU,IAAI,EAAE,OAAO,YAAqB,IAAI,CAAC;GAAG,CAAC;EAChG;EACA,IAAI,CAAC,WAAW,CAAC,MAAM;EACvB,UAAU,QAAQ,MAAM,KAAK,IAAI;EACjC,IAAI,SAAS,UAAU,QAAQ,IAAI,KAAK,IAAI,MAAM;CACpD;CACA,OAAO;AACT"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { VerticalControlAreaOptions } from "../definitions.js";
|
|
2
|
+
import { Candidate, Identify } from "../shared/candidate.js";
|
|
3
|
+
declare namespace ion_menu_button_d_exports {
|
|
4
|
+
export { append, read, selector, shadowSelector, tag };
|
|
5
|
+
}
|
|
2
6
|
export declare const tag = "ion-menu-button";
|
|
3
7
|
export declare const selector = "";
|
|
4
8
|
export declare const shadowSelector = "ion-menu-button";
|
|
5
9
|
export declare const append: (candidate: Candidate, button: HTMLIonMenuButtonElement, id: Identify) => boolean;
|
|
6
|
-
export declare const read: (group: HTMLElement, id: Identify) => Candidate | undefined;
|
|
10
|
+
export declare const read: (group: HTMLElement, id: Identify, options?: VerticalControlAreaOptions) => Candidate | undefined;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ion_menu_button_d_exports };
|
|
7
13
|
//# sourceMappingURL=ion-menu-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ion-menu-button.d.ts","
|
|
1
|
+
{"version":3,"file":"ion-menu-button.d.ts","names":[],"sources":["../../../src/native/components/ion-menu-button.ts"],"mappings":";;;;;qBAKa;qBAEA;qBACA;qBAEA,SAAU,WAAW,WAAW,QAAQ,0BAA0B,IAAI;qBAMtE,OAAQ,OAAO,aAAa,IAAI,UAAU,UAAS,+BAAkC"}
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { childElements, inFixedToolbar } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { childElements, inFixedToolbar } from "../shared/dom.js";
|
|
3
|
+
import { appendItem, createCandidate } from "../shared/candidate.js";
|
|
4
|
+
//#region src/native/components/ion-menu-button.ts
|
|
5
|
+
var ion_menu_button_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
append: () => append,
|
|
7
|
+
read: () => read,
|
|
8
|
+
selector: () => "",
|
|
9
|
+
shadowSelector: () => shadowSelector,
|
|
10
|
+
tag: () => tag
|
|
11
|
+
});
|
|
12
|
+
const tag = "ion-menu-button";
|
|
13
|
+
const selector = "";
|
|
14
|
+
const shadowSelector = tag;
|
|
15
|
+
const append = (candidate, button, id) => {
|
|
16
|
+
if (button.type !== "button") return false;
|
|
17
|
+
const content = !button.shadowRoot?.querySelector("slot")?.assignedNodes().length ? button.shadowRoot : button;
|
|
18
|
+
return !!content && !!appendItem(candidate, button, id, content);
|
|
11
19
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const candidate = createCandidate(group, tag, id);
|
|
20
|
-
return append(candidate, button, id) ? candidate : undefined;
|
|
20
|
+
const read = (group, id, options = {}) => {
|
|
21
|
+
const children = group.matches("ion-buttons") ? childElements(group) : [];
|
|
22
|
+
if (!inFixedToolbar(group) || children.length !== 1) return;
|
|
23
|
+
const button = children[0];
|
|
24
|
+
if (!button?.matches(`ion-menu-button${group.closest("ion-app.ios-theme-vertical-bars") ? "" : ".ios"}`)) return;
|
|
25
|
+
const candidate = createCandidate(group, tag, id, options);
|
|
26
|
+
return append(candidate, button, id) ? candidate : void 0;
|
|
21
27
|
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { append, ion_menu_button_exports, read, selector, shadowSelector, tag };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=ion-menu-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ion-menu-button.js","names":[],"sources":["../../../src/native/components/ion-menu-button.ts"],"sourcesContent":["import { createCandidate, appendItem } from '../shared/candidate';\nimport type { Candidate, Identify } from '../shared/candidate';\nimport type { VerticalControlAreaOptions } from '../definitions';\nimport { childElements, inFixedToolbar } from '../shared/dom';\n\nexport const tag = 'ion-menu-button';\n// The glass and projection ownership belong to ion-buttons, even for one menu button.\nexport const selector = '';\nexport const shadowSelector = tag;\n\nexport const append = (candidate: Candidate, button: HTMLIonMenuButtonElement, id: Identify): boolean => {\n if (button.type !== 'button') return false;\n const content = !button.shadowRoot?.querySelector('slot')?.assignedNodes().length ? button.shadowRoot : button;\n return !!content && !!appendItem(candidate, button, id, content);\n};\n\nexport const read = (group: HTMLElement, id: Identify, options: VerticalControlAreaOptions = {}): Candidate | undefined => {\n const children = group.matches('ion-buttons') ? childElements(group) : [];\n if (!inFixedToolbar(group) || children.length !== 1) return;\n const button = children[0];\n if (!button?.matches(`${tag}${group.closest('ion-app.ios-theme-vertical-bars') ? '' : '.ios'}`)) return;\n const candidate = createCandidate(group, tag, id, options);\n return append(candidate, button as HTMLIonMenuButtonElement, id) ? candidate : undefined;\n};\n"],"mappings":";;;;;;;;;;;AAKA,MAAa,MAAM;AAEnB,MAAa,WAAW;AACxB,MAAa,iBAAiB;AAE9B,MAAa,UAAU,WAAsB,QAAkC,OAA0B;CACvG,IAAI,OAAO,SAAS,UAAU,OAAO;CACrC,MAAM,UAAU,CAAC,OAAO,YAAY,cAAc,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC,SAAS,OAAO,aAAa;CACxG,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,WAAW,QAAQ,IAAI,OAAO;AACjE;AAEA,MAAa,QAAQ,OAAoB,IAAc,UAAsC,CAAC,MAA6B;CACzH,MAAM,WAAW,MAAM,QAAQ,aAAa,IAAI,cAAc,KAAK,IAAI,CAAC;CACxE,IAAI,CAAC,eAAe,KAAK,KAAK,SAAS,WAAW,GAAG;CACrD,MAAM,SAAS,SAAS;CACxB,IAAI,CAAC,QAAQ,QAAQ,kBAAS,MAAM,QAAQ,iCAAiC,IAAI,KAAK,QAAQ,GAAG;CACjG,MAAM,YAAY,gBAAgB,OAAO,KAAK,IAAI,OAAO;CACzD,OAAO,OAAO,WAAW,QAAoC,EAAE,IAAI,YAAY,KAAA;AACjF"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Candidate, Identify } from "../shared/candidate.js";
|
|
2
|
+
declare namespace ion_segment_d_exports {
|
|
3
|
+
export { read, shadowSelector, tag, tracksMotion };
|
|
4
|
+
}
|
|
2
5
|
export declare const tag = "ion-segment";
|
|
3
6
|
export declare const shadowSelector = "ion-segment-button";
|
|
4
7
|
export declare const tracksMotion = true;
|
|
5
8
|
export declare const read: (element: HTMLElement, id: Identify) => Candidate | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ion_segment_d_exports };
|
|
6
11
|
//# sourceMappingURL=ion-segment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ion-segment.d.ts","
|
|
1
|
+
{"version":3,"file":"ion-segment.d.ts","names":[],"sources":["../../../src/native/components/ion-segment.ts"],"mappings":";;;;qBAIa;qBACA;qBACA;qBAEA,OAAQ,SAAS,aAAa,IAAI,aAAW"}
|
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { inFixedToolbar } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { inFixedToolbar } from "../shared/dom.js";
|
|
3
|
+
import { appendItem, createCandidate } from "../shared/candidate.js";
|
|
4
|
+
//#region src/native/components/ion-segment.ts
|
|
5
|
+
var ion_segment_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
read: () => read,
|
|
7
|
+
shadowSelector: () => shadowSelector,
|
|
8
|
+
tag: () => tag,
|
|
9
|
+
tracksMotion: () => true
|
|
10
|
+
});
|
|
11
|
+
const tag = "ion-segment";
|
|
12
|
+
const shadowSelector = "ion-segment-button";
|
|
13
|
+
const tracksMotion = true;
|
|
14
|
+
const read = (element, id) => {
|
|
15
|
+
const segment = element;
|
|
16
|
+
if (!inFixedToolbar(element) || segment.scrollable || element.classList.contains("segment-expand") || element.querySelector("ion-segment-button[content-id]")) return;
|
|
17
|
+
const children = Array.from(element.querySelectorAll(":scope > ion-segment-button"));
|
|
18
|
+
if (!children.length) return;
|
|
19
|
+
const candidate = createCandidate(element, tag, id);
|
|
20
|
+
for (const child of children) {
|
|
21
|
+
const item = appendItem(candidate, child, id);
|
|
22
|
+
if (!item || item.label && item.iconWidth) return;
|
|
23
|
+
item.selected = segment.value === child.value;
|
|
24
|
+
}
|
|
25
|
+
return candidate;
|
|
24
26
|
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { ion_segment_exports, read, shadowSelector, tag, tracksMotion };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=ion-segment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ion-segment.js","names":[],"sources":["../../../src/native/components/ion-segment.ts"],"sourcesContent":["import { createCandidate, appendItem } from '../shared/candidate';\nimport type { Candidate, Identify } from '../shared/candidate';\nimport { inFixedToolbar } from '../shared/dom';\n\nexport const tag = 'ion-segment';\nexport const shadowSelector = 'ion-segment-button';\nexport const tracksMotion = true;\n\nexport const read = (element: HTMLElement, id: Identify): Candidate | undefined => {\n const segment = element as HTMLIonSegmentElement;\n if (\n !inFixedToolbar(element) ||\n segment.scrollable ||\n element.classList.contains('segment-expand') ||\n element.querySelector('ion-segment-button[content-id]')\n )\n return;\n const children = Array.from(element.querySelectorAll<HTMLIonSegmentButtonElement>(':scope > ion-segment-button'));\n if (!children.length) return;\n const candidate = createCandidate(element, tag, id);\n for (const child of children) {\n const item = appendItem(candidate, child, id);\n if (!item || (item.label && item.iconWidth)) return;\n item.selected = segment.value === child.value;\n }\n return candidate;\n};\n"],"mappings":";;;;;;;;;;AAIA,MAAa,MAAM;AACnB,MAAa,iBAAiB;AAC9B,MAAa,eAAe;AAE5B,MAAa,QAAQ,SAAsB,OAAwC;CACjF,MAAM,UAAU;CAChB,IACE,CAAC,eAAe,OAAO,KACvB,QAAQ,cACR,QAAQ,UAAU,SAAS,gBAAgB,KAC3C,QAAQ,cAAc,gCAAgC,GAEtD;CACF,MAAM,WAAW,MAAM,KAAK,QAAQ,iBAA8C,6BAA6B,CAAC;CAChH,IAAI,CAAC,SAAS,QAAQ;CACtB,MAAM,YAAY,gBAAgB,SAAS,KAAK,EAAE;CAClD,KAAK,MAAM,SAAS,UAAU;EAC5B,MAAM,OAAO,WAAW,WAAW,OAAO,EAAE;EAC5C,IAAI,CAAC,QAAS,KAAK,SAAS,KAAK,WAAY;EAC7C,KAAK,WAAW,QAAQ,UAAU,MAAM;CAC1C;CACA,OAAO;AACT"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Candidate, Identify } from "../shared/candidate.js";
|
|
2
|
+
declare namespace ion_tab_bar_d_exports {
|
|
3
|
+
export { read, shadowSelector, tag, tracksMotion };
|
|
4
|
+
}
|
|
2
5
|
export declare const tag = "ion-tab-bar";
|
|
3
6
|
export declare const shadowSelector = "ion-tab-button";
|
|
4
7
|
export declare const tracksMotion = true;
|
|
5
8
|
export declare const read: (element: HTMLElement, id: Identify) => Candidate | undefined;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ion_tab_bar_d_exports };
|
|
6
11
|
//# sourceMappingURL=ion-tab-bar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ion-tab-bar.d.ts","
|
|
1
|
+
{"version":3,"file":"ion-tab-bar.d.ts","names":[],"sources":["../../../src/native/components/ion-tab-bar.ts"],"mappings":";;;;qBAGa;qBACA;qBACA;qBAEA,OAAQ,SAAS,aAAa,IAAI,aAAW"}
|
|
@@ -1,41 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { appendItem, createCandidate } from "../shared/candidate.js";
|
|
3
|
+
//#region src/native/components/ion-tab-bar.ts
|
|
4
|
+
var ion_tab_bar_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
read: () => read,
|
|
6
|
+
shadowSelector: () => shadowSelector,
|
|
7
|
+
tag: () => tag,
|
|
8
|
+
tracksMotion: () => true
|
|
9
|
+
});
|
|
10
|
+
const tag = "ion-tab-bar";
|
|
11
|
+
const shadowSelector = "ion-tab-button";
|
|
12
|
+
const tracksMotion = true;
|
|
13
|
+
const read = (element, id) => {
|
|
14
|
+
if (element.closest("ion-content")) return;
|
|
15
|
+
const children = Array.from(element.querySelectorAll(":scope > ion-tab-button:not(.ion-cloned-element)"));
|
|
16
|
+
if (!children.length) return;
|
|
17
|
+
const width = children[0].getBoundingClientRect().width;
|
|
18
|
+
if (children.some((child) => (child.layout ?? "icon-top") !== "icon-top" || Math.abs(child.getBoundingClientRect().width - width) > 1)) return void 0;
|
|
19
|
+
const candidate = createCandidate(element, tag, id);
|
|
20
|
+
const style = getComputedStyle(element);
|
|
21
|
+
const rtl = style.direction === "rtl";
|
|
22
|
+
const position = [
|
|
23
|
+
"start",
|
|
24
|
+
"center",
|
|
25
|
+
"end"
|
|
26
|
+
].find((value) => element.classList.contains(`tab-bar-position-${value}`));
|
|
27
|
+
candidate.control.tabBarAnchor = {
|
|
28
|
+
x: position === "center" ? .5 : position ? position === "start" !== rtl ? 0 : 1 : style.left !== "auto" ? 0 : 1,
|
|
29
|
+
y: element.slot === "bottom" ? 1 : 0
|
|
30
|
+
};
|
|
31
|
+
for (const child of children) {
|
|
32
|
+
const item = appendItem(candidate, child, id);
|
|
33
|
+
if (!item) return;
|
|
34
|
+
const svg = child.querySelector("svg") ?? child.querySelector("ion-icon")?.shadowRoot?.querySelector("svg");
|
|
35
|
+
if (svg) {
|
|
36
|
+
item.iconPosition = "top";
|
|
37
|
+
const color = getComputedStyle(svg).color;
|
|
38
|
+
const shapes = Array.from(svg.querySelectorAll("path, rect, circle, ellipse, line, polygon, polyline"));
|
|
39
|
+
item.iconTemplate = shapes.length > 0 && shapes.every((shape) => {
|
|
40
|
+
const paint = getComputedStyle(shape);
|
|
41
|
+
return [paint.fill, paint.stroke].every((value) => value === "none" || value === color);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return candidate;
|
|
41
46
|
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { ion_tab_bar_exports, read, shadowSelector, tag, tracksMotion };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=ion-tab-bar.js.map
|