@rdlabo/ionic-theme-ios27 0.1.0-beta.pr166.shabba1151da4ea → 0.1.0-beta.pr172.sha0316ffe45969

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/index.d.ts +1 -2
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -2
  4. package/dist/tab-bar-searchable/animations/enter.d.ts +1 -1
  5. package/dist/tab-bar-searchable/animations/enter.d.ts.map +1 -1
  6. package/dist/tab-bar-searchable/animations/enter.js +1 -1
  7. package/dist/tab-bar-searchable/animations/leave.d.ts +1 -1
  8. package/dist/tab-bar-searchable/animations/leave.d.ts.map +1 -1
  9. package/dist/tab-bar-searchable/animations/leave.js +1 -1
  10. package/dist/tab-bar-searchable/index.d.ts +2 -2
  11. package/dist/tab-bar-searchable/index.d.ts.map +1 -1
  12. package/dist/tab-bar-searchable/index.js +2 -3
  13. package/dist/transition/ios.transition.d.ts +2 -1
  14. package/dist/transition/ios.transition.d.ts.map +1 -1
  15. package/dist/transition/ios.transition.js +7 -387
  16. package/package.json +5 -2
  17. package/src/index.ts +4 -2
  18. package/src/styles/components/ion-list.scss +2 -2
  19. package/src/styles/md-ion-list-inset.scss +2 -2
  20. package/src/styles/utils/dark/ion-list.scss +1 -1
  21. package/src/tab-bar-searchable/animations/enter.ts +1 -2
  22. package/src/tab-bar-searchable/animations/leave.ts +1 -2
  23. package/src/tab-bar-searchable/index.ts +12 -4
  24. package/src/transition/ios.transition.ts +7 -477
  25. package/dist/css/utils/structured-list.css +0 -1
  26. package/dist/popover/animations/ios.enter.d.ts +0 -4
  27. package/dist/popover/animations/ios.enter.d.ts.map +0 -1
  28. package/dist/popover/animations/ios.enter.js +0 -193
  29. package/dist/popover/animations/ios.leave.d.ts +0 -3
  30. package/dist/popover/animations/ios.leave.d.ts.map +0 -1
  31. package/dist/popover/animations/ios.leave.js +0 -74
  32. package/dist/popover/callout-surface.d.ts +0 -2
  33. package/dist/popover/callout-surface.d.ts.map +0 -1
  34. package/dist/popover/callout-surface.js +0 -44
  35. package/dist/popover/popover-interface.d.ts +0 -38
  36. package/dist/popover/popover-interface.d.ts.map +0 -1
  37. package/dist/popover/popover-interface.js +0 -1
  38. package/dist/popover/utils.d.ts +0 -37
  39. package/dist/popover/utils.d.ts.map +0 -1
  40. package/dist/popover/utils.js +0 -377
  41. package/dist/tab-bar-searchable/interfaces.d.ts +0 -41
  42. package/dist/tab-bar-searchable/interfaces.d.ts.map +0 -1
  43. package/dist/tab-bar-searchable/interfaces.js +0 -5
  44. package/dist/tab-bar-searchable/utils.d.ts +0 -12
  45. package/dist/tab-bar-searchable/utils.d.ts.map +0 -1
  46. package/dist/tab-bar-searchable/utils.js +0 -60
  47. package/src/popover/animations/ios.enter.ts +0 -257
  48. package/src/popover/animations/ios.leave.ts +0 -90
  49. package/src/popover/callout-surface.ts +0 -54
  50. package/src/popover/popover-interface.ts +0 -44
  51. package/src/popover/utils.ts +0 -696
  52. package/src/styles/utils/structured-list.scss +0 -223
  53. package/src/tab-bar-searchable/interfaces.ts +0 -28
  54. package/src/tab-bar-searchable/utils.ts +0 -75
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { registeredEffect } from './sheets-of-glass/interfaces';
2
2
  export * from './sheets-of-glass/interfaces';
3
- export { iosEnterAnimation as popoverEnterAnimation } from './popover/animations/ios.enter';
4
- export { iosLeaveAnimation as popoverLeaveAnimation } from './popover/animations/ios.leave';
3
+ export { iosPopoverEnterAnimation as popoverEnterAnimation, iosPopoverLeaveAnimation as popoverLeaveAnimation, } from '@rdlabo/ionic-theme-utils';
5
4
  export * from './tab-bar-searchable';
6
5
  export * from './searchbar';
7
6
  export * from './transition/ios.transition';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,eAAO,MAAM,oBAAoB,GAAI,eAAe,WAAW,KAAG,gBAAgB,GAAG,SAyBpF,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EACL,wBAAwB,IAAI,qBAAqB,EACjD,wBAAwB,IAAI,qBAAqB,GAClD,MAAM,2BAA2B,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,eAAO,MAAM,oBAAoB,GAAI,eAAe,WAAW,KAAG,gBAAgB,GAAG,SAyBpF,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { registerEffect } from './sheets-of-glass';
2
2
  export * from './sheets-of-glass/interfaces';
3
- export { iosEnterAnimation as popoverEnterAnimation } from './popover/animations/ios.enter';
4
- export { iosLeaveAnimation as popoverLeaveAnimation } from './popover/animations/ios.leave';
3
+ export { iosPopoverEnterAnimation as popoverEnterAnimation, iosPopoverLeaveAnimation as popoverLeaveAnimation, } from '@rdlabo/ionic-theme-utils';
5
4
  export * from './tab-bar-searchable';
