@semantic-components/ui 0.66.0 → 0.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/esm2022/lib/components/file-upload/file-upload-dropzone.js +91 -0
  2. package/esm2022/lib/components/file-upload/file-upload-dropzone.js.map +1 -0
  3. package/esm2022/lib/components/file-upload/file-upload-item-delete.js +29 -0
  4. package/esm2022/lib/components/file-upload/file-upload-item-delete.js.map +1 -0
  5. package/esm2022/lib/components/file-upload/file-upload-item-name.js +20 -0
  6. package/esm2022/lib/components/file-upload/file-upload-item-name.js.map +1 -0
  7. package/esm2022/lib/components/file-upload/file-upload-item-preview.js +51 -0
  8. package/esm2022/lib/components/file-upload/file-upload-item-preview.js.map +1 -0
  9. package/esm2022/lib/components/file-upload/file-upload-item-progress.js +34 -0
  10. package/esm2022/lib/components/file-upload/file-upload-item-progress.js.map +1 -0
  11. package/esm2022/lib/components/file-upload/file-upload-item-size.js +37 -0
  12. package/esm2022/lib/components/file-upload/file-upload-item-size.js.map +1 -0
  13. package/esm2022/lib/components/file-upload/file-upload-item.js +29 -0
  14. package/esm2022/lib/components/file-upload/file-upload-item.js.map +1 -0
  15. package/esm2022/lib/components/file-upload/file-upload-list.js +20 -0
  16. package/esm2022/lib/components/file-upload/file-upload-list.js.map +1 -0
  17. package/esm2022/lib/components/file-upload/file-upload-trigger.js +66 -0
  18. package/esm2022/lib/components/file-upload/file-upload-trigger.js.map +1 -0
  19. package/esm2022/lib/components/file-upload/file-upload.js +118 -0
  20. package/esm2022/lib/components/file-upload/file-upload.js.map +1 -0
  21. package/esm2022/lib/components/file-upload/index.js +11 -0
  22. package/esm2022/lib/components/file-upload/index.js.map +1 -0
  23. package/esm2022/lib/components/index.js +10 -2
  24. package/esm2022/lib/components/index.js.map +1 -1
  25. package/esm2022/lib/components/menu-bar/menu-bar-item.js +12 -4
  26. package/esm2022/lib/components/menu-bar/menu-bar-item.js.map +1 -1
  27. package/esm2022/lib/components/native-select/index.js +6 -0
  28. package/esm2022/lib/components/native-select/index.js.map +1 -0
  29. package/esm2022/lib/components/native-select/native-select-container.js +20 -0
  30. package/esm2022/lib/components/native-select/native-select-container.js.map +1 -0
  31. package/esm2022/lib/components/native-select/native-select-icon.js +20 -0
  32. package/esm2022/lib/components/native-select/native-select-icon.js.map +1 -0
  33. package/esm2022/lib/components/native-select/native-select-optgroup.js +20 -0
  34. package/esm2022/lib/components/native-select/native-select-optgroup.js.map +1 -0
  35. package/esm2022/lib/components/native-select/native-select-option.js +20 -0
  36. package/esm2022/lib/components/native-select/native-select-option.js.map +1 -0
  37. package/esm2022/lib/components/native-select/native-select.js +29 -0
  38. package/esm2022/lib/components/native-select/native-select.js.map +1 -0
  39. package/esm2022/lib/components/navigation-menu/index.js +9 -0
  40. package/esm2022/lib/components/navigation-menu/index.js.map +1 -0
  41. package/esm2022/lib/components/navigation-menu/navigation-menu-content.js +37 -0
  42. package/esm2022/lib/components/navigation-menu/navigation-menu-content.js.map +1 -0
  43. package/esm2022/lib/components/navigation-menu/navigation-menu-grid.js +20 -0
  44. package/esm2022/lib/components/navigation-menu/navigation-menu-grid.js.map +1 -0
  45. package/esm2022/lib/components/navigation-menu/navigation-menu-item.js +118 -0
  46. package/esm2022/lib/components/navigation-menu/navigation-menu-item.js.map +1 -0
  47. package/esm2022/lib/components/navigation-menu/navigation-menu-link.js +22 -0
  48. package/esm2022/lib/components/navigation-menu/navigation-menu-link.js.map +1 -0
  49. package/esm2022/lib/components/navigation-menu/navigation-menu-list.js +20 -0
  50. package/esm2022/lib/components/navigation-menu/navigation-menu-list.js.map +1 -0
  51. package/esm2022/lib/components/navigation-menu/navigation-menu-portal.js +14 -0
  52. package/esm2022/lib/components/navigation-menu/navigation-menu-portal.js.map +1 -0
  53. package/esm2022/lib/components/navigation-menu/navigation-menu-trigger-icon.js +22 -0
  54. package/esm2022/lib/components/navigation-menu/navigation-menu-trigger-icon.js.map +1 -0
  55. package/esm2022/lib/components/navigation-menu/navigation-menu-trigger.js +41 -0
  56. package/esm2022/lib/components/navigation-menu/navigation-menu-trigger.js.map +1 -0
  57. package/esm2022/lib/components/navigation-menu/navigation-menu.js +32 -0
  58. package/esm2022/lib/components/navigation-menu/navigation-menu.js.map +1 -0
  59. package/esm2022/lib/components/range-slider/index.js +4 -0
  60. package/esm2022/lib/components/range-slider/index.js.map +1 -0
  61. package/esm2022/lib/components/range-slider/range-slider-max.js +38 -0
  62. package/esm2022/lib/components/range-slider/range-slider-max.js.map +1 -0
  63. package/esm2022/lib/components/range-slider/range-slider-min.js +38 -0
  64. package/esm2022/lib/components/range-slider/range-slider-min.js.map +1 -0
  65. package/esm2022/lib/components/range-slider/range-slider-thumb-base.js +24 -0
  66. package/esm2022/lib/components/range-slider/range-slider-thumb-base.js.map +1 -0
  67. package/esm2022/lib/components/range-slider/range-slider.js +62 -0
  68. package/esm2022/lib/components/range-slider/range-slider.js.map +1 -0
  69. package/esm2022/lib/components/scroll-area/index.js +2 -0
  70. package/esm2022/lib/components/scroll-area/index.js.map +1 -0
  71. package/esm2022/lib/components/scroll-area/scroll-area.js +21 -0
  72. package/esm2022/lib/components/scroll-area/scroll-area.js.map +1 -0
  73. package/esm2022/lib/components/select/index.js +5 -1
  74. package/esm2022/lib/components/select/index.js.map +1 -1
  75. package/esm2022/lib/components/select/select-group-label.js +28 -0
  76. package/esm2022/lib/components/select/select-group-label.js.map +1 -0
  77. package/esm2022/lib/components/select/select-group.js +28 -0
  78. package/esm2022/lib/components/select/select-group.js.map +1 -0
  79. package/esm2022/lib/components/select/{select-icon.js → select-item-icon.js} +7 -7
  80. package/esm2022/lib/components/select/select-item-icon.js.map +1 -0
  81. package/esm2022/lib/components/select/select-list.js +1 -5
  82. package/esm2022/lib/components/select/select-list.js.map +1 -1
  83. package/esm2022/lib/components/select/select-popup.js +32 -0
  84. package/esm2022/lib/components/select/select-popup.js.map +1 -0
  85. package/esm2022/lib/components/select/select-separator.js +22 -0
  86. package/esm2022/lib/components/select/select-separator.js.map +1 -0
  87. package/esm2022/lib/components/select/select-trigger-icon.js +4 -2
  88. package/esm2022/lib/components/select/select-trigger-icon.js.map +1 -1
  89. package/esm2022/lib/components/select/select-trigger.js +4 -7
  90. package/esm2022/lib/components/select/select-trigger.js.map +1 -1
  91. package/esm2022/lib/components/select/select.js +6 -5
  92. package/esm2022/lib/components/select/select.js.map +1 -1
  93. package/esm2022/lib/components/slider/index.js +2 -0
  94. package/esm2022/lib/components/slider/index.js.map +1 -0
  95. package/esm2022/lib/components/slider/slider.js +46 -0
  96. package/esm2022/lib/components/slider/slider.js.map +1 -0
  97. package/esm2022/lib/components/time-picker/index.js +10 -0
  98. package/esm2022/lib/components/time-picker/index.js.map +1 -0
  99. package/esm2022/lib/components/time-picker/time-picker-hours-input.js +67 -0
  100. package/esm2022/lib/components/time-picker/time-picker-hours-input.js.map +1 -0
  101. package/esm2022/lib/components/time-picker/time-picker-input.js +26 -0
  102. package/esm2022/lib/components/time-picker/time-picker-input.js.map +1 -0
  103. package/esm2022/lib/components/time-picker/time-picker-minutes-input.js +57 -0
  104. package/esm2022/lib/components/time-picker/time-picker-minutes-input.js.map +1 -0
  105. package/esm2022/lib/components/time-picker/time-picker-period-am.js +26 -0
  106. package/esm2022/lib/components/time-picker/time-picker-period-am.js.map +1 -0
  107. package/esm2022/lib/components/time-picker/time-picker-period-pm.js +26 -0
  108. package/esm2022/lib/components/time-picker/time-picker-period-pm.js.map +1 -0
  109. package/esm2022/lib/components/time-picker/time-picker-period.js +46 -0
  110. package/esm2022/lib/components/time-picker/time-picker-period.js.map +1 -0
  111. package/esm2022/lib/components/time-picker/time-picker-seconds-input.js +57 -0
  112. package/esm2022/lib/components/time-picker/time-picker-seconds-input.js.map +1 -0
  113. package/esm2022/lib/components/time-picker/time-picker-separator.js +20 -0
  114. package/esm2022/lib/components/time-picker/time-picker-separator.js.map +1 -0
  115. package/esm2022/lib/components/time-picker/time-picker.js +58 -0
  116. package/esm2022/lib/components/time-picker/time-picker.js.map +1 -0
  117. package/esm2022/lib/components/typography/heading.js +43 -0
  118. package/esm2022/lib/components/typography/heading.js.map +1 -0
  119. package/esm2022/lib/components/typography/index.js +2 -0
  120. package/esm2022/lib/components/typography/index.js.map +1 -0
  121. package/lib/components/file-upload/file-upload-dropzone.d.ts +15 -0
  122. package/lib/components/file-upload/file-upload-item-delete.d.ts +10 -0
  123. package/lib/components/file-upload/file-upload-item-name.d.ts +7 -0
  124. package/lib/components/file-upload/file-upload-item-preview.d.ts +11 -0
  125. package/lib/components/file-upload/file-upload-item-progress.d.ts +9 -0
  126. package/lib/components/file-upload/file-upload-item-size.d.ts +10 -0
  127. package/lib/components/file-upload/file-upload-item.d.ts +9 -0
  128. package/lib/components/file-upload/file-upload-list.d.ts +7 -0
  129. package/lib/components/file-upload/file-upload-trigger.d.ts +11 -0
  130. package/lib/components/file-upload/file-upload.d.ts +32 -0
  131. package/lib/components/file-upload/index.d.ts +11 -0
  132. package/lib/components/index.d.ts +10 -2
  133. package/lib/components/menu-bar/menu-bar-item.d.ts +1 -0
  134. package/lib/components/native-select/index.d.ts +5 -0
  135. package/lib/components/native-select/native-select-container.d.ts +7 -0
  136. package/lib/components/native-select/native-select-icon.d.ts +7 -0
  137. package/lib/components/native-select/native-select-optgroup.d.ts +7 -0
  138. package/lib/components/native-select/native-select-option.d.ts +7 -0
  139. package/lib/components/native-select/native-select.d.ts +12 -0
  140. package/lib/components/navigation-menu/index.d.ts +8 -0
  141. package/lib/components/navigation-menu/navigation-menu-content.d.ts +10 -0
  142. package/lib/components/navigation-menu/navigation-menu-grid.d.ts +7 -0
  143. package/lib/components/navigation-menu/navigation-menu-item.d.ts +27 -0
  144. package/lib/components/navigation-menu/navigation-menu-link.d.ts +8 -0
  145. package/lib/components/navigation-menu/navigation-menu-list.d.ts +7 -0
  146. package/lib/components/navigation-menu/navigation-menu-portal.d.ts +7 -0
  147. package/lib/components/navigation-menu/navigation-menu-trigger-icon.d.ts +8 -0
  148. package/lib/components/navigation-menu/navigation-menu-trigger.d.ts +12 -0
  149. package/lib/components/navigation-menu/navigation-menu.d.ts +10 -0
  150. package/lib/components/range-slider/index.d.ts +3 -0
  151. package/lib/components/range-slider/range-slider-max.d.ts +10 -0
  152. package/lib/components/range-slider/range-slider-min.d.ts +10 -0
  153. package/lib/components/range-slider/range-slider-thumb-base.d.ts +2 -0
  154. package/lib/components/range-slider/range-slider.d.ts +21 -0
  155. package/lib/components/scroll-area/index.d.ts +1 -0
  156. package/lib/components/scroll-area/scroll-area.d.ts +7 -0
  157. package/lib/components/select/index.d.ts +5 -1
  158. package/lib/components/select/select-group-label.d.ts +7 -0
  159. package/lib/components/select/select-group.d.ts +7 -0
  160. package/lib/components/select/select-item-icon.d.ts +7 -0
  161. package/lib/components/select/select-list.d.ts +0 -1
  162. package/lib/components/select/select-popup.d.ts +8 -0
  163. package/lib/components/select/select-separator.d.ts +7 -0
  164. package/lib/components/select/select-trigger-icon.d.ts +1 -0
  165. package/lib/components/select/select-trigger.d.ts +3 -4
  166. package/lib/components/select/select.d.ts +3 -2
  167. package/lib/components/slider/index.d.ts +1 -0
  168. package/lib/components/slider/slider.d.ts +15 -0
  169. package/lib/components/time-picker/index.d.ts +10 -0
  170. package/lib/components/time-picker/time-picker-hours-input.d.ts +14 -0
  171. package/lib/components/time-picker/time-picker-input.d.ts +9 -0
  172. package/lib/components/time-picker/time-picker-minutes-input.d.ts +12 -0
  173. package/lib/components/time-picker/time-picker-period-am.d.ts +8 -0
  174. package/lib/components/time-picker/time-picker-period-pm.d.ts +8 -0
  175. package/lib/components/time-picker/time-picker-period.d.ts +12 -0
  176. package/lib/components/time-picker/time-picker-seconds-input.d.ts +12 -0
  177. package/lib/components/time-picker/time-picker-separator.d.ts +7 -0
  178. package/lib/components/time-picker/time-picker.d.ts +26 -0
  179. package/lib/components/typography/heading.d.ts +15 -0
  180. package/lib/components/typography/index.d.ts +1 -0
  181. package/package.json +1 -1
  182. package/esm2022/lib/components/select/select-icon.js.map +0 -1
  183. package/lib/components/select/select-icon.d.ts +0 -7
