59 | ```
60 |
61 | ### Other Bootstrap CSS/utility classes
62 |
63 | Any Bootstrap CSS that was not a part of any PUI component, but which was included by PUI, will no longer work. Install Bootstrap CSS separately if needed.
64 |
65 | ### Removed
66 |
67 | The following components were deprecated several releases ago, and are no longer documented. They have now been removed:
68 | - Bootstrap Grids component (`pivotal-ui/react/grids` and `pivotal-ui/css/grids`)
69 | - Google Maps component (`pivotal-ui/css/google-maps`)
70 | - Avatars component (`pivotal-ui/css/avatars`)
--------------------------------------------------------------------------------
/docs/3.Upgrade_Guide/-15.v15.md:
--------------------------------------------------------------------------------
1 | ## Goals
2 |
3 | The goals of the 15.0 release are:
4 |
5 | - Rewrite & redesign Pagination component
6 | - Rewrite Dropdown component to be less opinionated on its contents
7 | - Make Autocomplete component easier to use
8 | - Make font rendering crisper
9 |
10 | ## The Big Changes
11 |
12 | ### Pagination
13 | We rewrote the Pagination component from the ground up, but its API has remained, mostly, the same.
14 |
15 | Details:
16 | - New design (rewritten CSS)
17 | - Show up to 5 pages, always including the first and last, with ellipses in between if necessary.
18 | - `onSelect` callback gets called with an object containing `newActivePage`,
19 | the page number of the newly selected page (either the number that was clicked, `activePage + 1` if next button was clicked,
20 | or `activePage - 1` if previous button was clicked).
21 | - Removed `large` and `small` props.
22 |
23 | ### Dropdown
24 | The changes to the Dropdown make it less opinionated about its children. Previously, it was necessary to have all children
25 | of a Dropdown be DropdownItems, and the Dropdown would handle `onClick`-like events on these items. Now, any child node
26 | can be passed as a child, and if a child needs an `onClick`, it should be set on that child directly.
27 |
28 | Details:
29 | - Removed DropdownItem component entirely
30 | - Removed props: `href`, `labelAriaLabel`, `onSelect`, `onSplitClick`, `splitClassName`
31 | - Added prop: `itemClassName` which provides a class to the `li` element that wraps each child of the dropdown
32 |
33 | ### Autocomplete
34 | The changes to Autocomplete are meant to make it easier to control when and how the data in the list gets updated
35 | from the outside.
36 |
37 | Details:
38 | - Add a new public method `updateList`, which updates the list of search results without showing the list. To see how this
39 | this might be used, see the [Autocomplete](/autocomplete) page.
40 | - Change the callback that is passed in to `onInitializeItems` to return a Promise, so that it can be awaited from
41 | the outside if desired. This means that an outer component can wait for the inner trie data structure to be built
42 | before calling `updateList` to update the list.
43 |
44 | ### Font Rendering
45 | We removed CSS in PUI that was disabling subpixel antialising (see [here](http://usabilitypost.com/2011/02/08/please-stop-disabling-subpixel-rendering/) for more information).
46 | The effect of this is that fonts appear crisper, brighter, and more vibrant.
--------------------------------------------------------------------------------
/docs/3.Upgrade_Guide/-9.v9.md:
--------------------------------------------------------------------------------
1 | ## Goals
2 |
3 | The goals of the 9.0 release are:
4 |
5 | - Update components to use the 8 point grid
6 | - Adding some new components (Flyout, Wizard)
7 | - Overhaul the existing Table component to make it easier to contribute new features
8 |
9 | ## The Big Changes
10 |
11 | ### Packaging
12 | - All react and CSS components are now in the `pivotal-ui` package
13 |
14 | ### Deprecated
15 | - The CopyToClipboardButton component has been deprecated
16 | - The Label component has been deprecated
17 |
18 | ### Button Groups
19 | - Can now be large or small
20 |
21 | ### Button Groups, Draggable List, Left-Tabs, Progress Bar, Tabs
22 | - Updates to use the 8 point grid system
23 |
24 | ### CopyToClipboard
25 | - Can now be large or small
26 | - No longer uses the CopyToClipboardButton component
27 |
28 | ### Flex Grid
29 | - `col-fixed` now uses `flex: 0 1 auto` so that it works in IE11
30 |
31 | ### Flyout
32 | - Added component that allows a modal to slide in from the right side of the page
33 |
34 | ### Links
35 | - Added new underline CSS classes
36 |
37 | ### Notifications
38 | - CSS refactor
39 |
40 | ### Pagination
41 | - Can now be large or small
42 | - Uses the Button Group component to render its page elements
43 |
44 | ### Select
45 | - The `onChange` callback will now pass the underlying click event as its first argument, instead of the selected value
46 |
47 | ### Table
48 | - Re-architected the Table component to make it easier to contribute new features
49 | - SortableTable: rows can be sorted ascending or descending by a chosen column.
50 | - FlexTable: uses `div` tags to compose a table rather than traditional HTML tags.
51 | - SortableFlexTable: a SortableTable that is composed of `div` tags.
52 | - AdvancedTable: offers many additional features for advanced customization.
53 | - The base Table is no longer sortable. Use SortableTable for this purpose.
54 | - Added a plugin system, see the Table component documentation for details.
55 |
56 | ### Wizard
57 | - Added component that allows a user to click through a series of wizard pages
58 |
59 | ## Conversion Guide
60 |
61 | ### Packaging
62 | - In `package.json`, add `pivotal-ui` as a dependency, and remove all old `pui-css-{component}` and `pui-react-{component}` dependencies. (CAUTION: make sure you only remove PUI components)
63 | - Update all files that required/imported PUI components to import from the new `pivotal-ui` package.
64 | - React example: import {DefaultButton} from 'pivotal-ui/react/buttons';
65 | - CSS example: import 'pivotal-ui/css/buttons';
66 |
67 | ### Button Group, Draggable List, Left-Tabs, Notifications, Pagination, Progress Bar, Tabs
68 | - Positioning changes may be required as a result of underlying CSS changes
69 |
70 | ### Select
71 | - `onChange` callbacks should be updated to uses the new `event` object as the first argument
72 |
73 | ### Table
74 | - Use `SortableTable` if sorting behavior is required.
75 | - Use `AdvancedTable` if advanced `FlexTable` features are needed
--------------------------------------------------------------------------------
/docs/4.Contribute/1.Index.md:
--------------------------------------------------------------------------------
1 | We encourage and appreciate all contributions, large and small, from the Pivotal community. If you're interested in getting involved, here are some ways you can help:
2 |
3 | ## Improving components and styles
4 |
5 | All of Pivotal UI's components and styles live in the [Pivotal UI GitHub repo](https://github.com/pivotal-cf/pivotal-ui). If you have a feature request, or if you want to report a bug in one of our components, [file an issue](https://github.com/pivotal-cf/pivotal-ui/issues/new).
6 |
7 | If you would like to submit a pull request, it's a good idea to reach out to the maintainers as early as possible to help us understand the change you'd like to make. This will make the process much easier for all involved.
8 |
9 | If your team has built a component that you feel would be a good fit for Pivotal UI (i.e. it could be useful to several Pivotal teams), let the maintainers know so we can figure out the best way to help.
10 |
11 | ## Improving documentation
12 |
13 | If you would like to help improve the styleguide, feel free to submit a pull request to the [styleguide GitHub repo](https://github.com/pivotal-cf/pui-styleguide).
14 |
15 | All of the text content is written in Markdown files located in the [`docs` directory](https://github.com/pivotal-cf/pui-styleguide/tree/master/docs). Smaller changes to the text can be made directly on GitHub. Each page on this site also has a link to edit it on GitHub.
16 |
17 | ## Getting in touch
18 |
19 | If you have questions or suggestions, or if you just want to chat about Pivotal UI, reach out to the maintainers on our Slack channel ([#pivotal-ui](https://pivotal.slack.com/messages/C055JEPQQ)).
--------------------------------------------------------------------------------
/docs/404/1.404.md:
--------------------------------------------------------------------------------
1 | Page not found
--------------------------------------------------------------------------------
/docs/5.Versions/Index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Older Versions of Pivotal UI
3 | menu: info
4 | route: versions
5 | ---
6 |
7 | View archived styleguides for past versions of Pivotal UI:
8 |
9 | - [Version 9](https://styleguide-v9.cfapps.io/)
10 | - [Version 10](https://styleguide-v10.cfapps.io/)
11 | - [Version 11](https://styleguide-v11.cfapps.io/)
12 | - [Version 12](https://styleguide-v12.cfapps.io/)
13 | - [Version 13](https://styleguide-v13.cfapps.io/)
14 | - [Version 14](https://styleguide-v14.cfapps.io/)
15 | - [Version 15](https://styleguide-v15.cfapps.io/)
16 | - [Version 16](https://styleguide-v16.cfapps.io/)
--------------------------------------------------------------------------------
/docs/components/Alerts/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/alerts
3 | reactComponents:
4 | - SuccessAlert
5 | - InfoAlert
6 | - WarningAlert
7 | - ErrorAlert
8 | reactPath: pivotal-ui/react/alerts
9 | ---
10 |
11 | Use the `SuccessAlert`, `ErrorAlert`, `InfoAlert`, and `WarningAlert` components to alert the user of some change in state.
12 |
13 | For example, here are alerts for various outcomes of uploading a file:
14 |
15 | ```jsx harmony
16 | //title=Various alerts
17 |
18 | File 'abc.txt' uploaded successfully!
19 | File 'abc.txt' failed to upload.
20 | Upload started: 'abc.txt'
21 | 'abc.txt' is now publicly available
22 |
;
23 | ```
24 |
25 | To allow the user to hide the alert after reading it, set the `dismissable` prop to add a clickable close icon:
26 |
27 | ```jsx harmony
28 | //title=Dismissable alert
29 | File 'abc.txt' uploaded successfully!;
30 | ```
31 |
32 | To perform some action when the user dismisses an alert, set the `onDismiss` prop:
33 |
34 | ```jsx harmony
35 | //title=Dismissable alert with callback
36 | alert('Alert dismissed')}>File 'abc.txt' failed to upload.;
37 | ```
38 |
39 | Use the `withIcon` prop to add an icon to the alert:
40 |
41 | ```jsx harmony
42 | //title=Alert with icon
43 |
44 | File 'abc.txt' uploaded successfully!
45 | File 'abc.txt' failed to upload.
46 | Upload started: 'abc.txt'
47 | 'abc.txt' is now publicly available
48 |
61 | ;
62 | ```
63 |
64 | By default, alerts maintain their dismissed/not dismissed state internally. To hold this state at a higher level (in a parent component), pass the `show` prop to the alert.
65 |
66 | ```jsx harmony
67 | //title=Controlled alert
68 | class AlertController extends React.Component {
69 | constructor(props) {
70 | super(props);
71 | this.state = {alertVisible: true};
72 | }
73 |
74 | render() {
75 | const {alertVisible} = this.state;
76 |
77 | if (!alertVisible) {
78 | return this.setState({alertVisible: true})}>Show alert;
79 | }
80 |
81 | return (
82 | this.setState({alertVisible: false})}>Visible alert
83 | );
84 | }
85 | }
86 |
87 | ;
88 | ```
--------------------------------------------------------------------------------
/docs/components/Alerts/2.Props.md:
--------------------------------------------------------------------------------
1 | The `SuccessAlert`, `ErrorAlert`, `InfoAlert`, and `WarningAlert` components all take the following props:
2 |
3 | Property | Required | Type | Default | Description
4 | ---------|----------|------|---------|------------
5 | `closeLabel` | no | Node | 'Close alert' | Screen reader label attached to close button
6 | `dismissable` | no | Boolean | false | If true, render a close button
7 | `onDismiss` | no | Function | | Callback that is called when the user clicks the close button
8 | `show` | no | Boolean | | If set, overrides the close button. True shows the alert, false hides the alert.
9 | `withIcon` | no | Boolean | false | If true, render alert with an icon
10 |
--------------------------------------------------------------------------------
/docs/components/Autocomplete/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | ----------------------|----------|------|---------|-------------
3 | `className` | no | String | | `className` to add to autocomplete
4 | `disabled` | no | Boolean | | whether the input is disabled
5 | `input` | no | Object | autocompleteinput | overrides the input for autocomplete
6 | `maxItems` | no | Number | 50 | the maximum number of items in the autocomplete list
7 | `onClick` | no | Function | | `onClick` to add to the input
8 | `onFilter` | no | Function | | lets you apply an additional filter to the autocomplete list
9 | `onFocus` | no | Function | | `onFocus` to add to the input
10 | `onInitializeItems` | no | Function | done => done([]) | returns the values to initially populate the autocomplete list
11 | `onPick` | no | Function | | callback when something is picked from the list
12 | `onSearch` | no | Function | | To override the default search algorithm, pass your custom function to the autocomplete as the prop onSearch.
13 | `placeholder` | no | String | 'search' | placeholder text for the input
14 | `showNoSearchResults` | no | Boolean | false | If true, will display 'No search results' when no results are matched. Valid only if no list child is passed. Eg. If you want to provide a custom search results list component, this flag will be ignored.
15 | `trieOptions` | no | Object | | Options for the default TrieSearch algorithm (e.g. `ignoreCase`: a boolean is set to true by default, `splitOnRegEx`: a RegEx)
16 | `value` | no | String | | used when the input is a controlled input
17 |
--------------------------------------------------------------------------------
/docs/components/Back_to_Top/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/back-to-top
3 | reactComponents:
4 | - BackToTop
5 | reactPath: pivotal-ui/react/back-to-top
6 | ---
7 |
8 | You can use this component to scroll to the top of a document (or another scrollable element).
9 |
10 | By default the button will be fixed to the bottom right hand corner of the page. See below for an example of how to override the positioning.
11 |
12 | To apply the `BackToTop` component to a specific element, use the `scrollableId` prop. To use the `BackToTop` component to scroll the entire page, do not set the `scrollableId` prop.
13 |
14 | ```jsx harmony
15 | //title=Scrollable container example
16 | //description=By setting `position: relative` on a parent element, and `position: absolute` on the `BackToTop`, we can position the button within the parent.
17 |
18 |
19 |
22 |
Scroll down at least 400 pixels to see the button!
23 | {[1, 2, 3, 4, 5, 6, 7, 8].map(n => (
24 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Interdum velit laoreet id donec. Adipiscing vitae proin sagittis nisl rhoncus. Maecenas volutpat blandit aliquam etiam erat velit. Rutrum tellus pellentesque eu tincidunt tortor aliquam nulla facilisi. Ac ut consequat semper viverra nam libero justo laoreet sit. Sed tempus urna et pharetra pharetra massa massa. Arcu dictum varius duis at consectetur. Mi ipsum faucibus vitae aliquet nec ullamcorper sit amet. Ac felis donec et odio pellentesque diam volutpat commodo. At risus viverra adipiscing at. Dui accumsan sit amet nulla facilisi. Tristique senectus et netus et malesuada fames ac. Iaculis urna id volutpat lacus laoreet non. Nullam non nisi est sit amet. Lectus sit amet est placerat in. Velit egestas dui id ornare arcu odio ut sem. Viverra nibh cras pulvinar mattis nunc sed blandit libero. Hendrerit gravida rutrum quisque non. Duis ultricies lacus sed turpis tincidunt id.
25 | ))}
26 |
27 |
;
28 | ```
29 |
30 | By default, the button will appear when the container's `scrollTop` is greater than 400 pixels. To make it always visible, set the `alwaysVisible` prop.
31 |
32 | ```jsx harmony
33 | //title=Always visible example
34 |
35 |
36 | See the bottom right corner of your screen!
37 |
;
38 | ```
--------------------------------------------------------------------------------
/docs/components/Back_to_Top/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | ---------------|----------|--------|---------|------------
3 | `alwaysVisible` | no | Boolean | false | If `alwaysVisible` is not set, the component will only appear after the window has been scrolled.
4 | `scrollableId` | no | String | | If `scrollableId` is set, the component will update this element's scrollTop property. Otherwise, document.body will be scrolled.
5 |
--------------------------------------------------------------------------------
/docs/components/Button_Group/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/button-group
3 | ---
4 |
5 | Button groups wrap a series of buttons to clearly indicate their relation.
6 |
7 | ```html
8 | //title=Basic example
9 |
10 |
11 |
12 |
13 |
14 | ```
15 |
16 | ```html
17 | //title=Selected button example
18 | //description=You can also mark buttons in the group as selected by swapping between alt button styles.
19 |
20 |
21 |
22 |
23 |
24 | ```
25 |
26 | ```html
27 | //title=Flat button example
28 | //description=If you are using flat buttons, there is a thinner, flat button group
29 |
30 |
31 |
32 |
33 |
34 | ```
--------------------------------------------------------------------------------
/docs/components/Buttons/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | ---------------|----------|---------|---------|------------
3 | `alt` | no | Boolean | false | Whether to render as 'alternate' button
4 | `flat` | no | Boolean | false | Whether to render as a 'flat' button
5 | `fullWidth` | no | Boolean | false | Whether to render the button full width
6 | `href` | no | String | | If specified, button clicks will redirect to this href
7 | `iconOnly` | no | Boolean | false | If specified, will render as an icon button
8 | `iconPosition` | no | String | | If specified, places the icon to the left or the right of the text and or children
9 | `large` | no | Boolean | false | Whether to render the button large
10 | `small` | no | Boolean | false | Whether to render the button small
11 |
--------------------------------------------------------------------------------
/docs/components/Checkbox_Dropdowns/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/checkbox-dropdown
3 | reactComponents:
4 | - CheckboxDropdown
5 | reactPath: pivotal-ui/react/checkbox-dropdown
6 | ---
7 |
8 | ```jsx harmony
9 | //title=Basic checkbox dropdown
10 | ;
13 | ```
14 |
15 | ```jsx harmony
16 | //title=Checkbox dropdown with onChange
17 |
18 | class Example extends React.Component {
19 | constructor(props) {
20 | super(props);
21 | this.state = {selected: null};
22 | }
23 |
24 | render() {
25 | return (
26 |
27 |
{JSON.stringify(this.state.selected, null, 2)}
28 | this.setState({selected})
31 | }}/>
32 |
33 | );
34 | }
35 | }
36 |
37 | ;
38 | ```
--------------------------------------------------------------------------------
/docs/components/Checkbox_Dropdowns/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | ------------------|----------|-------------------------------------|----------------|------------
3 | `buttonAriaLabel` | no | String | | aria-label for the button
4 | `buttonClassName` | no | String | | Classname to add to the button
5 | `flat` | no | Boolean | | If true, dropdown toggle has no borders and is transparent
6 | `labelAriaLabel` | no | String | | aria-label for the label
7 | `labels` | yes | oneOf([Array, Object]) | | Labels for the checkboxes
8 | `onChange` | no | Function | | Callback that fires after clicking a checkbox
9 | `size` | no | oneOf(['normal', 'large', 'small']) | 'normal' | Sets the size
10 | `split` | no | Boolean | | If true, separates the button text from the toggle
11 |
--------------------------------------------------------------------------------
/docs/components/Checkboxes/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/checkbox
3 | reactComponents:
4 | - Checkbox
5 | reactPath: pivotal-ui/react/checkbox
6 | ---
7 |
8 | Checkboxes can be either checked, unchecked or indeterminate.
9 |
10 | ```jsx harmony
11 | //title=Checkboxes
12 |
13 | Checkbox one (click me)
14 | Checkbox two (disabled)
15 | Checkbox three (indeterminate)
16 |
;
17 | ```
18 |
19 | ```jsx harmony
20 | //title=Using indeterminate state
21 | ;
63 | ```
--------------------------------------------------------------------------------
/docs/components/Checkboxes/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | -----------------|----------|---------|---------|------------
3 | `checked` | false | boolean | | Whether the checkbox is checked, when controlled
4 | `children` | false | node | | Content to place within `label` to the right of the checkbox
5 | `className` | false | string | | Class name to put on outer `div` element
6 | `defaultChecked` | false | boolean | | Whether the checkbox is checked, when uncontrolled
7 | `disabled` | false | boolean | | Whether the checkbox is disabled
8 | `id` | false | string | Auto-generated unique ID with prefix "checkbox" | ID to put on the inner `input[type="checkbox"]`
9 | `indeterminate` | false | boolean | | Puts checkbox into an indeterminate state
10 | `labelClassName` | false | string | | Class name to put on the checkbox label
11 | `name` | false | string | | Name to set on inner `input[type="checkbox"]`
12 | `noSelect` | false | boolean | | When `true`, prevents the label text from being selectable
13 | `onChange` | false | func | | onChange callback to set on inner `input[type="checkbox"]`
14 | `style` | false | object | | Style to put on outer `div` element
15 |
16 | All other props will be put onto the inner `input[type="checkbox"]`.
--------------------------------------------------------------------------------
/docs/components/Code/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/code
3 | ---
4 |
5 | ```html
6 | //title=Basic unstyled
7 |
class Foo
8 | def bar
9 | puts 'hi'
10 | end
11 | end
This is an example of a paragraph with a dark inline code snippet within it.
22 | ```
23 |
24 | #### Styled Code
25 | In order to show syntax-highlighted code, you will need to apply a language specific class to the code tag. For example, `.language-ruby`.
26 |
27 | There are several languages already available (and others available from the [Prismjs.com](http://prismjs.com
28 | ) website), including:
29 |
30 | * Markup
31 | * CSS
32 | * C-like
33 | * JavaScript
34 | * Java
35 | * PHP
36 | * CoffeeScript
37 | * Sass
38 | * Bash
39 | * Python
40 | * HTTP
41 | * Ruby
42 | * Go
43 |
44 |
45 | ```html
46 |
class Foo
47 | def bar
48 | puts 'hi'
49 | end
50 | end
class Foo
56 | def bar
57 | puts 'hi'
58 | end
59 |
60 | def bar
61 | puts 'hi'
62 | end
63 |
64 | def bar
65 | puts 'hi'
66 | end
67 |
68 | def bar
69 | puts 'hi'
70 | end
71 |
72 | def bar
73 | puts 'hi'
74 | end
75 |
76 | def bar
77 | puts 'hi'
78 | end
79 |
80 | def bar
81 | puts 'hi'
82 | end
83 | end
84 | ```
85 |
86 | ```html
87 | //title=Terminal window
88 | //description=Use the `terminal` class around a `
` that has class `terminal-dots` to wrap code blocks in a terminal window.
89 |
90 |
91 |
~/my/computer
92 | $ echo 'Hello World!';
93 |
94 | ```
95 |
96 | ```html
97 | //title=Terminal window with Mac-styled buttons
98 | //description=Apply the `color` class to the `terminal-dots` to give them the colors they have in Mac OS X.
99 |
100 |
101 |
~/my/computer
102 | $ echo 'Hello World!';
103 |
104 | ```
--------------------------------------------------------------------------------
/docs/components/Collapsible/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | reactComponents:
3 | - Collapsible
4 | reactPath: pivotal-ui/react/collapsible
5 | ---
6 |
7 | The `Collapsible` component can be used to hide and show elements. By default,
8 | it animates the expanding and collapsing of its content, but this can be configured
9 | through props.
10 |
11 | ```jsx harmony
12 | //title=Basic example
13 | //description=The `Collapsible`'s `expanded` prop comes from the outer component's `state`.
14 |
15 | class CollapsibleExample extends React.Component {
16 | constructor(props) {
17 | super(props);
18 | this.state = {expanded: false};
19 | }
20 |
21 | render() {
22 | return (
;
45 | ```
--------------------------------------------------------------------------------
/docs/components/Copy_to_Clipboard/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | ----------|----------|----------|----------|------------
3 | `onClick` | no | Function | () => () | Click handler
4 | `text` | yes | String | | Text that is copied when the user clicks
5 | `tooltip` | no | String | "Copied" | Text to show in tooltip after click
6 |
--------------------------------------------------------------------------------
/docs/components/Dividers/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/dividers
3 | reactComponents:
4 | - Divider
5 | reactPath: pivotal-ui/react/dividers
6 | ---
7 |
8 | ```jsx harmony
9 | //title=Large divider example
10 | //description=Dividers draw horizontal lines between different content groupings
11 |
12 |
13 | Content
14 |
15 |
;
16 | ```
17 |
18 | ```jsx harmony
19 | //title=Inverse dividers
20 | //description=On a dark background, use these inverse dividers
21 |
22 |
23 | I am some content
24 |
25 | Me too
26 |
27 |
28 |
29 | Here's some stuff above the divider
30 |
31 | Here's some stuff below the divider
32 |
33 |
;
34 | ```
--------------------------------------------------------------------------------
/docs/components/Dividers/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | ----------|----------|------|---------|------------
3 | `inverse` | no | Boolean | | Specifying this prop inverses the divider
4 | `size` | no | String | | Changes the size of the component. Either 'large' or leave undefined for default size.
--------------------------------------------------------------------------------
/docs/components/Draggable_Lists/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | reactComponents:
3 | - DraggableList
4 | - DraggableListItem
5 | reactPath: pivotal-ui/react/draggable-list
6 | ---
7 |
8 | ```jsx harmony
9 | //title=Draggable
10 |
11 |
12 | Item 1
13 |
14 |
15 |
16 | Item 5
17 |
18 |
19 |
20 | Item 4
21 |
22 |
23 |
24 | Item 6
25 |
26 |
27 |
28 | Item 3
29 |
30 |
31 |
32 | Item 2
33 |
34 | ;
35 | ```
--------------------------------------------------------------------------------
/docs/components/Draggable_Lists/2.Props.md:
--------------------------------------------------------------------------------
1 | ## DraggableList props
2 |
3 | Property | Required | Type | Default | Description
4 | ----------|----------|------|---------|------------
5 | `children` | no | node | | Draggable items in list
6 | `innerClassName` | no | string | | CSS class to apply to all items in list
7 | `onDragEnd` | no | function | | Callback called with the item indices when a drag completes
8 |
9 | ## DraggableListItem props
10 |
11 | _No props taken._
--------------------------------------------------------------------------------
/docs/components/Dropdowns/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | -------------------|----------|-------------------------------------|----------------|------------
3 | `blockingScrim` | no | Boolean | false | If true, blocks mouse events outside of the dropdown. Clicking outside of the dropdown will still close the dropdown.
4 | `buttonAriaLabel` | no | String | | aria-label for the button
5 | `buttonClassName` | no | String | | Classname to add to the button
6 | `closeOnMenuClick` | no | Boolean | true | If false, do not close the menu when clicking in the dropdown menu
7 | `disableScrim` | no | Boolean | false | If true, do not close the menu when clicking outside the dropdown
8 | `flat` | no | Boolean | | If true, dropdown toggle has no borders and is transparent
9 | `floatMenu` | no | Boolean | false | If true, float the dropdown menu. This only applies to the basic dropdown
10 | `icon` | no | String | 'chevron_down' | Name of the icon to use for the toggle icon
11 | `itemClassName` | no | String | | Classname to add to each child `li`
12 | `link` | no | Boolean | | If true, color the dropdown toggle like a link
13 | `menuAlign` | no | oneOf(['none', 'left', 'right']) | 'none' | Sets the alignment of the menu with the button
14 | `onClick` | no | Function | | Callback that fires after clicking the button
15 | `onEntered` | no | Function | | Callback that fires after opening the dropdown
16 | `onExited` | no | Function | | Callback that fires after closing the dropdown
17 | `scroll` | no | Boolean | false | Enables scrolling in the dropdown menu when enabled
18 | `showIcon` | no | Boolean | true | If false, do not render an icon in the dropdown toggle. Icon can not be hidden if split or leaving out title.
19 | `size` | no | oneOf(['normal', 'large', 'small']) | 'normal' | Sets the size
20 | `split` | no | Boolean | | If true, separates the button text from the toggle
21 | `title` | no | Node | | The button contents
22 |
--------------------------------------------------------------------------------
/docs/components/Flyout/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/flyout
3 | reactComponents:
4 | - Flyout
5 | reactPath: pivotal-ui/react/flyout
6 | ---
7 |
8 | The flyout appears from the right side of the window and overlays all other content until it is closed. Its
9 | visibility is controlled with the `show` property. It can take a custom `width`. The contents of the header
10 | and the body are set with the `header` and `children` properties, respectively. The behavior of the icon
11 | button is defined through the `onHide` callback.
12 |
13 | The flyout will overlay its first parent that has position `relative`.
14 |
15 | ```jsx harmony
16 | //title=Basic example
17 | class Page extends React.Component {
18 | constructor(props) {
19 | super(props);
20 | this.state = {};
21 | }
22 |
23 | render() {
24 | const {created, show, disableAnimation} = this.state;
25 |
26 | return (
27 |
53 | );
54 | }
55 | }
56 |
57 | ;
58 | ```
--------------------------------------------------------------------------------
/docs/components/Flyout/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | ---------------------|-------------|-------------|---------------------------------------|-------------
3 | `animationDuration` | no | Number | 200 | Animation duration in milliseconds (Set to <= 0 to disable animations)
4 | `animationEasing` | no | String | cubic-bezier(0.25, 0.46, 0.45, 0.94) | Animation easing function
5 | `bodyClassName` | no | String | | Class(es) to apply to the body
6 | `children` | no | Any | | Contents of the flyout body
7 | `dialogClassName` | no | String | | Class(es) to apply to the modal dialog
8 | `header` | no | Any | | Contents of the flyout header
9 | `headerClassName` | no | String | | Class(es) to apply to the header
10 | `iconSrc` | no | String | 'close' | Icon to use for the close button
11 | `onHide` | yes | Function | | Callback that fires as soon as the modal begins closing
12 | `show` | no | Boolean | false | Whether or not the flyout is visible
13 | `width` | no | String | 480px | Width of flyout content
14 |
--------------------------------------------------------------------------------
/docs/components/Forms/2.Using_the_FormUnit.md:
--------------------------------------------------------------------------------
1 | To lay out a single form field without using a whole `Form` component, you can use the `FormUnit`
2 | component. The `FormUnit` component can decorate a field with a label, a tooltip, an "optional" indicator, and help text.
3 |
4 | Note that state management and other `Form` features are not handled by the `FormUnit`.
5 |
6 | ## Examples
7 |
8 | ```jsx harmony
9 | //title=Basic form unit
10 | Enter a value in the field above
18 | }}>
19 |
20 | ;
21 | ```
22 |
23 | ```jsx harmony
24 | //title=Inline form unit
25 | //description=When `inline` is `true`, the label will be placed on the same line as the field.
26 |
27 |
35 |
40 |
41 |
50 |
51 |
52 |
;
53 | ```
54 |
55 | ```jsx harmony
56 | //title=Form unit with error
57 | //description=When `hasError` is `true`, the field border and help text become red to indicate an error.
58 |
64 |
65 | ;
66 | ```
67 |
68 | ```jsx harmony
69 | //title=Form unit with postLabel
70 | //description=The `postLabel` can contain any node and will be positioned in the top-right corner of a non-inline form unit.
71 | alert('Thanks for clicking me!')}>I am a postLabel!
,
75 | help: 'Username must be more than 8 characters'
76 | }}>
77 |
78 | ;
79 | ```
80 |
81 | ```jsx harmony
82 | //title=Form unit with composite field
83 |
86 |
},
88 | {name: 'Two', enabled: },
89 | {name: 'Three', enabled: }
90 | ]}/>
91 | ;
92 | ```
--------------------------------------------------------------------------------
/docs/components/Grids/2.Props.md:
--------------------------------------------------------------------------------
1 | ## Grid props
2 |
3 | | Property | Required | Type | Default | Description |
4 | | ----------------- | ---------- | --------- | --------- | ------------ |
5 | | `gutter` | no | boolean | true | When true, adds spacing between `FlexCol`s |
6 | | `flexDirection` | no | oneOf(['row', 'row-reverse', 'column', 'column-reverse']) | | Sets the flex direction |
7 | | `justifyContent` | no | oneOf(['flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly']) | | Sets the `justify-content` CSS property |
8 |
9 | ## FlexCol props
10 |
11 | Property | Required | Type | Default | Description
12 | -------------------|----------|------------------------------------|---------|------------
13 | `alignment` | no | oneOf(['top', 'middle', 'bottom']) | | Alignment of the column within the `Grid`
14 | `breakpoint` | no | oneOf(['sm', 'md', 'lg']) | | Width of window at which column will expand to take up full width of `Grid` (`sm` = `768px`, `md` = `992px`, `lg` = `1200px`)
15 | `col` | no | number | | Fraction out of 24 that this column's width should be in its `Grid`
16 | `contentAlignment` | no | oneOf(['top', 'middle', 'bottom']) | | Alignment of the column's contents within itself
17 | `fixed` | no | boolean | false | When true, column width is fixed to the width of its content
18 | `grow` | no | number | 1 | The ratio of the column's width relative to other columns in the same `Grid`
19 |
--------------------------------------------------------------------------------
/docs/components/Icons/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/iconography
3 | reactComponents:
4 | - Icon
5 | reactPath: pivotal-ui/react/iconography
6 | ---
7 |
8 | Use the `Icon` component to insert one of Pivotal UI's SVG icons. The full list of icons that Pivotal UI provides, along with their names, can be found [here](/components/icons/icon_list).
9 |
10 | To use an icon, specify the name of the icon as the `src` prop.
11 |
12 | ```jsx harmony
13 | //title=Icon examples
14 |
15 |
16 |
17 |
18 |
;
19 | ```
20 |
21 | By default, the icons are quite small. They inherit the font size of their parent. This means they can be resized by, for example, wrapping them in an `
` or explicitly setting a font size on the parent.
22 |
23 | ```jsx harmony
24 | //title=Larger icon examples
25 |
26 |
27 |
28 |
29 |
;
30 | ```
31 |
32 | When styling the SVGs, use the `fill` or `stroke` attributes instead of `color`. These can be set directly on the `Icon` as a `style` prop or via CSS. A useful trick is to set `fill` to `currentColor`, so that the fill color is inherited from the text color of the icon's container.
33 |
34 | ```jsx harmony
35 | //title=Color icon examples
36 |
37 |
38 |
39 |
40 |
;
41 | ```
42 |
43 | Set the `verticalAlign` prop to `"baseline"` to align the icon to the text baseline.
44 |
45 | ```jsx harmony
46 | //title=Alignment with text
47 |
Exit
;
48 | ```
49 |
50 | Images can be used like icons by wrapping them in a container with the `icon` class.
51 |
52 | ```html
53 | //title=Images as icons
54 | The following image is wrapped as an icon
55 |
56 |
.
57 |
58 | ```
59 |
60 | Pivotal UI provides three variations on the spinner icon, differing in their speed.
61 |
62 | `spinner-lg` is the slowest, `spinner-md` is the default, and `spinner-sm` is the fastest. Use `spinner-md` in most cases.
63 |
64 | ```jsx harmony
65 | //title=Spinner icons
66 |
;
77 | ```
78 |
79 | If you want to customize the notification dropdown, you can use `className` to
80 | add a modifier class to the `btn-group`. `id` and `style` will be applied to
81 | the notification button.
--------------------------------------------------------------------------------
/docs/components/Notifications/2.Props.md:
--------------------------------------------------------------------------------
1 | ## Notifications/AlertNotifications props
2 |
3 | Property | Required | Type | Default | Description
4 | ---------|----------|------|---------|------------
5 | `size` | no | oneOf('h1', 'h2', 'h3', 'h4', 'h5', 'h6') | | Size of the notification
--------------------------------------------------------------------------------
/docs/components/Overlay_Trigger/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | reactComponents:
3 | - OverlayTrigger
4 | reactPath: pivotal-ui/react/overlay-trigger
5 | ---
6 |
7 | OverlayTriggers are highly configurable. Their associated overlays do not show up in the DOM until triggered.
8 | This makes them ideal for highly repeated layouts such as lists.
9 |
10 | ```jsx harmony
11 | //title=Basic example
12 | //description=To create a tooltip where the contents are not inlined with the triggering element itself, use the OverlayTrigger component. If the `overlay` property passed into the `OverlayTrigger` will be displayed on hover, this is where the `Tooltip` can be used. This can be useful in situations where you want to have many different elements trigger the same tooltip. Tooltips are placed using the `placement` property on `OverlayTrigger`.
13 |
14 |
15 | Check out this
16 | I should be on the left}>
17 | tooltip on the left.
18 |
19 |
20 |
21 | Check out this
22 | I should be on the right}>
23 | tooltip on the right.
24 |
25 |
26 |
27 | Check out this
28 | I should be on the top}>
29 | tooltip on the top.
30 |
31 |
32 |
33 | Check out this
34 | I should be on the bottom}>
35 | tooltip on the bottom.
36 |
37 |
38 |
39 | Check out this
40 | light tooltip}>
41 | light tooltip.
42 |
43 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
65 |
66 |
67 |
68 |
69 |
72 |
73 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
74 |
75 |
76 |
77 | ```
78 |
79 | If `trigger` is set to `manual`, display of the tooltip is entirely determined by the `display` prop,
80 | which is controlled by the end user and not by `OverlayTrigger`.
--------------------------------------------------------------------------------
/docs/components/Overlay_Trigger/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | ---------------|----------|--------------------------------------------|---------|---------------------------------------
3 | `delay` | no | Number | | Number of milliseconds to delay show and hide
4 | `delayHide` | no | Number | | Number of milliseconds to delay hide
5 | `delayShow` | no | Number | | Number of milliseconds to delay show
6 | `disableScrim` | no | Boolean | false | Set to true to make tooltips stay open when clicking outside
7 | `display` | no | Boolean | false | Whether or not to show the overlay
8 | `isSticky` | no | Boolean | false | Whether the tooltip hover is sticky or not
9 | `onEntered` | no | Function | | Callback that is called after the overlay is shown
10 | `onExited` | no | Function | | Callback that is called after the overlay is hidden
11 | `overlay` | no | Node | | An element or text to overlay next to the target
12 | `pin` | no | Boolean | true | Whether or not to reposition overlays to stay in the window
13 | `placement` | no | oneOf('top', 'bottom', 'left', 'right') | 'right' | Placement of overlay in relation to target
14 | `theme` | no | oneOf(['light', 'dark']) | dark | Theme of tooltip background and text
15 | `trigger` | no | oneOf('hover', 'click', 'focus', 'manual') | 'hover' | Action to trigger showing overlay
16 |
--------------------------------------------------------------------------------
/docs/components/Pagination/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/pagination
3 | reactComponents:
4 | - Pagination
5 | reactPath: pivotal-ui/react/pagination
6 | ---
7 |
8 | Pagination is a method for allowing a user to view a subset of sorted data into a more comprehensible format. It allows a user to progress to the next or previous view, or choose a page number you want manually.
9 |
10 | The `Pagination` component provides a styled list of links used to navigate through a paginated list. By default,
11 | the component includes a 'previous page' button, a 'next page' button, and one link.
12 |
13 | The pagination component will display a maximum of five pages. When more than five are provided, the component will shrink with ellipses to show the first, last, active, and pages adjacent to the active page.
14 |
15 | Do's | Don'ts
16 | -------------|----------
17 | Use when it is unsuitable to display all the data on a single page/screen. | Do not use when you don’t want the user to pause for navigating to the next page. Instead consider simply having a scrolling vertical view.
18 | Use when the dataset is in some way ordered. |
19 |
20 | ```jsx harmony
21 | //title=Without extra props
22 | ;
23 | ```
24 |
25 | ```jsx harmony
26 | //title=With extra props
27 | //description=The following is an example of pagination with extra props:
28 | class PaginationAdvanced extends React.Component {
29 | constructor(props) {
30 | super(props);
31 | this.handleSelect = this.handleSelect.bind(this);
32 | this.state = {activePage: 1};
33 | }
34 |
35 | handleSelect(event, selectedEvent) {
36 | const newActivePage = selectedEvent.newActivePage;
37 | this.setState({activePage: newActivePage});
38 | }
39 |
40 | render() {
41 | return (
42 |
43 |
46 |
Current Page: {this.state.activePage}
47 |
48 | );
49 | }
50 | }
51 |
52 | ;
53 | ```
--------------------------------------------------------------------------------
/docs/components/Pagination/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | -------------|----------|----------|---------|------------
3 | `activePage` | no | Number | | The selected page number (starts at 1)
4 | `items` | no | Number | 1 | The number of page links displayed
5 | `next` | no | Boolean | true | Option to display a 'next page' button
6 | `onSelect` | no | Function | | Callback that is called when a page number or next/previous button is clicked. It receives an object containing `newActivePage`.
7 | `prev` | no | Boolean | true | Option to display a 'previous page' button
8 |
--------------------------------------------------------------------------------
/docs/components/Panels/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/panels
3 | reactComponents:
4 | - Panel
5 | reactPath: pivotal-ui/react/panels
6 | ---
7 |
8 | Use a `Panel` to contain content that has a logical grouping. Panels always have either a `header` or a `title`.
9 |
10 | Set the `title` or `header` prop to give a name to the panel. Use whichever is more appropriate for your application.
11 |
12 | ```jsx harmony
13 | //title=Panel with title
14 |
;
28 | ```
29 |
30 | Use the footer for information that does not belong in the panel body.
31 |
32 | ```jsx harmony
33 | //title=Panel with header and footer
34 |
35 | Click here for more info}}>
36 | These are the domains.
37 |
38 |
;
39 | ```
40 |
41 | When the panel has associated calls-to-action, set the `titleCols` or `headerCols` prop to include buttons to the right of the panel name.
42 |
43 | Because the panel is built on the `Grid` component, these buttons should be wrapped in `FlexCol` components.
44 |
45 | ```jsx harmony
46 | //title=Panel with call-to-action in title
47 |
48 | Add Domain]
51 | }}>
52 | These are the domains.
53 |
54 |
;
55 | ```
56 |
57 | When including a button in a panel header, make it small to keep the panel header size the same.
58 |
59 | ```jsx harmony
60 | //title=Panel with call-to-action in header
61 |
62 | Add Domain]
65 | }}>
66 | These are the domains.
67 |
68 |
;
69 | ```
70 |
71 | When the panel has content loading, set the `loading` prop to add a loading indicator to the top of the panel body.
72 |
73 | ```jsx harmony
74 | //title=Panel with loading animation
75 |
76 |
77 | Loading apps...
78 |
79 |
;
80 | ```
81 |
82 | When using multiple panels that are related, the first panel should have a title that names the grouping. Each panel header should name its subgroups.
83 |
84 | ```jsx harmony
85 | //title=Multiple related panels
86 |
;
94 | ```
--------------------------------------------------------------------------------
/docs/components/Panels/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | -------------------|----------|---------|---------|------------
3 | `bodyClassName` | no | String | | Class(es) to apply to the body
4 | `className` | no | String | | Class(es) to apply to the panel container
5 | `footer` | no | Node | | Node to render in the footer
6 | `footerClassName` | no | String | | Class(es) to apply to the footer
7 | `header` | no | String | | String to render in the header
8 | `headerClassName` | no | String | | Class(es) to apply to the header
9 | `headerCols` | no | Array | [] | An array of nodes to render on the header row, each element should be wrapped in a `FlexCol`
10 | `loading` | no | Boolean | | If true, will render a pulsing loading bar
11 | `panelClassName` | no | String | | Class(es) to apply to the area containing the header, body and footer
12 | `title` | no | String | | String to render in the title
13 | `titleClassName` | no | String | | Class(es) to apply to the title
14 | `titleCols` | no | Array | [] | An array of nodes to render on the title row, each element should be wrapped in a `FlexCol`
15 |
--------------------------------------------------------------------------------
/docs/components/Portals/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | reactComponents:
3 | - PortalSource
4 | - PortalDestination
5 | reactPath: pivotal-ui/react/portals
6 | ---
7 |
8 | The `Portal` components render DOM nodes elsewhere on the page. This is useful for things like
9 | modals, tooltips, and dropdowns, when you want to define the content near the trigger, but have
10 | it display at the bottom of the page (generally to solve z-index and overflow incompatibilities).
11 |
12 | For example, modals can be rendered at the bottom of ``, but the React component that creates
13 | the modal content (e.g. a `}>
30 | Wow!
31 |
32 |
44 | So much content.
45 |
46 | ;
47 | ```
48 |
49 | ```jsx harmony
50 | //title=Responsive breakpoints
51 | //description=Tabs can be responsive, and will display accordion-style on small screens and folder-style on large screens.
52 |
53 | I'm so responsive
54 | Me too
55 | ;
56 | ```
--------------------------------------------------------------------------------
/docs/components/Tabs/2.Props.md:
--------------------------------------------------------------------------------
1 | ## Tabs props
2 |
3 | Property | Required | Type | Default | Description
4 | -----------------------|----------|-------------------------------|----------|------------
5 | `actions` | no | Node | | An element or text that will display in the upper right
6 | `animation` | no | Boolean | false | Whether to animate when moving between tabs, defaults to true
7 | `defaultActiveKey` | no | Any | | The tab which will start out open. This should equal one of your tab's event keys
8 | `largeScreenClassName` | no | String | | Will be applied to large screen tabs only
9 | `onSelect` | no | Function | | Will override default behavior when clicking on a tab. If you want to retain the default behavior as well as add new functionality, change default active key in the function you provide
10 | `responsiveBreakpoint` | no | oneOf('xs', 'sm', 'md', 'lg') | | The size at which the small-screen tabs (accordion-style) should switch to large-screen tabs (folder-style)
11 | `smallScreenClassName` | no | String | | Will be applied to small screen tabs only
12 | `tabType` | no | oneOf('simple', 'left') | 'simple' | Use 'left' to have the tabs stacked to the left
13 |
14 | ## Tab props
15 |
16 | Property | Required | Type | Default | Description
17 | ------------------|----------|----------|---------|------------
18 | `aria-labelledby` | no | String | | Overwrite the default aria-labelledby for the tab for more specific accessibility information
19 | `className` | no | String | | ClassName to add to the tab content
20 | `disabled` | no | Boolean | false | If true, disable the tab
21 | `eventKey` | no | Any | | data representing the tab, to be used with defaultActiveKey or onSelect
22 | `onEntered` | no | Function | | A function that gets called with the eventKey on entering a tab once animations have finished
23 | `onExited` | no | Function | | A function that gets called with the eventKey on exiting a tab once animations have finished
24 | `tabClassName` | no | String | | className to add to the tab link
25 | `title` | yes | Node | | Text or an element rendered in the tab link
26 |
27 | ## LeftTabs props
28 |
29 | Property | Required? | Type | Description | Default
30 | -----------| ----------|------------------| ---------------------------------------------|------------------------
31 | `tabWidth` | no | `number` | The amount of FlexCol growth for the tabs | 3
--------------------------------------------------------------------------------
/docs/components/Text_Filter/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/text-filter
3 | reactComponents:
4 | - TextFilter
5 | reactPath: pivotal-ui/react/text-filter
6 | ---
7 |
8 | The `TextFilter` component provides a filter text input and allows you to filter
9 | and render a list of data based on the entered filter text.
10 |
11 | ```jsx harmony
12 | //title=Filter out data that does not contain the filter text
13 | //description=Given a list of data, render only the items that contain the filter text.
14 | const isOdd = (data, userInput) => {
15 | return data.filter(dataNum => {
16 | const dataStr = dataNum.toString();
17 | return dataStr.indexOf(userInput) !== -1;
18 | });
19 | };
20 | const renderData = dataItem => dataItem.map((item, i) =>
{item}
);
21 |
22 | ;
27 | ```
28 |
29 | ```jsx harmony
30 | //title=Filter out rows of a table based on filter text
31 | //description=Given a list of objects, render table rows for the objects with a `name` property that contains the filter text.
32 | const filter = (data, userInput) => {
33 | return data.filter(item => {
34 | return item.name.toLowerCase().indexOf(userInput.toLowerCase()) !== -1;
35 | });
36 | };
37 | const renderData = filteredData => {
38 | return ();
42 | };
43 |
44 | No results
),
53 | filter,
54 | filterPlaceholderText: 'Enter a name...',
55 | renderFilteredData: renderData
56 | }}/>;
57 | ```
58 |
--------------------------------------------------------------------------------
/docs/components/Text_Filter/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | ---------|----------|------|---------|------------
3 | `data` | true | array | [] | array of the data to filter.
4 | `emptyState` | false | node | | Node to render when there is no results due to filtering. If not provided `renderFilteredData` will be called with empty data.
5 | `filter` | true | function| (data, filterText) => data | filter function takes in the data and the current filter text, applies transformations, and returns the filtered data.
6 | `filterPlaceholderText` | false | string | 'Filter...' | Text to show where user input is accepted
7 | `renderFilteredData` | true | function | () => null | callback to render the result of filtering on the data.
8 |
--------------------------------------------------------------------------------
/docs/components/Toggle/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/toggle
3 | reactComponents:
4 | - Toggle
5 | reactPath: pivotal-ui/react/toggle
6 | ---
7 |
8 | ```jsx harmony
9 | //title=Basic example
10 | //description=The Toggle component takes an `onChange` callback.
11 | alert('I have been toggled!')}/>;
12 | ```
13 |
14 | ```jsx harmony
15 | //title=Toggle checked
16 | //description=Toggles accept a `checked` prop that turns on the switch. Note that you must handle the addition and removal of the `checked` property yourself.
17 | alert('I should handle check changes!')}/>;
18 | ```
19 |
20 | ```jsx harmony
21 | //title=Toggle size
22 | //description=Toggle has a `size` attribute that takes three options: small, medium (default), and large.
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | ;
40 | ```
41 |
--------------------------------------------------------------------------------
/docs/components/Toggle/2.Props.md:
--------------------------------------------------------------------------------
1 | Property | Required | Type | Default | Description
2 | ---------------|----------|-----------------------------------|----------|------------
3 | `className` | no | String | | Class name to put on the inner `label` element
4 | `id` | no | String | | The id of the element
5 | `size` | no | oneOf('small', 'medium', 'large') | 'medium' | Size variations
6 |
7 | _All other props are passed to the inner `input` element._
--------------------------------------------------------------------------------
/docs/components/Tooltips/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/tooltips
3 | reactComponents:
4 | - Tooltip
5 | - TooltipTrigger
6 | reactPath: pivotal-ui/react/tooltip
7 | ---
8 |
9 | The Tooltip component is a styled container for content that should be displayed when triggered by an
10 | OverlayTrigger or TooltipTrigger. It does not exhibit any dynamic behavior on its own.
11 |
12 | TooltipTriggers are simpler to use, and their associated Tooltips are shown and hidden using CSS `visibility` rules.
13 | In contrast to OverlayTriggers, the markup always exists in the DOM.
14 |
15 | ```jsx harmony
16 | //title=Basic example
17 | //description=TooltipTriggers are an easy way to create CSS-driven tooltips with the tooltip content created inline with the triggering element. The content of the tooltip is wrapped in a Tooltip component for ease of styling. Please note that the TooltipTrigger will add a lot of markup to the DOM if you are using it in a highly repeated layout.
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | ;
35 | ```
36 |
37 | ```jsx harmony
38 | //title=Markup example
39 | //description=Since the tooltip property is of type Node, you may add markup to the tooltip, such as links.
40 | clickable link} theme="light">
41 |
42 | ;
43 | ```
44 |
45 | ```jsx harmony
46 | //title=Manual trigger example
47 | //description=The trigger is manual, so the visibility of the tooltip is controlled by the display prop.
48 | class ManualTooltipExample extends React.Component {
49 | constructor(props) {
50 | super(props);
51 | this.state = {
52 | displayTooltip: false
53 | };
54 | }
55 |
56 | render() {
57 | return (
58 |
59 | this.setState({displayTooltip: !this.state.displayTooltip})
61 | }}>show/hide tooltip
62 |
69 | Check the checkbox to display my tooltip
70 |
71 |
72 | );
73 | }
74 | }
75 |
76 | ;
77 | ```
--------------------------------------------------------------------------------
/docs/components/Tooltips/2.Props.md:
--------------------------------------------------------------------------------
1 | ## Tooltip props
2 |
3 | Property | Required | Type | Default | Description
4 | ---------------|----------|-------------------------------------------|----------|----------------------------------
5 | `isSticky` | no | Boolean | false | Whether the tooltip hover is sticky or not
6 | `size` | no | oneOf(['auto', 'sm', 'md', 'lg']) | auto | Size of the tooltip
7 | `visible` | no | Boolean | true | Whether the tooltip contents are visible
8 |
9 | ## TooltipTrigger props
10 |
11 | Property | Required | Type | Default | Description
12 | -----------------|----------|-------------------------------------------|----------|----------------------------------
13 | `clickHideDelay` | no | Number | 1000 | How long (in milliseconds) to wait before hiding after click
14 | `display` | no | Boolean | false | if `trigger` is set to `manual` controls whether or not the tooltip is visible
15 | `isSticky` | no | Boolean | false | Whether the tooltip hover is sticky or not
16 | `onEntered` | no | Func | () => {} | Callback that is called after the tooltip is shown
17 | `onExited` | no | Func | () => {} | Callback that is called after the tooltip is hidden
18 | `placement` | no | oneOf(['left', 'right', 'bottom', 'top']) | top | Placement of tooltip in relation to target
19 | `size` | no | oneOf(['auto', 'sm', 'md', 'lg']) | auto | Size of the tooltip
20 | `theme` | no | oneOf(['light', 'dark']) | dark | Theme of tooltip background and text
21 | `tooltip` | yes | Node | | Tooltip content - will be wrapped in a Tooltip component
22 | `trigger` | no | oneOf(['hover', 'click', 'manual']) | hover | Action to trigger showing tooltip
23 |
--------------------------------------------------------------------------------
/docs/components/Wizard/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | reactComponents:
3 | - Wizard
4 | reactPath: pivotal-ui/react/wizard
5 | ---
6 |
7 | The `Wizard` component allows the user to navigate through a series of Wizard pages. Each page has a render function which returns the JSX required to show the page. Various callbacks can be provided as props to customize the Wizard's behavior.
8 |
9 | ```jsx harmony
10 | //title=Basic example
11 | const pages = [{
12 | render() { return This is the first page of the wizard. By default, the wizard cannot be cancelled. The user cannot go back from the first page. Click the Next button to proceed.;}
13 | }, {
14 | render() { return This is the second page of the wizard. The user can click Back or Next.;}
15 | }, {
16 | render() { return This is the third and final page of the wizard. The user can click Back or Finish;}
17 | }];
18 |
19 | alert('All done!')}/>;
20 | ```
21 |
22 | ```jsx harmony
23 | //title=With saving and savingText
24 | const pages = [{
25 | render() { return This is the first page of the wizard. The user can click Next.;}
26 | }, {
27 | render() { return This is the last page of the wizard. The Back button is disabled and the Finish button shows a spinner icon.;}
28 | }];
29 |
30 | alert('All done!')}/>;
31 | ```
32 |
33 | ```jsx harmony
34 | //title=With custom back and finish components
35 | const pages = [{
36 | render() { return This is the first page of the wizard, click the Next button to see the custom back and finish components.;}
37 | }, {
38 | render() { return This is the last page of the wizard with custom back and finish components.;},
39 | backComponent: Custom back component,
40 | finishComponent: Custom finish component
41 | }];
42 |
43 | ;
44 | ```
--------------------------------------------------------------------------------
/docs/components/Wizard/2.Props.md:
--------------------------------------------------------------------------------
1 | ## Wizard props
2 |
3 | Property | Required | Type | Default | Description
4 | -------------|----------|----------|---------|------------
5 | `cancel` | no | Function | | Callback to call when the user cancels the Wizard.
6 | `cancelText` | no | String | Cancel | Text for the Cancel button.
7 | `finish` | no | Function | | Callback to call when the user finishes the Wizard.
8 | `finishText` | no | String | Finish | Text for the Finish button.
9 | `pages` | yes | Array | [] | An array of Wizard Pages.
10 | `saving` | no | Boolean | false | When true, renders the Finish button with a spinner icon and disables the Back button.
11 | `savingText` | no | String | Saving | Text for the Finish button when `saving` is true.
12 |
13 | ## Page object props
14 |
15 | Property | Required | Type | Default | Description
16 | -------------------|----------|----------|---------|------------
17 | `backComponent` | no | Node | | Replaces the standard Back button.
18 | `finishComponent` | no | Node | | Replaces the standard Finish button.
19 | `hideFinishButton` | no | Boolean | | Hides the Finish button.
20 | `hideNextButton` | no | Boolean | false | Whether to hide the Next button.
21 | `nextEnabled` | no | Function | | Callback to determine whether to enable the Next button. The Wizard's `getPage` function is passed as an argument to the callback.
22 | `nextText` | no | Function | | Callback to determine the text for the Next button.
23 | `onClickBack` | no | Function | | Called when the user clicks the Back button. Can optionally return a page index to go back to.
24 | `onClickNext` | no | Function | | Called when the user clicks the Next button.
25 | `render` | yes | Function | | Function that returns JSX for a page.
26 |
--------------------------------------------------------------------------------
/docs/concepts/8-Point_Grid/1.Index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 8-Point Grid
3 | menu: concepts
4 | ---
5 |
6 | Pivotal UI uses an 8-point grid system for sizing, spacing, and laying out components relative to one another. This means that any padding, margin, button height, etc. is always a **multiple of 8 pixels**. This makes it easy to compose Pivotal UI components together neatly and consistently. For a deeper dive into how Pivotal arrived at the 8-point grid, [read this article](https://builttoadapt.io/intro-to-the-8-point-grid-system-d2573cde8632).
7 |
8 | 
9 |
10 | ## Using the 8-point grid
11 |
12 | Pivotal UI incorporates the 8-point grid in several ways for different use cases.
13 |
14 | ### Form, Panel & Table components
15 |
16 | Components like the `Form`, `Panel` and `Table` have the 8-point grid built in, so using them means getting the benefits of the 8-point grid for free. For example, the `Form` lays out all of its fields and labels according to the grid. For more information, see the individual component pages.
17 |
18 | ### Grid & FlexCol components
19 |
20 | When more control is needed over layout, or when implementing custom components, the `Grid` and `FlexCol` components can be used to lay out content according to the 8-point grid. For more information, see the [Grids page](/grids).
21 |
22 | ### Margin & padding modifiers
23 |
24 | The margin and padding CSS modifier classes (e.g. `mtxl`, `paxxl`) make it simple to add spacing around elements in increments of 8 pixels. The `l` indicates 8 pixels, `xl` indicates 16 pixels, and so on. For more information, see the [Whitespace page](/whitespace).
--------------------------------------------------------------------------------
/docs/concepts/Accessibility/1.Guidelines.md:
--------------------------------------------------------------------------------
1 | When it comes to building accessible user interfaces, Pivotal UI aims to help designers and engineers wherever it can. Still, there are several guidelines to keep in mind when implementing accessibility, both with and without Pivotal UI.
2 |
3 | Some good resources for learning more about accessibility are the [Web Content Accessibility Guidelines (WCAG)](https://www.w3.org/TR/2008/REC-WCAG20-20081211/), which are the standards by which accessibility is often measured on the web, and the [WCAG Quick Reference](https://www.w3.org/WAI/WCAG21/quickref/?versions=2.0), which lists patterns and techniques for meeting each of the WCAG standards.
4 |
5 | ## Do not rely on color to convey meaning
6 |
7 | Be careful of relying solely on color to convey information. If users are not able to distinguish between colors easily, they could miss this information.
8 |
9 | For example, an icon changing color from green to red should not be the only indication of an error. In this case, maybe there could be accompanying error text.
10 |
11 | ## Keep color contrast easy to see
12 |
13 | When choosing colors to use for UI elements, we must consider the contrast between text color and the background color behind it. If this contrast is too low, the text will be hard to see over the background.
14 |
15 | To measure this, we can calculate the contrast ratio between a foreground color and a background color. Contrast ratios range from 1:1 (same exact colors) to 21:1 (pure black on pure white).
16 |
17 | According to [WCAG](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html), a minimum contrast ratio of 4.5:1 achieves level AA compliance for normal-sized text and is recommended to account for users with less-than-perfect vision. See [here](https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast) for detailed acceptance criteria and exceptions to this rule.
18 |
19 | To ease the process of finding accessible combinations of Pivotal UI colors, use [this tool](/concepts/accessibility/color_contrast_tool).
20 |
21 | ## Support keyboard navigation
22 |
23 | Some users may use the keyboard to navigate through a website, rather than a mouse. For this reason, it should be possible to focus on and active any interactive elements using only the keyboard (buttons, links, inputs, anything clickable).
24 |
25 | The easiest way to do this is to use native HTML elements whenever possible, since browsers already understand how to make these elements focusable and accessible to assistive technologies.
26 |
27 | For example, do not create a styled `div` element with `onClick` behavior instead of a `button`. A custom interactive element like this will not be keyboard-focusable by default, and it will be much harder to ensure it is exposed to assistive technologies properly.
28 |
--------------------------------------------------------------------------------
/docs/concepts/Modifier_Classes/1.Index.md:
--------------------------------------------------------------------------------
1 | Pivotal UI provides several CSS "modifier" classes. A modifier is a tiny CSS class that has **one** job (e.g., it sets a single CSS property). They are sometimes called utility classes or atomic classes by other front-end libraries. Modifiers help avoid writing repetitive CSS and make it easy to incorporate Pivotal UI's colors, typography, and other common patterns.
2 |
3 | It is very often possible to achieve a desired effect just by composing modifier classes, without writing any new CSS. Prefer this approach whenever it is feasible, since it decreases the amount of CSS to maintain in your team's codebase and makes styling more consistent across codebases.
4 |
5 | ## Anatomy of a modifier
6 |
7 | The CSS for a modifier class looks like this:
8 |
9 | ```css
10 | .underline {
11 | text-decoration: underline;
12 | }
13 | ```
14 |
15 | The `underline` class does exactly one thing: gives any text with this class an underline. On its own, this is not very impressive. The real power of modifiers becomes clear when composing multiple modifiers together.
16 |
17 | ## Composing modifiers
18 |
19 | To demonstrate how modifier classes can be composed, consider this unstyled content that displays the current year:
20 |
21 | ```jsx harmony
22 | //title=With no modifiers
23 |
24 | current year:{new Date().getFullYear()}
25 |
;
26 | ```
27 |
28 | Now, let's add a bunch of modifier classes to the outer `div` and inner `span` elements to center the text and add some style:
29 |
30 | ```jsx harmony
31 | //title=With several modifiers
32 |
33 | current year:{new Date().getFullYear()}
34 |
;
35 | ```
36 |
37 | Without writing any CSS, the content looks completely different.
38 |
39 | ## Modifier list
40 |
41 | For details about all of the available modifiers, see the modifier documentation pages:
42 |
43 | - [Alignment](/modifiers/alignment/usage)
44 | - [Border](/modifiers/border/usage)
45 | - [Box Shadows](/modifiers/box-shadows/usage)
46 | - [Colors](/modifiers/colors/usage)
47 | - [Ellipsis](/modifiers/ellipsis/usage)
48 | - [Links](/modifiers/links/usage)
49 | - [Positioning](/modifiers/positioning/usage)
50 | - [Typography](/modifiers/typography/usage)
51 | - [Vertical Alignment](/modifiers/vertical-alignment/usage)
52 | - [Whitespace](/modifiers/whitespace/usage)
--------------------------------------------------------------------------------
/docs/modifiers/Alignment/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/alignment
3 | ---
4 |
5 | Use alignment modifier classes to control the horizontal and vertical alignment of an element's contents.
6 |
7 | ## Classes
8 |
9 | Modifier | Purpose
10 | ---------|--------
11 | `txt-l` | Align contents to the left
12 | `txt-c` | Center contents horizontally
13 | `txt-r` | Align contents to the right
14 | `txt-t` | Align contents to the top
15 | `txt-m` | Center contents vertically
16 | `txt-b` | Align contents to the bottom
17 |
18 | Note that the vertical alignment classes listed here (`txt-t`, `txt-m`, `txt-b`) will only work when applied to elements with `display: inline` or `display: table-cell`. For vertical alignment within `display: block` elements, [these modifiers](/vertical-alignment) might be more useful.
19 |
20 | ```jsx harmony
21 | //title=Horizontal alignment
22 |
35 | This long text is used to expand the height of this
36 | table so that we can demonstrate our vertical alignment classes
37 | to the right.
38 |
39 |
40 | txt-t
41 |
42 |
43 | txt-m
44 |
45 |
46 | txt-b
47 |
48 |
49 |
50 |
;
51 | ```
52 |
--------------------------------------------------------------------------------
/docs/modifiers/Border/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/border
3 | ---
4 |
5 | Use border modifiers to control borders around an element. Whenever possible, use these instead of defining custom borders in CSS.
6 |
7 | ## Classes
8 |
9 | Modifier | Purpose
10 | ---------|--------
11 | `border` | Add borders on all sides
12 | `border-top` | Add a border on the top
13 | `border-right` | Add a border on the right
14 | `border-bottom` | Add a border on the bottom
15 | `border-left` | Add a border on the left
16 | `border-none` | Remove borders from all sides
17 | `border-top-0` | Remove border from the top
18 | `border-right-0` | Remove border from the right
19 | `border-bottom-0` | Remove border from the bottom
20 | `border-left-0` | Remove border from the left
21 | `border-rounded` | Make borders rounded
22 | `border-not-rounded` | Make borders not rounded
23 |
24 | ```html
25 | //title=Adding borders
26 |
79 | ```
--------------------------------------------------------------------------------
/docs/modifiers/Box_Shadows/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/box-shadows
3 | ---
4 |
5 | Use box shadow modifiers to add shadows to elements. Box shadows are used to to describe the visual hierarchy of objects.
6 |
7 | `box-shadow-key-*` modifiers add directional shadows (heavier on the bottom than the top). `box-shadow-amb-*` modifiers add shadows that are even on all sides, emulating ambient light. `box-shadow-*` modifiers combine them both.
8 |
9 | ## Classes
10 |
11 | Modifier | Purpose
12 | ---------|--------
13 | `box-shadow-key-1` | Add light key shadow
14 | `box-shadow-key-2` | Add medium key shadow
15 | `box-shadow-key-3` | Add heavy key shadow
16 | `box-shadow-amb-1` | Add light ambient shadow
17 | `box-shadow-amb-2` | Add medium ambient shadow
18 | `box-shadow-amb-3` | Add heavy ambient shadow
19 | `box-shadow-1` | Add light shadow
20 | `box-shadow-2` | Add medium shadow
21 | `box-shadow-3` | Add heavy shadow
22 |
23 | ```html
24 | //title=Basic example
25 |
26 |
box-shadow-key-1
27 |
box-shadow-amb-1
28 |
box-shadow-1
29 |
30 |
31 |
box-shadow-key-2
32 |
box-shadow-amb-2
33 |
box-shadow-2
34 |
35 |
36 |
box-shadow-key-3
37 |
box-shadow-amb-3
38 |
box-shadow-3
39 |
40 | ```
--------------------------------------------------------------------------------
/docs/modifiers/Colors/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/colors
3 | ---
4 |
5 | Use color modifiers to to give elements background and text colors drawn from the Pivotal UI color palette.
6 |
7 | Our color palette is composed of several different colors. At any given point it captures the current
8 | evolution of our design and likely includes old and new colors. Whenever possible, evolve the old
9 | colors rather than adding new ones.
10 |
11 | ## Classes
12 |
13 | The full list of colors can be found [here](/modifiers/colors/palette).
14 |
15 | Prepend any color name with `bg-` to apply that color to an element's background.
16 |
17 | Prepend any color name with `type-` to apply that color to an element's text.
18 |
19 | ```html
20 | //title=Text colors
21 |
;
34 | ```
--------------------------------------------------------------------------------
/docs/modifiers/Ellipsis/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/ellipsis
3 | ---
4 |
5 | Use the `type-ellipsis` modifier to cause text within an element to be truncated with ellipses ("...") when it is too long to be displayed fully.
6 |
7 | ## Classes
8 |
9 | Modifier | Purpose
10 | ---------|--------
11 | `type-ellipsis` | Truncate inner text with ellipses
12 |
13 | ```jsx harmony
14 | //title=Basic example
15 |
16 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
17 |
104 | The div below this text has been hidden with the "display-none" class.
105 |
106 | This div is hidden!
107 |
108 |
109 | ```
--------------------------------------------------------------------------------
/docs/modifiers/Selection/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/selection
3 | ---
4 |
5 | Use the `pui-no-select` modifier to prevent text from being selectable. This is useful to prevent accidental selection of the labels on checkboxes when clicking them.
6 |
7 | It is generally not recommended to use this modifier on its own, since preventing the selection of some text may worsen the user experience. Instead of adding the class directly, use the `noSelect` prop on the `Checkbox` or `Radio`, which will automatically add this modifier to the text next to the input.
8 |
9 | For the `noSelect` prop to take effect, you will need to import this modifier as shown below.
10 |
11 | ## Classes
12 |
13 | Modifier | Purpose
14 | ---------|--------
15 | `pui-no-select` | Prevent selection of text within an element
16 |
17 | ```jsx harmony
18 | //title=Using the noSelect prop on a Checkbox
19 |
20 |
Try highlighting and clicking rapidly on the labels below.
21 | This is an unselectable checkbox label.
22 | This is a selectable checkbox label.
23 |
;
24 | ```
--------------------------------------------------------------------------------
/docs/modifiers/Typography/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/typography
3 | ---
4 |
5 | Use the typography modifiers to control text sizing, emphasis, and color.
6 |
7 | [Source Sans Pro](https://fonts.google.com/specimen/Source+Sans+Pro) is Pivotal UI's default font family. It is packaged with the typography CSS, so the import statement below includes it in your site.
8 |
9 | ## Classes
10 |
11 | In addition to the modifiers listed here, importing typography CSS gives you the `type-{color-name}` modifiers listed on the [Colors page](/colors).
12 |
13 | Modifier | Purpose
14 | ---------|--------
15 | `em-low` | Makes font weight thin
16 | `em-default` | Makes font weight default
17 | `em-high` | Makes font weight bold
18 | `em-max` | Makes font weight extra bold
19 | `em-alt` | Makes text uppercase
20 | `h1` | Sets font size, family, and spacing to be the same as an `
` tag
21 | `h2` | Sets font size, family, and spacing to be the same as an `
` tag
22 | `h3` | Sets font size, family, and spacing to be the same as an `
` tag
23 | `h4` | Sets font size, family, and spacing to be the same as an `
` tag
24 | `h5` | Sets font size, family, and spacing to be the same as an `
` tag
25 | `h6` | Sets font size, family, and spacing to be the same as an `
` tag
26 | `type-lg` | Makes font size larger than the default
27 | `type-sm` | Makes font size smaller than the default
28 | `type-xs` | Makes font size much smaller than the default
29 |
30 | ```html
31 | //title=Default font sizes
32 |
56 | ```
57 |
58 | ```html
59 | //title=Separating code and visual semantics
60 | //description=Sometimes you may need to use a heading which has different visual and code semantics. You can accomplish this by combining classes with elements (classes take visual precedence over elements in this case).
61 |
I am an h1!
62 |
I am an h2!
63 | ```
64 |
65 | ```html
66 | //title=Using heading classes
67 | //description=If it's not a heading but you need similar visual treatment, you can add just the class to any element. However, use headings when possible since they add semantic value.
68 |
Heading level 2 on a div
69 | ```
70 |
71 | ```html
72 | //title=Multiline headings
73 | //description=Headings are spaced so their line height and padding are consistent on one or many lines.
74 |
One line heading
75 |
76 |
I am a multiline heading
77 | ```
--------------------------------------------------------------------------------
/docs/modifiers/Vertical_Alignment/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/vertical-alignment
3 | ---
4 |
5 | Use the `aligner` class on a container element to help vertically align the element's children to the top, center, or bottom. Use the `aligner-item` and `aligner-item-*` classes on the children of the container element to position them within the container.
6 |
7 | The height of the `aligner` element is set to 230 pixels by default but can be customized via CSS or inline styles.
8 |
9 | ## Classes
10 |
11 | Modifier | Purpose
12 | ---------|--------
13 | `aligner` | Makes an element into a container with vertically-aligned children
14 | `aligner-item` | Makes an element int a child of the `aligner` container (centered vertically by default)
15 | `aligner-item-top` | Aligns an item to the top of the container
16 | `aligner-item-bottom` | Aligns an item to the bottom of the container
17 |
18 | ```html
19 | //title=Default example
20 |
25 | ```
26 |
27 | ```html
28 | //title=Custom height example
29 | //description=You can override the default height with an inline style (or with CSS).
30 |
33 | ```
34 |
35 | ```html
36 | //title=Combination example
37 | //description=You can position both vertically and horizontally by combining the `aligner` with grids, or the text-alignment classes (`txt-l`, `txt-r`, and `txt-c`).
38 |
41 | ```
--------------------------------------------------------------------------------
/docs/modifiers/Whitespace/1.Usage.md:
--------------------------------------------------------------------------------
1 | ---
2 | cssPath: pivotal-ui/css/whitespace
3 | ---
4 |
5 | Use the whitespace modifiers to control the spacing around elements (margin) and within elements (padding).
6 |
7 | ## Classes
8 |
9 | Whitespace class names are composed of three parts, following this format: `{spacing-type}{direction}{size}`. The tables below list the possible values for each part. Some examples:
10 |
11 | - `mtxl`: margin-top-extra-large (add a 32-pixel margin on top)
12 | - `pan`: padding-all-none (remove padding on all sides)
13 | - `mvs`: margin-vertical-small (add 2-pixel margins on the top and bottom)
14 |
15 | Spacing type | Description
16 | -------------|------------
17 | `p` | Padding (spacing within an element's borders)
18 | `m` | Margin (spacing outside of an element's borders)
19 |
20 | Direction | Description
21 | ----------|------------
22 | `a` | All sides
23 | `t` | Top only
24 | `r` | Right side only
25 | `b` | Bottom only
26 | `l` | Left side only
27 | `h` | Left and right sides (horizontal)
28 | `v` | Top and bottom (vertical)
29 |
30 | Size | Description
31 | -----|------------
32 | `n` | None (0px)
33 | `s` | Small (2px)
34 | `m` | Medium (4px)
35 | `l` | Large (8px)
36 | `xl` | Extra large (16px)
37 | `xxl` | Extra extra large (24px)
38 | `xxxl` | Extra extra extra large (32px)
39 |
40 | ```html
41 | //title=Padding modification example
42 |