@rdlabo/ionic-theme-ios27 0.1.0-beta.pr171.sha1f9944f21de7 → 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 -427
  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 -527
  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,SA8ZpF,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,429 +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
- const translucentTop = topPage?.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled)');
128
- if (topPage && translucentTop) {
129
- const shade = navEl.ownerDocument.createElement('div');
130
- shade.className = 'ios27-transition-shade';
131
- shade.setAttribute('aria-hidden', 'true');
132
- const edge = navEl.ownerDocument.createElement('div');
133
- edge.setAttribute('aria-hidden', 'true');
134
- const clipPath = topPage.style.clipPath;
135
- const [corner, control] = topPage.offsetWidth >= 768 ? [36, 13] : [78, 22];
136
- Object.assign(shade.style, {
137
- position: 'absolute',
138
- inset: '0',
139
- zIndex: topPage.style.zIndex,
140
- pointerEvents: 'none',
141
- background: 'rgba(0, 0, 0, 0.1)',
142
- });
143
- Object.assign(edge.style, {
144
- position: 'absolute',
145
- top: '0',
146
- bottom: '0',
147
- [isRTL ? 'right' : 'left']: '-100%',
148
- width: '100%',
149
- zIndex: topPage.style.zIndex,
150
- pointerEvents: 'none',
151
- background: `linear-gradient(to ${isRTL ? 'right' : 'left'}, rgba(0, 0, 0, 0.02), transparent 18px)`,
152
- });
153
- rootAnimation.beforeAddWrite(() => {
154
- topPage.before(shade, edge);
155
- topPage.style.clipPath = `inset(0 round ${corner * 0.82}px)`;
156
- topPage.style.clipPath = `shape(from 0px ${corner}px,
157
- curve to ${corner}px 0px with 0px ${control}px / ${control}px 0px, hline to calc(100% - ${corner}px),
158
- curve to 100% ${corner}px with calc(100% - ${control}px) 0px / 100% ${control}px, vline to calc(100% - ${corner}px),
159
- curve to calc(100% - ${corner}px) 100% with 100% calc(100% - ${control}px) / calc(100% - ${control}px) 100%, hline to ${corner}px,
160
- curve to 0px calc(100% - ${corner}px) with ${control}px 100% / 0px calc(100% - ${control}px), close)`;
161
- });
162
- rootAnimation.afterAddWrite(() => {
163
- shade.remove();
164
- edge.remove();
165
- topPage.style.clipPath = clipPath;
166
- });
167
- rootAnimation.addAnimation(createAnimation()
168
- .addElement(shade)
169
- .fromTo(OPACITY, backDirection ? 1 : 0, backDirection ? 0 : 1));
170
- rootAnimation.addAnimation(createAnimation()
171
- .addElement(edge)
172
- .fromTo(TRANSFORM, `translateX(${backDirection ? CENTER : OFF_RIGHT})`, `translateX(${backDirection ? (isRTL ? '-100%' : '100%') : CENTER})`));
173
- }
174
- if (leavingEl && navEl !== null && navEl !== undefined) {
175
- const navDecorAnimation = createAnimation();
176
- navDecorAnimation.addElement(navEl);
177
- rootAnimation.addAnimation(navDecorAnimation);
178
- }
179
- if (enteringEl.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
180
- enteringContentAnimation.addElement(enteringEl);
181
- }
182
- else if (!contentEl && enteringToolBarEls.length === 0 && headerEls.length === 0) {
183
- enteringContentAnimation.addElement(enteringEl.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs'));
184
- }
185
- else {
186
- enteringContentAnimation.addElement(contentEl);
187
- enteringContentAnimation.addElement(headerEls);
188
- }
189
- rootAnimation.addAnimation(enteringContentAnimation);
190
- if (backDirection) {
191
- enteringContentAnimation
192
- .beforeClearStyles([OPACITY])
193
- .fromTo('transform', `translateX(${OFF_LEFT})`, `translateX(${CENTER})`)
194
- .fromTo(OPACITY, translucentTop ? 1 : OFF_OPACITY, 1);
195
- }
196
- else {
197
- enteringContentAnimation.beforeClearStyles([OPACITY]).fromTo('transform', `translateX(${OFF_RIGHT})`, `translateX(${CENTER})`);
198
- }
199
- if (contentEl && !enteringEl.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
200
- const enteringTransitionEffectEl = shadow(contentEl).querySelector('.transition-effect');
201
- if (enteringTransitionEffectEl) {
202
- const enteringTransitionCoverEl = enteringTransitionEffectEl.querySelector('.transition-cover');
203
- const enteringTransitionShadowEl = enteringTransitionEffectEl.querySelector('.transition-shadow');
204
- const enteringTransitionEffect = createAnimation();
205
- const enteringTransitionCover = createAnimation();
206
- const enteringTransitionShadow = createAnimation();
207
- enteringTransitionEffect
208
- .addElement(enteringTransitionEffectEl)
209
- .beforeStyles({ opacity: '1', display: 'block' })
210
- .afterStyles({ opacity: '', display: '' });
211
- enteringTransitionCover
212
- .addElement(enteringTransitionCoverEl)
213
- .beforeClearStyles([OPACITY])
214
- .fromTo(OPACITY, 0, 0.1);
215
- enteringTransitionShadow
216
- .addElement(enteringTransitionShadowEl)
217
- .beforeClearStyles([OPACITY])
218
- .fromTo(OPACITY, 0.03, 0.7);
219
- enteringTransitionEffect.addAnimation([enteringTransitionCover, enteringTransitionShadow]);
220
- enteringContentAnimation.addAnimation([enteringTransitionEffect]);
221
- }
222
- }
223
- if (topPage) {
224
- animateFixedBackButton(rootAnimation, navEl, topPage, !backDirection, opts.progressCallback !== undefined, backDirection ? enteringEl : leavingEl);
225
- }
226
- const enteringContentHasLargeTitle = enteringEl.querySelector('ion-header.header-collapse-condense');
227
- enteringToolBarEls.forEach((enteringToolBarEl) => {
228
- if (enteringToolBarEl.closest('ion-header')?.matches('.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
229
- return;
230
- }
231
- const enteringToolBar = createAnimation();
232
- enteringToolBar.addElement(enteringToolBarEl);
233
- rootAnimation.addAnimation(enteringToolBar);
234
- const enteringTitle = createAnimation();
235
- enteringTitle.addElement(enteringToolBarEl.querySelector('ion-title'));
236
- const enteringToolBarButtons = createAnimation();
237
- const buttons = Array.from(enteringToolBarEl.querySelectorAll('ion-buttons,[menuToggle]'));
238
- const parentHeader = enteringToolBarEl.closest('ion-header');
239
- const inactiveHeader = parentHeader?.classList.contains('header-collapse-condense-inactive');
240
- let buttonsToAnimate;
241
- if (backDirection) {
242
- buttonsToAnimate = buttons.filter((button) => {
243
- const isCollapseButton = button.classList.contains('buttons-collapse');
244
- return (isCollapseButton && !inactiveHeader) || !isCollapseButton;
245
- });
246
- }
247
- else {
248
- buttonsToAnimate = buttons.filter((button) => !button.classList.contains('buttons-collapse'));
249
- }
250
- enteringToolBarButtons.addElement(buttonsToAnimate);
251
- const enteringToolBarItems = createAnimation();
252
- enteringToolBarItems.addElement(enteringToolBarEl.querySelectorAll(':scope > *:not(ion-title):not(ion-buttons):not([menuToggle])'));
253
- const enteringToolBarBg = createAnimation();
254
- enteringToolBarBg.addElement(shadow(enteringToolBarEl).querySelector('.toolbar-background'));
255
- const enteringBackButton = createAnimation();
256
- const backButtonEl = enteringToolBarEl.querySelector('ion-back-button');
257
- if (backButtonEl) {
258
- enteringBackButton.addElement(backButtonEl);
259
- }
260
- enteringToolBar.addAnimation([enteringTitle, enteringToolBarButtons, enteringToolBarItems, enteringToolBarBg, enteringBackButton]);
261
- enteringToolBarButtons.fromTo(OPACITY, 0.01, 1);
262
- enteringToolBarItems.fromTo(OPACITY, 0.01, 1);
263
- if (backDirection) {
264
- if (!inactiveHeader) {
265
- enteringTitle.fromTo('transform', `translateX(${OFF_LEFT})`, `translateX(${CENTER})`).fromTo(OPACITY, 0.01, 1);
266
- }
267
- enteringToolBarItems.fromTo('transform', `translateX(${OFF_LEFT})`, `translateX(${CENTER})`);
268
- enteringBackButton.fromTo(OPACITY, 0.01, 1);
269
- }
270
- else {
271
- if (!enteringContentHasLargeTitle) {
272
- enteringTitle.fromTo('transform', `translateX(${OFF_RIGHT})`, `translateX(${CENTER})`).fromTo(OPACITY, 0.01, 1);
273
- }
274
- enteringToolBarItems.fromTo('transform', `translateX(${OFF_RIGHT})`, `translateX(${CENTER})`);
275
- enteringToolBarBg.beforeClearStyles([OPACITY, 'transform']);
276
- const translucentHeader = parentHeader?.translucent;
277
- if (!translucentHeader) {
278
- enteringToolBarBg.fromTo(OPACITY, 0.01, 'var(--opacity)');
279
- }
280
- else {
281
- enteringToolBarBg.fromTo('transform', isRTL ? 'translateX(-100%)' : 'translateX(100%)', 'translateX(0px)');
282
- }
283
- enteringBackButton.fromTo(OPACITY, 0.01, 1);
284
- if (backButtonEl) {
285
- const enteringBackBtnText = createAnimation();
286
- enteringBackBtnText
287
- .addElement(shadow(backButtonEl).querySelector('.button-text'))
288
- .fromTo(`transform`, isRTL ? 'translateX(-100px)' : 'translateX(100px)', 'translateX(0px)');
289
- enteringToolBar.addAnimation(enteringBackBtnText);
290
- }
291
- }
292
- });
293
- if (leavingEl) {
294
- const leavingContent = createAnimation();
295
- const leavingContentEl = leavingEl.querySelector(':scope > ion-content');
296
- const leavingToolBarEls = leavingEl.querySelectorAll(':scope > ion-header > ion-toolbar');
297
- const leavingHeaderEls = leavingEl.querySelectorAll(':scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *');
298
- if (leavingEl.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
299
- leavingContent.addElement(leavingEl);
300
- }
301
- else if (!leavingContentEl && leavingToolBarEls.length === 0 && leavingHeaderEls.length === 0) {
302
- leavingContent.addElement(leavingEl.querySelector(':scope > .ion-page, :scope > ion-nav, :scope > ion-tabs'));
303
- }
304
- else {
305
- leavingContent.addElement(leavingContentEl);
306
- leavingContent.addElement(leavingHeaderEls);
307
- }
308
- rootAnimation.addAnimation(leavingContent);
309
- if (backDirection) {
310
- leavingContent
311
- .beforeClearStyles([OPACITY])
312
- .fromTo('transform', `translateX(${CENTER})`, isRTL ? 'translateX(-100%)' : 'translateX(100%)');
313
- const leavingPage = getIonPageElement(leavingEl);
314
- rootAnimation.afterAddWrite(() => {
315
- if (rootAnimation.getDirection() === 'normal') {
316
- leavingPage.style.setProperty('display', 'none');
317
- }
318
- });
319
- }
320
- else {
321
- leavingContent
322
- .fromTo('transform', `translateX(${CENTER})`, `translateX(${OFF_LEFT})`)
323
- .fromTo(OPACITY, 1, translucentTop ? 1 : OFF_OPACITY);
324
- }
325
- if (leavingContentEl &&
326
- !leavingEl.querySelector(':scope > ion-header.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
327
- const leavingTransitionEffectEl = shadow(leavingContentEl).querySelector('.transition-effect');
328
- if (leavingTransitionEffectEl) {
329
- const leavingTransitionCoverEl = leavingTransitionEffectEl.querySelector('.transition-cover');
330
- const leavingTransitionShadowEl = leavingTransitionEffectEl.querySelector('.transition-shadow');
331
- const leavingTransitionEffect = createAnimation();
332
- const leavingTransitionCover = createAnimation();
333
- const leavingTransitionShadow = createAnimation();
334
- leavingTransitionEffect
335
- .addElement(leavingTransitionEffectEl)
336
- .beforeStyles({ opacity: '1', display: 'block' })
337
- .afterStyles({ opacity: '', display: '' });
338
- leavingTransitionCover
339
- .addElement(leavingTransitionCoverEl)
340
- .beforeClearStyles([OPACITY])
341
- .fromTo(OPACITY, 0.1, 0);
342
- leavingTransitionShadow
343
- .addElement(leavingTransitionShadowEl)
344
- .beforeClearStyles([OPACITY])
345
- .fromTo(OPACITY, 0.7, 0.03);
346
- leavingTransitionEffect.addAnimation([leavingTransitionCover, leavingTransitionShadow]);
347
- leavingContent.addAnimation([leavingTransitionEffect]);
348
- }
349
- }
350
- leavingToolBarEls.forEach((leavingToolBarEl) => {
351
- if (leavingToolBarEl.closest('ion-header')?.matches('.header-translucent:not(.ios-theme-disabled, .ios26-disabled)')) {
352
- return;
353
- }
354
- const leavingToolBar = createAnimation();
355
- leavingToolBar.addElement(leavingToolBarEl);
356
- const leavingTitle = createAnimation();
357
- leavingTitle.addElement(leavingToolBarEl.querySelector('ion-title'));
358
- const leavingToolBarButtons = createAnimation();
359
- const buttons = leavingToolBarEl.querySelectorAll('ion-buttons,[menuToggle]');
360
- const parentHeader = leavingToolBarEl.closest('ion-header');
361
- const inactiveHeader = parentHeader?.classList.contains('header-collapse-condense-inactive');
362
- const buttonsToAnimate = Array.from(buttons).filter((button) => {
363
- const isCollapseButton = button.classList.contains('buttons-collapse');
364
- return (isCollapseButton && !inactiveHeader) || !isCollapseButton;
365
- });
366
- leavingToolBarButtons.addElement(buttonsToAnimate);
367
- const leavingToolBarItems = createAnimation();
368
- const leavingToolBarItemEls = leavingToolBarEl.querySelectorAll(':scope > *:not(ion-title):not(ion-buttons):not([menuToggle])');
369
- if (leavingToolBarItemEls.length > 0) {
370
- leavingToolBarItems.addElement(leavingToolBarItemEls);
371
- }
372
- const leavingToolBarBg = createAnimation();
373
- leavingToolBarBg.addElement(shadow(leavingToolBarEl).querySelector('.toolbar-background'));
374
- const leavingBackButton = createAnimation();
375
- const backButtonEl = leavingToolBarEl.querySelector('ion-back-button');
376
- if (backButtonEl) {
377
- leavingBackButton.addElement(backButtonEl);
378
- }
379
- leavingToolBar.addAnimation([leavingTitle, leavingToolBarButtons, leavingToolBarItems, leavingBackButton, leavingToolBarBg]);
380
- rootAnimation.addAnimation(leavingToolBar);
381
- leavingBackButton.fromTo(OPACITY, 0.99, 0);
382
- leavingToolBarButtons.fromTo(OPACITY, 0.99, 0);
383
- leavingToolBarItems.fromTo(OPACITY, 0.99, 0);
384
- if (backDirection) {
385
- if (!inactiveHeader) {
386
- leavingTitle
387
- .fromTo('transform', `translateX(${CENTER})`, isRTL ? 'translateX(-100%)' : 'translateX(100%)')
388
- .fromTo(OPACITY, 0.99, 0);
389
- }
390
- leavingToolBarItems.fromTo('transform', `translateX(${CENTER})`, isRTL ? 'translateX(-100%)' : 'translateX(100%)');
391
- leavingToolBarBg.beforeClearStyles([OPACITY, 'transform']);
392
- const translucentHeader = parentHeader?.translucent;
393
- if (!translucentHeader) {
394
- leavingToolBarBg.fromTo(OPACITY, 'var(--opacity)', 0);
395
- }
396
- else {
397
- leavingToolBarBg.fromTo('transform', 'translateX(0px)', isRTL ? 'translateX(-100%)' : 'translateX(100%)');
398
- }
399
- if (backButtonEl) {
400
- const leavingBackBtnText = createAnimation();
401
- leavingBackBtnText
402
- .addElement(shadow(backButtonEl).querySelector('.button-text'))
403
- .fromTo('transform', `translateX(${CENTER})`, `translateX(${(isRTL ? -124 : 124) + 'px'})`);
404
- leavingToolBar.addAnimation(leavingBackBtnText);
405
- }
406
- }
407
- else {
408
- if (!inactiveHeader) {
409
- leavingTitle
410
- .fromTo('transform', `translateX(${CENTER})`, `translateX(${OFF_LEFT})`)
411
- .fromTo(OPACITY, 0.99, 0)
412
- .afterClearStyles([TRANSFORM, OPACITY]);
413
- }
414
- leavingToolBarItems
415
- .fromTo('transform', `translateX(${CENTER})`, `translateX(${OFF_LEFT})`)
416
- .afterClearStyles([TRANSFORM, OPACITY]);
417
- leavingBackButton.afterClearStyles([OPACITY]);
418
- leavingTitle.afterClearStyles([OPACITY]);
419
- leavingToolBarButtons.afterClearStyles([OPACITY]);
420
- }
421
- });
422
- }
423
- connectNativeUIShellTransition(rootAnimation, enteringEl, leavingEl);
424
- return rootAnimation;
425
- }
426
- catch (err) {
427
- throw err;
428
- }
429
- };
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.pr171.sha1f9944f21de7",
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) {