@rdlabo/ionic-theme-ios27 0.1.0-beta.pr153.sha1c3caf4dc12b → 0.1.0

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 (95) hide show
  1. package/README.md +3 -3
  2. package/dist/css/components/ion-action-sheet.css +1 -1
  3. package/dist/css/components/ion-alert.css +1 -1
  4. package/dist/css/components/ion-button.css +1 -1
  5. package/dist/css/components/ion-card.css +1 -1
  6. package/dist/css/components/ion-fab.css +1 -1
  7. package/dist/css/components/ion-list.css +1 -1
  8. package/dist/css/components/ion-menu.css +1 -1
  9. package/dist/css/components/ion-modal.css +1 -1
  10. package/dist/css/components/ion-popover.css +1 -1
  11. package/dist/css/components/ion-range.css +1 -1
  12. package/dist/css/components/ion-segment.css +1 -1
  13. package/dist/css/components/ion-tabs.css +1 -1
  14. package/dist/css/components/ion-toast.css +1 -1
  15. package/dist/css/components/ion-toolbar.css +1 -1
  16. package/dist/css/default-variables.css +1 -1
  17. package/dist/css/ionic-theme-ios27-dark-always.css +1 -1
  18. package/dist/css/ionic-theme-ios27-dark-class.css +1 -1
  19. package/dist/css/ionic-theme-ios27-dark-system.css +1 -1
  20. package/dist/css/ionic-theme-ios27.css +1 -1
  21. package/dist/css/md-ion-list-inset.css +1 -1
  22. package/dist/css/utils/dark/ion-list.css +1 -0
  23. package/dist/css/utils/group-heading.css +1 -0
  24. package/dist/native/components/searchable-tabs.d.ts.map +1 -1
  25. package/dist/native/components/searchable-tabs.js +9 -1
  26. package/dist/native/definitions.d.ts +4 -0
  27. package/dist/native/definitions.d.ts.map +1 -1
  28. package/dist/native/runtime.d.ts.map +1 -1
  29. package/dist/native/runtime.js +51 -27
  30. package/dist/native/shared/candidate.d.ts.map +1 -1
  31. package/dist/native/shared/candidate.js +17 -0
  32. package/dist/native/shared/crossfade.d.ts +8 -0
  33. package/dist/native/shared/crossfade.d.ts.map +1 -0
  34. package/dist/native/shared/crossfade.js +46 -0
  35. package/dist/native/shared/dom.d.ts.map +1 -1
  36. package/dist/native/shared/dom.js +2 -1
  37. package/dist/popover/animations/ios.enter.d.ts.map +1 -1
  38. package/dist/popover/animations/ios.enter.js +105 -9
  39. package/dist/popover/animations/ios.leave.d.ts.map +1 -1
  40. package/dist/popover/animations/ios.leave.js +15 -1
  41. package/dist/popover/callout-surface.d.ts +2 -0
  42. package/dist/popover/callout-surface.d.ts.map +1 -0
  43. package/dist/popover/callout-surface.js +44 -0
  44. package/dist/sheets-of-glass/index.js +2 -1
  45. package/dist/transition/ios.transition.d.ts.map +1 -1
  46. package/dist/transition/ios.transition.js +0 -223
  47. package/docs/experimental-animation.md +3 -3
  48. package/docs/features.md +7 -2
  49. package/docs/native-ui-shell.md +14 -5
  50. package/docs/special-markup.md +17 -0
  51. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellButton.swift +7 -2
  52. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellSearchController.swift +10 -0
  53. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellSegment.swift +47 -15
  54. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellTabBar.swift +42 -7
  55. package/ios/Sources/IonicNativeUIShellPlugin/IonicNativeUIShellPlugin.swift +13 -6
  56. package/ios/Sources/IonicNativeUIShellPlugin/Shared/ShellCrossfade.swift +35 -0
  57. package/ios/Sources/IonicNativeUIShellPlugin/Shared/ShellSnapshot.swift +6 -1
  58. package/ios/Tests/IonicNativeUIShellPluginTests/ShellSnapshotTests.swift +59 -0
  59. package/package.json +1 -1
  60. package/src/native/components/searchable-tabs.ts +12 -1
  61. package/src/native/definitions.ts +4 -0
  62. package/src/native/runtime.ts +54 -31
  63. package/src/native/shared/candidate.ts +19 -0
  64. package/src/native/shared/crossfade.ts +49 -0
  65. package/src/native/shared/dom.ts +4 -1
  66. package/src/popover/animations/ios.enter.ts +123 -10
  67. package/src/popover/animations/ios.leave.ts +15 -1
  68. package/src/popover/callout-surface.ts +54 -0
  69. package/src/sheets-of-glass/index.ts +2 -2
  70. package/src/styles/components/ion-action-sheet.scss +35 -17
  71. package/src/styles/components/ion-alert.scss +51 -31
  72. package/src/styles/components/ion-button.scss +4 -7
  73. package/src/styles/components/ion-card.scss +64 -3
  74. package/src/styles/components/ion-fab.scss +3 -5
  75. package/src/styles/components/ion-list.scss +14 -1
  76. package/src/styles/components/ion-menu.scss +19 -7
  77. package/src/styles/components/ion-modal.scss +63 -14
  78. package/src/styles/components/ion-popover.scss +52 -9
  79. package/src/styles/components/ion-range.scss +49 -50
  80. package/src/styles/components/ion-segment.scss +15 -16
  81. package/src/styles/components/ion-tabs.scss +73 -13
  82. package/src/styles/components/ion-toast.scss +16 -25
  83. package/src/styles/components/ion-toolbar.scss +17 -1
  84. package/src/styles/default-variables.scss +4 -0
  85. package/src/styles/utils/_glass.scss +96 -0
  86. package/src/styles/utils/api.scss +46 -4
  87. package/src/styles/utils/dark/ion-button.scss +13 -0
  88. package/src/styles/utils/dark/ion-fab.scss +9 -0
  89. package/src/styles/utils/dark/ion-list.scss +7 -0
  90. package/src/styles/utils/dark/ion-segment.scss +8 -3
  91. package/src/styles/utils/dark/ion-tabs.scss +20 -0
  92. package/src/styles/utils/group-heading.scss +5 -0
  93. package/src/styles/utils/structured-list.scss +68 -15
  94. package/src/styles/utils/theme-dark.scss +23 -0
  95. package/src/transition/ios.transition.ts +0 -487
