@unipin/angular-applet 21.6.0 → 21.6.5

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 (66) hide show
  1. package/fesm2022/unipin-angular-applet-accordion.mjs +29 -17
  2. package/fesm2022/unipin-angular-applet-accordion.mjs.map +1 -1
  3. package/fesm2022/unipin-angular-applet-alert-dialog.mjs +7 -7
  4. package/fesm2022/unipin-angular-applet-alert-dialog.mjs.map +1 -1
  5. package/fesm2022/unipin-angular-applet-alert.mjs +9 -9
  6. package/fesm2022/unipin-angular-applet-approval.mjs +10 -10
  7. package/fesm2022/unipin-angular-applet-approval.mjs.map +1 -1
  8. package/fesm2022/{unipin-angular-applet-audit-audit-modal.component-DNlMbUda.mjs → unipin-angular-applet-audit-audit-modal.component-Fhzj6tsh.mjs} +4 -4
  9. package/fesm2022/{unipin-angular-applet-audit-audit-modal.component-DNlMbUda.mjs.map → unipin-angular-applet-audit-audit-modal.component-Fhzj6tsh.mjs.map} +1 -1
  10. package/fesm2022/unipin-angular-applet-audit.mjs +11 -12
  11. package/fesm2022/unipin-angular-applet-audit.mjs.map +1 -1
  12. package/fesm2022/unipin-angular-applet-auth.mjs +51 -39
  13. package/fesm2022/unipin-angular-applet-auth.mjs.map +1 -1
  14. package/fesm2022/unipin-angular-applet-avatar.mjs +7 -10
  15. package/fesm2022/unipin-angular-applet-avatar.mjs.map +1 -1
  16. package/fesm2022/unipin-angular-applet-badge.mjs +6 -3
  17. package/fesm2022/unipin-angular-applet-badge.mjs.map +1 -1
  18. package/fesm2022/unipin-angular-applet-buttons.mjs +6 -6
  19. package/fesm2022/unipin-angular-applet-calendar.mjs +13 -13
  20. package/fesm2022/unipin-angular-applet-calendar.mjs.map +1 -1
  21. package/fesm2022/unipin-angular-applet-collapsible.mjs +9 -9
  22. package/fesm2022/unipin-angular-applet-common.mjs +40 -39
  23. package/fesm2022/unipin-angular-applet-common.mjs.map +1 -1
  24. package/fesm2022/unipin-angular-applet-containers.mjs +18 -18
  25. package/fesm2022/unipin-angular-applet-containers.mjs.map +1 -1
  26. package/fesm2022/unipin-angular-applet-dialog.mjs +22 -22
  27. package/fesm2022/unipin-angular-applet-dialog.mjs.map +1 -1
  28. package/fesm2022/unipin-angular-applet-forms.mjs +469 -374
  29. package/fesm2022/unipin-angular-applet-forms.mjs.map +1 -1
  30. package/fesm2022/unipin-angular-applet-froala.mjs +14 -15
  31. package/fesm2022/unipin-angular-applet-froala.mjs.map +1 -1
  32. package/fesm2022/unipin-angular-applet-grids.mjs +26 -24
  33. package/fesm2022/unipin-angular-applet-grids.mjs.map +1 -1
  34. package/fesm2022/unipin-angular-applet-infinite-scroll.mjs +3 -3
  35. package/fesm2022/unipin-angular-applet-json-viewer.mjs +3 -3
  36. package/fesm2022/unipin-angular-applet-kbd.mjs +3 -3
  37. package/fesm2022/unipin-angular-applet-loading-dialog.mjs +6 -6
  38. package/fesm2022/unipin-angular-applet-markdown.mjs +20 -22
  39. package/fesm2022/unipin-angular-applet-markdown.mjs.map +1 -1
  40. package/fesm2022/unipin-angular-applet-micro-frontend.mjs +3 -3
  41. package/fesm2022/unipin-angular-applet-micro-frontend.mjs.map +1 -1
  42. package/fesm2022/unipin-angular-applet-popover.mjs +19 -15
  43. package/fesm2022/unipin-angular-applet-popover.mjs.map +1 -1
  44. package/fesm2022/unipin-angular-applet-progress-bar.mjs +14 -4
  45. package/fesm2022/unipin-angular-applet-progress-bar.mjs.map +1 -1
  46. package/fesm2022/unipin-angular-applet-skeleton.mjs +3 -3
  47. package/fesm2022/unipin-angular-applet-spinner.mjs +16 -20
  48. package/fesm2022/unipin-angular-applet-spinner.mjs.map +1 -1
  49. package/fesm2022/unipin-angular-applet-stepper.mjs +17 -9
  50. package/fesm2022/unipin-angular-applet-stepper.mjs.map +1 -1
  51. package/fesm2022/unipin-angular-applet-swipeable.mjs +14 -13
  52. package/fesm2022/unipin-angular-applet-swipeable.mjs.map +1 -1
  53. package/fesm2022/unipin-angular-applet-tabs.mjs +9 -9
  54. package/fesm2022/unipin-angular-applet-tooltip.mjs +4 -4
  55. package/fesm2022/unipin-angular-applet-tooltip.mjs.map +1 -1
  56. package/package.json +1 -1
  57. package/types/unipin-angular-applet-accordion.d.ts +1 -0
  58. package/types/unipin-angular-applet-approval.d.ts +2 -2
  59. package/types/unipin-angular-applet-badge.d.ts +2 -2
  60. package/types/unipin-angular-applet-common.d.ts +4 -4
  61. package/types/unipin-angular-applet-forms.d.ts +47 -8
  62. package/types/unipin-angular-applet-grids.d.ts +1 -1
  63. package/types/unipin-angular-applet-markdown.d.ts +2 -2
  64. package/types/unipin-angular-applet-progress-bar.d.ts +2 -0
  65. package/types/unipin-angular-applet-spinner.d.ts +2 -2
  66. package/types/unipin-angular-applet-swipeable.d.ts +1 -1
@@ -9,10 +9,10 @@ class UpSkeletonDirective {
9
9
  return up('block animate-pulse rounded-md bg-muted', this.inlineClass());
10
10
  }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
11
11
  }
