Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(date-picker): usage content updates #1209

Merged
merged 35 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
90b23e4
docs(date-picker): usage content updates
aagonzales May 19, 2020
daad348
Merge branch 'master' into docs-date-picker
aagonzales May 19, 2020
56babe6
Merge branch 'master' into docs-date-picker
aagonzales May 19, 2020
fb6f51f
Update src/pages/components/date-picker/usage.mdx
aagonzales May 20, 2020
6a78dbc
image-updates
aagonzales May 21, 2020
180b58a
Merge branch 'master' into docs-date-picker
aagonzales May 21, 2020
01dc16e
Merge branch 'docs-date-picker' of https://github.com/aagonzales/carb…
aagonzales May 21, 2020
07715b4
anatomy-add-description
aagonzales May 22, 2020
7ee8e0c
Merge branch 'master' into docs-date-picker
aagonzales May 22, 2020
cb93c2f
bold-labels
aagonzales May 22, 2020
d4a23a0
Merge branch 'docs-date-picker' of https://github.com/aagonzales/carb…
aagonzales May 22, 2020
981cf2f
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
f6aa6a4
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
40b5125
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
9f7611e
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
017d09b
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
c0c9a65
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
5c3b4d8
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
718a09a
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
5a07aa5
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
13f6390
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
97c2c44
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
e2bae03
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
f6c1e93
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
df817e1
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
fd843c1
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
4a53fee
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
69c3609
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
b0ccf73
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
f7c8250
Apply suggestions from code review
aagonzales May 26, 2020
768efde
Merge branch 'master' into docs-date-picker
aagonzales May 26, 2020
f709a79
Update src/pages/components/date-picker/usage.mdx
aagonzales May 26, 2020
4b033c9
Update src/pages/components/date-picker/style.mdx
aagonzales May 28, 2020
cc50321
Merge branch 'master' into docs-date-picker
aagonzales May 28, 2020
f4c5218
Merge branch 'master' into docs-date-picker
aagonzales May 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/pages/components/date-picker/images/date-picker-style-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/pages/components/date-picker/images/date-picker-style-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 48 additions & 38 deletions src/pages/components/date-picker/style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,32 @@ tabs: ["Usage", "Style", "Code", "Accessibility"]

## Color

Inputs come in two different colors. The default input color is `$field-01` and is used on `$ui-background` and `$ui-02` page backgrounds. The `--light` version input color is `$field-02` and is used on `$ui-01` page backgrounds.

If a `min date` is set on the calendar, then any text appearing before that date will be `$disabled-03`, otherwise all text should be `$text-01` (unless the number is selected or highlighted).

| Class | Property | Color token |
| -------------------------------------------------------- | ---------------- | ------------------------------------------ |
| `.bx--label` | text color | `$text-02` |
| `.bx--date-picker__input` | background-color | `$field-01` |
| `.bx--date-picker__input` <br/> `.bx--text-input--light` | background-color | `$field-02` |
| `.bx--date-picker__input` | border-bottom | `$ui-04` |
| `.bx--date-picker__input` | text color | `$text-01` |
| `:placeholder` | text color | `$text-03` |
| `.bx--date-picker__icon` | color | `$icon-01` |
| `calendar` | background-color | `$ui-01` |
| `calendar` | box-shadow | `0 12px 24px 0` <br/> `rgba(0, 0, 0, 0.1)` |
| `day` | text color | `$text-01` |
| `day.selected` | text color | `$text-04` |
| `day.selected` | background-color | `$interactive-01` |
| `day.inRange` | text color | `$interactive-01` |
| `day.endRange` | border | `$interactive-01` |
| `day.nextMonthDay` | text color | `$text-02` |
| `.today` | background-color | `$interactive-01` |
Inputs come in two different colors. The default input color is `$field-01` and is used on `$ui-background` and `$ui-02` page backgrounds. The `light` version input color is `$field-02` and is used on `$ui-01` page backgrounds.

<div className="image--fixed">
### Date input

