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

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 (122) 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.js +1 -1
  28. package/dist/data-view/data-view.js.map +1 -1
  29. package/dist/date-input/date-input.js +1 -1
  30. package/dist/date-input/date-input.js.map +1 -1
  31. package/dist/empty-state/empty-state.js +1 -1
  32. package/dist/filter-bar/filter-bar.js +1 -1
  33. package/dist/foundation/anchored-overlay.js +1 -1
  34. package/dist/foundation/anchored-overlay.js.map +1 -1
  35. package/dist/foundation/haptics.d.ts +30 -0
  36. package/dist/foundation/haptics.js +53 -0
  37. package/dist/foundation/haptics.js.map +1 -0
  38. package/dist/foundation/index.d.ts +1 -0
  39. package/dist/foundation/index.js +1 -0
  40. package/dist/foundation/index.js.map +1 -1
  41. package/dist/foundation/native-pressable.d.ts +5 -1
  42. package/dist/foundation/native-pressable.js +13 -3
  43. package/dist/foundation/native-pressable.js.map +1 -1
  44. package/dist/gallery/gallery.d.ts +1 -0
  45. package/dist/gallery/gallery.js +24 -11
  46. package/dist/gallery/gallery.js.map +1 -1
  47. package/dist/haptics/index.d.ts +12 -0
  48. package/dist/haptics/index.js +36 -0
  49. package/dist/haptics/index.js.map +1 -0
  50. package/dist/icon-button/icon-button.d.ts +3 -1
  51. package/dist/icon-button/icon-button.js +7 -3
  52. package/dist/icon-button/icon-button.js.map +1 -1
  53. package/dist/image-viewer/image-viewer.js +1 -1
  54. package/dist/image-viewer/image-viewer.js.map +1 -1
  55. package/dist/inline-editor/inline-editor.js +1 -1
  56. package/dist/inline-editor/inline-editor.js.map +1 -1
  57. package/dist/input-mask/input-mask.d.ts +2 -0
  58. package/dist/input-mask/input-mask.js +7 -1
  59. package/dist/input-mask/input-mask.js.map +1 -1
  60. package/dist/input-otp/input-otp.js +1 -1
  61. package/dist/input-otp/input-otp.js.map +1 -1
  62. package/dist/input-tags/input-tags.d.ts +2 -0
  63. package/dist/input-tags/input-tags.js +8 -3
  64. package/dist/input-tags/input-tags.js.map +1 -1
  65. package/dist/listbox/listbox.js +1 -1
  66. package/dist/listbox/listbox.js.map +1 -1
  67. package/dist/menu/menu.js +1 -1
  68. package/dist/menu/menu.js.map +1 -1
  69. package/dist/modal/modal.js +1 -1
  70. package/dist/modal/modal.js.map +1 -1
  71. package/dist/nav/nav.js +1 -1
  72. package/dist/nav/nav.js.map +1 -1
  73. package/dist/notification-center/notification-center.js +1 -1
  74. package/dist/notification-center/notification-center.js.map +1 -1
  75. package/dist/number-input/number-input.js +1 -1
  76. package/dist/number-input/number-input.js.map +1 -1
  77. package/dist/panel/panel.js +1 -1
  78. package/dist/panel/panel.js.map +1 -1
  79. package/dist/password/password.js +1 -1
  80. package/dist/pick-list/pick-list.js +1 -1
  81. package/dist/pick-list/pick-list.js.map +1 -1
  82. package/dist/popover/popover.js +1 -1
  83. package/dist/popover/popover.js.map +1 -1
  84. package/dist/radio/radio.d.ts +4 -1
  85. package/dist/radio/radio.js +13 -4
  86. package/dist/radio/radio.js.map +1 -1
  87. package/dist/rating/rating.js +1 -1
  88. package/dist/rating/rating.js.map +1 -1
  89. package/dist/select/select.js +1 -1
  90. package/dist/select/select.js.map +1 -1
  91. package/dist/sidebar/sidebar.js +1 -1
  92. package/dist/sidebar/sidebar.js.map +1 -1
  93. package/dist/slider/slider.d.ts +4 -1
  94. package/dist/slider/slider.js +12 -3
  95. package/dist/slider/slider.js.map +1 -1
  96. package/dist/speed-dial/speed-dial.js +1 -1
  97. package/dist/speed-dial/speed-dial.js.map +1 -1
  98. package/dist/spinner/spinner.js +1 -1
  99. package/dist/spinner/spinner.js.map +1 -1
  100. package/dist/stepper/stepper.js +1 -1
  101. package/dist/stepper/stepper.js.map +1 -1
  102. package/dist/switch/switch.d.ts +4 -1
  103. package/dist/switch/switch.js +10 -4
  104. package/dist/switch/switch.js.map +1 -1
  105. package/dist/tabs/tabs.js +1 -1
  106. package/dist/tabs/tabs.js.map +1 -1
  107. package/dist/toast/toast.js +1 -1
  108. package/dist/toast/toast.js.map +1 -1
  109. package/dist/toggle-button-group/toggle-button-group.js +1 -1
  110. package/dist/toggle-button-group/toggle-button-group.js.map +1 -1
  111. package/dist/toolbar/toolbar.js +1 -1
  112. package/dist/toolbar/toolbar.js.map +1 -1
  113. package/dist/tree/tree.js +1 -1
  114. package/dist/tree/tree.js.map +1 -1
  115. package/dist/tree-select/tree-select.js +1 -1
  116. package/dist/tree-select/tree-select.js.map +1 -1
  117. package/dist/uploader/uploader.d.ts +1 -1
  118. package/dist/uploader/uploader.js +1 -1
  119. package/dist/uploader/uploader.js.map +1 -1
  120. package/dist/virtual-list/virtual-list.js +1 -1
  121. package/dist/virtual-list/virtual-list.js.map +1 -1
  122. package/package.json +22 -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,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;;AAqClD,MAAM,OAAO,uBAAuB;IACzB,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU,CAAC;IACjC,KAAK,GAAG,KAAK,CAAuB,EAAE;8EAAC,CAAC;IACxC,IAAI,GAAG,KAAK,CAAC,wBAAwB;6EAAC,CAA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S;+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,MAAM,mCAAmC,CAAC;AAGpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;;AAqClD,MAAM,OAAO,uBAAuB;IACzB,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU,CAAC;IACjC,KAAK,GA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E,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"]}