12
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSkeletonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
13
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.10", type: UpSkeletonDirective, isStandalone: true, selector: "[upSkeleton]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upSkeleton"], ngImport: i0 }); }
12
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSkeletonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
13
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.18", type: UpSkeletonDirective, isStandalone: true, selector: "[upSkeleton]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upSkeleton"], ngImport: i0 }); }
14
14
  }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSkeletonDirective, decorators: [{
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSkeletonDirective, decorators: [{
16
16
  type: Directive,
17
17
  args: [{
18
18
  exportAs: 'upSkeleton',
@@ -4,14 +4,14 @@ import { up } from '@unipin/angular-applet/common';
4
4
 
5
5
  class UpSpinnerComponent {
6
6
  constructor() {
7
- this.stokeWidth = input(8, { ...(ngDevMode ? { debugName: "stokeWidth" } : /* istanbul ignore next */ {}), transform: numberAttribute });
8
- this.inlineClass = input({ alias: 'class' }, ...(ngDevMode ? [{ debugName: "inlineClass" }] : /* istanbul ignore next */ []));
7
+ this.strokeWidth = input(8, { ...(ngDevMode ? { debugName: "strokeWidth" } : /* istanbul ignore next */ {}), transform: numberAttribute });
8
+ this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : /* istanbul ignore next */ {}), alias: 'class' });
9
9
  this._computedClass = computed(() => {
10
10
  return up('inline-block size-8 text-primary', this.inlineClass());
11
11
  }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
12
12
  }
13
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.10", type: UpSpinnerComponent, isStandalone: true, selector: "up-spinner", inputs: { stokeWidth: { classPropertyName: "stokeWidth", publicName: "stokeWidth", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "inlineClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: `
13
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.18", type: UpSpinnerComponent, isStandalone: true, selector: "up-spinner", inputs: { strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status", "aria-label": "Loading" }, properties: { "class": "_computedClass()" } }, ngImport: i0, template: `
15
15
  <svg
16
16
  aria-hidden="true"
17
17
  viewBox="0 0 80 80"
@@ -25,12 +25,9 @@ class UpSpinnerComponent {
25
25
  stroke="currentColor"
26
26
  stroke-linecap="round"
27
27
  stroke-dashoffset="0"
28
- stroke-dashoffset="0"
29
- stroke-dashoffset="0"
30
- stroke-dashoffset="0"
31
28
  stroke-dasharray="44 132"
32
29
  class="animate-ring-1"
33
- [attr.stroke-width]="stokeWidth()"
30
+ [attr.stroke-width]="strokeWidth()"
34
31
  />
35
32
 
36
33
  <circle
@@ -42,7 +39,7 @@ class UpSpinnerComponent {
42
39
  stroke-linecap="round"
43
40
  stroke-dasharray="44 132"
44
41
  class="animate-ring-2"
45
- [attr.stroke-width]="stokeWidth()"
42
+ [attr.stroke-width]="strokeWidth()"
46
43
  />
47
44
 
48
45
  <circle
@@ -54,7 +51,7 @@ class UpSpinnerComponent {
54
51
  stroke-linecap="round"
55
52
  stroke-dasharray="44 132"
56
53
  class="animate-ring-3"
57
- [attr.stroke-width]="stokeWidth()"
54
+ [attr.stroke-width]="strokeWidth()"
58
55
  />
59
56
 
60
57
  <circle
@@ -66,14 +63,16 @@ class UpSpinnerComponent {
66
63
  stroke-linecap="round"
67
64
  stroke-dasharray="44 132"
68
65
  class="animate-ring-4"
69
- [attr.stroke-width]="stokeWidth()"
66
+ [attr.stroke-width]="strokeWidth()"
70
67
  />
71
68
  </svg>
72
69
  `, isInline: true, styles: ["@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-ring-1{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;animation-delay:-.45s;transform-origin:50% 50%}.animate-ring-2{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;animation-delay:-.3s;transform-origin:50% 50%}.animate-ring-3{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;animation-delay:-.15s;transform-origin:50% 50%}.animate-ring-4{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;animation-delay:0s;transform-origin:50% 50%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
73
70
  }
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSpinnerComponent, decorators: [{
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSpinnerComponent, decorators: [{
75
72
  type: Component,
76
73
  args: [{ selector: 'up-spinner', changeDetection: ChangeDetectionStrategy.OnPush, host: {
74
+ 'role': 'status',
75
+ 'aria-label': 'Loading',
77
76
  '[class]': '_computedClass()',
78
77
  }, template: `
79
78
  <svg
@@ -89,12 +88,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
89
88
  stroke="currentColor"
90
89
  stroke-linecap="round"
91
90
  stroke-dashoffset="0"
92
- stroke-dashoffset="0"
93
- stroke-dashoffset="0"
94
- stroke-dashoffset="0"
95
91
  stroke-dasharray="44 132"
96
92
  class="animate-ring-1"
97
- [attr.stroke-width]="stokeWidth()"
93
+ [attr.stroke-width]="strokeWidth()"
98
94
  />
99
95
 
100
96
  <circle
@@ -106,7 +102,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
106
102
  stroke-linecap="round"
107
103
  stroke-dasharray="44 132"
108
104
  class="animate-ring-2"
109
- [attr.stroke-width]="stokeWidth()"
105
+ [attr.stroke-width]="strokeWidth()"
110
106
  />
111
107
 
112
108
  <circle
@@ -118,7 +114,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
118
114
  stroke-linecap="round"
119
115
  stroke-dasharray="44 132"
120
116
  class="animate-ring-3"
121
- [attr.stroke-width]="stokeWidth()"
117
+ [attr.stroke-width]="strokeWidth()"
122
118
  />
123
119
 
124
120
  <circle
@@ -130,11 +126,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
130
126
  stroke-linecap="round"
131
127
  stroke-dasharray="44 132"
132
128
  class="animate-ring-4"
133
- [attr.stroke-width]="stokeWidth()"
129
+ [attr.stroke-width]="strokeWidth()"
134
130
  />
135
131
  </svg>
136
132
  `, styles: ["@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-ring-1{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;animation-delay:-.45s;transform-origin:50% 50%}.animate-ring-2{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;animation-delay:-.3s;transform-origin:50% 50%}.animate-ring-3{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;animation-delay:-.15s;transform-origin:50% 50%}.animate-ring-4{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;animation-delay:0s;transform-origin:50% 50%}\n"] }]
137
- }], propDecorators: { stokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "stokeWidth", required: false }] }], inlineClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inlineClass", required: false }] }] } });
133
+ }], propDecorators: { strokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "strokeWidth", required: false }] }], inlineClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
138
134
 
139
135
  /**
140
136
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"unipin-angular-applet-spinner.mjs","sources":["../../../projects/unipin-angular/spinner/spinner.component.ts","../../../projects/unipin-angular/spinner/unipin-angular-applet-spinner.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, numberAttribute } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n\n@Component({\n selector: 'up-spinner',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': '_computedClass()',\n },\n template: `\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 80 80\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n r=\"28\"\n cx=\"40\"\n cy=\"40\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-dashoffset=\"0\"\n stroke-dashoffset=\"0\"\n stroke-dashoffset=\"0\"\n stroke-dashoffset=\"0\"\n stroke-dasharray=\"44 132\"\n class=\"animate-ring-1\"\n [attr.stroke-width]=\"stokeWidth()\"\n />\n \n <circle\n r=\"28\" \n cx=\"40\"\n cy=\"40\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"44 132\"\n class=\"animate-ring-2\"\n [attr.stroke-width]=\"stokeWidth()\"\n />\n \n <circle\n r=\"28\"\n cx=\"40\"\n cy=\"40\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"44 132\"\n class=\"animate-ring-3\"\n [attr.stroke-width]=\"stokeWidth()\"\n />\n \n <circle\n r=\"28\"\n cx=\"40\"\n cy=\"40\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"44 132\"\n class=\"animate-ring-4\"\n [attr.stroke-width]=\"stokeWidth()\"\n />\n </svg>\n `,\n styles: `\n @keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n \n .animate-ring-1 {\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n animation-delay: -0.45s;\n transform-origin: 50% 50%;\n }\n \n .animate-ring-2 {\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n animation-delay: -0.3s;\n transform-origin: 50% 50%;\n }\n \n .animate-ring-3 {\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n animation-delay: -0.15s;\n transform-origin: 50% 50%;\n }\n \n .animate-ring-4 {\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n animation-delay: 0s;\n transform-origin: 50% 50%;\n }\n `\n})\nexport class UpSpinnerComponent {\n \n public readonly stokeWidth = input(8, { transform: numberAttribute });\n public readonly inlineClass = input<ClassValue>({ alias: 'class' });\n \n protected readonly _computedClass = computed(\n () => {\n return up(\n 'inline-block size-8 text-primary', \n this.inlineClass()\n );\n }\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAyGa,kBAAkB,CAAA;AApG/B,IAAA,WAAA,GAAA;QAsGkB,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,CAAC,kFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;QACrD,IAAA,CAAA,WAAW,GAAG,KAAK,CAAa,EAAE,KAAK,EAAE,OAAO,EAAE,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAC;AAEhD,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAC1C,MAAK;YACH,OAAO,EAAE,CACP,kCAAkC,EAClC,IAAI,CAAC,WAAW,EAAE,CACnB;AACH,QAAA,CAAC,qFACF;AACF,IAAA;+GAbY,kBAAkB,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T,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,wiBAAA,CAAA,EAAA;;;ACrEH;;AAEG;;;;"}
1
+ {"version":3,"file":"unipin-angular-applet-spinner.mjs","sources":["../../../projects/unipin-angular/spinner/spinner.component.ts","../../../projects/unipin-angular/spinner/unipin-angular-applet-spinner.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, numberAttribute } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n\n@Component({\n selector: 'up-spinner',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'role': 'status',\n 'aria-label': 'Loading',\n '[class]': '_computedClass()',\n },\n template: `\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 80 80\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n r=\"28\"\n cx=\"40\"\n cy=\"40\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-dashoffset=\"0\"\n stroke-dasharray=\"44 132\"\n class=\"animate-ring-1\"\n [attr.stroke-width]=\"strokeWidth()\"\n />\n \n <circle\n r=\"28\" \n cx=\"40\"\n cy=\"40\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"44 132\"\n class=\"animate-ring-2\"\n [attr.stroke-width]=\"strokeWidth()\"\n />\n \n <circle\n r=\"28\"\n cx=\"40\"\n cy=\"40\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"44 132\"\n class=\"animate-ring-3\"\n [attr.stroke-width]=\"strokeWidth()\"\n />\n \n <circle\n r=\"28\"\n cx=\"40\"\n cy=\"40\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"44 132\"\n class=\"animate-ring-4\"\n [attr.stroke-width]=\"strokeWidth()\"\n />\n </svg>\n `,\n styles: `\n @keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n \n .animate-ring-1 {\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n animation-delay: -0.45s;\n transform-origin: 50% 50%;\n }\n \n .animate-ring-2 {\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n animation-delay: -0.3s;\n transform-origin: 50% 50%;\n }\n \n .animate-ring-3 {\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n animation-delay: -0.15s;\n transform-origin: 50% 50%;\n }\n \n .animate-ring-4 {\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n animation-delay: 0s;\n transform-origin: 50% 50%;\n }\n `\n})\nexport class UpSpinnerComponent {\n \n public readonly strokeWidth = input(8, { transform: numberAttribute });\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n \n protected readonly _computedClass = computed(\n () => {\n return up(\n 'inline-block size-8 text-primary', \n this.inlineClass()\n );\n }\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAwGa,kBAAkB,CAAA;AAnG/B,IAAA,WAAA,GAAA;QAqGkB,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,CAAC,mFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;QACtD,IAAA,CAAA,WAAW,GAAG,KAAK,CAAa,EAAE,mFAAI,KAAK,EAAE,OAAO,EAAA,CAAG;AAEpD,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAC1C,MAAK;YACH,OAAO,EAAE,CACP,kCAAkC,EAClC,IAAI,CAAC,WAAW,EAAE,CACnB;AACH,QAAA,CAAC,qFACF;AACF,IAAA;+GAbY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EA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A,CAAA,EAAA,MAAA,EAAA,CAAA,wiBAAA,CAAA,EAAA;;;ACpEH;;AAEG;;;;"}
@@ -47,8 +47,7 @@ class UpStepperComponent {
47
47
  const target = current - 1;
48
48
  const targetStep = this.steps()[target - 1];
49
49
  if (target < 1 ||
50
- !targetStep ||
51
- !targetStep.allowReopen) {
50
+ !targetStep?.allowReopen) {
52
51
  return;
53
52
  }
54
53
  this.activeStep.set(target);
@@ -63,9 +62,18 @@ class UpStepperComponent {
63
62
  if (step.status === 'COMPLETED') {
64
63
  return step;
65
64
  }
65
+ const isPreviousStep = index === current - 1;
66
+ const isCurrentStep = index === current;
67
+ let nextStatus = step.status;
68
+ if (isPreviousStep) {
69
+ nextStatus = 'COMPLETED';
70
+ }
71
+ else if (isCurrentStep) {
72
+ nextStatus = 'PENDING';
73
+ }
66
74
  return {
67
75
  ...step,
68
- status: index === current - 1 ? 'COMPLETED' : (index === current ? 'PENDING' : step.status)
76
+ status: nextStatus
69
77
  };
70
78
  });
71
79
  });
@@ -79,8 +87,8 @@ class UpStepperComponent {
79
87
  return 'PENDING';
80
88
  return 'DISABLED';
81
89
  }
82
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
83
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: UpStepperComponent, isStandalone: true, selector: "up-stepper", inputs: { initialStep: { classPropertyName: "initialStep", publicName: "initialStep", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, queries: [{ propertyName: "stepContents", predicate: i0.forwardRef(() => UpStepperContentDirective), descendants: true, isSignal: true }], ngImport: i0, template: `
90
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
91
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: UpStepperComponent, isStandalone: true, selector: "up-stepper", inputs: { initialStep: { classPropertyName: "initialStep", publicName: "initialStep", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, queries: [{ propertyName: "stepContents", predicate: i0.forwardRef(() => UpStepperContentDirective), descendants: true, isSignal: true }], ngImport: i0, template: `
84
92
  <div class="hidden sm:flex items-center justify-between select-none shrink-0">
85
93
  @for (step of steps(); track $index) {
86
94
  <div class="flex flex-col items-center relative lg:static lg:flex-row lg:gap-2">
@@ -159,7 +167,7 @@ class UpStepperComponent {
159
167
  <ng-content/>
160
168
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
161
169
  }
162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpStepperComponent, decorators: [{
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpStepperComponent, decorators: [{
163
171
  type: Component,
164
172
  args: [{
165
173
  selector: 'up-stepper',
@@ -264,10 +272,10 @@ class UpStepperContentDirective {
264
272
  this.isActive.set(this.parent.activeStep() === this.index());
265
273
  });
266
274
  }
267
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpStepperContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
268
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.10", type: UpStepperContentDirective, isStandalone: true, selector: "[upStepperContent]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, allowReopen: { classPropertyName: "allowReopen", publicName: "allowReopen", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "hidden": "!isActive()" } }, exportAs: ["upStepperContent"], ngImport: i0 }); }
275
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpStepperContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
276
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.18", type: UpStepperContentDirective, isStandalone: true, selector: "[upStepperContent]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, allowReopen: { classPropertyName: "allowReopen", publicName: "allowReopen", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "hidden": "!isActive()" } }, exportAs: ["upStepperContent"], ngImport: i0 }); }
269
277
  }
270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpStepperContentDirective, decorators: [{
278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpStepperContentDirective, decorators: [{
271
279
  type: Directive,
272
280
  args: [{
273
281
  exportAs: 'upStepperContent',
@@ -1 +1 @@
1
- {"version":3,"file":"unipin-angular-applet-stepper.mjs","sources":["../../../projects/unipin-angular/stepper/stepper.component.ts","../../../projects/unipin-angular/stepper/stepper-content.directive.ts","../../../projects/unipin-angular/stepper/unipin-angular-applet-stepper.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, contentChildren, effect, forwardRef, input, OnInit, signal } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpStepperContentDirective } from './stepper-content.directive';\n\n\ntype StepperStep = {\n label: string;\n allowReopen: boolean;\n status: 'PENDING' | 'DISABLED' | 'COMPLETED';\n}\n\n\n@Component({\n selector: 'up-stepper',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': '_computedClass()',\n },\n template: `\n <div class=\"hidden sm:flex items-center justify-between select-none shrink-0\">\n @for (step of steps(); track $index) {\n <div class=\"flex flex-col items-center relative lg:static lg:flex-row lg:gap-2\">\n <div\n class=\"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold transition-all duration-300\"\n [class.cursor-pointer]=\"step.allowReopen && step.status !== 'DISABLED'\"\n\n [class.bg-muted]=\"($index + 1) > activeStep()\"\n [class.bg-primary]=\"($index + 1) <= activeStep()\"\n\n [class.text-white]=\"($index + 1) <= activeStep()\"\n [class.text-muted-foreground]=\"($index + 1) > activeStep()\"\n \n (click)=\"step.allowReopen && step.status !== 'DISABLED'? this.activeStep.set($index + 1) : null\"\n >\n {{ $index + 1 }}\n </div>\n \n <div \n class=\"absolute top-10 text-xs text-primary font-medium whitespace-nowrap transition-opacity duration-300 lg:static lg:text-base\"\n [class.hidden]=\"($index + 1) !== activeStep()\"\n >\n {{ step.label }}\n </div>\n </div>\n \n @if (!$last) {\n <div class=\"flex-1 h-0.5 min-w-5 mx-2\">\n <div \n class=\"size-full transition-all duration-300\"\n [class.bg-muted]=\"($index + 1) >= activeStep()\"\n [class.bg-primary]=\"($index + 1) < activeStep()\"\n >\n </div>\n </div>\n }\n }\n </div>\n\n <div class=\"flex sm:hidden items-center justify-between select-none shrink-0\">\n @for (step of visibleSteps(); track step.index) {\n <div class=\"flex flex-col items-center relative lg:static lg:flex-row lg:gap-2\">\n <div \n class=\"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold transition-all duration-300\"\n [class.bg-muted]=\"(step.index + 1) > activeStep()\"\n [class.bg-primary]=\"(step.index + 1) <= activeStep()\"\n \n [class.text-white]=\"(step.index + 1) <= activeStep()\"\n [class.text-muted-foreground]=\"(step.index + 1) > activeStep()\"\n >\n {{ step.index + 1 }}\n </div>\n \n <div \n class=\"absolute top-10 text-xs text-primary font-medium whitespace-nowrap transition-opacity duration-300 lg:static lg:text-base\"\n [class.hidden]=\"(step.index + 1) !== activeStep()\"\n >\n {{ step.label }}\n </div>\n </div>\n \n @if (!$last) {\n <div class=\"flex-1 h-0.5 mx-2\">\n <div \n class=\"size-full transition-all duration-300\"\n [class.bg-muted]=\"($index + 1) >= activeStep()\"\n [class.bg-primary]=\"($index + 1) < activeStep()\"\n >\n </div>\n </div>\n }\n }\n </div>\n\n <!-- stepper content -->\n <ng-content/>\n `\n})\nexport class UpStepperComponent implements OnInit {\n \n public readonly stepContents = contentChildren(\n forwardRef(() => UpStepperContentDirective),\n { \n descendants: true \n }\n );\n\n public readonly initialStep = input<number>(1); \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n 'flex flex-col gap-6',\n this.inlineClass()\n );\n }\n );\n\n public readonly activeStep = signal<number>(1);\n public readonly steps = signal<StepperStep[]>([]);\n\n public readonly visibleSteps = computed(\n () => {\n const steps = this.steps();\n const active = this.activeStep() - 1;\n\n const start = Math.max(0, Math.min(active - 1, steps.length - 3));\n const end = Math.min(start + 3, steps.length);\n\n return steps.slice(start, end).map(\n (step, i) => {\n return {\n ...step,\n index: start + i,\n };\n }\n );\n }\n );\n\n constructor() {\n effect(\n () => {\n const initialStep = this.initialStep();\n const stepContents = this.stepContents();\n\n stepContents.forEach(\n (content, index) => {\n content.index.set(index + 1);\n }\n );\n\n this.steps.set(\n stepContents.map(\n (content, index) => {\n return {\n label: content.label(),\n allowReopen: content.allowReopen(),\n status: this.getStepperStatus(index, initialStep)\n };\n }\n )\n );\n }\n );\n }\n\n public ngOnInit(): void{\n this.activeStep.set(this.initialStep());\n }\n\n public prevStep(): void{\n const current = this.activeStep();\n const target = current - 1;\n const targetStep = this.steps()[target - 1];\n\n if (\n target < 1 || \n !targetStep || \n !targetStep.allowReopen\n ) {\n return;\n }\n this.activeStep.set(target);\n }\n\n public nextStep(): void{\n const current = this.activeStep();\n if (current >= this.steps().length) {\n return;\n }\n\n this.steps.update(\n (list) => {\n return list.map(\n (step, index) => {\n if (step.status === 'COMPLETED') {\n return step;\n }\n\n return {\n ...step,\n status: index === current - 1? 'COMPLETED' : (index === current? 'PENDING' : step.status)\n };\n }\n );\n }\n );\n this.activeStep.update((prev) => prev + 1);\n }\n\n protected getStepperStatus(i: number, initialStep: number): StepperStep['status']{\n const init = initialStep - 1;\n \n if (i < init) return 'COMPLETED';\n if (i === init) return 'PENDING';\n return 'DISABLED';\n }\n}\n","import { booleanAttribute, Directive, effect, forwardRef, inject, input, signal } from '@angular/core';\nimport { UpStepperComponent } from './stepper.component';\n\n\n@Directive({\n exportAs: 'upStepperContent',\n selector: '[upStepperContent]',\n host: {\n '[hidden]': '!isActive()'\n }\n})\nexport class UpStepperContentDirective {\n \n public readonly parent = inject(forwardRef(() => UpStepperComponent));\n \n public readonly label = input.required<string>();\n public readonly allowReopen = input(true, { transform: booleanAttribute});\n \n public readonly isActive = signal<boolean>(false);\n public readonly index = signal<number | null>(null);\n\n constructor() {\n effect(\n () => {\n if (!this.parent) {\n return;\n }\n this.isActive.set(this.parent.activeStep() === this.index());\n }\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAkGa,kBAAkB,CAAA;AA2C7B,IAAA,WAAA,GAAA;AAzCgB,QAAA,IAAA,CAAA,YAAY,GAAG,eAAe,CAC5C,UAAU,CAAC,MAAM,yBAAyB,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,cAAA,EAAA,8BAAA,EAAA,CAAA,EAEzC,WAAW,EAAE,IAAI,GAEpB;AAEe,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,CAAC,kFAAC;QAC9B,IAAA,CAAA,WAAW,GAAG,KAAK,CAAa,EAAE,mFAAI,KAAK,EAAE,OAAO,EAAA,CAAG;AAEpD,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAC1C,MAAK;YACH,OAAO,EAAE,CACP,qBAAqB,EACrB,IAAI,CAAC,WAAW,EAAE,CACnB;A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EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE;AACJ,wBAAA,UAAU,EAAE;AACb;AACF,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"unipin-angular-applet-stepper.mjs","sources":["../../../projects/unipin-angular/stepper/stepper.component.ts","../../../projects/unipin-angular/stepper/stepper-content.directive.ts","../../../projects/unipin-angular/stepper/unipin-angular-applet-stepper.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, contentChildren, effect, forwardRef, input, OnInit, signal } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpStepperContentDirective } from './stepper-content.directive';\n\n\ntype StepperStep = {\n label: string;\n allowReopen: boolean;\n status: 'PENDING' | 'DISABLED' | 'COMPLETED';\n}\n\n\n@Component({\n selector: 'up-stepper',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': '_computedClass()',\n },\n template: `\n <div class=\"hidden sm:flex items-center justify-between select-none shrink-0\">\n @for (step of steps(); track $index) {\n <div class=\"flex flex-col items-center relative lg:static lg:flex-row lg:gap-2\">\n <div\n class=\"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold transition-all duration-300\"\n [class.cursor-pointer]=\"step.allowReopen && step.status !== 'DISABLED'\"\n\n [class.bg-muted]=\"($index + 1) > activeStep()\"\n [class.bg-primary]=\"($index + 1) <= activeStep()\"\n\n [class.text-white]=\"($index + 1) <= activeStep()\"\n [class.text-muted-foreground]=\"($index + 1) > activeStep()\"\n \n (click)=\"step.allowReopen && step.status !== 'DISABLED'? this.activeStep.set($index + 1) : null\"\n >\n {{ $index + 1 }}\n </div>\n \n <div \n class=\"absolute top-10 text-xs text-primary font-medium whitespace-nowrap transition-opacity duration-300 lg:static lg:text-base\"\n [class.hidden]=\"($index + 1) !== activeStep()\"\n >\n {{ step.label }}\n </div>\n </div>\n \n @if (!$last) {\n <div class=\"flex-1 h-0.5 min-w-5 mx-2\">\n <div \n class=\"size-full transition-all duration-300\"\n [class.bg-muted]=\"($index + 1) >= activeStep()\"\n [class.bg-primary]=\"($index + 1) < activeStep()\"\n >\n </div>\n </div>\n }\n }\n </div>\n\n <div class=\"flex sm:hidden items-center justify-between select-none shrink-0\">\n @for (step of visibleSteps(); track step.index) {\n <div class=\"flex flex-col items-center relative lg:static lg:flex-row lg:gap-2\">\n <div \n class=\"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold transition-all duration-300\"\n [class.bg-muted]=\"(step.index + 1) > activeStep()\"\n [class.bg-primary]=\"(step.index + 1) <= activeStep()\"\n \n [class.text-white]=\"(step.index + 1) <= activeStep()\"\n [class.text-muted-foreground]=\"(step.index + 1) > activeStep()\"\n >\n {{ step.index + 1 }}\n </div>\n \n <div \n class=\"absolute top-10 text-xs text-primary font-medium whitespace-nowrap transition-opacity duration-300 lg:static lg:text-base\"\n [class.hidden]=\"(step.index + 1) !== activeStep()\"\n >\n {{ step.label }}\n </div>\n </div>\n \n @if (!$last) {\n <div class=\"flex-1 h-0.5 mx-2\">\n <div \n class=\"size-full transition-all duration-300\"\n [class.bg-muted]=\"($index + 1) >= activeStep()\"\n [class.bg-primary]=\"($index + 1) < activeStep()\"\n >\n </div>\n </div>\n }\n }\n </div>\n\n <!-- stepper content -->\n <ng-content/>\n `\n})\nexport class UpStepperComponent implements OnInit {\n \n public readonly stepContents = contentChildren(\n forwardRef(() => UpStepperContentDirective),\n { \n descendants: true \n }\n );\n\n public readonly initialStep = input<number>(1); \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n 'flex flex-col gap-6',\n this.inlineClass()\n );\n }\n );\n\n public readonly activeStep = signal<number>(1);\n public readonly steps = signal<StepperStep[]>([]);\n\n public readonly visibleSteps = computed(\n () => {\n const steps = this.steps();\n const active = this.activeStep() - 1;\n\n const start = Math.max(0, Math.min(active - 1, steps.length - 3));\n const end = Math.min(start + 3, steps.length);\n\n return steps.slice(start, end).map(\n (step, i) => {\n return {\n ...step,\n index: start + i,\n };\n }\n );\n }\n );\n\n constructor() {\n effect(\n () => {\n const initialStep = this.initialStep();\n const stepContents = this.stepContents();\n\n stepContents.forEach(\n (content, index) => {\n content.index.set(index + 1);\n }\n );\n\n this.steps.set(\n stepContents.map(\n (content, index) => {\n return {\n label: content.label(),\n allowReopen: content.allowReopen(),\n status: this.getStepperStatus(index, initialStep)\n };\n }\n )\n );\n }\n );\n }\n\n public ngOnInit(): void{\n this.activeStep.set(this.initialStep());\n }\n\n public prevStep(): void{\n const current = this.activeStep();\n const target = current - 1;\n const targetStep = this.steps()[target - 1];\n\n if (\n target < 1 || \n !targetStep?.allowReopen\n ) {\n return;\n }\n this.activeStep.set(target);\n }\n\n public nextStep(): void{\n const current = this.activeStep();\n if (current >= this.steps().length) {\n return;\n }\n\n this.steps.update(\n (list) => {\n return list.map(\n (step, index) => {\n if (step.status === 'COMPLETED') {\n return step;\n }\n \n const isPreviousStep = index === current - 1;\n const isCurrentStep = index === current;\n \n let nextStatus: StepperStep['status'] = step.status;\n if (isPreviousStep) {\n nextStatus = 'COMPLETED';\n } \n else if (isCurrentStep) {\n nextStatus = 'PENDING';\n }\n\n return {\n ...step,\n status: nextStatus\n };\n }\n );\n }\n );\n this.activeStep.update((prev) => prev + 1);\n }\n\n protected getStepperStatus(i: number, initialStep: number): StepperStep['status']{\n const init = initialStep - 1;\n \n if (i < init) return 'COMPLETED';\n if (i === init) return 'PENDING';\n return 'DISABLED';\n }\n}\n","import { booleanAttribute, Directive, effect, forwardRef, inject, input, signal } from '@angular/core';\nimport { UpStepperComponent } from './stepper.component';\n\n\n@Directive({\n exportAs: 'upStepperContent',\n selector: '[upStepperContent]',\n host: {\n '[hidden]': '!isActive()'\n }\n})\nexport class UpStepperContentDirective {\n \n public readonly parent = inject(forwardRef(() => UpStepperComponent));\n \n public readonly label = input.required<string>();\n public readonly allowReopen = input(true, { transform: booleanAttribute});\n \n public readonly isActive = signal<boolean>(false);\n public readonly index = signal<number | null>(null);\n\n constructor() {\n effect(\n () => {\n if (!this.parent) {\n return;\n }\n this.isActive.set(this.parent.activeStep() === this.index());\n }\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAkGa,kBAAkB,CAAA;AA2C7B,IAAA,WAAA,GAAA;AAzCgB,QAAA,IAAA,CAAA,YAAY,GAAG,eAAe,CAC5C,UAAU,CAAC,MAAM,yBAAyB,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,cAAA,EAAA,8BAAA,EAAA,CAAA,EAEzC,WAAW,EAAE,IAAI,GAEpB;AAEe,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,CAAC,kFAAC;QAC9B,IAAA,CAAA,WAAW,GAAG,KAAK,CAAa,EAAE,mFAAI,KAAK,EAAE,OAAO,EAAA,CAAG;AAEpD,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAC1C,MAAK;YACH,OAAO,EAAE,CACP,qBAAqB,EACrB,IAAI,CAAC,WAAW,EAAE,CACnB;AACH,QAAA,CAAC,qFACF;AAEe,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAS,CAAC,iFAAC;AAC9B,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAgB,EAAE,4EAAC;AAEjC,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CACrC,MAAK;AACH,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;YAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC;YAEpC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjE,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,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;gBAChB;YACF;AACA,YAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;AAC9D,QAAA,CAAC,CACF;IACH;+GAnBW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,aAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAPrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE;AACJ,wBAAA,UAAU,EAAE;AACb;AACF,iBAAA;;;ACVD;;AAEG;;;;"}
@@ -21,10 +21,10 @@ class UpSwipeableContentDirective {
21
21
  translateX(x) {
22
22
  this.element.style.transform = `translateX(${x}px)`;
23
23
  }
24
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSwipeableContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
25
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.10", type: UpSwipeableContentDirective, isStandalone: true, selector: "[upSwipeableContent]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upSwipeableContent"], ngImport: i0 }); }
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSwipeableContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
25
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.18", type: UpSwipeableContentDirective, isStandalone: true, selector: "[upSwipeableContent]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upSwipeableContent"], ngImport: i0 }); }
26
26
  }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSwipeableContentDirective, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSwipeableContentDirective, decorators: [{
28
28
  type: Directive,
29
29
  args: [{
30
30
  exportAs: 'upSwipeableContent',
@@ -43,10 +43,10 @@ class UpSwipeableButtonsDirective {
43
43
  return up('absolute top-px bottom-px h-auto w-2/5 flex items-stretch z-0', this.side() === 'left' ? 'left-px flex-row' : 'right-px flex-row-reverse');
44
44
  }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
45
45
  }
46
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSwipeableButtonsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
47
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.10", type: UpSwipeableButtonsDirective, isStandalone: true, selector: "[upSwipeableButtons]", inputs: { side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upSwipeableButtons"], ngImport: i0 }); }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSwipeableButtonsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
47
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.18", type: UpSwipeableButtonsDirective, isStandalone: true, selector: "[upSwipeableButtons]", inputs: { side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upSwipeableButtons"], ngImport: i0 }); }
48
48
  }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSwipeableButtonsDirective, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSwipeableButtonsDirective, decorators: [{
50
50
  type: Directive,
51
51
  args: [{
52
52
  exportAs: 'upSwipeableButtons',
@@ -166,7 +166,8 @@ class UpSwipeableDirective {
166
166
  const container = this.containerWidth();
167
167
  const openDistance = (this.threshold() / 100) * container;
168
168
  const target = event?.target;
169
- if (target?.closest('[upSwipeableBtn]')) {
169
+ if (target instanceof HTMLElement &&
170
+ target.closest('[upSwipeableBtn]')) {
170
171
  return;
171
172
  }
172
173
  if (this.openSide() === null &&
@@ -202,10 +203,10 @@ class UpSwipeableDirective {
202
203
  }
203
204
  this.rightSwiped.emit();
204
205
  }
205
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSwipeableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
206
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.10", type: UpSwipeableDirective, isStandalone: true, selector: "[upSwipeable]", inputs: { threshold: { classPropertyName: "threshold", publicName: "threshold", isSignal: true, isRequired: false, transformFunction: null }, overSwipeThreshold: { classPropertyName: "overSwipeThreshold", publicName: "overSwipeThreshold", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked", leftSwiped: "leftSwiped", rightSwiped: "rightSwiped" }, host: { listeners: { "mousedown": "onMouseDown($event)", "document:mousemove": "onMouseMove($event)", "document:mouseup": "onMouseUp($event)", "touchstart": "onTouchStart($event)", "touchmove": "onTouchMove($event)", "touchend": "onTouchEnd($event)" }, properties: { "class": "_computedClass()" } }, queries: [{ propertyName: "content", first: true, predicate: UpSwipeableContentDirective, descendants: true, isSignal: true }, { propertyName: "buttonContainers", predicate: UpSwipeableButtonsDirective, isSignal: true }], exportAs: ["upSwipeable"], ngImport: i0 }); }
206
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSwipeableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
207
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.18", type: UpSwipeableDirective, isStandalone: true, selector: "[upSwipeable]", inputs: { threshold: { classPropertyName: "threshold", publicName: "threshold", isSignal: true, isRequired: false, transformFunction: null }, overSwipeThreshold: { classPropertyName: "overSwipeThreshold", publicName: "overSwipeThreshold", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked", leftSwiped: "leftSwiped", rightSwiped: "rightSwiped" }, host: { listeners: { "mousedown": "onMouseDown($event)", "document:mousemove": "onMouseMove($event)", "document:mouseup": "onMouseUp($event)", "touchstart": "onTouchStart($event)", "touchmove": "onTouchMove($event)", "touchend": "onTouchEnd($event)" }, properties: { "class": "_computedClass()" } }, queries: [{ propertyName: "content", first: true, predicate: UpSwipeableContentDirective, descendants: true, isSignal: true }, { propertyName: "buttonContainers", predicate: UpSwipeableButtonsDirective, isSignal: true }], exportAs: ["upSwipeable"], ngImport: i0 }); }
207
208
  }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSwipeableDirective, decorators: [{
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSwipeableDirective, decorators: [{
209
210
  type: Directive,
210
211
  args: [{
211
212
  exportAs: 'upSwipeable',
@@ -244,10 +245,10 @@ class UpSwipeableButtonDirective extends UpButtonDirective {
244
245
  }), this.inlineClass(), 'h-full rounded-none flex-1');
245
246
  }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
246
247
  }
247
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSwipeableButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
248
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: UpSwipeableButtonDirective, isStandalone: true, selector: "[upSwipeableBtn]", host: { properties: { "class": "_computedClass()" } }, exportAs: ["upSwipeableBtn"], usesInheritance: true, ngImport: i0 }); }
248
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSwipeableButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
249
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.18", type: UpSwipeableButtonDirective, isStandalone: true, selector: "[upSwipeableBtn]", host: { properties: { "class": "_computedClass()" } }, exportAs: ["upSwipeableBtn"], usesInheritance: true, ngImport: i0 }); }
249
250
  }
250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpSwipeableButtonDirective, decorators: [{
251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpSwipeableButtonDirective, decorators: [{
251
252
  type: Directive,
252
253
  args: [{
253
254
  exportAs: 'upSwipeableBtn',
@@ -1 +1 @@
1
- {"version":3,"file":"unipin-angular-applet-swipeable.mjs","sources":["../../../projects/unipin-angular/swipeable/directives/swipeable-content.directive.ts","../../../projects/unipin-angular/swipeable/directives/swipeable-buttons.directive.ts","../../../projects/unipin-angular/swipeable/directives/swipeable.directive.ts","../../../projects/unipin-angular/swipeable/directives/swipeable-button.directive.ts","../../../projects/unipin-angular/swipeable/unipin-angular-applet-swipeable.ts"],"sourcesContent":["import { computed, Directive, ElementRef, inject, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n\n@Directive({\n exportAs: 'upSwipeableContent',\n selector: '[upSwipeableContent]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpSwipeableContentDirective {\n \n public readonly element = inject(ElementRef<HTMLElement>).nativeElement;\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n `\n relative flex flex-shrink-0 items-center justify-start\n bg-white z-10\n transition-transform duration-200 ease-out\n will-change-transform\n select-none\n w-fit h-fit\n `,\n this.inlineClass()\n );\n }\n );\n\n public translateX(x: number): void{\n this.element.style.transform = `translateX(${ x }px)`;\n }\n}\n","import { computed, Directive, ElementRef, inject, input } from '@angular/core';\nimport { up } from '@unipin/angular-applet/common';\n\n\n@Directive({\n exportAs: 'upSwipeableButtons',\n selector: '[upSwipeableButtons]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpSwipeableButtonsDirective {\n \n public readonly side = input.required<'left' | 'right'>();\n public readonly element = inject(ElementRef<HTMLElement>).nativeElement;\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n 'absolute top-px bottom-px h-auto w-2/5 flex items-stretch z-0',\n this.side() === 'left'? 'left-px flex-row' : 'right-px flex-row-reverse'\n );\n }\n );\n}\n","import { Directive, HostListener, input, output, signal, computed, contentChild, contentChildren, effect } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpSwipeableContentDirective } from './swipeable-content.directive';\nimport { UpSwipeableButtonsDirective } from './swipeable-buttons.directive';\n\n\n@Directive({\n exportAs: 'upSwipeable',\n selector: '[upSwipeable]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpSwipeableDirective {\n\n public readonly threshold = input<number>(20);\n public readonly overSwipeThreshold = input<number>(75);\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n public readonly clicked = output<void>();\n public readonly leftSwiped = output<void>();\n public readonly rightSwiped = output<void>();\n\n public readonly content = contentChild(UpSwipeableContentDirective);\n public readonly buttonContainers = contentChildren(UpSwipeableButtonsDirective);\n \n protected readonly containerWidth = signal(0);\n protected readonly buttonWidth = signal({ left: 0, right: 0 });\n protected readonly openSide = signal<'left' | 'right' | null>(null);\n \n protected readonly _computedClass = computed(\n () => {\n return up(\n 'relative w-fit overflow-hidden rounded-md touch-pan-y isolate',\n this.inlineClass()\n );\n }\n );\n\n protected startX = 0;\n protected currentX = 0;\n protected isTouch = false;\n protected isDragging = false;\n protected hasOverswiped = false;\n \n constructor() {\n effect(\n () => {\n const content = this.content()?.element;\n \n if (!content) {\n return;\n }\n requestAnimationFrame(() => this.containerWidth.set(content.scrollWidth));\n }\n );\n \n effect(\n () => {\n const leftContainer = this.buttonContainers().find(c => c.side() === 'left');\n const rightContainer = this.buttonContainers().find(c => c.side() === 'right');\n\n requestAnimationFrame(\n () => {\n this.buttonWidth.set(\n {\n left: leftContainer?.element.offsetWidth ?? 0,\n right: rightContainer?.element.offsetWidth ?? 0,\n }\n );\n }\n );\n }\n );\n }\n\n @HostListener('mousedown', ['$event'])\n public onMouseDown(event: MouseEvent) {\n this.isTouch = false;\n this.startDrag(event.clientX); \n }\n\n @HostListener('document:mousemove', ['$event'])\n public onMouseMove(event: MouseEvent) {\n if (\n this.isDragging && \n !this.isTouch\n ) {\n this.handleDrag(event.clientX);\n }\n }\n\n @HostListener('document:mouseup', ['$event'])\n public onMouseUp(event: MouseEvent) {\n if (\n this.isDragging && \n !this.isTouch\n ) {\n this.dragEnd(event)\n };\n }\n\n @HostListener('touchstart', ['$event'])\n public onTouchStart(event: TouchEvent) {\n this.isTouch = true;\n this.startDrag(event.touches[0].clientX);\n }\n\n @HostListener('touchmove', ['$event'])\n public onTouchMove(event: TouchEvent) {\n if (this.isDragging) {\n this.handleDrag(event.touches[0].clientX);\n }\n }\n\n @HostListener('touchend', ['$event'])\n public onTouchEnd(event: TouchEvent): void{\n if (!this.openSide()) {\n event.preventDefault();\n }\n this.dragEnd(event);\n }\n\n protected startDrag(x: number) {\n this.startX = x;\n this.currentX = x;\n this.isDragging = true;\n this.hasOverswiped = false;\n }\n\n protected handleDrag(x: number) {\n if (this.hasOverswiped) return;\n\n this.currentX = x;\n const delta = this.currentX - this.startX;\n const overSwipeThreshold = this.overSwipeThreshold();\n\n if (overSwipeThreshold !== null) {\n const container = this.containerWidth();\n const overswipeDistance = (overSwipeThreshold / 100) * container;\n \n if (delta > overswipeDistance) {\n return this.triggerOverswipe('right');\n }\n \n if (delta < -overswipeDistance) {\n return this.triggerOverswipe('left');\n }\n }\n this.content()?.translateX(delta);\n }\n \n protected dragEnd(event?: MouseEvent | TouchEvent): void{\n if (!this.isDragging) {\n return;\n }\n this.isDragging = false;\n\n if (this.hasOverswiped) {\n this.closeContent();\n return;\n }\n\n const delta = this.currentX - this.startX;\n const { left, right } = this.buttonWidth();\n const container = this.containerWidth();\n const openDistance = (this.threshold() / 100) * container;\n\n const target = event?.target as HTMLElement | null;\n if (target?.closest('[upSwipeableBtn]')) {\n return;\n }\n\n if (\n this.openSide() === null && \n Math.abs(delta) < 5\n ) {\n this.clicked.emit();\n this.closeContent();\n return;\n }\n\n if (delta > openDistance && left > 0) {\n return this.openContent('left');\n }\n \n if (delta < -openDistance && right > 0) {\n return this.openContent('right');\n }\n this.closeContent();\n }\n\n protected openContent(side: 'left' | 'right'): void{\n const { left, right } = this.buttonWidth();\n const offset = side === 'left'? left : -right;\n \n this.content()?.translateX(offset);\n this.openSide.set(side);\n }\n\n protected closeContent(): void{\n this.content()?.translateX(0);\n this.openSide.set(null);\n }\n\n protected triggerOverswipe(side: 'left' | 'right'): void{\n this.closeContent();\n this.hasOverswiped = true;\n \n if (side === 'left') {\n this.leftSwiped.emit();\n return;\n }\n this.rightSwiped.emit();\n }\n}\n","import { computed, Directive } from '@angular/core';\nimport { up } from '@unipin/angular-applet/common';\nimport { buttonVariants, UpButtonDirective, } from '@unipin/angular-applet/buttons';\n\n\n@Directive({\n exportAs: 'upSwipeableBtn',\n selector: '[upSwipeableBtn]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class UpSwipeableButtonDirective extends UpButtonDirective {\n \n protected override readonly _computedClass = computed(\n () => {\n return up(\n buttonVariants(\n {\n size: this.size(),\n variant: this.variant(),\n }\n ),\n this.inlineClass(),\n 'h-full rounded-none flex-1',\n );\n }\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAYa,2BAA2B,CAAA;AAPxC,IAAA,WAAA,GAAA;QASkB,IAAA,CAAA,OAAO,GAAG,MAAM,EAAC,UAAuB,EAAC,CAAC,aAAa;QACvD,IAAA,CAAA,WAAW,GAAG,KAAK,CAAa,EAAE,mFAAI,KAAK,EAAE,OAAO,EAAA,CAAG;AAEpD,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAC1C,MAAK;AACH,YAAA,OAAO,EAAE,CACP;;;;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B,4BAA4B,CAC7B;AACH,QAAA,CAAC,qFACF;AACF,IAAA;+GAhBY,0BAA0B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAPtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACF,iBAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"unipin-angular-applet-swipeable.mjs","sources":["../../../projects/unipin-angular/swipeable/directives/swipeable-content.directive.ts","../../../projects/unipin-angular/swipeable/directives/swipeable-buttons.directive.ts","../../../projects/unipin-angular/swipeable/directives/swipeable.directive.ts","../../../projects/unipin-angular/swipeable/directives/swipeable-button.directive.ts","../../../projects/unipin-angular/swipeable/unipin-angular-applet-swipeable.ts"],"sourcesContent":["import { computed, Directive, ElementRef, inject, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n\n@Directive({\n exportAs: 'upSwipeableContent',\n selector: '[upSwipeableContent]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpSwipeableContentDirective {\n \n public readonly element = inject(ElementRef<HTMLElement>).nativeElement;\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n `\n relative flex flex-shrink-0 items-center justify-start\n bg-white z-10\n transition-transform duration-200 ease-out\n will-change-transform\n select-none\n w-fit h-fit\n `,\n this.inlineClass()\n );\n }\n );\n\n public translateX(x: number): void{\n this.element.style.transform = `translateX(${ x }px)`;\n }\n}\n","import { computed, Directive, ElementRef, inject, input } from '@angular/core';\nimport { up } from '@unipin/angular-applet/common';\n\n\n@Directive({\n exportAs: 'upSwipeableButtons',\n selector: '[upSwipeableButtons]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpSwipeableButtonsDirective {\n \n public readonly side = input.required<'left' | 'right'>();\n public readonly element = inject(ElementRef<HTMLElement>).nativeElement;\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n 'absolute top-px bottom-px h-auto w-2/5 flex items-stretch z-0',\n this.side() === 'left'? 'left-px flex-row' : 'right-px flex-row-reverse'\n );\n }\n );\n}\n","import { Directive, HostListener, input, output, signal, computed, contentChild, contentChildren, effect } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpSwipeableContentDirective } from './swipeable-content.directive';\nimport { UpSwipeableButtonsDirective } from './swipeable-buttons.directive';\n\n\n@Directive({\n exportAs: 'upSwipeable',\n selector: '[upSwipeable]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpSwipeableDirective {\n\n public readonly threshold = input<number>(20);\n public readonly overSwipeThreshold = input<number | null>(75);\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n public readonly clicked = output<void>();\n public readonly leftSwiped = output<void>();\n public readonly rightSwiped = output<void>();\n\n public readonly content = contentChild(UpSwipeableContentDirective);\n public readonly buttonContainers = contentChildren(UpSwipeableButtonsDirective);\n \n protected readonly containerWidth = signal(0);\n protected readonly buttonWidth = signal({ left: 0, right: 0 });\n protected readonly openSide = signal<'left' | 'right' | null>(null);\n \n protected readonly _computedClass = computed(\n () => {\n return up(\n 'relative w-fit overflow-hidden rounded-md touch-pan-y isolate',\n this.inlineClass()\n );\n }\n );\n\n protected startX = 0;\n protected currentX = 0;\n protected isTouch = false;\n protected isDragging = false;\n protected hasOverswiped = false;\n \n constructor() {\n effect(\n () => {\n const content = this.content()?.element;\n \n if (!content) {\n return;\n }\n requestAnimationFrame(() => this.containerWidth.set(content.scrollWidth));\n }\n );\n \n effect(\n () => {\n const leftContainer = this.buttonContainers().find(c => c.side() === 'left');\n const rightContainer = this.buttonContainers().find(c => c.side() === 'right');\n\n requestAnimationFrame(\n () => {\n this.buttonWidth.set(\n {\n left: leftContainer?.element.offsetWidth ?? 0,\n right: rightContainer?.element.offsetWidth ?? 0,\n }\n );\n }\n );\n }\n );\n }\n\n @HostListener('mousedown', ['$event'])\n public onMouseDown(event: MouseEvent) {\n this.isTouch = false;\n this.startDrag(event.clientX); \n }\n\n @HostListener('document:mousemove', ['$event'])\n public onMouseMove(event: MouseEvent) {\n if (\n this.isDragging && \n !this.isTouch\n ) {\n this.handleDrag(event.clientX);\n }\n }\n\n @HostListener('document:mouseup', ['$event'])\n public onMouseUp(event: MouseEvent) {\n if (\n this.isDragging && \n !this.isTouch\n ) {\n this.dragEnd(event)\n };\n }\n\n @HostListener('touchstart', ['$event'])\n public onTouchStart(event: TouchEvent) {\n this.isTouch = true;\n this.startDrag(event.touches[0].clientX);\n }\n\n @HostListener('touchmove', ['$event'])\n public onTouchMove(event: TouchEvent) {\n if (this.isDragging) {\n this.handleDrag(event.touches[0].clientX);\n }\n }\n\n @HostListener('touchend', ['$event'])\n public onTouchEnd(event: TouchEvent): void{\n if (!this.openSide()) {\n event.preventDefault();\n }\n this.dragEnd(event);\n }\n\n protected startDrag(x: number) {\n this.startX = x;\n this.currentX = x;\n this.isDragging = true;\n this.hasOverswiped = false;\n }\n\n protected handleDrag(x: number) {\n if (this.hasOverswiped) return;\n\n this.currentX = x;\n const delta = this.currentX - this.startX;\n const overSwipeThreshold = this.overSwipeThreshold();\n\n if (overSwipeThreshold !== null) {\n const container = this.containerWidth();\n const overswipeDistance = (overSwipeThreshold / 100) * container;\n \n if (delta > overswipeDistance) {\n return this.triggerOverswipe('right');\n }\n \n if (delta < -overswipeDistance) {\n return this.triggerOverswipe('left');\n }\n }\n this.content()?.translateX(delta);\n }\n \n protected dragEnd(event?: MouseEvent | TouchEvent): void{\n if (!this.isDragging) {\n return;\n }\n this.isDragging = false;\n\n if (this.hasOverswiped) {\n this.closeContent();\n return;\n }\n\n const delta = this.currentX - this.startX;\n const { left, right } = this.buttonWidth();\n const container = this.containerWidth();\n const openDistance = (this.threshold() / 100) * container;\n\n const target = event?.target;\n if (\n target instanceof HTMLElement && \n target.closest('[upSwipeableBtn]')\n ) {\n return;\n }\n\n if (\n this.openSide() === null && \n Math.abs(delta) < 5\n ) {\n this.clicked.emit();\n this.closeContent();\n return;\n }\n\n if (delta > openDistance && left > 0) {\n return this.openContent('left');\n }\n \n if (delta < -openDistance && right > 0) {\n return this.openContent('right');\n }\n this.closeContent();\n }\n\n protected openContent(side: 'left' | 'right'): void{\n const { left, right } = this.buttonWidth();\n const offset = side === 'left'? left : -right;\n \n this.content()?.translateX(offset);\n this.openSide.set(side);\n }\n\n protected closeContent(): void{\n this.content()?.translateX(0);\n this.openSide.set(null);\n }\n\n protected triggerOverswipe(side: 'left' | 'right'): void{\n this.closeContent();\n this.hasOverswiped = true;\n \n if (side === 'left') {\n this.leftSwiped.emit();\n return;\n }\n this.rightSwiped.emit();\n }\n}\n","import { computed, Directive } from '@angular/core';\nimport { up } from '@unipin/angular-applet/common';\nimport { buttonVariants, UpButtonDirective, } from '@unipin/angular-applet/buttons';\n\n\n@Directive({\n exportAs: 'upSwipeableBtn',\n selector: '[upSwipeableBtn]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class UpSwipeableButtonDirective extends UpButtonDirective {\n \n protected override readonly _computedClass = computed(\n () => {\n return up(\n buttonVariants(\n {\n size: this.size(),\n variant: this.variant(),\n }\n ),\n this.inlineClass(),\n 'h-full rounded-none flex-1',\n );\n }\n );\n}\n","/**\n *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QAAQ,CAAC;;sBAOpC,YAAY;uBAAC,UAAU,EAAE,CAAC,QAAQ,CAAC;;;ACxGhC,MAAO,0BAA2B,SAAQ,iBAAiB,CAAA;AAPjE,IAAA,WAAA,GAAA;;AAS8B,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CACnD,MAAK;YACH,OAAO,EAAE,CACP,cAAc,CACZ;AACE,gBAAA,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;AACjB,gBAAA,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;aACxB,CACF,EACD,IAAI,CAAC,WAAW,EAAE,EAClB,4BAA4B,CAC7B;AACH,QAAA,CAAC,qFACF;AACF,IAAA;+GAhBY,0BAA0B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAPtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACF,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -46,8 +46,8 @@ class UpTabsComponent {
46
46
  setActive(tab) {
47
47
  this.activeTab.set(tab);
48
48
  }
49
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
50
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.10", type: UpTabsComponent, isStandalone: true, selector: "up-tabs", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inlineStyle: { classPropertyName: "inlineStyle", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, defaultActiveTab: { classPropertyName: "defaultActiveTab", publicName: "default", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
49
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
50
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.18", type: UpTabsComponent, isStandalone: true, selector: "up-tabs", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inlineStyle: { classPropertyName: "inlineStyle", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, defaultActiveTab: { classPropertyName: "defaultActiveTab", publicName: "default", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
51
51
  <div [class]="tabsClass()">
52
52
  <ng-content select="[upTabsTrigger]" />
53
53
  </div>
@@ -55,7 +55,7 @@ class UpTabsComponent {
55
55
  <ng-content select="[upTabsContent]" />
56
56
  `, isInline: true }); }
57
57
  }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpTabsComponent, decorators: [{
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpTabsComponent, decorators: [{
59
59
  type: Component,
60
60
  args: [{
61
61
  selector: 'up-tabs',
@@ -85,10 +85,10 @@ class UpTabsContentDirective {
85
85
  this.isActive.set(this.parent.activeTab() === this.value());
86
86
  });
87
87
  }
88
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpTabsContentDirective, deps: [{ token: UpTabsComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
89
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.10", type: UpTabsContentDirective, isStandalone: true, selector: "[upTabsContent]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, inlineStyle: { classPropertyName: "inlineStyle", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "hidden": "!isActive()", "class": "tabsContentClass()" } }, exportAs: ["upTabsContent"], ngImport: i0 }); }
88
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpTabsContentDirective, deps: [{ token: UpTabsComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
89
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.18", type: UpTabsContentDirective, isStandalone: true, selector: "[upTabsContent]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, inlineStyle: { classPropertyName: "inlineStyle", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "hidden": "!isActive()", "class": "tabsContentClass()" } }, exportAs: ["upTabsContent"], ngImport: i0 }); }
90
90
  }
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpTabsContentDirective, decorators: [{
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpTabsContentDirective, decorators: [{
92
92
  type: Directive,
93
93
  args: [{
94
94
  exportAs: 'upTabsContent',
@@ -115,10 +115,10 @@ class UpTabsTriggerDirective {
115
115
  activate() {
116
116
  this.parent?.setActive(this.value());
117
117
  }
118
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpTabsTriggerDirective, deps: [{ token: UpTabsComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
119
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.10", type: UpTabsTriggerDirective, isStandalone: true, selector: "[upTabsTrigger]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "activate()" }, properties: { "class": "tabsTriggerClass()", "attr.data-state": "isActive()? 'active' : 'inactive'" } }, exportAs: ["upTabsTrigger"], ngImport: i0 }); }
118
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpTabsTriggerDirective, deps: [{ token: UpTabsComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
119
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.18", type: UpTabsTriggerDirective, isStandalone: true, selector: "[upTabsTrigger]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "activate()" }, properties: { "class": "tabsTriggerClass()", "attr.data-state": "isActive()? 'active' : 'inactive'" } }, exportAs: ["upTabsTrigger"], ngImport: i0 }); }
120
120
  }
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpTabsTriggerDirective, decorators: [{
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpTabsTriggerDirective, decorators: [{
122
122
  type: Directive,
123
123
  args: [{
124
124
  exportAs: 'upTabsTrigger',
@@ -65,8 +65,8 @@ class UpTooltipDirective {
65
65
  if (!this._tooltipElement) {
66
66
  return;
67
67
  }
68
- const hostRect = this.el.nativeElement.getBoundingClientRect();
69
68
  const tooltipEl = this._tooltipElement;
69
+ const hostRect = this.el.nativeElement.getBoundingClientRect();
70
70
  const tooltipRect = tooltipEl.getBoundingClientRect();
71
71
  const gap = 8;
72
72
  let top = 0;
@@ -95,10 +95,10 @@ class UpTooltipDirective {
95
95
  this.renderer.setStyle(tooltipEl, 'top', `${Math.round(top)}px`);
96
96
  this.renderer.setStyle(tooltipEl, 'left', `${Math.round(left)}px`);
97
97
  }
98
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpTooltipDirective, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
99
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.10", type: UpTooltipDirective, isStandalone: true, selector: "[upTooltip]", inputs: { toolTipText: { classPropertyName: "toolTipText", publicName: "toolTipText", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["upTooltip"], ngImport: i0 }); }
98
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpTooltipDirective, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
99
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.18", type: UpTooltipDirective, isStandalone: true, selector: "[upTooltip]", inputs: { toolTipText: { classPropertyName: "toolTipText", publicName: "toolTipText", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["upTooltip"], ngImport: i0 }); }
100
100
  }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UpTooltipDirective, decorators: [{
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: UpTooltipDirective, decorators: [{
102
102
  type: Directive,
103
103
  args: [{
104
104
  exportAs: 'upTooltip',