IBM/vue-a11y-calendar

Name: vue-a11y-calendar

Owner: International Business Machines

Description: Accessible, internationalized Vue calendar

Created: 2017-09-25 14:20:07.0

Updated: 2018-05-02 09:14:15.0

Pushed: 2017-10-31 16:40:14.0

Homepage: https://ibm.github.io/vue-a11y-calendar/

Size: 421

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Vue A11Y Calendar

Localized, accessible calendar and datepicker for Vue with no external dependencies.

Installation
m install vue-a11y-calendar
Peer Dependencies

Vue A11Y Calendar depends on Vue 2.4+ and if using webpack, Sass Loader 6.0+. Make sure they (and their peer dependencies) are installed and correctly configured in order to effectively use Vue A11Y Calendar. While this has been tested with webpack, it should work with any module bundler.

Recommended Webpack Configuration Additions

In addition to the required configuration for Sass Loader, the following configuration is recommended to be included:

t path = require('path');

tion resolve (dir) {
turn path.join(__dirname, dir) // Change this to resolve to the root of your project


t config = {
solve: {
extensions: ['.js', '.vue', '.json'],
mainFiles: ['index', 'index.vue'],
alias: {
  'vue$': 'vue/dist/vue.esm.js',
  '@': resolve('src'), // Replace `src` with the path to your source files from the root of your project
  '~': resolve('node_modules'),
},


The above configuration will allow .js, .vue, and .json files to be imported/required without including their extensions, allow index.js and index.vue files to be found as files to be imported when importing/requiring a folder (so calendar/index.vue can just be included/requires as calendar), and will resolve Vue to the correct version, and allow shortcut imports @ for source files and ~ for Node modules (useful for things distributed through Node modules that can't be directly imported). This will allow for code like import foo from '@/foo'; and import calendar from 'vue-a11y-calendar/calendar';.

Components
Calendar

The Calendar component provides a responsive, dynamic, accessible, localized (using Date.prototype.toLocaleString()) month-based calendar.

Props

Events

Datepicker

The Datepicker component provides a dynamic, accessible, localized (using Date.prototype.toLocaleString()) month-based datepicker.

Props

Customization

Neither the Calendar component nor the Datepicker component use scoped styles or CSS modules. While this isn't ideal from a performance perspective, it is the only reasonable way to allow users to write custom CSS to style these components from within their own components. A downside to this is that implementing components can't have their styles scoped or use CSS modules either, or styling won't cascade properly. To change styling of one of these components, it is recommended to wrap it in a single component and mirror the props down.

Classes are styled using BEM to, as best as possible, target the exact elements to be styled.

Alternatively, the HTML, JS, and Sass for each component has been split out in to separate files that can be imported individually. The HTML and JS can used to rebuild the components piecemeal with custom styling (even allowing for scoped styling if desired).

Roadmap

We use ZenHub to manage our backlog and roadmap (items higher in our backlog pipeline are higher in our roadmap). You can view the board directly in the ZenHub webapp, or install the Chrome or Firefox extension and view it directly on GitHub.

External Licenses

The Calendar icon is licensed under the Creative Commons Attribution 4.0 International License by International Business Machines Corporation. It is from IBM Design Icons.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.