0.2.21 • Published 4 years ago

@cardstack/ui-components v0.2.21

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

@cardstack/ui-components

This is a work-in-progress addon that will contain reusable UI elements like form inputs, buttons, navbars, and more. The components can be used in regular Ember apps as well as Cardstack projects.

View the live docs by running ember serve in this repository and going to http://localhost:4200/freestyle. They are built using ember-freestyle.

Compatibility

  • Ember.js v2.18 or above
  • Ember CLI v2.13 or above
  • Node.js v8 or above

Local installation

  • git clone <repository-url>
  • cd ui-components
  • yarn install
  • yarn link

Then navigate into the app you want to use the addon in, and run the following command:

  • yarn link @cardstack/ui-components
  • Start your app with ember serve. As you make changes to the addon, if everything is working properly, your Ember app will rebuild to reflect the changes.

Remote installation

$ ember install @cardstack/ui-components

Usage

Use components in your app like this:

{{component-name}}
or
<ComponentName />

Styles for this addon are opt-in. If you want to use our default styles, import them in your app's css:

@import url("@cardstack/some-css-file");

or scss:

@import '@cardstack/some-css-file'

Configuring debounceSpeed

By default, all keyboard input components (text-field, text-area, etc) have a 500ms debounce for handling the input to avoid excessive server calls while the user is typing (for automated tests it's 10ms). There are a couple of different ways to override the default:

  1. Pass a debounceMs argument to the component, i.e. <TextField @debounceMs=100 /> (affects only that specific component)
  2. Set an environment variable in your app's config/environment.js (affects all components):
module.exports = function(environment/*, appConfig */) {
  //...
  if (environment === 'development' || environment === 'production') {
    ENV['@cardstack/ui-components'] = {
      debounceSpeed: 100
    }
  }
}

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

0.2.21

4 years ago

0.2.20

4 years ago

0.2.19

4 years ago

0.2.18

4 years ago

0.2.17

4 years ago

0.2.16

4 years ago

0.2.15

4 years ago

0.2.14

4 years ago

0.2.13

4 years ago

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.16

4 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago