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

Fixes #1483, #1484, #1482 - Clay Datepicker and Clay Timepicker #1440

Merged
merged 69 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
3e58af3
Fixes #1483 - Add clay-datepicker
matuzalemsteles Jan 15, 2019
736a539
Fixes #1484 - Add clay-timepicker
matuzalemsteles Jan 15, 2019
e9255d0
Fixes #1483 - Regen yarn.lock
matuzalemsteles Jan 15, 2019
6e43963
Fixes #1483 - Improve css
matuzalemsteles Jan 15, 2019
314170f
Fixes #1483 - Fix the compute firstDayOfWeek
matuzalemsteles Jan 15, 2019
3b426b7
Fixes #1483 - Add to dot's click to return to current day
matuzalemsteles Jan 16, 2019
506fb26
Fixes #1483 - SF
matuzalemsteles Jan 16, 2019
c1fd157
Fixes #1483 - Rename clay-datepicker to clay-date-picker
matuzalemsteles Jan 17, 2019
2ae0fbb
Fixes #1484 - Rename clay-timepicker to clay-time-picker
matuzalemsteles Jan 17, 2019
992b945
Fixes #1483 - Adds a more detailed JSDOC of weeks
matuzalemsteles Jan 17, 2019
3fa0c8b
Fixes #1483 - SF
matuzalemsteles Jan 17, 2019
ad25b2b
Fixes #1483 - typo
matuzalemsteles Jan 17, 2019
e383eb8
Fixes #1483 - Moves the getFullYear() call outside find()
matuzalemsteles Jan 17, 2019
6eb5204
Fixes #1483 - SF
matuzalemsteles Jan 18, 2019
1c0902f
Fixes #1483 - Rename Weekdays to WeekdayHeader
matuzalemsteles Jan 18, 2019
45d83a9
Fixes #1483 - Rename Weekday to DaysTable
matuzalemsteles Jan 18, 2019
c76c607
Fixes #1483 - Rename Week to Weekday
matuzalemsteles Jan 18, 2019
94b27aa
Fixes #1483 - Rename Day to DayNumber
matuzalemsteles Jan 18, 2019
a2e95b9
Fixes #1483 - Removing defaultValue and making the component uncontro…
matuzalemsteles Jan 18, 2019
85e6135
Fixes #1483 - Install eslint-plugin-sort-destructure-keys
matuzalemsteles Jan 18, 2019
49bec5e
Fixes #1483 - SF
matuzalemsteles Jan 18, 2019
0df681e
Fixes #1483 - Improves readability
matuzalemsteles Jan 18, 2019
5ae04f6
Fixes #1483 - SF
matuzalemsteles Jan 18, 2019
df307b0
Fixes #1483 - Avoid re-creating the initial state at each render
matuzalemsteles Jan 18, 2019
f6692a0
Fixes #1483 - Adds more information to the JSDOC of some functions an…
matuzalemsteles Jan 22, 2019
d7596d9
Fixes #1483, #1484 - Update the license to BSD-3-Clause and include l…
matuzalemsteles Jan 22, 2019
8c11ea0
Fixes #1483, #1484 - Adds the build task and makes the demo visible w…
matuzalemsteles Jan 23, 2019
f54a621
Fixes #1483 - Adds the a11y.html on demo
matuzalemsteles Jan 23, 2019
403a560
Fixes #1484 - SF
matuzalemsteles Jan 23, 2019
a5a86b2
Fixes #1482 - ClayCSS added SVG Simple Circle
matuzalemsteles Jan 28, 2019
2003aa2
Fixes #1482 - Extract the demo CSS to ClayCSS
matuzalemsteles Jan 28, 2019
1d73ee9
Fixes #1483 - Replace ariaLabel by ariaLabels to pass all necessary a…
matuzalemsteles Jan 28, 2019
fd4e138
Fixes #1483 - SF
matuzalemsteles Jan 29, 2019
b74fa6d
Fixes #1471 - Regen yarn.lock
matuzalemsteles Feb 5, 2019
3d4526b
Fixes #1483, #1484 - Remove export non-default
matuzalemsteles Feb 5, 2019
0e00ac2
Fixes #1482 - ClayCSS Mixins `clay-button-size` add options to config…
pat270 Feb 14, 2019
4853b95
Fixes #1482 - ClayCSS Mixin `clay-container` added `border-color`, `b…
pat270 Feb 14, 2019
d316aeb
Fixes #1482 - ClayCSS Mixin added `clay-select-variant` for styling s…
pat270 Feb 19, 2019
3a0a97b
Fixes #1482 - ClayCSS New mixin `clay-input-group-text-variant` for s…
pat270 Feb 19, 2019
2ae6729
Fixes #1482 - ClayCSS New mixin `clay-dropdown-menu-variant` for styl…
pat270 Feb 19, 2019
9e28e05
Fixes #1482 - ClayCSS Mixin `clay-button-variant` add ability configu…
pat270 Feb 19, 2019
2504f21
Fixes #1482 - ClayCSS Mixin `clay-select-variant` hover-bg and disabl…
pat270 Feb 20, 2019
ebc1750
Fixes #1482 - ClayCSS added new Date Picker component
pat270 Feb 20, 2019
0573c3c
Test Site: Date Picker added markup demo
pat270 Feb 20, 2019
3f1bc45
Fixes #1482 - ClayCSS Atlas Date Picker update colors for hover, focu…
pat270 Feb 20, 2019
2ff1395
Test Site: Date Picker add more disabled examples
pat270 Feb 20, 2019
8b76974
Fixes #1483, #1484 - Update markups
matuzalemsteles Feb 26, 2019
300e6ec
Fixes #1483, #1484 - Adds the new timezone API
matuzalemsteles Feb 26, 2019
a25e8ec
Fixes #1483 - Update demo
matuzalemsteles Feb 26, 2019
3d1c653
Fixes #1483 - Validates if the year entered is in the range
matuzalemsteles Feb 26, 2019
b2f14a6
Fixes #1483 - Standardize the DatePicker config
matuzalemsteles Mar 19, 2019
b5c1467
Fixes #1484 - Standardize the TimePicker config
matuzalemsteles Mar 19, 2019
b7b5f83
Fixes #1483, #1484 - Regen yarn.lock
matuzalemsteles Mar 19, 2019
d439da1
Fix paths @clayui/*
matuzalemsteles Mar 19, 2019
b4953ee
Update clay-css version to 2.10.0
matuzalemsteles Mar 19, 2019
1f30a42
Fixes #1483 - Rewrite DatePicker in typescript
matuzalemsteles Mar 19, 2019
95c703d
Fixes #1484 - Rewrite TimePicker in typescript
matuzalemsteles Mar 19, 2019
1d42a7a
Fixes #1483, #1484 - SF
matuzalemsteles Mar 22, 2019
2ecfa81
Fixes #1483 - stop rendering twice each time set currentMonth
matuzalemsteles Mar 22, 2019
679b400
Fixes #1483 - SF
matuzalemsteles Mar 22, 2019
fcb0b89
Use node 11 on CI
matuzalemsteles Mar 22, 2019
1894215
fix global yarn call on CI
matuzalemsteles Mar 22, 2019
7d755fd
Fixes #1483, #1484 - SF
matuzalemsteles Mar 22, 2019
fa310f1
Fixes #1483, #1484 - Update rules eslint
matuzalemsteles Mar 22, 2019
c8bef02
Fixes #1483 - Instance initialMonth always with `new Date()`
matuzalemsteles Mar 25, 2019
b8d1d64
Adds the raf polyfill to jest
matuzalemsteles Mar 26, 2019
06bb809
Adds the root jest config to clay-charts
matuzalemsteles Mar 26, 2019
bbbdc12
Allow js to tsconfig.js
matuzalemsteles Mar 26, 2019
159057b
Regenerate clay-charts snapshots
matuzalemsteles Mar 26, 2019
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
2 changes: 1 addition & 1 deletion packages/clay-css/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clay-css",
"version": "2.7.0",
"version": "2.10.0",
"description": "Liferay's web implementation of the Lexicon Design Language",
"main": "index.js",
"files": [
Expand Down
189 changes: 189 additions & 0 deletions packages/clay-css/src/content/form_elements_date_picker.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
---
title: Form Elements (Date Picker)
section: Components
---

<div class="clay-site-row-spacer row">
<div class="col-md-12">
<h3>Date Picker</h3>

<div class="sheet">
<div class="form-group">
<div class="date-picker">
<div class="input-group">
<div class="input-group-item">
<input name="datePicker" type="hidden" value="">
<input class="form-control input-group-inset input-group-inset-after" placeholder="YYYY-MM-DD" type="text" value="">
<div class="input-group-inset-item input-group-inset-item-after">
<button class="btn btn-unstyled date-picker-dropdown-toggle" type="button">
<svg class="lexicon-icon lexicon-icon-calendar" focusable="false" role="presentation">
<use xlink:href="{{rootPath}}/images/icons/icons.svg#calendar"></use>
</svg>
</button>
</div>
</div>
<div class="input-group-item input-group-item-shrink">
<span class="input-group-text">(GMT+01:00)</span>
</div>
</div>

<div class="date-picker-dropdown-menu dropdown-menu show">
<div class="date-picker-calendar">
<div class="date-picker-calendar-header">
<div class="date-picker-nav">
<div class="date-picker-nav-item input-date-picker-month">
<select class="form-control" disabled name="month">
<option value="0">January</option>
<option value="1">February</option>
<option value="2">March</option>
<option value="3">April</option>
<option value="4">May</option>
<option value="5">June</option>
<option value="6">July</option>
<option value="7">August</option>
<option value="8">September</option>
<option value="9">October</option>
<option value="10">November</option>
<option value="11">December</option>
</select>
</div>
<div class="date-picker-nav-item input-date-picker-year">
<select class="form-control" name="year">
<option value="1997">1997</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
<option value="2021">2021</option>
<option value="2022">2022</option>
<option value="2023">2023</option>
</select>
</div>

<div class="date-picker-nav-item date-picker-nav-item-expand date-picker-nav-controls">
<button aria-label="Select the previous month" class="btn nav-btn nav-btn-monospaced" disabled type="button">
<svg class="lexicon-icon lexicon-icon-angle-left" focusable="false" role="presentation">
<use xlink:href="{{rootPath}}/images/icons/icons.svg#angle-left"></use>
</svg>
</button>
<button aria-label="Select current date" class="btn nav-btn nav-btn-monospaced" type="button">
<svg class="lexicon-icon lexicon-icon-simple-circle" focusable="false" role="presentation">
<use xlink:href="{{rootPath}}/images/icons/icons.svg#simple-circle"></use>
</svg>
</button>
<button aria-label="Select the next month" class="btn nav-btn nav-btn-monospaced" type="button">
<svg class="lexicon-icon lexicon-icon-angle-right" focusable="false" role="presentation">
<use xlink:href="{{rootPath}}/images/icons/icons.svg#angle-right"></use>
</svg>
</button>
</div>
</div>
</div>

<div class="date-picker-calendar-body">
<div class="date-picker-days-row date-picker-row">
<div class="date-picker-day date-picker-calendar-item"><abbr>S</abbr></div>
<div class="date-picker-day date-picker-calendar-item"><abbr>M</abbr></div>
<div class="date-picker-day date-picker-calendar-item"><abbr>T</abbr></div>
<div class="date-picker-day date-picker-calendar-item"><abbr>W</abbr></div>
<div class="date-picker-day date-picker-calendar-item"><abbr>T</abbr></div>
<div class="date-picker-day date-picker-calendar-item"><abbr>F</abbr></div>
<div class="date-picker-day date-picker-calendar-item"><abbr>S</abbr></div>
</div>

<div class="date-picker-date-row date-picker-row">
<button aria-label="2019 01 27" class="date-picker-date date-picker-calendar-item previous-month-date" disabled type="button">27</button>
<button aria-label="2019 01 28" class="date-picker-date date-picker-calendar-item previous-month-date" disabled type="button">28</button>
<button aria-label="2019 01 29" class="date-picker-date date-picker-calendar-item previous-month-date" disabled type="button">29</button>
<button aria-label="2019 01 30" class="active date-picker-date date-picker-calendar-item previous-month-date" type="button">30</button>
<button aria-label="2019 01 31" class="date-picker-date date-picker-calendar-item previous-month-date" type="button">31</button>
<button aria-label="2019 02 01" class="date-picker-date date-picker-calendar-item" type="button">1</button>
<button aria-label="2019 02 02" class="date-picker-date date-picker-calendar-item" type="button">2</button>
</div>

<div class="date-picker-date-row date-picker-row">
<button aria-label="2019 02 03" class="date-picker-date date-picker-calendar-item" type="button">3</button>
<button aria-label="2019 02 04" class="date-picker-date date-picker-calendar-item" type="button">4</button>
<button aria-label="2019 02 05" class="date-picker-date date-picker-calendar-item" type="button">5</button>
<button aria-label="2019 02 06" class="date-picker-date date-picker-calendar-item" type="button">6</button>
<button aria-label="2019 02 07" class="date-picker-date date-picker-calendar-item" type="button">7</button>
<button aria-label="2019 02 08" class="date-picker-date date-picker-calendar-item" type="button">8</button>
<button aria-label="2019 02 09" class="date-picker-date date-picker-calendar-item" type="button">9</button>
</div>

<div class="date-picker-date-row date-picker-row">
<button aria-label="2019 02 10" class="date-picker-date date-picker-calendar-item" type="button">10</button>
<button aria-label="2019 02 11" class="date-picker-date date-picker-calendar-item" type="button">11</button>
<button aria-label="2019 02 12" class="date-picker-date date-picker-calendar-item" type="button">12</button>
<button aria-label="2019 02 13" class="date-picker-date date-picker-calendar-item active" tabindex="-1" type="button">13</button>
<button aria-label="2019 02 14" class="date-picker-date date-picker-calendar-item" type="button">14</button>
<button aria-label="2019 02 15" class="date-picker-date date-picker-calendar-item" type="button">15</button>
<button aria-label="2019 02 16" class="date-picker-date date-picker-calendar-item" type="button">16</button>
</div>

<div class="date-picker-date-row date-picker-row">
<button aria-label="2019 02 17" class="date-picker-date date-picker-calendar-item" type="button">17</button>
<button aria-label="2019 02 18" class="date-picker-date date-picker-calendar-item" type="button">18</button>
<button aria-label="2019 02 19" class="date-picker-date date-picker-calendar-item" type="button">19</button>
<button aria-label="2019 02 20" class="date-picker-date date-picker-calendar-item" type="button">20</button>
<button aria-label="2019 02 21" class="date-picker-date date-picker-calendar-item" type="button">21</button>
<button aria-label="2019 02 22" class="date-picker-date date-picker-calendar-item" type="button">22</button>
<button aria-label="2019 02 23" class="date-picker-date date-picker-calendar-item" type="button">23</button>
</div>

<div class="date-picker-date-row date-picker-row">
<button aria-label="2019 02 24" class="date-picker-date date-picker-calendar-item" type="button">24</button>
<button aria-label="2019 02 25" class="date-picker-date date-picker-calendar-item" type="button">25</button>
<button aria-label="2019 02 26" class="date-picker-date date-picker-calendar-item" type="button">26</button>
<button aria-label="2019 02 27" class="date-picker-date date-picker-calendar-item" type="button">27</button>
<button aria-label="2019 02 28" class="date-picker-date date-picker-calendar-item" type="button">28</button>
<button aria-label="2019 03 01" class="active date-picker-date date-picker-calendar-item next-month-date" type="button">1</button>
<button aria-label="2019 03 02" class="date-picker-date date-picker-calendar-item next-month-date" type="button">2</button>
</div>
</div>

<div class="date-picker-calendar-footer">
<div class="time-picker">
<div class="input-group">
<div class="input-group-item input-group-item-shrink">
<span class="input-group-text">
<svg class="lexicon-icon lexicon-icon-time" focusable="false" role="presentation">
<use xlink:href="{{rootPath}}/images/icons/icons.svg#time"></use>
</svg>
</span>
</div>
<div class="input-group-item">
<input class="form-control" name="timer" type="time" value="00:00">
</div>
<div class="input-group-item input-group-item-shrink">
<span class="input-group-text">(GMT+01:00)</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
4 changes: 4 additions & 0 deletions packages/clay-css/src/images/icons/simple-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/clay-css/src/scss/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@import "components/_links";

@import "components/_custom-forms";
@import "components/_date-picker";
@import "components/_form-validation";
@import "components/_icons";
@import "components/_input-groups";
Expand Down
1 change: 1 addition & 0 deletions packages/clay-css/src/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@import "mixins/_buttons";
@import "mixins/_cards";
@import "mixins/_close";
@import "mixins/_dropdown-menu";
@import "mixins/_forms";
@import "mixins/_grid";
@import "mixins/_highlight";
Expand Down
1 change: 1 addition & 0 deletions packages/clay-css/src/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@import "variables/_links";

@import "variables/_custom-forms";
@import "variables/_date-picker";
@import "variables/_list-group";
@import "variables/_loaders";
@import "variables/_modals";
Expand Down
1 change: 1 addition & 0 deletions packages/clay-css/src/scss/atlas/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@import "variables/_links";

@import "variables/_custom-forms";
@import "variables/_date-picker";
@import "variables/_icons";
@import "variables/_list-group";
@import "variables/_loaders";
Expand Down
71 changes: 71 additions & 0 deletions packages/clay-css/src/scss/atlas/variables/_date-picker.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Date Picker Nav

$date-picker-nav-btn: () !default;
$date-picker-nav-btn: map-merge((
bg: transparent,
hover-bg: #F1F2F5,
hover-color: $dark,
focus-bg: #F1F2F5,
focus-color: $dark,
focus-box-shadow: 0 0 0 3px rgba(lighten(saturate(adjust-hue($secondary, -2), 5.48), 37.06), 0.5),
active-bg: lighten(saturate(adjust-hue($secondary, -12), 8.51), 49.61),
disabled-bg: transparent,
disabled-color: #A7A9BC,
disabled-opacity: 1,
), $date-picker-nav-btn);

$date-picker-nav-select: () !default;
$date-picker-nav-select: map-merge((
bg: transparent,
border-color: transparent,
color: $secondary,
font-size: $font-size-sm,
font-weight: $font-weight-semi-bold,
height: $input-height-sm,
padding-bottom: 0,
padding-left: 0.5rem,
padding-top: 0,
hover-bg: #F1F2F5,
hover-color: $dark,
focus-bg: #F1F2F5,
focus-box-shadow: 0 0 0 2px rgba(lighten(saturate(adjust-hue($secondary, -2), 5.48), 37.06), 0.5),
focus-color: $dark,
disabled-bg: transparent,
disabled-color: $input-disabled-color,
), $date-picker-nav-select);

// Date Picker Calendar Item

$date-picker-date: () !default;
$date-picker-date: map-merge((
border-radius: 100px,
color: $secondary,
hover-bg: #F1F2F5,
hover-color: $dark,
focus-bg: #F1F2F5,
focus-box-shadow: 0 0 0 3px rgba(lighten(saturate(adjust-hue($secondary, -2), 5.48), 37.06), 0.5),
focus-color: $dark,
focus-outline: 0,
active-bg: $component-active-bg,
active-color: $component-active-color,
active-focus-box-shadow: 0 0 0 3px rgba($component-active-bg, 0.25),
disabled-bg: transparent,
disabled-color: #A7A9BC,
disabled-opacity: 1,
), $date-picker-date);

$date-picker-previous-month-date: () !default;
$date-picker-previous-month-date: map-merge((
color: #A7A9BC,
opacity: null,
focus-opacity: null,
active-opacity: null,
), $date-picker-previous-month-date);

$date-picker-next-month-date: () !default;
$date-picker-next-month-date: map-merge((
color: #A7A9BC,
opacity: null,
focus-opacity: null,
active-opacity: null,
), $date-picker-next-month-date);
Loading