yukit
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

Yukit

Dependencies

Installation

npm install yukit

Configuration

Add styles in angular.json
{
  "styles": [
    "node_modules/yukit/src/lib/yukit.scss"
  ]
}
Import YukitModule in component module
import {YukitModule} from 'yukit';

@NgModule({
  imports: [YukitModule],
  declarations: [AppComponent]
})
export class AppModule {
}

Components

Avatar

<yu-avatar></yu-avatar>

Properties

Attribute Type Default
picture stringundefined undefined

Badge

<yu-badge></yu-badge>

Properties

Attribute Type Default
type dotdigit digit
color primarysuccesserrorwarninginfomediumgradientlightdark primary

Button

<yu-button></yu-button>

Properties

Attribute Type Default
type clearoutlinesoliddefaultundefined undefined
expand blockfullundefined undefined
size smallmediumlarge medium
color primarysuccesserrorwarninginfomediumgradientlightdark primary
disabled boolean false

Events

Name Description
yuBlur Emitted when the button loses focus.
yuFocus Emitted when the button has focus.
yuClick Emitted when the button has been clicked.

Checkbox

<yu-checkbox></yu-checkbox>

Properties

Attribute Type Default
justify endspace-betweenstart space-between
labelPlacement endfixedstackedstart start
alignment startcenter center
indeterminate boolean false
disabled boolean false
helperText stringundefined undefined
isIncorrectValue boolean false

Events

Name Description
yuBlur Emitted when the checkbox loses focus.
yuFocus Emitted when the checkbox has focus.

Chip

<yu-chip></yu-chip>

Properties

Attribute Type Default
startIcon stringundefined undefined
endIcon stringundefined undefined
badge primarysuccesserrorwarninginfomediumgradientlightdarkundefined undefined

Helper

<yu-helper></yu-helper>

Properties

Attribute Type Default
icon stringundefined undefined
color primarysuccesserrorwarninginfomediumgradientlightdark primary

Icon

List of all icons: https://phosphoricons.com/

<yu-icon></yu-icon>

Properties

Attribute Type Default
name string
color primarysuccesserrorwarninginfomediumgradientlightdark gradient

CSS Custom Properties

Name Description
--yu-icon-size Font size of the icon
--yu-icon-weight Font weight of the icon

Input

<yu-input></yu-input>

Properties

Attribute Type Default
label string
placeholder string
type datedatetime-localemailmonthnumberpasswordsearchteltexttimeurlweek text
inputmode decimalemailnonenumericsearchteltexturlpasswordundefined undefined
autocapitalize string off
passwordToggle boolean false
disabled boolean false
helperText stringundefined undefined
isIncorrectValue boolean false

Events

Name Description
yuBlur Emitted when the input loses focus.
yuFocus Emitted when the input has focus.

List action

<yu-list-action></yu-list-action>

Properties

Attribute Type Default
color primarysuccesserrorwarninginfomediumgradientlightdark primary

Notice

<yu-notice></yu-notice>

Properties

Attribute Type Default
name string
message string
icon string "warning-circle"
color primarysuccesserrorwarninginfomediumgradientlightdark primary

Searchbar

<yu-searchbar></yu-searchbar>

Properties

Attribute Type Default
placeholder string "Buscar"
setFocus boolean false

Events

Name Description
yuBlur Emitted when the input loses focus.
yuFocus Emitted when the input has focus.
yuClear Emitted when the clear input button is clicked.
yuCancel Emitted when the cancel button is clicked.

Tag

<yu-tag></yu-tag>

Properties

Attribute Type Default
icon stringundefined undefined
type containedoutlined contained
color primarysuccesserrorwarninginfomediumgradientlightdark primary
disabled boolean false

Textarea

<yu-textarea></yu-textarea>

Properties

Attribute Type Default
label string
placeholder string
type datedatetime-localemailmonthnumberpasswordsearchteltexttimeurlweek text
inputmode decimalemailnonenumericsearchteltexturlpasswordundefined undefined
autocapitalize string off
rows numberundefined undefined
cols numberundefined undefined
autoGrow boolean false
disabled boolean false
helperText stringundefined undefined
isIncorrectValue boolean false

Events

Name Description
yuBlur Emitted when the textarea loses focus.
yuFocus Emitted when the textarea has focus.

Toggle

<yu-toggle></yu-toggle>

Properties

Attribute Type Default
justify endspace-betweenstart space-between
labelPlacement endfixedstackedstart start
alignment startcenter center
disabled boolean false
helperText stringundefined undefined
isIncorrectValue boolean false

Events

Name Description
yuBlur Emitted when the toggle loses focus.
yuFocus Emitted when the toggle has focus.

Alert

Animations.
  • enterAnimation
  • leaveAnimation

NOTE: The animations are in an external service

Buttons
  • Principal button:

    • role: destructive
  • Cancel button:

    • role: cancel
const alert = await this.alertCtrl.create({
  enterAnimation: this.animationsService.showAlertAnimation,
  leaveAnimation: this.animationsService.hideAlertAnimation,
  header: 'Alert!',
  buttons: [
    {
      text: 'Cancel',
      role: 'cancel',
    },
    {
      text: 'OK',
      role: 'destructive',
    }
  ]
});

await alert.present();

Action sheet

Buttons
  • Principal button:

    • role: principal
  • Cancel button:

    • text: empty text
    • role: cancel
const actionSheet = await this.actionSheetCtrl.create({
  header: 'Options',
  buttons: [
    {
      text: 'Share',
    },
    {
      text: 'Delete all',
      role: 'principal',
    },
    {
      text: '',
      role: 'cancel',
    }
  ]
});

await actionSheet.present();

Toast

Icons

The icons shown are from ionic. For a list of all available icons, see https://ionic.io/ionicons.

Color

The color to use, it must establish the class yu-color-${color}

Buttons

  • Cancel button:
    • text: empty text
    • icon: close
    • role: cancel
const toast = await this.toastCtrl.create({
  header: 'Hello world!',
  message: 'Show toast during 3 seconds',
  icon: 'warning-outline',
  duration: 3000,
  position: 'top',
  cssClass: `yu-color-warning`,
  buttons: [
    {
      text: '',
      icon: 'close',
      role: 'cancel',
    }
  ]
});

await toast.present();

Readme

Keywords

none

Package Sidebar

Install

npm i yukit

Weekly Downloads

4

Version

1.2.1

License

none

Unpacked Size

13.6 MB

Total Files

77

Last publish

Collaborators

  • pabloclaramunt