From 00bdeec7142970a8c210175bfe54f4b85de9b114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Balet?= Date: Tue, 5 Nov 2024 15:02:45 +0100 Subject: [PATCH] refactor(README): remove duplicate --- package.json | 3 +- projects/ngx-mat-birthday-input/README.md | 87 ----------------------- 2 files changed, 2 insertions(+), 88 deletions(-) delete mode 100644 projects/ngx-mat-birthday-input/README.md diff --git a/package.json b/package.json index 450f1ab..7db609c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "watch": "ng build --watch --configuration development", "test": "ng test", "test:ci": "ng test ngx-mat-birthday-input --watch=false --code-coverage --no-progress --browsers=ChromeHeadless", - "publish": "ng build ngx-mat-birthday-input --configuration production && npm publish ./dist/ngx-mat-birthday-input", + "publish": "ng build ngx-mat-birthday-input --configuration production && npm run copy-files && npm publish ./dist/ngx-mat-birthday-input", + "copy-files": "cp README.md dist/ngx-mat-birthday-input && cp LICENSE dist/ngx-mat-birthday-input", "prepare": "husky" }, "private": true, diff --git a/projects/ngx-mat-birthday-input/README.md b/projects/ngx-mat-birthday-input/README.md deleted file mode 100644 index 6ce14cb..0000000 --- a/projects/ngx-mat-birthday-input/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# NgxMatBirthdayInput -An Angular Material library for entering a birthday. - -![NPM](https://img.shields.io/npm/l/ngx-href) -[![npm version](https://img.shields.io/npm/v/ngx-mat-birthday-input.svg)](https://www.npmjs.com/package/ngx-mat-birthday-input) -![npm bundle size](https://img.shields.io/bundlephobia/min/ngx-mat-birthday-input) -![npm](https://img.shields.io/npm/dm/ngx-mat-birthday-input) - -1. Split a date into 3 input fields, day, month and year, then reassemble and save them into a given formControl. -2. **Automatically add `0`** in front of the day/month number. -3. **Remove `.` and `e`** from the possible input. -4. Does **automatically focus the next field** when needed. -5. Based on the [Vitaly Friedman](https://www.smashingmagazine.com/author/vitaly-friedman/) article, [Designing Birthday Picker UX: Simpler Is Better](https://www.smashingmagazine.com/2021/05/frustrating-design-patterns-birthday-picker/#designing-a-better-birthday-input) - - -| fill | outlined | -| --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| ![Input example](https://raw.githubusercontent.com/rbalet/ngx-mat-birthday-input/main/assets/example.png) | ![Input example](https://raw.githubusercontent.com/rbalet/ngx-mat-birthday-input/main/assets/example-2.png) | - -**Supports:** -- Angular >=15 -- Angular Material >=15 - -## Demo -- https://stackblitz.com/~/github.com/rbalet/ngx-mat-birthday-input - - ## Installation - - `npm i ngx-mat-birthday-input` - - ## Usage - - ### Import - -Add `NgxMatBirthdayInputComponent` to your component file: - -```ts -imports: [NgxMatBirthdayInputComponent]; -``` - -## Example -* Add `floatLabel` to your `mat-form-field` -* Use a preset `formControlName` -* This `formControlName` will be automatically updated, therefore giving you the possibility to add your own `mat-error` _see the comment_ - -```html -
- - - - - - - - -
-``` - -## Options - -| Options | Type | Default | Description | -| --------------- | --------------- | ---------------------- | -------------------------------- | -| formControlName | `FormControl` | `undefined` | Control to be updated | -| autocomplete | `"on" or "off"` | `"on"` | Use the default browser autofill | -| labels | `string[]` | `["DD", "MM", "YYYY"]` | Label used by the mat-input | -| placeholders | `string[]` | `["", "", ""]` | with an *s* | -| required | `boolean` | `undefined` | | -| disabled | `boolean` | `undefined` | | - -## Css variable -| Name | Default | Explanation | -| ------------------------------ | ------- | --------------------------------- | -| `--ngx-mat-birthday-input-gap` | `16px` | Change the gap between the inputs | - - -## Authors and acknowledgment -* maintainer [Raphaƫl Balet](https://github.com/rbalet) - -[![BuyMeACoffee](https://www.buymeacoffee.com/assets/img/custom_images/purple_img.png)](https://www.buymeacoffee.com/widness)