Skip to content

Commit

Permalink
Tweak and consolidate date picker
Browse files Browse the repository at this point in the history
  • Loading branch information
anselmbradford committed Nov 20, 2024
1 parent 3f56fdc commit c77b2b9
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 37 deletions.
20 changes: 13 additions & 7 deletions docs/pages/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ variation_groups:
- variations:
- variation_is_deprecated: false
variation_name: Date picker
variation_description:
Date inputs use the browser's built-in date picker, where available,
otherwise they fall back to a text input.
variation_code_snippet: |-
<div class="m-form-field">
<input class="a-text-input"
type="date"
id="datepicker-example"
placeholder="mm/dd/yyyy">
</div>
variation_group_name: Types
<input type="date" class="a-text-input" placeholder="mm/dd/yyyy">
variation_group_name: Types
- variation_is_deprecated: false
variation_name: Date picker (full-width)
variation_description:
Date inputs use the browser's built-in date picker, where available,
otherwise they fall back to a text input.
variation_code_snippet: |-
<input type="date" class="a-text-input a-text-input--full" placeholder="mm/dd/yyyy">
variation_group_name: Types
accessibility: >-
Inputs should always be paired with a `label` for accessibility reasons.
Expand Down
9 changes: 0 additions & 9 deletions docs/pages/text-inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,6 @@ variation_groups:
id="full-textarea-example"
placeholder="Placeholder text">Input text</textarea>
</div>
- variation_group_name: Date input
variations:
- variation_is_deprecated: false
variation_name: Date input
variation_description:
Date inputs use the browser's built-in date picker, where available,
otherwise they fall back to a text input.
variation_code_snippet: |-
<input type="date" class="a-text-input a-text-input--full" placeholder="mm/dd/yyyy" data-type="date" id="o-filterable-list-controls_from-date">
guidelines: >-
### Stylistic guidelines
Expand Down
2 changes: 1 addition & 1 deletion packages/cfpb-design-system/dist/base/index.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/cfpb-design-system/dist/base/index.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/cfpb-design-system/dist/base/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cfpb-design-system/dist/base/index.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/cfpb-design-system/dist/index.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/cfpb-design-system/dist/index.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/cfpb-design-system/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/cfpb-design-system/dist/utilities/index.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/cfpb-design-system/dist/utilities/index.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/cfpb-design-system/dist/utilities/index.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions packages/cfpb-design-system/src/base/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ textarea {
input[type='date'] {
appearance: textfield;
display: revert;

&.a-text-input--full {
-webkit-min-logical-width: calc(100% - 16px);
}
}

strong,
Expand Down

0 comments on commit c77b2b9

Please sign in to comment.