@entake/particle 21.0.1 → 21.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,372 +1,372 @@
1
- # Particle for Angular by Entake
2
-
3
- This package offers a small selection of reusable components that are meant to replace usage of other Angular component libraries, like Angular Material and PrimeNG. If you're looking for a themeable alternative that gives you unprecedented control of your Angular components, give Particle a try! If you're interested in contributing or find any bugs, feel free to catch us on GitHub.
4
-
5
- ## ParticleColorPickerModule
6
- ### ColorPickerComponent
7
- The color picker component is a simple way to choose/input a color in hexadecimal format. It offers a text input that allows for free entry in hexadecimal format along with a color picker for supported browsers. If the browser does not support the HTML5 color picker, it is replaced with a simple color swatch that acts as a preview of the contents of the text input.
8
- #### Usage
9
- The color picker accepts a hexadecimal color string (either in short or full form, leading `#` optional, case is ignored) through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the color picker, you can listen for its `ngModelChange` event (if using `ngModel`) or its `colorSelected` event. The value emitted from the component is a full hexadecimal color string (ex: `#0a50d3`). Model updates on every color picker input, every valid text input entry and when the contents of the text input are deleted by the user.
10
- #### Selector: particle-color-picker
11
- #### Inputs
12
- - `value` setter for the internal value of the component
13
- - `disabled` whether the component should be disabled
14
- - `ariaLabel` the aria label to set for the color picker/text input
15
- - `classList` CSS class list to apply to the text input
16
- #### Outputs
17
- - `input` event emitted on text input, emits the current value of the component
18
- - `colorSelected` event emitted on color picker close or on valid hexadecimal string input from the text input, emits the selected color as a hexadecimal string
19
-
20
- ## ParticleDatePickerModule
21
- ### DatePickerComponent
22
- The date picker component allows the user to enter a date via a text input (in the form of month/day/year) or through a calendar widget.
23
- #### Usage
24
- The date picker accepts a Date object through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the date picker, you can listen for its `ngModelChange` event (if using `ngModel`) or its `dateSelected` event. The value emitted from the component is a Date object representing the user's typed/selected date. Model updates on every calendar widget selection, every valid text input entry and when the contents of the text input are deleted by the user.
25
- #### Selector: particle-date-picker
26
- #### Inputs
27
- - `value` setter for the internal value of the component
28
- - `disabled` whether the component should be disabled
29
- - `dateRange` object in the form of `{ minDate: Date, maxDate: Date}` that acts as the valid selection range for the input/calendar widget. Min date must be less than max date. If min date is not provided, the min date is set to January 1st, {currentYear - 100}. If max date is not provided, the max date is set to December 31st, {current year + 50}.
30
- - `inputId` the ID to assign to the text input
31
- - `ariaLabel` the aria label to assign to the text input
32
- - `inputClassList` CSS class list to apply to the text input
33
- - `calendarButtonClassList` CSS class list to apply to the calendar widget button
34
- #### Outputs
35
- - `input` event emitted on text input
36
- - `dateSelected` event emitted on valid date input/widget date selection, emits the selected date
37
- ### CalendarComponent
38
- The calendar component displays a calendar widget with accessibility features such as arrow key navigation of calendar dates.
39
- #### Usage
40
- The calendar accepts a Date object through its `value` input. To read in the value of the calendar, you can listen for its `selected` event. The value emitted from the component is a Date object representing the user's selection.
41
- #### Selector: particle-calendar
42
- #### Inputs
43
- - `value` setter for the internal value of the component
44
- - `dateRange` object in the form of { minDate: Date, maxDate: Date} that acts as the valid selection range for the calendar. Min date must be less than max date. If min date is not provided, the min date is set to January 1st, {currentYear - 100}. If max date is not provided, the max date is set to December 31st, {current year + 50}.
45
- #### Outputs
46
- - `selected` event emitted on calendar date selection, emits the selected date
47
- - `closed` event emitted when the user clicks outside the widget, triggers a keyup.escape event or clicks the done button. It is the parent component's responsibility to hide the calendar, the event is merely a signal that action should be taken.
48
-
49
- ## ParticleDialogModule
50
- ### DialogComponent
51
- The dialog component displays dynamic content within a dialog and supports nested dialogs within that dynamic content.
52
- #### Usage
53
- The dialog component essentially wraps an `ng-content` block. It is the responsibility of the parent component to show/hide the dialog based on its `object` input and `closed` event. The dialog listens for `keyup.escape` events (if enabled) to trigger a dialog close. If you have components in the dynamic dialog content that also rely on escape events to close, those components must listen for keyups on its own focusable elements (as opposed to listening for `window.keyup`) and either stop immediate propagation, or those focusable elements must have the `data-dialog-close-override` attribute on them, or else the escape event will close both the child component and the parent dialog.
54
- #### Selector: particle-dialog
55
- #### Inputs
56
- - `object` an input of type `any` where that input becoming truthy will show the dialog and falsy will hide
57
- - `title` the title of the dialog. Note: always use the Angular input syntax (`[title]="'Title'"`) to avoid IE11 triggering a native tooltip of the dialog title
58
- - `titleClass` CSS class to apply to the title section of the dialog
59
- - `bodyClass` CSS class to apply to the body section of the dialog
60
- - `showTitle` whether to show the title section of the dialog (default `true`)
61
- - `allowClose` whether to show the dialog close button and enable escape to close (default `true`)
62
- - `height` the height of dialog (can be any valid CSS measurement)
63
- - `width` the width of dialog (can be any valid CSS measurement)
64
- #### Outputs
65
- - `opened` event emitted on dialog open
66
- - `closed` event emitted on dialog close
67
-
68
- ## ParticleDropdownModule
69
- ### DropdownComponent
70
- The dropdown component acts as an enhanced HTML select. It supports both regular dropdown options (only the label being displayed) and templated options (options for which you can supply a ng-template to act as a template for each dropdown option). The dropdown is fully accessible as well, and supports all the accessibility options that a native select would (such as arrow key controls for option selection).
71
- #### Usage
72
- The dropdown accepts a string or number through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the dropdown, you can listen for its `ngModelChange` event (if using `ngModel`) or its `change` event. The value emitted from the component is a string or number representing the value of the user's selected option. Model updates on every option change, whether it be triggered by clicking on an option or using arrow key controls.
73
- #### Using Dropdown Options
74
- The dropdown supports both flat options or option groups, and the options for a single dropdown can be a mix of the two. A dropdown option has a value (string or number), a label, disabled indicator, and an optional data context object (the data context object is not needed if you're not planning to use templating). Whether data context is passed in or not for an option, each option internally will have a data context object which will minimally contain the option's label (inserted into the `$implicit` property if not already taken, or the `label` property if `$implicit` is already present in the object). Dropdown option groups contain a group label, and an array of dropdown options.
75
- #### Using Dropdown Option Templating
76
- Dropdown option templating relies on Angular's `ng-template` syntax. To provide an option template to the dropdown, you simply define a `ng-template` as the content of the dropdown. If you do not wish to use templating, pass nothing into the content between the dropdown tags. To display data from an option's data context within the option template, you use Angular's `ng-template` `let-var` syntax. This allows you to define variables within the option template that will then be filled by the corresponding property in an option's data context. As mentioned in the previous section, the option's label is automatically added to each option's data context, so to display the label in the template, you can just define a variable without a value, and it will be filled by the `$implicit` entry. Here's an example of how a typical use case of the dropdown with templating would look:
77
-
78
- ```html
79
- <particle-dropdown [options]="[
80
- { value: 'red', label: 'Red', dataContext: { 'colorClass': 'bg_red' } },
81
- { value: 'green', label: 'Green', disabled: true, dataContext: { 'colorClass': 'bg_green' } },
82
- { value: 'blue', label: 'Blue', dataContext: { 'colorClass': 'bg_blue' } },
83
- { groupLabel: 'Purple Values', options: [
84
- { value: 'darkPurple', label: 'Dark Purple', dataContext: { 'colorClass': 'bg_purple_dark_4' } },
85
- { value: 'purple', label: 'Purple', dataContext: { 'colorClass': 'bg_purple' } },
86
- { value: 'lightPurple', label: 'Light Purple', dataContext: { 'colorClass': 'bg_purple_light_4' } }
87
- ]}
88
- ]">
89
- <ng-template let-colorClass="colorClass" let-label>
90
- <div class="circle_14px mar_right5"
91
- [ngClass]="colorClass">
92
- </div> {{label}}
93
- </ng-template>
94
- </particle-dropdown>
95
- ```
96
- Notice how, in the `ng-template`, the variable definition value (in quotes) for `colorClass` matches up with the property of the same name in the data context objects for each option. Also notice how the variable definition for `label` has no value assigned, that's because the dropdown component will automatically put an option's label into the `$implicit` property, which Angular uses to fill in the value for any referenced variables that do not have a specified value. You can of course choose to explicitly add the label to the option's data context and use that value in the label variable assignment as well.
97
- #### Selector: particle-dropdown
98
- #### Inputs
99
- - `value` string or number representing the value of the selected option
100
- - `options` array of `DropdownOption | DropdownOptionGroup` acting as the options to populate the dropdown
101
- - `disabled` whether the dropdown should be disabled or not
102
- - `placeholder` placeholder text to show in the dropdown when no option is selected
103
- - `ariaLabel` aria label to assign to the dropdown
104
- - `classList` CSS class list to apply to the dropdown
105
- #### Outputs
106
- - change: event emitted on dropdown option selection if selection has changed from the previous value, emits the selected value
107
-
108
- ## ParticleEndpointStateModule
109
- ### EndpointStateComponent
110
- The endpoint state component serves as a catch-all for displaying endpoint states (loading, not found and error).
111
- #### Usage
112
- The endpoint state component is split into four different possible states: loading, loadingOverlay, empty and error. You specify which state the component should be in by passing in `true` to the desired state as an input. Note: only one state should be active at a time.
113
- #### Inputs
114
- - `loading` whether the component should be in the loading state
115
- - `loadingIcon` an icon class to display in the loading state
116
- - `loadingText` main text to display in the loading state
117
- - `loadingSubtext` subtext to display in the loading state
118
- - `loadingOverlay` whether the component should be in the loading overlay state (whole-screen overlay)
119
- - `loadingOverlayIcon` an icon class to display in the loading overlay state
120
- - `loadingOverlayText` main text to display in the loading overlay state
121
- - `loadingOverlaySubtext` subtext to display in the loading overlay state
122
- - `empty` whether the component should be in the empty (not found) state
123
- - `emptyIcon` an icon class to display in the empty state
124
- - `emptyText` main text to display in the empty state
125
- - `emptySubtext` subtext to display in the empty state
126
- - `error` whether the component should be in the error state
127
- - `errorIcon` an icon class to display in the error state
128
- - `errorText` main text to display in the error state
129
- - `errorSubtext` subtext to display in the error state
130
-
131
- ## ParticleIconsModule
132
- ### IconSelectComponent
133
- The icon select component allows a user to search for and select either a Fontawesome or Particle (custom) icon.
134
- ### Usage
135
- The icon select accepts an icon class through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the icon select, you can listen for its `ngModelChange` event (if using `ngModel`) or its `selected` event. The value emitted from the component is the selected icon class. Model updates on confirm button click.
136
- ### Inputs
137
- - `value` setter for the internal value of the component
138
- - `disabled` whether the component is disabled
139
- - `buttonColorClass` CSS class to apply to the icon dialog show button
140
- - `buttonSizing` the size (width/height) of the icon dialog show button in pixels
141
- #### Outputs
142
- - `opened` event emitted on icon dialog open
143
- - `selected` event emitted on icon dialog confirmation, emits the selected icon in the form of `{ value: string }`
144
- - `closed` event emitted on icon dialog close
145
-
146
- ## ParticleKeyfilterModule
147
- ### KeyfilterDirective
148
- Directive to apply to HTML input elements to filter out certain input.
149
- #### Usage
150
- Supported filter types are `alpha` (English alphabet only), `numeric` (digits only) and `alphanumeric` (English alphabet and digits).
151
- #### Selector: particleKeyfilter
152
- #### Inputs
153
- - `particleKeyfilter` the filter type to apply to the host input
154
- - `allowSpaces` whether to allow spaces in input (default `false`)
155
-
156
- ## ParticleMultiSelectModule
157
- ### MultiSelectComponent
158
- The multi-select component acts as an enhanced HTML select that allows multiple selections. It supports both regular multi-select options (only the label being displayed) and templated options (options for which you can supply a ng-template to act as a template for each multi-select option). The multi-select is fully accessible as well, and supports all the accessibility options that a multi-select should (such as arrow key controls for option selection).
159
- #### Usage
160
- The multi-select accepts an array of strings or numbers through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the multi-select, you can listen for its `ngModelChange` event (if using `ngModel`) or its `change` event. The value emitted from the component is an array of strings or numbers representing the values of the user's selected options. Model updates on every option select/de-select, whether it be triggered by clicking on an option or using arrow key controls.
161
- #### Using Dropdown Options
162
- The multi-select supports both flat options or option groups, and the options for a single multi-select can be a mix of the two. A multi-select option has a value (string or number), a label, disabled indicator, and an optional data context object (the data context object is not needed if you're not planning to use templating). Whether data context is passed in or not for an option, each option internally will have a data context object which will minimally contain the option's label (inserted into the `$implicit` property if not already taken, or the `label` property if `$implicit` is already present in the object). Multi-select option groups contain a group label, and an array of multi-select options.
163
- #### Using Dropdown Option Templating
164
- Multi-select option templating relies on Angular's `ng-template` syntax. To provide an option template to the multi-select, you simply define a `ng-template` as the content of the multi-select. If you do not wish to use templating, pass nothing into the content between the multi-select tags. To display data from an option's data context within the option template, you use Angular's `ng-template` `let-var` syntax. This allows you to define variables within the option template that will then be filled by the corresponding property in an option's data context. As mentioned in the previous section, the option's label is automatically added to each option's data context, so to display the label in the template, you can just define a variable without a value, and it will be filled by the `$implicit` entry. Here's an example of how a typical use case of the multi-select with templating would look:
165
-
166
- ```html
167
- <particle-multi-select [options]="[
168
- { value: 'red', label: 'Red', dataContext: { 'colorClass': 'bg_red' } },
169
- { value: 'green', label: 'Green', disabled: true, dataContext: { 'colorClass': 'bg_green' } },
170
- { value: 'blue', label: 'Blue', dataContext: { 'colorClass': 'bg_blue' } },
171
- { groupLabel: 'Purple Values', options: [
172
- { value: 'darkPurple', label: 'Dark Purple', dataContext: { 'colorClass': 'bg_purple_dark_4' } },
173
- { value: 'purple', label: 'Purple', dataContext: { 'colorClass': 'bg_purple' } },
174
- { value: 'lightPurple', label: 'Light Purple', dataContext: { 'colorClass': 'bg_purple_light_4' } }
175
- ]}
176
- ]">
177
- <ng-template let-colorClass="colorClass" let-label>
178
- <div class="circle_14px mar_right5"
179
- [ngClass]="colorClass">
180
- </div> {{label}}
181
- </ng-template>
182
- </particle-multi-select>
183
- ```
184
- Notice how, in the `ng-template`, the variable definition value (in quotes) for `colorClass` matches up with the property of the same name in the data context objects for each option. Also notice how the variable definition for `label` has no value assigned, that's because the multi-select component will automatically put an option's label into the `$implicit` property, which Angular uses to fill in the value for any referenced variables that do not have a specified value. You can of course choose to explicitly add the label to the option's data context and use that value in the label variable assignment as well.
185
- #### Selector: particle-multi-select
186
- #### Inputs
187
- - `value` array of strings or numbers representing the value of the selected options
188
- - `options` array of `MultiSelectOption | MultiSelectOptionGroup` acting as the options to populate the multi-select
189
- - `disabled` whether the multi-select should be disabled or not
190
- - `placeholder` placeholder text to show in the multi-select when no options are selected
191
- - `ariaLabel` aria label to assign to the multi-select
192
- - `classList` CSS class list to apply to the multi-select
193
- #### Outputs
194
- - `change` event emitted on multi-select option selection if selection has changed from the previous value, emits the selected values
195
-
196
- ## ParticleNotificationModule
197
- ### Notifications
198
- A notification is a simple way to provide feedback to a user in respect to some action (successful resource save, some error occurred, etc).
199
- Notifications have an ID (system generated), severity (`'success' | 'info' | 'warn' | 'error'`), summary and detail message (optional).
200
- ### NotificationComponent
201
- The notification component allows for the display of notifications in an application.
202
- #### Usage
203
- The notification component should be dropped into the app root so that the display of notifications is available throughout the entire application. Once the component has been placed, no further action is needed. It's up to other components/services to add notifications for display in the notification component.
204
- ### NotificationService
205
- The notification service is a root `Injectable` that allows components/services throughout an application to add notifications to the notification pool for display.
206
- #### Usage
207
- The notification service can be injected into components/services to add a notification through its `add` method, which accepts a notification object, adds it and then removes it after the configured notification life has passed. Notification life (the time before a notification is automatically removed from the view) can also be configured via the service's `setNotificationLife` method.
208
- #### Methods
209
- - `add` accepts a notification object and adds it to the current notifications array
210
- - `deleteNotification` accepts a notification ID and deletes the corresponding notification (if it exists)
211
- - `getNotifications` get an array of the current notifications as an RxJS Observable
212
- - `setNotificationLife` set the notification life for new notifications
213
-
214
- ## ParticleOrdinalNumberPipeModule
215
- ### OrdinalNumberPipe
216
- The ordinal number pipe transforms a number into an ordinal number (1 => 1st, 2 => 2nd, 3 => 3rd, etc).
217
- #### Usage
218
- The ordinal number pipe accepts a number or a numeric string and transforms it into ordinal format.
219
- #### Name: ordinalNumber
220
-
221
- ## ParticlePaginatorModule
222
- ### PaginatorComponent
223
- The paginator component is a widget that provides controls for paginating a list.
224
- #### Usage
225
- The paginator component accepts an array of page size options, the current page size, and the total size of the paginated list without pagination applied, and from those inputs calculates the page number display and enables/disables the next/previous pagination buttons. Pagination control interactions emit a `PaginationEvent`, it is up to the parent component to react to that event and update the pagination as a result.
226
- #### Selector: particle-paginator
227
- #### Inputs
228
- - `version` which version of the paginator to user (1-4 available)
229
- - `pageSizeOptions` an array of numbers representing the available page size options
230
- - `pageSize` a number representing the currently selected page size
231
- - `totalLength` the total length of the unpaginated list
232
- #### Outputs
233
- - `pagination` event emitted on pagination control interactions, emits a `PaginationEvent` (`{ activePage: number, pageSize: number, totalLength: number }`)
234
-
235
- ## ParticlePopoverModule
236
- ### PopoverComponent
237
- The popover component displays a popover with dynamic content around a given target.
238
- #### Usage
239
- The popover component is a wrapper around an `ng-content` block and has no content itself. The popover is positioned via its `toggle` method, which accepts an `Event` and positions itself off of the `EventTarget`. If the toggle method is called with an event, and the popover is currently closed, the popover opens and aligns to the event target. If the toggle method is called, and the popover is open or no event is passed in, the popover will close.
240
- #### Selector: particle-popover
241
- #### Inputs
242
- - `offset` the number of pixels to offset the popover from its target
243
- - `width` the width of the popover (any valid CSS measurement, default `auto`)
244
- - `height` the height of the popover (any valid CSS measurement, default `auto`)
245
- #### Outputs
246
- - `opened` event emitted on popover open
247
- - `closed` event emitted on popover close
248
-
249
- ## ParticleProfilePicModule
250
- ### ProfilePicComponent
251
- The profile pic component displays a round image with a tooltip description to act as a profile picture.
252
- #### Usage
253
- The profile pic component accepts an image URL and displays it.
254
- #### Selector: particle-profile-pic
255
- #### Inputs
256
- - `size` the size of the picture
257
- - `margin` the CSS margin
258
- - `width` the width of the picture
259
- - `height` the height of the picture
260
- - `toolTip` text to pass as the content of the image tooltip
261
-
262
- ## ParticlePushContainerModule
263
- ### PushContainerComponent
264
- The push container component serves as a side menu (left or right) which display dynamic content
265
- #### Usage
266
- The push container component accepts dynamic content in between its tags and displays it.
267
- #### Selector: particle-push-container
268
- #### Inputs
269
- - `width` the number of pixels wide
270
- - `showSidePanel` whether to be open on page load (default `false`)
271
- - `mainContentId` the ID of the main content that will be pushed when the component opens
272
- - `side` open from the left or right
273
- - `topOffset` top offset to account for a nav bar
274
- - `closeOnResize` whether to close the component on window resize (default `false`)
275
- - `backgroundColorClass` the CSS class to apply to the background of the component
276
- - `breakpoint` the breakpoint passed which the push container will fill the entire view
277
- - `hideCloseButton` whether to hide the push container close button (default `false`)
278
- - `alwaysShowClose` whether to show the close button in desktop view (default `false`)
279
- #### Outputs
280
- - `opened` event emitted on push container open
281
- - `closed` event emitted on push container close
282
-
283
- ## ParticleRichTextModule
284
- ### RichTextComponent
285
- The rich text component is an Angular wrapper around a Quill rich text editor.
286
- #### Usage
287
- The rich text component accepts an HTML paragraph as a string through either its value input or through one/two-way data-binding via `ngModel`. To read in the value of the editor, you can listen for its `ngModelChange` event (if using `ngModel`) or its `textChanged` event. The value emitted from the component is stringified HTML representing the value of the user's input. Model updates on editor input.
288
- #### Selector: particle-rich-text
289
- #### Inputs
290
- - `value` setter for the internal value of the component
291
- - `doHideShow` whether to show the rich text controls
292
- - `height` the height of the editor
293
- - `readonly` whether the editor is readonly
294
- - `placeholder` the placeholder to display in the editor if no input
295
- - `toolbarClassList` CSS class list to apply to the editor toolbar
296
- - `editorClassList` CSS class list to apply to the editor
297
- #### Outputs
298
- - `textChanged` event emitted on text change, emits an object in the following format: `{ htmlValue: string, textValue: string, delta: any, source: any }`
299
- - `selectionChange` event emitted on editor selection change
300
- - `init` event emitted on editor init
301
-
302
- ## ParticleSliderModule
303
- ### SliderComponent
304
- The slider component allows for the user to select a number from a range using an HTML5 range input or through an HTML5 number input.
305
- #### Usage
306
- The slider component accepts a number through either its value input or through one/two-way data-binding via `ngModel`. To read in the value of the component, you can listen for its `ngModelChange` event (if using `ngModel`) or its `input` event. The value emitted from the component is the number selected/input by the user. Model updates on range or number input's `input` event or on the number input's `blur` event.
307
- #### Selector: particle-slider
308
- #### Inputs
309
- - `value` setter for the internal value of the component
310
- - `min` setter for the minimum value of the selectable range (default 0)
311
- - `max` setter for the maximum value of the selectable range (default 100)
312
- - `step` setter for the step size of the number range (default 1)
313
- - `unit` setter for the unit represented by the component value (purely for display purposes)
314
- - `disabled` whether the component is disabled
315
- - `ariaLabel` a string to append to the aria-label for the range/number input
316
- - `inputClassList` class-list to assign to the number input
317
- #### Outputs
318
- - `input` event emitted on range/number input's `input` event, emits the current value of the component
319
-
320
- ## ParticleTooltipModule
321
- ### TooltipDirective
322
- The tooltip directive allows for a tooltip to be displayed around an HTML element.
323
- #### Usage
324
- The tooltip directive accepts text to display and sets up mouse listeners to show the tooltip on host mouse enter hide on host mouse leave.
325
- #### Selector: particleTooltip
326
- #### Inputs
327
- - `particleTooltip` the tooltip text
328
- - `tooltipPosition` `'left' | 'right' | 'top' | 'bottom'`
329
- - `tooltipDisabled` whether the tooltip is disabled
330
-
331
- ## ParticleWeekPickerModule
332
- ### WeekPickerComponent
333
- The week picker component allows for a user to select a week of the year via a calendar widget.
334
- #### Usage
335
- The week picker accepts input through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the week picker, you can listen for its `ngModelChange` event (if using `ngModel`) or its `weekSelected` event. The value emitted from the component is an object in the form of `{ start: Date, end: Date }` (representing the interval of the selected week). Model updates on week select.
336
- #### Selector: particle-week-select
337
- #### Inputs
338
- - `value` setter for the internal value of the component
339
- - `disabled` whether the component is disabled
340
- - `dateRange` object in the form of `{ start: Date, end: Date }` that represents the valid date selection range for the calendar widget
341
- - `inputClassList` CSS class list to apply to the week display input
342
- - `calendarButtonClassList` CSS class list to apply to the calendar widget button
343
- - `ariaLabel` aria label to apply to the component
344
- - `dateFormat` the Angular date pipe format to apply to the selected week preview
345
- #### Outputs
346
- - `weekSelected` event emitted on week select, emits the selected week in the following format: `{ start: Date, end: Date }`
347
-
348
-
349
- ## ParticleAccordionModule
350
- ### AccordionComponent
351
- The accordion component allows for a user to add content within tabs which can expand/collapse the window which contains the content.
352
- #### Usage
353
- The accordion component accepts any a text header for each accordion tab with children that contains the content of each accordion tab.
354
- #### Selector: particle-accordion
355
- This selector is a parent wrapper of the following selector which contains each item
356
- #### Inputs
357
- - `multiple` a boolean attribute that allows the user to change the mode of accordion tabs to either display multiple tabs at once or only display one tab at a time.
358
-
359
- #### Selector: particle-accordion-item
360
- #### Inputs
361
- - `header` contains the header text value of each accordion tab
362
- - `particleAccordionContent` value goes under ng-template that associates its children to be the content of the accordion item
363
- - `disabled` whether the accordion item is disabled
364
-
365
- ## Usage
366
- `npm install @entake/particle`
367
-
368
- Component listing and usage coming soon.
369
-
370
- ## Further Help
371
-
372
- For more help, please reach out to `nick@entake.io`.
1
+ # Particle for Angular by Entake
2
+
3
+ This package offers a small selection of reusable components that are meant to replace usage of other Angular component libraries, like Angular Material and PrimeNG. If you're looking for a themeable alternative that gives you unprecedented control of your Angular components, give Particle a try! If you're interested in contributing or find any bugs, feel free to catch us on GitHub.
4
+
5
+ ## ParticleColorPickerModule
6
+ ### ColorPickerComponent
7
+ The color picker component is a simple way to choose/input a color in hexadecimal format. It offers a text input that allows for free entry in hexadecimal format along with a color picker for supported browsers. If the browser does not support the HTML5 color picker, it is replaced with a simple color swatch that acts as a preview of the contents of the text input.
8
+ #### Usage
9
+ The color picker accepts a hexadecimal color string (either in short or full form, leading `#` optional, case is ignored) through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the color picker, you can listen for its `ngModelChange` event (if using `ngModel`) or its `colorSelected` event. The value emitted from the component is a full hexadecimal color string (ex: `#0a50d3`). Model updates on every color picker input, every valid text input entry and when the contents of the text input are deleted by the user.
10
+ #### Selector: particle-color-picker
11
+ #### Inputs
12
+ - `value` setter for the internal value of the component
13
+ - `disabled` whether the component should be disabled
14
+ - `ariaLabel` the aria label to set for the color picker/text input
15
+ - `classList` CSS class list to apply to the text input
16
+ #### Outputs
17
+ - `input` event emitted on text input, emits the current value of the component
18
+ - `colorSelected` event emitted on color picker close or on valid hexadecimal string input from the text input, emits the selected color as a hexadecimal string
19
+
20
+ ## ParticleDatePickerModule
21
+ ### DatePickerComponent
22
+ The date picker component allows the user to enter a date via a text input (in the form of month/day/year) or through a calendar widget.
23
+ #### Usage
24
+ The date picker accepts a Date object through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the date picker, you can listen for its `ngModelChange` event (if using `ngModel`) or its `dateSelected` event. The value emitted from the component is a Date object representing the user's typed/selected date. Model updates on every calendar widget selection, every valid text input entry and when the contents of the text input are deleted by the user.
25
+ #### Selector: particle-date-picker
26
+ #### Inputs
27
+ - `value` setter for the internal value of the component
28
+ - `disabled` whether the component should be disabled
29
+ - `dateRange` object in the form of `{ minDate: Date, maxDate: Date}` that acts as the valid selection range for the input/calendar widget. Min date must be less than max date. If min date is not provided, the min date is set to January 1st, {currentYear - 100}. If max date is not provided, the max date is set to December 31st, {current year + 50}.
30
+ - `inputId` the ID to assign to the text input
31
+ - `ariaLabel` the aria label to assign to the text input
32
+ - `inputClassList` CSS class list to apply to the text input
33
+ - `calendarButtonClassList` CSS class list to apply to the calendar widget button
34
+ #### Outputs
35
+ - `input` event emitted on text input
36
+ - `dateSelected` event emitted on valid date input/widget date selection, emits the selected date
37
+ ### CalendarComponent
38
+ The calendar component displays a calendar widget with accessibility features such as arrow key navigation of calendar dates.
39
+ #### Usage
40
+ The calendar accepts a Date object through its `value` input. To read in the value of the calendar, you can listen for its `selected` event. The value emitted from the component is a Date object representing the user's selection.
41
+ #### Selector: particle-calendar
42
+ #### Inputs
43
+ - `value` setter for the internal value of the component
44
+ - `dateRange` object in the form of { minDate: Date, maxDate: Date} that acts as the valid selection range for the calendar. Min date must be less than max date. If min date is not provided, the min date is set to January 1st, {currentYear - 100}. If max date is not provided, the max date is set to December 31st, {current year + 50}.
45
+ #### Outputs
46
+ - `selected` event emitted on calendar date selection, emits the selected date
47
+ - `closed` event emitted when the user clicks outside the widget, triggers a keyup.escape event or clicks the done button. It is the parent component's responsibility to hide the calendar, the event is merely a signal that action should be taken.
48
+
49
+ ## ParticleDialogModule
50
+ ### DialogComponent
51
+ The dialog component displays dynamic content within a dialog and supports nested dialogs within that dynamic content.
52
+ #### Usage
53
+ The dialog component essentially wraps an `ng-content` block. It is the responsibility of the parent component to show/hide the dialog based on its `object` input and `closed` event. The dialog listens for `keyup.escape` events (if enabled) to trigger a dialog close. If you have components in the dynamic dialog content that also rely on escape events to close, those components must listen for keyups on its own focusable elements (as opposed to listening for `window.keyup`) and either stop immediate propagation, or those focusable elements must have the `data-dialog-close-override` attribute on them, or else the escape event will close both the child component and the parent dialog.
54
+ #### Selector: particle-dialog
55
+ #### Inputs
56
+ - `object` an input of type `any` where that input becoming truthy will show the dialog and falsy will hide
57
+ - `title` the title of the dialog. Note: always use the Angular input syntax (`[title]="'Title'"`) to avoid IE11 triggering a native tooltip of the dialog title
58
+ - `titleClass` CSS class to apply to the title section of the dialog
59
+ - `bodyClass` CSS class to apply to the body section of the dialog
60
+ - `showTitle` whether to show the title section of the dialog (default `true`)
61
+ - `allowClose` whether to show the dialog close button and enable escape to close (default `true`)
62
+ - `height` the height of dialog (can be any valid CSS measurement)
63
+ - `width` the width of dialog (can be any valid CSS measurement)
64
+ #### Outputs
65
+ - `opened` event emitted on dialog open
66
+ - `closed` event emitted on dialog close
67
+
68
+ ## ParticleDropdownModule
69
+ ### DropdownComponent
70
+ The dropdown component acts as an enhanced HTML select. It supports both regular dropdown options (only the label being displayed) and templated options (options for which you can supply a ng-template to act as a template for each dropdown option). The dropdown is fully accessible as well, and supports all the accessibility options that a native select would (such as arrow key controls for option selection).
71
+ #### Usage
72
+ The dropdown accepts a string or number through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the dropdown, you can listen for its `ngModelChange` event (if using `ngModel`) or its `change` event. The value emitted from the component is a string or number representing the value of the user's selected option. Model updates on every option change, whether it be triggered by clicking on an option or using arrow key controls.
73
+ #### Using Dropdown Options
74
+ The dropdown supports both flat options or option groups, and the options for a single dropdown can be a mix of the two. A dropdown option has a value (string or number), a label, disabled indicator, and an optional data context object (the data context object is not needed if you're not planning to use templating). Whether data context is passed in or not for an option, each option internally will have a data context object which will minimally contain the option's label (inserted into the `$implicit` property if not already taken, or the `label` property if `$implicit` is already present in the object). Dropdown option groups contain a group label, and an array of dropdown options.
75
+ #### Using Dropdown Option Templating
76
+ Dropdown option templating relies on Angular's `ng-template` syntax. To provide an option template to the dropdown, you simply define a `ng-template` as the content of the dropdown. If you do not wish to use templating, pass nothing into the content between the dropdown tags. To display data from an option's data context within the option template, you use Angular's `ng-template` `let-var` syntax. This allows you to define variables within the option template that will then be filled by the corresponding property in an option's data context. As mentioned in the previous section, the option's label is automatically added to each option's data context, so to display the label in the template, you can just define a variable without a value, and it will be filled by the `$implicit` entry. Here's an example of how a typical use case of the dropdown with templating would look:
77
+
78
+ ```html
79
+ <particle-dropdown [options]="[
80
+ { value: 'red', label: 'Red', dataContext: { 'colorClass': 'bg_red' } },
81
+ { value: 'green', label: 'Green', disabled: true, dataContext: { 'colorClass': 'bg_green' } },
82
+ { value: 'blue', label: 'Blue', dataContext: { 'colorClass': 'bg_blue' } },
83
+ { groupLabel: 'Purple Values', options: [
84
+ { value: 'darkPurple', label: 'Dark Purple', dataContext: { 'colorClass': 'bg_purple_dark_4' } },
85
+ { value: 'purple', label: 'Purple', dataContext: { 'colorClass': 'bg_purple' } },
86
+ { value: 'lightPurple', label: 'Light Purple', dataContext: { 'colorClass': 'bg_purple_light_4' } }
87
+ ]}
88
+ ]">
89
+ <ng-template let-colorClass="colorClass" let-label>
90
+ <div class="circle_14px mar_right5"
91
+ [ngClass]="colorClass">
92
+ </div> {{label}}
93
+ </ng-template>
94
+ </particle-dropdown>
95
+ ```
96
+ Notice how, in the `ng-template`, the variable definition value (in quotes) for `colorClass` matches up with the property of the same name in the data context objects for each option. Also notice how the variable definition for `label` has no value assigned, that's because the dropdown component will automatically put an option's label into the `$implicit` property, which Angular uses to fill in the value for any referenced variables that do not have a specified value. You can of course choose to explicitly add the label to the option's data context and use that value in the label variable assignment as well.
97
+ #### Selector: particle-dropdown
98
+ #### Inputs
99
+ - `value` string or number representing the value of the selected option
100
+ - `options` array of `DropdownOption | DropdownOptionGroup` acting as the options to populate the dropdown
101
+ - `disabled` whether the dropdown should be disabled or not
102
+ - `placeholder` placeholder text to show in the dropdown when no option is selected
103
+ - `ariaLabel` aria label to assign to the dropdown
104
+ - `classList` CSS class list to apply to the dropdown
105
+ #### Outputs
106
+ - change: event emitted on dropdown option selection if selection has changed from the previous value, emits the selected value
107
+
108
+ ## ParticleEndpointStateModule
109
+ ### EndpointStateComponent
110
+ The endpoint state component serves as a catch-all for displaying endpoint states (loading, not found and error).
111
+ #### Usage
112
+ The endpoint state component is split into four different possible states: loading, loadingOverlay, empty and error. You specify which state the component should be in by passing in `true` to the desired state as an input. Note: only one state should be active at a time.
113
+ #### Inputs
114
+ - `loading` whether the component should be in the loading state
115
+ - `loadingIcon` an icon class to display in the loading state
116
+ - `loadingText` main text to display in the loading state
117
+ - `loadingSubtext` subtext to display in the loading state
118
+ - `loadingOverlay` whether the component should be in the loading overlay state (whole-screen overlay)
119
+ - `loadingOverlayIcon` an icon class to display in the loading overlay state
120
+ - `loadingOverlayText` main text to display in the loading overlay state
121
+ - `loadingOverlaySubtext` subtext to display in the loading overlay state
122
+ - `empty` whether the component should be in the empty (not found) state
123
+ - `emptyIcon` an icon class to display in the empty state
124
+ - `emptyText` main text to display in the empty state
125
+ - `emptySubtext` subtext to display in the empty state
126
+ - `error` whether the component should be in the error state
127
+ - `errorIcon` an icon class to display in the error state
128
+ - `errorText` main text to display in the error state
129
+ - `errorSubtext` subtext to display in the error state
130
+
131
+ ## ParticleIconsModule
132
+ ### IconSelectComponent
133
+ The icon select component allows a user to search for and select either a Fontawesome or Particle (custom) icon.
134
+ ### Usage
135
+ The icon select accepts an icon class through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the icon select, you can listen for its `ngModelChange` event (if using `ngModel`) or its `selected` event. The value emitted from the component is the selected icon class. Model updates on confirm button click.
136
+ ### Inputs
137
+ - `value` setter for the internal value of the component
138
+ - `disabled` whether the component is disabled
139
+ - `buttonColorClass` CSS class to apply to the icon dialog show button
140
+ - `buttonSizing` the size (width/height) of the icon dialog show button in pixels
141
+ #### Outputs
142
+ - `opened` event emitted on icon dialog open
143
+ - `selected` event emitted on icon dialog confirmation, emits the selected icon in the form of `{ value: string }`
144
+ - `closed` event emitted on icon dialog close
145
+
146
+ ## ParticleKeyfilterModule
147
+ ### KeyfilterDirective
148
+ Directive to apply to HTML input elements to filter out certain input.
149
+ #### Usage
150
+ Supported filter types are `alpha` (English alphabet only), `numeric` (digits only) and `alphanumeric` (English alphabet and digits).
151
+ #### Selector: particleKeyfilter
152
+ #### Inputs
153
+ - `particleKeyfilter` the filter type to apply to the host input
154
+ - `allowSpaces` whether to allow spaces in input (default `false`)
155
+
156
+ ## ParticleMultiSelectModule
157
+ ### MultiSelectComponent
158
+ The multi-select component acts as an enhanced HTML select that allows multiple selections. It supports both regular multi-select options (only the label being displayed) and templated options (options for which you can supply a ng-template to act as a template for each multi-select option). The multi-select is fully accessible as well, and supports all the accessibility options that a multi-select should (such as arrow key controls for option selection).
159
+ #### Usage
160
+ The multi-select accepts an array of strings or numbers through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the multi-select, you can listen for its `ngModelChange` event (if using `ngModel`) or its `change` event. The value emitted from the component is an array of strings or numbers representing the values of the user's selected options. Model updates on every option select/de-select, whether it be triggered by clicking on an option or using arrow key controls.
161
+ #### Using Dropdown Options
162
+ The multi-select supports both flat options or option groups, and the options for a single multi-select can be a mix of the two. A multi-select option has a value (string or number), a label, disabled indicator, and an optional data context object (the data context object is not needed if you're not planning to use templating). Whether data context is passed in or not for an option, each option internally will have a data context object which will minimally contain the option's label (inserted into the `$implicit` property if not already taken, or the `label` property if `$implicit` is already present in the object). Multi-select option groups contain a group label, and an array of multi-select options.
163
+ #### Using Dropdown Option Templating
164
+ Multi-select option templating relies on Angular's `ng-template` syntax. To provide an option template to the multi-select, you simply define a `ng-template` as the content of the multi-select. If you do not wish to use templating, pass nothing into the content between the multi-select tags. To display data from an option's data context within the option template, you use Angular's `ng-template` `let-var` syntax. This allows you to define variables within the option template that will then be filled by the corresponding property in an option's data context. As mentioned in the previous section, the option's label is automatically added to each option's data context, so to display the label in the template, you can just define a variable without a value, and it will be filled by the `$implicit` entry. Here's an example of how a typical use case of the multi-select with templating would look:
165
+
166
+ ```html
167
+ <particle-multi-select [options]="[
168
+ { value: 'red', label: 'Red', dataContext: { 'colorClass': 'bg_red' } },
169
+ { value: 'green', label: 'Green', disabled: true, dataContext: { 'colorClass': 'bg_green' } },
170
+ { value: 'blue', label: 'Blue', dataContext: { 'colorClass': 'bg_blue' } },
171
+ { groupLabel: 'Purple Values', options: [
172
+ { value: 'darkPurple', label: 'Dark Purple', dataContext: { 'colorClass': 'bg_purple_dark_4' } },
173
+ { value: 'purple', label: 'Purple', dataContext: { 'colorClass': 'bg_purple' } },
174
+ { value: 'lightPurple', label: 'Light Purple', dataContext: { 'colorClass': 'bg_purple_light_4' } }
175
+ ]}
176
+ ]">
177
+ <ng-template let-colorClass="colorClass" let-label>
178
+ <div class="circle_14px mar_right5"
179
+ [ngClass]="colorClass">
180
+ </div> {{label}}
181
+ </ng-template>
182
+ </particle-multi-select>
183
+ ```
184
+ Notice how, in the `ng-template`, the variable definition value (in quotes) for `colorClass` matches up with the property of the same name in the data context objects for each option. Also notice how the variable definition for `label` has no value assigned, that's because the multi-select component will automatically put an option's label into the `$implicit` property, which Angular uses to fill in the value for any referenced variables that do not have a specified value. You can of course choose to explicitly add the label to the option's data context and use that value in the label variable assignment as well.
185
+ #### Selector: particle-multi-select
186
+ #### Inputs
187
+ - `value` array of strings or numbers representing the value of the selected options
188
+ - `options` array of `MultiSelectOption | MultiSelectOptionGroup` acting as the options to populate the multi-select
189
+ - `disabled` whether the multi-select should be disabled or not
190
+ - `placeholder` placeholder text to show in the multi-select when no options are selected
191
+ - `ariaLabel` aria label to assign to the multi-select
192
+ - `classList` CSS class list to apply to the multi-select
193
+ #### Outputs
194
+ - `change` event emitted on multi-select option selection if selection has changed from the previous value, emits the selected values
195
+
196
+ ## ParticleNotificationModule
197
+ ### Notifications
198
+ A notification is a simple way to provide feedback to a user in respect to some action (successful resource save, some error occurred, etc).
199
+ Notifications have an ID (system generated), severity (`'success' | 'info' | 'warn' | 'error'`), summary and detail message (optional).
200
+ ### NotificationComponent
201
+ The notification component allows for the display of notifications in an application.
202
+ #### Usage
203
+ The notification component should be dropped into the app root so that the display of notifications is available throughout the entire application. Once the component has been placed, no further action is needed. It's up to other components/services to add notifications for display in the notification component.
204
+ ### NotificationService
205
+ The notification service is a root `Injectable` that allows components/services throughout an application to add notifications to the notification pool for display.
206
+ #### Usage
207
+ The notification service can be injected into components/services to add a notification through its `add` method, which accepts a notification object, adds it and then removes it after the configured notification life has passed. Notification life (the time before a notification is automatically removed from the view) can also be configured via the service's `setNotificationLife` method.
208
+ #### Methods
209
+ - `add` accepts a notification object and adds it to the current notifications array
210
+ - `deleteNotification` accepts a notification ID and deletes the corresponding notification (if it exists)
211
+ - `getNotifications` get an array of the current notifications as an RxJS Observable
212
+ - `setNotificationLife` set the notification life for new notifications
213
+
214
+ ## ParticleOrdinalNumberPipeModule
215
+ ### OrdinalNumberPipe
216
+ The ordinal number pipe transforms a number into an ordinal number (1 => 1st, 2 => 2nd, 3 => 3rd, etc).
217
+ #### Usage
218
+ The ordinal number pipe accepts a number or a numeric string and transforms it into ordinal format.
219
+ #### Name: ordinalNumber
220
+
221
+ ## ParticlePaginatorModule
222
+ ### PaginatorComponent
223
+ The paginator component is a widget that provides controls for paginating a list.
224
+ #### Usage
225
+ The paginator component accepts an array of page size options, the current page size, and the total size of the paginated list without pagination applied, and from those inputs calculates the page number display and enables/disables the next/previous pagination buttons. Pagination control interactions emit a `PaginationEvent`, it is up to the parent component to react to that event and update the pagination as a result.
226
+ #### Selector: particle-paginator
227
+ #### Inputs
228
+ - `version` which version of the paginator to user (1-4 available)
229
+ - `pageSizeOptions` an array of numbers representing the available page size options
230
+ - `pageSize` a number representing the currently selected page size
231
+ - `totalLength` the total length of the unpaginated list
232
+ #### Outputs
233
+ - `pagination` event emitted on pagination control interactions, emits a `PaginationEvent` (`{ activePage: number, pageSize: number, totalLength: number }`)
234
+
235
+ ## ParticlePopoverModule
236
+ ### PopoverComponent
237
+ The popover component displays a popover with dynamic content around a given target.
238
+ #### Usage
239
+ The popover component is a wrapper around an `ng-content` block and has no content itself. The popover is positioned via its `toggle` method, which accepts an `Event` and positions itself off of the `EventTarget`. If the toggle method is called with an event, and the popover is currently closed, the popover opens and aligns to the event target. If the toggle method is called, and the popover is open or no event is passed in, the popover will close.
240
+ #### Selector: particle-popover
241
+ #### Inputs
242
+ - `offset` the number of pixels to offset the popover from its target
243
+ - `width` the width of the popover (any valid CSS measurement, default `auto`)
244
+ - `height` the height of the popover (any valid CSS measurement, default `auto`)
245
+ #### Outputs
246
+ - `opened` event emitted on popover open
247
+ - `closed` event emitted on popover close
248
+
249
+ ## ParticleProfilePicModule
250
+ ### ProfilePicComponent
251
+ The profile pic component displays a round image with a tooltip description to act as a profile picture.
252
+ #### Usage
253
+ The profile pic component accepts an image URL and displays it.
254
+ #### Selector: particle-profile-pic
255
+ #### Inputs
256
+ - `size` the size of the picture
257
+ - `margin` the CSS margin
258
+ - `width` the width of the picture
259
+ - `height` the height of the picture
260
+ - `toolTip` text to pass as the content of the image tooltip
261
+
262
+ ## ParticlePushContainerModule
263
+ ### PushContainerComponent
264
+ The push container component serves as a side menu (left or right) which display dynamic content
265
+ #### Usage
266
+ The push container component accepts dynamic content in between its tags and displays it.
267
+ #### Selector: particle-push-container
268
+ #### Inputs
269
+ - `width` the number of pixels wide
270
+ - `showSidePanel` whether to be open on page load (default `false`)
271
+ - `mainContentId` the ID of the main content that will be pushed when the component opens
272
+ - `side` open from the left or right
273
+ - `topOffset` top offset to account for a nav bar
274
+ - `closeOnResize` whether to close the component on window resize (default `false`)
275
+ - `backgroundColorClass` the CSS class to apply to the background of the component
276
+ - `breakpoint` the breakpoint passed which the push container will fill the entire view
277
+ - `hideCloseButton` whether to hide the push container close button (default `false`)
278
+ - `alwaysShowClose` whether to show the close button in desktop view (default `false`)
279
+ #### Outputs
280
+ - `opened` event emitted on push container open
281
+ - `closed` event emitted on push container close
282
+
283
+ ## ParticleRichTextModule
284
+ ### RichTextComponent
285
+ The rich text component is an Angular wrapper around a Quill rich text editor.
286
+ #### Usage
287
+ The rich text component accepts an HTML paragraph as a string through either its value input or through one/two-way data-binding via `ngModel`. To read in the value of the editor, you can listen for its `ngModelChange` event (if using `ngModel`) or its `textChanged` event. The value emitted from the component is stringified HTML representing the value of the user's input. Model updates on editor input.
288
+ #### Selector: particle-rich-text
289
+ #### Inputs
290
+ - `value` setter for the internal value of the component
291
+ - `doHideShow` whether to show the rich text controls
292
+ - `height` the height of the editor
293
+ - `readonly` whether the editor is readonly
294
+ - `placeholder` the placeholder to display in the editor if no input
295
+ - `toolbarClassList` CSS class list to apply to the editor toolbar
296
+ - `editorClassList` CSS class list to apply to the editor
297
+ #### Outputs
298
+ - `textChanged` event emitted on text change, emits an object in the following format: `{ htmlValue: string, textValue: string, delta: any, source: any }`
299
+ - `selectionChange` event emitted on editor selection change
300
+ - `init` event emitted on editor init
301
+
302
+ ## ParticleSliderModule
303
+ ### SliderComponent
304
+ The slider component allows for the user to select a number from a range using an HTML5 range input or through an HTML5 number input.
305
+ #### Usage
306
+ The slider component accepts a number through either its value input or through one/two-way data-binding via `ngModel`. To read in the value of the component, you can listen for its `ngModelChange` event (if using `ngModel`) or its `input` event. The value emitted from the component is the number selected/input by the user. Model updates on range or number input's `input` event or on the number input's `blur` event.
307
+ #### Selector: particle-slider
308
+ #### Inputs
309
+ - `value` setter for the internal value of the component
310
+ - `min` setter for the minimum value of the selectable range (default 0)
311
+ - `max` setter for the maximum value of the selectable range (default 100)
312
+ - `step` setter for the step size of the number range (default 1)
313
+ - `unit` setter for the unit represented by the component value (purely for display purposes)
314
+ - `disabled` whether the component is disabled
315
+ - `ariaLabel` a string to append to the aria-label for the range/number input
316
+ - `inputClassList` class-list to assign to the number input
317
+ #### Outputs
318
+ - `input` event emitted on range/number input's `input` event, emits the current value of the component
319
+
320
+ ## ParticleTooltipModule
321
+ ### TooltipDirective
322
+ The tooltip directive allows for a tooltip to be displayed around an HTML element.
323
+ #### Usage
324
+ The tooltip directive accepts text to display and sets up mouse listeners to show the tooltip on host mouse enter hide on host mouse leave.
325
+ #### Selector: particleTooltip
326
+ #### Inputs
327
+ - `particleTooltip` the tooltip text
328
+ - `tooltipPosition` `'left' | 'right' | 'top' | 'bottom'`
329
+ - `tooltipDisabled` whether the tooltip is disabled
330
+
331
+ ## ParticleWeekPickerModule
332
+ ### WeekPickerComponent
333
+ The week picker component allows for a user to select a week of the year via a calendar widget.
334
+ #### Usage
335
+ The week picker accepts input through either its `value` input or through one/two-way data-binding via `ngModel`. To read in the value of the week picker, you can listen for its `ngModelChange` event (if using `ngModel`) or its `weekSelected` event. The value emitted from the component is an object in the form of `{ start: Date, end: Date }` (representing the interval of the selected week). Model updates on week select.
336
+ #### Selector: particle-week-select
337
+ #### Inputs
338
+ - `value` setter for the internal value of the component
339
+ - `disabled` whether the component is disabled
340
+ - `dateRange` object in the form of `{ start: Date, end: Date }` that represents the valid date selection range for the calendar widget
341
+ - `inputClassList` CSS class list to apply to the week display input
342
+ - `calendarButtonClassList` CSS class list to apply to the calendar widget button
343
+ - `ariaLabel` aria label to apply to the component
344
+ - `dateFormat` the Angular date pipe format to apply to the selected week preview
345
+ #### Outputs
346
+ - `weekSelected` event emitted on week select, emits the selected week in the following format: `{ start: Date, end: Date }`
347
+
348
+
349
+ ## ParticleAccordionModule
350
+ ### AccordionComponent
351
+ The accordion component allows for a user to add content within tabs which can expand/collapse the window which contains the content.
352
+ #### Usage
353
+ The accordion component accepts any a text header for each accordion tab with children that contains the content of each accordion tab.
354
+ #### Selector: particle-accordion
355
+ This selector is a parent wrapper of the following selector which contains each item
356
+ #### Inputs
357
+ - `multiple` a boolean attribute that allows the user to change the mode of accordion tabs to either display multiple tabs at once or only display one tab at a time.
358
+
359
+ #### Selector: particle-accordion-item
360
+ #### Inputs
361
+ - `header` contains the header text value of each accordion tab
362
+ - `particleAccordionContent` value goes under ng-template that associates its children to be the content of the accordion item
363
+ - `disabled` whether the accordion item is disabled
364
+
365
+ ## Usage
366
+ `npm install @entake/particle`
367
+
368
+ Component listing and usage coming soon.
369
+
370
+ ## Further Help
371
+
372
+ For more help, please reach out to `nick@entake.io`.