Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@teamsnap/teamsnap-ui

teamsnap750MIT3.12.3TypeScript support: included

a CSS component library for TeamSnap

css, sass, suit

readme

teamsnap-ui

TeamSnaps UI framework. Built with sass and react.

CI

To run locally:

Make sure you using the correct version of node.

nvm use

Install dependencies:

yarn

To build the dist folder for css, js and icons

yarn run build

Each item can also be build independently

yarn run build:css

yarn run build:js

Storybook

React components are documented with Storybook.

To run storybook locally:

yarn run storybook

To access on Netlify:

https://ts-ui-storybook.netlify.com

Netlify makes our Storybook accessible without having to run it locally. Each PR runs a test deploy with a preview, and every merge to master automatically updates the Netlify site.

Linters

All styles are linted using sass-lint and the config .sass-lint.yml is available to customize rules as needed.

The linter is also run automatically before publishing updates to npm. For full details see the contributing guide.

To lint both css and js

yarn run lint

To run the linters manually use:

yarn run lint:css

yarn run lint:js

TODO:

  • Update docs with full process for working locally with TeamSnap-UI
  • Update scripts to use webpack for css management and serving locally

CSS Components

https://teamsnap-ui-patterns.netlify.com/

Finished CSS Component React Component Storybook
x Button Button x
x Button Group Button Group x
x Checkbox Checkbox Radio x
| Divider Divider x
| Feedback |
| Field Group Field Group
| Field Label
| Field Message
| Field Wrapper
| Grid Grid Cell
x Icon Icon x
| Input Group Input
| Input Control
| Input Input Text Area
| Loader Loader
x Panel Panel x
| Panel Body x
| Panel Cell x
| Panel Header x
| Panel Row
| Panel Row Expandable
| Popup |
x Progress Progress x
| Select Box Select x
| Step Nav Step Nav x
| Summary List Summary List
| Table Table x
| Tabs |
| Text Link
| Toggle Toggle x
| Tooltip Tooltip
| Pagination Pagination

Missing CSS Component List

  • <input disabled="" type="checkbox"> Modal (pr in progress)
  • <input disabled="" type="checkbox"> Badges
  • <input disabled="" type="checkbox"> Member Photos / Placeholders
  • <input disabled="" type="checkbox"> Breadcrumbs
  • <input disabled="" type="checkbox"> Card (2 photo variants)
  • <input disabled="" type="checkbox"> Type ahead
  • <input disabled="" type="checkbox"> Counts
  • <input disabled="" type="checkbox"> Drop area
  • <input disabled="" type="checkbox"> Calendar
  • <input disabled="" type="checkbox"> Primary Navigation (top and side)
  • <input disabled="" type="checkbox"> Side Tabs Variant (manage my teams & snapboard getting started)
  • <input disabled="" type="checkbox"> Dropdown Menu
  • <input disabled="" type="checkbox"> Background utilities
  • <input disabled="" type="checkbox"> Finish adding icons
  • <input disabled="" type="checkbox"> Pagination
  • <input disabled="" type="checkbox"> Miller menu and Tree menu (maybe)
  • <input disabled="" type="checkbox"> Vertical step nav
  • <input disabled="" type="checkbox"> Shadow for components
  • <input disabled="" type="checkbox"> Dynamic Spacing
  • <input disabled="" type="checkbox"> Blockquote
  • <input disabled="" type="checkbox"> Triangle pseudo class for callouts/flyouts

Missing CSS Documentation

  • <input disabled="" type="checkbox"> More Panel Documentation
  • <input disabled="" type="checkbox"> Theming/Variable Documentation
  • <input disabled="" type="checkbox"> Spacing Documentation
  • <input disabled="" type="checkbox"> Color documentation
  • <input disabled="" type="checkbox"> Typography documentation
  • <input disabled="" type="checkbox"> Better Grid documentation with sizes
  • <input disabled="" type="checkbox"> Pagination