@@ -1,4 +1,3 @@
1
- import { Combobox } from '@angular/aria/combobox';
2
1
  import { Listbox } from '@angular/aria/listbox';
3
2
  import { ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation, } from '@angular/core';
4
3
  import { cn } from '../../utils';
@@ -8,10 +7,7 @@ export class ScSelectList {
8
7
  listbox = inject(Listbox);
9
8
  values = computed(() => this.listbox.values(), ...(ngDevMode ? [{ debugName: "values" }] : []));
10
9
  classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
11
- combobox = inject(Combobox);
12
- class = computed(() => cn('bg-popover text-popover-foreground ring-foreground/10 relative z-50 mt-1 flex w-full max-h-44 min-w-36 flex-col overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1', this.combobox.expanded()
13
- ? 'opacity-100 visible transition-[max-height,opacity,visibility] duration-150 ease-out'
14
- : 'max-h-0 opacity-0 invisible transition-[max-height,opacity,visibility] duration-150 ease-in [transition-delay:0s,0s,150ms]', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
10
+ class = computed(() => cn('flex h-full flex-col overflow-x-hidden overflow-y-auto', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
15
11
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSelectList, deps: [], target: i0.ɵɵFactoryTarget.Component });
16
12
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScSelectList, isStandalone: true, selector: "div[scSelectList]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-list" }, properties: { "class": "class()" } }, hostDirectives: [{ directive: i1.Listbox }], ngImport: i0, template: `
17
13
  <ng-content />
@@ -1 +1 @@
1
- {"version":3,"file":"select-list.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;;AAgBjC,MAAM,OAAO,YAAY;IACN,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,kDAAC,CAAC;IAC/C,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAE3C,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE1B,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,mLAAmL,EACnL,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;QACtB,CAAC,CAAC,sFAAsF;QACxF,CAAC,CAAC,4HAA4H,EAChI,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGAfS,YAAY;2FAAZ,YAAY,kWAXb;;GAET;;2FASU,YAAY;kBAdxB,SAAS;mBAAC;oBACT,QAAQ,EAAE,mBAAmB;oBAC7B,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE;;GAET;oBACD,cAAc,EAAE,CAAC,OAAO,CAAC;oBACzB,IAAI,EAAE;wBACJ,WAAW,EAAE,aAAa;wBAC1B,SAAS,EAAE,SAAS;qBACrB;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD","sourcesContent":["import { Combobox } from '@angular/aria/combobox';\nimport { Listbox } from '@angular/aria/listbox';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { cn } from '../../utils';\n\n@Component({\n selector: 'div[scSelectList]',\n imports: [],\n template: `\n <ng-content />\n `,\n hostDirectives: [Listbox],\n host: {\n 'data-slot': 'select-list',\n '[class]': 'class()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScSelectList {\n private readonly listbox = inject(Listbox);\n readonly values = computed(() => this.listbox.values());\n readonly classInput = input<string>('', { alias: 'class' });\n\n private readonly combobox = inject(Combobox);\n\n protected readonly class = computed(() =>\n cn(\n 'bg-popover text-popover-foreground ring-foreground/10 relative z-50 mt-1 flex w-full max-h-44 min-w-36 flex-col overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1',\n this.combobox.expanded()\n ? 'opacity-100 visible transition-[max-height,opacity,visibility] duration-150 ease-out'\n : 'max-h-0 opacity-0 invisible transition-[max-height,opacity,visibility] duration-150 ease-in [transition-delay:0s,0s,150ms]',\n this.classInput(),\n ),\n );\n}\n"]}
1
+ {"version":3,"file":"select-list.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;;AAgBjC,MAAM,OAAO,YAAY;IACN,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,kDAAC,CAAC;IAC/C,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,wDAAwD,EACxD,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGAVS,YAAY;2FAAZ,YAAY,kWAXb;;GAET;;2FASU,YAAY;kBAdxB,SAAS;mBAAC;oBACT,QAAQ,EAAE,mBAAmB;oBAC7B,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE;;GAET;oBACD,cAAc,EAAE,CAAC,OAAO,CAAC;oBACzB,IAAI,EAAE;wBACJ,WAAW,EAAE,aAAa;wBAC1B,SAAS,EAAE,SAAS;qBACrB;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD","sourcesContent":["import { Listbox } from '@angular/aria/listbox';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { cn } from '../../utils';\n\n@Component({\n selector: 'div[scSelectList]',\n imports: [],\n template: `\n <ng-content />\n `,\n hostDirectives: [Listbox],\n host: {\n 'data-slot': 'select-list',\n '[class]': 'class()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScSelectList {\n private readonly listbox = inject(Listbox);\n readonly values = computed(() => this.listbox.values());\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn(\n 'flex h-full flex-col overflow-x-hidden overflow-y-auto',\n this.classInput(),\n ),\n );\n}\n"]}
@@ -0,0 +1,32 @@
1
+ import { Combobox } from '@angular/aria/combobox';
2
+ import { ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation, } from '@angular/core';
3
+ import { cn } from '../../utils';
4
+ import * as i0 from "@angular/core";
5
+ export class ScSelectPopup {
6
+ classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
7
+ combobox = inject(Combobox);
8
+ class = computed(() => cn('bg-popover text-popover-foreground ring-foreground/10 relative z-50 mt-1 flex w-full max-h-44 min-w-36 flex-col rounded-lg p-1 shadow-md ring-1', this.combobox.expanded()
9
+ ? 'opacity-100 visible transition-[max-height,opacity,visibility] duration-150 ease-out'
10
+ : 'max-h-0 opacity-0 invisible transition-[max-height,opacity,visibility] duration-150 ease-in [transition-delay:0s,0s,150ms]', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
11
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSelectPopup, deps: [], target: i0.ɵɵFactoryTarget.Component });
12
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScSelectPopup, isStandalone: true, selector: "div[scSelectPopup]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-popup" }, properties: { "class": "class()" } }, ngImport: i0, template: `
13
+ <ng-content />
14
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
15
+ }
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSelectPopup, decorators: [{
17
+ type: Component,
18
+ args: [{
19
+ selector: 'div[scSelectPopup]',
20
+ imports: [],
21
+ template: `
22
+ <ng-content />
23
+ `,
24
+ host: {
25
+ 'data-slot': 'select-popup',
26
+ '[class]': 'class()',
27
+ },
28
+ encapsulation: ViewEncapsulation.None,
29
+ changeDetection: ChangeDetectionStrategy.OnPush,
30
+ }]
31
+ }], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
32
+ //# sourceMappingURL=select-popup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-popup.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-popup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;AAejC,MAAM,OAAO,aAAa;IACf,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAE3C,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE1B,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,iJAAiJ,EACjJ,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;QACtB,CAAC,CAAC,sFAAsF;QACxF,CAAC,CAAC,4HAA4H,EAChI,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGAbS,aAAa;2FAAb,aAAa,uTAVd;;GAET;;2FAQU,aAAa;kBAbzB,SAAS;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE;;GAET;oBACD,IAAI,EAAE;wBACJ,WAAW,EAAE,cAAc;wBAC3B,SAAS,EAAE,SAAS;qBACrB;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD","sourcesContent":["import { Combobox } from '@angular/aria/combobox';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { cn } from '../../utils';\n\n@Component({\n selector: 'div[scSelectPopup]',\n imports: [],\n template: `\n <ng-content />\n `,\n host: {\n 'data-slot': 'select-popup',\n '[class]': 'class()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScSelectPopup {\n readonly classInput = input<string>('', { alias: 'class' });\n\n private readonly combobox = inject(Combobox);\n\n protected readonly class = computed(() =>\n cn(\n 'bg-popover text-popover-foreground ring-foreground/10 relative z-50 mt-1 flex w-full max-h-44 min-w-36 flex-col rounded-lg p-1 shadow-md ring-1',\n this.combobox.expanded()\n ? 'opacity-100 visible transition-[max-height,opacity,visibility] duration-150 ease-out'\n : 'max-h-0 opacity-0 invisible transition-[max-height,opacity,visibility] duration-150 ease-in [transition-delay:0s,0s,150ms]',\n this.classInput(),\n ),\n );\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { computed, Directive, input } from '@angular/core';
2
+ import { cn } from '../../utils';
3
+ import * as i0 from "@angular/core";
4
+ export class ScSelectSeparator {
5
+ classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
6
+ class = computed(() => cn('bg-border -mx-1 my-1 h-px', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSelectSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
8
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScSelectSeparator, isStandalone: true, selector: "[scSelectSeparator]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-separator", "role": "separator", "aria-orientation": "horizontal" }, properties: { "class": "class()" } }, ngImport: i0 });
9
+ }
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSelectSeparator, decorators: [{
11
+ type: Directive,
12
+ args: [{
13
+ selector: '[scSelectSeparator]',
14
+ host: {
15
+ 'data-slot': 'select-separator',
16
+ role: 'separator',
17
+ 'aria-orientation': 'horizontal',
18
+ '[class]': 'class()',
19
+ },
20
+ }]
21
+ }], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
22
+ //# sourceMappingURL=select-separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-separator.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-separator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;AAWjC,MAAM,OAAO,iBAAiB;IACnB,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CAAC,2BAA2B,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,iDACnD,CAAC;uGALS,iBAAiB;2FAAjB,iBAAiB;;2FAAjB,iBAAiB;kBAT7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,qBAAqB;oBAC/B,IAAI,EAAE;wBACJ,WAAW,EAAE,kBAAkB;wBAC/B,IAAI,EAAE,WAAW;wBACjB,kBAAkB,EAAE,YAAY;wBAChC,SAAS,EAAE,SAAS;qBACrB;iBACF","sourcesContent":["import { computed, Directive, input } from '@angular/core';\nimport { cn } from '../../utils';\n\n@Directive({\n selector: '[scSelectSeparator]',\n host: {\n 'data-slot': 'select-separator',\n role: 'separator',\n 'aria-orientation': 'horizontal',\n '[class]': 'class()',\n },\n})\nexport class ScSelectSeparator {\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn('bg-border -mx-1 my-1 h-px', this.classInput()),\n );\n}\n"]}
@@ -1,9 +1,11 @@
1
- import { computed, Directive, input } from '@angular/core';
1
+ import { Combobox } from '@angular/aria/combobox';
2
+ import { computed, Directive, inject, input } from '@angular/core';
2
3
  import { cn } from '../../utils';
