@unipin/angular-applet 21.1.0 → 21.1.3

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 (64) hide show
  1. package/README.md +334 -37
  2. package/fesm2022/unipin-angular-applet-accordion.mjs +23 -23
  3. package/fesm2022/unipin-angular-applet-accordion.mjs.map +1 -1
  4. package/fesm2022/unipin-angular-applet-alert-dialog.mjs +93 -79
  5. package/fesm2022/unipin-angular-applet-alert-dialog.mjs.map +1 -1
  6. package/fesm2022/unipin-angular-applet-alert.mjs +13 -13
  7. package/fesm2022/unipin-angular-applet-alert.mjs.map +1 -1
  8. package/fesm2022/unipin-angular-applet-approval.mjs +129 -0
  9. package/fesm2022/unipin-angular-applet-approval.mjs.map +1 -0
  10. package/fesm2022/unipin-angular-applet-auth.mjs +44 -25
  11. package/fesm2022/unipin-angular-applet-auth.mjs.map +1 -1
  12. package/fesm2022/unipin-angular-applet-avatar.mjs +4 -4
  13. package/fesm2022/unipin-angular-applet-avatar.mjs.map +1 -1
  14. package/fesm2022/unipin-angular-applet-badge.mjs +5 -5
  15. package/fesm2022/unipin-angular-applet-badge.mjs.map +1 -1
  16. package/fesm2022/unipin-angular-applet-buttons.mjs +10 -10
  17. package/fesm2022/unipin-angular-applet-buttons.mjs.map +1 -1
  18. package/fesm2022/unipin-angular-applet-calendar.mjs +25 -25
  19. package/fesm2022/unipin-angular-applet-calendar.mjs.map +1 -1
  20. package/fesm2022/unipin-angular-applet-collapsible.mjs +14 -14
  21. package/fesm2022/unipin-angular-applet-collapsible.mjs.map +1 -1
  22. package/fesm2022/unipin-angular-applet-common.mjs +60 -23
  23. package/fesm2022/unipin-angular-applet-common.mjs.map +1 -1
  24. package/fesm2022/unipin-angular-applet-containers.mjs +20 -20
  25. package/fesm2022/unipin-angular-applet-containers.mjs.map +1 -1
  26. package/fesm2022/unipin-angular-applet-dialog.mjs +74 -56
  27. package/fesm2022/unipin-angular-applet-dialog.mjs.map +1 -1
  28. package/fesm2022/unipin-angular-applet-forms.mjs +571 -256
  29. package/fesm2022/unipin-angular-applet-forms.mjs.map +1 -1
  30. package/fesm2022/unipin-angular-applet-froala.mjs +8 -8
  31. package/fesm2022/unipin-angular-applet-froala.mjs.map +1 -1
  32. package/fesm2022/unipin-angular-applet-infinite-scroll.mjs +5 -5
  33. package/fesm2022/unipin-angular-applet-infinite-scroll.mjs.map +1 -1
  34. package/fesm2022/unipin-angular-applet-json-viewer.mjs +7 -7
  35. package/fesm2022/unipin-angular-applet-json-viewer.mjs.map +1 -1
  36. package/fesm2022/unipin-angular-applet-kbd.mjs +4 -4
  37. package/fesm2022/unipin-angular-applet-kbd.mjs.map +1 -1
  38. package/fesm2022/unipin-angular-applet-loading-dialog.mjs +8 -8
  39. package/fesm2022/unipin-angular-applet-loading-dialog.mjs.map +1 -1
  40. package/fesm2022/unipin-angular-applet-markdown.mjs +17 -17
  41. package/fesm2022/unipin-angular-applet-markdown.mjs.map +1 -1
  42. package/fesm2022/unipin-angular-applet-popover.mjs +18 -18
  43. package/fesm2022/unipin-angular-applet-popover.mjs.map +1 -1
  44. package/fesm2022/unipin-angular-applet-progress-bar.mjs +7 -7
  45. package/fesm2022/unipin-angular-applet-progress-bar.mjs.map +1 -1
  46. package/fesm2022/unipin-angular-applet-skeleton.mjs +4 -4
  47. package/fesm2022/unipin-angular-applet-skeleton.mjs.map +1 -1
  48. package/fesm2022/unipin-angular-applet-spinner.mjs +5 -5
  49. package/fesm2022/unipin-angular-applet-spinner.mjs.map +1 -1
  50. package/fesm2022/unipin-angular-applet-stepper.mjs +288 -0
  51. package/fesm2022/unipin-angular-applet-stepper.mjs.map +1 -0
  52. package/fesm2022/unipin-angular-applet-swipeable.mjs +24 -24
  53. package/fesm2022/unipin-angular-applet-swipeable.mjs.map +1 -1
  54. package/fesm2022/unipin-angular-applet-tabs.mjs +19 -19
  55. package/fesm2022/unipin-angular-applet-tabs.mjs.map +1 -1
  56. package/fesm2022/unipin-angular-applet-tooltip.mjs +5 -5
  57. package/fesm2022/unipin-angular-applet-tooltip.mjs.map +1 -1
  58. package/package.json +9 -1
  59. package/types/unipin-angular-applet-alert-dialog.d.ts +12 -1
  60. package/types/unipin-angular-applet-approval.d.ts +55 -0
  61. package/types/unipin-angular-applet-common.d.ts +12 -2
  62. package/types/unipin-angular-applet-dialog.d.ts +6 -4
  63. package/types/unipin-angular-applet-forms.d.ts +118 -39
  64. package/types/unipin-angular-applet-stepper.d.ts +43 -0
package/README.md CHANGED
@@ -1,63 +1,360 @@
1
- # UnipinAngular
1
+ # UniPin Angular Applet [![npm version](https://badge.fury.io/js/@unipin%2Fangular-applet.svg)](https://badge.fury.io/js/@unipin%2Fangular-applet.svg)
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.1.0.
3
+ UniPin Angular Applet is an internal tool used by UniPin to build consistent and high-quality applets using the Angular framework. UniPin Angular Applet provides a set of reusable components, directives, and services that adhere to UniPin's design system.
4
4
 
5
- ## Code scaffolding
5
+ UniPin Angular Applet is:
6
6
 
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
7
+ 1. **Modular**, so you can import only what you need.
8
+ 2. **Configurable**, allowing you to define applet metadata and structure easily.
9
+ 3. **Integrated**, working seamlessly with other UniPin libraries like `@unipin/angular-gql`.
10
+ 4. **Multi Entry Points**, supporting granular imports for better optimization.
11
+ 5. **Tree Shakeable**, removing unused code to minimize bundle size.
8
12
 