@@ -1 +1 @@
1
- ion-list.md ion-item:has(ion-input.input-fill-outline),ion-list.md ion-item:has(ion-textarea.textarea-fill-outline),ion-list.md ion-item:has(ion-select:is([helpertext]:not([helpertext=""]),[errortext]:not([errortext=""]))),ion-list.md ion-item:has(ion-input .input-bottom>:is(.helper-text:not(:empty),.error-text:not(:empty),.counter:not(:empty))),ion-list.md ion-item:has(ion-textarea .textarea-bottom>:is(.helper-text:not(:empty),.error-text:not(:empty),.counter:not(:empty))){--inner-border-width: 0;--inner-padding-bottom: 4px}ion-list.md ion-item ion-input .input-bottom:not(:has(>:is(.helper-text:not(:empty),.error-text:not(:empty),.counter:not(:empty)))),ion-list.md ion-item ion-textarea .textarea-bottom:not(:has(>:is(.helper-text:not(:empty),.error-text:not(:empty),.counter:not(:empty)))){display:none}ion-list.md.list-inset{background:rgba(0,0,0,0)}ion-list.md.list-inset ion-list-header{display:flex;align-items:center}ion-list.md.list-inset ion-list-header ion-label{font-size:.9rem;margin:8px 4px 4px}ion-list.md.list-inset ion-list-header ion-label:not(.ion-color){color:var(--ion-color-medium-tint)}ion-list.md.list-inset ion-list-header ion-button{margin-top:8px}ion-list.md.list-inset ion-list-header ion-note{font-size:.9rem;margin:8px 16px 4px 0}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label{width:100%;text-align:center;padding:32px 16px 16px;transform:translateX(5px)}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label ion-header.header-collapse-condense>ion-toolbar{--min-height: 0;visibility:hidden}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label ion-icon{font-size:2.8rem;border-radius:20%;padding:6px}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label ion-icon:not(.ion-color){color:#fff}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label h2{font-size:1.2rem;font-weight:bold;margin-top:8px}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label ion-text{font-size:.9rem}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group){display:block;border-radius:16px;overflow:hidden}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group):has(>.radio-group-top){display:flex;flex-direction:column;border-radius:0;overflow:visible}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group):has(>.radio-group-top)>.radio-group-top{order:1;font-size:.9rem;padding-block-start:8px}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group):has(>.radio-group-top)>ion-item:first-of-type{--border-radius: 16px 16px 0 0}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group):has(>.radio-group-top)>ion-item:last-of-type{--border-radius: 0 0 16px 16px}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group):not(:first-of-type){margin-top:16px}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item:has(>ion-label:not([slot])):has(>ion-note:not([slot]))::part(container){flex-direction:column;justify-content:center;padding-top:14px;padding-bottom:14px;min-height:64px}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item:has(>ion-label:not([slot])):has(>ion-note:not([slot]))>ion-label,ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item:has(>ion-label:not([slot])):has(>ion-note:not([slot]))>ion-note{width:auto;align-self:flex-start}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item:has(>ion-label:not([slot])):has(>ion-note:not([slot]))>ion-label{margin:0;font-weight:500;font-size:1.15rem;line-height:.9rem}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item:has(>ion-label:not([slot])):has(>ion-note:not([slot]))>ion-note{font-size:.85rem}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item ion-text[slot=end]{padding-left:8px}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item.item-disabled{--detail-icon-opacity: 0.1;opacity:1}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item.item-disabled>*{opacity:.4}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item ion-button[slot=end].ion-align-self-end{transform:translateY(-7px)}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item ion-button[slot=end] ion-icon[slot=icon-only]{font-size:1.2rem;transform:translateY(4px)}ion-list.md.list-inset>ion-note{--color: var(--ion-color-medium-tint);font-size:.9rem;display:block;margin:8px calc(var(--ion-safe-area-right, 0) + 8px) 8px calc(var(--ion-safe-area-left, 0) + 8px)}ion-list.md.list-inset :is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item>ion-input[labelplacement=floating]{transition:transform 200ms ease}ion-list.md.list-inset :is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item>ion-input[labelplacement=floating]:not(.label-floating){transform:translateY(-7px)}ion-list.md.list-inset :is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item>ion-input[labelplacement=floating].label-floating{transform:translateY(-4px)}
1
+ ion-list.md ion-item:has(ion-input.input-fill-outline),ion-list.md ion-item:has(ion-textarea.textarea-fill-outline),ion-list.md ion-item:has(ion-select:is([helpertext]:not([helpertext=""]),[errortext]:not([errortext=""]))),ion-list.md ion-item:has(ion-input .input-bottom>:is(.helper-text:not(:empty),.error-text:not(:empty),.counter:not(:empty))),ion-list.md ion-item:has(ion-textarea .textarea-bottom>:is(.helper-text:not(:empty),.error-text:not(:empty),.counter:not(:empty))){--inner-border-width: 0;--inner-padding-bottom: 4px}ion-list.md ion-item ion-input .input-bottom:not(:has(>:is(.helper-text:not(:empty),.error-text:not(:empty),.counter:not(:empty)))),ion-list.md ion-item ion-textarea .textarea-bottom:not(:has(>:is(.helper-text:not(:empty),.error-text:not(:empty),.counter:not(:empty)))){display:none}ion-list.md.list-inset{background:rgba(0,0,0,0)}ion-list.md.list-inset ion-list-header{display:flex;align-items:center}ion-list.md.list-inset ion-list-header ion-label{font-size:1rem;line-height:1.29rem;font-weight:600;margin:8px 4px 4px}ion-list.md.list-inset ion-list-header ion-label:not(.ion-color){color:var(--ion-color-medium-tint)}ion-list.md.list-inset ion-list-header ion-button{margin-top:8px}ion-list.md.list-inset ion-list-header ion-note{font-size:.76rem;line-height:1.06rem;font-weight:400;margin:8px 16px 4px 0}ion-list.md.list-inset ion-list-header ion-note:not(.ion-color){--color: var(--ion-color-medium-tint)}ion-list.md.list-inset ion-item-group.item-group-header{border-radius:16px}ion-list.md.list-inset ion-item-group.item-group-header>ion-item{--inner-padding-end: 0;--inner-border-width: 0}ion-list.md.list-inset ion-item-group.item-group-header>ion-item::part(native){padding-inline:0}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label{width:100%;margin:0;text-align:start;white-space:normal;padding:16px 20px}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label ion-header.header-collapse-condense>ion-toolbar{--min-height: 0;visibility:hidden}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label ion-icon{font-size:2.82rem;border-radius:20%;padding:6px;vertical-align:top}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label ion-icon:not(.ion-color){color:#fff}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label h2{font-size:1.29rem;font-weight:700;line-height:1.53rem;margin:20px 0 8px}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label ion-text{display:block;font-size:1rem;line-height:1.29rem}ion-list.md.list-inset ion-item-group.item-group-header>ion-item>ion-label ion-text:not(.ion-color){color:var(--ion-color-step-500, var(--ion-text-color-step-500, #808080))}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group){display:block;border-radius:16px;overflow:hidden}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group):has(>.radio-group-top){display:flex;flex-direction:column;border-radius:0;overflow:visible}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group):has(>.radio-group-top)>.radio-group-top{order:1;font-size:.9rem;padding-block-start:8px}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group):has(>.radio-group-top)>ion-item:first-of-type{--border-radius: 16px 16px 0 0}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group):has(>.radio-group-top)>ion-item:last-of-type{--border-radius: 0 0 16px 16px}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group):not(:first-of-type){margin-top:16px}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item:has(>ion-label:not([slot])):has(>ion-note:not([slot]))::part(container){flex-direction:column;justify-content:center;padding-top:14px;padding-bottom:14px;min-height:64px}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item:has(>ion-label:not([slot])):has(>ion-note:not([slot]))>ion-label,ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item:has(>ion-label:not([slot])):has(>ion-note:not([slot]))>ion-note{width:auto;align-self:flex-start}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item:has(>ion-label:not([slot])):has(>ion-note:not([slot]))>ion-label{margin:0;font-weight:500;font-size:1rem;line-height:1.29rem}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item:has(>ion-label:not([slot])):has(>ion-note:not([slot]))>ion-note{font-size:.88rem;line-height:1.18rem}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item ion-text[slot=end]{padding-left:8px}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item.item-disabled{--detail-icon-opacity: 0.1;opacity:1}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item.item-disabled>*{opacity:.4}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item ion-button[slot=end].ion-align-self-end{transform:translateY(-7px)}ion-list.md.list-inset>:is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item ion-button[slot=end] ion-icon[slot=icon-only]{font-size:1.2rem;transform:translateY(4px)}ion-list.md.list-inset>ion-note{font-size:.76rem;line-height:1.06rem;font-weight:400;display:block;margin:8px calc(var(--ion-safe-area-right, 0) + 8px) 8px calc(var(--ion-safe-area-left, 0) + 8px)}ion-list.md.list-inset>ion-note:not(.ion-color){--color: var(--ion-color-medium-tint)}ion-list.md.list-inset :is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item>ion-input[labelplacement=floating]{transition:transform 200ms ease}ion-list.md.list-inset :is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item>ion-input[labelplacement=floating]:not(.label-floating){transform:translateY(-7px)}ion-list.md.list-inset :is(ion-item-group,ion-reorder-group,ion-accordion-group,ion-radio-group) ion-item>ion-input[labelplacement=floating].label-floating{transform:translateY(-4px)}
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
@@ -1 +1 @@
1
- {"version":3,"file":"searchable-tabs.d.ts","sourceRoot":"","sources":["../../../src/native/components/searchable-tabs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAA0B,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAmB/E,eAAO,MAAM,mBAAmB,GAAI,KAAK,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,EAAE,UAAU,MAAM,IAAI;sBA8FnF,OAAO;;yBAgBJ,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,GAAG,SAAS,EAAE;yBA3GhE,mBAAmB;mBAiO9B,mBAAmB,YAAY,MAAM;qBAInC,WAAW;gBAGhB,MAAM,EAAE;iBAKP,gBAAgB;oBAqCb,mBAAmB;;CAkBtC,CAAC"}
1
+ {"version":3,"file":"searchable-tabs.d.ts","sourceRoot":"","sources":["../../../src/native/components/searchable-tabs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAA0B,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAmB/E,eAAO,MAAM,mBAAmB,GAAI,KAAK,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,EAAE,UAAU,MAAM,IAAI;sBA8FnF,OAAO;;yBAgBJ,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,GAAG,SAAS,EAAE;yBA3GhE,mBAAmB;mBAuO9B,mBAAmB,YAAY,MAAM;qBAInC,WAAW;gBAGhB,MAAM,EAAE;iBAUP,gBAAgB;oBAqCb,mBAAmB;;CAkBtC,CAAC"}
@@ -208,6 +208,12 @@ export const createSearchSupport = (doc, id, schedule) => {
208
208
  trigger.y,
209
209
  trigger.width,
210
210
  trigger.height,
211
+ candidate.control.items,
212
+ candidate.icons.map(({ source }) => source),
213
+ field,
214
+ trigger,
215
+ bar.placeholder,
216
+ bar.disabled,
211
217
  ]);
212
218
  if (state.rejectedLayout === state.layout)
213
219
  continue;
@@ -248,8 +254,10 @@ export const createSearchSupport = (doc, id, schedule) => {
248
254
  },
249
255
  reject(ids) {
250
256
  states.forEach((state) => {
251
- if (ids.includes(id(state.binding.tabBar)))
257
+ if (ids.includes(id(state.binding.tabBar))) {
252
258
  state.rejectedLayout = state.layout;
259
+ state.last = undefined;
260
+ }
253
261
  });
254
262
  },
255
263
  event(event) {
@@ -36,6 +36,9 @@ export interface ShellItem extends Frame {
36
36
  iconWidth?: number;
37
37
  iconHeight?: number;
38
38
  iconPosition?: 'leading' | 'trailing' | 'top';
39
+ imagePadding?: number;
40
+ contentInsetLeading?: number;
41
+ contentInsetTrailing?: number;
39
42
  iconTemplate?: boolean;
40
43
  visible?: boolean;
41
44
  closeIcon?: string;
@@ -77,6 +80,7 @@ export interface ShellSearchEvent extends ShellActivation {
77
80
  }
78
81
  export interface ShellSnapshot {
79
82
  revision: number;
83
+ transitionDuration?: number;
80
84
  viewportWidth: number;
81
85
  controls: ShellControl[];
82
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/native/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,IAAI,mBAAmB,CAAC;IACjC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAU,SAAQ,KAAK;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,C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QAAQ,mBAAmB,KAAG,OAAO,CAAC,mBAAmB,CAub3G,CAAC"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/native/runtime.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAkC,mBAAmB,EAAE,mBAAmB,EAAuB,MAAM,eAAe,CAAC;AAkBnI,eAAO,MAAM,aAAa,GAAU,KAAK,QAAQ,EAAE,QAAQ,mBAAmB,KAAG,OAAO,CAAC,mBAAmB,CA6c3G,CAAC"}
@@ -5,6 +5,7 @@ import { readCandidate, selector, shadowSelector, motionSelector } from './compo
5
5
  import { marker, unprojected } from './shared/dom';
6
6
  import { createIconRenderer } from './shared/icons';
7
7
  import { CSS_MOTION_EVENTS } from './shared/events';
8
+ import { createCrossfade, fadeMarker } from './shared/crossfade';
8
9
  const overlays = 'ion-modal, ion-popover, ion-alert, ion-action-sheet, ion-loading, ion-picker, ion-toast, ion-menu';
9
10
  const overlayNames = ['Modal', 'Popover', 'Alert', 'ActionSheet', 'Loading', 'Picker', 'Toast'];
10
11
  const bounded = (promise) => new Promise((resolve, reject) => {
@@ -14,6 +15,7 @@ const bounded = (promise) => new Promise((resolve, reject) => {
14
15
  export const createRuntime = async (doc, plugin) => {
15
16
  const win = doc.defaultView;
16
17
  const icons = createIconRenderer();
18
+ const crossfade = createCrossfade(win);
17
19
  const ids = new WeakMap();
18
20
  let rejected = new WeakMap();
19
21
  const sources = new Map();
@@ -27,6 +29,8 @@ export const createRuntime = async (doc, plugin) => {
27
29
  let nextId = 0;
28
30
  let revision = 0;
29
31
  let acceptedRevision = 0;
32
+ let updatingRevision;
33
+ let pendingActivations = [];
30
34
  let lastSequence = 0;
31
35
  let lastSnapshot = '';
32
36
  let viewport = `${win.innerWidth}:${win.innerHeight}`;
@@ -49,11 +53,15 @@ export const createRuntime = async (doc, plugin) => {
49
53
  return value;
50
54
  };
51
55
  const style = doc.createElement('style');
52
- style.textContent = `[${marker}], [${marker}] *, [${marker}]::before, [${marker}]::after, [${marker}]::part(native) { visibility: hidden !important; }`;
56
+ const hidden = `[${marker}]:not([${fadeMarker}])`;
57
+ style.textContent = `${hidden}, ${hidden} *, ${hidden}::before, ${hidden}::after, ${hidden}::part(native) { visibility: hidden !important; }
58
+ [${marker}], [${marker}] * { pointer-events: none !important; }`;
53
59
  const restore = (element) => {
54
60
  lastSnapshot = '';
55
61
  search.release(element);
56
62
  element.removeAttribute(marker);
63
+ if (!stopped)
64
+ crossfade.play(element, false);
57
65
  if (element.getAttribute('aria-hidden') === 'true') {
58
66
  const previous = sources.get(element);
59
67
  if (previous == null)
@@ -187,9 +195,10 @@ export const createRuntime = async (doc, plugin) => {
187
195
  const serialized = JSON.stringify(data);
188
196
  if (serialized === lastSnapshot && !forceRefresh)
189
197
  return;
190
- const snapshot = { ...data, revision: ++revision };
198
+ const snapshot = { ...data, revision: ++revision, transitionDuration: crossfade.duration() };
191
199
  forceRefresh = false;
192
200
  updates++;
201
+ updatingRevision = snapshot.revision;
193
202
  const result = await bounded(plugin.update(snapshot));
194
203
  if (stopped)
195
204
  return;
@@ -224,11 +233,16 @@ export const createRuntime = async (doc, plugin) => {
224
233
  for (const element of accepted.flatMap(candidateSources)) {
225
234
  if (!sources.has(element)) {
226
235
  sources.set(element, element.getAttribute('aria-hidden'));
236
+ crossfade.play(element, true);
227
237
  element.setAttribute(marker, '');
228
238
  element.setAttribute('aria-hidden', 'true');
229
239
  element.dispatchEvent(new CustomEvent('nativeUIShellChange'));
230
240
  }
231
241
  }
242
+ const received = pendingActivations;
243
+ pendingActivations = [];
244
+ received.forEach(activate);
245
+ await crossfade.settled();
232
246
  if (invalidated) {
233
247
  dirty = true;
234
248
  await painted();
@@ -238,6 +252,8 @@ export const createRuntime = async (doc, plugin) => {
238
252
  await fail(error);
239
253
  }
240
254
  finally {
255
+ updatingRevision = undefined;
256
+ pendingActivations = [];
241
257
  if (forceRefresh)
242
258
  rejected = new WeakMap();
243
259
  pending = false;
@@ -250,6 +266,7 @@ export const createRuntime = async (doc, plugin) => {
250
266
  const observation = { subtree: true, childList: true, characterData: true, attributes: true };
251
267
  const observer = new MutationObserver((records) => {
252
268
  if (records.some((record) => record.attributeName !== marker &&
269
+ record.attributeName !== fadeMarker &&
253
270
  !(record.attributeName === 'aria-hidden' &&
254
271
  sources.has(record.target) &&
255
272
  record.target.getAttribute('aria-hidden') === 'true')))
@@ -360,7 +377,9 @@ export const createRuntime = async (doc, plugin) => {
360
377
  resize.disconnect();
361
378
  observed.clear();
362
379
  actions.clear();
380
+ pendingActivations = [];
363
381
  search.destroy();
382
+ crossfade.destroy();
364
383
  restoreAll();
365
384
  if (!doc.hidden)
366
385
  await painted();
@@ -380,32 +399,37 @@ export const createRuntime = async (doc, plugin) => {
380
399
  finishWaiters();
381
400
  },
382
401
  };
402
+ const activate = (event) => {
403
+ if (stopped ||
404
+ doc.hidden ||
405
+ event.revision < acceptedRevision ||
406
+ event.revision > revision ||
407
+ event.sequence <= lastSequence ||
408
+ overlayOpen())
409
+ return;
410
+ if (event.revision > acceptedRevision && event.revision === updatingRevision) {
411
+ pendingActivations.push(event);
412
+ return;
413
+ }
414
+ lastSequence = event.sequence;
415
+ const element = actions.get(event.id);
416
+ if (!element)
417
+ return;
418
+ const owner = Array.from(sources.keys()).find((source) => source === element || source.contains(element));
419
+ if (!owner)
420
+ return;
421
+ const direct = !blocked(owner) && unprojected(sources.keys(), () => readCandidate(owner, id));
422
+ const candidate = direct || read().find((candidate) => candidate.actions.has(event.id));
423
+ const item = candidate?.control.items.find((item) => item.id === event.id);
424
+ const searchAction = candidate?.control.search && [candidate.control.search.trigger.id, candidate.control.search.closeId].includes(event.id);
425
+ if (!searchAction && (!item || item.disabled || item.visible === false))
426
+ return;
427
+ element.click();
428
+ lastSnapshot = '';
429
+ schedule();
430
+ };
383
431
  try {
384
- listener = await bounded(plugin.addListener('activate', (event) => {
385
- if (stopped ||
386
- doc.hidden ||
387
- event.revision < acceptedRevision ||
388
- event.revision > revision ||
389
- event.sequence <= lastSequence ||
390
- overlayOpen())
391
- return;
392
- lastSequence = event.sequence;
393
- const element = actions.get(event.id);
394
- if (!element)
395
- return;
396
- const owner = Array.from(sources.keys()).find((source) => source === element || source.contains(element));
397
- if (!owner)
398
- return;
399
- const direct = !blocked(owner) && unprojected(sources.keys(), () => readCandidate(owner, id));
400
- const candidate = direct || read().find((candidate) => candidate.actions.has(event.id));
401
- const item = candidate?.control.items.find((item) => item.id === event.id);
402
- const searchAction = candidate?.control.search && [candidate.control.search.trigger.id, candidate.control.search.closeId].includes(event.id);
403
- if (!searchAction && (!item || item.disabled || item.visible === false))
404
- return;
405
- element.click();
406
- lastSnapshot = '';
407
- schedule();
408
- }));
432
+ listener = await bounded(plugin.addListener('activate', activate));
409
433
  searchListener = await bounded(plugin.addListener('search', (event) => {
410
434
  if (stopped || doc.hidden || event.revision < acceptedRevision || event.revision > revision || overlayOpen())
411
435
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"candidate.d.ts","sourceRoot":"","sources":["../../../src/native/shared/candidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAItF,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClC,KAAK,EAAE;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CACnE;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,MAAM,CAAC;AAGxD,eAAO,MAAM,eAAe,GAAI,SAAS,WAAW,EAAE,MAAM,sBAAsB,EAAE,IAAI,QAAQ,KAAG,SAgBlG,CAAC;AAGF,eAAO,MAAM,UAAU,GACrB,WAAW,SAAS,EACpB,OAAO,WAAW,EAClB,IAAI,QAAQ,EACZ,UAAS,UAAkB,EAC3B,cAAmB,KAClB,SAAS,GAAG,SA2Cd,CAAC"}
1
+ {"version":3,"file":"candidate.d.ts","sourceRoot":"","sources":["../../../src/native/shared/candidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAItF,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClC,KAAK,EAAE;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CACnE;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,MAAM,CAAC;AAGxD,eAAO,MAAM,eAAe,GAAI,SAAS,WAAW,EAAE,MAAM,sBAAsB,EAAE,IAAI,QAAQ,KAAG,SAgBlG,CAAC;AAGF,eAAO,MAAM,UAAU,GACrB,WAAW,SAAS,EACpB,OAAO,WAAW,EAClB,IAAI,QAAQ,EACZ,UAAS,UAAkB,EAC3B,cAAmB,KAClB,SAAS,GAAG,SA8Dd,CAAC"}
@@ -60,6 +60,23 @@ export const appendItem = (candidate, child, id, content = child, label = text(c
60
60
  item.iconPosition = (icons[0] ?? svg).getAttribute('slot') === 'end' ? 'trailing' : 'leading';
61
61
  candidate.icons.push({ item, source });
62
62
  }
63
+ if (native && child.matches('ion-button, ion-back-button')) {
64
+ const style = getComputedStyle(native);
65
+ const icon = icons[0] ?? svg;
66
+ const iconStyle = icon && getComputedStyle(icon);
67
+ const leadingMargin = parseFloat(iconStyle?.marginInlineStart ?? '') || 0;
68
+ const trailingMargin = parseFloat(iconStyle?.marginInlineEnd ?? '') || 0;
69
+ const trailing = item.iconPosition === 'trailing';
70
+ const inner = native.querySelector('.button-inner');
71
+ const gap = inner ? parseFloat(getComputedStyle(inner).columnGap) || 0 : 0;
72
+ item.contentInsetLeading =
73
+ (parseFloat(style.paddingInlineStart) || 0) +
74
+ (parseFloat(style.borderInlineStartWidth) || 0) +
75
+ (!trailing || !label ? leadingMargin : 0);
76
+ item.contentInsetTrailing =
77
+ (parseFloat(style.paddingInlineEnd) || 0) + (parseFloat(style.borderInlineEndWidth) || 0) + (trailing || !label ? trailingMargin : 0);
78
+ item.imagePadding = label && icon ? gap + (trailing ? leadingMargin : trailingMargin) : 0;
79
+ }
63
80
  if (!label && !svg)
64
81
  return undefined;
65
82
  candidate.control.items.push(item);
@@ -0,0 +1,8 @@
1
+ export declare const fadeMarker = "data-native-ui-shell-fading";
2
+ export declare const createCrossfade: (win: Window) => {
3
+ duration: () => 0 | 180;
4
+ play(element: HTMLElement, toNative: boolean): void;
5
+ settled(): Promise<void>;
6
+ destroy(): void;
7
+ };
8
+ //# sourceMappingURL=crossfade.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crossfade.d.ts","sourceRoot":"","sources":["../../../src/native/shared/crossfade.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,gCAAgC,CAAC;AAGxD,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM;;kBAezB,WAAW,YAAY,OAAO;;;CA8B/C,CAAC"}
@@ -0,0 +1,46 @@
1
+ export const fadeMarker = 'data-native-ui-shell-fading';
2
+ export const createCrossfade = (win) => {
3
+ const active = new Map();
4
+ const reduced = win.matchMedia('(prefers-reduced-motion: reduce)');
5
+ const finish = (element, animation) => {
6
+ if (active.get(element) !== animation)
7
+ return;
8
+ active.delete(element);
9
+ element.removeAttribute(fadeMarker);
10
+ animation.cancel();
11
+ };
12
+ const cancelAll = () => {
13
+ for (const [element, animation] of active)
14
+ finish(element, animation);
15
+ };
16
+ reduced.addEventListener('change', cancelAll);
17
+ return {
18
+ duration: () => (reduced.matches ? 0 : 180),
19
+ play(element, toNative) {
20
+ const previous = active.get(element);
21
+ const current = Number(win.getComputedStyle(element).opacity);
22
+ previous?.cancel();
23
+ active.delete(element);
24
+ const opacity = Number(win.getComputedStyle(element).opacity);
25
+ if (reduced.matches || !element.isConnected) {
26
+ element.removeAttribute(fadeMarker);
27
+ return;
28
+ }
29
+ element.setAttribute(fadeMarker, '');
30
+ const animation = element.animate([{ opacity: previous ? current : toNative ? opacity : 0 }, { opacity: toNative ? 0 : opacity }], {
31
+ duration: 180,
32
+ easing: 'ease-in-out',
33
+ fill: 'both',
34
+ });
35
+ active.set(element, animation);
36
+ void animation.finished.then(() => finish(element, animation), () => finish(element, animation));
37
+ },
38
+ async settled() {
39
+ await Promise.all(Array.from(active.values(), (animation) => animation.finished.catch(() => { })));
40
+ },
41
+ destroy() {
42
+ reduced.removeEventListener('change', cancelAll);
43
+ cancelAll();
44
+ },
45
+ };
46
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/native/shared/dom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,eAAO,MAAM,MAAM,yBAAyB,CAAC;AAC7C,eAAO,MAAM,MAAM,GAAI,OAAO,mBAAmB,KAAG,OAA2E,CAAC;AAChI,eAAO,MAAM,QAAQ,+IACyH,CAAC;AAI/I,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,KAAG,OACyC,CAAC;AAE7F,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,UAAU,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,MAAM,CAAC,KAAG,CAQ/E,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,SAAS,WAAW,KAAG,OAkB9C,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,MAAM,OAAO,EAAE,SAAS,OAAO,KAAG,KAKtD,CAAC;AAEH,eAAO,MAAM,IAAI,GAAI,SAAS,OAAO,KAAG,MAOvC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,OAAO,KAAG,OAQjD,CAAC"}
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/native/shared/dom.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,eAAO,MAAM,MAAM,yBAAyB,CAAC;AAC7C,eAAO,MAAM,MAAM,GAAI,OAAO,mBAAmB,KAAG,OAA2E,CAAC;AAChI,eAAO,MAAM,QAAQ,+IACyH,CAAC;AAI/I,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,KAAG,OACyC,CAAC;AAE7F,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,UAAU,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,MAAM,CAAC,KAAG,CAQ/E,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,SAAS,WAAW,KAAG,OAmB9C,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,MAAM,OAAO,EAAE,SAAS,OAAO,KAAG,KAKtD,CAAC;AAEH,eAAO,MAAM,IAAI,GAAI,SAAS,OAAO,KAAG,MAOvC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,OAAO,KAAG,OAQjD,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { fadeMarker } from './crossfade';
1
2
  export const marker = 'data-native-ui-shell';
2
3
  export const isDark = (style) => style.getPropertyValue('--ios27-color-scheme').trim() === 'dark';
3
4
  export const excluded = '.ionic-theme-disabled, .ios-theme-disabled, .ios26-disabled, .ion-page-hidden, .ion-page-invisible, .ion-cloned-element, [hidden], [inert]';
@@ -18,7 +19,7 @@ export const visible = (element) => {
18
19
  return false;
19
20
  for (let current = element; current; current = current.parentElement) {
20
21
  const style = getComputedStyle(current);
21
- if (style.display === 'none' || style.visibility !== 'visible' || Number(style.opacity) === 0)
22
+ if (style.display === 'none' || style.visibility !== 'visible' || (Number(style.opacity) === 0 && !current.hasAttribute(fadeMarker)))
22
23
  return false;
23
24
  if (style.transform !== 'none' &&
24
25
  !new DOMMatrixReadOnly(style.transform).isIdentity &&
@@ -1 +1 @@
1
- {"version":3,"file":"ios.enter.d.ts","sourceRoot":"","sources":["../../../src/popover/animations/ios.enter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAMzC,eAAO,MAAM,iBAAiB,GAAI,QAAQ,WAAW,EAAE,OAAO,GAAG,KAAG,SAmInE,CAAC"}
1
+ {"version":3,"file":"ios.enter.d.ts","sourceRoot":"","sources":["../../../src/popover/animations/ios.enter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAM7C,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAMzC,eAAO,MAAM,iBAAiB,GAAI,QAAQ,WAAW,EAAE,OAAO,GAAG,KAAG,SAmPnE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { createAnimation } from '@ionic/core';
2
2
  import { getElementRoot } from '../../utils';
3
3
  import { calculateWindowAdjustment, getPopoverDimensions, getPopoverPosition } from '../utils';
4
+ import { createCalloutSurface } from '../callout-surface';
4
5
  const POPOVER_IOS_BODY_PADDING = 5;
5
6
  export const POPOVER_IOS_BODY_MARGIN = 8;
6
7
  export const iosEnterAnimation = (baseEl, opts) => {
@@ -11,10 +12,39 @@ export const iosEnterAnimation = (baseEl, opts) => {
11
12
  const bodyHeight = doc.defaultView.innerHeight;
12
13
  const root = getElementRoot(baseEl);
13
14
  const contentEl = root.querySelector('.popover-content');
15
+ const arrowEl = root.querySelector('.popover-arrow');
14
16
  const referenceSizeEl = trigger || ev?.detail?.ionShadowTarget || ev?.target;
17
+ const anchorBounds = referenceSizeEl?.getBoundingClientRect();
18
+ let paneAnchor = referenceSizeEl;
19
+ let pane = null;
20
+ while (paneAnchor && !pane) {
21
+ pane = paneAnchor.closest('ion-content, .ion-page, ion-menu');
22
+ paneAnchor = paneAnchor.getRootNode().host;
23
+ }
24
+ const paneBounds = pane?.getBoundingClientRect();
25
+ const scroll = pane?.shadowRoot?.querySelector('[part="scroll"]');
26
+ const scrollStyle = scroll ? getComputedStyle(scroll) : null;
27
+ let paneLeft = Math.max(0, (paneBounds?.left ?? 0) + (parseFloat(scrollStyle?.paddingLeft ?? '0') || 0));
28
+ let paneRight = Math.min(bodyWidth, (paneBounds?.right ?? bodyWidth) - (parseFloat(scrollStyle?.paddingRight ?? '0') || 0));
29
+ const splitPane = pane?.closest('ion-split-pane.split-pane-visible');
30
+ if (splitPane && pane?.closest('.split-pane-main')) {
31
+ for (const menu of Array.from(splitPane.querySelectorAll(':scope > ion-menu.menu-pane-visible'))) {
32
+ const rect = menu.getBoundingClientRect();
33
+ if (rect.left <= paneLeft && rect.right > paneLeft)
34
+ paneLeft = rect.right;
35
+ if (rect.right >= paneRight && rect.left < paneRight)
36
+ paneRight = rect.left;
37
+ }
38
+ }
39
+ const paneMargin = size === 'cover' ? 0 : POPOVER_IOS_BODY_MARGIN;
40
+ const availableWidth = Math.max(0, paneRight - paneLeft - paneMargin * 2);
41
+ if (pane && availableWidth > 0 && contentEl.getBoundingClientRect().width > availableWidth) {
42
+ contentEl.dataset['previousMaxWidth'] = contentEl.style.maxWidth;
43
+ contentEl.style.maxWidth = `${availableWidth}px`;
44
+ }
15
45
  const { contentWidth, contentHeight } = getPopoverDimensions(size, contentEl, referenceSizeEl);
16
46
  const isReplace = (() => {
17
- if (!['ion-button', 'ion-buttons'].includes(referenceSizeEl.localName)) {
47
+ if (reference === 'event' || !referenceSizeEl || !['ion-button', 'ion-buttons'].includes(referenceSizeEl.localName)) {
18
48
  return false;
19
49
  }
20
50
  if (referenceSizeEl.matches('.ios-theme-disabled, .ios26-disabled')) {
@@ -29,13 +59,54 @@ export const iosEnterAnimation = (baseEl, opts) => {
29
59
  originY: 'top',
30
60
  };
31
61
  const results = getPopoverPosition(isRTL, contentWidth, contentHeight, reference, side, align, defaultPosition, trigger, ev);
62
+ const anchor = reference === 'event' ? results.referenceCoordinates : anchorBounds;
32
63
  const padding = size === 'cover' ? 0 : POPOVER_IOS_BODY_PADDING;
33
64
  const margin = size === 'cover' ? 0 : POPOVER_IOS_BODY_MARGIN;
34
- const { originX, originY, top, left, bottom, checkSafeAreaLeft, checkSafeAreaRight, addPopoverBottomClass } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, margin, results.originX, results.originY, results.referenceCoordinates, referenceSizeEl.getBoundingClientRect(), isReplace);
65
+ const { originX, originY, top, left: windowLeft, bottom, checkSafeAreaLeft, checkSafeAreaRight, addPopoverBottomClass, } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, margin, results.originX, results.originY, results.referenceCoordinates, referenceSizeEl?.getBoundingClientRect(), isReplace);
66
+ const preferredLeft = isReplace && anchorBounds
67
+ ? anchorBounds.left + anchorBounds.width / 2 <= (paneLeft + paneRight) / 2
68
+ ? anchorBounds.left
69
+ : anchorBounds.right - contentWidth
70
+ : windowLeft;
71
+ const left = pane ? Math.max(paneLeft + paneMargin, Math.min(paneRight - paneMargin - contentWidth, preferredLeft)) : preferredLeft;
72
+ const physicalSide = side === 'start' ? (isRTL ? 'right' : 'left') : side === 'end' ? (isRTL ? 'left' : 'right') : side;
73
+ const horizontal = physicalSide === 'left' || physicalSide === 'right';
74
+ const above = addPopoverBottomClass || physicalSide === 'top';
75
+ const hasCallout = !!arrowEl && !isReplace && !!anchor && size !== 'cover' && bottom === undefined;
76
+ const surfaceTop = hasCallout && !horizontal ? top + (above ? -5 : 5) : top;
77
+ const contentOrigin = anchor
78
+ ? `${anchor.left + anchor.width / 2 - left}px ${anchor.top + anchor.height / 2 - surfaceTop}px`
79
+ : `${originX} ${originY}`;
35
80
  const baseAnimation = createAnimation();
36
81
  const backdropAnimation = createAnimation();
37
82
  const contentAnimation = createAnimation();
38
83
  const targetAnimation = createAnimation();
84
+ const arrowAnimation = createAnimation();
85
+ const surfaceAnimation = createAnimation();
86
+ if (arrowEl) {
87
+ arrowAnimation.addElement(arrowEl).delay(300).duration(200).fromTo('opacity', 0, 1);
88
+ }
89
+ if (hasCallout && anchor) {
90
+ const length = horizontal ? contentHeight : contentWidth;
91
+ const inset = Math.min(48, length / 2);
92
+ const center = Math.max(inset, Math.min(length - inset, horizontal ? anchor.top + anchor.height / 2 - top : anchor.left + anchor.width / 2 - left));
93
+ const arrowSide = horizontal ? (physicalSide === 'left' ? 'right' : 'left') : above ? 'bottom' : 'top';
94
+ const layers = createCalloutSurface(root, contentWidth, contentHeight, arrowSide, center);
95
+ baseEl.classList.add('ios-theme-callout');
96
+ for (const layer of layers) {
97
+ layer.style.left = `calc(${left - 32}px + var(--offset-x, 0))`;
98
+ layer.style.top = `calc(${surfaceTop - 32}px + var(--offset-y, 0))`;
99
+ const [originLeft, originTop] = contentOrigin.split(' ').map(parseFloat);
100
+ layer.style.transformOrigin = `${originLeft + 32}px ${originTop + 32}px`;
101
+ }
102
+ surfaceAnimation
103
+ .addElement(layers)
104
+ .delay(100)
105
+ .duration(400)
106
+ .easing('cubic-bezier(0, 1, 0.22, 1)')
107
+ .fromTo('transform', 'scale(0)', 'scale(1)')
108
+ .fromTo('opacity', 0.01, 1);
109
+ }
39
110
  backdropAnimation
40
111
  .delay(100)
41
112
  .duration(300)
@@ -50,9 +121,9 @@ export const iosEnterAnimation = (baseEl, opts) => {
50
121
  .delay(100)
51
122
  .duration(400)
52
123
  .addElement(root.querySelector('.popover-content'))
53
- .beforeStyles({ 'transform-origin': `${originY} ${originX}` })
124
+ .beforeStyles({ 'transform-origin': contentOrigin })
54
125
  .beforeAddWrite(() => {
55
- root.querySelector('.popover-content').dataset['transformOrigin'] = `${originY} ${originX}`;
126
+ root.querySelector('.popover-content').dataset['transformOrigin'] = contentOrigin;
56
127
  })
57
128
  .fromTo('transform', 'scale(0)', 'scale(1)')
58
129
  .fromTo('opacity', 0.01, 1);
@@ -83,15 +154,40 @@ export const iosEnterAnimation = (baseEl, opts) => {
83
154
  const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
84
155
  const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
85
156
  let leftValue = `${left}px`;
86
- if (checkSafeAreaLeft) {
157
+ if (checkSafeAreaLeft && !pane) {
87
158
  leftValue = `${left}px${safeAreaLeft}`;
88
159
  }
89
- if (checkSafeAreaRight) {
160
+ if (checkSafeAreaRight && !pane) {
90
161
  leftValue = `${left}px${safeAreaRight}`;
91
162
  }
92
- contentEl.style.setProperty('top', `calc(${top}px + var(--offset-y, 0))`);
163
+ contentEl.style.setProperty('top', `calc(${surfaceTop}px + var(--offset-y, 0))`);
93
164
  contentEl.style.setProperty('left', `calc(${leftValue} + var(--offset-x, 0))`);
94
- contentEl.style.setProperty('transform-origin', `${originY} ${originX}`);
165
+ contentEl.style.setProperty('transform-origin', contentOrigin);
166
+ if (arrowEl) {
167
+ arrowEl.style.display = 'none';
168
+ if (hasCallout && anchor) {
169
+ const inset = Math.min(48, (horizontal ? contentHeight : contentWidth) / 2);
170
+ const clamp = (value, length) => Math.max(inset, Math.min(length - inset, value));
171
+ let arrowLeft;
172
+ let arrowTop;
173
+ let rotation;
174
+ if (horizontal) {
175
+ arrowLeft = physicalSide === 'left' ? left + contentWidth - 10 : left - 24;
176
+ arrowTop = top + clamp(anchor.top + anchor.height / 2 - top, contentHeight) - 7;
177
+ rotation = physicalSide === 'left' ? 90 : -90;
178
+ }
179
+ else {
180
+ arrowLeft = left + clamp(anchor.left + anchor.width / 2 - left, contentWidth) - 17;
181
+ arrowTop = above ? surfaceTop + contentHeight - 1 : surfaceTop - 13;
182
+ rotation = above ? 180 : 0;
183
+ }
184
+ arrowEl.style.setProperty('display', 'block');
185
+ arrowEl.style.setProperty('top', `calc(${arrowTop}px + var(--offset-y, 0))`);
186
+ arrowEl.style.setProperty('left', `calc(${arrowLeft}px + var(--offset-x, 0))`);
187
+ arrowEl.style.setProperty('bottom', 'auto');
188
+ arrowEl.style.setProperty('transform', `rotate(${rotation}deg)`);
189
+ }
190
+ }
95
191
  })
96
- .addAnimation([backdropAnimation, contentAnimation, targetAnimation]);
192
+ .addAnimation([backdropAnimation, contentAnimation, targetAnimation, arrowAnimation, surfaceAnimation]);
97
193
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ios.leave.d.ts","sourceRoot":"","sources":["../../../src/popover/animations/ios.leave.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C,eAAO,MAAM,iBAAiB,GAAI,QAAQ,WAAW,KAAG,SAmEvD,CAAC"}
1
+ {"version":3,"file":"ios.leave.d.ts","sourceRoot":"","sources":["../../../src/popover/animations/ios.leave.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C,eAAO,MAAM,iBAAiB,GAAI,QAAQ,WAAW,KAAG,SAiFvD,CAAC"}
@@ -8,6 +8,12 @@ export const iosLeaveAnimation = (baseEl) => {
8
8
  const backdropAnimation = createAnimation();
9
9
  const contentAnimation = createAnimation();
10
10
  const targetAnimation = createAnimation();
11
+ const surfaceAnimation = createAnimation()
12
+ .addElement(Array.from(root.querySelectorAll('.ios-theme-callout-layer')))
13
+ .duration(400)
14
+ .easing('ease')
15
+ .fromTo('opacity', 0.99, 0)
16
+ .fromTo('transform', 'scale(1)', 'scale(0)');
11
17
  const doc = baseEl.ownerDocument;
12
18
  const replaceElement = doc.querySelector('.ios27-replace-element');
13
19
  if (replaceElement) {
@@ -45,16 +51,24 @@ export const iosLeaveAnimation = (baseEl) => {
45
51
  .afterAddWrite(() => {
46
52
  baseEl.style.removeProperty('--width');
47
53
  baseEl.classList.remove('popover-bottom');
54
+ baseEl.classList.remove('ios-theme-callout');
55
+ root.querySelectorAll('.ios-theme-callout-layer').forEach((layer) => layer.remove());
48
56
  contentEl.style.removeProperty('top');
49
57
  contentEl.style.removeProperty('left');
50
58
  contentEl.style.removeProperty('bottom');
51
59
  contentEl.style.removeProperty('transform-origin');
60
+ if (contentEl.dataset['previousMaxWidth'] !== undefined) {
61
+ contentEl.style.maxWidth = contentEl.dataset['previousMaxWidth'];
62
+ delete contentEl.dataset['previousMaxWidth'];
63
+ }
52
64
  if (arrowEl) {
53
65
  arrowEl.style.removeProperty('top');
54
66
  arrowEl.style.removeProperty('left');
55
67
  arrowEl.style.removeProperty('display');
68
+ arrowEl.style.removeProperty('bottom');
69
+ arrowEl.style.removeProperty('transform');
56
70
  }
57
71
  })
58
72
  .duration(300)
59
- .addAnimation([backdropAnimation, contentAnimation, targetAnimation]);
73
+ .addAnimation([backdropAnimation, contentAnimation, targetAnimation, surfaceAnimation]);
60
74
  };
@@ -0,0 +1,2 @@
1
+ export declare const createCalloutSurface: (root: ShadowRoot | HTMLElement, width: number, height: number, side: "top" | "right" | "bottom" | "left", center: number) => HTMLElement[];
2
+ //# sourceMappingURL=callout-surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callout-surface.d.ts","sourceRoot":"","sources":["../../src/popover/callout-surface.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,oBAAoB,GAC/B,MAAM,UAAU,GAAG,WAAW,EAC9B,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,MAAM,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,EACzC,QAAQ,MAAM,KACb,WAAW,EA8Cb,CAAC"}