3
4
  import * as i0 from "@angular/core";
4
5
  export class ScSelectTriggerIcon {
5
6
  classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
6
- class = computed(() => cn('text-muted-foreground pointer-events-none size-4 shrink-0', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
7
+ combobox = inject(Combobox);
8
+ class = computed(() => cn('text-muted-foreground pointer-events-none size-4 shrink-0 transition-transform duration-150', this.combobox.expanded() && 'rotate-180', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
7
9
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSelectTriggerIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
8
10
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScSelectTriggerIcon, isStandalone: true, selector: "svg[scSelectTriggerIcon]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-trigger-icon" }, properties: { "class": "class()" } }, ngImport: i0 });
9
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"select-trigger-icon.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-trigger-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;AASjC,MAAM,OAAO,mBAAmB;IACrB,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEzC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,2DAA2D,EAC3D,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGARS,mBAAmB;2FAAnB,mBAAmB;;2FAAnB,mBAAmB;kBAP/B,SAAS;mBAAC;oBACT,QAAQ,EAAE,0BAA0B;oBACpC,IAAI,EAAE;wBACJ,WAAW,EAAE,qBAAqB;wBAClC,SAAS,EAAE,SAAS;qBACrB;iBACF","sourcesContent":["import { computed, Directive, input } from '@angular/core';\nimport { cn } from '../../utils';\n\n@Directive({\n selector: 'svg[scSelectTriggerIcon]',\n host: {\n 'data-slot': 'select-trigger-icon',\n '[class]': 'class()',\n },\n})\nexport class ScSelectTriggerIcon {\n readonly classInput = input<string>('', { alias: 'class' });\n\n protected readonly class = computed(() =>\n cn(\n 'text-muted-foreground pointer-events-none size-4 shrink-0',\n this.classInput(),\n ),\n );\n}\n"]}
1
+ {"version":3,"file":"select-trigger-icon.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-trigger-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;;AASjC,MAAM,OAAO,mBAAmB;IACrB,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAE3C,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE1B,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,6FAA6F,EAC7F,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,YAAY,EACxC,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGAXS,mBAAmB;2FAAnB,mBAAmB;;2FAAnB,mBAAmB;kBAP/B,SAAS;mBAAC;oBACT,QAAQ,EAAE,0BAA0B;oBACpC,IAAI,EAAE;wBACJ,WAAW,EAAE,qBAAqB;wBAClC,SAAS,EAAE,SAAS;qBACrB;iBACF","sourcesContent":["import { Combobox } from '@angular/aria/combobox';\nimport { computed, Directive, inject, input } from '@angular/core';\nimport { cn } from '../../utils';\n\n@Directive({\n selector: 'svg[scSelectTriggerIcon]',\n host: {\n 'data-slot': 'select-trigger-icon',\n '[class]': 'class()',\n },\n})\nexport class ScSelectTriggerIcon {\n readonly classInput = input<string>('', { alias: 'class' });\n\n private readonly combobox = inject(Combobox);\n\n protected readonly class = computed(() =>\n cn(\n 'text-muted-foreground pointer-events-none size-4 shrink-0 transition-transform duration-150',\n this.combobox.expanded() && 'rotate-180',\n this.classInput(),\n ),\n );\n}\n"]}
@@ -1,5 +1,4 @@
1
- import { CdkOverlayOrigin } from '@angular/cdk/overlay';
2
- import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input, ViewEncapsulation, } from '@angular/core';
1
+ import { ChangeDetectionStrategy, Component, computed, ElementRef, forwardRef, inject, input, ViewEncapsulation, } from '@angular/core';
3
2
  import { SiChevronDownIcon } from '@semantic-icons/lucide-icons';
