Skip to content

Commit

Permalink
feat(datepicker): lit-flatpicker proof of concept (#600)
Browse files Browse the repository at this point in the history
* add datepicker component

* Fix bug preventing all days to be enabled by default

* tweak to allow inline mode

* add vvd-umbrella dep

* update lit-flatpickr dep

* add month and week picker demo

* comments

* start porting over volta datepicker styles

* adjust flatpickr alt and mobile input to slot in vwc-textfield

* add clear functionality

* fix range mode styles

* add range container to datepicker

* add custom datepicker header

* remove comments

* update month and year on navigation

* apply Joella design comments

* use vwc-button for clear

* destroy flatpickr instance on component disconnect

* fix depcheck

* add core to datepicker

* style inline datepicker

* add closeOnSelect and disableMobile support

* comments

* add custom month view

* highlight selected month in month view

* design alignment

* style lint

* add year navigation

* add month picker functionality

* fix lint warnings

* prettier

* disable months in month view when max date set

Co-authored-by: yinon <yinon@hotmail.com>
  • Loading branch information
JoelGraham93 and yinonov committed Feb 10, 2021
1 parent 905b607 commit 95a8ecc
Show file tree
Hide file tree
Showing 11 changed files with 1,069 additions and 2 deletions.
11 changes: 11 additions & 0 deletions __snapshots__/datepicker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# `datepicker`

#### `should internal contents`

```html
<input class="flatpickr flatpickr-input lit-flatpickr">
<slot>
</slot>

```

1 change: 1 addition & 0 deletions components/datepicker/.depcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignores: ["flatpickr", "lit-flatpickr", "@vonage/vvd-core", "@vonage/vwc-datepicker", "@open-wc/*"]
44 changes: 44 additions & 0 deletions components/datepicker/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "@vonage/vwc-datepicker",
"version": "1.2.0",
"description": "Datepicker component",
"homepage": "https://github.com/Vonage/vivid/tree/master/components/datepicker#readme",
"license": "ISC",
"main": "vwc-datepicker.js",
"module": "vwc-datepicker.js",
"files": [
"*.js",
"*.ts",
"*.map"
],
"repository": {
"type": "git",
"url": "https://github.com/vonage/vivid.git",
"directory": "components/datepicker"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1",
"build:typescript": "tsc -b",
"build:styles": "umbrella-style-modules",
"build": "yarn run build:styles && yarn run build:typescript"
},
"bugs": {
"url": "https://github.com/Vonage/vivid/issues"
},
"dependencies": {
"@vonage/vvd-core": "^1.2.0",
"@vonage/vvd-foundation": "^1.2.0",
"@vonage/vwc-button": "^1.2.0",
"@vonage/vwc-icon-button": "^1.2.0",
"flatpickr": "^4.6.9",
"lit-flatpickr": "^0.2.5",
"lit-element": "^2.4.0",
"tslib": "^2.0.3"
},
"devDependencies": {
"@vonage/vvd-design-tokens": "^1.2.0",
"@vonage/vvd-typography": "^1.2.0",
"@vonage/vvd-umbrella": "^1.0.4",
"typescript": "^4.1.3"
}
}

0 comments on commit 95a8ecc

Please sign in to comment.