diff --git a/src/__tests__/build-smoke.test.js b/src/__tests__/build-smoke.test.js
new file mode 100644
index 000000000..4c6566b30
--- /dev/null
+++ b/src/__tests__/build-smoke.test.js
@@ -0,0 +1,7 @@
+import * as esComponents from '../../es/index.js'
+import * as libComponents from '../../lib/index.js'
+
+test('importing the library works', () => {
+ expect(esComponents).toBeDefined()
+ expect(libComponents).toBeDefined()
+})
diff --git a/src/index.js b/src/index.js
index 969f1ac66..9b0b516d9 100644
--- a/src/index.js
+++ b/src/index.js
@@ -48,6 +48,7 @@ export { default as MLSwitch } from './MLSwitch'
export { default as MLTable } from './MLTable'
export { default as MLTabs } from './MLTabs'
export { default as MLTag } from './MLTag'
+export { default as MLTimePicker } from './MLTimePicker'
export { default as MLTimeline } from './MLTimeline'
export { default as MLTooltip } from './MLTooltip'
export { default as MLTree } from './MLTree'
diff --git a/stories/4-Typography.stories.jsx b/stories/4-Typography.stories.jsx
index 4a74e3e7c..8525ac6a2 100644
--- a/stories/4-Typography.stories.jsx
+++ b/stories/4-Typography.stories.jsx
@@ -67,9 +67,7 @@ export const MLTitleComponent = () => (
h4. Ant Design
)
-MLTitleComponent.story = {
- name: 'MLTitle',
-}
+MLTitleComponent.storyName = 'MLTitle'
export const MLTextComponent = () => (
@@ -98,9 +96,7 @@ export const MLTextComponent = () => (
(Hovered link)
)
-MLTextComponent.story = {
- name: 'MLText',
-}
+MLTextComponent.storyName = 'MLText'
export const editable = () => {
const [state, setState] = useState({ str: 'This is an editable text.' })
diff --git a/stories/45-TimePicker.mdx b/stories/45-TimePicker.mdx
new file mode 100644
index 000000000..7da9b3bbc
--- /dev/null
+++ b/stories/45-TimePicker.mdx
@@ -0,0 +1,19 @@
+import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks';
+import PropsPanels from './PropsPanels';
+import MLTimePicker from '../src/MLTimePicker';
+
+# MLTimePicker
+
+[Ant Documentation](https://3x.ant.design/components/time-picker)
+
+There's nothing here yet.
+
+
+# MLTimePicker.MLRangePicker
+
+There's nothing here yet.
+
+
diff --git a/stories/45-TimePicker.stories.jsx b/stories/45-TimePicker.stories.jsx
new file mode 100644
index 000000000..6d5ffbd7d
--- /dev/null
+++ b/stories/45-TimePicker.stories.jsx
@@ -0,0 +1,33 @@
+import React from 'react'
+import { action } from '@storybook/addon-actions'
+import { withKnobs, text } from '@storybook/addon-knobs'
+import { MLTimePicker } from '@marklogic/design-system'
+import mdx from './45-TimePicker.mdx'
+
+export default {
+ title: 'Data Entry/MLTimePicker',
+ decorators: [withKnobs],
+ parameters: {
+ fileName: '45-TimePicker.stories.jsx',
+ docs: {
+ page: mdx,
+ },
+ info: {
+ text: 'Component description goes here',
+ },
+ },
+}
+
+export const basic = () => {
+ const props = {
+ hourLabel: text('hourLabel', 'Hr'),
+ minuteLabel: text('minuteLabel', 'Min'),
+ secondLabel: text('secondLabel', 'Sec'),
+ format: text('format', 'HH:mm:ss'),
+ }
+ return (
+
+ )
+}
diff --git a/stories/67-ConfigProvider.stories.jsx b/stories/67-ConfigProvider.stories.jsx
index 55870beeb..5e1c96287 100644
--- a/stories/67-ConfigProvider.stories.jsx
+++ b/stories/67-ConfigProvider.stories.jsx
@@ -1,7 +1,7 @@
import React, { useState } from 'react'
import { action } from '@storybook/addon-actions'
-import { MLConfigProvider, MLDatePicker } from '@marklogic/design-system'
-import { withKnobs } from '@storybook/addon-knobs'
+import { MLConfigProvider, MLDatePicker, MLTimePicker } from '@marklogic/design-system'
+import { withKnobs, array, text } from '@storybook/addon-knobs'
import mdx from './67-ConfigProvider.mdx'
export default {
@@ -18,24 +18,29 @@ export default {
},
}
-const configValues = {
- dateFormat: ['YYYY-MMM-DD', 'MM/DD/YYYY', 'M/D/YY'], // Default for all dates, and datePicker
- timeFormat: ['HH:mm:ss'],
- dateTimeFormat: ['YYYY-MMM-DD, HH:mm:ss', 'LT', 'LTS'], // default for all dates with times, and datePicker with times
- monthFormat: 'YYYY-MM', // default for datePicker month mode
- weekFormat: 'YYYY-wo', // default for datePicker week mode
-}
-
export const basic = () => {
+ const configValues = {
+ dateFormat: array('dateFormat', ['YYYY-MMM-DD', 'MM/DD/YYYY', 'M/D/YY'], '|'), // Default for all dates, and datePicker
+ dateTimeFormat: array('dateTimeFormat', ['YYYY-MMM-DD, HH:mm', 'LT', 'LTS'], '|'), // default for all dates with times, and datePicker with times
+ weekFormat: text('weekFormat', 'YYYY-wo'), // default for datePicker week mode
+ monthFormat: text('monthFormat', 'YYYY-MM'), // default for datePicker month mode
+ timeFormat: text('timeFormat', 'HH:mm'),
+ }
+
return (
-
This component doesn't seem to allow updates in Storybook, so here are some static examples:
-
TODO: Consider using this for global settings that are spec'd in the tickets
Near the top of the tree of your application (such that all @marklogic/design-system components are descendants of this), you must provide a MLConfigProvider like so:
+
- (application components go here)
-
+ (application components go here)
+
+
+
+
+
+
+
...etc
diff --git a/stories/73-DatePicker.stories.jsx b/stories/73-DatePicker.stories.jsx
index 31742c75d..7d9496f2c 100644
--- a/stories/73-DatePicker.stories.jsx
+++ b/stories/73-DatePicker.stories.jsx
@@ -23,7 +23,7 @@ const disableOddDates = (d) => d.date() % 2 === 0
const configValues = {
dateFormat: ['YYYY-MMM-DD', 'MM/DD/YYYY', 'M/D/YY'],
- timeFormat: ['HH:mm:ss'],
+ timeFormat: 'HH:mm:ss',
dateTimeFormat: ['YYYY-MMM-DD, HH:mm:ss', 'YYYY-MMM-DD, HH:mm', 'LT', 'LTS'],
monthFormat: 'YYYY-MM',
weekFormat: 'YYYY-wo',