4
3
  import { cn } from '../../utils';
5
4
  import { ScSelectInput } from './select-input';
@@ -7,16 +6,15 @@ import { ScSelectTriggerIcon } from './select-trigger-icon';
7
6
  // Lazy import to avoid circular dependency
8
7
  import { ScSelect } from './select';
9
8
  import * as i0 from "@angular/core";
10
- import * as i1 from "@angular/cdk/overlay";
11
9
  export class ScSelectTrigger {
12
- overlayOrigin = inject(CdkOverlayOrigin);
10
+ elementRef = inject(ElementRef);
13
11
  classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
14
12
  ariaLabel = input('', { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
15
13
  select = inject(forwardRef(() => ScSelect));
16
14
  placeholder = computed(() => this.select.placeholder(), ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
17
- class = computed(() => cn('border-input dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 flex h-8 w-fit items-center justify-between gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors select-none outline-none focus-visible:ring-3 has-[[aria-disabled=true]]:cursor-not-allowed has-[[aria-disabled=true]]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
15
+ class = computed(() => cn('border-input dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 flex h-8 w-full items-center justify-between gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors select-none outline-none focus-visible:ring-3 has-[[aria-disabled=true]]:cursor-not-allowed has-[[aria-disabled=true]]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
18
16
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSelectTrigger, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScSelectTrigger, isStandalone: true, selector: "div[scSelectTrigger]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-trigger" }, properties: { "class": "class()" } }, hostDirectives: [{ directive: i1.CdkOverlayOrigin }], ngImport: i0, template: `
17
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: ScSelectTrigger, isStandalone: true, selector: "div[scSelectTrigger]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "select-trigger" }, properties: { "class": "class()" } }, ngImport: i0, template: `
20
18
  <ng-content />
21
19
  <input
22
20
  scSelectInput
@@ -40,7 +38,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
40
38
  />
41
39
  <svg scSelectTriggerIcon siChevronDownIcon aria-hidden="true"></svg>
42
40
  `,
43
- hostDirectives: [CdkOverlayOrigin],
44
41
  host: {
45
42
  'data-slot': 'select-trigger',
46
43
  '[class]': 'class()',
@@ -1 +1 @@
1
- {"version":3,"file":"select-trigger.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-trigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAsC5D,2CAA2C;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;;;AAjBpC,MAAM,OAAO,eAAe;IACjB,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;IACzC,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IACnD,SAAS,GAAG,KAAK,CAAS,EAAE,sDAAI,KAAK,EAAE,YAAY,GAAG,CAAC;IAE/C,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,uDAAC,CAAC;IAE9C,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,+jBAA+jB,EAC/jB,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGAbS,eAAe;2FAAf,eAAe,sfAjBhB;;;;;;;;GAQT,4DATS,aAAa,oFAAE,mBAAmB,wFAAE,iBAAiB;;2FAkBpD,eAAe;kBApB3B,SAAS;mBAAC;oBACT,QAAQ,EAAE,sBAAsB;oBAChC,OAAO,EAAE,CAAC,aAAa,EAAE,mBAAmB,EAAE,iBAAiB,CAAC;oBAChE,QAAQ,EAAE;;;;;;;;GAQT;oBACD,cAAc,EAAE,CAAC,gBAAgB,CAAC;oBAClC,IAAI,EAAE;wBACJ,WAAW,EAAE,gBAAgB;wBAC7B,SAAS,EAAE,SAAS;qBACrB;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD","sourcesContent":["import { CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { SiChevronDownIcon } from '@semantic-icons/lucide-icons';\nimport { cn } from '../../utils';\n\nimport { ScSelectInput } from './select-input';\nimport { ScSelectTriggerIcon } from './select-trigger-icon';\n\n@Component({\n selector: 'div[scSelectTrigger]',\n imports: [ScSelectInput, ScSelectTriggerIcon, SiChevronDownIcon],\n template: `\n <ng-content />\n <input\n scSelectInput\n [attr.aria-label]=\"ariaLabel()\"\n [placeholder]=\"placeholder()\"\n />\n <svg scSelectTriggerIcon siChevronDownIcon aria-hidden=\"true\"></svg>\n `,\n hostDirectives: [CdkOverlayOrigin],\n host: {\n 'data-slot': 'select-trigger',\n '[class]': 'class()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScSelectTrigger {\n readonly overlayOrigin = inject(CdkOverlayOrigin);\n readonly classInput = input<string>('', { alias: 'class' });\n readonly ariaLabel = input<string>('', { alias: 'aria-label' });\n\n private readonly select = inject(forwardRef(() => ScSelect));\n readonly placeholder = computed(() => this.select.placeholder());\n\n protected readonly class = computed(() =>\n cn(\n 'border-input dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 flex h-8 w-fit items-center justify-between gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors select-none outline-none focus-visible:ring-3 has-[[aria-disabled=true]]:cursor-not-allowed has-[[aria-disabled=true]]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5',\n this.classInput(),\n ),\n );\n}\n\n// Lazy import to avoid circular dependency\nimport { ScSelect } from './select';\n"]}
1
+ {"version":3,"file":"select-trigger.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select-trigger.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAqC5D,2CAA2C;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;;AAjBpC,MAAM,OAAO,eAAe;IACjB,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;IACzD,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IACnD,SAAS,GAAG,KAAK,CAAS,EAAE,sDAAI,KAAK,EAAE,YAAY,GAAG,CAAC;IAE/C,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,uDAAC,CAAC;IAE9C,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,gkBAAgkB,EAChkB,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGAbS,eAAe;2FAAf,eAAe,gcAhBhB;;;;;;;;GAQT,4DATS,aAAa,oFAAE,mBAAmB,wFAAE,iBAAiB;;2FAiBpD,eAAe;kBAnB3B,SAAS;mBAAC;oBACT,QAAQ,EAAE,sBAAsB;oBAChC,OAAO,EAAE,CAAC,aAAa,EAAE,mBAAmB,EAAE,iBAAiB,CAAC;oBAChE,QAAQ,EAAE;;;;;;;;GAQT;oBACD,IAAI,EAAE;wBACJ,WAAW,EAAE,gBAAgB;wBAC7B,SAAS,EAAE,SAAS;qBACrB;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n forwardRef,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { SiChevronDownIcon } from '@semantic-icons/lucide-icons';\nimport { cn } from '../../utils';\n\nimport { ScSelectInput } from './select-input';\nimport { ScSelectTriggerIcon } from './select-trigger-icon';\n\n@Component({\n selector: 'div[scSelectTrigger]',\n imports: [ScSelectInput, ScSelectTriggerIcon, SiChevronDownIcon],\n template: `\n <ng-content />\n <input\n scSelectInput\n [attr.aria-label]=\"ariaLabel()\"\n [placeholder]=\"placeholder()\"\n />\n <svg scSelectTriggerIcon siChevronDownIcon aria-hidden=\"true\"></svg>\n `,\n host: {\n 'data-slot': 'select-trigger',\n '[class]': 'class()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScSelectTrigger {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly classInput = input<string>('', { alias: 'class' });\n readonly ariaLabel = input<string>('', { alias: 'aria-label' });\n\n private readonly select = inject(forwardRef(() => ScSelect));\n readonly placeholder = computed(() => this.select.placeholder());\n\n protected readonly class = computed(() =>\n cn(\n 'border-input dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 flex h-8 w-full items-center justify-between gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors select-none outline-none focus-visible:ring-3 has-[[aria-disabled=true]]:cursor-not-allowed has-[[aria-disabled=true]]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5',\n this.classInput(),\n ),\n );\n}\n\n// Lazy import to avoid circular dependency\nimport { ScSelect } from './select';\n"]}
@@ -1,7 +1,6 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
- import { Combobox } from '@angular/aria/combobox';
3
- import { ComboboxPopupContainer } from '@angular/aria/combobox';
1
+ import { Combobox, ComboboxPopupContainer } from '@angular/aria/combobox';
4
2
  import { OverlayModule } from '@angular/cdk/overlay';
3
+ import { NgTemplateOutlet } from '@angular/common';
5
4
  import { ChangeDetectionStrategy, Component, computed, contentChild, effect, inject, input, model, ViewEncapsulation, } from '@angular/core';
6
5
  import { SIGNAL, signalSetFn } from '@angular/core/primitives/signals';
7
6
  import { cn } from '../../utils';
@@ -18,10 +17,10 @@ export class ScSelect {
18
17
  trigger = contentChild(ScSelectTrigger, ...(ngDevMode ? [{ debugName: "trigger" }] : []));
19
18
  content = contentChild(ScSelectList, { ...(ngDevMode ? { debugName: "content" } : {}), descendants: true });
20
19
  selectPortal = contentChild.required(ScSelectPortal);
21
- origin = computed(() => this.trigger()?.overlayOrigin, ...(ngDevMode ? [{ debugName: "origin" }] : []));
20
+ origin = computed(() => this.trigger()?.elementRef, ...(ngDevMode ? [{ debugName: "origin" }] : []));
22
21
  values = computed(() => this.content()?.values() ?? [], ...(ngDevMode ? [{ debugName: "values" }] : []));
23
22
  displayValue = computed(() => this.value() || this.placeholder(), ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
24
- class = computed(() => cn('relative', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
23
+ class = computed(() => cn('relative min-w-36 w-fit', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
25
24
  combobox = inject(Combobox);
26
25
  constructor() {
27
26
  effect(() => signalSetFn(this.combobox.readonly[SIGNAL], true));
@@ -38,6 +37,7 @@ export class ScSelect {
38
37
  <ng-template ngComboboxPopupContainer>
39
38
  @if (origin(); as origin) {
40
39
  <ng-template
40
+ cdkConnectedOverlay
41
41
  [cdkConnectedOverlay]="{
42
42
  origin,
43
43
  usePopover: 'inline',
@@ -67,6 +67,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
67
67
  <ng-template ngComboboxPopupContainer>
68
68
  @if (origin(); as origin) {
69
69
  <ng-template
70
+ cdkConnectedOverlay
70
71
  [cdkConnectedOverlay]="{
71
72
  origin,
72
73
  usePopover: 'inline',
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,C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emplateOutlet } from '@angular/common';\nimport { Combobox } from '@angular/aria/combobox';\nimport { ComboboxPopupContainer } from '@angular/aria/combobox';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n input,\n model,\n ViewEncapsulation,\n} from '@angular/core';\nimport { SIGNAL, signalSetFn } from '@angular/core/primitives/signals';\nimport type { FormValueControl } from '@angular/forms/signals';\nimport { cn } from '../../utils';\nimport { ScSelectList } from './select-list';\nimport { ScSelectPortal } from './select-portal';\nimport { ScSelectTrigger } from './select-trigger';\n\n@Component({\n selector: 'div[scSelect]',\n exportAs: 'scSelect',\n imports: [Combobox, ComboboxPopupContainer, OverlayModule, NgTemplateOutlet],\n hostDirectives: [\n {\n directive: Combobox,\n },\n ],\n template: `\n <ng-content />\n <ng-template ngComboboxPopupContainer>\n @if (origin(); as origin) {\n <ng-template\n [cdkConnectedOverlay]=\"{\n origin,\n usePopover: 'inline',\n matchWidth: true,\n }\"\n [cdkConnectedOverlayOpen]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"selectPortal().templateRef\" />\n </ng-template>\n }\n </ng-template>\n `,\n host: {\n 'data-slot': 'select',\n '[class]': 'class()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScSelect implements FormValueControl<string> {\n readonly classInput = input<string>('', { alias: 'class' });\n readonly placeholder = input<string>('');\n readonly value = model<string>('');\n\n private readonly trigger = contentChild(ScSelectTrigger);\n private readonly content = contentChild(ScSelectList, {\n descendants: true,\n });\n protected readonly selectPortal = contentChild.required(ScSelectPortal);\n\n readonly origin = computed(() => this.trigger()?.overlayOrigin);\n readonly values = computed(() => this.content()?.values() ?? []);\n readonly displayValue = computed(() => this.value() || this.placeholder());\n protected readonly class = computed(() => cn('relative', this.classInput()));\n\n private readonly combobox = inject(Combobox);\n\n constructor() {\n effect(() => signalSetFn(this.combobox.readonly[SIGNAL], true));\n\n // Sync listbox selection → model\n effect(() => {\n const vals = this.values();\n const selected = vals.length > 0 ? String(vals[0]) : '';\n this.value.set(selected);\n });\n }\n}\n"]}
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/select/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,MAAM,EACN,KAAK,EACL,KAAK,EACL,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;;;;AAoCnD,MAAM,OAAO,QAAQ;IACV,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IACnD,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC,CAAC;IAChC,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC,CAAC;IAElB,OAAO,GAAG,YAAY,CAAC,eAAe,mDAAC,CAAC;IACxC,OAAO,GAAG,YAAY,CAAC,YAAY,oDAClD,WAAW,EAAE,IAAI,GACjB,CAAC;IACgB,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAE/D,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,UA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,cAAc,EAAE;wBACd;4BACE,SAAS,EAAE,QAAQ;yBACpB;qBACF;oBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;GAiBT;oBACD,IAAI,EAAE;wBACJ,WAAW,EAAE,QAAQ;wBACrB,SAAS,EAAE,SAAS;qBACrB;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;icAMyC,eAAe,yFACf,YAAY,QAAE;4BACpD,WAAW,EAAE,IAAI;yBAClB,2FACuD,cAAc","sourcesContent":["import { Combobox, ComboboxPopupContainer } from '@angular/aria/combobox';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n input,\n model,\n ViewEncapsulation,\n} from '@angular/core';\nimport { SIGNAL, signalSetFn } from '@angular/core/primitives/signals';\nimport type { FormValueControl } from '@angular/forms/signals';\nimport { cn } from '../../utils';\nimport { ScSelectList } from './select-list';\nimport { ScSelectPortal } from './select-portal';\nimport { ScSelectTrigger } from './select-trigger';\n\n@Component({\n selector: 'div[scSelect]',\n exportAs: 'scSelect',\n imports: [Combobox, ComboboxPopupContainer, OverlayModule, NgTemplateOutlet],\n hostDirectives: [\n {\n directive: Combobox,\n },\n ],\n template: `\n <ng-content />\n <ng-template ngComboboxPopupContainer>\n @if (origin(); as origin) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlay]=\"{\n origin,\n usePopover: 'inline',\n matchWidth: true,\n }\"\n [cdkConnectedOverlayOpen]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"selectPortal().templateRef\" />\n </ng-template>\n }\n </ng-template>\n `,\n host: {\n 'data-slot': 'select',\n '[class]': 'class()',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ScSelect implements FormValueControl<string> {\n readonly classInput = input<string>('', { alias: 'class' });\n readonly placeholder = input<string>('');\n readonly value = model<string>('');\n\n private readonly trigger = contentChild(ScSelectTrigger);\n private readonly content = contentChild(ScSelectList, {\n descendants: true,\n });\n protected readonly selectPortal = contentChild.required(ScSelectPortal);\n\n readonly origin = computed(() => this.trigger()?.elementRef);\n readonly values = computed(() => this.content()?.values() ?? []);\n readonly displayValue = computed(() => this.value() || this.placeholder());\n protected readonly class = computed(() =>\n cn('relative min-w-36 w-fit', this.classInput()),\n );\n\n protected readonly combobox = inject(Combobox);\n\n constructor() {\n effect(() => signalSetFn(this.combobox.readonly[SIGNAL], true));\n\n // Sync listbox selection → model\n effect(() => {\n const vals = this.values();\n const selected = vals.length > 0 ? String(vals[0]) : '';\n this.value.set(selected);\n });\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './slider';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/slider/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC","sourcesContent":["export * from './slider';\n"]}
@@ -0,0 +1,46 @@
1
+ import { _IdGenerator } from '@angular/cdk/a11y';
2
+ import { afterNextRender, computed, Directive, ElementRef, inject, input, } from '@angular/core';
3
+ import { cn } from '../../utils';
4
+ import { SC_FIELD } from '../field';
5
+ import * as i0 from "@angular/core";
6
+ export class ScSlider {
7
+ field = inject(SC_FIELD, { optional: true });
8
+ fallbackId = inject(_IdGenerator).getId('sc-slider-');
9
+ el = inject(ElementRef);
10
+ idInput = input('', { ...(ngDevMode ? { debugName: "idInput" } : {}), alias: 'id' });
11
+ classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
12
+ id = computed(() => this.idInput() || this.field?.id() || this.fallbackId, ...(ngDevMode ? [{ debugName: "id" }] : []));
13
+ class = computed(() => cn('w-full cursor-pointer appearance-none bg-transparent disabled:pointer-events-none disabled:opacity-50', '[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-[image:linear-gradient(to_right,var(--primary)_var(--fill-percent,0%),var(--muted)_var(--fill-percent,0%))]', '[&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-muted', '[&::-moz-range-progress]:h-1 [&::-moz-range-progress]:rounded-full [&::-moz-range-progress]:bg-primary', '[&::-webkit-slider-thumb]:size-3 [&::-webkit-slider-thumb]:-mt-1 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-0 [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:transition-shadow', '[&::-webkit-slider-thumb:hover]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]', '[&::-moz-range-thumb]:size-3 [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:transition-shadow', '[&::-moz-range-thumb:hover]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]', 'focus-visible:outline-none [&:focus-visible::-webkit-slider-thumb]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]', '[&:focus-visible::-moz-range-thumb]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
14
+ constructor() {
15
+ afterNextRender(() => {
16
+ this.updateFillPercent();
17
+ });
18
+ }
19
+ onInput() {
20
+ this.updateFillPercent();
21
+ }
22
+ updateFillPercent() {
23
+ const el = this.el.nativeElement;
24
+ const min = parseFloat(el.min) || 0;
25
+ const max = parseFloat(el.max) || 100;
26
+ const value = parseFloat(el.value) || 0;
27
+ const percent = ((value - min) / (max - min)) * 100;
28
+ el.style.setProperty('--fill-percent', `${percent}%`);
29
+ }
30
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSlider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
31
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScSlider, isStandalone: true, selector: "input[scSlider]", inputs: { idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "range", "data-slot": "slider" }, listeners: { "input": "onInput()" }, properties: { "attr.id": "id()", "class": "class()" } }, ngImport: i0 });
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScSlider, decorators: [{
34
+ type: Directive,
35
+ args: [{
36
+ selector: 'input[scSlider]',
37
+ host: {
38
+ type: 'range',
39
+ 'data-slot': 'slider',
40
+ '[attr.id]': 'id()',
41
+ '[class]': 'class()',
42
+ '(input)': 'onInput()',
43
+ },
44
+ }]
45
+ }], ctorParameters: () => [], propDecorators: { idInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
46
+ //# sourceMappingURL=slider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/slider/slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,eAAe,EACf,QAAQ,EACR,SAAS,EACT,UAAU,EACV,MAAM,EACN,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;;AAYpC,MAAM,OAAO,QAAQ;IACF,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,EAAE,QAA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AAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;QAEpD,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,gBAAgB,EAAE,GAAG,OAAO,GAAG,CAAC,CAAC;IACxD,CAAC;uGA9CU,QAAQ;2FAAR,QAAQ;;2FAAR,QAAQ;kBAVpB,SAAS;mBAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,IAAI,EAAE;wBACJ,IAAI,EAAE,OAAO;wBACb,WAAW,EAAE,QAAQ;wBACrB,WAAW,EAAE,MAAM;wBACnB,SAAS,EAAE,SAAS;wBACpB,SAAS,EAAE,WAAW;qBACvB;iBACF","sourcesContent":["import { _IdGenerator } from '@angular/cdk/a11y';\nimport {\n afterNextRender,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n} from '@angular/core';\nimport { cn } from '../../utils';\nimport { SC_FIELD } from '../field';\n\n@Directive({\n selector: 'input[scSlider]',\n host: {\n type: 'range',\n 'data-slot': 'slider',\n '[attr.id]': 'id()',\n '[class]': 'class()',\n '(input)': 'onInput()',\n },\n})\nexport class ScSlider {\n private readonly field = inject(SC_FIELD, { optional: true });\n private readonly fallbackId = inject(_IdGenerator).getId('sc-slider-');\n private readonly el = inject<ElementRef<HTMLInputElement>>(ElementRef);\n\n readonly idInput = input('', { alias: 'id' });\n readonly classInput = input<string>('', { alias: 'class' });\n\n readonly id = computed(\n () => this.idInput() || this.field?.id() || this.fallbackId,\n );\n\n protected readonly class = computed(() =>\n cn(\n 'w-full cursor-pointer appearance-none bg-transparent disabled:pointer-events-none disabled:opacity-50',\n '[&::-webkit-slider-runnable-track]:h-1 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-[image:linear-gradient(to_right,var(--primary)_var(--fill-percent,0%),var(--muted)_var(--fill-percent,0%))]',\n '[&::-moz-range-track]:h-1 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-muted',\n '[&::-moz-range-progress]:h-1 [&::-moz-range-progress]:rounded-full [&::-moz-range-progress]:bg-primary',\n '[&::-webkit-slider-thumb]:size-3 [&::-webkit-slider-thumb]:-mt-1 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-0 [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:transition-shadow',\n '[&::-webkit-slider-thumb:hover]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]',\n '[&::-moz-range-thumb]:size-3 [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:transition-shadow',\n '[&::-moz-range-thumb:hover]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]',\n 'focus-visible:outline-none [&:focus-visible::-webkit-slider-thumb]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]',\n '[&:focus-visible::-moz-range-thumb]:shadow-[0_0_0_3px_oklch(from_var(--ring)_l_c_h/0.5)]',\n this.classInput(),\n ),\n );\n\n constructor() {\n afterNextRender(() => {\n this.updateFillPercent();\n });\n }\n\n protected onInput() {\n this.updateFillPercent();\n }\n\n private updateFillPercent() {\n const el = this.el.nativeElement;\n const min = parseFloat(el.min) || 0;\n const max = parseFloat(el.max) || 100;\n const value = parseFloat(el.value) || 0;\n const percent = ((value - min) / (max - min)) * 100;\n\n el.style.setProperty('--fill-percent', `${percent}%`);\n }\n}\n"]}
@@ -0,0 +1,10 @@
1
+ export { SC_TIME_PICKER, ScTimePicker } from './time-picker';
2
+ export { ScTimePickerInput } from './time-picker-input';
3
+ export { ScTimePickerHoursInput } from './time-picker-hours-input';
4
+ export { ScTimePickerMinutesInput } from './time-picker-minutes-input';
5
+ export { ScTimePickerSecondsInput } from './time-picker-seconds-input';
6
+ export { ScTimePickerPeriod } from './time-picker-period';
7
+ export { ScTimePickerPeriodAM } from './time-picker-period-am';
8
+ export { ScTimePickerPeriodPM } from './time-picker-period-pm';
9
+ export { ScTimePickerSeparator } from './time-picker-separator';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/time-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export { SC_TIME_PICKER, ScTimePicker } from './time-picker';\nexport type { ScTimeValue, ScTimeFormat, ScTimePeriod } from './time-picker';\nexport { ScTimePickerInput } from './time-picker-input';\nexport { ScTimePickerHoursInput } from './time-picker-hours-input';\nexport { ScTimePickerMinutesInput } from './time-picker-minutes-input';\nexport { ScTimePickerSecondsInput } from './time-picker-seconds-input';\nexport { ScTimePickerPeriod } from './time-picker-period';\nexport { ScTimePickerPeriodAM } from './time-picker-period-am';\nexport { ScTimePickerPeriodPM } from './time-picker-period-pm';\nexport { ScTimePickerSeparator } from './time-picker-separator';\n"]}
@@ -0,0 +1,67 @@
1
+ import { computed, Directive, inject } from '@angular/core';
2
+ import { ScTimePickerInput } from './time-picker-input';
3
+ import * as i0 from "@angular/core";
4
+ export class ScTimePickerHoursInput {
5
+ input = inject(ScTimePickerInput);
6
+ timePicker = this.input.timePicker;
7
+ max = computed(() => this.timePicker.format() === '12h' ? 12 : 23, ...(ngDevMode ? [{ debugName: "max" }] : []));
8
+ min = computed(() => this.timePicker.format() === '12h' ? 1 : 0, ...(ngDevMode ? [{ debugName: "min" }] : []));
9
+ displayValue = computed(() => {
10
+ const val = this.timePicker.value();
11
+ if (!val)
12
+ return '00';
13
+ const num = this.timePicker.format() === '12h' ? val.hours % 12 || 12 : val.hours;
14
+ return num.toString().padStart(2, '0');
15
+ }, ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
16
+ onInput(event) {
17
+ const el = event.target;
18
+ const value = el.value.replace(/\D/g, '');
19
+ const num = parseInt(value, 10);
20
+ if (!isNaN(num)) {
21
+ this.timePicker.setHours(Math.min(num, this.max()));
22
+ }
23
+ }
24
+ onBlur() {
25
+ this.input.focused.set(false);
26
+ const val = this.timePicker.value();
27
+ if (val) {
28
+ const clamped = Math.max(this.min(), Math.min(val.hours, this.max()));
29
+ if (clamped !== val.hours) {
30
+ this.timePicker.setHours(clamped);
31
+ }
32
+ }
33
+ }
34
+ onFocus(event) {
35
+ this.input.focused.set(true);
36
+ event.target.select();
37
+ }
38
+ onKeydown(event) {
39
+ if (event.key === 'ArrowUp') {
40
+ event.preventDefault();
41
+ const val = this.timePicker.value() || { hours: 0, minutes: 0 };
42
+ this.timePicker.setHours(val.hours >= this.max() ? this.min() : val.hours + 1);
43
+ }
44
+ else if (event.key === 'ArrowDown') {
45
+ event.preventDefault();
46
+ const val = this.timePicker.value() || { hours: 0, minutes: 0 };
47
+ this.timePicker.setHours(val.hours <= this.min() ? this.max() : val.hours - 1);
48
+ }
49
+ }
50
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerHoursInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
51
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.5", type: ScTimePickerHoursInput, isStandalone: true, selector: "input[scTimePickerHoursInput]", host: { listeners: { "input": "onInput($event)", "blur": "onBlur()", "keydown": "onKeydown($event)", "focus": "onFocus($event)" }, properties: { "value": "displayValue()", "attr.aria-label": "\"Hours\"" } }, ngImport: i0 });
52
+ }
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerHoursInput, decorators: [{
54
+ type: Directive,
55
+ args: [{
56
+ selector: 'input[scTimePickerHoursInput]',
57
+ host: {
58
+ '[value]': 'displayValue()',
59
+ '[attr.aria-label]': '"Hours"',
60
+ '(input)': 'onInput($event)',
61
+ '(blur)': 'onBlur()',
62
+ '(keydown)': 'onKeydown($event)',
63
+ '(focus)': 'onFocus($event)',
64
+ },
65
+ }]
66
+ }] });
67
+ //# sourceMappingURL=time-picker-hours-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-picker-hours-input.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/time-picker/time-picker-hours-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;;AAaxD,MAAM,OAAO,sBAAsB;IAChB,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAElC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;IAEnC,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CACnC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,+CAC7C,CAAC;IAEe,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CACnC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,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sB;;2FAAtB,sBAAsB;kBAXlC,SAAS;mBAAC;oBACT,QAAQ,EAAE,+BAA+B;oBACzC,IAAI,EAAE;wBACJ,SAAS,EAAE,gBAAgB;wBAC3B,mBAAmB,EAAE,SAAS;wBAC9B,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,UAAU;wBACpB,WAAW,EAAE,mBAAmB;wBAChC,SAAS,EAAE,iBAAiB;qBAC7B;iBACF","sourcesContent":["import { computed, Directive, inject } from '@angular/core';\nimport { ScTimePickerInput } from './time-picker-input';\n\n@Directive({\n selector: 'input[scTimePickerHoursInput]',\n host: {\n '[value]': 'displayValue()',\n '[attr.aria-label]': '\"Hours\"',\n '(input)': 'onInput($event)',\n '(blur)': 'onBlur()',\n '(keydown)': 'onKeydown($event)',\n '(focus)': 'onFocus($event)',\n },\n})\nexport class ScTimePickerHoursInput {\n private readonly input = inject(ScTimePickerInput);\n\n private readonly timePicker = this.input.timePicker;\n\n private readonly max = computed(() =>\n this.timePicker.format() === '12h' ? 12 : 23,\n );\n\n private readonly min = computed(() =>\n this.timePicker.format() === '12h' ? 1 : 0,\n );\n\n protected readonly displayValue = computed(() => {\n const val = this.timePicker.value();\n if (!val) return '00';\n\n const num =\n this.timePicker.format() === '12h' ? val.hours % 12 || 12 : val.hours;\n return num.toString().padStart(2, '0');\n });\n\n protected onInput(event: Event): void {\n const el = event.target as HTMLInputElement;\n const value = el.value.replace(/\\D/g, '');\n const num = parseInt(value, 10);\n\n if (!isNaN(num)) {\n this.timePicker.setHours(Math.min(num, this.max()));\n }\n }\n\n protected onBlur(): void {\n this.input.focused.set(false);\n const val = this.timePicker.value();\n if (val) {\n const clamped = Math.max(this.min(), Math.min(val.hours, this.max()));\n if (clamped !== val.hours) {\n this.timePicker.setHours(clamped);\n }\n }\n }\n\n protected onFocus(event: FocusEvent): void {\n this.input.focused.set(true);\n (event.target as HTMLInputElement).select();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n const val = this.timePicker.value() || { hours: 0, minutes: 0 };\n this.timePicker.setHours(\n val.hours >= this.max() ? this.min() : val.hours + 1,\n );\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const val = this.timePicker.value() || { hours: 0, minutes: 0 };\n this.timePicker.setHours(\n val.hours <= this.min() ? this.max() : val.hours - 1,\n );\n }\n }\n}\n"]}
@@ -0,0 +1,26 @@
1
+ import { computed, Directive, inject, input, signal } from '@angular/core';
2
+ import { cn } from '../../utils';
3
+ import { SC_TIME_PICKER } from './time-picker';
4
+ import * as i0 from "@angular/core";
5
+ export class ScTimePickerInput {
6
+ timePicker = inject(SC_TIME_PICKER);
7
+ classInput = input('', { ...(ngDevMode ? { debugName: "classInput" } : {}), alias: 'class' });
8
+ focused = signal(false, ...(ngDevMode ? [{ debugName: "focused" }] : []));
9
+ class = computed(() => cn('w-10 rounded-md border border-input bg-background px-2 py-1.5 text-center text-sm tabular-nums', 'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', 'disabled:cursor-not-allowed disabled:opacity-50', this.classInput()), ...(ngDevMode ? [{ debugName: "class" }] : []));
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: ScTimePickerInput, isStandalone: true, selector: "input[scTimePickerInput]", inputs: { classInput: { classPropertyName: "classInput", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "time-picker-input", "type": "text", "inputmode": "numeric" }, properties: { "class": "class()", "disabled": "timePicker.disabled()" } }, ngImport: i0 });
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerInput, decorators: [{
14
+ type: Directive,
15
+ args: [{
16
+ selector: 'input[scTimePickerInput]',
17
+ host: {
18
+ 'data-slot': 'time-picker-input',
19
+ type: 'text',
20
+ inputmode: 'numeric',
21
+ '[class]': 'class()',
22
+ '[disabled]': 'timePicker.disabled()',
23
+ },
24
+ }]
25
+ }], propDecorators: { classInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
26
+ //# sourceMappingURL=time-picker-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-picker-input.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/time-picker/time-picker-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;;AAY/C,MAAM,OAAO,iBAAiB;IACnB,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IAEpC,UAAU,GAAG,KAAK,CAAS,EAAE,uDAAI,KAAK,EAAE,OAAO,GAAG,CAAC;IAEnD,OAAO,GAAG,MAAM,CAAC,KAAK,mDAAC,CAAC;IAEd,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,gGAAgG,EAChG,qEAAqE,EACrE,iDAAiD,EACjD,IAAI,CAAC,UAAU,EAAE,CAClB,iDACF,CAAC;uGAdS,iBAAiB;2FAAjB,iBAAiB;;2FAAjB,iBAAiB;kBAV7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,0BAA0B;oBACpC,IAAI,EAAE;wBACJ,WAAW,EAAE,mBAAmB;wBAChC,IAAI,EAAE,MAAM;wBACZ,SAAS,EAAE,SAAS;wBACpB,SAAS,EAAE,SAAS;wBACpB,YAAY,EAAE,uBAAuB;qBACtC;iBACF","sourcesContent":["import { computed, Directive, inject, input, signal } from '@angular/core';\nimport { cn } from '../../utils';\nimport { SC_TIME_PICKER } from './time-picker';\n\n@Directive({\n selector: 'input[scTimePickerInput]',\n host: {\n 'data-slot': 'time-picker-input',\n type: 'text',\n inputmode: 'numeric',\n '[class]': 'class()',\n '[disabled]': 'timePicker.disabled()',\n },\n})\nexport class ScTimePickerInput {\n readonly timePicker = inject(SC_TIME_PICKER);\n\n readonly classInput = input<string>('', { alias: 'class' });\n\n readonly focused = signal(false);\n\n protected readonly class = computed(() =>\n cn(\n 'w-10 rounded-md border border-input bg-background px-2 py-1.5 text-center text-sm tabular-nums',\n 'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n this.classInput(),\n ),\n );\n}\n"]}
@@ -0,0 +1,57 @@
1
+ import { computed, Directive, inject } from '@angular/core';
2
+ import { ScTimePickerInput } from './time-picker-input';
3
+ import * as i0 from "@angular/core";
4
+ export class ScTimePickerMinutesInput {
5
+ input = inject(ScTimePickerInput);
6
+ timePicker = this.input.timePicker;
7
+ displayValue = computed(() => {
8
+ const val = this.timePicker.value();
9
+ if (!val)
10
+ return '00';
11
+ return val.minutes.toString().padStart(2, '0');
12
+ }, ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
13
+ onInput(event) {
14
+ const el = event.target;
15
+ const value = el.value.replace(/\D/g, '');
16
+ const num = parseInt(value, 10);
17
+ if (!isNaN(num)) {
18
+ this.timePicker.setMinutes(Math.min(num, 59));
19
+ }
20
+ }
21
+ onBlur() {
22
+ this.input.focused.set(false);
23
+ }
24
+ onFocus(event) {
25
+ this.input.focused.set(true);
26
+ event.target.select();
27
+ }
28
+ onKeydown(event) {
29
+ if (event.key === 'ArrowUp') {
30
+ event.preventDefault();
31
+ const val = this.timePicker.value() || { hours: 0, minutes: 0 };
32
+ this.timePicker.setMinutes(val.minutes >= 59 ? 0 : val.minutes + 1);
33
+ }
34
+ else if (event.key === 'ArrowDown') {
35
+ event.preventDefault();
36
+ const val = this.timePicker.value() || { hours: 0, minutes: 0 };
37
+ this.timePicker.setMinutes(val.minutes <= 0 ? 59 : val.minutes - 1);
38
+ }
39
+ }
40
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerMinutesInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
41
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.5", type: ScTimePickerMinutesInput, isStandalone: true, selector: "input[scTimePickerMinutesInput]", host: { listeners: { "input": "onInput($event)", "blur": "onBlur()", "keydown": "onKeydown($event)", "focus": "onFocus($event)" }, properties: { "value": "displayValue()", "attr.aria-label": "\"Minutes\"" } }, ngImport: i0 });
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerMinutesInput, decorators: [{
44
+ type: Directive,
45
+ args: [{
46
+ selector: 'input[scTimePickerMinutesInput]',
47
+ host: {
48
+ '[value]': 'displayValue()',
49
+ '[attr.aria-label]': '"Minutes"',
50
+ '(input)': 'onInput($event)',
51
+ '(blur)': 'onBlur()',
52
+ '(keydown)': 'onKeydown($event)',
53
+ '(focus)': 'onFocus($event)',
54
+ },
55
+ }]
56
+ }] });
57
+ //# sourceMappingURL=time-picker-minutes-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-picker-minutes-input.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/time-picker/time-picker-minutes-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;;AAaxD,MAAM,OAAO,wBAAwB;IAClB,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAElC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;IAEjC,YAAY,GAAG,QAAQ,CAAC,GAAG,EAAE;QAC9C,M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CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;QACtE,CAAC;aAAM,IAAI,KAAK,CAAC,GAAG,KAAK,WAAW,EAAE,CAAC;YACrC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YAChE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;uGAxCU,wBAAwB;2FAAxB,wBAAwB;;2FAAxB,wBAAwB;kBAXpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,iCAAiC;oBAC3C,IAAI,EAAE;wBACJ,SAAS,EAAE,gBAAgB;wBAC3B,mBAAmB,EAAE,WAAW;wBAChC,SAAS,EAAE,iBAAiB;wBAC5B,QAAQ,EAAE,UAAU;wBACpB,WAAW,EAAE,mBAAmB;wBAChC,SAAS,EAAE,iBAAiB;qBAC7B;iBACF","sourcesContent":["import { computed, Directive, inject } from '@angular/core';\nimport { ScTimePickerInput } from './time-picker-input';\n\n@Directive({\n selector: 'input[scTimePickerMinutesInput]',\n host: {\n '[value]': 'displayValue()',\n '[attr.aria-label]': '\"Minutes\"',\n '(input)': 'onInput($event)',\n '(blur)': 'onBlur()',\n '(keydown)': 'onKeydown($event)',\n '(focus)': 'onFocus($event)',\n },\n})\nexport class ScTimePickerMinutesInput {\n private readonly input = inject(ScTimePickerInput);\n\n private readonly timePicker = this.input.timePicker;\n\n protected readonly displayValue = computed(() => {\n const val = this.timePicker.value();\n if (!val) return '00';\n return val.minutes.toString().padStart(2, '0');\n });\n\n protected onInput(event: Event): void {\n const el = event.target as HTMLInputElement;\n const value = el.value.replace(/\\D/g, '');\n const num = parseInt(value, 10);\n\n if (!isNaN(num)) {\n this.timePicker.setMinutes(Math.min(num, 59));\n }\n }\n\n protected onBlur(): void {\n this.input.focused.set(false);\n }\n\n protected onFocus(event: FocusEvent): void {\n this.input.focused.set(true);\n (event.target as HTMLInputElement).select();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n const val = this.timePicker.value() || { hours: 0, minutes: 0 };\n this.timePicker.setMinutes(val.minutes >= 59 ? 0 : val.minutes + 1);\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const val = this.timePicker.value() || { hours: 0, minutes: 0 };\n this.timePicker.setMinutes(val.minutes <= 0 ? 59 : val.minutes - 1);\n }\n }\n}\n"]}
@@ -0,0 +1,26 @@
1
+ import { computed, Directive, inject } from '@angular/core';
2
+ import { cn } from '../../utils';
3
+ import { ScTimePickerPeriod } from './time-picker-period';
4
+ import * as i0 from "@angular/core";
5
+ export class ScTimePickerPeriodAM {
6
+ period = inject(ScTimePickerPeriod);
7
+ class = computed(() => cn('rounded-md px-2 py-1.5 text-sm font-medium transition-colors', this.period.isAM()
8
+ ? 'bg-primary text-primary-foreground'
9
+ : 'text-muted-foreground hover:bg-accent'), ...(ngDevMode ? [{ debugName: "class" }] : []));
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerPeriodAM, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.5", type: ScTimePickerPeriodAM, isStandalone: true, selector: "button[scTimePickerPeriodAM]", host: { attributes: { "data-slot": "time-picker-period-am", "type": "button" }, listeners: { "click": "period.selectAM()" }, properties: { "class": "class()", "disabled": "period.timePicker.disabled()" } }, ngImport: i0 });
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ScTimePickerPeriodAM, decorators: [{
14
+ type: Directive,
15
+ args: [{
16
+ selector: 'button[scTimePickerPeriodAM]',
17
+ host: {
18
+ 'data-slot': 'time-picker-period-am',
19
+ type: 'button',
20
+ '[class]': 'class()',
21
+ '[disabled]': 'period.timePicker.disabled()',
22
+ '(click)': 'period.selectAM()',
23
+ },
24
+ }]
25
+ }] });
26
+ //# sourceMappingURL=time-picker-period-am.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-picker-period-am.js","sourceRoot":"","sources":["../../../../../../../libs/ui/src/lib/components/time-picker/time-picker-period-am.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;;AAY1D,MAAM,OAAO,oBAAoB;IACZ,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAEpC,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,EAAE,CACA,8DAA8D,EAC9D,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;QAChB,CAAC,CAAC,oCAAoC;QACtC,CAAC,CAAC,uCAAuC,CAC5C,iDACF,CAAC;uGAVS,oBAAoB;2FAApB,oBAAoB;;2FAApB,oBAAoB;kBAVhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,8BAA8B;oBACxC,IAAI,EAAE;wBACJ,WAAW,EAAE,uBAAuB;wBACpC,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,SAAS;wBACpB,YAAY,EAAE,8BAA8B;wBAC5C,SAAS,EAAE,mBAAmB;qBAC/B;iBACF","sourcesContent":["import { computed, Directive, inject } from '@angular/core';\nimport { cn } from '../../utils';\nimport { ScTimePickerPeriod } from './time-picker-period';\n\n@Directive({\n selector: 'button[scTimePickerPeriodAM]',\n host: {\n 'data-slot': 'time-picker-period-am',\n type: 'button',\n '[class]': 'class()',\n '[disabled]': 'period.timePicker.disabled()',\n '(click)': 'period.selectAM()',\n },\n})\nexport class ScTimePickerPeriodAM {\n protected readonly period = inject(ScTimePickerPeriod);\n\n protected readonly class = computed(() =>\n cn(\n 'rounded-md px-2 py-1.5 text-sm font-medium transition-colors',\n this.period.isAM()\n ? 'bg-primary text-primary-foreground'\n : 'text-muted-foreground hover:bg-accent',\n ),\n );\n}\n"]}