yukit 0.0.1 → 0.0.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.
package/README.md CHANGED
@@ -1,24 +1,331 @@
1
1
  # Yukit
2
2
 
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.0.
3
+ Yukit provides a collection of components that can be used to build apps. These components are designed to easily
4
+ integrate with Ionic Angular apps.
4
5
 
5
- ## Code scaffolding
6
+ ## Dependencies
6
7
 
7
- Run `ng generate component component-name --project yukit` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project yukit`.
8
- > Note: Don't forget to add `--project yukit` or else it will be added to the default project in your `angular.json` file.
8
+ - [Angular](https://angular.dev/) v18
9
+ - [Ionic](https://ionicframework.com/docs/) v8
9
10
 
10
- ## Build
11
+ ## Installation
11
12
 
12
- Run `ng build yukit` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+ ```
14
+ npm install yukit
15
+ ```
13
16
 
14
- ## Publishing
17
+ ## Configuration
15
18
 
16
- After building your library with `ng build yukit`, go to the dist folder `cd dist/yukit` and run `npm publish`.
19
+ ##### Add styles in ``angular.json``
17
20
 
18
- ## Running unit tests
19
21
 
20
- Run `ng test yukit` to execute the unit tests via [Karma](https://karma-runner.github.io).
22
+ ```json
23
+ {
24
+ "styles": ["node_modules/yukit/src/lib/yukit.scss"]
25
+ }
26
+ ```
21
27
 
22
- ## Further help
28
+ ##### Import ``YukitModule`` in component module
23
29
 
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
30
+ ```typescript
31
+ import { YukitModule } from 'yukit';
32
+
33
+ @NgModule({
34
+ imports: [YukitModule],
35
+ declarations: [AppComponent]
36
+ })
37
+ export class AppModule {
38
+ }
39
+ ```
40
+
41
+ ## Components
42
+
43
+ ### Avatar
44
+
45
+ ```html
46
+ <yu-avatar></yu-avatar>
47
+ ```
48
+
49
+ | Attribute | Type | Default |
50
+ |:----------|:---------------------|-------------|
51
+ | picture | `string`|`undefined` | `undefined` |
52
+
53
+ ### Badge
54
+
55
+ ```html
56
+ <yu-badge></yu-badge>
57
+ ```
58
+
59
+ | Attribute | Type | Default |
60
+ |:----------|:--------------------------------------------------------------------------------|-----------|
61
+ | type | `dot`|`digit` | `digit` |
62
+ | color | `primary`|`success`|`error`|`warning`|`info`|`medium`|`gradient`|`light`|`dark` | `primary` |
63
+
64
+ ### Button
65
+
66
+ ```html
67
+ <yu-button></yu-button>
68
+ ```
69
+
70
+ | Attribute | Type | Default |
71
+ |:----------|:--------------------------------------------------------------------------------|-------------|
72
+ | type | `clear`|`outline`|`solid`|`default`|`undefined` | `undefined` |
73
+ | expand | `block`|`full`|`undefined` | `undefined` |
74
+ | size | `small`|`medium`|`large` | `medium` |
75
+ | color | `primary`|`success`|`error`|`warning`|`info`|`medium`|`gradient`|`light`|`dark` | `primary` |
76
+ | disabled | `boolean` | `false` |
77
+
78
+ ### Checkbox
79
+
80
+ ```html
81
+ <yu-checkbox></yu-checkbox>
82
+ ```
83
+
84
+ | Attribute | Type | Default |
85
+ |:-----------------|:--------------------------------|-----------------|
86
+ | justify | `end`|`space-between`|`start` | `space-between` |
87
+ | labelPlacement | `end`|`fixed`|`stacked`|`start` | `start` |
88
+ | alignment | `start`|`center` | `center` |
89
+ | indeterminate | `boolean` | `false` |
90
+ | disabled | `boolean` | `false` |
91
+ | helperText | `string`|`undefined` | `undefined` |
92
+ | isIncorrectValue | `boolean` | `false` |
93
+
94
+ ### Chip
95
+
96
+ ```html
97
+ <yu-chip></yu-chip>
98
+ ```
99
+
100
+ | Attribute | Type | Default |
101
+ |:----------|:--------------------------------------------------------------------------------------------|-------------|
102
+ | startIcon | `string`|`undefined` | `undefined` |
103
+ | endIcon | `string`|`undefined` | `undefined` |
104
+ | badge | `primary`|`success`|`error`|`warning`|`info`|`medium`|`gradient`|`light`|`dark`|`undefined` | `undefined` |
105
+
106
+ ### Helper
107
+
108
+ ```html
109
+ <yu-helper></yu-helper>
110
+ ```
111
+
112
+ | Attribute | Type | Default |
113
+ |:----------|:--------------------------------------------------------------------------------|-------------|
114
+ | icon | `string`|`undefined` | `undefined` |
115
+ | color | `primary`|`success`|`error`|`warning`|`info`|`medium`|`gradient`|`light`|`dark` | `primary` |
116
+
117
+ ### Icon
118
+
119
+ List of all icons: https://phosphoricons.com/
120
+
121
+ ```html
122
+ <yu-icon></yu-icon>
123
+ ```
124
+
125
+ | Attribute | Type | Default |
126
+ |:----------|:--------------------------------------------------------------------------------|------------|
127
+ | name | `string` | |
128
+ | color | `primary`|`success`|`error`|`warning`|`info`|`medium`|`gradient`|`light`|`dark` | `gradient` |
129
+
130
+ ### Input
131
+
132
+ ```html
133
+ <yu-input></yu-input>
134
+ ```
135
+
136
+ | Attribute | Type | Default |
137
+ |:-----------------|:------------------------------------------------------------------------------------------------------|-------------|
138
+ | label | `string` | |
139
+ | placeholder | `string` | |
140
+ | type | `date`|`datetime-local`|`email`|`month`|`number`|`password`|`search`|`tel`|`text`|`time`|`url`|`week` | `text` |
141
+ | inputmode | `decimal`|`email`|`none`|`numeric`|`search`|`tel`|`text`|`url`|`password`|`undefined` | `undefined` |
142
+ | autocapitalize | `string` | `off` |
143
+ | passwordToggle | `boolean` | `false` |
144
+ | disabled | `boolean` | `false` |
145
+ | helperText | `string`|`undefined` | `undefined` |
146
+ | isIncorrectValue | `boolean` | `false` |
147
+
148
+ ### List action
149
+
150
+ ```html
151
+ <yu-list-action></yu-list-action>
152
+ ```
153
+
154
+ | Attribute | Type | Default |
155
+ |:----------|:--------------------------------------------------------------------------------|-----------|
156
+ | color | `primary`|`success`|`error`|`warning`|`info`|`medium`|`gradient`|`light`|`dark` | `primary` |
157
+
158
+ ### Notice
159
+
160
+ ```html
161
+ <yu-notice></yu-notice>
162
+ ```
163
+
164
+ | Attribute | Type | Default |
165
+ |:----------|:--------------------------------------------------------------------------------|--------------------|
166
+ | name | `string` | |
167
+ | message | `string` | |
168
+ | icon | `string` | `"warning-circle"` |
169
+ | color | `primary`|`success`|`error`|`warning`|`info`|`medium`|`gradient`|`light`|`dark` | `primary` |
170
+
171
+ ### Searchbar
172
+
173
+ ```html
174
+ <yu-searchbar></yu-searchbar>
175
+ ```
176
+
177
+ | Attribute | Type | Default |
178
+ |:------------|:----------|------------|
179
+ | placeholder | `string` | `"Buscar"` |
180
+ | setFocus | `boolean` | `false` |
181
+
182
+ ### Tag
183
+
184
+ ```html
185
+ <yu-tag></yu-tag>
186
+ ```
187
+
188
+ | Attribute | Type | Default |
189
+ |:----------|:--------------------------------------------------------------------------------|-------------|
190
+ | icon | `string`|`undefined` | `undefined` |
191
+ | type | `contained`|`outlined` | `contained` |
192
+ | color | `primary`|`success`|`error`|`warning`|`info`|`medium`|`gradient`|`light`|`dark` | `primary` |
193
+ | disabled | `boolean` | `false` |
194
+
195
+ ### Textarea
196
+
197
+ ```html
198
+ <yu-textarea></yu-textarea>
199
+ ```
200
+
201
+ | Attribute | Type | Default |
202
+ |:-----------------|:------------------------------------------------------------------------------------------------------|-------------|
203
+ | label | `string` | |
204
+ | placeholder | `string` | |
205
+ | type | `date`|`datetime-local`|`email`|`month`|`number`|`password`|`search`|`tel`|`text`|`time`|`url`|`week` | `text` |
206
+ | inputmode | `decimal`|`email`|`none`|`numeric`|`search`|`tel`|`text`|`url`|`password`|`undefined` | `undefined` |
207
+ | autocapitalize | `string` | `off` |
208
+ | rows | `number`|`undefined` | `undefined` |
209
+ | cols | `number`|`undefined` | `undefined` |
210
+ | autoGrow | `boolean` | `false` |
211
+ | disabled | `boolean` | `false` |
212
+ | helperText | `string`|`undefined` | `undefined` |
213
+ | isIncorrectValue | `boolean` | `false` |
214
+
215
+ ### Toggle
216
+
217
+ ```html
218
+ <yu-toggle></yu-toggle>
219
+ ```
220
+
221
+ | Attribute | Type | Default |
222
+ |:-----------------|:--------------------------------|-----------------|
223
+ | justify | `end`|`space-between`|`start` | `space-between` |
224
+ | labelPlacement | `end`|`fixed`|`stacked`|`start` | `start` |
225
+ | alignment | `start`|`center` | `center` |
226
+ | disabled | `boolean` | `false` |
227
+ | helperText | `string`|`undefined` | `undefined` |
228
+ | isIncorrectValue | `boolean` | `false` |
229
+
230
+ ### Alert
231
+
232
+ ##### Animations.
233
+
234
+ * ``enterAnimation``
235
+ * ``leaveAnimation``
236
+
237
+ NOTE: The animations are in an external service
238
+
239
+ ##### Buttons
240
+
241
+ * Principal button:
242
+ * ``role``: destructive
243
+
244
+ * Cancel button:
245
+ * ``role``: cancel
246
+
247
+
248
+ ```typescript
249
+ const alert = await this.alertCtrl.create({
250
+ enterAnimation: this.animationsService.showAlertAnimation,
251
+ leaveAnimation: this.animationsService.hideAlertAnimation,
252
+ header: 'Logout',
253
+ buttons: [
254
+ {
255
+ text: 'Cancel',
256
+ role: 'cancel',
257
+ },
258
+ {
259
+ text: 'Logout',
260
+ role: 'destructive',
261
+ }
262
+ ]
263
+ });
264
+
265
+ await alert.present();
266
+ ```
267
+
268
+ ### Action sheet
269
+
270
+ ##### Buttons
271
+
272
+ * Principal button:
273
+ * ``role``: principal
274
+
275
+ * Cancel button:
276
+ * ``text``: empty text
277
+ * ``role``: cancel
278
+
279
+ ```typescript
280
+ const actionSheet = await this.actionSheetCtrl.create({
281
+ header: 'Options',
282
+ buttons: [
283
+ {
284
+ text: 'Delete all',
285
+ role: 'principal',
286
+ },
287
+ {
288
+ text: '',
289
+ role: 'cancel',
290
+ }
291
+ ]
292
+ });
293
+
294
+ await actionSheet.present();
295
+ ```
296
+
297
+ ### Toast
298
+
299
+ #### Icons
300
+ The icons shown are from ionic. For a list of all available icons, see https://ionic.io/ionicons.
301
+
302
+ #### Color
303
+ The color to use, it must establish the class
304
+ ``yu-color-${color}``
305
+
306
+ #### Buttons
307
+
308
+ * Cancel button:
309
+ * ``text``: empty text
310
+ * ``icon``: close
311
+ * ``role``: cancel
312
+
313
+ ```typescript
314
+ const toast = await this.toastCtrl.create({
315
+ header: 'Hello world!',
316
+ message: 'Show toast during 3 seconds',
317
+ icon: 'warning-outline',
318
+ duration: 3000,
319
+ position: 'top',
320
+ cssClass: `yu-color-warning`,
321
+ buttons: [
322
+ {
323
+ text: '',
324
+ icon: 'close',
325
+ role: 'cancel',
326
+ }
327
+ ]
328
+ });
329
+
330
+ await toast.present();
331
+ ```
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "yukit",
3
3
  "description": "Yukit is a library of components for Ionic apps",
4
- "version": "0.0.1",
4
+ "version": "0.0.3",
5
5
  "author": {
6
6
  "name": "Pablo Claramunt",
7
7
  "email": "p.claramunt@yurest.com"
8
8
  },
9
9
  "peerDependencies": {
10
- "@angular/common": "^18.0.0",
11
- "@angular/core": "^18.0.0"
10
+ "@angular/common": "^16.0.0",
11
+ "@angular/core": "^16.0.0"
12
12
  },
13
13
  "dependencies": {
14
14
  "tslib": "^2.3.0"
@@ -6,7 +6,7 @@
6
6
  border-radius: var(--layout-radius-component-medium);
7
7
  border: 1px solid var(--element-outline);
8
8
 
9
- margin: 8px var(--layout-mobile-spacing-screen-lateral-small);
9
+ margin: var(--layout-mobile-spacing-screen-lateral-small);
10
10
 
11
11
  display: flex;
12
12
  align-items: flex-start;
@@ -51,6 +51,13 @@ ion-content {
51
51
  }
52
52
 
53
53
  }
54
+
55
+ .yu-item:last-child ion-item:last-child {
56
+ &::part(native) {
57
+ border: none;
58
+ }
59
+ }
60
+
54
61
  }
55
62
 
56
63
  }
Binary file
package/yukit-0.0.1.tgz DELETED
Binary file