9
- ```bash
10
- ng generate component component-name
11
- ```
13
+ ---
14
+
15
+ ## Versions
16
+ | Angular | @unipin/angular-applet |
17
+ |------------------|:----------------------:|
18
+ | >=18.0.0 | v21.x.x |
19
+
20
+ ---
12
21
 
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
22
+ Table of contents
23
+ =================
24
+ * [Getting started](#getting-started)
25
+ * [API](#api)
26
+ * [Development](#development)
27
+ * [Release](#release)
14
28
 
15
- ```bash
16
- ng generate --help
29
+ ## Getting started
30
+ ### Step 1: Install `@unipin/angular-applet`:
31
+
32
+ #### NPM
33
+ ```shell
34
+ npm install --save @unipin/angular-applet
17
35
  ```
18
36
 
19
- ## Building
37
+ ### Step 2: Provide UniPin Applet configuration (Only if using the applet container) usually in the applet projects
38
+ #### Standalone: Call `provideAppletConfig` function inside `ApplicationConfig` providers array:
39
+ ```typescript
40
+ import { provideAppletConfig } from '@unipin/angular-applet/containers';
41
+
42
+ export const appConfig: ApplicationConfig = {
43
+ providers: [
44
+ provideAppletConfig({
45
+ icon: 'icon-name',
46
+ name: 'Applet Name',
47
+ version: '1.0.0',
48
+ containers: [
49
+ {
50
+ icon: 'container-icon',
51
+ label: 'Container Label',
52
+ path: '/container-path'
53
+ }
54
+ ]
55
+ }),
56
+ ]
57
+ };
58
+ ```
20
59
 
21
- To build the library, run:
60
+ ### Step 3: Use components
61
+ ```typescript
62
+ import { UpButtonDirective } from '@unipin/angular-applet/buttons';
22
63
 
23
- ```bash
24
- ng build unipin-angular
64
+ @Component({
65
+ standalone: true,
66
+ imports: [UpButtonDirective],
67
+ template: `<button upButton>Click me</button>`
68
+ })
69
+ export class MyComponent {}
25
70
  ```
26
71
 
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
72
+ ### Step 4: Style Configuration
28
73
 
29
- ### Publishing the Library
74
+ Add this configuration to your `styles.css`:
30
75
 
31
- Once the project is built, you can publish your library by following these steps:
76
+ ```css
77
+ @import 'tw-animate-css';
78
+ @source './../../node_modules/@unipin/angular-applet/';
79
+ @custom-variant dark (&:is(.dark *));
32
80
 
33
- 1. Navigate to the `dist` directory:
34
- ```bash
35
- cd dist/unipin-angular
36
- ```
81
+ @theme inline {
82
+ --radius-sm: calc(var(--radius) - 4px);
83
+ --radius-md: calc(var(--radius) - 2px);
84
+ --radius-lg: var(--radius);
85
+ --radius-xl: calc(var(--radius) + 4px);
86
+ --color-background: var(--background);
87
+ --color-foreground: var(--foreground);
88
+ --color-primary: var(--primary);
89
+ --color-primary-foreground: var(--primary-foreground);
90
+ --color-secondary: var(--secondary);
91
+ --color-secondary-foreground: var(--secondary-foreground);
92
+ --color-muted: var(--muted);
93
+ --color-muted-foreground: var(--muted-foreground);
94
+ --color-accent: var(--accent);
95
+ --color-accent-foreground: var(--accent-foreground);
96
+ --color-destructive: var(--destructive);
97
+ --color-border: var(--border);
98
+ --color-input: var(--input);
99
+ --color-ring: var(--ring);
100
+ --color-popover: var(--popover);
101
+ --color-popover-foreground: var(--popover-foreground);
102
+ }
37
103
 
38
- 2. Run the `npm publish` command to publish your library to the npm registry:
39
- ```bash
40
- npm publish
41
- ```
104
+ :root {
105
+ --radius: 0.625rem;
106
+ --background: oklch(0.9911 0 0);
107
+ --foreground: oklch(0.3791 0 0);
42
108
 
43
- ## Running unit tests
109
+ --primary: oklch(0.6769 0.1781 44.42);
110
+ --primary-foreground: oklch(1 0 0);
111
+ --secondary: oklch(0.9714 0.0136 46.23);
112
+ --secondary-foreground: oklch(0.6769 0.1781 44.42);
113
+ --muted: oklch(0.9702 0 0);
114
+ --muted-foreground: oklch(0.4926 0 0);
115
+ --accent: oklch(0.9714 0.0136 46.23);
116
+ --accent-foreground: oklch(0.6769 0.1781 44.42);
117
+ --destructive: oklch(0.6533 0.2305 28.81);
44
118
 
45
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
119
+ --ring: oklch(0.6769 0.1781 44.42);
120
+ --border: oklch(0.922 0 0);
121
+ --input: oklch(0.922 0 0);
46
122
 
47
- ```bash
48
- ng test
49
- ```
123
+ --popover: oklch(1 0 0);
124
+ --popover-foreground: oklch(0.145 0 0);
125
+ }
126
+
127
+ .dark {
128
+ --background: oklch(0.145 0 0);
129
+ --foreground: oklch(0.985 0 0);
50
130
 
51
- ## Running end-to-end tests
131
+ --primary: oklch(0.6769 0.1781 44.42);
132
+ --primary-foreground: oklch(1 0 0);
133
+ --secondary: oklch(0.9714 0.0136 46.23);
134
+ --secondary-foreground: oklch(0.6769 0.1781 44.42);
135
+ --muted: oklch(0.269 0 0);
136
+ --muted-foreground: oklch(0.708 0 0);
137
+ --accent: oklch(0.9714 0.0136 46.23);
138
+ --accent-foreground: oklch(0.6769 0.1781 44.42);
139
+ --destructive: oklch(0.704 0.191 22.216);
52
140
 
53
- For end-to-end (e2e) testing, run:
141
+ --ring: oklch(0.6769 0.1781 44.42);
142
+ --border: oklch(1 0 0 / 10%);
143
+ --input: oklch(1 0 0 / 15%);
54
144
 
55
- ```bash
56
- ng e2e
145
+ --popover: oklch(0.269 0 0);
146
+ --popover-foreground: oklch(0.985 0 0);
147
+ }
57
148
  ```
58
149
 
59
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
150
+ **What this configuration does:**
151
+ - Enables component animations
152
+ - Configures light/dark mode themes
153
+ - Sets up color design tokens
154
+ - Defines border radius system
155
+
156
+ ## API
157
+
158
+ ### Applet Configuration
159
+ | Input | Type | Default | Required | Description | Example |
160
+ | :------------- | :------------ | :------ | :------- | :-------------------------- | :-------------------------------------------------------------------------------- |
161
+ | icon | `string` | `-` | `true` | Applet icon name | `icon-name` |
162
+ | name | `string` | `-` | `true` | Applet name | `Applet Name` |
163
+ | version | `string` | `-` | `true` | Applet version | `1.0.0` |
164
+ | containers | `Container[]` | `-` | `true` | List of containers (routes) | `[{ icon: 'container-icon', label: 'Container Label', path: '/container-path' }]` |
165
+ | enabledSetting | `boolean` | `false` | `false` | Enable settings menu | `true` |
166
+
167
+ ### Container Interface
168
+ | Property | Type | Required | Description |
169
+ | :---------- | :------- | :------- | :------------------------------------------------------------------------- |
170
+ | icon | `string` | `true` | Container icon |
171
+ | label | `string` | `true` | Container label (displayed in sidebar) |
172
+ | path | `string` | `true` | Route path (must start with `/`) |
173
+ | permissions | `object` | `false` | Permission configuration `{ codes: string[], aggregator?: 'AND' \| 'OR' }` |
174
+
175
+ ### Available Modules
176
+ The library is organized into secondary entry points. Import them as `@unipin/angular-applet/<module>`.
177
+
178
+ #### Accordion (`@unipin/angular-applet/accordion`)
179
+ | Component / Directive | Description |
180
+ | :---------------------------- | :----------------------------------------------- |
181
+ | `UpAccordionDirective` | Directive to create an accordion container. |
182
+ | `UpAccordionItemDirective` | Directive for an individual accordion item. |
183
+ | `UpAccordionTriggerDirective` | Directive for the accordion item trigger/header. |
184
+ | `UpAccordionContentDirective` | Directive for the accordion item content. |
185
+
186
+ #### Alert (`@unipin/angular-applet/alert`)
187
+ | Component / Directive | Description |
188
+ | :---------------------------- | :------------------------------------- |
189
+ | `UpAlertDirective` | Directive to display an alert message. |
190
+ | `UpAlertTitleDirective` | Directive for the alert title. |
191
+ | `UpAlertDescriptionDirective` | Directive for the alert description. |
192
+
193
+ #### Alert Dialog (`@unipin/angular-applet/alert-dialog`)
194
+ | Component / Directive | Description |
195
+ | :----------------------- | :-------------------------------------------- |
196
+ | `UpAlertDialogComponent` | Component to display an alert dialog (modal). |
197
+
198
+ #### Approval (`@unipin/angular-applet/approval`)
199
+ | Component / Directive | Description |
200
+ | :------------------------ | :-------------------------------- |
201
+ | `UpApprovalFormComponent` | Component for approval workflows. |
202
+
203
+ #### Auth (`@unipin/angular-applet/auth`)
204
+ | Component / Directive | Description |
205
+ | :---------------------- | :-------------------------------------------------------------------------------- |
206
+ | `UpPermissionDirective` | Structural directive that conditionally renders content based on user permissions.|
207
+
208
+ #### Avatar (`@unipin/angular-applet/avatar`)
209
+ | Component / Directive | Description |
210
+ | :-------------------- | :--------------------------------- |
211
+ | `UpAvatarDirective` | Directive to display user avatars. |
212
+
213
+ #### Badge (`@unipin/angular-applet/badge`)
214
+ | Component / Directive | Description |
215
+ | :-------------------- | :----------------------------------- |
216
+ | `UpBadgeDirective` | Directive to display badges or tags. |
217
+
218
+ #### Buttons (`@unipin/angular-applet/buttons`)
219
+ | Component / Directive | Description |
220
+ | :----------------------- | :----------------------------------------------------------------- |
221
+ | `UpButtonDirective` | Directive to style standard buttons. |
222
+ | `UpSplitButtonComponent` | Component for a split button with a primary action and a dropdown. |
223
+
224
+ #### Calendar (`@unipin/angular-applet/calendar`)
225
+ | Component / Directive | Description |
226
+ | :-------------------- | :------------------------------- |
227
+ | `UpCalendarComponent` | Component to display a calendar. |
228
+
229
+ #### Collapsible (`@unipin/angular-applet/collapsible`)
230
+ | Component / Directive | Description |
231
+ | :------------------------------ | :------------------------------------------------------- |
232
+ | `UpCollapsibleDirective` | Directive for collapsible content areas. |
233
+ | `UpCollapsibleTriggerDirective` | Directive for the trigger to toggle collapsible content. |
234
+ | `UpCollapsibleContentDirective` | Directive for the content to be collapsed/expanded. |
60
235
 
61
- ## Additional Resources
236
+ #### Common (`@unipin/angular-applet/common`)
237
+ | Component / Directive | Description |
238
+ | :----------------------- | :----------------------------------------------- |
239
+ | `UpFileDragNDropDirective` | Directive to handle file drag and drop events. |
240
+
241
+ #### Containers (`@unipin/angular-applet/containers`)
242
+ | Component / Directive | Description |
243
+ | :---------------------------- | :-------------------------------------------------------------- |
244
+ | `UpAppletContainerComponent` | Main container component for the applet layout. |
245
+ | `UpColumnContainerComponent` | Container component for column-based layouts. |
246
+ | `UpContentContainerComponent` | Container component for main content areas. |
247
+ | `UpLazyRouteDirective` | Directive to lazy load components based on route configuration. |
248
+
249
+ #### Dialog (`@unipin/angular-applet/dialog`)
250
+ | Component / Directive | Description |
251
+ | :------------------------- | :------------------------------------- |
252
+ | `UpDialogWrapperComponent` | Wrapper component for dialogs. |
253
+ | `UpDialogTriggerDirective` | Directive to trigger a dialog opening. |
254
+ | `UpDialogContentDirective` | Directive for the dialog content. |
255
+ | `UpDialogCloseDirective` | Directive to close the dialog. |
256
+
257
+ #### Forms (`@unipin/angular-applet/forms`)
258
+ | Component / Directive | Description |
259
+ | :------------------------------- | :--------------------------------------------------------------- |
260
+ | `UpCheckboxDirective` | Directive for checkbox inputs. |
261
+ | `UpCountrySelectComponent` | Component to select a country. |
262
+ | `UpCurrencySelectComponent` | Component to select a currency. |
263
+ | `UpDateRangePickerComponent` | Component to pick a date range. |
264
+ | `UpDatepickerComponent` | Component to pick a single date. |
265
+ | `UpFormFieldComponent` | Wrapper component for form fields with labels and error messages.|
266
+ | `UpImagePickerComponent` | Component to pick/upload an image. |
267
+ | `UpInputDirective` | Directive for standard text inputs. |
268
+ | `UpNumberDirective` | Directive for numeric inputs. |
269
+ | `UpPasswordComponent` | Component for password inputs with visibility toggle. |
270
+ | `UpRateGroupCodeSelectComponent` | Component to select rate group codes. |
271
+ | `UpSearchableSelectComponent` | Select component with search functionality. |
272
+ | `UpSelectComponent` | Standard select dropdown component. |
273
+ | `UpSwitchComponent` | Toggle switch component. |
274
+
275
+ #### Froala (`@unipin/angular-applet/froala`)
276
+ | Component / Directive | Description |
277
+ | :-------------------- | :----------------------------------------------- |
278
+ | `UpFroalaComponent` | Wrapper component for the Froala WYSIWYG editor. |
279
+
280
+ #### Infinite Scroll (`@unipin/angular-applet/infinite-scroll`)
281
+ | Component / Directive | Description |
282
+ | :-------------------------- | :------------------------------------------------------------------------ |
283
+ | `UpInfiniteScrollDirective` | Directive to trigger events when scrolling near the bottom of a container.|
284
+
285
+ #### JSON Viewer (`@unipin/angular-applet/json-viewer`)
286
+ | Component / Directive | Description |
287
+ | :---------------------- | :-------------------------------------------------- |
288
+ | `UpJsonViewerComponent` | Component to display JSON data in a readable format. |
289
+
290
+ #### KBD (`@unipin/angular-applet/kbd`)
291
+ | Component / Directive | Description |
292
+ | :-------------------- | :------------------------------------------------------ |
293
+ | `UpKbdDirective` | Directive to style keyboard shortcuts (e.g., Ctrl + C). |
294
+
295
+ #### Loading Dialog (`@unipin/angular-applet/loading-dialog`)
296
+ | Component / Directive | Description |
297
+ | :------------------------- | :---------------------------------------------------- |
298
+ | `UpLoadingDialogComponent` | Component to display a loading indicator in a dialog. |
299
+
300
+ #### Markdown (`@unipin/angular-applet/markdown`)
301
+ | Component / Directive | Description |
302
+ | :------------------------- | :------------------------------------ |
303
+ | `UpMarkdownInputComponent` | Component for markdown input/editing. |
304
+ | `UpMarkdownDirective` | Directive to render markdown content. |
305
+
306
+ #### Popover (`@unipin/angular-applet/popover`)
307
+ | Component / Directive | Description |
308
+ | :-------------------------- | :--------------------------------- |
309
+ | `UpPopoverComponent` | Component to display a popover. |
310
+ | `UpPopoverTriggerDirective` | Directive to trigger a popover. |
311
+ | `UpPopoverContentDirective` | Directive for the popover content. |
312
+ | `UpPopoverCloseDirective` | Directive to close the popover. |
313
+
314
+ #### Progress Bar (`@unipin/angular-applet/progress-bar`)
315
+ | Component / Directive | Description |
316
+ | :----------------------- | :----------------------------------- |
317
+ | `UpProgressBarDirective` | Directive to display a progress bar. |
318
+
319
+ #### Skeleton (`@unipin/angular-applet/skeleton`)
320
+ | Component / Directive | Description |
321
+ | :-------------------- | :-------------------------------------------- |
322
+ | `UpSkeletonDirective` | Directive to display loading skeleton states. |
323
+
324
+ #### Spinner (`@unipin/angular-applet/spinner`)
325
+ | Component / Directive | Description |
326
+ | :-------------------- | :-------------------------------------- |
327
+ | `UpSpinnerComponent` | Component to display a loading spinner. |
328
+
329
+ #### Swipeable (`@unipin/angular-applet/swipeable`)
330
+ | Component / Directive | Description |
331
+ | :---------------------------- | :------------------------------------------------ |
332
+ | `UpSwipeableDirective` | Directive to make an element swipeable. |
333
+ | `UpSwipeableButtonDirective` | Directive for buttons within a swipeable element. |
334
+ | `UpSwipeableButtonsDirective` | Container directive for swipeable buttons. |
335
+ | `UpSwipeableContentDirective` | Directive for the content of a swipeable element. |
336
+
337
+ #### Tabs (`@unipin/angular-applet/tabs`)
338
+ | Component / Directive | Description |
339
+ | :----------------------- | :---------------------------------- |
340
+ | `UpTabsComponent` | Component to display tabs. |
341
+ | `UpTabsTriggerDirective` | Directive for a tab trigger/header. |
342
+ | `UpTabsContentDirective` | Directive for the content of a tab. |
343
+
344
+ #### Tooltip (`@unipin/angular-applet/tooltip`)
345
+ | Component / Directive | Description |
346
+ | :-------------------- | :--------------------------------------- |
347
+ | `UpTooltipDirective` | Directive to display a tooltip on hover. |
348
+
349
+ ## Development
350
+ Perform the _clone-to-launch_ steps with these terminal commands.
351
+
352
+ ### Run storybook
353
+ ```
354
+ git clone git@github.com:MobileArts/unipin-applet-lib.git
355
+ cd unipin-applet-lib
356
+ npm run storybook
357
+ ```
62
358
 
63
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
359
+ ## Release
360
+ To release to npm just run `npm run publish`, of course if you have permissions ;)
@@ -4,18 +4,18 @@ import { up } from '@unipin/angular-applet/common';
4
4
 
5
5
  class UpAccordionDirective {
6
6
  constructor() {
7
- this.dir = input('ltr', { ...(ngDevMode ? { debugName: "dir" } : {}) });
8
- this.orientation = input('vertical', { ...(ngDevMode ? { debugName: "orientation" } : {}) });
7
+ this.dir = input('ltr', ...(ngDevMode ? [{ debugName: "dir" }] : []));
8
+ this.orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
9
9
  this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
10
10
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
11
11
  this.collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : {}), transform: booleanAttribute });
12
- this.type = model('single', { ...(ngDevMode ? { debugName: "type" } : {}) });
12
+ this.type = model('single', ...(ngDevMode ? [{ debugName: "type" }] : []));
13
13
  this.valueChange = output();
14
- this.value = model(undefined, { ...(ngDevMode ? { debugName: "value" } : {}) });
15
- this.defaultValue = model(undefined, { ...(ngDevMode ? { debugName: "defaultValue" } : {}) });
14
+ this.value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
15
+ this.defaultValue = model(...(ngDevMode ? [undefined, { debugName: "defaultValue" }] : []));
16
16
  this._computedClass = computed(() => {
17
17
  return up(`overflow-hidden`, this.orientation() === 'horizontal' ? 'w-fit' : 'h-fit', this.disabled() ? 'cursor-not-allowed opacity-50' : '', this.inlineClass());
18
- }, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
18
+ }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
19
19
  effect(() => {
20
20
  if (this.value()) {
21
21
  this.valueChange.emit(this.value());
@@ -31,10 +31,10 @@ class UpAccordionDirective {
31
31
  this.value.set(defaultVal);
32
32
  }
33
33
  }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAccordionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
35
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: UpAccordionDirective, isStandalone: true, selector: "[upAccordion]", inputs: { dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { type: "typeChange", valueChange: "valueChange", value: "valueChange", defaultValue: "defaultValueChange" }, host: { properties: { "attr.dir": "dir()", "class": "_computedClass()" } }, exportAs: ["upAccordion"], ngImport: i0 }); }
34
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
35
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAccordionDirective, isStandalone: true, selector: "[upAccordion]", inputs: { dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { type: "typeChange", valueChange: "valueChange", value: "valueChange", defaultValue: "defaultValueChange" }, host: { properties: { "attr.dir": "dir()", "class": "_computedClass()" } }, exportAs: ["upAccordion"], ngImport: i0 }); }
36
36
  }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAccordionDirective, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionDirective, decorators: [{
38
38
  type: Directive,
39
39
  args: [{
40
40
  standalone: true,
@@ -50,14 +50,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImpor
50
50
  class UpAccordionItemDirective {
51
51
  constructor(wrapper) {
52
52
  this.wrapper = wrapper;
53
- this.value = input.required({ ...(ngDevMode ? { debugName: "value" } : {}) });
54
- this.isOpened = model(false, { ...(ngDevMode ? { debugName: "isOpened" } : {}) });
53
+ this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
54
+ this.isOpened = model(false, ...(ngDevMode ? [{ debugName: "isOpened" }] : []));
55
55
  this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
56
56
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
57
57
  this._computedClass = computed(() => {
58
58
  const isHorizontal = this.wrapper.orientation() === 'horizontal';
59
59
  return up(this.disabled() ? 'opacity-50' : '', isHorizontal ? 'flex flex-row h-auto w-fit' : 'flex flex-col', this.inlineClass());
60
- }, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
60
+ }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
61
61
  effect(() => {
62
62
  if (this.wrapper.type() === 'single') {
63
63
  this.isOpened.set(this.wrapper.value() === this.value());
@@ -99,10 +99,10 @@ class UpAccordionItemDirective {
99
99
  return;
100
100
  }
101
101
  }
102
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAccordionItemDirective, deps: [{ token: UpAccordionDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
103
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: UpAccordionItemDirective, isStandalone: true, selector: "[upAccordionItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, isOpened: { classPropertyName: "isOpened", publicName: "isOpened", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpened: "isOpenedChange" }, host: { properties: { "class": "_computedClass()", "attr.data-state": "isOpened()? 'open' : 'closed'" } }, exportAs: ["upAccordionItem"], ngImport: i0 }); }
102
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionItemDirective, deps: [{ token: UpAccordionDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
103
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAccordionItemDirective, isStandalone: true, selector: "[upAccordionItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, isOpened: { classPropertyName: "isOpened", publicName: "isOpened", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpened: "isOpenedChange" }, host: { properties: { "class": "_computedClass()", "attr.data-state": "isOpened()? 'open' : 'closed'" } }, exportAs: ["upAccordionItem"], ngImport: i0 }); }
104
104
  }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAccordionItemDirective, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionItemDirective, decorators: [{
106
106
  type: Directive,
107
107
  args: [{
108
108
  standalone: true,
@@ -122,7 +122,7 @@ class UpAccordionTriggerDirective {
122
122
  this._computedClass = computed(() => {
123
123
  const isItemDisabled = this.item.disabled() || this.item.wrapper.disabled();
124
124
  return up('w-full flex items-center justify-between text-left gap-4 cursor-pointer', isItemDisabled ? 'cursor-not-allowed' : '', this.item.wrapper.orientation() === 'horizontal' ? 'w-fit h-fit' : '', this.inlineClass());
125
- }, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
125
+ }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
126
126
  }
127
127
  toggleState() {
128
128
  this.item.setOpen(!this.item.isOpened());
@@ -185,10 +185,10 @@ class UpAccordionTriggerDirective {
185
185
  }
186
186
  return Array.from(accordionElement.querySelectorAll('[upAccordionTrigger]'));
187
187
  }
188
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAccordionTriggerDirective, deps: [{ token: UpAccordionItemDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
189
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: UpAccordionTriggerDirective, isStandalone: true, selector: "[upAccordionTrigger]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "toggleState()", "keydown": "onKeyDown($event)" }, properties: { "attr.tabindex": "0", "attr.role": "'button'", "class": "_computedClass()", "attr.aria-expanded": "this.item.isOpened()", "attr.disabled": "this.item.disabled() || null", "attr.data-state": "this.item.isOpened()? 'open' : 'closed'", "attr.aria-disabled": "this.item.disabled() || this.item.wrapper.disabled() || null", "style.writing-mode": "this.item.wrapper.orientation() === 'horizontal'? 'sideways-lr' : ''" } }, ngImport: i0 }); }
188
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionTriggerDirective, deps: [{ token: UpAccordionItemDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
189
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAccordionTriggerDirective, isStandalone: true, selector: "[upAccordionTrigger]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "toggleState()", "keydown": "onKeyDown($event)" }, properties: { "attr.tabindex": "0", "attr.role": "'button'", "class": "_computedClass()", "attr.aria-expanded": "this.item.isOpened()", "attr.disabled": "this.item.disabled() || null", "attr.data-state": "this.item.isOpened()? 'open' : 'closed'", "attr.aria-disabled": "this.item.disabled() || this.item.wrapper.disabled() || null", "style.writing-mode": "this.item.wrapper.orientation() === 'horizontal'? 'sideways-lr' : ''" } }, ngImport: i0 }); }
190
190
  }
191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAccordionTriggerDirective, decorators: [{
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionTriggerDirective, decorators: [{
192
192
  type: Directive,
193
193
  args: [{
194
194
  standalone: true,
@@ -217,12 +217,12 @@ class UpAccordionContentDirective {
217
217
  const isDisabled = this.item.disabled() || this.item.wrapper.disabled();
218
218
  const isHorizontal = this.item.wrapper.orientation() === 'horizontal';
219
219
  return up(`overflow-hidden transition-all`, isDisabled ? 'text-gray-400' : '', isHorizontal ? (isOpened ? 'w-full opacity-100' : 'max-w-0 opacity-0 text-nowrap') : (isOpened ? 'h-auto opacity-100' : 'max-h-0 opacity-0'), this.inlineClass());
220
- }, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
220
+ }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
221
221
  }
222
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAccordionContentDirective, deps: [{ token: UpAccordionItemDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
223
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: UpAccordionContentDirective, isStandalone: true, selector: "[upAccordionContent]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAccordionContent"], ngImport: i0 }); }
222
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionContentDirective, deps: [{ token: UpAccordionItemDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
223
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAccordionContentDirective, isStandalone: true, selector: "[upAccordionContent]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAccordionContent"], ngImport: i0 }); }
224
224
  }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAccordionContentDirective, decorators: [{
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionContentDirective, decorators: [{
226
226
  type: Directive,
227
227
  args: [{
228
228
  standalone: true,
@@ -1 +1 @@
1
- {"version":3,"file":"unipin-angular-applet-accordion.mjs","sources":["../../../projects/unipin-angular/accordion/directives/accordion.directive.ts","../../../projects/unipin-angular/accordion/directives/accordion-item.directive.ts","../../../projects/unipin-angular/accordion/directives/accordion-trigger.directive.ts","../../../projects/unipin-angular/accordion/directives/accordion-content.directive.ts","../../../projects/unipin-angular/accordion/unipin-angular-applet-accordion.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, input, model, OnInit, effect, output } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n@Directive({\n standalone: true,\n exportAs: 'upAccordion',\n selector: '[upAccordion]',\n host: {\n '[attr.dir]': 'dir()',\n '[class]': '_computedClass()',\n }\n})\nexport class UpAccordionDirective implements OnInit {\n \n public readonly dir = input<'ltr' | 'rtl'>('ltr');\n public readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n \n public readonly disabled = input(false, { transform: booleanAttribute });\n public readonly collapsible = input(false, { transform: booleanAttribute });\n\n public readonly type = model<'single' | 'multiple'>('single');\n\n public readonly valueChange = output<string | string[]>();\n public readonly value = model<string | string[] | undefined>();\n public readonly defaultValue = model<string | string[] | undefined>();\n \n protected readonly _computedClass = computed(\n () => {\n return up(\n `overflow-hidden`,\n this.orientation() === 'horizontal'? 'w-fit' : 'h-fit',\n this.disabled()? 'cursor-not-allowed opacity-50' : '',\n this.inlineClass()\n );\n }\n )\n\n constructor() {\n effect(\n () => {\n if (this.value()) {\n this.valueChange.emit(this.value() as string | string[]);\n }\n }\n );\n }\n\n public ngOnInit(): void{\n const currentValue = this.value();\n const defaultVal = this.defaultValue();\n \n if (\n (\n currentValue === undefined || \n currentValue === null\n ) && \n defaultVal !== undefined\n ) {\n this.value.set(defaultVal);\n }\n }\n}\n","import { Directive, input, computed, effect, model, booleanAttribute } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpAccordionDirective } from './accordion.directive';\n\n@Directive({\n standalone: true,\n exportAs: 'upAccordionItem',\n selector: '[upAccordionItem]',\n host: {\n '[class]': '_computedClass()',\n '[attr.data-state]': `isOpened()? 'open' : 'closed'`\n }\n})\nexport class UpAccordionItemDirective {\n \n public readonly value = input.required<string>();\n public readonly isOpened = model<boolean>(false);\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n public readonly disabled = input(false, { transform: booleanAttribute });\n\n protected _computedClass = computed(\n () => {\n const isHorizontal = this.wrapper.orientation() === 'horizontal';\n \n return up(\n this.disabled()? 'opacity-50' : '',\n isHorizontal? 'flex flex-row h-auto w-fit' : 'flex flex-col',\n this.inlineClass()\n );\n }\n );\n\n constructor (\n public readonly wrapper: UpAccordionDirective\n ) {\n effect(\n () => {\n if (this.wrapper.type() === 'single') {\n this.isOpened.set(this.wrapper.value() === this.value());\n return;\n }\n\n const values = Array.isArray(this.wrapper.value())? this.wrapper.value() : (this.wrapper.value()? [this.wrapper.value()] : []);\n this.isOpened.set(\n values!.includes(this.value())\n );\n }\n );\n }\n\n public setOpen(value: boolean): void{\n if (\n this.disabled() || \n this.wrapper.disabled()\n ) {\n return;\n }\n \n if (this.wrapper.type() === 'multiple') {\n const rawValue = this.wrapper.value();\n const currentValues = Array.isArray(rawValue)? [...rawValue] : (rawValue? [rawValue] : []);\n const itemValue = this.value();\n\n if (value) {\n if (!currentValues.includes(itemValue)) {\n currentValues.push(itemValue);\n }\n this.wrapper.value.set(currentValues);\n \n return;\n }\n\n if (!this.wrapper.collapsible()) {\n return;\n }\n\n const nextValues = currentValues.filter(v => v !== itemValue);\n this.wrapper.value.set(nextValues.length ? nextValues : undefined);\n return;\n }\n\n if (value) {\n this.wrapper.value.set(this.value());\n return;\n }\n \n if (this.wrapper.collapsible()) {\n this.wrapper.value.set(undefined);\n return;\n }\n }\n}\n","import { Directive, input, computed } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpAccordionItemDirective } from './accordion-item.directive';\n\n@Directive({\n standalone: true,\n selector: '[upAccordionTrigger]',\n host: {\n '[attr.tabindex]': '0',\n '[attr.role]': `'button'`,\n '[class]': '_computedClass()',\n '[attr.aria-expanded]': 'this.item.isOpened()',\n '[attr.disabled]': 'this.item.disabled() || null',\n '[attr.data-state]': `this.item.isOpened()? 'open' : 'closed'`,\n '[attr.aria-disabled]': 'this.item.disabled() || this.item.wrapper.disabled() || null',\n '[style.writing-mode]': `this.item.wrapper.orientation() === 'horizontal'? 'sideways-lr' : ''`,\n\n '(click)': 'toggleState()',\n '(keydown)': 'onKeyDown($event)',\n }\n})\nexport class UpAccordionTriggerDirective {\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected _computedClass = computed(\n () => {\n const isItemDisabled = this.item.disabled() || this.item.wrapper.disabled();\n \n return up(\n 'w-full flex items-center justify-between text-left gap-4 cursor-pointer',\n isItemDisabled? 'cursor-not-allowed' : '',\n this.item.wrapper.orientation() === 'horizontal'? 'w-fit h-fit' : '',\n this.inlineClass()\n );\n }\n );\n\n constructor(\n public readonly item: UpAccordionItemDirective\n ) { }\n\n public toggleState(): void{\n this.item.setOpen(!this.item.isOpened());\n }\n\n public onKeyDown(event: KeyboardEvent): void{\n if (\n this.item.disabled() || \n this.item.wrapper.disabled()) \n {\n return;\n }\n\n event.preventDefault();\n switch (event.key) {\n case 'Enter':\n case ' ':\n this.toggleState();\n break;\n \n case 'ArrowDown':\n this.focusNextItem();\n break;\n \n case 'ArrowUp':\n this.focusPreviousItem();\n break;\n \n case 'Home':\n this.focusFirstItem();\n break;\n \n case 'End':\n this.focusLastItem();\n break;\n }\n }\n\n protected focusNextItem(): void{\n const triggers = this.getAllTriggers();\n const currentIndex = triggers.indexOf(document.activeElement as HTMLElement);\n \n if (currentIndex < triggers.length - 1) {\n triggers[currentIndex + 1].focus();\n }\n }\n\n protected focusPreviousItem(): void{\n const triggers = this.getAllTriggers();\n const currentIndex = triggers.indexOf(document.activeElement as HTMLElement);\n \n if (currentIndex > 0) {\n triggers[currentIndex - 1].focus();\n }\n }\n\n protected focusFirstItem(): void{\n const triggers = this.getAllTriggers();\n \n if (triggers.length > 0) {\n triggers[0].focus();\n }\n }\n\n protected focusLastItem(): void {\n const triggers = this.getAllTriggers();\n \n if (triggers.length > 0) {\n triggers[triggers.length - 1].focus();\n }\n }\n\n protected getAllTriggers(): HTMLElement[]{\n const accordionElement = (document.activeElement as HTMLElement)?.closest('[upAccordion]');\n \n if (!accordionElement) {\n return [];\n }\n return Array.from(accordionElement.querySelectorAll('[upAccordionTrigger]'));\n }\n}\n","import { Directive, input, computed } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpAccordionItemDirective } from './accordion-item.directive';\n\n@Directive({\n standalone: true,\n exportAs: 'upAccordionContent',\n selector: '[upAccordionContent]',\n host:{\n '[class]': '_computedClass()',\n },\n})\nexport class UpAccordionContentDirective {\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected _computedClass = computed(\n () => {\n const isOpened = this.item.isOpened();\n const isDisabled = this.item.disabled() || this.item.wrapper.disabled();\n const isHorizontal = this.item.wrapper.orientation() === 'horizontal';\n \n return up(\n `overflow-hidden transition-all`,\n isDisabled? 'text-gray-400' : '',\n isHorizontal? (\n isOpened? 'w-full opacity-100' : 'max-w-0 opacity-0 text-nowrap'\n ) : (\n isOpened? 'h-auto opacity-100' : 'max-h-0 opacity-0'\n ),\n this.inlineClass()\n );\n }\n );\n\n constructor(\n protected readonly item: UpAccordionItemDirective,\n ) { }\n}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BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBARvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,IAAI,EAAC;AACH,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"unipin-angular-applet-accordion.mjs","sources":["../../../projects/unipin-angular/accordion/directives/accordion.directive.ts","../../../projects/unipin-angular/accordion/directives/accordion-item.directive.ts","../../../projects/unipin-angular/accordion/directives/accordion-trigger.directive.ts","../../../projects/unipin-angular/accordion/directives/accordion-content.directive.ts","../../../projects/unipin-angular/accordion/unipin-angular-applet-accordion.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, input, model, OnInit, effect, output } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n@Directive({\n standalone: true,\n exportAs: 'upAccordion',\n selector: '[upAccordion]',\n host: {\n '[attr.dir]': 'dir()',\n '[class]': '_computedClass()',\n }\n})\nexport class UpAccordionDirective implements OnInit {\n \n public readonly dir = input<'ltr' | 'rtl'>('ltr');\n public readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n \n public readonly disabled = input(false, { transform: booleanAttribute });\n public readonly collapsible = input(false, { transform: booleanAttribute });\n\n public readonly type = model<'single' | 'multiple'>('single');\n\n public readonly valueChange = output<string | string[]>();\n public readonly value = model<string | string[] | undefined>();\n public readonly defaultValue = model<string | string[] | undefined>();\n \n protected readonly _computedClass = computed(\n () => {\n return up(\n `overflow-hidden`,\n this.orientation() === 'horizontal'? 'w-fit' : 'h-fit',\n this.disabled()? 'cursor-not-allowed opacity-50' : '',\n this.inlineClass()\n );\n }\n )\n\n constructor() {\n effect(\n () => {\n if (this.value()) {\n this.valueChange.emit(this.value() as string | string[]);\n }\n }\n );\n }\n\n public ngOnInit(): void{\n const currentValue = this.value();\n const defaultVal = this.defaultValue();\n \n if (\n (\n currentValue === undefined || \n currentValue === null\n ) && \n defaultVal !== undefined\n ) {\n this.value.set(defaultVal);\n }\n }\n}\n","import { Directive, input, computed, effect, model, booleanAttribute } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpAccordionDirective } from './accordion.directive';\n\n@Directive({\n standalone: true,\n exportAs: 'upAccordionItem',\n selector: '[upAccordionItem]',\n host: {\n '[class]': '_computedClass()',\n '[attr.data-state]': `isOpened()? 'open' : 'closed'`\n }\n})\nexport class UpAccordionItemDirective {\n \n public readonly value = input.required<string>();\n public readonly isOpened = model<boolean>(false);\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n public readonly disabled = input(false, { transform: booleanAttribute });\n\n protected _computedClass = computed(\n () => {\n const isHorizontal = this.wrapper.orientation() === 'horizontal';\n \n return up(\n this.disabled()? 'opacity-50' : '',\n isHorizontal? 'flex flex-row h-auto w-fit' : 'flex flex-col',\n this.inlineClass()\n );\n }\n );\n\n constructor (\n public readonly wrapper: UpAccordionDirective\n ) {\n effect(\n () => {\n if (this.wrapper.type() === 'single') {\n this.isOpened.set(this.wrapper.value() === this.value());\n return;\n }\n\n const values = Array.isArray(this.wrapper.value())? this.wrapper.value() : (this.wrapper.value()? [this.wrapper.value()] : []);\n this.isOpened.set(\n values!.includes(this.value())\n );\n }\n );\n }\n\n public setOpen(value: boolean): void{\n if (\n this.disabled() || \n this.wrapper.disabled()\n ) {\n return;\n }\n \n if (this.wrapper.type() === 'multiple') {\n const rawValue = this.wrapper.value();\n const currentValues = Array.isArray(rawValue)? [...rawValue] : (rawValue? [rawValue] : []);\n const itemValue = this.value();\n\n if (value) {\n if (!currentValues.includes(itemValue)) {\n currentValues.push(itemValue);\n }\n this.wrapper.value.set(currentValues);\n \n return;\n }\n\n if (!this.wrapper.collapsible()) {\n return;\n }\n\n const nextValues = currentValues.filter(v => v !== itemValue);\n this.wrapper.value.set(nextValues.length ? nextValues : undefined);\n return;\n }\n\n if (value) {\n this.wrapper.value.set(this.value());\n return;\n }\n \n if (this.wrapper.collapsible()) {\n this.wrapper.value.set(undefined);\n return;\n }\n }\n}\n","import { Directive, input, computed } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpAccordionItemDirective } from './accordion-item.directive';\n\n@Directive({\n standalone: true,\n selector: '[upAccordionTrigger]',\n host: {\n '[attr.tabindex]': '0',\n '[attr.role]': `'button'`,\n '[class]': '_computedClass()',\n '[attr.aria-expanded]': 'this.item.isOpened()',\n '[attr.disabled]': 'this.item.disabled() || null',\n '[attr.data-state]': `this.item.isOpened()? 'open' : 'closed'`,\n '[attr.aria-disabled]': 'this.item.disabled() || this.item.wrapper.disabled() || null',\n '[style.writing-mode]': `this.item.wrapper.orientation() === 'horizontal'? 'sideways-lr' : ''`,\n\n '(click)': 'toggleState()',\n '(keydown)': 'onKeyDown($event)',\n }\n})\nexport class UpAccordionTriggerDirective {\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected _computedClass = computed(\n () => {\n const isItemDisabled = this.item.disabled() || this.item.wrapper.disabled();\n \n return up(\n 'w-full flex items-center justify-between text-left gap-4 cursor-pointer',\n isItemDisabled? 'cursor-not-allowed' : '',\n this.item.wrapper.orientation() === 'horizontal'? 'w-fit h-fit' : '',\n this.inlineClass()\n );\n }\n );\n\n constructor(\n public readonly item: UpAccordionItemDirective\n ) { }\n\n public toggleState(): void{\n this.item.setOpen(!this.item.isOpened());\n }\n\n public onKeyDown(event: KeyboardEvent): void{\n if (\n this.item.disabled() || \n this.item.wrapper.disabled()) \n {\n return;\n }\n\n event.preventDefault();\n switch (event.key) {\n case 'Enter':\n case ' ':\n this.toggleState();\n break;\n \n case 'ArrowDown':\n this.focusNextItem();\n break;\n \n case 'ArrowUp':\n this.focusPreviousItem();\n break;\n \n case 'Home':\n this.focusFirstItem();\n break;\n \n case 'End':\n this.focusLastItem();\n break;\n }\n }\n\n protected focusNextItem(): void{\n const triggers = this.getAllTriggers();\n const currentIndex = triggers.indexOf(document.activeElement as HTMLElement);\n \n if (currentIndex < triggers.length - 1) {\n triggers[currentIndex + 1].focus();\n }\n }\n\n protected focusPreviousItem(): void{\n const triggers = this.getAllTriggers();\n const currentIndex = triggers.indexOf(document.activeElement as HTMLElement);\n \n if (currentIndex > 0) {\n triggers[currentIndex - 1].focus();\n }\n }\n\n protected focusFirstItem(): void{\n const triggers = this.getAllTriggers();\n \n if (triggers.length > 0) {\n triggers[0].focus();\n }\n }\n\n protected focusLastItem(): void {\n const triggers = this.getAllTriggers();\n \n if (triggers.length > 0) {\n triggers[triggers.length - 1].focus();\n }\n }\n\n protected getAllTriggers(): HTMLElement[]{\n const accordionElement = (document.activeElement as HTMLElement)?.closest('[upAccordion]');\n \n if (!accordionElement) {\n return [];\n }\n return Array.from(accordionElement.querySelectorAll('[upAccordionTrigger]'));\n }\n}\n","import { Directive, input, computed } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpAccordionItemDirective } from './accordion-item.directive';\n\n@Directive({\n standalone: true,\n exportAs: 'upAccordionContent',\n selector: '[upAccordionContent]',\n host:{\n '[class]': '_computedClass()',\n },\n})\nexport class UpAccordionContentDirective {\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected _computedClass = computed(\n () => {\n const isOpened = this.item.isOpened();\n const isDisabled = this.item.disabled() || this.item.wrapper.disabled();\n const isHorizontal = this.item.wrapper.orientation() === 'horizontal';\n \n return up(\n `overflow-hidden transition-all`,\n isDisabled? 'text-gray-400' : '',\n isHorizontal? (\n isOpened? 'w-full opacity-100' : 'max-w-0 opacity-0 text-nowrap'\n ) : (\n isOpened? 'h-auto opacity-100' : 'max-h-0 opacity-0'\n ),\n this.inlineClass()\n );\n }\n );\n\n constructor(\n protected readonly item: UpAccordionItemDirective,\n ) { }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.UpAccordionDirective","i1.UpAccordionItemDirective"],"mappings":";;;;MAaa,oBAAoB,CAAA;AA2B/B,IAAA,WAAA,GAAA;AAzBgB,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAgB,KAAK,+CAAC;AACjC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAA4B,UAAU,uDAAC;QAE1D,IAAA,CAAA,WAAW,GAAG,KAAK,CAAa,EAAE,wDAAI,KAAK,EAAE,OAAO,EAAA,CAAG;QAEvD,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QACxD,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,KAAK,wDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE3D,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAwB,QAAQ,gDAAC;QAE7C,IAAA,CAAA,WAAW,GAAG,MAAM,EAAqB;QACzC,IAAA,CAAA,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAiC;QAC9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