Missing React Component List

  • <input disabled="" type="checkbox"> Feedback
  • <input disabled="" type="checkbox"> Popup
  • <input disabled="" type="checkbox"> Modal
  • <input disabled="" type="checkbox"> Tab
  • <input disabled="" type="checkbox"> Input Show Hide
  • <input disabled="" type="checkbox"> Pagination

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Removed for now removed features.
  • Fixed for any bug fixes.
  • Security

=======

[3.12.3] - 2021-10-25

[3.11.0] - 2021-06-21

[3.10.10] - 2021-06-04

[3.10.9] - 2021-06-03

[3.10.8] - 2021-06-03

[3.10.7] - 2021-05-25

[3.10.6] - 2021-04-06

[3.10.5] - 2021-04-06

[3.10.4] - 2021-04-05

[3.10.3] - 2021-03-30

[3.10.2] - 2021-02-26

[3.10.1] - 2020-12-08

[3.10.0] - 2020-11-04

[3.9.2] - 2020-11-04

[3.9.1] - 2020-11-03

  • https://github.com/teamsnap/teamsnap-ui/pull/365
  • Changed Avatar component - Mods no longer a required prop
  • Changed Avatar component - Image should now fill the parent even if smaller than the parent.
  • Changed Tabs component - Mods no longer a required propr

[3.9.0] - 2020-11-03

[3.8.4] - 2020-10-19

[3.8.3] - 2020-10-16

[3.8.2] - 2020-10-13

[3.8.1] - 2020-10-01

[3.8.0] - 2020-09-30

  • https://github.com/teamsnap/teamsnap-ui/pull/290
  • Added support for search for paginated table
  • Added support for specifying extra filter data for searching paginated table
  • Added support for specifying custom search component for paginated table
  • Fixed removed display of page counts when no records returned for paginated table

[3.7.1] - 2020-09-28

[3.7.0] - 2020-09-25

[3.6.3] - 2020-09-22

  • https://github.com/teamsnap/teamsnap-ui/pull/283
  • Fixed bug where paginated table would not set rows selection to defaulted page size value
  • Fixed bug where chaning paginated table row selection would not reset to page 1
  • Added new styling for paginated table paging buttons
  • Added loading indicator for paginated table
  • Added flag to control whether to show the number of rows selection

[3.6.2] - 2020-09-18

  • https://github.com/teamsnap/teamsnap-ui/pull/282
  • Fixed bug where paginated table would get error if number of items not divisible by row count
  • Fixed bug where paginated table row selection did not contain the default page size as an option

[3.6.1] - 2020-04-09

[3.6.0] - 2020-03-26

[3.15.0] - 2020-03-17

[3.4.1] - 2020-02-20

Fixed

  • Fixed the function definition for paginated table's mapDataToRow callback

[3.4.0] - 2020-02-20

Added

  • Added a component for an opinionated pagination-based table

[3.3.2] - 2020-02-12

Fixed

  • Updated gulp config to stop CSS Nano from altering z-index values in the compile

Added

  • New icons

[3.3.1] - 2020-01-28

Fixed

  • Fixed Providing nonexistent default sort columns caused table component to fail to render (and throw exceptions)

[3.3.0] - 2019-12-05

Fixed

  • Fixed A bug that prevented theme configs for loading properly.

Added

  • Added Support for TypeScript props via PropTypes.InferProps

[3.2.2] - 2019-12-04

Changed

  • Changed Table Component's Prop Types so that the Column object's label field properly supports JSX.

[3.2.1] - 2019-09-11

Changed

  • Changed Popupactions to support react elements as well as strings for body content.
  • Changed Popupactions to support required confirmation from users

[3.2.0] - 2019-09-10

Changed

  • Added Components for Popup buttons

[3.1.0] - 2019-09-09