@@ -112,7 +112,7 @@ export class NeuDataViewComponent {
112
112
  <neu-empty-state [title]="emptyLabel()" />
113
113
  }
114
114
  }
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"] }] });
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", inputs: ["haptic"], 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: ["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
116
  }
117
117
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuDataViewComponent, decorators: [{
118
118
  type: Component,
@@ -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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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,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;AAC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C,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,iBAAiB,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,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;uGAzCU,oBAAoB;2FAApB,oBAAoB,ugDAIa,wBAAwB,gEArD1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6CF,4wIA1DE,0BAA0B,+FAClC,IAAI,iDACJ,IAAI,mYACJ,SAAS,mIACT,SAAS,mGACT,6BAA6B,oIAC7B,aAAa,4DACb,gBAAgB,oJAChB,sBAAsB,gKACtB,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"]}
@@ -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-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vB,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,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,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,mGACT,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"]}
@@ -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,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,G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C;YACrG,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;uGAzDU,2BAA2B;2FAA3B,2BAA2B,2xBAcF,IAAI,2BAAU,UAAU,6CApClD;;;;;;;;;;;;;;;;;;;WAmBD,8iBApBC,KAAK,wQAAE,SAAS,+EAAE,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"]}
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,aA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CAAC;gBAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;YACjI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;gBAClC,IAAI,MAAM,EAAE;oBAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;YACrG,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;uGAzDU,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"]}
@@ -0,0 +1,30 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export type NeuHapticImpact = 'light' | 'medium' | 'heavy' | 'soft' | 'rigid';
4
+ export type NeuHapticFeedback = 'press' | 'selection' | NeuHapticImpact | 'success' | 'warning' | 'error';
5
+ export interface NeuHapticsOptions {
6
+ /** Explicitly enabling a provider opts the application into feedback. */
7
+ enabled?: boolean;
8
+ /** Coalesce rapid feedback, including continuous sliders. Defaults to 80 ms. */
9
+ minimumIntervalMs?: number;
10
+ pressStyle?: NeuHapticImpact;
11
+ }
12
+ export interface NeuHapticsDriver {
13
+ available(): boolean;
14
+ play(feedback: Exclude<NeuHapticFeedback, 'press'>): void | Promise<void>;
15
+ }
16
+ export declare const NEU_HAPTICS_OPTIONS: InjectionToken<NeuHapticsOptions>;
17
+ /** Platform boundary, replaceable by consumers and contract tests. */
18
+ export declare const NEU_HAPTICS_DRIVER: InjectionToken<NeuHapticsDriver | null>;
19
+ /** Optional feedback: a missing motor or failed vibration must never block an action. */
20
+ export declare class NeuHaptics {
21
+ private readonly options;
22
+ private readonly driver;
23
+ readonly enabled: import("@angular/core").WritableSignal<boolean>;
24
+ private lastAt;
25
+ get available(): boolean;
26
+ /** True means a request was dispatched, not that hardware physically vibrated. */
27
+ play(feedback?: NeuHapticFeedback | false): boolean;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<NeuHaptics, never>;
29
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
30
+ }
@@ -0,0 +1,53 @@
1
+ import { Injectable, InjectionToken, inject, signal } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export const NEU_HAPTICS_OPTIONS = new InjectionToken('Neural haptics options', {
4
+ providedIn: 'root', factory: () => ({ enabled: false }),
5
+ });
6
+ /** Platform boundary, replaceable by consumers and contract tests. */
7
+ export const NEU_HAPTICS_DRIVER = new InjectionToken('Neural haptics driver', {
8
+ providedIn: 'root', factory: () => null,
9
+ });
10
+ /** Optional feedback: a missing motor or failed vibration must never block an action. */
11
+ export class NeuHaptics {
12
+ options = inject(NEU_HAPTICS_OPTIONS);
13
+ driver = inject(NEU_HAPTICS_DRIVER);
14
+ enabled = signal(this.options.enabled ?? false, /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
16
+ lastAt = -Infinity;
17
+ get available() {
18
+ try {
19
+ return this.driver?.available() ?? false;
20
+ }
21
+ catch {
22
+ return false;
23
+ }
24
+ }
25
+ /** True means a request was dispatched, not that hardware physically vibrated. */
26
+ play(feedback = 'press') {
27
+ if (!feedback || !this.enabled() || !this.available || !this.driver)
28
+ return false;
29
+ const configured = this.options.minimumIntervalMs ?? 80;
30
+ const interval = Number.isFinite(configured) ? Math.max(0, Math.min(1000, configured)) : 80;
31
+ const now = Date.now();
32
+ if (now >= this.lastAt && now - this.lastAt < interval)
33
+ return false;
34
+ try {
35
+ const result = this.driver.play(feedback === 'press' ? (this.options.pressStyle ?? 'light') : feedback);
36
+ this.lastAt = now;
37
+ // A consumer-supplied asynchronous driver must not leak rejected promises.
38
+ if (result)
39
+ void Promise.resolve(result).catch(() => undefined);
40
+ return true;
41
+ }
42
+ catch {
43
+ return false;
44
+ }
45
+ }
46
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuHaptics, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
47
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuHaptics, providedIn: 'root' });
48
+ }
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuHaptics, decorators: [{
50
+ type: Injectable,
51
+ args: [{ providedIn: 'root' }]
52
+ }] });
53
+ //# sourceMappingURL=haptics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"haptics.js","sourceRoot":"","sources":["../../src/foundation/haptics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;;AAe3E,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,cAAc,CAAoB,wBAAwB,EAAE;IACjG,UAAU,EAAE,MAAM,EAAE,OAA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AI,GAAG,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,GAAG,QAAQ;YAAE,OAAO,KAAK,CAAC;QACrE,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;YACxG,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;YAClB,2EAA2E;YAC3E,IAAI,MAAM;gBAAE,KAAK,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAChE,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YAAC,OAAO,KAAK,CAAC;QAAC,CAAC;IAC3B,CAAC;uGAxBU,UAAU;2GAAV,UAAU,cADG,MAAM;;2FACnB,UAAU;kBADtB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["import { Injectable, InjectionToken, inject, signal } from '@angular/core';\n\nexport type NeuHapticImpact = 'light' | 'medium' | 'heavy' | 'soft' | 'rigid';\nexport type NeuHapticFeedback = 'press' | 'selection' | NeuHapticImpact | 'success' | 'warning' | 'error';\nexport interface NeuHapticsOptions {\n /** Explicitly enabling a provider opts the application into feedback. */\n enabled?: boolean;\n /** Coalesce rapid feedback, including continuous sliders. Defaults to 80 ms. */\n minimumIntervalMs?: number;\n pressStyle?: NeuHapticImpact;\n}\nexport interface NeuHapticsDriver {\n available(): boolean;\n play(feedback: Exclude<NeuHapticFeedback, 'press'>): void | Promise<void>;\n}\nexport const NEU_HAPTICS_OPTIONS = new InjectionToken<NeuHapticsOptions>('Neural haptics options', {\n providedIn: 'root', factory: () => ({ enabled: false }),\n});\n/** Platform boundary, replaceable by consumers and contract tests. */\nexport const NEU_HAPTICS_DRIVER = new InjectionToken<NeuHapticsDriver | null>('Neural haptics driver', {\n providedIn: 'root', factory: () => null,\n});\n\n/** Optional feedback: a missing motor or failed vibration must never block an action. */\n@Injectable({ providedIn: 'root' })\nexport class NeuHaptics {\n private readonly options = inject(NEU_HAPTICS_OPTIONS);\n private readonly driver = inject(NEU_HAPTICS_DRIVER);\n readonly enabled = signal(this.options.enabled ?? false);\n private lastAt = -Infinity;\n\n get available(): boolean {\n try { return this.driver?.available() ?? false; } catch { return false; }\n }\n\n /** True means a request was dispatched, not that hardware physically vibrated. */\n play(feedback: NeuHapticFeedback | false = 'press'): boolean {\n if (!feedback || !this.enabled() || !this.available || !this.driver) return false;\n const configured = this.options.minimumIntervalMs ?? 80;\n const interval = Number.isFinite(configured) ? Math.max(0, Math.min(1000, configured)) : 80;\n const now = Date.now();\n if (now >= this.lastAt && now - this.lastAt < interval) return false;\n try {\n const result = this.driver.play(feedback === 'press' ? (this.options.pressStyle ?? 'light') : feedback);\n this.lastAt = now;\n // A consumer-supplied asynchronous driver must not leak rejected promises.\n if (result) void Promise.resolve(result).catch(() => undefined);\n return true;\n } catch { return false; }\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { InjectionToken, type Signal } from '@angular/core';
2
+ export * from './haptics.js';
2
3
  export type NeuSize = 'sm' | 'md' | 'lg';
