@neural-ui/native 0.1.0-beta.1 → 0.1.0-beta.11

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 (132) hide show
  1. package/README.md +15 -5
  2. package/dist/accordion/accordion.js +1 -1
  3. package/dist/accordion/accordion.js.map +1 -1
  4. package/dist/alert/alert.js +1 -1
  5. package/dist/alert/alert.js.map +1 -1
  6. package/dist/bottom-sheet/bottom-sheet.js +1 -1
  7. package/dist/bottom-sheet/bottom-sheet.js.map +1 -1
  8. package/dist/button/button.d.ts +3 -1
  9. package/dist/button/button.js +7 -3
  10. package/dist/button/button.js.map +1 -1
  11. package/dist/button-group/button-group.js +1 -1
  12. package/dist/button-group/button-group.js.map +1 -1
  13. package/dist/calendar/calendar.js +1 -1
  14. package/dist/calendar/calendar.js.map +1 -1
  15. package/dist/carousel/carousel.js +1 -1
  16. package/dist/carousel/carousel.js.map +1 -1
  17. package/dist/cascade-select/cascade-select.js +1 -1
  18. package/dist/cascade-select/cascade-select.js.map +1 -1
  19. package/dist/checkbox/checkbox.d.ts +4 -1
  20. package/dist/checkbox/checkbox.js +10 -3
  21. package/dist/checkbox/checkbox.js.map +1 -1
  22. package/dist/chip/chip.js +1 -1
  23. package/dist/chip/chip.js.map +1 -1
  24. package/dist/confirm-dialog/confirm-dialog.js +1 -1
  25. package/dist/context-menu/context-menu.js +1 -1
  26. package/dist/context-menu/context-menu.js.map +1 -1
  27. package/dist/data-view/data-view.d.ts +5 -1
  28. package/dist/data-view/data-view.js +68 -19
  29. package/dist/data-view/data-view.js.map +1 -1
  30. package/dist/date-input/date-input.js +1 -1
  31. package/dist/date-input/date-input.js.map +1 -1
  32. package/dist/empty-state/empty-state.js +1 -1
  33. package/dist/filter-bar/filter-bar.js +1 -1
  34. package/dist/foundation/anchored-overlay.js +1 -1
  35. package/dist/foundation/anchored-overlay.js.map +1 -1
  36. package/dist/foundation/haptics.d.ts +30 -0
  37. package/dist/foundation/haptics.js +53 -0
  38. package/dist/foundation/haptics.js.map +1 -0
  39. package/dist/foundation/index.d.ts +1 -0
  40. package/dist/foundation/index.js +1 -0
  41. package/dist/foundation/index.js.map +1 -1
  42. package/dist/foundation/native-pressable.d.ts +5 -1
  43. package/dist/foundation/native-pressable.js +13 -3
  44. package/dist/foundation/native-pressable.js.map +1 -1
  45. package/dist/gallery/gallery.d.ts +1 -0
  46. package/dist/gallery/gallery.js +24 -11
  47. package/dist/gallery/gallery.js.map +1 -1
  48. package/dist/haptics/index.d.ts +12 -0
  49. package/dist/haptics/index.js +36 -0
  50. package/dist/haptics/index.js.map +1 -0
  51. package/dist/icon-button/icon-button.d.ts +3 -1
  52. package/dist/icon-button/icon-button.js +7 -3
  53. package/dist/icon-button/icon-button.js.map +1 -1
  54. package/dist/image-viewer/image-viewer.js +1 -1
  55. package/dist/image-viewer/image-viewer.js.map +1 -1
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.js +1 -0
  58. package/dist/index.js.map +1 -1
  59. package/dist/inline-editor/inline-editor.js +1 -1
  60. package/dist/inline-editor/inline-editor.js.map +1 -1
  61. package/dist/input-mask/input-mask.d.ts +2 -0
  62. package/dist/input-mask/input-mask.js +7 -1
  63. package/dist/input-mask/input-mask.js.map +1 -1
  64. package/dist/input-otp/input-otp.js +1 -1
  65. package/dist/input-otp/input-otp.js.map +1 -1
  66. package/dist/input-tags/input-tags.d.ts +2 -0
  67. package/dist/input-tags/input-tags.js +8 -3
  68. package/dist/input-tags/input-tags.js.map +1 -1
  69. package/dist/listbox/listbox.js +1 -1
  70. package/dist/listbox/listbox.js.map +1 -1
  71. package/dist/menu/menu.js +1 -1
  72. package/dist/menu/menu.js.map +1 -1
  73. package/dist/modal/modal.js +1 -1
  74. package/dist/modal/modal.js.map +1 -1
  75. package/dist/nav/nav.js +1 -1
  76. package/dist/nav/nav.js.map +1 -1
  77. package/dist/notification-center/notification-center.js +1 -1
  78. package/dist/notification-center/notification-center.js.map +1 -1
  79. package/dist/number-input/number-input.js +1 -1
  80. package/dist/number-input/number-input.js.map +1 -1
  81. package/dist/panel/panel.js +1 -1
  82. package/dist/panel/panel.js.map +1 -1
  83. package/dist/password/password.js +1 -1
  84. package/dist/pick-list/pick-list.js +1 -1
  85. package/dist/pick-list/pick-list.js.map +1 -1
  86. package/dist/popover/popover.js +1 -1
  87. package/dist/popover/popover.js.map +1 -1
  88. package/dist/radio/radio.d.ts +4 -1
  89. package/dist/radio/radio.js +13 -4
  90. package/dist/radio/radio.js.map +1 -1
  91. package/dist/rating/rating.js +1 -1
  92. package/dist/rating/rating.js.map +1 -1
  93. package/dist/section-list/index.d.ts +1 -0
  94. package/dist/section-list/index.js +2 -0
  95. package/dist/section-list/index.js.map +1 -0
  96. package/dist/section-list/section-list.d.ts +41 -0
  97. package/dist/section-list/section-list.js +161 -0
  98. package/dist/section-list/section-list.js.map +1 -0
  99. package/dist/select/select.js +1 -1
  100. package/dist/select/select.js.map +1 -1
  101. package/dist/sidebar/sidebar.js +1 -1
  102. package/dist/sidebar/sidebar.js.map +1 -1
  103. package/dist/slider/slider.d.ts +4 -1
  104. package/dist/slider/slider.js +12 -3
  105. package/dist/slider/slider.js.map +1 -1
  106. package/dist/speed-dial/speed-dial.js +1 -1
  107. package/dist/speed-dial/speed-dial.js.map +1 -1
  108. package/dist/spinner/spinner.js +1 -1
  109. package/dist/spinner/spinner.js.map +1 -1
  110. package/dist/stepper/stepper.js +1 -1
  111. package/dist/stepper/stepper.js.map +1 -1
  112. package/dist/switch/switch.d.ts +4 -1
  113. package/dist/switch/switch.js +10 -4
  114. package/dist/switch/switch.js.map +1 -1
  115. package/dist/tabs/tabs.js +1 -1
  116. package/dist/tabs/tabs.js.map +1 -1
  117. package/dist/toast/toast.js +1 -1
  118. package/dist/toast/toast.js.map +1 -1
  119. package/dist/toggle-button-group/toggle-button-group.js +1 -1
  120. package/dist/toggle-button-group/toggle-button-group.js.map +1 -1
  121. package/dist/toolbar/toolbar.js +1 -1
  122. package/dist/toolbar/toolbar.js.map +1 -1
  123. package/dist/tree/tree.js +1 -1
  124. package/dist/tree/tree.js.map +1 -1
  125. package/dist/tree-select/tree-select.js +1 -1
  126. package/dist/tree-select/tree-select.js.map +1 -1
  127. package/dist/uploader/uploader.d.ts +1 -1
  128. package/dist/uploader/uploader.js +1 -1
  129. package/dist/uploader/uploader.js.map +1 -1
  130. package/dist/virtual-list/virtual-list.js +1 -1
  131. package/dist/virtual-list/virtual-list.js.map +1 -1
  132. package/package.json +26 -6
@@ -67,7 +67,7 @@ export class NeuContextMenuComponent {
67
67
  </pressable>
68
68
  }
69
69
  </view>
70
- </neu-anchored-overlay>`, isInline: true, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n", ".context-target {\n min-height: 64px;\n justify-content: center;\n gap: 6px;\n}\n.context-option {\n min-height: 48px;\n padding: 12px;\n gap: 4px;\n border-radius: 8px;\n}\n\n.context-option .label { font-size: var(--neu-row-size, 15px); line-height: var(--neu-row-line, 21px); font-weight: 500; } .context-option .muted { font-size: var(--neu-caption-size, 13px); line-height: var(--neu-caption-line, 18px); }\n"], dependencies: [{ kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "directive", type: Pressable, selector: "pressable", exportAs: ["pressable"] }, { kind: "component", type: NeuAnchoredOverlayComponent, selector: "neu-anchored-overlay", inputs: ["open", "anchor", "closeLabel", "minimumWidth", "gap"], outputs: ["openChange"] }, { kind: "component", type: NeuIconButtonComponent, selector: "neu-icon-button", inputs: ["label", "svg", "variant", "tone", "disabled", "loading"], outputs: ["pressed"] }] });
70
+ </neu-anchored-overlay>`, isInline: true, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n", ".context-target {\n min-height: 64px;\n justify-content: center;\n gap: 6px;\n}\n.context-option {\n min-height: 48px;\n padding: 12px;\n gap: 4px;\n border-radius: 8px;\n}\n\n.context-option .label { font-size: var(--neu-row-size, 15px); line-height: var(--neu-row-line, 21px); font-weight: 500; } .context-option .muted { font-size: var(--neu-caption-size, 13px); line-height: var(--neu-caption-line, 18px); }\n"], dependencies: [{ kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "directive", type: Pressable, selector: "pressable", inputs: ["haptic"], exportAs: ["pressable"] }, { kind: "component", type: NeuAnchoredOverlayComponent, selector: "neu-anchored-overlay", inputs: ["open", "anchor", "closeLabel", "minimumWidth", "gap"], outputs: ["openChange"] }, { kind: "component", type: NeuIconButtonComponent, selector: "neu-icon-button", inputs: ["haptic", "label", "svg", "variant", "tone", "disabled", "loading"], outputs: ["pressed"] }] });
71
71
  }