6
5
  export * from './searchbar';
7
6
  export * from './transition/ios.transition';
@@ -1,5 +1,5 @@
1
- import { ElementReferences, ElementSizes } from '../interfaces';
2
1
  import { Animation } from '@ionic/core';
2
+ import { type ElementReferences, type ElementSizes } from '@rdlabo/ionic-theme-utils';
3
3
  export declare const createEffectAnimation: (references: ElementReferences, sizes: ElementSizes) => Animation;
4
4
  export declare const createSearchContainerAnimation: (references: ElementReferences, sizes: ElementSizes) => Animation;
5
5
  export declare const createCloseButtonsAnimation: (references: ElementReferences) => Animation;
@@ -1 +1 @@
1
- {"version":3,"file":"enter.d.ts","sourceRoot":"","sources":["../../../src/tab-bar-searchable/animations/enter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AAIzD,eAAO,MAAM,qBAAqB,GAAI,YAAY,iBAAiB,EAAE,OAAO,YAAY,KAAG,SA0B1F,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,YAAY,iBAAiB,EAAE,OAAO,YAAY,KAAG,SAUnG,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,YAAY,iBAAiB,KAAG,SAO3E,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,WAAW,WAAW,EAAE,YAAY,iBAAiB,EAAE,OAAO,YAAY,KAAG,SAyBlH,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,cAAc,WAAW,KAAG,SAWpE,CAAC"}
1
+ {"version":3,"file":"enter.d.ts","sourceRoot":"","sources":["../../../src/tab-bar-searchable/animations/enter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACzD,OAAO,EAAqD,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzI,eAAO,MAAM,qBAAqB,GAAI,YAAY,iBAAiB,EAAE,OAAO,YAAY,KAAG,SA0B1F,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,YAAY,iBAAiB,EAAE,OAAO,YAAY,KAAG,SAUnG,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,YAAY,iBAAiB,KAAG,SAO3E,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,WAAW,WAAW,EAAE,YAAY,iBAAiB,EAAE,OAAO,YAAY,KAAG,SAyBlH,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,cAAc,WAAW,KAAG,SAWpE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { createAnimation } from '@ionic/core';
2
+ import { ANIMATION_DELAY_CLOSE_BUTTONS, OPACITY_TRANSITION } from '@rdlabo/ionic-theme-utils';
2
3
  import { cloneElement } from '../../utils';
3
- import { ANIMATION_DELAY_CLOSE_BUTTONS, OPACITY_TRANSITION } from '../utils';
4
4
  export const createEffectAnimation = (references, sizes) => {
5
5
  const effectElement = cloneElement('ion-icon');
6
6
  const closeButtonRect = references.closeButtonIcon?.getBoundingClientRect();
@@ -1,5 +1,5 @@
1
- import { ElementReferences, ElementSizes } from '../interfaces';
2
1
  import { Animation } from '@ionic/core';
2
+ import { type ElementReferences, type ElementSizes } from '@rdlabo/ionic-theme-utils';
3
3
  export declare const createReverseEffectAnimation: (references: ElementReferences, searchableElementSizes: ElementSizes, colorSelected: string) => Animation;
4
4
  export declare const createReverseSearchContainerAnimation: (references: ElementReferences, sizes: ElementSizes) => Animation;
5
5
  export declare const createReverseCloseButtonsAnimation: (references: ElementReferences) => Animation;
@@ -1 +1 @@
1
- {"version":3,"file":"leave.d.ts","sourceRoot":"","sources":["../../../src/tab-bar-searchable/animations/leave.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AAIzD,eAAO,MAAM,4BAA4B,GACvC,YAAY,iBAAiB,EAC7B,wBAAwB,YAAY,EACpC,eAAe,MAAM,KACpB,SAyBF,CAAC;AAEF,eAAO,MAAM,qCAAqC,GAAI,YAAY,iBAAiB,EAAE,OAAO,YAAY,KAAG,SAU1G,CAAC;AAEF,eAAO,MAAM,kCAAkC,GAAI,YAAY,iBAAiB,KAAG,SAOlF,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,WAAW,WAAW,EAAE,YAAY,iBAAiB,EAAE,OAAO,YAAY,KAAG,SAkBzH,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,cAAc,WAAW,EAAE,YAAY,YAAY,KAAG,SAYrG,CAAC"}
1
+ {"version":3,"file":"leave.d.ts","sourceRoot":"","sources":["../../../src/tab-bar-searchable/animations/leave.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACzD,OAAO,EAAqD,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzI,eAAO,MAAM,4BAA4B,GACvC,YAAY,iBAAiB,EAC7B,wBAAwB,YAAY,EACpC,eAAe,MAAM,KACpB,SAyBF,CAAC;AAEF,eAAO,MAAM,qCAAqC,GAAI,YAAY,iBAAiB,EAAE,OAAO,YAAY,KAAG,SAU1G,CAAC;AAEF,eAAO,MAAM,kCAAkC,GAAI,YAAY,iBAAiB,KAAG,SAOlF,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,WAAW,WAAW,EAAE,YAAY,iBAAiB,EAAE,OAAO,YAAY,KAAG,SAkBzH,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,cAAc,WAAW,EAAE,YAAY,YAAY,KAAG,SAYrG,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { createAnimation } from '@ionic/core';
2
+ import { ANIMATION_DELAY_CLOSE_BUTTONS, OPACITY_TRANSITION } from '@rdlabo/ionic-theme-utils';
2
3
  import { cloneElement } from '../../utils';
3
- import { ANIMATION_DELAY_CLOSE_BUTTONS, OPACITY_TRANSITION } from '../utils';
4
4
  export const createReverseEffectAnimation = (references, searchableElementSizes, colorSelected) => {
5
5
  const effectElement = cloneElement('ion-icon');
6
6
  const closeButtonRect = references.closeButtonIcon?.getBoundingClientRect();
@@ -1,4 +1,4 @@
1
- import { TabBarSearchableFunction } from './interfaces';
2
- export * from './interfaces';
1
+ import { type TabBarSearchableFunction } from '@rdlabo/ionic-theme-utils';
2
+ export { TabBarSearchableType, type TabBarSearchableFunction, type SearchableEventCache, type ElementSizes, type ElementReferences, } from '@rdlabo/ionic-theme-utils';
3
3
  export declare const attachTabBarSearchable: (ionTabBar: HTMLElement, ionFabButton: HTMLElement, ionFooter: HTMLElement) => TabBarSearchableFunction;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-bar-searchable/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAwB,wBAAwB,EAAwB,MAAM,cAAc,CAAC;AAgBpG,cAAc,cAAc,CAAC;AAqB7B,eAAO,MAAM,sBAAsB,GACjC,WAAW,WAAW,EACtB,cAAc,WAAW,EACzB,WAAW,WAAW,KACrB,wBAwDF,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-bar-searchable/index.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,KAAK,wBAAwB,EAE9B,MAAM,2BAA2B,CAAC;AAiBnC,OAAO,EACL,oBAAoB,EACpB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,iBAAiB,GACvB,MAAM,2BAA2B,CAAC;AAqBnC,eAAO,MAAM,sBAAsB,GACjC,WAAW,WAAW,EACtB,cAAc,WAAW,EACzB,WAAW,WAAW,KACrB,wBAwDF,CAAC"}
@@ -1,10 +1,9 @@
1
1
  import { createAnimation } from '@ionic/core';
2
+ import { ANIMATION_DELAY_BASE, ANIMATION_DURATION, ANIMATION_EASING, getElementReferences, getElementSizes, throwErrorByFailedClickElement, TabBarSearchableType, } from '@rdlabo/ionic-theme-utils';
2
3
  import { isNativeUIShell, registerNativeSearch, requestNativeSearch, suspendNativeUIShell } from '../native-integration';
3
- import { ANIMATION_DELAY_BASE, ANIMATION_DURATION, ANIMATION_EASING, getElementReferences, getElementSizes, throwErrorByFailedClickElement, } from './utils';
4
- import { TabBarSearchableType } from './interfaces';
5
4
  import { createCloseButtonsAnimation, createEffectAnimation, createFabButtonAnimation, createSearchContainerAnimation, createTabBarAnimation, } from './animations/enter';
6
5
  import { createReverseCloseButtonsAnimation, createReverseEffectAnimation, createReverseFabButtonAnimation, createReverseSearchContainerAnimation, createReverseTabBarAnimation, } from './animations/leave';
7
- export * from './interfaces';
6
+ export { TabBarSearchableType, } from '@rdlabo/ionic-theme-utils';
8
7
  export const attachTabBarSearchable = (ionTabBar, ionFabButton, ionFooter) => {
9
8
  if (!ionTabBar || !ionFabButton || !ionFooter) {
10
9
  throw new Error('TabBarSearchable should be defined with props');
@@ -1,5 +1,6 @@
1
+ import { shadow } from '@rdlabo/ionic-theme-utils';
1
2
  import type { Animation } from '@ionic/core';
2
3
  import type { TransitionOptions } from './index';
3
- export declare const shadow: <T extends Element>(el: T) => ShadowRoot | T;
4
+ export { shadow };
4
5
  export declare const iosTransitionAnimation: (navEl: HTMLElement, opts: TransitionOptions) => Animation;
5
6
  //# sourceMappingURL=ios.transition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ios.transition.d.ts","sourceRoot":"","sources":["../../src/transition/ios.transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAUjD,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,KAAG,UAAU,GAAG,CAE9D,CAAC;AAyGF,eAAO,MAAM,sBAAsB,GAAI,OAAO,WAAW,EAAE,MAAM,iBAAiB,KAAG,SA4WpF,CAAC"}
1
+ {"version":3,"file":"ios.transition.d.ts","sourceRoot":"","sources":["../../src/transition/ios.transition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAIjD,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,eAAO,MAAM,sBAAsB,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,iBAAiB,KAAK,SAKlF,CAAC"}
@@ -1,389 +1,9 @@
1
- import { createAnimation } from '@ionic/core';
1
+ import { createIosTransitionAnimation, shadow } from '@rdlabo/ionic-theme-utils';
2
2
  import { getIonPageElement } from './index';
3
3
  import { connectNativeUIShellTransition } from '../native-integration';
4
- const DURATION = 540;
5
- const getClonedElement = (tagName) => {
6
- return document.querySelector(`${tagName}.ion-cloned-element`);
7
- };
8
- export const shadow = (el) => {
9
- return el.shadowRoot || el;
10
- };
11
- const animateFixedBackButton = (root, navEl, page, entering, interactive, otherPage) => {
12
- const button = page.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled) ion-back-button:not(.ios-theme-disabled, .ios26-disabled)');
13
- if (!button || button.offsetWidth === 0) {
14
- return;
15
- }
16
- const otherButton = otherPage?.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled) ion-back-button:not(.ios-theme-disabled, .ios26-disabled)');
17
- const persistent = !!otherButton && otherButton.offsetWidth > 0;
18
- const buttons = [button, ...(persistent ? [otherButton] : [])].map((element) => ({
19
- element,
20
- visibility: element.style.visibility,
21
- }));
22
- const rect = button.getBoundingClientRect();
23
- const width = button.offsetWidth;
24
- const height = button.offsetHeight;
25
- const clone = getClonedElement('ion-back-button');
26
- if (!clone) {
27
- return;
28
- }
29
- const cloneParent = clone.parentNode;
30
- const cloneNextSibling = clone.nextSibling;
31
- const cloneStyle = clone.getAttribute('style');
32
- clone.icon = button.icon;
33
- clone.text = button.text;
34
- clone.mode = button.mode;
35
- clone.color = button.color;
36
- clone.disabled = button.disabled;
37
- const icon = shadow(clone).querySelector('ion-icon');
38
- const animation = createAnimation().addElement(clone);
39
- const fadeStart = !entering && interactive ? 0.8 : 0.4;
40
- const fadeEnd = entering ? 0.96 : interactive ? 1 : 0.95;
41
- if (persistent) {
42
- animation.fromTo('transform', 'scale(1)', 'scale(1)').fromTo('opacity', 1, 1);
43
- }
44
- else if (entering) {
45
- animation.keyframes([
46
- { offset: 0, transform: 'scale(1.2)', opacity: 0 },
47
- { offset: fadeStart, transform: 'scale(1.2)', opacity: 0 },
48
- { offset: 0.65, transform: 'scale(1.12)', opacity: 0.15 },
49
- { offset: 0.9, transform: 'scale(1.02)', opacity: 0.75 },
50
- { offset: fadeEnd, transform: 'scale(1)', opacity: 1 },
51
- { offset: 1, transform: 'scale(1)', opacity: 1 },
52
- ]);
53
- }
54
- else {
55
- animation.keyframes([
56
- { offset: 0, transform: 'scale(1)', opacity: 1 },
57
- { offset: fadeStart, transform: 'scale(1)', opacity: 1 },
58
- { offset: fadeEnd, transform: 'scale(1.2)', opacity: 0 },
59
- { offset: 1, transform: 'scale(1.2)', opacity: 0 },
60
- ]);
61
- }
62
- if (icon && !persistent) {
63
- const from = entering ? 'blur(4px)' : 'blur(0px)';
64
- const to = entering ? 'blur(0px)' : 'blur(4px)';
65
- animation.addAnimation(createAnimation()
66
- .addElement(icon)
67
- .keyframes([
68
- { offset: 0, filter: from },
69
- { offset: fadeStart, filter: from },
70
- { offset: fadeEnd, filter: to },
71
- { offset: 1, filter: to },
72
- ]));
73
- }
74
- root.beforeAddWrite(() => {
75
- Object.assign(clone.style, {
76
- position: 'fixed',
77
- left: `${rect.left + (rect.width - width) / 2}px`,
78
- top: `${rect.top + (rect.height - height) / 2}px`,
79
- width: `${width}px`,
80
- height: `${height}px`,
81
- margin: '0',
82
- pointerEvents: 'none',
83
- visibility: 'visible',
84
- display: getComputedStyle(button).display,
85
- zIndex: '1000',
86
- });
87
- navEl.appendChild(clone);
88
- buttons.forEach(({ element }) => (element.style.visibility = 'hidden'));
89
- });
90
- root.afterAddWrite(() => {
91
- buttons.forEach(({ element, visibility }) => (element.style.visibility = visibility));
92
- cloneParent.insertBefore(clone, cloneNextSibling);
93
- if (cloneStyle === null) {
94
- clone.removeAttribute('style');
95
- }
96
- else {
97
- clone.setAttribute('style', cloneStyle);
98
- }
99
- });
100
- root.addAnimation(animation);
101
- };
102
- export const iosTransitionAnimation = (navEl, opts) => {
103
- try {
104
- const EASING = 'cubic-bezier(0.32,0.72,0,1)';
105
- const OPACITY = 'opacity';
106
- const TRANSFORM = 'transform';
107
- const CENTER = '0%';
108
- const OFF_OPACITY = 0.8;
109
- const isRTL = navEl.ownerDocument.dir === 'rtl';
110
- const OFF_RIGHT = isRTL ? '-99.5%' : '99.5%';
111
- const OFF_LEFT = isRTL ? '33%' : '-33%';
112
- const enteringEl = opts.enteringEl;
113
- const leavingEl = opts.leavingEl;
114
- const backDirection = opts.direction === 'back';
115
- const contentEl = enteringEl.querySelector(':scope > ion-content');
116
- const headerEls = enteringEl.querySelectorAll(':scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *');
117
- const enteringToolBarEls = enteringEl.querySelectorAll(':scope > ion-header > ion-toolbar');
118
- const rootAnimation = createAnimation();
119
- const enteringContentAnimation = createAnimation();
120
- rootAnimation
121
- .addElement(enteringEl)
122
- .duration((opts.duration ?? 0) || DURATION)
123
- .easing(opts.easing || EASING)
124
- .fill('both')
125
- .beforeRemoveClass('ion-page-invisible');
126
- const topPage = backDirection ? leavingEl : enteringEl;
127
- if (topPage?.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
128
- const shadow = topPage.style.boxShadow;
129
- rootAnimation.beforeAddWrite(() => {
130
- topPage.style.boxShadow = `${isRTL ? 4 : -4}px 0 24px rgba(0, 0, 0, 0.04)`;
131
- });
132
- rootAnimation.afterAddWrite(() => {
133
- topPage.style.boxShadow = shadow;
134
- });
135
- }
136
- if (leavingEl && navEl !== null && navEl !== undefined) {
137
- const navDecorAnimation = createAnimation();
138
- navDecorAnimation.addElement(navEl);
139
- rootAnimation.addAnimation(navDecorAnimation);
140
- }
141
- if (enteringEl.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
142
- enteringContentAnimation.addElement(enteringEl);
143
- }
144
- else if (!contentEl && enteringToolBarEls.length === 0 && headerEls.length === 0) {
145
- enteringContentAnimation.addElement(enteringEl.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs'));
146
- }
147
- else {
148
- enteringContentAnimation.addElement(contentEl);
149
- enteringContentAnimation.addElement(headerEls);
150
- }
151
- rootAnimation.addAnimation(enteringContentAnimation);
152
- if (backDirection) {
153
- enteringContentAnimation
154
- .beforeClearStyles([OPACITY])
155
- .fromTo('transform', `translateX(${OFF_LEFT})`, `translateX(${CENTER})`)
156
- .fromTo(OPACITY, OFF_OPACITY, 1);
157
- }
158
- else {
159
- enteringContentAnimation.beforeClearStyles([OPACITY]).fromTo('transform', `translateX(${OFF_RIGHT})`, `translateX(${CENTER})`);
160
- }
161
- if (contentEl && !enteringEl.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
162
- const enteringTransitionEffectEl = shadow(contentEl).querySelector('.transition-effect');
163
- if (enteringTransitionEffectEl) {
164
- const enteringTransitionCoverEl = enteringTransitionEffectEl.querySelector('.transition-cover');
165
- const enteringTransitionShadowEl = enteringTransitionEffectEl.querySelector('.transition-shadow');
166
- const enteringTransitionEffect = createAnimation();
167
- const enteringTransitionCover = createAnimation();
168
- const enteringTransitionShadow = createAnimation();
169
- enteringTransitionEffect
170
- .addElement(enteringTransitionEffectEl)
171
- .beforeStyles({ opacity: '1', display: 'block' })
172
- .afterStyles({ opacity: '', display: '' });
173
- enteringTransitionCover
174
- .addElement(enteringTransitionCoverEl)
175
- .beforeClearStyles([OPACITY])
176
- .fromTo(OPACITY, 0, 0.1);
177
- enteringTransitionShadow
178
- .addElement(enteringTransitionShadowEl)
179
- .beforeClearStyles([OPACITY])
180
- .fromTo(OPACITY, 0.03, 0.7);
181
- enteringTransitionEffect.addAnimation([enteringTransitionCover, enteringTransitionShadow]);
182
- enteringContentAnimation.addAnimation([enteringTransitionEffect]);
183
- }
184
- }
185
- if (topPage) {
186
- animateFixedBackButton(rootAnimation, navEl, topPage, !backDirection, opts.progressCallback !== undefined, backDirection ? enteringEl : leavingEl);
187
- }
188
- const enteringContentHasLargeTitle = enteringEl.querySelector('ion-header.header-collapse-condense');
189
- enteringToolBarEls.forEach((enteringToolBarEl) => {
190
- if (enteringToolBarEl.closest('ion-header')?.matches('.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
191
- return;
192
- }
193
- const enteringToolBar = createAnimation();
194
- enteringToolBar.addElement(enteringToolBarEl);
195
- rootAnimation.addAnimation(enteringToolBar);
196
- const enteringTitle = createAnimation();
197
- enteringTitle.addElement(enteringToolBarEl.querySelector('ion-title'));
198
- const enteringToolBarButtons = createAnimation();
199
- const buttons = Array.from(enteringToolBarEl.querySelectorAll('ion-buttons,[menuToggle]'));
200
- const parentHeader = enteringToolBarEl.closest('ion-header');
201
- const inactiveHeader = parentHeader?.classList.contains('header-collapse-condense-inactive');
202
- let buttonsToAnimate;
203
- if (backDirection) {
204
- buttonsToAnimate = buttons.filter((button) => {
205
- const isCollapseButton = button.classList.contains('buttons-collapse');
206
- return (isCollapseButton && !inactiveHeader) || !isCollapseButton;
207
- });
208
- }
209
- else {
210
- buttonsToAnimate = buttons.filter((button) => !button.classList.contains('buttons-collapse'));
211
- }
212
- enteringToolBarButtons.addElement(buttonsToAnimate);
213
- const enteringToolBarItems = createAnimation();
214
- enteringToolBarItems.addElement(enteringToolBarEl.querySelectorAll(':scope > *:not(ion-title):not(ion-buttons):not([menuToggle])'));
215
- const enteringToolBarBg = createAnimation();
216
- enteringToolBarBg.addElement(shadow(enteringToolBarEl).querySelector('.toolbar-background'));
217
- const enteringBackButton = createAnimation();
218
- const backButtonEl = enteringToolBarEl.querySelector('ion-back-button');
219
- if (backButtonEl) {
220
- enteringBackButton.addElement(backButtonEl);
221
- }
222
- enteringToolBar.addAnimation([enteringTitle, enteringToolBarButtons, enteringToolBarItems, enteringToolBarBg, enteringBackButton]);
223
- enteringToolBarButtons.fromTo(OPACITY, 0.01, 1);
224
- enteringToolBarItems.fromTo(OPACITY, 0.01, 1);
225
- if (backDirection) {
226
- if (!inactiveHeader) {
227
- enteringTitle.fromTo('transform', `translateX(${OFF_LEFT})`, `translateX(${CENTER})`).fromTo(OPACITY, 0.01, 1);
228
- }
229
- enteringToolBarItems.fromTo('transform', `translateX(${OFF_LEFT})`, `translateX(${CENTER})`);
230
- enteringBackButton.fromTo(OPACITY, 0.01, 1);
231
- }
232
- else {
233
- if (!enteringContentHasLargeTitle) {
234
- enteringTitle.fromTo('transform', `translateX(${OFF_RIGHT})`, `translateX(${CENTER})`).fromTo(OPACITY, 0.01, 1);
235
- }
236
- enteringToolBarItems.fromTo('transform', `translateX(${OFF_RIGHT})`, `translateX(${CENTER})`);
237
- enteringToolBarBg.beforeClearStyles([OPACITY, 'transform']);
238
- const translucentHeader = parentHeader?.translucent;
239
- if (!translucentHeader) {
240
- enteringToolBarBg.fromTo(OPACITY, 0.01, 'var(--opacity)');
241
- }
242
- else {
243
- enteringToolBarBg.fromTo('transform', isRTL ? 'translateX(-100%)' : 'translateX(100%)', 'translateX(0px)');
244
- }
245
- enteringBackButton.fromTo(OPACITY, 0.01, 1);
246
- if (backButtonEl) {
247
- const enteringBackBtnText = createAnimation();
248
- enteringBackBtnText
249
- .addElement(shadow(backButtonEl).querySelector('.button-text'))
250
- .fromTo(`transform`, isRTL ? 'translateX(-100px)' : 'translateX(100px)', 'translateX(0px)');
251
- enteringToolBar.addAnimation(enteringBackBtnText);
252
- }
253
- }
254
- });
255
- if (leavingEl) {
256
- const leavingContent = createAnimation();
257
- const leavingContentEl = leavingEl.querySelector(':scope > ion-content');
258
- const leavingToolBarEls = leavingEl.querySelectorAll(':scope > ion-header > ion-toolbar');
259
- const leavingHeaderEls = leavingEl.querySelectorAll(':scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *');
260
- if (leavingEl.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
261
- leavingContent.addElement(leavingEl);
262
- }
263
- else if (!leavingContentEl && leavingToolBarEls.length === 0 && leavingHeaderEls.length === 0) {
264
- leavingContent.addElement(leavingEl.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs'));
265
- }
266
- else {
267
- leavingContent.addElement(leavingContentEl);
268
- leavingContent.addElement(leavingHeaderEls);
269
- }
270
- rootAnimation.addAnimation(leavingContent);
271
- if (backDirection) {
272
- leavingContent
273
- .beforeClearStyles([OPACITY])
274
- .fromTo('transform', `translateX(${CENTER})`, isRTL ? 'translateX(-100%)' : 'translateX(100%)');
275
- const leavingPage = getIonPageElement(leavingEl);
276
- rootAnimation.afterAddWrite(() => {
277
- if (rootAnimation.getDirection() === 'normal') {
278
- leavingPage.style.setProperty('display', 'none');
279
- }
280
- });
281
- }
282
- else {
283
- leavingContent.fromTo('transform', `translateX(${CENTER})`, `translateX(${OFF_LEFT})`).fromTo(OPACITY, 1, OFF_OPACITY);
284
- }
285
- if (leavingContentEl &&
286
- !leavingEl.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
287
- const leavingTransitionEffectEl = shadow(leavingContentEl).querySelector('.transition-effect');
288
- if (leavingTransitionEffectEl) {
289
- const leavingTransitionCoverEl = leavingTransitionEffectEl.querySelector('.transition-cover');
290
- const leavingTransitionShadowEl = leavingTransitionEffectEl.querySelector('.transition-shadow');
291
- const leavingTransitionEffect = createAnimation();
292
- const leavingTransitionCover = createAnimation();
293
- const leavingTransitionShadow = createAnimation();
294
- leavingTransitionEffect
295
- .addElement(leavingTransitionEffectEl)
296
- .beforeStyles({ opacity: '1', display: 'block' })
297
- .afterStyles({ opacity: '', display: '' });
298
- leavingTransitionCover
299
- .addElement(leavingTransitionCoverEl)
300
- .beforeClearStyles([OPACITY])
301
- .fromTo(OPACITY, 0.1, 0);
302
- leavingTransitionShadow
303
- .addElement(leavingTransitionShadowEl)
304
- .beforeClearStyles([OPACITY])
305
- .fromTo(OPACITY, 0.7, 0.03);
306
- leavingTransitionEffect.addAnimation([leavingTransitionCover, leavingTransitionShadow]);
307
- leavingContent.addAnimation([leavingTransitionEffect]);
308
- }
309
- }
310
- leavingToolBarEls.forEach((leavingToolBarEl) => {
311
- if (leavingToolBarEl.closest('ion-header')?.matches('.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
312
- return;
313
- }
314
- const leavingToolBar = createAnimation();
315
- leavingToolBar.addElement(leavingToolBarEl);
316
- const leavingTitle = createAnimation();
317
- leavingTitle.addElement(leavingToolBarEl.querySelector('ion-title'));
318
- const leavingToolBarButtons = createAnimation();
319
- const buttons = leavingToolBarEl.querySelectorAll('ion-buttons,[menuToggle]');
320
- const parentHeader = leavingToolBarEl.closest('ion-header');
321
- const inactiveHeader = parentHeader?.classList.contains('header-collapse-condense-inactive');
322
- const buttonsToAnimate = Array.from(buttons).filter((button) => {
323
- const isCollapseButton = button.classList.contains('buttons-collapse');
324
- return (isCollapseButton && !inactiveHeader) || !isCollapseButton;
325
- });
326
- leavingToolBarButtons.addElement(buttonsToAnimate);
327
- const leavingToolBarItems = createAnimation();
328
- const leavingToolBarItemEls = leavingToolBarEl.querySelectorAll(':scope > *:not(ion-title):not(ion-buttons):not([menuToggle])');
329
- if (leavingToolBarItemEls.length > 0) {
330
- leavingToolBarItems.addElement(leavingToolBarItemEls);
331
- }
332
- const leavingToolBarBg = createAnimation();
333
- leavingToolBarBg.addElement(shadow(leavingToolBarEl).querySelector('.toolbar-background'));
334
- const leavingBackButton = createAnimation();
335
- const backButtonEl = leavingToolBarEl.querySelector('ion-back-button');
336
- if (backButtonEl) {
337
- leavingBackButton.addElement(backButtonEl);
338
- }
339
- leavingToolBar.addAnimation([leavingTitle, leavingToolBarButtons, leavingToolBarItems, leavingBackButton, leavingToolBarBg]);
340
- rootAnimation.addAnimation(leavingToolBar);
341
- leavingBackButton.fromTo(OPACITY, 0.99, 0);
342
- leavingToolBarButtons.fromTo(OPACITY, 0.99, 0);
343
- leavingToolBarItems.fromTo(OPACITY, 0.99, 0);
344
- if (backDirection) {
345
- if (!inactiveHeader) {
346
- leavingTitle
347
- .fromTo('transform', `translateX(${CENTER})`, isRTL ? 'translateX(-100%)' : 'translateX(100%)')
348
- .fromTo(OPACITY, 0.99, 0);
349
- }
350
- leavingToolBarItems.fromTo('transform', `translateX(${CENTER})`, isRTL ? 'translateX(-100%)' : 'translateX(100%)');
351
- leavingToolBarBg.beforeClearStyles([OPACITY, 'transform']);
352
- const translucentHeader = parentHeader?.translucent;
353
- if (!translucentHeader) {
354
- leavingToolBarBg.fromTo(OPACITY, 'var(--opacity)', 0);
355
- }
356
- else {
357
- leavingToolBarBg.fromTo('transform', 'translateX(0px)', isRTL ? 'translateX(-100%)' : 'translateX(100%)');
358
- }
359
- if (backButtonEl) {
360
- const leavingBackBtnText = createAnimation();
361
- leavingBackBtnText
362
- .addElement(shadow(backButtonEl).querySelector('.button-text'))
363
- .fromTo('transform', `translateX(${CENTER})`, `translateX(${(isRTL ? -124 : 124) + 'px'})`);
364
- leavingToolBar.addAnimation(leavingBackBtnText);
365
- }
366
- }
367
- else {
368
- if (!inactiveHeader) {
369
- leavingTitle
370
- .fromTo('transform', `translateX(${CENTER})`, `translateX(${OFF_LEFT})`)
371
- .fromTo(OPACITY, 0.99, 0)
372
- .afterClearStyles([TRANSFORM, OPACITY]);
373
- }
374
- leavingToolBarItems
375
- .fromTo('transform', `translateX(${CENTER})`, `translateX(${OFF_LEFT})`)
376
- .afterClearStyles([TRANSFORM, OPACITY]);
377
- leavingBackButton.afterClearStyles([OPACITY]);
378
- leavingTitle.afterClearStyles([OPACITY]);
379
- leavingToolBarButtons.afterClearStyles([OPACITY]);
380
- }
381
- });
382
- }
383
- connectNativeUIShellTransition(rootAnimation, enteringEl, leavingEl);
384
- return rootAnimation;
385
- }
386
- catch (err) {
387
- throw err;
388
- }
389
- };
4
+ export { shadow };
5
+ export const iosTransitionAnimation = createIosTransitionAnimation({
6
+ offLeftPercent: 30,
7
+ getIonPageElement,
8
+ connectNativeUIShellTransition,
9
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rdlabo/ionic-theme-ios27",
3
3
  "private": false,
4
- "version": "0.1.0-beta.pr166.shabba1151da4ea",
4
+ "version": "0.1.0-beta.pr172.sha0316ffe45969",
5
5
  "description": "iOS27 Theme for Ionic Framework",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "scripts": {
30
30
  "build": "npm run build:css && npm run build:ts",
31
- "build:css": "rm -rf dist/css && sass src/styles:dist/css --style=compressed --no-source-map",
31
+ "build:css": "rm -rf dist/css && sass src/styles:dist/css --style=compressed --no-source-map --pkg-importer=node",
32
32
  "build:ts": "tsc",
33
33
  "build:demo": "npm run build && cd demo && npm install && npm run build -- --configuration=production",
34
34
  "lint": "prettier --check \"./**/*.{scss,ts}\" && prettier --parser angular --check \"./**/*.html\"",
@@ -53,6 +53,9 @@
53
53
  "url": "https://github.com/rdlabo-dev/ionic-theme-ios27/issues"
54
54
  },
55
55
  "homepage": "https://docs.rdlabo.dev/projects/ionic-theme-ios27",
56
+ "dependencies": {
57
+ "@rdlabo/ionic-theme-utils": "git+ssh://git@github.com/rdlabo-dev/ionic-theme-utils.git#d27e4d9bc1bc53f932bcc653d420936553847f4c"
58
+ },
56
59
  "devDependencies": {
57
60
  "@capacitor/core": "^8.5.2",
58
61
  "@ionic/angular": "^9.0.0",
package/src/index.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import { registeredEffect } from './sheets-of-glass/interfaces';
2
2
  import { registerEffect } from './sheets-of-glass';
3
3
  export * from './sheets-of-glass/interfaces';
4
- export { iosEnterAnimation as popoverEnterAnimation } from './popover/animations/ios.enter';
5
- export { iosLeaveAnimation as popoverLeaveAnimation } from './popover/animations/ios.leave';
4
+ export {
5
+ iosPopoverEnterAnimation as popoverEnterAnimation,
6
+ iosPopoverLeaveAnimation as popoverLeaveAnimation,
7
+ } from '@rdlabo/ionic-theme-utils';
6
8
  export * from './tab-bar-searchable';
7
9
  export * from './searchbar';
8
10
  export * from './transition/ios.transition';
@@ -1,4 +1,4 @@
1
- @use '../utils/structured-list';
1
+ @use 'pkg:@rdlabo/ionic-theme-utils/styles/structured-list';
2
2
 
3
3
  ion-list.ios:not(.ios-theme-disabled, .ios26-disabled) {
4
4
  --ion-border-color: var(--ion-color-step-100, var(--ion-background-color-step-100, #e8e8e8));
@@ -11,7 +11,7 @@ ion-list.ios:not(.ios-theme-disabled, .ios26-disabled) {
11
11
  }
12
12
 
13
13
  ion-list.list-inset.ios:not(.ios-theme-disabled, .ios26-disabled) {
14
- @include structured-list.layout(20px, 28px);
14
+ @include structured-list.layout(20px, 28px, $variant: ios27);
15
15
 
16
16
  ion-radio-group,
17
17
  ion-reorder-group {
@@ -1,10 +1,10 @@
1
- @use 'utils/structured-list';
1
+ @use 'pkg:@rdlabo/ionic-theme-utils/styles/structured-list';
2
2
 
3
3
  ion-list.md {
4
4
  @include structured-list.support-text;
5
5
 
6
6
  &.list-inset {
7
- @include structured-list.layout(8px, 16px);
7
+ @include structured-list.layout(8px, 16px, $variant: ios27);
8
8
  :is(#{structured-list.$groups}) ion-item {
9
9
  & > ion-input[labelplacement='floating'] {
10
10
  transition: transform 200ms ease;
@@ -1,4 +1,4 @@
1
- @use '../structured-list';
1
+ @use 'pkg:@rdlabo/ionic-theme-utils/styles/structured-list';
2
2
 
3
3
  @mixin ion-list {
4
4
  ion-list.ios:not(.ios-theme-disabled, .ios26-disabled) {
@@ -1,7 +1,6 @@
1
- import { ElementReferences, ElementSizes } from '../interfaces';
2
1
  import { Animation, createAnimation } from '@ionic/core';
2
+ import { ANIMATION_DELAY_CLOSE_BUTTONS, OPACITY_TRANSITION, type ElementReferences, type ElementSizes } from '@rdlabo/ionic-theme-utils';
3
3
  import { cloneElement } from '../../utils';
4
- import { ANIMATION_DELAY_CLOSE_BUTTONS, OPACITY_TRANSITION } from '../utils';
5
4
 
6
5
  export const createEffectAnimation = (references: ElementReferences, sizes: ElementSizes): Animation => {
7
6
  const effectElement = cloneElement('ion-icon');
@@ -1,7 +1,6 @@
1
- import { ElementReferences, ElementSizes } from '../interfaces';
2
1
  import { Animation, createAnimation } from '@ionic/core';
2
+ import { ANIMATION_DELAY_CLOSE_BUTTONS, OPACITY_TRANSITION, type ElementReferences, type ElementSizes } from '@rdlabo/ionic-theme-utils';
3
3
  import { cloneElement } from '../../utils';
4
- import { ANIMATION_DELAY_CLOSE_BUTTONS, OPACITY_TRANSITION } from '../utils';
5
4
 
6
5
  export const createReverseEffectAnimation = (
7
6
  references: ElementReferences,