Changed

  • Added CSS & HTML for modals
  • Security Refactored theme variables for direct import
  • Added Utilities more for colors and borders

[3.0.0] - 2019-09-04

Changed

  • Added support for TypeScript
  • Security fixes for downstream dependencies.

[2.17.1] - 2019-06-11

Changed

  • Added assorted CSS utilites (see PR)
  • Updated CSS/design for Checkbox, Input and SelectBox
  • Updated StepNav to add xs modifier and support for numbers

[2.16.1] - 2019-06-05

Changed

  • Added panel header image to react component
  • Added panel stories to storybook
  • Updated Panel-image class to be a part of Panel-header

[2.15.1] - 2019-05-21

Changed

  • Added daypicker styles
  • Added u-linkCascade class

[2.15.0] - 2019-05-16

Changed

  • Added background color utilities
  • Added initial styles for React datepicker component (WIP)

[2.14.1] - 2019-05-01

Changed

  • Added focus and focus-within state to Popup--hover modifier
  • Added table knobs to storybook

[2.14.0] - 2019-04-29

Changed

  • Added story book to view our React Components
  • Added an empty and loading state to the React table component
  • Added more text and grid utilities to the CSS
  • Added a hover modifier to the Popup CSS
  • Added a row header (sub-header) and image to Panel CSS

[2.13.6] - 2019-02-19

https://github.com/teamsnap/teamsnap-ui/pull/103

Changed

  • got rid of duplicate CSS and bumping version with "npm version" instead of manually

[2.13.5] - 2019-02-19

https://github.com/teamsnap/teamsnap-ui/pull/102

Changed

  • Specifying font-size, font-weight, and white-space, to make tooltip more flexible

[2.13.4] - 2018-09-13

https://github.com/teamsnap/teamsnap-ui/pull/100

Changed

  • Change SummaryList to accept a node instead of just a string
  • Allow SummaryList to accept hasBorder option to remove borders

[2.13.2] - 2018-07-30

https://github.com/teamsnap/teamsnap-ui/pull/97

Changed

  • Change label to accept a node instead of just a string

v2.13.1 - 2018-07-26

https://github.com/teamsnap/teamsnap-ui/pull/98

Changed

  • Update font path to use just https since // wasn't working on all https sites

[2.12.0] - 2018-06-15

https://github.com/teamsnap/teamsnap-ui/pull/95

Changed

  • Change font path to just // so they can work for http and https

[2.11.0] - 2018-06-12

https://github.com/teamsnap/teamsnap-ui/pull/94

Added

  • Add large modifiers for .Input and .SelectBox
  • Increase font size for .Button--large

[2.10.0] - 2018-06-06

https://github.com/teamsnap/teamsnap-ui/pull/93

Fixed

  • Fix Table component state to update when props change.

Added

  • Add maxTableHeight prop to Table component.

[2.9.0] - 2018-05-31

https://github.com/teamsnap/teamsnap-ui/pull/88

Changed

  • Change font paths in CSS @font-face declarations from relative to absolute. These now reference a fixed location of the fonts on the dugout CDN (http://dugout.teamsnap.com/teamsnap-ui/2.5.1/assets/fonts/...), which makes TeamSnap UI self-contained and more flexible for use in a variety of projects. A version number of TeamSnap UI was somewhat randomly picked because the fonts are versioned along with everything else, but they won't actually change unless we change our font stack.

[2.8.1] - 2018-05-30

https://github.com/teamsnap/teamsnap-ui/pull/89

Fixed

  • Updated package-lock.json to include the version number.

[2.8.0] - 2018-05-30

https://github.com/teamsnap/teamsnap-ui/pull/86

Added

  • Add textarea to styles .FieldGroup error states so that it gets a red border if it's not valid.

[2.7.2] - 2018-05-11

https://github.com/teamsnap/teamsnap-ui/pull/85

Changed

  • Add src to files entry for distribution.
  • Update prepublish task to prepublishOnly