72
72
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuContextMenuComponent, decorators: [{
73
73
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.js","sourceRoot":"","sources":["../../src/context-menu/context-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,KAAK,EACL,MAAM,EACN,UAAU,EACV,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAGpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EA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AAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;uGAtBU,uBAAuB;2FAAvB,uBAAuB,2mCAWiC,UAAU,6CA3CnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA6BgB,wkJA9BhB,IAAI,iDAAE,IAAI,mYAAE,SAAS,+EAAE,2BAA2B,2JAAE,sBAAsB;;2FAiCzE,uBAAuB;kBAnCnC,SAAS;+BACE,kBAAkB,WACnB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,2BAA2B,EAAE,sBAAsB,CAAC,YAC3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA6BgB;22BAce,gBAAgB,OAAE,EAAE,IAAI,EAAE,CAAA,UAAoB,CAAA,EAAE","sourcesContent":["import {\n booleanAttribute,\n Component,\n input,\n model,\n output,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { View, Text } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport type { HostNode } from '@ng-native/fabric';\nimport { NeuOption } from '../foundation/mobile.js';\nimport { NeuAnchoredOverlayComponent } from '../foundation/anchored-overlay.js';\nimport { NeuIconButtonComponent } from '../icon-button/icon-button.js';\nimport { NEU_MORE } from '../foundation/icons.js';\n\n@Component({\n selector: 'neu-context-menu',\n imports: [View, Text, Pressable, NeuAnchoredOverlayComponent, NeuIconButtonComponent],\n template: `<view class=\"surface outline row\"\n ><pressable\n class=\"context-target grow\" #triggerElement=\"pressable\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"label()\"\n [accessibilityHint]=\"hint()\"\n [disabled]=\"disabled()\"\n (longPress)=\"show()\"\n (press)=\"activate()\"\n ><ng-content /><text class=\"title\">{{ label() }}</text>\n <text class=\"muted\">{{ hint() }}</text></pressable\n ><neu-icon-button\n [label]=\"actionsLabel()\"\n [svg]=\"moreIcon\"\n variant=\"text\"\n [disabled]=\"disabled()\"\n (pressed)=\"show()\" />\n </view>\n <neu-anchored-overlay [(open)]=\"open\" [anchor]=\"anchorRef()?.nativeElement\" [minimumWidth]=\"240\" [closeLabel]=\"closeLabel()\">\n <view accessibilityRole=\"menu\" [accessibilityLabel]=\"actionsLabel()\">\n @for (item of items(); track item.id) {\n <pressable class=\"context-option\" accessibilityRole=\"menuitem\" [accessibilityLabel]=\"item.label\"\n [accessibilityState]=\"{ disabled: disabled() || !!item.disabled }\"\n [disabled]=\"disabled() || !!item.disabled\" [class.neu-unavailable]=\"disabled() || item.disabled\" (press)=\"choose(item.id)\">\n <text class=\"label\">{{ item.label }}</text>\n @if (item.description) { <text class=\"muted\">{{ item.description }}</text> }\n </pressable>\n }\n </view>\n </neu-anchored-overlay>`,\n styleUrls: ['../foundation/mobile.css', './context-menu.css'],\n})\nexport class NeuContextMenuComponent {\n readonly label = input.required<string>();\n readonly items = input<readonly NeuOption[]>([]);\n readonly hint = input('Long press for actions');\n readonly actionsLabel = input('Actions');\n readonly closeLabel = input('Dismiss actions');\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly open = model(false);\n readonly activated = output<string>();\n readonly pressed = output<void>();\n protected readonly moreIcon = NEU_MORE;\n protected readonly anchorRef = viewChild('triggerElement', { read: ElementRef<HostNode> });\n protected activate(): void {\n if (!this.disabled()) this.pressed.emit();\n }\n protected show(): void {\n if (!this.disabled()) this.open.set(true);\n }\n protected choose(id: string): void {\n if (this.disabled() || !this.items().some(item => item.id === id && !item.disabled)) return;\n this.open.set(false);\n this.activated.emit(id);\n }\n}\n"]}
1
+ {"version":3,"file":"context-menu.js","sourceRoot":"","sources":["../../src/context-menu/context-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,KAAK,EACL,MAAM,EACN,UAAU,EACV,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAA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AAE,OAAO;QAC5F,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;uGAtBU,uBAAuB;2FAAvB,uBAAuB,2mCAWiC,UAAU,6CA3CnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA6BgB,wkJA9BhB,IAAI,iDAAE,IAAI,mYAAE,SAAS,mGAAE,2BAA2B,2JAAE,sBAAsB;;2FAiCzE,uBAAuB;kBAnCnC,SAAS;+BACE,kBAAkB,WACnB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,2BAA2B,EAAE,sBAAsB,CAAC,YAC3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA6BgB;22BAce,gBAAgB,OAAE,EAAE,IAAI,EAAE,CAAA,UAAoB,CAAA,EAAE","sourcesContent":["import {\n booleanAttribute,\n Component,\n input,\n model,\n output,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { View, Text } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport type { HostNode } from '@ng-native/fabric';\nimport { NeuOption } from '../foundation/mobile.js';\nimport { NeuAnchoredOverlayComponent } from '../foundation/anchored-overlay.js';\nimport { NeuIconButtonComponent } from '../icon-button/icon-button.js';\nimport { NEU_MORE } from '../foundation/icons.js';\n\n@Component({\n selector: 'neu-context-menu',\n imports: [View, Text, Pressable, NeuAnchoredOverlayComponent, NeuIconButtonComponent],\n template: `<view class=\"surface outline row\"\n ><pressable\n class=\"context-target grow\" #triggerElement=\"pressable\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"label()\"\n [accessibilityHint]=\"hint()\"\n [disabled]=\"disabled()\"\n (longPress)=\"show()\"\n (press)=\"activate()\"\n ><ng-content /><text class=\"title\">{{ label() }}</text>\n <text class=\"muted\">{{ hint() }}</text></pressable\n ><neu-icon-button\n [label]=\"actionsLabel()\"\n [svg]=\"moreIcon\"\n variant=\"text\"\n [disabled]=\"disabled()\"\n (pressed)=\"show()\" />\n </view>\n <neu-anchored-overlay [(open)]=\"open\" [anchor]=\"anchorRef()?.nativeElement\" [minimumWidth]=\"240\" [closeLabel]=\"closeLabel()\">\n <view accessibilityRole=\"menu\" [accessibilityLabel]=\"actionsLabel()\">\n @for (item of items(); track item.id) {\n <pressable class=\"context-option\" accessibilityRole=\"menuitem\" [accessibilityLabel]=\"item.label\"\n [accessibilityState]=\"{ disabled: disabled() || !!item.disabled }\"\n [disabled]=\"disabled() || !!item.disabled\" [class.neu-unavailable]=\"disabled() || item.disabled\" (press)=\"choose(item.id)\">\n <text class=\"label\">{{ item.label }}</text>\n @if (item.description) { <text class=\"muted\">{{ item.description }}</text> }\n </pressable>\n }\n </view>\n </neu-anchored-overlay>`,\n styleUrls: ['../foundation/mobile.css', './context-menu.css'],\n})\nexport class NeuContextMenuComponent {\n readonly label = input.required<string>();\n readonly items = input<readonly NeuOption[]>([]);\n readonly hint = input('Long press for actions');\n readonly actionsLabel = input('Actions');\n readonly closeLabel = input('Dismiss actions');\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly open = model(false);\n readonly activated = output<string>();\n readonly pressed = output<void>();\n protected readonly moreIcon = NEU_MORE;\n protected readonly anchorRef = viewChild('triggerElement', { read: ElementRef<HostNode> });\n protected activate(): void {\n if (!this.disabled()) this.pressed.emit();\n }\n protected show(): void {\n if (!this.disabled()) this.open.set(true);\n }\n protected choose(id: string): void {\n if (this.disabled() || !this.items().some(item => item.id === id && !item.disabled)) return;\n this.open.set(false);\n this.activated.emit(id);\n }\n}\n"]}
@@ -7,8 +7,12 @@ export declare class NeuDataViewComponent {
7
7
  readonly items: import("@angular/core").InputSignal<readonly NeuOption[]>;
8
8
  /** Explicit template takes precedence over a projected neuDataViewItem. */
9
9
  readonly itemTemplate: import("@angular/core").InputSignal<TemplateRef<NeuDataViewItemContext> | undefined>;
10
+ /** A positive viewport height enables internally scrolling, measured rows. */
11
+ readonly virtualHeight: import("@angular/core").InputSignal<number | undefined>;
10
12
  private readonly itemContent;
11
13
  protected readonly resolvedItemTemplate: import("@angular/core").Signal<TemplateRef<NeuDataViewItemContext> | undefined>;
14
+ protected readonly viewportHeight: import("@angular/core").Signal<number | undefined>;
15
+ protected readonly itemKey: (item: NeuOption) => string;
12
16
  readonly query: import("@angular/core").ModelSignal<string>;
13
17
  readonly descending: import("@angular/core").ModelSignal<boolean>;
14
18
  readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
@@ -29,5 +33,5 @@ export declare class NeuDataViewComponent {
29
33
  protected readonly displayed: import("@angular/core").Signal<NeuOption[]>;
30
34
  protected choose(item: NeuOption): void;
31
35
  static ɵfac: i0.ɵɵFactoryDeclaration<NeuDataViewComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<NeuDataViewComponent, "neu-data-view", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "descending": { "alias": "descending"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "searchLabel": { "alias": "searchLabel"; "required": false; "isSignal": true; }; "sortLabel": { "alias": "sortLabel"; "required": false; "isSignal": true; }; "refreshLabel": { "alias": "refreshLabel"; "required": false; "isSignal": true; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; "isSignal": true; }; }, { "query": "queryChange"; "descending": "descendingChange"; "selected": "selected"; "refresh": "refresh"; }, ["itemContent"], never, true, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<NeuDataViewComponent, "neu-data-view", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "virtualHeight": { "alias": "virtualHeight"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "descending": { "alias": "descending"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "searchLabel": { "alias": "searchLabel"; "required": false; "isSignal": true; }; "sortLabel": { "alias": "sortLabel"; "required": false; "isSignal": true; }; "refreshLabel": { "alias": "refreshLabel"; "required": false; "isSignal": true; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; "isSignal": true; }; }, { "query": "queryChange"; "descending": "descendingChange"; "selected": "selected"; "refresh": "refresh"; }, ["itemContent"], never, true, never>;
33
37
  }
@@ -1,6 +1,6 @@
1
1
  import { booleanAttribute, Component, contentChild, input, model, output, computed, inject, } from '@angular/core';
2
2
  import { NgTemplateOutlet } from '@angular/common';
3
- import { View, Text } from '@ng-native/components';
3
+ import { View, Text, VirtualList, VirtualListRow } from '@ng-native/components';
4
4
  import { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';
5
5
  import { AnimatedStyle } from '@ng-native/components/animations';
6
6
  import { NeuDataViewRowMotionDirective } from './data-view-row.js';
@@ -20,10 +20,19 @@ export class NeuDataViewComponent {
20
20
  /** Explicit template takes precedence over a projected neuDataViewItem. */
21
21
  itemTemplate = input(/* @ts-ignore */
22
22
  ...(ngDevMode ? [undefined, { debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
23
+ /** A positive viewport height enables internally scrolling, measured rows. */
24
+ virtualHeight = input(/* @ts-ignore */
25
+ ...(ngDevMode ? [undefined, { debugName: "virtualHeight" }] : /* istanbul ignore next */ []));
23
26
  itemContent = contentChild(NeuDataViewItemDirective, /* @ts-ignore */
24
27
  ...(ngDevMode ? [{ debugName: "itemContent" }] : /* istanbul ignore next */ []));
25
28
  resolvedItemTemplate = computed(() => this.itemTemplate() ?? this.itemContent()?.templateRef, /* @ts-ignore */
26
29
  ...(ngDevMode ? [{ debugName: "resolvedItemTemplate" }] : /* istanbul ignore next */ []));
30
+ viewportHeight = computed(() => {
31
+ const height = this.virtualHeight();
32
+ return height !== undefined && Number.isFinite(height) && height > 0 ? height : undefined;
33
+ }, /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []));
35
+ itemKey = (item) => item.id;
27
36
  query = model('', /* @ts-ignore */
28
37
  ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
29
38
  descending = model(false, /* @ts-ignore */
@@ -67,7 +76,14 @@ export class NeuDataViewComponent {
67
76
  this.selected.emit(item.id);
68
77
  }
69
78
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuDataViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
70
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.2", type: NeuDataViewComponent, isStandalone: true, selector: "neu-data-view", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, descending: { classPropertyName: "descending", publicName: "descending", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, sortLabel: { classPropertyName: "sortLabel", publicName: "sortLabel", isSignal: true, isRequired: false, transformFunction: null }, refreshLabel: { classPropertyName: "refreshLabel", publicName: "refreshLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyLabel: { classPropertyName: "emptyLabel", publicName: "emptyLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { query: "queryChange", descending: "descendingChange", selected: "selected", refresh: "refresh" }, queries: [{ propertyName: "itemContent", first: true, predicate: NeuDataViewItemDirective, descendants: true, isSignal: true }], ngImport: i0, template: `<view class="stack"
79
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.2", type: NeuDataViewComponent, isStandalone: true, selector: "neu-data-view", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, virtualHeight: { classPropertyName: "virtualHeight", publicName: "virtualHeight", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, descending: { classPropertyName: "descending", publicName: "descending", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, sortLabel: { classPropertyName: "sortLabel", publicName: "sortLabel", isSignal: true, isRequired: false, transformFunction: null }, refreshLabel: { classPropertyName: "refreshLabel", publicName: "refreshLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyLabel: { classPropertyName: "emptyLabel", publicName: "emptyLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { query: "queryChange", descending: "descendingChange", selected: "selected", refresh: "refresh" }, queries: [{ propertyName: "itemContent", first: true, predicate: NeuDataViewItemDirective, descendants: true, isSignal: true }], ngImport: i0, template: `<ng-template #rowContents let-item let-index="index">
80
+ @if (resolvedItemTemplate(); as template) {
81
+ <ng-container [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ $implicit: item, index }" />
82
+ } @else {
83
+ <text class="title">{{ item.label }}</text><text class="muted">{{ item.description }}</text>
84
+ }
85
+ </ng-template>
86
+ <view class="stack"
71
87
  ><view class="data-toolbar"
72
88
  ><neu-icon-button
73
89
  [label]="sortLabel()"
@@ -97,22 +113,34 @@ export class NeuDataViewComponent {
97
113
  <neu-skeleton />
98
114
  } @else if (error()) {
99
115
  <neu-alert [message]="error()" />
116
+ } @else if (!displayed().length) {
117
+ <neu-empty-state [title]="emptyLabel()" />
118
+ } @else if (viewportHeight(); as height) {
119
+ <virtual-list #list [items]="displayed()" [keyExtractor]="itemKey"
120
+ [style.height]="height" [rowGap]="12" keyboardShouldPersistTaps="handled">
121
+ @for (row of list.window(); track row.slot) {
122
+ <view [virtualListRow]="row" [accessibilityElementsHidden]="!!row.parked"
123
+ [importantForAccessibility]="row.parked ? 'no-hide-descendants' : 'auto'">
124
+ @for (item of [row.item]; track item.id) {
125
+ <pressable class="data-item" [class.surface]="!resolvedItemTemplate()" [class.outline]="!resolvedItemTemplate()"
126
+ accessibilityRole="button" [accessibilityLabel]="item.label" [accessible]="!row.parked"
127
+ [disabled]="!!row.parked || !!item.disabled" (press)="!row.parked && choose(item)">
128
+ <ng-container [ngTemplateOutlet]="rowContents" [ngTemplateOutletContext]="{ $implicit: item, index: row.index }" />
129
+ </pressable>
130
+ }
131
+ </view>
132
+ }
133
+ </virtual-list>
100
134
  } @else {
101
135
  @for (item of displayed(); track item.id) {
102
136
  <pressable class="data-item" [neuDataRowIndex]="$index" #rowMotion="neuDataRowMotion"
103
137
  [animatedStyle]="rowMotion.animated" [class.surface]="!resolvedItemTemplate()" [class.outline]="!resolvedItemTemplate()"
104
138
  accessibilityRole="button" [accessibilityLabel]="item.label" [disabled]="!!item.disabled" (press)="choose(item)">
105
- @if (resolvedItemTemplate(); as template) {
106
- <ng-container [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ $implicit: item, index: $index }" />
107
- } @else {
108
- <text class="title">{{ item.label }}</text><text class="muted">{{ item.description }}</text>
109
- }
139
+ <ng-container [ngTemplateOutlet]="rowContents" [ngTemplateOutletContext]="{ $implicit: item, index: $index }" />
110
140
  </pressable>
111
- } @empty {
112
- <neu-empty-state [title]="emptyLabel()" />
113
141
  }
114
142
  }
115
- </view>`, isInline: true, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n", ".data-item { min-width: 0; } .data-toolbar { flex-direction: row; justify-content: flex-end; gap: 4px; }"], dependencies: [{ kind: "directive", type: NeuNativeTextSyncDirective, selector: "text-input[neuSyncText]", exportAs: ["neuSyncText"] }, { kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "directive", type: TextInput, selector: "text-input", inputs: ["neuralValue", "neuralRemeasure"], outputs: ["neuralValueChange"] }, { kind: "directive", type: Pressable, selector: "pressable", exportAs: ["pressable"] }, { kind: "directive", type: NeuDataViewRowMotionDirective, selector: "pressable[neuDataRowIndex]", inputs: ["neuDataRowIndex"], exportAs: ["neuDataRowMotion"] }, { kind: "directive", type: AnimatedStyle, selector: "[animatedStyle]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NeuIconButtonComponent, selector: "neu-icon-button", inputs: ["label", "svg", "variant", "tone", "disabled", "loading"], outputs: ["pressed"] }, { kind: "component", type: NeuSkeletonComponent, selector: "neu-skeleton", inputs: ["label", "lines", "variant", "width", "height", "borderRadius", "gap", "lastLineWidth", "animation"] }, { kind: "component", type: NeuAlertComponent, selector: "neu-alert", inputs: ["title", "tone", "variant", "showIcon", "svg", "message", "visible", "closable", "closeLabel"], outputs: ["visibleChange", "closed"] }, { kind: "component", type: NeuEmptyStateComponent, selector: "neu-empty-state", inputs: ["title", "description", "actionLabel"], outputs: ["action"] }] });
143
+ </view>`, isInline: true, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n", ".data-item { min-width: 0; } .data-toolbar { flex-direction: row; justify-content: flex-end; gap: 4px; }"], dependencies: [{ kind: "directive", type: NeuNativeTextSyncDirective, selector: "text-input[neuSyncText]", exportAs: ["neuSyncText"] }, { kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "directive", type: TextInput, selector: "text-input", inputs: ["neuralValue", "neuralRemeasure"], outputs: ["neuralValueChange"] }, { kind: "directive", type: Pressable, selector: "pressable", inputs: ["haptic"], exportAs: ["pressable"] }, { kind: "component", type: VirtualList, selector: "virtual-list", inputs: ["items", "itemHeight", "estimatedItemHeight", "contentPadding", "rowGap", "keyExtractor", "itemType", "maintainVisibleContentPosition", "overscan", "windowSize", "velocityLead", "endReachedThreshold", "horizontal", "inverted", "stickyIndices", "stickyHeader", "keyboardShouldPersistTaps", "itemVisiblePercentThreshold"], outputs: ["endReached", "viewableItemsChanged"], exportAs: ["virtualList"] }, { kind: "directive", type: VirtualListRow, selector: "[virtualListRow]", inputs: ["virtualListRow"] }, { kind: "directive", type: NeuDataViewRowMotionDirective, selector: "pressable[neuDataRowIndex]", inputs: ["neuDataRowIndex"], exportAs: ["neuDataRowMotion"] }, { kind: "directive", type: AnimatedStyle, selector: "[animatedStyle]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NeuIconButtonComponent, selector: "neu-icon-button", inputs: ["haptic", "label", "svg", "variant", "tone", "disabled", "loading"], outputs: ["pressed"] }, { kind: "component", type: NeuSkeletonComponent, selector: "neu-skeleton", inputs: ["label", "lines", "variant", "width", "height", "borderRadius", "gap", "lastLineWidth", "animation"] }, { kind: "component", type: NeuAlertComponent, selector: "neu-alert", inputs: ["title", "tone", "variant", "showIcon", "svg", "message", "visible", "closable", "closeLabel"], outputs: ["visibleChange", "closed"] }, { kind: "component", type: NeuEmptyStateComponent, selector: "neu-empty-state", inputs: ["title", "description", "actionLabel"], outputs: ["action"] }] });
116
144
  }
117
145
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuDataViewComponent, decorators: [{
118
146
  type: Component,
@@ -121,6 +149,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
121
149
  Text,
122
150
  TextInput,
123
151
  Pressable,
152
+ VirtualList,
153
+ VirtualListRow,
124
154
  NeuDataViewRowMotionDirective,
125
155
  AnimatedStyle,
126
156
  NgTemplateOutlet,
@@ -128,7 +158,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
128
158
  NeuSkeletonComponent,
129
159
  NeuAlertComponent,
130
160
  NeuEmptyStateComponent,
131
- ], template: `<view class="stack"
161
+ ], template: `<ng-template #rowContents let-item let-index="index">
162
+ @if (resolvedItemTemplate(); as template) {
163
+ <ng-container [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ $implicit: item, index }" />
164
+ } @else {
165
+ <text class="title">{{ item.label }}</text><text class="muted">{{ item.description }}</text>
166
+ }
167
+ </ng-template>
168
+ <view class="stack"
132
169
  ><view class="data-toolbar"
133
170
  ><neu-icon-button
134
171
  [label]="sortLabel()"
@@ -158,21 +195,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
158
195
  <neu-skeleton />
159
196
  } @else if (error()) {
160
197
  <neu-alert [message]="error()" />
198
+ } @else if (!displayed().length) {
199
+ <neu-empty-state [title]="emptyLabel()" />
200
+ } @else if (viewportHeight(); as height) {
201
+ <virtual-list #list [items]="displayed()" [keyExtractor]="itemKey"
202
+ [style.height]="height" [rowGap]="12" keyboardShouldPersistTaps="handled">
203
+ @for (row of list.window(); track row.slot) {
204
+ <view [virtualListRow]="row" [accessibilityElementsHidden]="!!row.parked"
205
+ [importantForAccessibility]="row.parked ? 'no-hide-descendants' : 'auto'">
206
+ @for (item of [row.item]; track item.id) {
207
+ <pressable class="data-item" [class.surface]="!resolvedItemTemplate()" [class.outline]="!resolvedItemTemplate()"
208
+ accessibilityRole="button" [accessibilityLabel]="item.label" [accessible]="!row.parked"
209
+ [disabled]="!!row.parked || !!item.disabled" (press)="!row.parked && choose(item)">
210
+ <ng-container [ngTemplateOutlet]="rowContents" [ngTemplateOutletContext]="{ $implicit: item, index: row.index }" />
211
+ </pressable>
212
+ }
213
+ </view>
214
+ }
215
+ </virtual-list>
161
216
  } @else {
162
217
  @for (item of displayed(); track item.id) {
163
218
  <pressable class="data-item" [neuDataRowIndex]="$index" #rowMotion="neuDataRowMotion"
164
219
  [animatedStyle]="rowMotion.animated" [class.surface]="!resolvedItemTemplate()" [class.outline]="!resolvedItemTemplate()"
165
220
  accessibilityRole="button" [accessibilityLabel]="item.label" [disabled]="!!item.disabled" (press)="choose(item)">
166
- @if (resolvedItemTemplate(); as template) {
167
- <ng-container [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ $implicit: item, index: $index }" />
168
- } @else {
169
- <text class="title">{{ item.label }}</text><text class="muted">{{ item.description }}</text>
170
- }
221
+ <ng-container [ngTemplateOutlet]="rowContents" [ngTemplateOutletContext]="{ $implicit: item, index: $index }" />
171
222
  </pressable>
172
- } @empty {
173
- <neu-empty-state [title]="emptyLabel()" />
174
223
  }
175
224
  }
176
225
  </view>`, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n", ".data-item { min-width: 0; } .data-toolbar { flex-direction: row; justify-content: flex-end; gap: 4px; }"] }]
177
- }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], itemContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NeuDataViewItemDirective), { isSignal: true }] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }, { type: i0.Output, args: ["queryChange"] }], descending: [{ type: i0.Input, args: [{ isSignal: true, alias: "descending", required: false }] }, { type: i0.Output, args: ["descendingChange"] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: false }] }], sortLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortLabel", required: false }] }], refreshLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "refreshLabel", required: false }] }], emptyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyLabel", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], refresh: [{ type: i0.Output, args: ["refresh"] }] } });
226
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], virtualHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualHeight", required: false }] }], itemContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NeuDataViewItemDirective), { isSignal: true }] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }, { type: i0.Output, args: ["queryChange"] }], descending: [{ type: i0.Input, args: [{ isSignal: true, alias: "descending", required: false }] }, { type: i0.Output, args: ["descendingChange"] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: false }] }], sortLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortLabel", required: false }] }], refreshLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "refreshLabel", required: false }] }], emptyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyLabel", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], refresh: [{ type: i0.Output, args: ["refresh"] }] } });
178
227
  //# sourceMappingURL=data-view.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-view.js","sourceRoot":"","sources":["../../src/data-view/data-view.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,GAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,EAAE,wBAAwB,EAA+B,MAAM,0BAA0B,CAAC;;AAmEjG,MAAM,OAAO,oBAAoB;IACtB,KAAK,GAAG,KAAK,CAAuB,EAAE;8EAAC,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;;;;;;;;;;;;;;;;;;UA6CF,4wIA1DE,0BAA0B,+FAClC,IAAI,iDACJ,IAAI,mYACJ,SAAS,mIACT,SAAS,+EACT,6BAA6B,oIAC7B,aAAa,4DACb,gBAAgB,oJAChB,sBAAsB,sJACtB,oBAAoB,wKACpB,iBAAiB,qMACjB,sBAAsB;;2FAmDb,oBAAoB;kBAhEhC,SAAS;+BACE,eAAe,WAChB,CAAC,0BAA0B;wBAClC,IAAI;wBACJ,IAAI;wBACJ,SAAS;wBACT,SAAS;wBACT,6BAA6B;wBAC7B,aAAa;wBACb,gBAAgB;wBAChB,sBAAsB;wBACtB,oBAAoB;wBACpB,iBAAiB;wBACjB,sBAAsB;qBACvB,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6CF;kSAQoC,wBAAwB","sourcesContent":["import {\n booleanAttribute,\n Component,\n contentChild,\n input,\n model,\n output,\n computed,\n inject,\n TemplateRef,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { View, Text } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { AnimatedStyle } from '@ng-native/components/animations';\nimport { NeuDataViewRowMotionDirective } from './data-view-row.js';\nimport { NeuNativeTextInput as TextInput } from '../foundation/native-text-input.js';\nimport { NeuOption, uniqueOptions } from '../foundation/mobile.js';\nimport { NeuIconButtonComponent } from '../icon-button/icon-button.js';\nimport { NeuSkeletonComponent } from '../skeleton/skeleton.js';\nimport { NeuAlertComponent } from '../alert/alert.js';\nimport { NeuEmptyStateComponent } from '../empty-state/empty-state.js';\nimport { NEU_LIGHT_TOKENS, NEU_THEME } from '../foundation/index.js';\n\nimport { NeuNativeTextSyncDirective } from '../foundation/native-text-sync.js';\n\nimport { NeuDataViewItemDirective, type NeuDataViewItemContext } from './data-view-templates.js';\nexport type { NeuDataViewItemContext } from './data-view-templates.js';\n\n@Component({\n selector: 'neu-data-view',\n imports: [NeuNativeTextSyncDirective, \n View,\n Text,\n TextInput,\n Pressable,\n NeuDataViewRowMotionDirective,\n AnimatedStyle,\n NgTemplateOutlet,\n NeuIconButtonComponent,\n NeuSkeletonComponent,\n NeuAlertComponent,\n NeuEmptyStateComponent,\n ],\n template: `<view class=\"stack\"\n ><view class=\"data-toolbar\"\n ><neu-icon-button\n [label]=\"sortLabel()\"\n [svg]=\"sortIcon\"\n tone=\"neutral\"\n variant=\"text\"\n (pressed)=\"descending.update(invert)\" /><neu-icon-button\n [label]=\"refreshLabel()\"\n [svg]=\"refreshIcon\"\n tone=\"neutral\"\n variant=\"text\"\n [disabled]=\"loading()\"\n (pressed)=\"refresh.emit()\"\n /></view>\n <text-input\n neuSyncText\n #textSync=\"neuSyncText\"\n (changeText)=\"textSync.synchronize()\"\n class=\"control\"\n [neuralValue]=\"query()\"\n (neuralValueChange)=\"query.set($event)\"\n [accessibilityLabel]=\"searchLabel()\"\n [placeholder]=\"searchLabel()\"\n [placeholderTextColor]=\"mutedColor()\"\n />\n @if (loading()) {\n <neu-skeleton />\n } @else if (error()) {\n <neu-alert [message]=\"error()\" />\n } @else {\n @for (item of displayed(); track item.id) {\n <pressable class=\"data-item\" [neuDataRowIndex]=\"$index\" #rowMotion=\"neuDataRowMotion\"\n [animatedStyle]=\"rowMotion.animated\" [class.surface]=\"!resolvedItemTemplate()\" [class.outline]=\"!resolvedItemTemplate()\"\n accessibilityRole=\"button\" [accessibilityLabel]=\"item.label\" [disabled]=\"!!item.disabled\" (press)=\"choose(item)\">\n @if (resolvedItemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\" />\n } @else {\n <text class=\"title\">{{ item.label }}</text><text class=\"muted\">{{ item.description }}</text>\n }\n </pressable>\n } @empty {\n <neu-empty-state [title]=\"emptyLabel()\" />\n }\n }\n </view>`,\n styleUrl: '../foundation/mobile.css',\n styles: '.data-item { min-width: 0; } .data-toolbar { flex-direction: row; justify-content: flex-end; gap: 4px; }',\n})\nexport class NeuDataViewComponent {\n readonly items = input<readonly NeuOption[]>([]);\n /** Explicit template takes precedence over a projected neuDataViewItem. */\n readonly itemTemplate = input<TemplateRef<NeuDataViewItemContext>>();\n private readonly itemContent = contentChild(NeuDataViewItemDirective);\n protected readonly resolvedItemTemplate = computed(() => this.itemTemplate() ?? this.itemContent()?.templateRef);\n readonly query = model('');\n readonly descending = model(false);\n readonly loading = input(false, { transform: booleanAttribute });\n readonly error = input('');\n readonly searchLabel = input('Search items');\n readonly sortLabel = input('Reverse order');\n readonly refreshLabel = input('Refresh');\n readonly emptyLabel = input('No items');\n readonly selected = output<string>();\n readonly refresh = output<void>();\n protected readonly sortIcon = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m7 4-3 3m3-3 3 3M7 4v16m10 0-3-3m3 3 3-3M17 4v16\"/></svg>';\n protected readonly refreshIcon = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 12a9 9 0 0 1 15.4-6.4L21 8M21 3v5h-5M21 12a9 9 0 0 1-15.4 6.4L3 16M3 21v-5h5\"/></svg>';\n private readonly theme = inject(NEU_THEME, { optional: true });\n protected readonly mutedColor = computed(\n () => (this.theme?.() ?? NEU_LIGHT_TOKENS).muted,\n );\n protected readonly invert = (x: boolean) => !x;\n private readonly searchable = computed(() =>\n uniqueOptions(this.items()).map((item) => ({\n item,\n text: (item.label + ' ' + (item.description ?? '')).toLocaleLowerCase(),\n })),\n );\n private readonly sorted = computed(() => {\n const direction = this.descending() ? -1 : 1;\n return [...this.searchable()].sort(\n (a, b) => a.item.label.localeCompare(b.item.label) * direction,\n );\n });\n protected readonly displayed = computed(() => {\n const q = this.query().trim().toLocaleLowerCase();\n return this.sorted().filter((row) => row.text.includes(q)).map((row) => row.item);\n });\n protected choose(item: NeuOption): void {\n if (!item.disabled && !this.loading()) this.selected.emit(item.id);\n }\n}\n"]}
1
+ {"version":3,"file":"data-view.js","sourceRoot":"","sources":["../../src/data-view/data-view.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,GAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,EAAE,wBAAwB,EAA+B,MAAM,0BAA0B,CAAC;;AAwFjG,MAAM,OAAO,oBAAoB;IACtB,KAAK,GAAG,KAAK,CAAuB,EAAE;8EAAC,CAAC;IACjD,2EAA2E;IAClE,YAAY,GAAG,KAAK;gGAAuC,CAAC;IACrE,8EAA8E;IACr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G,CAAC,IAAI,CAAC,CAAC;IACpF,CAAC;kFAAC,CAAC;IACO,MAAM,CAAC,IAAe;QAC9B,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrE,CAAC;uGAhDU,oBAAoB;2FAApB,oBAAoB,upDAMa,wBAAwB,gEA1E1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgEF,4wIA/EE,0BAA0B,+FAClC,IAAI,iDACJ,IAAI,mYACJ,SAAS,mIACT,SAAS,mGACT,WAAW,+cACX,cAAc,yFACd,6BAA6B,oIAC7B,aAAa,4DACb,gBAAgB,oJAChB,sBAAsB,gKACtB,oBAAoB,wKACpB,iBAAiB,qMACjB,sBAAsB;;2FAsEb,oBAAoB;kBArFhC,SAAS;+BACE,eAAe,WAChB,CAAC,0BAA0B;wBAClC,IAAI;wBACJ,IAAI;wBACJ,SAAS;wBACT,SAAS;wBACT,WAAW;wBACX,cAAc;wBACd,6BAA6B;wBAC7B,aAAa;wBACb,gBAAgB;wBAChB,sBAAsB;wBACtB,oBAAoB;wBACpB,iBAAiB;wBACjB,sBAAsB;qBACvB,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgEF;4YAUoC,wBAAwB","sourcesContent":["import {\n booleanAttribute,\n Component,\n contentChild,\n input,\n model,\n output,\n computed,\n inject,\n TemplateRef,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { View, Text, VirtualList, VirtualListRow } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { AnimatedStyle } from '@ng-native/components/animations';\nimport { NeuDataViewRowMotionDirective } from './data-view-row.js';\nimport { NeuNativeTextInput as TextInput } from '../foundation/native-text-input.js';\nimport { NeuOption, uniqueOptions } from '../foundation/mobile.js';\nimport { NeuIconButtonComponent } from '../icon-button/icon-button.js';\nimport { NeuSkeletonComponent } from '../skeleton/skeleton.js';\nimport { NeuAlertComponent } from '../alert/alert.js';\nimport { NeuEmptyStateComponent } from '../empty-state/empty-state.js';\nimport { NEU_LIGHT_TOKENS, NEU_THEME } from '../foundation/index.js';\n\nimport { NeuNativeTextSyncDirective } from '../foundation/native-text-sync.js';\n\nimport { NeuDataViewItemDirective, type NeuDataViewItemContext } from './data-view-templates.js';\nexport type { NeuDataViewItemContext } from './data-view-templates.js';\n\n@Component({\n selector: 'neu-data-view',\n imports: [NeuNativeTextSyncDirective,\n View,\n Text,\n TextInput,\n Pressable,\n VirtualList,\n VirtualListRow,\n NeuDataViewRowMotionDirective,\n AnimatedStyle,\n NgTemplateOutlet,\n NeuIconButtonComponent,\n NeuSkeletonComponent,\n NeuAlertComponent,\n NeuEmptyStateComponent,\n ],\n template: `<ng-template #rowContents let-item let-index=\"index\">\n @if (resolvedItemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item, index }\" />\n } @else {\n <text class=\"title\">{{ item.label }}</text><text class=\"muted\">{{ item.description }}</text>\n }\n </ng-template>\n <view class=\"stack\"\n ><view class=\"data-toolbar\"\n ><neu-icon-button\n [label]=\"sortLabel()\"\n [svg]=\"sortIcon\"\n tone=\"neutral\"\n variant=\"text\"\n (pressed)=\"descending.update(invert)\" /><neu-icon-button\n [label]=\"refreshLabel()\"\n [svg]=\"refreshIcon\"\n tone=\"neutral\"\n variant=\"text\"\n [disabled]=\"loading()\"\n (pressed)=\"refresh.emit()\"\n /></view>\n <text-input\n neuSyncText\n #textSync=\"neuSyncText\"\n (changeText)=\"textSync.synchronize()\"\n class=\"control\"\n [neuralValue]=\"query()\"\n (neuralValueChange)=\"query.set($event)\"\n [accessibilityLabel]=\"searchLabel()\"\n [placeholder]=\"searchLabel()\"\n [placeholderTextColor]=\"mutedColor()\"\n />\n @if (loading()) {\n <neu-skeleton />\n } @else if (error()) {\n <neu-alert [message]=\"error()\" />\n } @else if (!displayed().length) {\n <neu-empty-state [title]=\"emptyLabel()\" />\n } @else if (viewportHeight(); as height) {\n <virtual-list #list [items]=\"displayed()\" [keyExtractor]=\"itemKey\"\n [style.height]=\"height\" [rowGap]=\"12\" keyboardShouldPersistTaps=\"handled\">\n @for (row of list.window(); track row.slot) {\n <view [virtualListRow]=\"row\" [accessibilityElementsHidden]=\"!!row.parked\"\n [importantForAccessibility]=\"row.parked ? 'no-hide-descendants' : 'auto'\">\n @for (item of [row.item]; track item.id) {\n <pressable class=\"data-item\" [class.surface]=\"!resolvedItemTemplate()\" [class.outline]=\"!resolvedItemTemplate()\"\n accessibilityRole=\"button\" [accessibilityLabel]=\"item.label\" [accessible]=\"!row.parked\"\n [disabled]=\"!!row.parked || !!item.disabled\" (press)=\"!row.parked && choose(item)\">\n <ng-container [ngTemplateOutlet]=\"rowContents\" [ngTemplateOutletContext]=\"{ $implicit: item, index: row.index }\" />\n </pressable>\n }\n </view>\n }\n </virtual-list>\n } @else {\n @for (item of displayed(); track item.id) {\n <pressable class=\"data-item\" [neuDataRowIndex]=\"$index\" #rowMotion=\"neuDataRowMotion\"\n [animatedStyle]=\"rowMotion.animated\" [class.surface]=\"!resolvedItemTemplate()\" [class.outline]=\"!resolvedItemTemplate()\"\n accessibilityRole=\"button\" [accessibilityLabel]=\"item.label\" [disabled]=\"!!item.disabled\" (press)=\"choose(item)\">\n <ng-container [ngTemplateOutlet]=\"rowContents\" [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\" />\n </pressable>\n }\n }\n </view>`,\n styleUrl: '../foundation/mobile.css',\n styles: '.data-item { min-width: 0; } .data-toolbar { flex-direction: row; justify-content: flex-end; gap: 4px; }',\n})\nexport class NeuDataViewComponent {\n readonly items = input<readonly NeuOption[]>([]);\n /** Explicit template takes precedence over a projected neuDataViewItem. */\n readonly itemTemplate = input<TemplateRef<NeuDataViewItemContext>>();\n /** A positive viewport height enables internally scrolling, measured rows. */\n readonly virtualHeight = input<number>();\n private readonly itemContent = contentChild(NeuDataViewItemDirective);\n protected readonly resolvedItemTemplate = computed(() => this.itemTemplate() ?? this.itemContent()?.templateRef);\n protected readonly viewportHeight = computed(() => {\n const height = this.virtualHeight();\n return height !== undefined && Number.isFinite(height) && height > 0 ? height : undefined;\n });\n protected readonly itemKey = (item: NeuOption) => item.id;\n readonly query = model('');\n readonly descending = model(false);\n readonly loading = input(false, { transform: booleanAttribute });\n readonly error = input('');\n readonly searchLabel = input('Search items');\n readonly sortLabel = input('Reverse order');\n readonly refreshLabel = input('Refresh');\n readonly emptyLabel = input('No items');\n readonly selected = output<string>();\n readonly refresh = output<void>();\n protected readonly sortIcon = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m7 4-3 3m3-3 3 3M7 4v16m10 0-3-3m3 3 3-3M17 4v16\"/></svg>';\n protected readonly refreshIcon = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 12a9 9 0 0 1 15.4-6.4L21 8M21 3v5h-5M21 12a9 9 0 0 1-15.4 6.4L3 16M3 21v-5h5\"/></svg>';\n private readonly theme = inject(NEU_THEME, { optional: true });\n protected readonly mutedColor = computed(\n () => (this.theme?.() ?? NEU_LIGHT_TOKENS).muted,\n );\n protected readonly invert = (x: boolean) => !x;\n private readonly searchable = computed(() =>\n uniqueOptions(this.items()).map((item) => ({\n item,\n text: (item.label + ' ' + (item.description ?? '')).toLocaleLowerCase(),\n })),\n );\n private readonly sorted = computed(() => {\n const direction = this.descending() ? -1 : 1;\n return [...this.searchable()].sort(\n (a, b) => a.item.label.localeCompare(b.item.label) * direction,\n );\n });\n protected readonly displayed = computed(() => {\n const q = this.query().trim().toLocaleLowerCase();\n return this.sorted().filter((row) => row.text.includes(q)).map((row) => row.item);\n });\n protected choose(item: NeuOption): void {\n if (!item.disabled && !this.loading()) this.selected.emit(item.id);\n }\n}\n"]}
@@ -98,7 +98,7 @@ export class NeuDateInputComponent extends NeuTextControl {
98
98
  [disabled]="disabled()"
99
99
  [readonly]="readonly()"
100
100
  (valueChange)="choose($event)"
101
- /></neu-bottom-sheet>`, isInline: true, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n"], dependencies: [{ kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "directive", type: Pressable, selector: "pressable", exportAs: ["pressable"] }, { kind: "component", type: NeuBottomSheetComponent, selector: "neu-bottom-sheet", inputs: ["open", "title", "dismissible", "closeLabel", "height"], outputs: ["openChange", "closed", "opened", "dismissed"] }, { kind: "component", type: NeuCalendarComponent, selector: "neu-calendar", inputs: ["label", "value", "month", "locale", "firstDay", "min", "max", "disabled", "readonly", "previousLabel", "nextLabel", "previousYearLabel", "nextYearLabel", "previousYearsLabel", "nextYearsLabel", "events", "showAgenda", "editable", "agendaLabel", "emptyAgendaLabel", "hasEventsLabel", "addEventLabel", "editEventLabel", "deleteEventLabel"], outputs: ["valueChange", "monthChange", "eventCreateRequested", "eventEditRequested", "eventDeleteRequested", "touch"] }] });
101
+ /></neu-bottom-sheet>`, isInline: true, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n"], dependencies: [{ kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "directive", type: Pressable, selector: "pressable", inputs: ["haptic"], exportAs: ["pressable"] }, { kind: "component", type: NeuBottomSheetComponent, selector: "neu-bottom-sheet", inputs: ["open", "title", "dismissible", "closeLabel", "height"], outputs: ["openChange", "closed", "opened", "dismissed"] }, { kind: "component", type: NeuCalendarComponent, selector: "neu-calendar", inputs: ["label", "value", "month", "locale", "firstDay", "min", "max", "disabled", "readonly", "previousLabel", "nextLabel", "previousYearLabel", "nextYearLabel", "previousYearsLabel", "nextYearsLabel", "events", "showAgenda", "editable", "agendaLabel", "emptyAgendaLabel", "hasEventsLabel", "addEventLabel", "editEventLabel", "deleteEventLabel"], outputs: ["valueChange", "monthChange", "eventCreateRequested", "eventEditRequested", "eventDeleteRequested", "touch"] }] });
102
102
  }
103
103
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuDateInputComponent, decorators: [{
104
104
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"date-input.js","sourceRoot":"","sources":["../../src/date-input/date-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;;AAmDpD,MAAM,OAAO,qBAAsB,SAAQ,cAAc;IAC9C,GAAG,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AC,IAAY;QAC3B,IACE,IAAI,CAAC,QAAQ,EAAE;YACf,IAAI,CAAC,QAAQ,EAAE;YACf,CAAC,OAAO,CAAC,IAAI,CAAC;YACd,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAC1C,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAE1C,OAAO;QACT,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;uGAvCU,qBAAqB;2FAArB,qBAAqB,+kDAxCtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAqCc,gqIA3CtB,IAAI,iDACJ,IAAI,mYACJ,SAAS,+EACT,uBAAuB,yLACvB,oBAAoB;;2FA0CX,qBAAqB;kBAjDjC,SAAS;+BACE,gBAAgB,WACjB;wBACP,IAAI;wBACJ,IAAI;wBACJ,SAAS;wBACT,uBAAuB;wBACvB,oBAAoB;qBACrB,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAqCc","sourcesContent":["import { Component, input, computed, signal } from '@angular/core';\nimport { View, Text } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { NeuTextControl } from '../foundation/mobile.js';\nimport { NeuBottomSheetComponent } from '../bottom-sheet/bottom-sheet.js';\nimport { NeuCalendarComponent } from '../calendar/calendar.js';\nimport { isoDate } from '../foundation/calendar.js';\n\n@Component({\n selector: 'neu-date-input',\n imports: [\n View,\n Text,\n Pressable,\n NeuBottomSheetComponent,\n NeuCalendarComponent,\n ],\n template: `<view class=\"stack\"\n ><text class=\"label\">{{ label() }}</text\n ><pressable\n class=\"control\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"label()\"\n [accessibilityValue]=\"{ text: formatted() || placeholder() }\"\n [accessibilityState]=\"{\n expanded: open(),\n disabled: disabled() || readonly(),\n }\"\n [disabled]=\"disabled() || readonly()\"\n (press)=\"show()\"\n ><text class=\"label\">{{\n formatted() || placeholder()\n }}</text></pressable\n >\n @if (invalid() && error()) {\n <text class=\"error\" accessibilityRole=\"alert\">{{ error() }}</text>\n }</view\n ><neu-bottom-sheet [(open)]=\"open\" [title]=\"label()\" [closeLabel]=\"closeLabel()\"\n ><neu-calendar\n [label]=\"label()\"\n [showAgenda]=\"false\"\n [value]=\"value()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [locale]=\"locale()\"\n [previousLabel]=\"previousLabel()\"\n [nextLabel]=\"nextLabel()\"\n [previousYearLabel]=\"previousYearLabel()\"\n [nextYearLabel]=\"nextYearLabel()\"\n [previousYearsLabel]=\"previousYearsLabel()\"\n [nextYearsLabel]=\"nextYearsLabel()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (valueChange)=\"choose($event)\"\n /></neu-bottom-sheet>`,\n styleUrl: '../foundation/mobile.css',\n})\nexport class NeuDateInputComponent extends NeuTextControl {\n readonly min = input('');\n readonly max = input('');\n readonly locale = input('en');\n readonly placeholder = input('Choose date');\n readonly closeLabel = input('Close');\n readonly previousLabel = input('Previous month');\n readonly nextLabel = input('Next month');\n readonly previousYearLabel = input('Previous year');\n readonly nextYearLabel = input('Next year');\n readonly previousYearsLabel = input('Previous 12 years');\n readonly nextYearsLabel = input('Next 12 years');\n protected readonly open = signal(false);\n protected readonly formatted = computed(() => {\n const d = isoDate(this.value());\n if (!d) return '';\n try {\n return new Intl.DateTimeFormat(this.locale(), {\n dateStyle: 'medium',\n timeZone: 'UTC',\n }).format(d);\n } catch {\n return this.value();\n }\n });\n protected show(): void {\n if (!this.disabled() && !this.readonly()) this.open.set(true);\n }\n protected choose(date: string): void {\n if (\n this.disabled() ||\n this.readonly() ||\n !isoDate(date) ||\n (isoDate(this.min()) && date < this.min()) ||\n (isoDate(this.max()) && date > this.max())\n )\n return;\n this.accept(date);\n this.open.set(false);\n }\n}\n"]}
1
+ {"version":3,"file":"date-input.js","sourceRoot":"","sources":["../../src/date-input/date-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;;AAmDpD,MAAM,OAAO,qBAAsB,SAAQ,cAAc;IAC9C,GAAG,GAAG,KAAK,CAAC,EAAE;4EAAC,CAAC;IAChB,GAAG,GAAG,KAAK,CAAC,EAAE;4EAAC,CAAC;IAChB,MAAM,GAAG,KAAK,CAAC,IAAI;+EAAC,CAAC;IACrB,WAAW,GAAG,KAAK,CAAC,aAAa;oFAAC,CAAC;IACnC,UAAU,GAAG,KAAK,CAAC,OAAO;mFAAC,CAAC;IAC5B,aAAa,GAAG,KAAK,CAAC,gBAAgB;sFAAC,CAAC;IACxC,SAAS,GAAG,KAAK,CAAC,YAAY;kFAAC,CAAC;IAChC,iBAAiB,GAAG,KAAK,CAAC,eAAe;0FAAC,CAAC;IAC3C,aAAa,GAAG,KAAK,CAAC,WAAW;sFAAC,CAAC;IACnC,kBAAkB,GAAG,KAAK,CAAC,mBAAmB;2FAAC,CAAC;IAChD,cAAc,GAAG,KAAK,CAAC,eAAe;uFAAC,CAAC;IAC9B,IAAI,GAAG,MAAM,CAAC,KAAK;6EAAC,CAAC;IACr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AuB,yLACvB,oBAAoB;;2FA0CX,qBAAqB;kBAjDjC,SAAS;+BACE,gBAAgB,WACjB;wBACP,IAAI;wBACJ,IAAI;wBACJ,SAAS;wBACT,uBAAuB;wBACvB,oBAAoB;qBACrB,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAqCc","sourcesContent":["import { Component, input, computed, signal } from '@angular/core';\nimport { View, Text } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { NeuTextControl } from '../foundation/mobile.js';\nimport { NeuBottomSheetComponent } from '../bottom-sheet/bottom-sheet.js';\nimport { NeuCalendarComponent } from '../calendar/calendar.js';\nimport { isoDate } from '../foundation/calendar.js';\n\n@Component({\n selector: 'neu-date-input',\n imports: [\n View,\n Text,\n Pressable,\n NeuBottomSheetComponent,\n NeuCalendarComponent,\n ],\n template: `<view class=\"stack\"\n ><text class=\"label\">{{ label() }}</text\n ><pressable\n class=\"control\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"label()\"\n [accessibilityValue]=\"{ text: formatted() || placeholder() }\"\n [accessibilityState]=\"{\n expanded: open(),\n disabled: disabled() || readonly(),\n }\"\n [disabled]=\"disabled() || readonly()\"\n (press)=\"show()\"\n ><text class=\"label\">{{\n formatted() || placeholder()\n }}</text></pressable\n >\n @if (invalid() && error()) {\n <text class=\"error\" accessibilityRole=\"alert\">{{ error() }}</text>\n }</view\n ><neu-bottom-sheet [(open)]=\"open\" [title]=\"label()\" [closeLabel]=\"closeLabel()\"\n ><neu-calendar\n [label]=\"label()\"\n [showAgenda]=\"false\"\n [value]=\"value()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [locale]=\"locale()\"\n [previousLabel]=\"previousLabel()\"\n [nextLabel]=\"nextLabel()\"\n [previousYearLabel]=\"previousYearLabel()\"\n [nextYearLabel]=\"nextYearLabel()\"\n [previousYearsLabel]=\"previousYearsLabel()\"\n [nextYearsLabel]=\"nextYearsLabel()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (valueChange)=\"choose($event)\"\n /></neu-bottom-sheet>`,\n styleUrl: '../foundation/mobile.css',\n})\nexport class NeuDateInputComponent extends NeuTextControl {\n readonly min = input('');\n readonly max = input('');\n readonly locale = input('en');\n readonly placeholder = input('Choose date');\n readonly closeLabel = input('Close');\n readonly previousLabel = input('Previous month');\n readonly nextLabel = input('Next month');\n readonly previousYearLabel = input('Previous year');\n readonly nextYearLabel = input('Next year');\n readonly previousYearsLabel = input('Previous 12 years');\n readonly nextYearsLabel = input('Next 12 years');\n protected readonly open = signal(false);\n protected readonly formatted = computed(() => {\n const d = isoDate(this.value());\n if (!d) return '';\n try {\n return new Intl.DateTimeFormat(this.locale(), {\n dateStyle: 'medium',\n timeZone: 'UTC',\n }).format(d);\n } catch {\n return this.value();\n }\n });\n protected show(): void {\n if (!this.disabled() && !this.readonly()) this.open.set(true);\n }\n protected choose(date: string): void {\n if (\n this.disabled() ||\n this.readonly() ||\n !isoDate(date) ||\n (isoDate(this.min()) && date < this.min()) ||\n (isoDate(this.max()) && date > this.max())\n )\n return;\n this.accept(date);\n this.open.set(false);\n }\n}\n"]}
@@ -18,7 +18,7 @@ export class NeuEmptyStateComponent {
18
18
  @if (actionLabel()) {
19
19
  <neu-button [label]="actionLabel()" size="sm" (pressed)="action.emit()" />
20
20
  }
21
- </view>`, isInline: true, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n"], dependencies: [{ kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "component", type: NeuButtonComponent, selector: "neu-button", inputs: ["label", "accessibilityLabel", "variant", "tone", "size", "fullWidth", "disabled", "loading"], outputs: ["pressed"] }] });
21
+ </view>`, isInline: true, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n"], dependencies: [{ kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "component", type: NeuButtonComponent, selector: "neu-button", inputs: ["haptic", "label", "accessibilityLabel", "variant", "tone", "size", "fullWidth", "disabled", "loading"], outputs: ["pressed"] }] });
22
22
  }
23
23
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuEmptyStateComponent, decorators: [{
24
24
  type: Component,
@@ -81,7 +81,7 @@ export class NeuFilterBarComponent {
81
81
  [disabled]="disabled() || !!option.disabled" (selectedChange)="toggle(option.id, $event)" />
82
82
  }
83
83
  </view>
84
- </view>`, isInline: true, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n", ".filter-bar {\n gap: 8px;\n}\n.filter-search {\n gap: 10px;\n}\n.filter-search-focused {\n border-color: var(--neu-accent, #3155d9);\n border-width: 2px;\n padding: 11px;\n}\n.filter-search-input {\n flex: 1;\n min-width: 0;\n min-height: 24px;\n padding: 0;\n color: var(--neu-text, #172033);\n font-size: 16px;\n}\n.filter-heading {\n justify-content: space-between;\n gap: 12px;\n}\n.filter-label {\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n}\n.filter-options {\n gap: 8px;\n}\n"], dependencies: [{ kind: "directive", type: NeuNativeTextSyncDirective, selector: "text-input[neuSyncText]", exportAs: ["neuSyncText"] }, { kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "directive", type: TextInput, selector: "text-input", inputs: ["neuralValue", "neuralRemeasure"], outputs: ["neuralValueChange"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "color", "strokeWidth", "accessibilityLabel"] }, { kind: "component", type: NeuChipComponent, selector: "neu-chip", inputs: ["label", "tone", "selected", "selectable", "removable", "disabled", "removeLabel"], outputs: ["selectedChange", "removed"] }, { kind: "component", type: NeuButtonComponent, selector: "neu-button", inputs: ["label", "accessibilityLabel", "variant", "tone", "size", "fullWidth", "disabled", "loading"], outputs: ["pressed"] }] });
84
+ </view>`, isInline: true, styles: [".neu-unavailable > * {\n /* Fade presentation children without changing the accessible action's own alpha. */\n opacity: 0.45;\n}\n.stack {\n gap: 12px;\n}\n.row {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n.wrap {\n flex-wrap: wrap;\n}\n.grow {\n flex: 1;\n}\n.surface {\n padding: 16px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-surface-radius, 16px);\n gap: 12px;\n}\n.outline {\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.title {\n color: var(--neu-text, #172033);\n font-size: var(--neu-heading-size, 18px);\n line-height: 24px;\n font-weight: 600;\n flex-shrink: 1;\n}\n.label {\n color: var(--neu-text, #172033);\n font-size: 16px;\n flex-shrink: 1;\n}\n.muted {\n color: var(--neu-muted, #596477);\n font-size: var(--neu-label-size, 14px);\n line-height: 20px;\n flex-shrink: 1;\n}\n.error {\n color: var(--neu-danger-ink, #b3261e);\n font-size: 14px;\n}\n.action {\n min-height: 48px;\n min-width: 48px;\n padding: 12px;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.selected-text {\n color: var(--neu-on-accent, #ffffff);\n font-size: 16px;\n}\n.control {\n min-height: 48px;\n padding: 12px;\n font-size: 16px;\n color: var(--neu-text, #172033);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n border-radius: var(--neu-control-radius, 10px);\n background-color: var(--neu-surface, #ffffff);\n}\n.track {\n height: 8px;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.fill {\n height: 8px;\n background-color: var(--neu-accent, #3155d9);\n}\n.dot {\n width: 20px;\n height: 20px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n border-radius: 10px;\n}\n.dot-selected {\n background-color: var(--neu-accent, #3155d9);\n}\n.avatar {\n width: 48px;\n height: 48px;\n border-radius: 24px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-tonal, #e9edfc);\n overflow: hidden;\n}\n.avatar-image {\n width: 48px;\n height: 48px;\n}\n.backdrop {\n flex: 1;\n background-color: rgba(0, 0, 0, 0.4);\n justify-content: center;\n padding: 16px;\n}\n.bottom {\n justify-content: flex-end;\n}\n.modal-layout {\n flex: 1;\n justify-content: center;\n}\n.modal-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.scroll-content {\n padding-right: 12px;\n}\n.sheet {\n padding: 20px;\n background-color: var(--neu-surface, #ffffff);\n border-radius: var(--neu-dialog-radius, 24px);\n gap: 16px;\n max-height: 90%;\n}\n.full {\n flex: 1;\n}\n.sheet-background {\n background-color: var(--neu-surface, #ffffff);\n}\n.page-sheet {\n max-height: 100%;\n border-radius: 0;\n}\n.thumb {\n width: 72px;\n height: 72px;\n border-radius: 12px;\n}\n.hero {\n height: 240px;\n width: 100%;\n}\n.divider {\n height: 1px;\n background-color: var(--neu-divider, #e7ebf0);\n}\n.skeleton {\n background-color: var(--neu-border, #a5afbf);\n border-radius: 8px;\n}\n.pill {\n padding: 4px 10px;\n border-radius: 16px;\n background-color: var(--neu-tonal, #e9edfc);\n}\n.calendar-grid {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n}\n.calendar-day {\n width: 14.2857%;\n min-width: 0;\n min-height: 48px;\n padding: 4px;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n.speed-dial {\n align-items: flex-end;\n}\n.fab {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #3155d9);\n}\n.fab-label {\n color: var(--neu-on-accent, #ffffff);\n font-size: 28px;\n}\n.slider-track {\n width: 100%;\n height: 24px;\n position: relative;\n}\n.slider-rail {\n position: absolute;\n top: 8px;\n}\n.slider-thumb {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n border-width: 2px;\n border-color: var(--neu-accent, #3155d9);\n background-color: var(--neu-on-accent, #ffffff);\n position: absolute;\n top: 0;\n}\n", ".filter-bar {\n gap: 8px;\n}\n.filter-search {\n gap: 10px;\n}\n.filter-search-focused {\n border-color: var(--neu-accent, #3155d9);\n border-width: 2px;\n padding: 11px;\n}\n.filter-search-input {\n flex: 1;\n min-width: 0;\n min-height: 24px;\n padding: 0;\n color: var(--neu-text, #172033);\n font-size: 16px;\n}\n.filter-heading {\n justify-content: space-between;\n gap: 12px;\n}\n.filter-label {\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n}\n.filter-options {\n gap: 8px;\n}\n"], dependencies: [{ kind: "directive", type: NeuNativeTextSyncDirective, selector: "text-input[neuSyncText]", exportAs: ["neuSyncText"] }, { kind: "directive", type: View, selector: "view" }, { kind: "directive", type: Text, selector: "text", inputs: ["numberOfLines", "ellipsizeMode", "selectable", "selectionColor", "allowFontScaling", "maxFontSizeMultiplier", "dynamicTypeRamp", "adjustsFontSizeToFit", "minimumFontScale", "lineBreakStrategyIOS", "textBreakStrategy", "dataDetectorType", "android_hyphenationFrequency", "pressable", "suppressHighlighting"], exportAs: ["text"] }, { kind: "directive", type: TextInput, selector: "text-input", inputs: ["neuralValue", "neuralRemeasure"], outputs: ["neuralValueChange"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "color", "strokeWidth", "accessibilityLabel"] }, { kind: "component", type: NeuChipComponent, selector: "neu-chip", inputs: ["label", "tone", "selected", "selectable", "removable", "disabled", "removeLabel"], outputs: ["selectedChange", "removed"] }, { kind: "component", type: NeuButtonComponent, selector: "neu-button", inputs: ["haptic", "label", "accessibilityLabel", "variant", "tone", "size", "fullWidth", "disabled", "loading"], outputs: ["pressed"] }] });
85
85
  }
86
86
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuFilterBarComponent, decorators: [{
87
87
  type: Component,
@@ -106,7 +106,7 @@ export class NeuAnchoredOverlayComponent {
106
106
  </scroll-view>
107
107
  </view>
108
108
  </view>
109
- </modal>`, isInline: true, styles: [".overlay-root {\n flex: 1;\n}\n.overlay-dismiss {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.overlay-popup {\n position: absolute;\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n border-radius: var(--neu-overlay-radius, 16px);\n background-color: var(--neu-surface, #ffffff);\n overflow: hidden;\n}\n.overlay-scroll {\n flex: 1;\n min-height: 0;\n}\n.overlay-content {\n padding: 6px;\n padding-right: 6px;\n}\n"], dependencies: [{ kind: "component", type: Modal, selector: "modal", inputs: ["visible", "transparent", "backdropColor", "animationType", "presentationStyle", "supportedOrientations", "allowSwipeDismissal", "statusBarTranslucent", "navigationBarTranslucent", "hardwareAccelerated"] }, { kind: "directive", type: Pressable, selector: "pressable", exportAs: ["pressable"] }, { kind: "component", type: ScrollView, selector: "scroll-view", inputs: ["contentContainerStyle", "contentContainerClass", "horizontal", "contentOffset", "maintainVisibleContentPosition", "keyboardShouldPersistTaps", "nestedScrollEnabled", "stickyHeaderIndices"], outputs: ["contentSizeChange"], exportAs: ["scrollView"] }, { kind: "directive", type: View, selector: "view" }, { kind: "directive", type: AnimatedStyle, selector: "[animatedStyle]" }] });
109
+ </modal>`, isInline: true, styles: [".overlay-root {\n flex: 1;\n}\n.overlay-dismiss {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.overlay-popup {\n position: absolute;\n border-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n border-radius: var(--neu-overlay-radius, 16px);\n background-color: var(--neu-surface, #ffffff);\n overflow: hidden;\n}\n.overlay-scroll {\n flex: 1;\n min-height: 0;\n}\n.overlay-content {\n padding: 6px;\n padding-right: 6px;\n}\n"], dependencies: [{ kind: "component", type: Modal, selector: "modal", inputs: ["visible", "transparent", "backdropColor", "animationType", "presentationStyle", "supportedOrientations", "allowSwipeDismissal", "statusBarTranslucent", "navigationBarTranslucent", "hardwareAccelerated", "anchor"] }, { kind: "directive", type: Pressable, selector: "pressable", inputs: ["haptic"], exportAs: ["pressable"] }, { kind: "component", type: ScrollView, selector: "scroll-view", inputs: ["contentContainerStyle", "contentContainerClass", "horizontal", "contentOffset", "maintainVisibleContentPosition", "keyboardShouldPersistTaps", "nestedScrollEnabled", "stickyHeaderIndices"], outputs: ["contentSizeChange"], exportAs: ["scrollView"] }, { kind: "directive", type: View, selector: "view" }, { kind: "directive", type: AnimatedStyle, selector: "[animatedStyle]" }] });
110
110
  }
111
111
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuAnchoredOverlayComponent, decorators: [{
112
112
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"anchored-overlay.js","sourceRoot":"","sources":["../../src/foundation/anchored-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC7H,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAoB,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,kBAAkB,IAA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from '@angular/core';\nimport { Modal, ScrollView, View, type LayoutEvent } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from './native-pressable.js';\nimport { HostEngine, type HostNode } from '@ng-native/fabric';\nimport { Keyboard, SafeArea } from '@ng-native/device';\nimport { anchoredLayout } from './anchored-layout.js';\nimport { AnimatedStyle } from '@ng-native/components/animations';\nimport { neuPresence } from './motion.js';\n\n/** Internal anchored surface shared by native popup controls. */\n@Component({\n selector: 'neu-anchored-overlay',\n imports: [Modal, Pressable, ScrollView, View, AnimatedStyle],\n template: `<modal [supportedOrientations]=\"['portrait', 'landscape']\" [visible]=\"motion.visible()\" [transparent]=\"true\" animationType=\"none\"\n presentationStyle=\"overFullScreen\" [statusBarTranslucent]=\"false\"\n (requestClose)=\"open.set(false)\" (show)=\"measure()\">\n <view class=\"overlay-root\" [collapsable]=\"false\" (layout)=\"layout($event)\"\n [pointerEvents]=\"open() ? 'auto' : 'none'\" [accessibilityElementsHidden]=\"!open()\"\n [importantForAccessibility]=\"open() ? 'auto' : 'no-hide-descendants'\">\n <pressable class=\"overlay-dismiss\" accessibilityRole=\"button\"\n [accessibilityLabel]=\"closeLabel()\" (press)=\"open.set(false)\" />\n <view class=\"overlay-popup\" [style.left]=\"position().left\" [style.width]=\"position().width\"\n [animatedStyle]=\"popupStyle\"\n [style.top]=\"position().top\" [style.bottom]=\"position().bottom\"\n [style.height]=\"popupHeight()\"\n [style.maxHeight]=\"position().height\" [accessibilityViewIsModal]=\"open()\">\n <scroll-view class=\"overlay-scroll\" keyboardShouldPersistTaps=\"handled\"\n (contentSizeChange)=\"contentHeight.set($event.height)\">\n <view class=\"overlay-content\"><ng-content /></view>\n </scroll-view>\n </view>\n </view>\n </modal>`,\n styleUrl: './anchored-overlay.css',\n})\nexport class NeuAnchoredOverlayComponent {\n readonly open = model(false);\n // The popup is remeasured after its Modal mounts. JS frames keep opacity in sync\n // with those layout commits instead of reconnecting a native animation tag.\n protected readonly motion = neuPresence(this.open, false);\n protected readonly popupStyle = { opacity: this.motion.progress };\n readonly anchor = input<HostNode>();\n readonly closeLabel = input('Dismiss options');\n readonly minimumWidth = input(160);\n readonly gap = input(8);\n private readonly engine = inject(HostEngine);\n private readonly keyboard = inject(Keyboard);\n private readonly safeArea = inject(SafeArea);\n private readonly destroy = inject(DestroyRef);\n private readonly origin = viewChild(View, { read: ElementRef<HostNode> });\n private measurement = 0;\n private readonly viewport = signal({ width: 360, height: 800 });\n private readonly frame = signal({ x: 16, y: 64, width: 328, height: 48 });\n private readonly windowOrigin = signal({ x: 0, y: 0 });\n protected readonly position = signal<{ left: number; width: number; top: number | null; bottom: number | null; height: number }>({ left: 16, width: 328, top: 120, bottom: null, height: 320 });\n protected readonly contentHeight = signal(0);\n // A native ScrollView needs a bounded viewport before it can measure its content.\n protected readonly popupHeight = computed(() => {\n const height = this.contentHeight(), available = this.position().height;\n return height > 0 ? Math.min(available, height + 2) : available;\n });\n constructor() {\n effect(() => {\n if (this.open() && this.anchor() && this.origin()) this.measure();\n else this.measurement++;\n });\n effect(() => {\n const view = this.viewport(), anchor = this.frame();\n const keyboard = this.keyboard.position();\n const keyboardTop = this.keyboard.visible()\n ? (keyboard.screenY ?? view.height - keyboard.height) - this.windowOrigin().y\n : undefined;\n this.position.set(anchoredLayout(view, anchor, this.minimumWidth(), this.gap(), keyboardTop, this.safeArea.insets()));\n });\n }\n protected layout(event: LayoutEvent): void {\n const { width, height } = event.nativeEvent.layout;\n if (width > 0 && height > 0) { this.viewport.set({ width, height }); this.measure(); }\n }\n protected measure(): void {\n const anchor = this.anchor(), origin = this.origin()?.nativeElement;\n if (!anchor || !origin || !this.open()) return;\n const measurement = ++this.measurement;\n const active = () => !this.destroy.destroyed && this.open() && this.anchor() === anchor && measurement === this.measurement;\n this.engine.measure(origin, originFrame => {\n if (!active()) return;\n this.windowOrigin.set({ x: originFrame.x, y: originFrame.y });\n if (originFrame.width > 0 && originFrame.height > 0) this.viewport.set({ width: originFrame.width, height: originFrame.height });\n this.engine.measure(anchor, frame => {\n if (active()) this.frame.set({ ...frame, x: frame.x - originFrame.x, y: frame.y - originFrame.y });\n });\n });\n }\n}\n"]}
1
+ {"version":3,"file":"anchored-overlay.js","sourceRoot":"","sources":["../../src/foundation/anchored-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC7H,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAoB,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAiB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;;AAE1C,iEAAiE;AA0BjE,MAAM,OAAO,2BAA2B;IAC7B,IAAI,GAAG,KAAK,CAAC,KAAK;6EAAC,CAAC;IAC7B,iFAAiF;IACjF,4EAA4E;IACzD,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvC,UAAU,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IACzD,MAAM,GAAG,KAAK;0FAAY,CAAC;IAC3B,UAAU,GAAG,KAAK,CAAC,iBAAiB;mFAAC,CAAC;IACtC,YAAY,GAAG,KAAK,CAAC,GAAG;qFAAC,CAAC;IAC1B,GAAG,GAAG,KAAK,CAAC,CAAC;4EAAC,CAAC;IACP,MAAM,GAAG,MAAM,CAA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2BAA2B;2FAA3B,2BAA2B,2xBAcF,IAAI,2BAAU,UAAU,6CApClD;;;;;;;;;;;;;;;;;;;WAmBD,8iBApBC,KAAK,kRAAE,SAAS,mGAAE,UAAU,0TAAE,IAAI,iDAAE,aAAa;;2FAuBhD,2BAA2B;kBAzBvC,SAAS;+BACE,sBAAsB,WACvB,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,CAAC,YAClD;;;;;;;;;;;;;;;;;;;WAmBD;mnBAiB2B,IAAI,QAAE,EAAE,IAAI,EAAE,CAAA,UAAoB,CAAA,EAAE","sourcesContent":["import { Component, DestroyRef, ElementRef, computed, effect, inject, input, model, signal, viewChild } from '@angular/core';\nimport { Modal, ScrollView, View, type LayoutEvent } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from './native-pressable.js';\nimport { HostEngine, type HostNode } from '@ng-native/fabric';\nimport { Keyboard, SafeArea } from '@ng-native/device';\nimport { anchoredLayout } from './anchored-layout.js';\nimport { AnimatedStyle } from '@ng-native/components/animations';\nimport { neuPresence } from './motion.js';\n\n/** Internal anchored surface shared by native popup controls. */\n@Component({\n selector: 'neu-anchored-overlay',\n imports: [Modal, Pressable, ScrollView, View, AnimatedStyle],\n template: `<modal [supportedOrientations]=\"['portrait', 'landscape']\" [visible]=\"motion.visible()\" [transparent]=\"true\" animationType=\"none\"\n presentationStyle=\"overFullScreen\" [statusBarTranslucent]=\"false\"\n (requestClose)=\"open.set(false)\" (show)=\"measure()\">\n <view class=\"overlay-root\" [collapsable]=\"false\" (layout)=\"layout($event)\"\n [pointerEvents]=\"open() ? 'auto' : 'none'\" [accessibilityElementsHidden]=\"!open()\"\n [importantForAccessibility]=\"open() ? 'auto' : 'no-hide-descendants'\">\n <pressable class=\"overlay-dismiss\" accessibilityRole=\"button\"\n [accessibilityLabel]=\"closeLabel()\" (press)=\"open.set(false)\" />\n <view class=\"overlay-popup\" [style.left]=\"position().left\" [style.width]=\"position().width\"\n [animatedStyle]=\"popupStyle\"\n [style.top]=\"position().top\" [style.bottom]=\"position().bottom\"\n [style.height]=\"popupHeight()\"\n [style.maxHeight]=\"position().height\" [accessibilityViewIsModal]=\"open()\">\n <scroll-view class=\"overlay-scroll\" keyboardShouldPersistTaps=\"handled\"\n (contentSizeChange)=\"contentHeight.set($event.height)\">\n <view class=\"overlay-content\"><ng-content /></view>\n </scroll-view>\n </view>\n </view>\n </modal>`,\n styleUrl: './anchored-overlay.css',\n})\nexport class NeuAnchoredOverlayComponent {\n readonly open = model(false);\n // The popup is remeasured after its Modal mounts. JS frames keep opacity in sync\n // with those layout commits instead of reconnecting a native animation tag.\n protected readonly motion = neuPresence(this.open, false);\n protected readonly popupStyle = { opacity: this.motion.progress };\n readonly anchor = input<HostNode>();\n readonly closeLabel = input('Dismiss options');\n readonly minimumWidth = input(160);\n readonly gap = input(8);\n private readonly engine = inject(HostEngine);\n private readonly keyboard = inject(Keyboard);\n private readonly safeArea = inject(SafeArea);\n private readonly destroy = inject(DestroyRef);\n private readonly origin = viewChild(View, { read: ElementRef<HostNode> });\n private measurement = 0;\n private readonly viewport = signal({ width: 360, height: 800 });\n private readonly frame = signal({ x: 16, y: 64, width: 328, height: 48 });\n private readonly windowOrigin = signal({ x: 0, y: 0 });\n protected readonly position = signal<{ left: number; width: number; top: number | null; bottom: number | null; height: number }>({ left: 16, width: 328, top: 120, bottom: null, height: 320 });\n protected readonly contentHeight = signal(0);\n // A native ScrollView needs a bounded viewport before it can measure its content.\n protected readonly popupHeight = computed(() => {\n const height = this.contentHeight(), available = this.position().height;\n return height > 0 ? Math.min(available, height + 2) : available;\n });\n constructor() {\n effect(() => {\n if (this.open() && this.anchor() && this.origin()) this.measure();\n else this.measurement++;\n });\n effect(() => {\n const view = this.viewport(), anchor = this.frame();\n const keyboard = this.keyboard.position();\n const keyboardTop = this.keyboard.visible()\n ? (keyboard.screenY ?? view.height - keyboard.height) - this.windowOrigin().y\n : undefined;\n this.position.set(anchoredLayout(view, anchor, this.minimumWidth(), this.gap(), keyboardTop, this.safeArea.insets()));\n });\n }\n protected layout(event: LayoutEvent): void {\n const { width, height } = event.nativeEvent.layout;\n if (width > 0 && height > 0) { this.viewport.set({ width, height }); this.measure(); }\n }\n protected measure(): void {\n const anchor = this.anchor(), origin = this.origin()?.nativeElement;\n if (!anchor || !origin || !this.open()) return;\n const measurement = ++this.measurement;\n const active = () => !this.destroy.destroyed && this.open() && this.anchor() === anchor && measurement === this.measurement;\n this.engine.measure(origin, originFrame => {\n if (!active()) return;\n this.windowOrigin.set({ x: originFrame.x, y: originFrame.y });\n if (originFrame.width > 0 && originFrame.height > 0) this.viewport.set({ width: originFrame.width, height: originFrame.height });\n this.engine.measure(anchor, frame => {\n if (active()) this.frame.set({ ...frame, x: frame.x - originFrame.x, y: frame.y - originFrame.y });\n });\n });\n }\n}\n"]}