monkey-style-guide 2.0.105 → 2.0.106
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
|
@@ -194,18 +194,101 @@ import { MonkeyCheckboxModule } from 'monkey-style-guide';
|
|
|
194
194
|
|
|
195
195
|
```HTML
|
|
196
196
|
<monkey-checkbox
|
|
197
|
-
description="I Agree to Terms"
|
|
197
|
+
description="I Agree to Terms"
|
|
198
198
|
errorMessage="Validation Message"
|
|
199
199
|
formControlName="terms"
|
|
200
200
|
helperMessage="Mandatory"
|
|
201
201
|
infoMessage="Info message"
|
|
202
202
|
label="Terms and Conditions"
|
|
203
|
-
type="single"
|
|
203
|
+
type="single">
|
|
204
204
|
</monkey-checkbox>
|
|
205
205
|
```
|
|
206
206
|
|
|
207
207
|
---
|
|
208
208
|
|
|
209
|
+
### **Date Range Picker**
|
|
210
|
+
|
|
211
|
+
![Date Range Picker Demo Screen Shot][date-range-picker]
|
|
212
|
+
|
|
213
|
+
Parameters:
|
|
214
|
+
|
|
215
|
+
- **errorMessage** (string) message to alert user
|
|
216
|
+
- **helperMessage** (optional)(string) can be used with type single, for formfield purpose
|
|
217
|
+
- **infoMessage** (optional)(string) message to help user knows about this component purpose
|
|
218
|
+
- **label** (string) define the label that will be displayed inside
|
|
219
|
+
- **i18n** (Object) an i18n object (see example)
|
|
220
|
+
|
|
221
|
+
Events:
|
|
222
|
+
|
|
223
|
+
- **onChange** event emited when user select a range of dates or when clicked on some action
|
|
224
|
+
|
|
225
|
+
Example:
|
|
226
|
+
|
|
227
|
+
`example.module.ts`
|
|
228
|
+
|
|
229
|
+
```Typescript
|
|
230
|
+
import { MonkeyDateRangePicker } from 'monkey-style-guide';
|
|
231
|
+
|
|
232
|
+
...
|
|
233
|
+
|
|
234
|
+
@NgModule({
|
|
235
|
+
imports: [MonkeyDateRangePicker]
|
|
236
|
+
})
|
|
237
|
+
...
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
`example.component.html`
|
|
241
|
+
|
|
242
|
+
```HTML
|
|
243
|
+
<monkey-date-range-picker
|
|
244
|
+
errorMessage="Error Message"
|
|
245
|
+
helperMessage="Helper Message"
|
|
246
|
+
infoMessage="Info Message"
|
|
247
|
+
label="Label"
|
|
248
|
+
[i18n]="i18n">
|
|
249
|
+
</monkey-date-range-picker>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
`example.component.ts`
|
|
253
|
+
|
|
254
|
+
```Typescript
|
|
255
|
+
...
|
|
256
|
+
i18n = {
|
|
257
|
+
months: {
|
|
258
|
+
'1': 'January',
|
|
259
|
+
'2': 'Febuary',
|
|
260
|
+
'3': 'March',
|
|
261
|
+
'4': 'April',
|
|
262
|
+
'5': 'May',
|
|
263
|
+
'6': 'June',
|
|
264
|
+
'7': 'July',
|
|
265
|
+
'8': 'August',
|
|
266
|
+
'9': 'September',
|
|
267
|
+
'10': 'October',
|
|
268
|
+
'11': 'November',
|
|
269
|
+
'12': 'December'
|
|
270
|
+
},
|
|
271
|
+
days: {
|
|
272
|
+
'1': 'Sun.',
|
|
273
|
+
'2': 'Mon.',
|
|
274
|
+
'3': 'Tue.',
|
|
275
|
+
'4': 'Wed.',
|
|
276
|
+
'5': 'Thu.',
|
|
277
|
+
'6': 'Fri.',
|
|
278
|
+
'7': 'Sat.'
|
|
279
|
+
},
|
|
280
|
+
actions: {
|
|
281
|
+
'30': '30 days',
|
|
282
|
+
'60': '60 days',
|
|
283
|
+
'90': '90 days'
|
|
284
|
+
},
|
|
285
|
+
today: 'Today'
|
|
286
|
+
};
|
|
287
|
+
...
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
209
292
|
### **Expansion**
|
|
210
293
|
|
|
211
294
|
![Expansion Demo Screen Shot][expansion-screenshot1]
|
|
@@ -501,13 +584,13 @@ import { MonkeyInputModule } from 'monkey-style-guide';
|
|
|
501
584
|
|
|
502
585
|
```HTML
|
|
503
586
|
<monkey-input
|
|
504
|
-
errorMessage="Validation Message"
|
|
587
|
+
errorMessage="Validation Message"
|
|
505
588
|
formControlName="name"
|
|
506
589
|
helperMessage="Mandatory"
|
|
507
590
|
icon="user-s20"
|
|
508
591
|
infoMessage="Info message"
|
|
509
592
|
label="Name"
|
|
510
|
-
placeholder="Input your full name"
|
|
593
|
+
placeholder="Input your full name">
|
|
511
594
|
</monkey-input>
|
|
512
595
|
```
|
|
513
596
|
|
|
@@ -1065,6 +1148,7 @@ export class AppComponent {
|
|
|
1065
1148
|
[input-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/input.png
|
|
1066
1149
|
[select-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/select.png
|
|
1067
1150
|
[checkbox-screenshot]: https://dev-monkey-emails.s3-us-west-2.amazonaws.com/monkey-style-guide/demos/images/checkbox.png
|
|
1151
|
+
[date-range-picker]: https://user-images.githubusercontent.com/12416871/146080473-8543b9ae-7186-42ee-8ec8-bfd1eef09df6.png
|
|
1068
1152
|
[expansion-screenshot1]: https://user-images.githubusercontent.com/10110065/111636157-f8b08080-87d6-11eb-86ab-86839297d068.png
|
|
1069
1153
|
[expansion-screenshot2]: https://user-images.githubusercontent.com/10110065/111636340-24336b00-87d7-11eb-9f19-504ab96cc9af.png
|
|
1070
1154
|
[file-upload-screenshot1]: https://user-images.githubusercontent.com/10110065/111640018-8b065380-87da-11eb-8d47-87ddea29b943.png
|
|
Binary file
|