![Example of a date picker](images/date-picker-style-1.png)
| Class | Property | Color token |
| -------------------------------------------------------- | ---------------- | ----------- |
| `.bx--label` | text color | `$text-02` |
| `.bx--date-picker__input` | background-color | `$field-01` |
| `.bx--date-picker__input` <br/> `.bx--text-input--light` | background-color | `$field-02` |
| `.bx--date-picker__input` | border-bottom | `$ui-04` |
| `.bx--date-picker__input` | text color | `$text-01` |
| `:placeholder` | text color | `$text-03` |
| `.bx--date-picker__icon` | color | `$icon-01` |

</div>
<br />

<Caption>
Date picker example using both $field-02 (top) and $field-01 (bottom)
</Caption>
#### Interactive states

### Interactive states
<br />

| Class | Property | Color token |
| --------------------------- | ---------------- | -------------- |
| `input:focus` | border | `$focus` |
| `input[data-invalid]` | border-bottom | `$support-01` |
| `.bx--form-requirement` | text color | `$support-01` |
| `input[data-invalid]:focus` | border-bottom | `$support-01` |
| `day:focus` | border | `$focus` |
| `day:hover` | background-color | `$hover-ui` |
| `.bx--label:disabled` | text color | `$disabled-02` |
| `input:disabled` | background-color | `$disabled-01` |
| `input:disabled` | text color | `$disabled-02` |
Expand All @@ -60,19 +43,46 @@ If a `min date` is set on the calendar, then any text appearing before that date

**Disabled:** Disabled state should have a `.not-allowed` cursor on hover.

### Calendar menu

| Class | Property | Color token |
| ------------------ | ---------------- | ------------------------------------------ |
| `calendar` | background-color | `$ui-01` |
| `calendar` | box-shadow | `0 12px 24px 0` <br/> `rgba(0, 0, 0, 0.1)` |
| `today` | background-color | `$interactive-01` |
| `day` | text color | `$text-01` |
| `day.selected` | text color | `$text-04` |
| `day.selected` | background-color | `$interactive-01` |
| `day.inRange` | text color | `$interactive-01` |
| `day.endRange` | border | `$interactive-01` |
| `day.nextMonthDay` | text color | `$text-02` |
| `day:focus` | border | `$focus` |
| `day:hover` | background-color | `$hover-ui` |
| `day:disabled` | text color | `$text-02` |

<div className="image--fixed">

![Example of a date picker](images/date-picker-style-1.png)

</div>

<Caption>
Date picker example using both $field-02 (top) and $field-01 (bottom)
</Caption>

## Typography

Labels should be set in sentence case, with only the first word in a phrase and any proper nouns capitalized, and no more than three words.

| Class | Font-size | Font-weight | Type token |
| ------------------------- | ---------- | ------------- | ---------------- |
| `.bx--label` | 14 / 0.875 | Regular / 400 | `$label-01` |
| `.bx--date-picker__input` | 14 / 0.875 | Regular / 400 | `$body-short-01` |
| `.bx--form-requirement` | 12 / 0.75 | Regular / 400 | `$label-01` |
| Class | Font-size | Font-weight | Type token |
| ------------------------- | ---------- | ------------- | ----------- |
| `.bx--label` | 14 / 0.875 | Regular / 400 | `$label-01` |
| `.bx--date-picker__input` | 14 / 0.875 | Regular / 400 | `$code-02` |
| `.bx--form-requirement` | 12 / 0.75 | Regular / 400 | `$label-01` |

## Structure

### Simple date pickers
### Simple date input

| Class | Property | px / rem | Spacing token |
| ------------------------- | --------------------------- | -------- | ------------- |
Expand All @@ -91,7 +101,7 @@ Labels should be set in sentence case, with only the first word in a phrase and
Structure and spacing for simple and single date pickers | px / rem
</Caption>

### Single & range date pickers
### Calendar date pickers

| Class | Property | px / rem | Spacing token |
| ---------------------------- | ---------------------------------------- | -------- | ------------- |
Expand Down
Loading