3
4
  export type NeuVariant = 'solid' | 'tonal' | 'outline' | 'text';
4
5
  export type NeuTone = 'neutral' | 'brand' | 'accent' | 'success' | 'info' | 'warning' | 'danger';
@@ -1,4 +1,5 @@
1
1
  import { InjectionToken } from '@angular/core';
2
+ export * from './haptics.js';
2
3
  export const NEU_LIGHT_TOKENS = Object.freeze({
3
4
  accent: '#006ee6',
4
5
  onAccent: '#ffffff',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,eAAe,CAAC;AAsC5D,MAAM,CA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F,MAAM,CAAC,MAAM,cAAc,GACzB,8JAA8J,CAAC;AACjK,MAAM,CAAC,MAAM,aAAa,GACxB,uIAAuI,CAAC","sourcesContent":["import { InjectionToken, type Signal } from '@angular/core';\nexport type NeuSize = 'sm' | 'md' | 'lg';\nexport type NeuVariant = 'solid' | 'tonal' | 'outline' | 'text';\nexport type NeuTone = 'neutral' | 'brand' | 'accent' | 'success' | 'info' | 'warning' | 'danger';\nexport type NeuColorScheme = 'system' | 'light' | 'dark';\nexport interface NeuTokens {\n accent: string;\n onAccent: string;\n surface: string;\n canvas: string;\n text: string;\n muted: string;\n border: string;\n tonal: string;\n danger: string;\n success: string;\n warning: string;\n warningText: string;\n onWarning: string;\n info: string;\n /** Optional semantic text inks; defaults are resolved against the theme surfaces. */\n accentText?: string;\n dangerText?: string;\n successText?: string;\n infoText?: string;\n radius: number;\n spacing: number;\n fontSize: number;\n duration: number;\n /** Decorative surfaces; independent of the functional control border. */\n surfaceBorder?: string;\n divider?: string;\n surfaceSecondary?: string;\n /** Dedicated image canvas and readable control ink, independent of app scheme. */\n mediaCanvas?: string;\n mediaText?: string;\n mediaBarStyle?: 'light' | 'dark';\n}\nexport const NEU_LIGHT_TOKENS: Readonly<NeuTokens> = Object.freeze({\n accent: '#006ee6',\n onAccent: '#ffffff',\n surface: '#ffffff',\n canvas: '#f4f5f7',\n text: '#172033',\n muted: '#596477',\n border: '#a5afbf',\n tonal: '#eff6ff',\n danger: '#dc2626',\n success: '#15803d',\n warning: '#f59e0b',\n warningText: '#92400e',\n onWarning: '#111827',\n info: '#0064d1',\n radius: 12,\n spacing: 16,\n fontSize: 16,\n duration: 120,\n surfaceBorder: '#e1e6ed',\n divider: '#e7ebf0',\n surfaceSecondary: '#eef1f5',\n mediaCanvas: '#111722',\n mediaText: '#edf1fa',\n mediaBarStyle: 'light',\n});\nexport const NEU_DARK_TOKENS: Readonly<NeuTokens> = Object.freeze({\n ...NEU_LIGHT_TOKENS,\n accent: '#b5c4ff',\n onAccent: '#172955',\n surface: '#1b2230',\n canvas: '#111722',\n text: '#edf1fa',\n muted: '#b4bed0',\n border: '#6c7a92',\n tonal: '#293756',\n danger: '#ffb4ab',\n success: '#8fdeb1',\n warning: '#efd48f',\n warningText: '#efd48f',\n onWarning: '#111722',\n info: '#7dd3fc',\n surfaceBorder: '#354052',\n divider: '#303b4c',\n surfaceSecondary: '#222d3f',\n});\nexport const NEU_THEME = new InjectionToken<Signal<Readonly<NeuTokens>>>(\n 'Neural Native theme',\n);\nexport const NEU_CHECK_ICON =\n '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m5 12 4 4 10-10\"/></svg>';\nexport const NEU_PLUS_ICON =\n '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M12 5v14M5 12h14\"/></svg>';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,eAAe,CAAC;AAC5D,cAAc,cAAc,CAAC;AAsC7B,MAAM,CAAC,MAAM,gBAAgB,GAAwB,MAAM,CAAC,MAAM,CAAC;IACjE,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,GAAG;IACb,aAAa,EAAE,SAAS;IACxB,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,SAAS;IAC3B,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,aAAa,EAAE,OAAO;CACvB,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,eAAe,GAAwB,MAAM,CAAC,MAAM,CAAC;IAChE,GAAG,gBAAgB;IACnB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,IAAI,EAAE,SAAS;IACf,aAAa,EAAE,SAAS;IACxB,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,SAAS;CAC5B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,cAAc,CACzC,qBAAqB,CACtB,CAAC;AACF,MAAM,CAAC,MAAM,cAAc,GACzB,8JAA8J,CAAC;AACjK,MAAM,CAAC,MAAM,aAAa,GACxB,uIAAuI,CAAC","sourcesContent":["import { InjectionToken, type Signal } from '@angular/core';\nexport * from './haptics.js';\nexport type NeuSize = 'sm' | 'md' | 'lg';\nexport type NeuVariant = 'solid' | 'tonal' | 'outline' | 'text';\nexport type NeuTone = 'neutral' | 'brand' | 'accent' | 'success' | 'info' | 'warning' | 'danger';\nexport type NeuColorScheme = 'system' | 'light' | 'dark';\nexport interface NeuTokens {\n accent: string;\n onAccent: string;\n surface: string;\n canvas: string;\n text: string;\n muted: string;\n border: string;\n tonal: string;\n danger: string;\n success: string;\n warning: string;\n warningText: string;\n onWarning: string;\n info: string;\n /** Optional semantic text inks; defaults are resolved against the theme surfaces. */\n accentText?: string;\n dangerText?: string;\n successText?: string;\n infoText?: string;\n radius: number;\n spacing: number;\n fontSize: number;\n duration: number;\n /** Decorative surfaces; independent of the functional control border. */\n surfaceBorder?: string;\n divider?: string;\n surfaceSecondary?: string;\n /** Dedicated image canvas and readable control ink, independent of app scheme. */\n mediaCanvas?: string;\n mediaText?: string;\n mediaBarStyle?: 'light' | 'dark';\n}\nexport const NEU_LIGHT_TOKENS: Readonly<NeuTokens> = Object.freeze({\n accent: '#006ee6',\n onAccent: '#ffffff',\n surface: '#ffffff',\n canvas: '#f4f5f7',\n text: '#172033',\n muted: '#596477',\n border: '#a5afbf',\n tonal: '#eff6ff',\n danger: '#dc2626',\n success: '#15803d',\n warning: '#f59e0b',\n warningText: '#92400e',\n onWarning: '#111827',\n info: '#0064d1',\n radius: 12,\n spacing: 16,\n fontSize: 16,\n duration: 120,\n surfaceBorder: '#e1e6ed',\n divider: '#e7ebf0',\n surfaceSecondary: '#eef1f5',\n mediaCanvas: '#111722',\n mediaText: '#edf1fa',\n mediaBarStyle: 'light',\n});\nexport const NEU_DARK_TOKENS: Readonly<NeuTokens> = Object.freeze({\n ...NEU_LIGHT_TOKENS,\n accent: '#b5c4ff',\n onAccent: '#172955',\n surface: '#1b2230',\n canvas: '#111722',\n text: '#edf1fa',\n muted: '#b4bed0',\n border: '#6c7a92',\n tonal: '#293756',\n danger: '#ffb4ab',\n success: '#8fdeb1',\n warning: '#efd48f',\n warningText: '#efd48f',\n onWarning: '#111722',\n info: '#7dd3fc',\n surfaceBorder: '#354052',\n divider: '#303b4c',\n surfaceSecondary: '#222d3f',\n});\nexport const NEU_THEME = new InjectionToken<Signal<Readonly<NeuTokens>>>(\n 'Neural Native theme',\n);\nexport const NEU_CHECK_ICON =\n '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m5 12 4 4 10-10\"/></svg>';\nexport const NEU_PLUS_ICON =\n '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><path d=\"M12 5v14M5 12h14\"/></svg>';\n"]}
@@ -1,10 +1,14 @@
1
1
  import { Pressable } from '@ng-native/components';
2
+ import { type NeuHapticFeedback } from './haptics.js';
2
3
  import * as i0 from "@angular/core";
3
4
  /** Bridge the iOS accessibility activation event to the normal guarded action. */
4
5
  export declare class NeuNativePressable extends Pressable {
6
+ readonly haptic: import("@angular/core").InputSignal<false | NeuHapticFeedback>;
7
+ private readonly haptics;
8
+ private stopHaptics?;
5
9
  private stopAccessibilityTap?;
6
10
  ngOnInit(): void;
7
11
  ngOnDestroy(): void;
8
12
  static ɵfac: i0.ɵɵFactoryDeclaration<NeuNativePressable, never>;
9
- static ɵdir: i0.ɵɵDirectiveDeclaration<NeuNativePressable, "pressable", ["pressable"], {}, {}, never, never, true, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NeuNativePressable, "pressable", ["pressable"], { "haptic": { "alias": "haptic"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
10
14
  }
@@ -1,13 +1,22 @@
1
- import { Directive } from '@angular/core';
1
+ import { Directive, inject, input } from '@angular/core';
2
2
  import { Pressable } from '@ng-native/components';
3
3
  import { declareNativeProps, nativePlatform } from '@ng-native/fabric';
4
+ import { NeuHaptics } from './haptics.js';
4
5
  import * as i0 from "@angular/core";
5
6
  declareNativeProps('pressable', ['onAccessibilityTap']);
6
7
  /** Bridge the iOS accessibility activation event to the normal guarded action. */
7
8
  export class NeuNativePressable extends Pressable {
9
+ haptic = input('press', /* @ts-ignore */
10
+ ...(ngDevMode ? [{ debugName: "haptic" }] : /* istanbul ignore next */ []));
11
+ haptics = inject(NeuHaptics);
12
+ stopHaptics;
8
13
  stopAccessibilityTap;
9
14
  ngOnInit() {
10
15
  super.ngOnInit();
16
+ this.stopHaptics = this.press.subscribe(() => {
17
+ if (this.claims())
18
+ this.haptics.play(this.haptic());
19
+ });
11
20
  if (nativePlatform() !== 'ios')
12
21
  return;
13
22
  // Fabric's iOS view emits this event only when the native opt-in is present.
@@ -21,14 +30,15 @@ export class NeuNativePressable extends Pressable {
21
30
  });
22
31
  }
23
32
  ngOnDestroy() {
33
+ this.stopHaptics?.unsubscribe();
24
34
  this.stopAccessibilityTap?.();
25
35
  super.ngOnDestroy();
26
36
  }
27
37
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuNativePressable, deps: null, target: i0.ɵɵFactoryTarget.Directive });
28
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.2", type: NeuNativePressable, isStandalone: true, selector: "pressable", exportAs: ["pressable"], usesInheritance: true, ngImport: i0 });
38
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.2", type: NeuNativePressable, isStandalone: true, selector: "pressable", inputs: { haptic: { classPropertyName: "haptic", publicName: "haptic", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["pressable"], usesInheritance: true, ngImport: i0 });
29
39
  }
30
40
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuNativePressable, decorators: [{
31
41
  type: Directive,
32
42
  args: [{ selector: 'pressable', exportAs: 'pressable' }]
33
- }] });
43
+ }], propDecorators: { haptic: [{ type: i0.Input, args: [{ isSignal: true, alias: "haptic", required: false }] }] } });
34
44
  //# sourceMappingURL=native-pressable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"native-pressable.js","sourceRoot":"","sources":["../../src/foundation/native-pressable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAmB,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;;AAEvE,kBAAkB,CAAC,WAAW,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAExD,kFAAkF;AAElF,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IACvC,oBAAoB,CAAc;IAEjC,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,cAAc,EAAE,KAAK,KAAK;YAAE,OAAO;QACvC,6EAA6E;QAC7E,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAC;QAC3D,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,qBAAqB,EAAE,GAAG,CAAC,EAAE;YAC/F,MAAM,KAAK,GAAG,GAAiB,CAAC;YAChC,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI;gBAAE,OAAO;YACvC,IAAI,IAAI,CAAC,MAAM,EAAE;gBAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAmB,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACL,CAAC;IAEQ,WAAW;QAClB,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC;QAC9B,KAAK,CAAC,WAAW,EAAE,CAAC;IACtB,CAAC;uGAlBU,kBAAkB;2FAAlB,kBAAkB;;2FAAlB,kBAAkB;kBAD9B,SAAS;mBAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE","sourcesContent":["import { Directive } from '@angular/core';\nimport { Pressable, type PressEvent } from '@ng-native/components';\nimport { declareNativeProps, nativePlatform } from '@ng-native/fabric';\n\ndeclareNativeProps('pressable', ['onAccessibilityTap']);\n\n/** Bridge the iOS accessibility activation event to the normal guarded action. */\n@Directive({ selector: 'pressable', exportAs: 'pressable' })\nexport class NeuNativePressable extends Pressable {\n private stopAccessibilityTap?: () => void;\n\n override ngOnInit(): void {\n super.ngOnInit();\n if (nativePlatform() !== 'ios') return;\n // Fabric's iOS view emits this event only when the native opt-in is present.\n this.engine.setProp(this.node, 'onAccessibilityTap', true);\n this.stopAccessibilityTap = this.engine.setEventListener(this.node, 'topAccessibilityTap', raw => {\n const event = raw as PressEvent;\n if (event.target !== this.node) return;\n if (this.claims()) this.press.emit(event as PressEvent);\n });\n }\n\n override ngOnDestroy(): void {\n this.stopAccessibilityTap?.();\n super.ngOnDestroy();\n }\n}\n"]}
