@neural-ui/native 0.1.0-beta.4 → 0.1.0-beta.6

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 (115) hide show
  1. package/README.md +7 -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-otp/input-otp.js +1 -1
  58. package/dist/input-otp/input-otp.js.map +1 -1
  59. package/dist/input-tags/input-tags.js +1 -1
  60. package/dist/listbox/listbox.js +1 -1
  61. package/dist/listbox/listbox.js.map +1 -1
  62. package/dist/menu/menu.js +1 -1
  63. package/dist/menu/menu.js.map +1 -1
  64. package/dist/modal/modal.js +1 -1
  65. package/dist/modal/modal.js.map +1 -1
  66. package/dist/nav/nav.js +1 -1
  67. package/dist/nav/nav.js.map +1 -1
  68. package/dist/notification-center/notification-center.js +1 -1
  69. package/dist/notification-center/notification-center.js.map +1 -1
  70. package/dist/number-input/number-input.js +1 -1
  71. package/dist/number-input/number-input.js.map +1 -1
  72. package/dist/panel/panel.js +1 -1
  73. package/dist/panel/panel.js.map +1 -1
  74. package/dist/password/password.js +1 -1
  75. package/dist/pick-list/pick-list.js +1 -1
  76. package/dist/pick-list/pick-list.js.map +1 -1
  77. package/dist/popover/popover.js +1 -1
  78. package/dist/popover/popover.js.map +1 -1
  79. package/dist/radio/radio.d.ts +4 -1
  80. package/dist/radio/radio.js +13 -4
  81. package/dist/radio/radio.js.map +1 -1
  82. package/dist/rating/rating.js +1 -1
  83. package/dist/rating/rating.js.map +1 -1
  84. package/dist/select/select.js +1 -1
  85. package/dist/select/select.js.map +1 -1
  86. package/dist/sidebar/sidebar.js +1 -1
  87. package/dist/sidebar/sidebar.js.map +1 -1
  88. package/dist/slider/slider.d.ts +4 -1
  89. package/dist/slider/slider.js +12 -3
  90. package/dist/slider/slider.js.map +1 -1
  91. package/dist/speed-dial/speed-dial.js +1 -1
  92. package/dist/speed-dial/speed-dial.js.map +1 -1
  93. package/dist/stepper/stepper.js +1 -1
  94. package/dist/stepper/stepper.js.map +1 -1
  95. package/dist/switch/switch.d.ts +4 -1
  96. package/dist/switch/switch.js +9 -3
  97. package/dist/switch/switch.js.map +1 -1
  98. package/dist/tabs/tabs.js +1 -1
  99. package/dist/tabs/tabs.js.map +1 -1
  100. package/dist/toast/toast.js +1 -1
  101. package/dist/toast/toast.js.map +1 -1
  102. package/dist/toggle-button-group/toggle-button-group.js +1 -1
  103. package/dist/toggle-button-group/toggle-button-group.js.map +1 -1
  104. package/dist/toolbar/toolbar.js +1 -1
  105. package/dist/toolbar/toolbar.js.map +1 -1
  106. package/dist/tree/tree.js +1 -1
  107. package/dist/tree/tree.js.map +1 -1
  108. package/dist/tree-select/tree-select.js +1 -1
  109. package/dist/tree-select/tree-select.js.map +1 -1
  110. package/dist/uploader/uploader.d.ts +1 -1
  111. package/dist/uploader/uploader.js +1 -1
  112. package/dist/uploader/uploader.js.map +1 -1
  113. package/dist/virtual-list/virtual-list.js +1 -1
  114. package/dist/virtual-list/virtual-list.js.map +1 -1
  115. package/package.json +21 -6
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Neural Native brings the Neural visual language to [Angular Native](https://ng-native.com): 64 mobile component entries, Angular signals, typed APIs, shared themes and modular imports.
6
6
 
7
- **Public beta: `0.1.0-beta.4`.** APIs and framework compatibility may change before 1.0. Pin the version in your application lockfile and check compatibility before updating Angular Native.
7
+ **Public beta: `0.1.0-beta.6`.** APIs and framework compatibility may change before 1.0. Pin the version in your application lockfile and check compatibility before updating Angular Native.
8
8
 
9
9
  ## Documentation
10
10
 
@@ -18,18 +18,18 @@ Neural Native brings the Neural visual language to [Angular Native](https://ng-n
18
18
  Start with the compatible Angular Native template:
19
19
 
20
20
  ```sh
21
- npx create-expo-app@latest my-neural-app --template @ng-native/template@0.19.2
21
+ npx create-expo-app@latest my-neural-app --template @ng-native/template@0.21.0
22
22
  cd my-neural-app
23
23
  npm install @neural-ui/native@beta
24
24
  ```
25
25
 
26
- In an existing Angular Native 0.19.2 application, run only the last command. The beta is published under the npm `beta` tag; `@beta` is intentional. Applications on Angular Native 0.18.2 should keep Neural Native 0.1.0-beta.2 until they update the framework.
26
+ In an existing Angular Native 0.21.0 application, run only the last command. The beta is published under the npm `beta` tag; `@beta` is intentional. Applications on Angular Native 0.19.2 should keep Neural Native 0.1.0-beta.5. Applications on Angular Native 0.18.2 should keep Neural Native 0.1.0-beta.2 until they update the framework.
27
27
 
28
28
  ### Compatibility
29
29
 
30
30
  | Dependency | This beta |
31
31
  | --- | --- |
32
- | Angular Native packages | 0.19.2 |
32
+ | Angular Native packages | 0.21.0 |
33
33
  | Angular | 22.2.2 tested; peers >=22.2.0 <23 |
34
34
  | Expo / React Native | 57.0.27 / 0.86.3 tested application baseline |
35
35
  | Current framework template | Expo 58.0.16 / React Native 0.88.0: consumer tests and iOS/Android bundles verified |
@@ -144,6 +144,8 @@ Use projected content with controls such as Card, Modal and Bottom Sheet. Collec
144
144
 
145
145
  ## Accessibility and localization
146
146
 
147
+ Optional haptic feedback is available from beta.5. Applications explicitly enable it with `provideNeuHaptics()`, can silence individual controls with `[haptic]="false"` and can change the preference at runtime. Install `expo-haptics` and rebuild the native app first. See the [haptics guide](https://github.com/PedroMorenoTrujillo/neural-native/blob/main/docs/haptics.md).
148
+
147
149
  Provide visible labels, useful validation messages and accessible names for icon actions. Localize the labels exposed by the component API; date controls also accept `locale`. Translate display labels while keeping option IDs and saved values stable.
148
150
 
149
151
  Neural Form Field arranges projected content; connect the name, requirement and help to the projected native control itself. It is separate from Angular Signal Forms' `FormField`.
@@ -178,7 +180,7 @@ Neural Native is maintained by Pedro Moreno Trujillo and shares its visual ident
178
180
 
179
181
  ## Español
180
182
 
181
- Neural Native ofrece componentes Angular nativos para iOS y Android. Esta beta.4 se instala con `npm install @neural-ui/native@beta` sobre una aplicación Angular Native 0.19.2. Si tu aplicación utiliza Angular Native 0.18.2, conserva Neural Native 0.1.0-beta.2 hasta actualizar el framework. Los controles utilizan signals, un tema compartido e imports modulares; tu aplicación conserva el estado y decide cómo guardar los datos.
183
+ Neural Native ofrece componentes Angular nativos para iOS y Android. Esta beta.6 se instala con `npm install @neural-ui/native@beta` sobre una aplicación Angular Native 0.21.0. Si tu aplicación utiliza Angular Native 0.19.2, conserva beta.5; para Angular Native 0.18.2, conserva Neural Native 0.1.0-beta.2 hasta actualizar el framework. Los controles utilizan signals, un tema compartido e imports modulares; tu aplicación conserva el estado y decide cómo guardar los datos. Desde beta.5 puedes activar la respuesta háptica opcional, silenciar controles concretos y cambiar esa preferencia durante la ejecución.
182
184
 
183
185
  ## License
184
186
 
@@ -44,7 +44,7 @@ export class NeuAccordionComponent {
44
44
  </neu-collapse>
45
45
  </view>
46
46
  }
47
- </view>`, isInline: true, styles: [".accordion { gap: 0; background-color: var(--neu-surface, #ffffff); border-radius: var(--neu-surface-radius, 16px); overflow: hidden; }\n.accordion-item { background-color: var(--neu-surface, #ffffff); }\n.accordion-header { flex-direction: row; align-items: center; gap: 12px; min-height: 52px; padding: var(--neu-space-16, 16px); }\n.accordion-title { flex: 1; flex-shrink: 1; font-size: var(--neu-row-size, 15px); line-height: var(--neu-row-line, 21px); font-weight: 500; color: var(--neu-text, #172033); }\n.accordion-body { padding: 0 var(--neu-space-16, 16px) var(--neu-space-16, 16px); }\n.accordion-description { flex-shrink: 1; font-size: var(--neu-label-size, 14px); line-height: var(--neu-row-line, 21px); color: var(--neu-muted, #596477); }\n\n.accordion-divider { height: 1px; margin-left: 16px; margin-right: 16px; background-color: var(--neu-divider, #e7ebf0); }\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: NeuCollapseComponent, selector: "neu-collapse", inputs: ["open"] }, { kind: "component", type: NeuAccordionIndicatorComponent, selector: "neu-accordion-indicator", inputs: ["open"] }] });
47
+ </view>`, isInline: true, styles: [".accordion { gap: 0; background-color: var(--neu-surface, #ffffff); border-radius: var(--neu-surface-radius, 16px); overflow: hidden; }\n.accordion-item { background-color: var(--neu-surface, #ffffff); }\n.accordion-header { flex-direction: row; align-items: center; gap: 12px; min-height: 52px; padding: var(--neu-space-16, 16px); }\n.accordion-title { flex: 1; flex-shrink: 1; font-size: var(--neu-row-size, 15px); line-height: var(--neu-row-line, 21px); font-weight: 500; color: var(--neu-text, #172033); }\n.accordion-body { padding: 0 var(--neu-space-16, 16px) var(--neu-space-16, 16px); }\n.accordion-description { flex-shrink: 1; font-size: var(--neu-label-size, 14px); line-height: var(--neu-row-line, 21px); color: var(--neu-muted, #596477); }\n\n.accordion-divider { height: 1px; margin-left: 16px; margin-right: 16px; background-color: var(--neu-divider, #e7ebf0); }\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: NeuCollapseComponent, selector: "neu-collapse", inputs: ["open"] }, { kind: "component", type: NeuAccordionIndicatorComponent, selector: "neu-accordion-indicator", inputs: ["open"] }] });
48
48
  }
49
49
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuAccordionComponent, decorators: [{
50
50
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/accordion/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;;AA8BtF,MAAM,OAAO,qBAAqB;IACvB,KAAK,GAAG,KAAK,CAAuB,EAAE;8EAAC,CAAC;IACxC,QAAQ,GAAG,KAAK,CAAoB,EAAE;iFAAC,CAAC;IACxC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,GAAG,CAAC;IACzD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,GAAG,CAAC;IACxD,MAAM,CAAC,IAAe;QAC9B,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,GAAG,CACf,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACnB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;YAClC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACf,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;gBACnB,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAChB,CAAC;IACJ,CAAC;uGAfU,qBAAqB;2FAArB,qBAAqB,ynBAzBtB;;;;;;;;;;;;;;;;;;;;;;UAsBF,y7BAvBE,IAAI,iDAAE,IAAI,mYAAE,SAAS,+EAAE,oBAAoB,2EAAE,8BAA8B;;2FA0B1E,qBAAqB;kBA5BjC,SAAS;+BACE,eAAe,WAChB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,oBAAoB,EAAE,8BAA8B,CAAC,YAC5E;;;;;;;;;;;;;;;;;;;;;;UAsBF","sourcesContent":["import {\n booleanAttribute,\n Component,\n input,\n model,\n} from '@angular/core';\nimport { View, Text } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { NeuOption } from '../foundation/mobile.js';\nimport { NeuCollapseComponent } from '../foundation/collapse.js';\nimport { NeuAccordionIndicatorComponent } from '../foundation/accordion-indicator.js';\n\n@Component({\n selector: 'neu-accordion',\n imports: [View, Text, Pressable, NeuCollapseComponent, NeuAccordionIndicatorComponent],\n template: `<view class=\"accordion\">\n @for (item of items(); track item.id; let first = $first) {\n @if (!first) { <view class=\"accordion-divider\" /> }\n <view class=\"accordion-item\" [style.opacity]=\"disabled() || item.disabled ? 0.45 : 1\"\n ><pressable\n class=\"accordion-header\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"item.label\"\n [accessibilityState]=\"{\n expanded: expanded().includes(item.id),\n disabled: disabled() || item.disabled,\n }\"\n [disabled]=\"disabled() || !!item.disabled\"\n (press)=\"toggle(item)\"\n ><text class=\"accordion-title\">{{ item.label }}</text\n ><neu-accordion-indicator [open]=\"expanded().includes(item.id)\" /></pressable\n >\n <neu-collapse [open]=\"expanded().includes(item.id)\">\n <view class=\"accordion-body\"><text class=\"accordion-description\">{{ item.description }}</text></view>\n </neu-collapse>\n </view>\n }\n </view>`,\n styleUrl: './accordion.css',\n})\nexport class NeuAccordionComponent {\n readonly items = input<readonly NeuOption[]>([]);\n readonly expanded = model<readonly string[]>([]);\n readonly multiple = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n protected toggle(item: NeuOption): void {\n if (this.disabled() || item.disabled) return;\n const ids = this.expanded();\n this.expanded.set(\n ids.includes(item.id)\n ? ids.filter((x) => x !== item.id)\n : this.multiple()\n ? [...ids, item.id]\n : [item.id],\n );\n }\n}\n"]}
1
+ {"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/accordion/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;;AA8BtF,MAAM,OAAO,qBAAqB;IACvB,KAAK,GAAG,KAAK,CAAuB,EAAE;8EAAC,CAAC;IACxC,QAAQ,GAAG,KAAK,CAAoB,EAAE;iFAAC,CAAC;IACxC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,GAAG,CAAC;IACzD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,GAAG,CAAC;IACxD,MAAM,CAAC,IAAe;QAC9B,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,GAAG,CACf,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACnB,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;YAClC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACf,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;gBACnB,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAChB,CAAC;IACJ,CAAC;uGAfU,qBAAqB;2FAArB,qBAAqB,ynBAzBtB;;;;;;;;;;;;;;;;;;;;;;UAsBF,y7BAvBE,IAAI,iDAAE,IAAI,mYAAE,SAAS,mGAAE,oBAAoB,2EAAE,8BAA8B;;2FA0B1E,qBAAqB;kBA5BjC,SAAS;+BACE,eAAe,WAChB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,oBAAoB,EAAE,8BAA8B,CAAC,YAC5E;;;;;;;;;;;;;;;;;;;;;;UAsBF","sourcesContent":["import {\n booleanAttribute,\n Component,\n input,\n model,\n} from '@angular/core';\nimport { View, Text } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { NeuOption } from '../foundation/mobile.js';\nimport { NeuCollapseComponent } from '../foundation/collapse.js';\nimport { NeuAccordionIndicatorComponent } from '../foundation/accordion-indicator.js';\n\n@Component({\n selector: 'neu-accordion',\n imports: [View, Text, Pressable, NeuCollapseComponent, NeuAccordionIndicatorComponent],\n template: `<view class=\"accordion\">\n @for (item of items(); track item.id; let first = $first) {\n @if (!first) { <view class=\"accordion-divider\" /> }\n <view class=\"accordion-item\" [style.opacity]=\"disabled() || item.disabled ? 0.45 : 1\"\n ><pressable\n class=\"accordion-header\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"item.label\"\n [accessibilityState]=\"{\n expanded: expanded().includes(item.id),\n disabled: disabled() || item.disabled,\n }\"\n [disabled]=\"disabled() || !!item.disabled\"\n (press)=\"toggle(item)\"\n ><text class=\"accordion-title\">{{ item.label }}</text\n ><neu-accordion-indicator [open]=\"expanded().includes(item.id)\" /></pressable\n >\n <neu-collapse [open]=\"expanded().includes(item.id)\">\n <view class=\"accordion-body\"><text class=\"accordion-description\">{{ item.description }}</text></view>\n </neu-collapse>\n </view>\n }\n </view>`,\n styleUrl: './accordion.css',\n})\nexport class NeuAccordionComponent {\n readonly items = input<readonly NeuOption[]>([]);\n readonly expanded = model<readonly string[]>([]);\n readonly multiple = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n protected toggle(item: NeuOption): void {\n if (this.disabled() || item.disabled) return;\n const ids = this.expanded();\n this.expanded.set(\n ids.includes(item.id)\n ? ids.filter((x) => x !== item.id)\n : this.multiple()\n ? [...ids, item.id]\n : [item.id],\n );\n }\n}\n"]}
@@ -49,7 +49,7 @@ export class NeuAlertComponent {
49
49
  <neu-icon-button [label]="closeLabel()" [svg]="closeIcon" [tone]="tone()" variant="text" (pressed)="close()" />
50
50
  }
51
51
  </view>
52
- </neu-collapse>`, 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", ".alert { min-width: 0; flex-direction: row; align-items: center; gap: 10px; padding: var(--neu-space-16, 16px); border-radius: var(--neu-surface-radius, 16px); } .alert .title { font-size: var(--neu-row-size, 15px); line-height: var(--neu-row-line, 21px); } .alert .label { font-size: var(--neu-label-size, 14px); line-height: var(--neu-label-line, 20px); } .alert-copy { flex: 1; min-width: 0; gap: 6px; } .alert-icon { flex-shrink: 0; align-items: center; justify-content: center; }"], 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: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "color", "strokeWidth", "accessibilityLabel"] }, { kind: "component", type: NeuIconButtonComponent, selector: "neu-icon-button", inputs: ["label", "svg", "variant", "tone", "disabled", "loading"], outputs: ["pressed"] }, { kind: "component", type: NeuCollapseComponent, selector: "neu-collapse", inputs: ["open"] }] });
52
+ </neu-collapse>`, 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", ".alert { min-width: 0; flex-direction: row; align-items: center; gap: 10px; padding: var(--neu-space-16, 16px); border-radius: var(--neu-surface-radius, 16px); } .alert .title { font-size: var(--neu-row-size, 15px); line-height: var(--neu-row-line, 21px); } .alert .label { font-size: var(--neu-label-size, 14px); line-height: var(--neu-label-line, 20px); } .alert-copy { flex: 1; min-width: 0; gap: 6px; } .alert-icon { flex-shrink: 0; align-items: center; justify-content: center; }"], 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: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "color", "strokeWidth", "accessibilityLabel"] }, { kind: "component", type: NeuIconButtonComponent, selector: "neu-icon-button", inputs: ["haptic", "label", "svg", "variant", "tone", "disabled", "loading"], outputs: ["pressed"] }, { kind: "component", type: NeuCollapseComponent, selector: "neu-collapse", inputs: ["open"] }] });
53
53
  }
54
54
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuAlertComponent, decorators: [{
55
55
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/alert/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAgB,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;;AAEjE,MAAM,IAAI,GAAG,sKAAsK,CAAC;AACpL,MAAM,OAAO,GAAG,6KAA6K,CAAC;AAoB9L,MAAM,OAAO,iBAAiB;IACnB,KAAK,GAAG,KAAK,CAAC,EAAE;8EAAC,CAAC;IAClB,IAAI,GAAG,KAAK,CAAU,MAAM;6EAAC,CAAC;IAC9B,OAAO,GAAG,KAAK,CAAkB,MAAM;gFAAC,CAAC;IACzC,QAAQ,GAAG,KAAK,CAAC,IAAI,gFAAI,SAAS,EAAE,gBAAgB,GAAG,CAAC;IACxD,GAAG,GAAG,KAAK,CAAC,EAAE;4EAAC,CAAC;IAChB,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAAU,CAAC;IACnC,OAAO,GAAG,KAAK,CAAC,IAAI;gFAAC,CAAC;IACtB,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS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'@ng-native/components';\nimport { NgIcon } from '@ng-native/icons';\nimport { NeuIconButtonComponent } from '../icon-button/icon-button.js';\nimport { NEU_CLOSE, NEU_CHECK } from '../foundation/icons.js';\nimport { NEU_LIGHT_TOKENS, NEU_THEME, type NeuTone } from '../foundation/index.js';\nimport { neuTonePalette } from '../foundation/tone.js';\nimport { NeuCollapseComponent } from '../foundation/collapse.js';\nexport type NeuAlertVariant = 'soft' | 'outline';\nconst INFO = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M12 11v6M12 7v.1\"/></svg>';\nconst WARNING = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m12 3 10 18H2ZM12 9v5M12 17v.1\"/></svg>';\n\n@Component({\n selector: 'neu-alert',\n imports: [View, Text, NgIcon, NeuIconButtonComponent, NeuCollapseComponent],\n template: `<neu-collapse [open]=\"visible()\">\n <view class=\"surface outline alert\" accessibilityRole=\"alert\" [style.backgroundColor]=\"variant() === 'soft' ? palette().tonal : 'transparent'\"\n [style.borderColor]=\"variant() === 'outline' ? palette().color : palette().tonal\">\n @if (showIcon()) { <view class=\"alert-icon\"><ng-icon [svg]=\"icon()\" [size]=\"20\" [color]=\"palette().color\" /></view> }\n <view class=\"alert-copy\">@if (title()) { <text class=\"title\">{{ title() }}</text> }\n <text class=\"label\">{{ message() }}</text><ng-content />\n </view>\n @if (closable()) {\n <neu-icon-button [label]=\"closeLabel()\" [svg]=\"closeIcon\" [tone]=\"tone()\" variant=\"text\" (pressed)=\"close()\" />\n }\n </view>\n </neu-collapse>`,\n styleUrl: '../foundation/mobile.css',\n styles: `.alert { min-width: 0; flex-direction: row; align-items: center; gap: 10px; padding: var(--neu-space-16, 16px); border-radius: var(--neu-surface-radius, 16px); } .alert .title { font-size: var(--neu-row-size, 15px); line-height: var(--neu-row-line, 21px); } .alert .label { font-size: var(--neu-label-size, 14px); line-height: var(--neu-label-line, 20px); } .alert-copy { flex: 1; min-width: 0; gap: 6px; } .alert-icon { flex-shrink: 0; align-items: center; justify-content: center; }`,\n})\nexport class NeuAlertComponent {\n readonly title = input('');\n readonly tone = input<NeuTone>('info');\n readonly variant = input<NeuAlertVariant>('soft');\n readonly showIcon = input(true, { transform: booleanAttribute });\n readonly svg = input('');\n readonly message = input.required<string>();\n readonly visible = model(true);\n readonly closable = input(false, { transform: booleanAttribute });\n readonly closeLabel = input('Close');\n readonly closed = output<void>();\n private readonly theme = inject(NEU_THEME, { optional: true });\n protected readonly palette = computed(() => neuTonePalette(this.theme?.() ?? NEU_LIGHT_TOKENS, this.tone()));\n protected readonly closeIcon = NEU_CLOSE;\n protected readonly icon = computed(() => this.svg() || (this.tone() === 'success' ? NEU_CHECK : this.tone() === 'warning' ? WARNING : this.tone() === 'danger' ? NEU_CLOSE : INFO));\n protected close(): void {\n this.visible.set(false);\n this.closed.emit();\n }\n}\n"]}
1
+ {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/alert/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAgB,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAA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AAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;6EAAC,CAAC;IAC1K,KAAK;QACb,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;uGAlBU,iBAAiB;2FAAjB,iBAAiB,2uCAflB;;;;;;;;;;;kBAWM,woJAZN,IAAI,iDAAE,IAAI,mYAAE,MAAM,mIAAE,sBAAsB,gKAAE,oBAAoB;;2FAgB/D,iBAAiB;kBAlB7B,SAAS;+BACE,WAAW,WACZ,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,sBAAsB,EAAE,oBAAoB,CAAC,YACjE;;;;;;;;;;;kBAWM","sourcesContent":["import {\n booleanAttribute,\n Component,\n input,\n model,\n output,\n computed,\n inject,\n} from '@angular/core';\nimport { View, Text } from '@ng-native/components';\nimport { NgIcon } from '@ng-native/icons';\nimport { NeuIconButtonComponent } from '../icon-button/icon-button.js';\nimport { NEU_CLOSE, NEU_CHECK } from '../foundation/icons.js';\nimport { NEU_LIGHT_TOKENS, NEU_THEME, type NeuTone } from '../foundation/index.js';\nimport { neuTonePalette } from '../foundation/tone.js';\nimport { NeuCollapseComponent } from '../foundation/collapse.js';\nexport type NeuAlertVariant = 'soft' | 'outline';\nconst INFO = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M12 11v6M12 7v.1\"/></svg>';\nconst WARNING = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m12 3 10 18H2ZM12 9v5M12 17v.1\"/></svg>';\n\n@Component({\n selector: 'neu-alert',\n imports: [View, Text, NgIcon, NeuIconButtonComponent, NeuCollapseComponent],\n template: `<neu-collapse [open]=\"visible()\">\n <view class=\"surface outline alert\" accessibilityRole=\"alert\" [style.backgroundColor]=\"variant() === 'soft' ? palette().tonal : 'transparent'\"\n [style.borderColor]=\"variant() === 'outline' ? palette().color : palette().tonal\">\n @if (showIcon()) { <view class=\"alert-icon\"><ng-icon [svg]=\"icon()\" [size]=\"20\" [color]=\"palette().color\" /></view> }\n <view class=\"alert-copy\">@if (title()) { <text class=\"title\">{{ title() }}</text> }\n <text class=\"label\">{{ message() }}</text><ng-content />\n </view>\n @if (closable()) {\n <neu-icon-button [label]=\"closeLabel()\" [svg]=\"closeIcon\" [tone]=\"tone()\" variant=\"text\" (pressed)=\"close()\" />\n }\n </view>\n </neu-collapse>`,\n styleUrl: '../foundation/mobile.css',\n styles: `.alert { min-width: 0; flex-direction: row; align-items: center; gap: 10px; padding: var(--neu-space-16, 16px); border-radius: var(--neu-surface-radius, 16px); } .alert .title { font-size: var(--neu-row-size, 15px); line-height: var(--neu-row-line, 21px); } .alert .label { font-size: var(--neu-label-size, 14px); line-height: var(--neu-label-line, 20px); } .alert-copy { flex: 1; min-width: 0; gap: 6px; } .alert-icon { flex-shrink: 0; align-items: center; justify-content: center; }`,\n})\nexport class NeuAlertComponent {\n readonly title = input('');\n readonly tone = input<NeuTone>('info');\n readonly variant = input<NeuAlertVariant>('soft');\n readonly showIcon = input(true, { transform: booleanAttribute });\n readonly svg = input('');\n readonly message = input.required<string>();\n readonly visible = model(true);\n readonly closable = input(false, { transform: booleanAttribute });\n readonly closeLabel = input('Close');\n readonly closed = output<void>();\n private readonly theme = inject(NEU_THEME, { optional: true });\n protected readonly palette = computed(() => neuTonePalette(this.theme?.() ?? NEU_LIGHT_TOKENS, this.tone()));\n protected readonly closeIcon = NEU_CLOSE;\n protected readonly icon = computed(() => this.svg() || (this.tone() === 'success' ? NEU_CHECK : this.tone() === 'warning' ? WARNING : this.tone() === 'danger' ? NEU_CLOSE : INFO));\n protected close(): void {\n this.visible.set(false);\n this.closed.emit();\n }\n}\n"]}
@@ -97,7 +97,7 @@ export class NeuBottomSheetComponent {
97
97
  ><scroll-view class="sheet-scroll" [class.sheet-fixed-scroll]="!!panelHeight()" keyboardShouldPersistTaps="handled"
98
98
  ><view class="stack scroll-content"
99
99
  ><ng-content /></view></scroll-view></view></safe-area-view></keyboard-avoiding-view></safe-area-provider
100
- ></modal>`, 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", ".sheet-backdrop {\n justify-content: flex-end;\n background-color: rgba(0, 0, 0, 0.36);\n}\n.sheet-dismiss {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.sheet-panel {\n max-height: 85%;\n border-top-left-radius: 24px;\n border-top-right-radius: 24px;\n background-color: var(--neu-surface, #ffffff);\n overflow: hidden;\n}\n.sheet-content {\n padding: 20px;\n padding-top: 8px;\n gap: 16px;\n flex-shrink: 1;\n}\n.sheet-handle {\n width: 36px;\n height: 4px;\n border-radius: 2px;\n background-color: var(--neu-border, #c6cede);\n align-self: center;\n}\n.sheet-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.sheet-fixed-content {\n flex: 1;\n min-height: 0;\n}\n.sheet-fixed-scroll {\n flex-grow: 1;\n min-height: 0;\n}\n"], dependencies: [{ kind: "component", type: Modal, selector: "modal", inputs: ["visible", "transparent", "backdropColor", "animationType", "presentationStyle", "supportedOrientations", "allowSwipeDismissal", "statusBarTranslucent", "navigationBarTranslucent", "hardwareAccelerated"] }, { kind: "component", type: SafeAreaProvider, selector: "safe-area-provider", inputs: ["reportInsets"] }, { kind: "directive", type: SafeAreaView, selector: "safe-area-view", inputs: ["edges", "mode"] }, { kind: "component", type: KeyboardAvoidingView, selector: "keyboard-avoiding-view", inputs: ["behavior", "contentContainerStyle", "contentContainerClass", "enabled", "keyboardVerticalOffset"] }, { 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: ScrollView, selector: "scroll-view", inputs: ["contentContainerStyle", "contentContainerClass", "horizontal", "contentOffset", "maintainVisibleContentPosition", "keyboardShouldPersistTaps", "nestedScrollEnabled", "stickyHeaderIndices"], outputs: ["contentSizeChange"], exportAs: ["scrollView"] }, { kind: "directive", type: AnimatedStyle, selector: "[animatedStyle]" }] });
100
+ ></modal>`, 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", ".sheet-backdrop {\n justify-content: flex-end;\n background-color: rgba(0, 0, 0, 0.36);\n}\n.sheet-dismiss {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.sheet-panel {\n max-height: 85%;\n border-top-left-radius: 24px;\n border-top-right-radius: 24px;\n background-color: var(--neu-surface, #ffffff);\n overflow: hidden;\n}\n.sheet-content {\n padding: 20px;\n padding-top: 8px;\n gap: 16px;\n flex-shrink: 1;\n}\n.sheet-handle {\n width: 36px;\n height: 4px;\n border-radius: 2px;\n background-color: var(--neu-border, #c6cede);\n align-self: center;\n}\n.sheet-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n}\n.sheet-fixed-content {\n flex: 1;\n min-height: 0;\n}\n.sheet-fixed-scroll {\n flex-grow: 1;\n min-height: 0;\n}\n"], dependencies: [{ kind: "component", type: Modal, selector: "modal", inputs: ["visible", "transparent", "backdropColor", "animationType", "presentationStyle", "supportedOrientations", "allowSwipeDismissal", "statusBarTranslucent", "navigationBarTranslucent", "hardwareAccelerated"] }, { kind: "component", type: SafeAreaProvider, selector: "safe-area-provider", inputs: ["reportInsets"] }, { kind: "directive", type: SafeAreaView, selector: "safe-area-view", inputs: ["edges", "mode"] }, { kind: "component", type: KeyboardAvoidingView, selector: "keyboard-avoiding-view", inputs: ["behavior", "contentContainerStyle", "contentContainerClass", "enabled", "keyboardVerticalOffset"] }, { 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: ScrollView, selector: "scroll-view", inputs: ["contentContainerStyle", "contentContainerClass", "horizontal", "contentOffset", "maintainVisibleContentPosition", "keyboardShouldPersistTaps", "nestedScrollEnabled", "stickyHeaderIndices"], outputs: ["contentSizeChange"], exportAs: ["scrollView"] }, { kind: "directive", type: AnimatedStyle, selector: "[animatedStyle]" }] });
101
101
  }
102
102
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuBottomSheetComponent, decorators: [{
103
103
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-sheet.js","sourceRoot":"","sources":["../../src/bottom-sheet/bottom-sheet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,GAErB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;;AAgEtD,MAAM,OAAO,uBAAuB;IACzB,IAAI,GAAG,KAAK,CAAC,KAAK;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AAI,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACtC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;IACS,KAAK,CAAC,KAAiB;QAC/B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC;IACxC,CAAC;IACS,GAAG,CAAC,KAAiB;QAC7B,MAAM,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC;QAClC,IAAI,CAAC,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,EAAE;YACtE,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;uGA1CU,uBAAuB;2FAAvB,uBAAuB,6yBA/CxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4CE,+6JAtDV,KAAK,wQACL,gBAAgB,yFAChB,YAAY,sFACZ,oBAAoB,gLACpB,IAAI,iDACJ,IAAI,mYACJ,SAAS,+EACT,UAAU,0TACV,aAAa;;2FAiDJ,uBAAuB;kBA5DnC,SAAS;+BACE,kBAAkB,WACnB;wBACP,KAAK;wBACL,gBAAgB;wBAChB,YAAY;wBACZ,oBAAoB;wBACpB,IAAI;wBACJ,IAAI;wBACJ,SAAS;wBACT,UAAU;wBACV,aAAa;qBACd,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4CE","sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n input,\n model,\n output,\n} from '@angular/core';\nimport {\n View,\n Text,\n ScrollView,\n Modal,\n SafeAreaProvider,\n SafeAreaView,\n KeyboardAvoidingView,\n type TouchEvent,\n} from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { AnimatedStyle } from '@ng-native/components/animations';\nimport { neuPresence } from '../foundation/motion.js';\n\nexport type NeuBottomSheetHeight = 'auto' | 'sm' | 'md' | 'lg' | 'full';\n\n@Component({\n selector: 'neu-bottom-sheet',\n imports: [\n Modal,\n SafeAreaProvider,\n SafeAreaView,\n KeyboardAvoidingView,\n View,\n Text,\n Pressable,\n ScrollView,\n AnimatedStyle,\n ],\n template: `\n <modal [supportedOrientations]=\"['portrait', 'landscape']\"\n [visible]=\"motion.visible()\"\n [transparent]=\"true\"\n presentationStyle=\"overFullScreen\"\n animationType=\"none\"\n (requestClose)=\"close()\"\n (show)=\"opened.emit()\"\n (dismiss)=\"dismissed.emit()\"\n ><safe-area-provider class=\"full\" [reportInsets]=\"false\"\n ><keyboard-avoiding-view class=\"full sheet-backdrop\" behavior=\"padding\"\n [animatedStyle]=\"backdropStyle\" [pointerEvents]=\"open() ? 'auto' : 'none'\"\n [accessibilityElementsHidden]=\"!open()\"\n [importantForAccessibility]=\"open() ? 'auto' : 'no-hide-descendants'\">\n <pressable class=\"sheet-dismiss\" [accessible]=\"false\" [focusable]=\"false\"\n [disabled]=\"!dismissible()\" (press)=\"close()\" />\n <safe-area-view class=\"sheet-panel\" [edges]=\"['bottom']\"\n [animatedStyle]=\"panelStyle\"\n [style.height]=\"panelHeight()\"\n [style.maxHeight]=\"panelHeight() ? '100%' : '85%'\"\n ><view\n class=\"sheet-content\"\n [class.sheet-fixed-content]=\"!!panelHeight()\"\n [accessibilityViewIsModal]=\"open()\"\n ><view class=\"sheet-handle\" />\n <view\n class=\"row\"\n (touchStart)=\"start($event)\"\n (touchEnd)=\"end($event)\"\n ><text class=\"title grow\" accessibilityRole=\"header\">{{\n title()\n }}</text>\n @if (dismissible()) {\n <pressable\n class=\"action\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"closeLabel()\"\n (press)=\"close()\"\n ><text class=\"label\">×</text></pressable\n >\n }</view\n ><scroll-view class=\"sheet-scroll\" [class.sheet-fixed-scroll]=\"!!panelHeight()\" keyboardShouldPersistTaps=\"handled\"\n ><view class=\"stack scroll-content\"\n ><ng-content /></view></scroll-view></view></safe-area-view></keyboard-avoiding-view></safe-area-provider\n ></modal>`,\n styleUrls: ['../foundation/mobile.css', './bottom-sheet.css'],\n})\nexport class NeuBottomSheetComponent {\n readonly open = model(false);\n // A hidden Modal has no native view tag until presentation. JS frames also\n // update the newly mounted backdrop instead of leaving its opacity at zero.\n protected readonly motion = neuPresence(this.open, false);\n protected readonly backdropStyle = { opacity: this.motion.progress };\n protected readonly panelStyle = {\n transform: [{ translateY: this.motion.progress.interpolate({ inputRange: [0, 1], outputRange: [24, 0] }) }],\n };\n readonly title = input.required<string>();\n readonly dismissible = input(true, { transform: booleanAttribute });\n readonly closeLabel = input('Close');\n readonly height = input<NeuBottomSheetHeight>('auto');\n protected readonly panelHeight = computed(() => {\n switch (this.height()) {\n case 'sm': return '35%';\n case 'md': return '50%';\n case 'lg': return '75%';\n case 'full': return '100%';\n default: return undefined;\n }\n });\n readonly closed = output<void>();\n /** Native presentation has finished. */\n readonly opened = output<void>();\n /** iOS native dismissal has finished. Android does not emit this native event. */\n readonly dismissed = output<void>();\n private startY: number | undefined;\n close(): void {\n if (this.open() && this.dismissible()) {\n this.open.set(false);\n this.closed.emit();\n }\n }\n protected start(event: TouchEvent): void {\n this.startY = event.nativeEvent.pageY;\n }\n protected end(event: TouchEvent): void {\n const y = event.nativeEvent.pageY;\n if (y !== undefined && this.startY !== undefined && y - this.startY > 80)\n this.close();\n this.startY = undefined;\n }\n}\n"]}
1
+ {"version":3,"file":"bottom-sheet.js","sourceRoot":"","sources":["../../src/bottom-sheet/bottom-sheet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,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IAAI;wBACJ,IAAI;wBACJ,SAAS;wBACT,UAAU;wBACV,aAAa;qBACd,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4CE","sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n input,\n model,\n output,\n} from '@angular/core';\nimport {\n View,\n Text,\n ScrollView,\n Modal,\n SafeAreaProvider,\n SafeAreaView,\n KeyboardAvoidingView,\n type TouchEvent,\n} from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { AnimatedStyle } from '@ng-native/components/animations';\nimport { neuPresence } from '../foundation/motion.js';\n\nexport type NeuBottomSheetHeight = 'auto' | 'sm' | 'md' | 'lg' | 'full';\n\n@Component({\n selector: 'neu-bottom-sheet',\n imports: [\n Modal,\n SafeAreaProvider,\n SafeAreaView,\n KeyboardAvoidingView,\n View,\n Text,\n Pressable,\n ScrollView,\n AnimatedStyle,\n ],\n template: `\n <modal [supportedOrientations]=\"['portrait', 'landscape']\"\n [visible]=\"motion.visible()\"\n [transparent]=\"true\"\n presentationStyle=\"overFullScreen\"\n animationType=\"none\"\n (requestClose)=\"close()\"\n (show)=\"opened.emit()\"\n (dismiss)=\"dismissed.emit()\"\n ><safe-area-provider class=\"full\" [reportInsets]=\"false\"\n ><keyboard-avoiding-view class=\"full sheet-backdrop\" behavior=\"padding\"\n [animatedStyle]=\"backdropStyle\" [pointerEvents]=\"open() ? 'auto' : 'none'\"\n [accessibilityElementsHidden]=\"!open()\"\n [importantForAccessibility]=\"open() ? 'auto' : 'no-hide-descendants'\">\n <pressable class=\"sheet-dismiss\" [accessible]=\"false\" [focusable]=\"false\"\n [disabled]=\"!dismissible()\" (press)=\"close()\" />\n <safe-area-view class=\"sheet-panel\" [edges]=\"['bottom']\"\n [animatedStyle]=\"panelStyle\"\n [style.height]=\"panelHeight()\"\n [style.maxHeight]=\"panelHeight() ? '100%' : '85%'\"\n ><view\n class=\"sheet-content\"\n [class.sheet-fixed-content]=\"!!panelHeight()\"\n [accessibilityViewIsModal]=\"open()\"\n ><view class=\"sheet-handle\" />\n <view\n class=\"row\"\n (touchStart)=\"start($event)\"\n (touchEnd)=\"end($event)\"\n ><text class=\"title grow\" accessibilityRole=\"header\">{{\n title()\n }}</text>\n @if (dismissible()) {\n <pressable\n class=\"action\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"closeLabel()\"\n (press)=\"close()\"\n ><text class=\"label\">×</text></pressable\n >\n }</view\n ><scroll-view class=\"sheet-scroll\" [class.sheet-fixed-scroll]=\"!!panelHeight()\" keyboardShouldPersistTaps=\"handled\"\n ><view class=\"stack scroll-content\"\n ><ng-content /></view></scroll-view></view></safe-area-view></keyboard-avoiding-view></safe-area-provider\n ></modal>`,\n styleUrls: ['../foundation/mobile.css', './bottom-sheet.css'],\n})\nexport class NeuBottomSheetComponent {\n readonly open = model(false);\n // A hidden Modal has no native view tag until presentation. JS frames also\n // update the newly mounted backdrop instead of leaving its opacity at zero.\n protected readonly motion = neuPresence(this.open, false);\n protected readonly backdropStyle = { opacity: this.motion.progress };\n protected readonly panelStyle = {\n transform: [{ translateY: this.motion.progress.interpolate({ inputRange: [0, 1], outputRange: [24, 0] }) }],\n };\n readonly title = input.required<string>();\n readonly dismissible = input(true, { transform: booleanAttribute });\n readonly closeLabel = input('Close');\n readonly height = input<NeuBottomSheetHeight>('auto');\n protected readonly panelHeight = computed(() => {\n switch (this.height()) {\n case 'sm': return '35%';\n case 'md': return '50%';\n case 'lg': return '75%';\n case 'full': return '100%';\n default: return undefined;\n }\n });\n readonly closed = output<void>();\n /** Native presentation has finished. */\n readonly opened = output<void>();\n /** iOS native dismissal has finished. Android does not emit this native event. */\n readonly dismissed = output<void>();\n private startY: number | undefined;\n close(): void {\n if (this.open() && this.dismissible()) {\n this.open.set(false);\n this.closed.emit();\n }\n }\n protected start(event: TouchEvent): void {\n this.startY = event.nativeEvent.pageY;\n }\n protected end(event: TouchEvent): void {\n const y = event.nativeEvent.pageY;\n if (y !== undefined && this.startY !== undefined && y - this.startY > 80)\n this.close();\n this.startY = undefined;\n }\n}\n"]}
@@ -1,7 +1,9 @@
1
1
  import { type PressEvent } from '@ng-native/components';
2
2
  import { type NeuSize, type NeuVariant, type NeuTone } from '../foundation/index.js';
3
+ import type { NeuHapticFeedback } from '../foundation/haptics.js';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class NeuButtonComponent {
6
+ readonly haptic: import("@angular/core").InputSignal<false | NeuHapticFeedback>;
5
7
  readonly label: import("@angular/core").InputSignal<string>;
6
8
  readonly accessibilityLabel: import("@angular/core").InputSignal<string>;
7
9
  readonly variant: import("@angular/core").InputSignal<NeuVariant>;
@@ -26,5 +28,5 @@ export declare class NeuButtonComponent {
26
28
  protected readonly classes: import("@angular/core").Signal<string>;
27
29
  protected activate(event: PressEvent): void;
28
30
  static ɵfac: i0.ɵɵFactoryDeclaration<NeuButtonComponent, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<NeuButtonComponent, "neu-button", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "pressed": "pressed"; }, never, never, true, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<NeuButtonComponent, "neu-button", never, { "haptic": { "alias": "haptic"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "pressed": "pressed"; }, never, never, true, never>;
30
32
  }
@@ -5,6 +5,8 @@ import { NEU_LIGHT_TOKENS, NEU_THEME, } from '../foundation/index.js';
5
5
  import { neuTonePalette } from '../foundation/tone.js';
6
6
  import * as i0 from "@angular/core";
7
7
  export class NeuButtonComponent {
8
+ haptic = input('press', /* @ts-ignore */
9
+ ...(ngDevMode ? [{ debugName: "haptic" }] : /* istanbul ignore next */ []));
8
10
  label = input.required(/* @ts-ignore */
9
11
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
10
12
  accessibilityLabel = input('', /* @ts-ignore */
@@ -41,7 +43,7 @@ export class NeuButtonComponent {
41
43
  this.pressed.emit(event);
42
44
  }
43
45
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
44
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.2", type: NeuButtonComponent, isStandalone: true, selector: "neu-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, accessibilityLabel: { classPropertyName: "accessibilityLabel", publicName: "accessibilityLabel", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressed" }, host: { properties: { "style.width": "fullWidth() ? '100%' : null", "style.alignSelf": "fullWidth() ? 'stretch' : 'flex-start'", "style.opacity": "unavailable() ? 0.45 : held() ? 0.8 : 1" } }, ngImport: i0, template: `
46
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.2", type: NeuButtonComponent, isStandalone: true, selector: "neu-button", inputs: { haptic: { classPropertyName: "haptic", publicName: "haptic", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, accessibilityLabel: { classPropertyName: "accessibilityLabel", publicName: "accessibilityLabel", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressed" }, host: { properties: { "style.width": "fullWidth() ? '100%' : null", "style.alignSelf": "fullWidth() ? 'stretch' : 'flex-start'", "style.opacity": "unavailable() ? 0.45 : held() ? 0.8 : 1" } }, ngImport: i0, template: `
45
47
  <pressable
46
48
  [class]="classes()"
47
49
  accessibilityRole="button"
@@ -50,6 +52,7 @@ export class NeuButtonComponent {
50
52
  [aria-disabled]="unavailable()"
51
53
  [aria-busy]="loading()"
52
54
  [disabled]="unavailable()"
55
+ [haptic]="haptic()"
53
56
  [style.width]="fullWidth() ? '100%' : null"
54
57
  [style.alignSelf]="fullWidth() ? 'stretch' : 'flex-start'"
55
58
  [style.backgroundColor]="background()"
@@ -69,7 +72,7 @@ export class NeuButtonComponent {
69
72
  }
70
73
  <text class="label" [style.color]="loadingColor()" [style.fontSize]="fontSize()" [allowFontScaling]="true">{{ label() }}</text>
71
74
  </pressable>
72
- `, isInline: true, styles: ["\n :host { transition: opacity var(--neu-duration, 120ms); }\n .control {\n max-width: 100%;\n min-width: 48px;\n min-height: 56px;\n padding: 12px 20px;\n border-radius: var(--neu-radius, 12px);\n flex-direction: row;\n gap: 8px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #006ee6);\n }\n .label {\n flex-shrink: 1;\n color: var(--neu-on-accent, #ffffff);\n font-size: var(--neu-font-size, 16px);\n font-weight: 600;\n }\n .tonal {\n background-color: var(--neu-tonal, #eff6ff);\n }\n .control.tonal > .label,\n .control.outline > .label,\n .control.text > .label {\n color: var(--neu-accent, #006ee6);\n }\n .outline {\n background-color: transparent;\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n }\n .text {\n background-color: transparent;\n }\n .sm {\n min-height: 48px;\n padding: 10px 14px;\n }\n .lg {\n min-height: 64px;\n padding: 16px 24px;\n }\n @media (prefers-reduced-motion: reduce) {\n :host { transition: none; }\n }\n "], dependencies: [{ kind: "directive", type: Pressable, selector: "pressable", exportAs: ["pressable"] }, { 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: ActivityIndicator, selector: "activity-indicator", inputs: ["size", "animating", "color", "hidesWhenStopped"] }] });
75
+ `, isInline: true, styles: ["\n :host { transition: opacity var(--neu-duration, 120ms); }\n .control {\n max-width: 100%;\n min-width: 48px;\n min-height: 56px;\n padding: 12px 20px;\n border-radius: var(--neu-radius, 12px);\n flex-direction: row;\n gap: 8px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #006ee6);\n }\n .label {\n flex-shrink: 1;\n color: var(--neu-on-accent, #ffffff);\n font-size: var(--neu-font-size, 16px);\n font-weight: 600;\n }\n .tonal {\n background-color: var(--neu-tonal, #eff6ff);\n }\n .control.tonal > .label,\n .control.outline > .label,\n .control.text > .label {\n color: var(--neu-accent, #006ee6);\n }\n .outline {\n background-color: transparent;\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n }\n .text {\n background-color: transparent;\n }\n .sm {\n min-height: 48px;\n padding: 10px 14px;\n }\n .lg {\n min-height: 64px;\n padding: 16px 24px;\n }\n @media (prefers-reduced-motion: reduce) {\n :host { transition: none; }\n }\n "], dependencies: [{ kind: "directive", type: Pressable, selector: "pressable", inputs: ["haptic"], exportAs: ["pressable"] }, { 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: ActivityIndicator, selector: "activity-indicator", inputs: ["size", "animating", "color", "hidesWhenStopped"] }] });
73
76
  }
74
77
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuButtonComponent, decorators: [{
75
78
  type: Component,
@@ -86,6 +89,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
86
89
  [aria-disabled]="unavailable()"
87
90
  [aria-busy]="loading()"
88
91
  [disabled]="unavailable()"
92
+ [haptic]="haptic()"
89
93
  [style.width]="fullWidth() ? '100%' : null"
90
94
  [style.alignSelf]="fullWidth() ? 'stretch' : 'flex-start'"
91
95
  [style.backgroundColor]="background()"
@@ -106,5 +110,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
106
110
  <text class="label" [style.color]="loadingColor()" [style.fontSize]="fontSize()" [allowFontScaling]="true">{{ label() }}</text>
107
111
  </pressable>
108
112
  `, styles: ["\n :host { transition: opacity var(--neu-duration, 120ms); }\n .control {\n max-width: 100%;\n min-width: 48px;\n min-height: 56px;\n padding: 12px 20px;\n border-radius: var(--neu-radius, 12px);\n flex-direction: row;\n gap: 8px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #006ee6);\n }\n .label {\n flex-shrink: 1;\n color: var(--neu-on-accent, #ffffff);\n font-size: var(--neu-font-size, 16px);\n font-weight: 600;\n }\n .tonal {\n background-color: var(--neu-tonal, #eff6ff);\n }\n .control.tonal > .label,\n .control.outline > .label,\n .control.text > .label {\n color: var(--neu-accent, #006ee6);\n }\n .outline {\n background-color: transparent;\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n }\n .text {\n background-color: transparent;\n }\n .sm {\n min-height: 48px;\n padding: 10px 14px;\n }\n .lg {\n min-height: 64px;\n padding: 16px 24px;\n }\n @media (prefers-reduced-motion: reduce) {\n :host { transition: none; }\n }\n "] }]
109
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], accessibilityLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibilityLabel", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], pressed: [{ type: i0.Output, args: ["pressed"] }] } });
113
+ }], propDecorators: { haptic: [{ type: i0.Input, args: [{ isSignal: true, alias: "haptic", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], accessibilityLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibilityLabel", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], pressed: [{ type: i0.Output, args: ["pressed"] }] } });
110
114
  //# sourceMappingURL=button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,IAAI,GAEL,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EACL,gBAAgB,EAChB,SAAS,GAIV,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;;AAwFvD,MAAM,OAAO,kBAAkB;IACpB,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU,CAAC;IACjC,kBAAkB,GAAG,KAAK,CAAC,EAAE;2FAAC,CAAC;IAC/B,OAAO,GAAG,KAAK,CAAa,OAAO;gFAAC,CAAC;IACrC,IAAI,GAAG,KAAK,CAAU,OAAO;6EAAC,CAAC;IAC/B,IAAI,GAAG,KAAK,CAAU,IAAI;6EAAC,CAAC;IAC5B,SAAS,GAAG,KAAK,CAAC,KAAK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C,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC;IAClF,CAAC;qFAAC,CAAC;IACgB,IAAI,GAAG,MAAM,CAAC,KAAK;6EAAC,CAAC;IACrB,WAAW,GAAG,QAAQ,CACvC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,OAAO,EAAE;oFACxC,CAAC;IACiB,OAAO,GAAG,QAAQ,CACnC,GAAG,EAAE,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE;gFACtD,CAAC;IACQ,QAAQ,CAAC,KAAiB;QAClC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;uGA1BU,kBAAkB;2FAAlB,kBAAkB,qzCA9EnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BT,kvCAlCS,SAAS,+EAAE,IAAI,mYAAE,iBAAiB;;2FAoFjC,kBAAkB;kBAtF9B,SAAS;+BACE,YAAY,WACb,CAAC,SAAS,EAAE,IAAI,EAAE,iBAAiB,CAAC,QACvC;wBACJ,eAAe,EAAE,6BAA6B;wBAC9C,mBAAmB,EAAE,wCAAwC;wBAC7D,iBAAiB,EAAE,yCAAyC;qBAC7D,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BT","sourcesContent":["import {\n Component,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport {\n ActivityIndicator,\n Text,\n type PressEvent,\n} from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport {\n NEU_LIGHT_TOKENS,\n NEU_THEME,\n type NeuSize,\n type NeuVariant,\n type NeuTone,\n} from '../foundation/index.js';\nimport { neuTonePalette } from '../foundation/tone.js';\n\n@Component({\n selector: 'neu-button',\n imports: [Pressable, Text, ActivityIndicator],\n host: {\n '[style.width]': \"fullWidth() ? '100%' : null\",\n '[style.alignSelf]': \"fullWidth() ? 'stretch' : 'flex-start'\",\n '[style.opacity]': 'unavailable() ? 0.45 : held() ? 0.8 : 1',\n },\n template: `\n <pressable\n [class]=\"classes()\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"accessibilityLabel() || label()\"\n [accessibilityState]=\"{ disabled: unavailable(), busy: loading() }\"\n [aria-disabled]=\"unavailable()\"\n [aria-busy]=\"loading()\"\n [disabled]=\"unavailable()\"\n [style.width]=\"fullWidth() ? '100%' : null\"\n [style.alignSelf]=\"fullWidth() ? 'stretch' : 'flex-start'\"\n [style.backgroundColor]=\"background()\"\n [style.borderColor]=\"variant() === 'outline' ? palette().color : 'transparent'\"\n (pressIn)=\"held.set(true)\"\n (pressOut)=\"held.set(false)\"\n (press)=\"activate($event)\"\n >\n @if (loading()) {\n <activity-indicator\n size=\"small\"\n [color]=\"loadingColor()\"\n [accessible]=\"false\"\n [accessibilityElementsHidden]=\"true\"\n importantForAccessibility=\"no-hide-descendants\"\n />\n }\n <text class=\"label\" [style.color]=\"loadingColor()\" [style.fontSize]=\"fontSize()\" [allowFontScaling]=\"true\">{{ label() }}</text>\n </pressable>\n `,\n styles: `\n :host { transition: opacity var(--neu-duration, 120ms); }\n .control {\n max-width: 100%;\n min-width: 48px;\n min-height: 56px;\n padding: 12px 20px;\n border-radius: var(--neu-radius, 12px);\n flex-direction: row;\n gap: 8px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #006ee6);\n }\n .label {\n flex-shrink: 1;\n color: var(--neu-on-accent, #ffffff);\n font-size: var(--neu-font-size, 16px);\n font-weight: 600;\n }\n .tonal {\n background-color: var(--neu-tonal, #eff6ff);\n }\n .control.tonal > .label,\n .control.outline > .label,\n .control.text > .label {\n color: var(--neu-accent, #006ee6);\n }\n .outline {\n background-color: transparent;\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n }\n .text {\n background-color: transparent;\n }\n .sm {\n min-height: 48px;\n padding: 10px 14px;\n }\n .lg {\n min-height: 64px;\n padding: 16px 24px;\n }\n @media (prefers-reduced-motion: reduce) {\n :host { transition: none; }\n }\n `,\n})\nexport class NeuButtonComponent {\n readonly label = input.required<string>();\n readonly accessibilityLabel = input('');\n readonly variant = input<NeuVariant>('solid');\n readonly tone = input<NeuTone>('brand');\n readonly size = input<NeuSize>('md');\n readonly fullWidth = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly loading = input(false, { transform: booleanAttribute });\n readonly pressed = output<PressEvent>();\n private readonly theme = inject(NEU_THEME, { optional: true });\n protected readonly palette = computed(() => neuTonePalette(this.theme?.() ?? NEU_LIGHT_TOKENS, this.tone()));\n protected readonly fontSize = computed(() => (this.theme?.() ?? NEU_LIGHT_TOKENS).fontSize * (this.size() === 'sm' ? 0.875 : this.size() === 'lg' ? 1.125 : 1));\n protected readonly background = computed(() => this.variant() === 'solid' ? this.palette().color : this.variant() === 'tonal' ? this.palette().tonal : 'transparent');\n protected readonly loadingColor = computed(() => {\n return this.variant() === 'solid' ? this.palette().onColor : this.palette().ink;\n });\n protected readonly held = signal(false);\n protected readonly unavailable = computed(\n () => this.disabled() || this.loading(),\n );\n protected readonly classes = computed(\n () => 'control ' + this.variant() + ' ' + this.size(),\n );\n protected activate(event: PressEvent): void {\n if (!this.unavailable()) this.pressed.emit(event);\n }\n}\n"]}
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,IAAI,GAEL,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EACL,gBAAgB,EAChB,SAAS,GAI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9C,mBAAmB,EAAE,wCAAwC;wBAC7D,iBAAiB,EAAE,yCAAyC;qBAC7D,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BT","sourcesContent":["import {\n Component,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport {\n ActivityIndicator,\n Text,\n type PressEvent,\n} from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport {\n NEU_LIGHT_TOKENS,\n NEU_THEME,\n type NeuSize,\n type NeuVariant,\n type NeuTone,\n} from '../foundation/index.js';\nimport { neuTonePalette } from '../foundation/tone.js';\nimport type { NeuHapticFeedback } from '../foundation/haptics.js';\n\n@Component({\n selector: 'neu-button',\n imports: [Pressable, Text, ActivityIndicator],\n host: {\n '[style.width]': \"fullWidth() ? '100%' : null\",\n '[style.alignSelf]': \"fullWidth() ? 'stretch' : 'flex-start'\",\n '[style.opacity]': 'unavailable() ? 0.45 : held() ? 0.8 : 1',\n },\n template: `\n <pressable\n [class]=\"classes()\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"accessibilityLabel() || label()\"\n [accessibilityState]=\"{ disabled: unavailable(), busy: loading() }\"\n [aria-disabled]=\"unavailable()\"\n [aria-busy]=\"loading()\"\n [disabled]=\"unavailable()\"\n [haptic]=\"haptic()\"\n [style.width]=\"fullWidth() ? '100%' : null\"\n [style.alignSelf]=\"fullWidth() ? 'stretch' : 'flex-start'\"\n [style.backgroundColor]=\"background()\"\n [style.borderColor]=\"variant() === 'outline' ? palette().color : 'transparent'\"\n (pressIn)=\"held.set(true)\"\n (pressOut)=\"held.set(false)\"\n (press)=\"activate($event)\"\n >\n @if (loading()) {\n <activity-indicator\n size=\"small\"\n [color]=\"loadingColor()\"\n [accessible]=\"false\"\n [accessibilityElementsHidden]=\"true\"\n importantForAccessibility=\"no-hide-descendants\"\n />\n }\n <text class=\"label\" [style.color]=\"loadingColor()\" [style.fontSize]=\"fontSize()\" [allowFontScaling]=\"true\">{{ label() }}</text>\n </pressable>\n `,\n styles: `\n :host { transition: opacity var(--neu-duration, 120ms); }\n .control {\n max-width: 100%;\n min-width: 48px;\n min-height: 56px;\n padding: 12px 20px;\n border-radius: var(--neu-radius, 12px);\n flex-direction: row;\n gap: 8px;\n align-items: center;\n justify-content: center;\n background-color: var(--neu-accent, #006ee6);\n }\n .label {\n flex-shrink: 1;\n color: var(--neu-on-accent, #ffffff);\n font-size: var(--neu-font-size, 16px);\n font-weight: 600;\n }\n .tonal {\n background-color: var(--neu-tonal, #eff6ff);\n }\n .control.tonal > .label,\n .control.outline > .label,\n .control.text > .label {\n color: var(--neu-accent, #006ee6);\n }\n .outline {\n background-color: transparent;\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n }\n .text {\n background-color: transparent;\n }\n .sm {\n min-height: 48px;\n padding: 10px 14px;\n }\n .lg {\n min-height: 64px;\n padding: 16px 24px;\n }\n @media (prefers-reduced-motion: reduce) {\n :host { transition: none; }\n }\n `,\n})\nexport class NeuButtonComponent {\n readonly haptic = input<NeuHapticFeedback | false>('press');\n readonly label = input.required<string>();\n readonly accessibilityLabel = input('');\n readonly variant = input<NeuVariant>('solid');\n readonly tone = input<NeuTone>('brand');\n readonly size = input<NeuSize>('md');\n readonly fullWidth = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly loading = input(false, { transform: booleanAttribute });\n readonly pressed = output<PressEvent>();\n private readonly theme = inject(NEU_THEME, { optional: true });\n protected readonly palette = computed(() => neuTonePalette(this.theme?.() ?? NEU_LIGHT_TOKENS, this.tone()));\n protected readonly fontSize = computed(() => (this.theme?.() ?? NEU_LIGHT_TOKENS).fontSize * (this.size() === 'sm' ? 0.875 : this.size() === 'lg' ? 1.125 : 1));\n protected readonly background = computed(() => this.variant() === 'solid' ? this.palette().color : this.variant() === 'tonal' ? this.palette().tonal : 'transparent');\n protected readonly loadingColor = computed(() => {\n return this.variant() === 'solid' ? this.palette().onColor : this.palette().ink;\n });\n protected readonly held = signal(false);\n protected readonly unavailable = computed(\n () => this.disabled() || this.loading(),\n );\n protected readonly classes = computed(\n () => 'control ' + this.variant() + ' ' + this.size(),\n );\n protected activate(event: PressEvent): void {\n if (!this.unavailable()) this.pressed.emit(event);\n }\n}\n"]}
@@ -69,7 +69,7 @@ export class NeuButtonGroupComponent {
69
69
  }
70
70
  </view></scroll-view
71
71
  >
72
- }`, isInline: true, styles: ["\n .neu-unavailable > * { opacity: 0.45; }\n :host {\n align-self: stretch;\n min-width: 0;\n max-width: 100%;\n }\n .group-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n max-width: 100%;\n }\n .button-group {\n flex-direction: row;\n flex-grow: 1;\n align-items: stretch;\n border-radius: var(--neu-radius, 12px);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n overflow: hidden;\n }\n .group-action {\n min-height: 48px;\n min-width: 48px;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0;\n padding: 12px 8px;\n justify-content: center;\n align-items: center;\n border-color: var(--neu-border, #a5afbf);\n background-color: var(--neu-surface, #ffffff);\n }\n .label {\n color: var(--neu-accent-ink, #3155d9);\n font-size: 14px;\n line-height: 20px;\n text-align: center;\n flex-shrink: 1;\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: ScrollView, selector: "scroll-view", inputs: ["contentContainerStyle", "contentContainerClass", "horizontal", "contentOffset", "maintainVisibleContentPosition", "keyboardShouldPersistTaps", "nestedScrollEnabled", "stickyHeaderIndices"], outputs: ["contentSizeChange"], exportAs: ["scrollView"] }] });
72
+ }`, isInline: true, styles: ["\n .neu-unavailable > * { opacity: 0.45; }\n :host {\n align-self: stretch;\n min-width: 0;\n max-width: 100%;\n }\n .group-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n max-width: 100%;\n }\n .button-group {\n flex-direction: row;\n flex-grow: 1;\n align-items: stretch;\n border-radius: var(--neu-radius, 12px);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n overflow: hidden;\n }\n .group-action {\n min-height: 48px;\n min-width: 48px;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0;\n padding: 12px 8px;\n justify-content: center;\n align-items: center;\n border-color: var(--neu-border, #a5afbf);\n background-color: var(--neu-surface, #ffffff);\n }\n .label {\n color: var(--neu-accent-ink, #3155d9);\n font-size: 14px;\n line-height: 20px;\n text-align: center;\n flex-shrink: 1;\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: ScrollView, selector: "scroll-view", inputs: ["contentContainerStyle", "contentContainerClass", "horizontal", "contentOffset", "maintainVisibleContentPosition", "keyboardShouldPersistTaps", "nestedScrollEnabled", "stickyHeaderIndices"], outputs: ["contentSizeChange"], exportAs: ["scrollView"] }] });
73
73
  }
74
74
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuButtonGroupComponent, decorators: [{
75
75
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"button-group.js","sourceRoot":"","sources":["../../src/button-group/button-group.ts"],"names":[],"mapp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C,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvE,CAAC;uGAjBU,uBAAuB;2FAAvB,uBAAuB,mmBAtFxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2CR,wiCA5CQ,IAAI,iDAAE,IAAI,mYAAE,SAAS,+EAAE,UAAU;;2FAuFhC,uBAAuB;kBAzFnC,SAAS;+BACE,kBAAkB,WACnB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,YAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2CR","sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { View, Text, ScrollView } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { NeuOption } from '../foundation/mobile.js';\nimport {\n NEU_LIGHT_TOKENS,\n NEU_THEME,\n type NeuTone,\n} from '../foundation/index.js';\nimport { neuTonePalette } from '../foundation/tone.js';\n\n@Component({\n selector: 'neu-button-group',\n imports: [View, Text, Pressable, ScrollView],\n template: `@if (items().length) {\n <scroll-view\n class=\"group-scroll\"\n [horizontal]=\"true\"\n keyboardShouldPersistTaps=\"handled\"\n [showsHorizontalScrollIndicator]=\"false\"\n [contentContainerStyle]=\"scrollContent\"\n >\n <view\n class=\"button-group\"\n [accessibilityLabel]=\"label()\"\n [style.minWidth]=\"items().length * 48 + 2\"\n >\n @for (item of items(); track item.id; let last = $last) {\n <pressable\n class=\"group-action\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"item.label\"\n [disabled]=\"disabled() || !!item.disabled\"\n [accessibilityState]=\"{ disabled: disabled() || item.disabled }\"\n [class.neu-unavailable]=\"disabled() || item.disabled\"\n [style.borderRightWidth]=\"last ? 0 : 1\"\n [style.backgroundColor]=\"\n !disabled() && !item.disabled && held() === item.id\n ? palette().tonal\n : tokens().surface\n \"\n (pressIn)=\"held.set(item.id)\"\n (pressOut)=\"held.set(null)\"\n (press)=\"activate(item)\"\n ><text\n class=\"label\"\n pointerEvents=\"none\"\n [accessible]=\"false\"\n [style.color]=\"palette().ink\"\n [numberOfLines]=\"2\"\n ellipsizeMode=\"tail\"\n >{{ item.label }}</text\n ></pressable\n >\n }\n </view></scroll-view\n >\n }`,\n styles: `\n .neu-unavailable > * { opacity: 0.45; }\n :host {\n align-self: stretch;\n min-width: 0;\n max-width: 100%;\n }\n .group-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n max-width: 100%;\n }\n .button-group {\n flex-direction: row;\n flex-grow: 1;\n align-items: stretch;\n border-radius: var(--neu-radius, 12px);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n overflow: hidden;\n }\n .group-action {\n min-height: 48px;\n min-width: 48px;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0;\n padding: 12px 8px;\n justify-content: center;\n align-items: center;\n border-color: var(--neu-border, #a5afbf);\n background-color: var(--neu-surface, #ffffff);\n }\n .label {\n color: var(--neu-accent-ink, #3155d9);\n font-size: 14px;\n line-height: 20px;\n text-align: center;\n flex-shrink: 1;\n }\n `,\n})\nexport class NeuButtonGroupComponent {\n readonly label = input('Actions');\n readonly items = input<readonly NeuOption[]>([]);\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly tone = input<NeuTone>('brand');\n readonly activated = output<string>();\n protected readonly scrollContent = { flexGrow: 1 };\n protected readonly held = signal<string | null>(null);\n private readonly theme = inject(NEU_THEME, { optional: true });\n protected readonly tokens = computed(\n () => this.theme?.() ?? NEU_LIGHT_TOKENS,\n );\n protected readonly palette = computed(() =>\n neuTonePalette(this.tokens(), this.tone()),\n );\n protected activate(item: NeuOption): void {\n if (!this.disabled() && !item.disabled) this.activated.emit(item.id);\n }\n}\n"]}
1
+ {"version":3,"file":"button-group.js","sourceRoot":"","sources":["../../src/button-group/button-group.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,S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C,CAAC;IACvE,CAAC;uGAjBU,uBAAuB;2FAAvB,uBAAuB,mmBAtFxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2CR,wiCA5CQ,IAAI,iDAAE,IAAI,mYAAE,SAAS,mGAAE,UAAU;;2FAuFhC,uBAAuB;kBAzFnC,SAAS;+BACE,kBAAkB,WACnB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,YAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2CR","sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { View, Text, ScrollView } from '@ng-native/components';\nimport { NeuNativePressable as Pressable } from '../foundation/native-pressable.js';\nimport { NeuOption } from '../foundation/mobile.js';\nimport {\n NEU_LIGHT_TOKENS,\n NEU_THEME,\n type NeuTone,\n} from '../foundation/index.js';\nimport { neuTonePalette } from '../foundation/tone.js';\n\n@Component({\n selector: 'neu-button-group',\n imports: [View, Text, Pressable, ScrollView],\n template: `@if (items().length) {\n <scroll-view\n class=\"group-scroll\"\n [horizontal]=\"true\"\n keyboardShouldPersistTaps=\"handled\"\n [showsHorizontalScrollIndicator]=\"false\"\n [contentContainerStyle]=\"scrollContent\"\n >\n <view\n class=\"button-group\"\n [accessibilityLabel]=\"label()\"\n [style.minWidth]=\"items().length * 48 + 2\"\n >\n @for (item of items(); track item.id; let last = $last) {\n <pressable\n class=\"group-action\"\n accessibilityRole=\"button\"\n [accessibilityLabel]=\"item.label\"\n [disabled]=\"disabled() || !!item.disabled\"\n [accessibilityState]=\"{ disabled: disabled() || item.disabled }\"\n [class.neu-unavailable]=\"disabled() || item.disabled\"\n [style.borderRightWidth]=\"last ? 0 : 1\"\n [style.backgroundColor]=\"\n !disabled() && !item.disabled && held() === item.id\n ? palette().tonal\n : tokens().surface\n \"\n (pressIn)=\"held.set(item.id)\"\n (pressOut)=\"held.set(null)\"\n (press)=\"activate(item)\"\n ><text\n class=\"label\"\n pointerEvents=\"none\"\n [accessible]=\"false\"\n [style.color]=\"palette().ink\"\n [numberOfLines]=\"2\"\n ellipsizeMode=\"tail\"\n >{{ item.label }}</text\n ></pressable\n >\n }\n </view></scroll-view\n >\n }`,\n styles: `\n .neu-unavailable > * { opacity: 0.45; }\n :host {\n align-self: stretch;\n min-width: 0;\n max-width: 100%;\n }\n .group-scroll {\n flex-grow: 0;\n flex-shrink: 1;\n max-width: 100%;\n }\n .button-group {\n flex-direction: row;\n flex-grow: 1;\n align-items: stretch;\n border-radius: var(--neu-radius, 12px);\n border-width: 1px;\n border-color: var(--neu-border, #a5afbf);\n overflow: hidden;\n }\n .group-action {\n min-height: 48px;\n min-width: 48px;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0;\n padding: 12px 8px;\n justify-content: center;\n align-items: center;\n border-color: var(--neu-border, #a5afbf);\n background-color: var(--neu-surface, #ffffff);\n }\n .label {\n color: var(--neu-accent-ink, #3155d9);\n font-size: 14px;\n line-height: 20px;\n text-align: center;\n flex-shrink: 1;\n }\n `,\n})\nexport class NeuButtonGroupComponent {\n readonly label = input('Actions');\n readonly items = input<readonly NeuOption[]>([]);\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly tone = input<NeuTone>('brand');\n readonly activated = output<string>();\n protected readonly scrollContent = { flexGrow: 1 };\n protected readonly held = signal<string | null>(null);\n private readonly theme = inject(NEU_THEME, { optional: true });\n protected readonly tokens = computed(\n () => this.theme?.() ?? NEU_LIGHT_TOKENS,\n );\n protected readonly palette = computed(() =>\n neuTonePalette(this.tokens(), this.tone()),\n );\n protected activate(item: NeuOption): void {\n if (!this.disabled() && !item.disabled) this.activated.emit(item.id);\n }\n}\n"]}
@@ -427,7 +427,7 @@ export class NeuCalendarComponent {
427
427
  }
428
428
  </view>
429
429
  }
430
- </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", ".calendar-heading {\n justify-content: center;\n gap: 4px;\n}\n.calendar-heading-action {\n min-height: 48px;\n padding-left: 8px;\n padding-right: 8px;\n align-items: center;\n justify-content: center;\n}\n.calendar-period {\n width: 33.3333%;\n min-width: 0;\n min-height: 52px;\n padding: 6px;\n border-radius: 8px;\n align-items: center;\n justify-content: center;\n}\n.calendar-navigation {\n width: 40px;\n min-height: 48px;\n align-items: center;\n justify-content: center;\n}\n.calendar-event-dot {\n width: 4px;\n height: 4px;\n border-radius: 2px;\n background-color: var(--neu-accent, #006ee6);\n position: absolute;\n bottom: 4px;\n align-self: center;\n}\n.calendar-event-dot-selected {\n background-color: var(--neu-on-accent, #ffffff);\n}\n.calendar-agenda {\n margin-top: 12px;\n padding-top: 16px;\n border-top-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.calendar-event {\n padding: 12px 0;\n}\n\n.calendar-event-heading {\n align-items: center;\n gap: 8px;\n}\n.calendar-event-title {\n min-width: 0;\n}\n.calendar-event-actions {\n flex-shrink: 0;\n gap: 0;\n}\n\n.calendar-date-value { min-width: 32px; min-height: 32px; padding: 4px; border-radius: 16px; align-items: center; justify-content: center; }\n.calendar-date-value .label, .calendar-date-value .selected-text { font-size: var(--neu-row-size, 15px); line-height: var(--neu-row-line, 21px); }\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: NeuButtonComponent, selector: "neu-button", inputs: ["label", "accessibilityLabel", "variant", "tone", "size", "fullWidth", "disabled", "loading"], outputs: ["pressed"] }, { kind: "component", type: NeuIconButtonComponent, selector: "neu-icon-button", inputs: ["label", "svg", "variant", "tone", "disabled", "loading"], outputs: ["pressed"] }] });
430
+ </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", ".calendar-heading {\n justify-content: center;\n gap: 4px;\n}\n.calendar-heading-action {\n min-height: 48px;\n padding-left: 8px;\n padding-right: 8px;\n align-items: center;\n justify-content: center;\n}\n.calendar-period {\n width: 33.3333%;\n min-width: 0;\n min-height: 52px;\n padding: 6px;\n border-radius: 8px;\n align-items: center;\n justify-content: center;\n}\n.calendar-navigation {\n width: 40px;\n min-height: 48px;\n align-items: center;\n justify-content: center;\n}\n.calendar-event-dot {\n width: 4px;\n height: 4px;\n border-radius: 2px;\n background-color: var(--neu-accent, #006ee6);\n position: absolute;\n bottom: 4px;\n align-self: center;\n}\n.calendar-event-dot-selected {\n background-color: var(--neu-on-accent, #ffffff);\n}\n.calendar-agenda {\n margin-top: 12px;\n padding-top: 16px;\n border-top-width: 1px;\n border-color: var(--neu-surface-border, #e1e6ed);\n}\n.calendar-event {\n padding: 12px 0;\n}\n\n.calendar-event-heading {\n align-items: center;\n gap: 8px;\n}\n.calendar-event-title {\n min-width: 0;\n}\n.calendar-event-actions {\n flex-shrink: 0;\n gap: 0;\n}\n\n.calendar-date-value { min-width: 32px; min-height: 32px; padding: 4px; border-radius: 16px; align-items: center; justify-content: center; }\n.calendar-date-value .label, .calendar-date-value .selected-text { font-size: var(--neu-row-size, 15px); line-height: var(--neu-row-line, 21px); }\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: NeuButtonComponent, selector: "neu-button", inputs: ["haptic", "label", "accessibilityLabel", "variant", "tone", "size", "fullWidth", "disabled", "loading"], outputs: ["pressed"] }, { kind: "component", type: NeuIconButtonComponent, selector: "neu-icon-button", inputs: ["haptic", "label", "svg", "variant", "tone", "disabled", "loading"], outputs: ["pressed"] }] });
431
431
  }
432
432
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: NeuCalendarComponent, decorators: [{
433
433
  type: Component,