-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Components): add Date Components menu item (#134)
- Loading branch information
Showing
9 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const calendarConfig: Component = { | ||
id: 'calendar', | ||
title: 'Calendar', | ||
isComingSoon: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const dateFieldConfig: Component = { | ||
id: 'date-field', | ||
title: 'Date Field', | ||
isComingSoon: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const datePickerConfig: Component = { | ||
id: 'date-picker', | ||
title: 'Date Picker', | ||
isComingSoon: true, | ||
}; |
7 changes: 7 additions & 0 deletions
7
src/content/components/date-components/RangeCalendar/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const rangeCalendarConfig: Component = { | ||
id: 'range-calendar', | ||
title: 'Range Calendar', | ||
isComingSoon: true, | ||
}; |
7 changes: 7 additions & 0 deletions
7
src/content/components/date-components/RelativeDateField/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const relativeDateFieldConfig: Component = { | ||
id: 'relative-date-field', | ||
title: 'Relative Date Field', | ||
isComingSoon: true, | ||
}; |
7 changes: 7 additions & 0 deletions
7
src/content/components/date-components/RelativeDatePicker/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const relativeDatePickerConfig: Component = { | ||
id: 'relative-date-picker', | ||
title: 'Relative Date Picker', | ||
isComingSoon: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import {sortBy} from 'lodash'; | ||
|
||
import {getLibById} from '../../../utils'; | ||
import {Component, Lib} from '../types'; | ||
|
||
import {calendarConfig} from './Calendar'; | ||
import {dateFieldConfig} from './DateField'; | ||
import {datePickerConfig} from './DatePicker'; | ||
import {rangeCalendarConfig} from './RangeCalendar'; | ||
import {relativeDateFieldConfig} from './RelativeDateField'; | ||
import {relativeDatePickerConfig} from './RelativeDatePicker'; | ||
|
||
const {config} = getLibById('date-components'); | ||
|
||
const components: Component[] = [ | ||
calendarConfig, | ||
dateFieldConfig, | ||
datePickerConfig, | ||
rangeCalendarConfig, | ||
relativeDateFieldConfig, | ||
relativeDatePickerConfig, | ||
]; | ||
|
||
export const dateComponents: Lib = { | ||
id: config.id, | ||
title: config.title, | ||
primary: config.primary, | ||
description: config.description, | ||
components: sortBy(components, 'title'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// import {components} from './components'; | ||
import {Lib} from './types'; | ||
import {dateComponents} from './date-components'; | ||
import type {Lib} from './types'; | ||
import {uikit} from './uikit'; | ||
|
||
export type {SandboxType, SandboxProps, Component} from './types'; | ||
|
||
export const libs: Lib[] = [uikit /*, components*/]; | ||
export const libs: Lib[] = [uikit, dateComponents]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export enum Repos { | ||
Uikit = 'uikit', | ||
Components = 'components', | ||
DateComponents = 'date-components', | ||
} |