1
+ {"version":3,"file":"native-pressable.js","sourceRoot":"","sources":["../../src/foundation/native-pressable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAA8B,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,SAAS,EAAmB,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,UAAU,EAA0B,MAAM,cAAc,CAAC;;AAElE,kBAAkB,CAAC,WAAW,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAExD,kFAAkF;AAElF,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IACtC,MAAM,GAAG,KAAK,CAA4B,OAAO;+EAAC,CAAC;IAC3C,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IACtC,WAAW,CAAyB;IACpC,oBAAoB,CAAc;IAEjC,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YAC3C,IAAI,IAAI,CAAC,MAAM,EAAE;gBAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;QACH,IAAI,cAAc,EAAE,KAAK,KAAK;YAAE,OAAO;QACvC,6EAA6E;QAC7E,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAC;QAC3D,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,qBAAqB,EAAE,GAAG,CAAC,EAAE;YAC/F,MAAM,KAAK,GAAG,GAAiB,CAAC;YAChC,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI;gBAAE,OAAO;YACvC,IAAI,IAAI,CAAC,MAAM,EAAE;gBAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAmB,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACL,CAAC;IAEQ,WAAW;QAClB,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC;QAC9B,KAAK,CAAC,WAAW,EAAE,CAAC;IACtB,CAAC;uGAzBU,kBAAkB;2FAAlB,kBAAkB;;2FAAlB,kBAAkB;kBAD9B,SAAS;mBAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE","sourcesContent":["import { Directive, inject, input, type OutputRefSubscription } from '@angular/core';\nimport { Pressable, type PressEvent } from '@ng-native/components';\nimport { declareNativeProps, nativePlatform } from '@ng-native/fabric';\nimport { NeuHaptics, type NeuHapticFeedback } from './haptics.js';\n\ndeclareNativeProps('pressable', ['onAccessibilityTap']);\n\n/** Bridge the iOS accessibility activation event to the normal guarded action. */\n@Directive({ selector: 'pressable', exportAs: 'pressable' })\nexport class NeuNativePressable extends Pressable {\n readonly haptic = input<NeuHapticFeedback | false>('press');\n private readonly haptics = inject(NeuHaptics);\n private stopHaptics?: OutputRefSubscription;\n private stopAccessibilityTap?: () => void;\n\n override ngOnInit(): void {\n super.ngOnInit();\n this.stopHaptics = this.press.subscribe(() => {\n if (this.claims()) this.haptics.play(this.haptic());\n });\n if (nativePlatform() !== 'ios') return;\n // Fabric's iOS view emits this event only when the native opt-in is present.\n this.engine.setProp(this.node, 'onAccessibilityTap', true);\n this.stopAccessibilityTap = this.engine.setEventListener(this.node, 'topAccessibilityTap', raw => {\n const event = raw as PressEvent;\n if (event.target !== this.node) return;\n if (this.claims()) this.press.emit(event as PressEvent);\n });\n }\n\n override ngOnDestroy(): void {\n this.stopHaptics?.unsubscribe();\n this.stopAccessibilityTap?.();\n super.ngOnDestroy();\n }\n}\n"]}