diff --git a/package.json b/package.json index 6a0abb70..ba63f08f 100644 --- a/package.json +++ b/package.json @@ -69,9 +69,11 @@ "rollup-plugin-typescript2": "^0.25.2", "rollup-plugin-vue": "^5.1.4", "sass-loader": "^8.0.2", + "storybook-vue-router": "^1.0.7", "ts-jest": "^26.0.0", "typescript": "~3.8.3", "vue-cli-plugin-storybook": "~1.2.2", + "vue-router": "^3.3.4", "vue-template-compiler": "^2.6.11" }, "postcss": { diff --git a/src/components/ScrollSections/SScrollSectionItem.vue b/src/components/ScrollSections/SScrollSectionItem.vue new file mode 100644 index 00000000..fee3d230 --- /dev/null +++ b/src/components/ScrollSections/SScrollSectionItem.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/components/ScrollSections/SScrollSections.vue b/src/components/ScrollSections/SScrollSections.vue new file mode 100644 index 00000000..9248319a --- /dev/null +++ b/src/components/ScrollSections/SScrollSections.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/src/components/ScrollSections/index.ts b/src/components/ScrollSections/index.ts new file mode 100644 index 00000000..66f1ecbf --- /dev/null +++ b/src/components/ScrollSections/index.ts @@ -0,0 +1,4 @@ +import SScrollSectionItem from './SScrollSectionItem.vue' +import SScrollSections from './SScrollSections.vue' + +export { SScrollSectionItem, SScrollSections } diff --git a/src/components/index.ts b/src/components/index.ts index 2243316c..0da7b7bc 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -15,6 +15,7 @@ import { SInput, SJsonInput } from './Input' import { SMain } from './Layout/Main' import { SMenu, SMenuItem, SMenuItemGroup, SSubmenu } from './Menu' import { SRow } from './Layout/Row' +import { SScrollSectionItem, SScrollSections } from './ScrollSections' import { STooltip } from './Tooltip' export { @@ -38,6 +39,8 @@ export { SMenuItem, SMenuItemGroup, SRow, + SScrollSectionItem, + SScrollSections, SSubmenu, STooltip } diff --git a/src/index.ts b/src/index.ts index 404b2f53..cfcf50c0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,6 +19,8 @@ import { SMenuItem, SMenuItemGroup, SRow, + SScrollSectionItem, + SScrollSections, SSubmenu, STooltip } from './components' @@ -43,6 +45,8 @@ const elements = [ { component: SMenuItem, name: Components.SMenuItem }, { component: SMenuItemGroup, name: Components.SMenuItemGroup }, { component: SRow, name: Components.SRow }, + { component: SScrollSectionItem, name: Components.SScrollSectionItem }, + { component: SScrollSections, name: Components.SScrollSections }, { component: SSubmenu, name: Components.SSubmenu }, { component: STooltip, name: Components.STooltip } ] @@ -76,6 +80,8 @@ export { SMenuItem, SMenuItemGroup, SRow, + SScrollSectionItem, + SScrollSections, SSubmenu, STooltip } diff --git a/src/stories/ScrollSections/SScrollSectionItem.stories.ts b/src/stories/ScrollSections/SScrollSectionItem.stories.ts new file mode 100644 index 00000000..b713ab5a --- /dev/null +++ b/src/stories/ScrollSections/SScrollSectionItem.stories.ts @@ -0,0 +1,23 @@ +import StoryRouter from 'storybook-vue-router' +import { SScrollSectionItem, SScrollSections } from '../../components' + +export default { + component: SScrollSectionItem, + title: 'Design System/Scroll Sections/Scroll Section Item', + decorators: [StoryRouter({}, { initialEntry: '/' })] +} + +export const defaultUsage = () => ({ + components: { SScrollSections, SScrollSectionItem }, + template: ` + +

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Officiis, blanditiis expedita? Earum eligendi pariatur quaerat quos expedita ab quibusdam ratione veniam in, mollitia fuga repudiandae?

+
+
` +}) diff --git a/src/stories/ScrollSections/SScrollSections.stories.ts b/src/stories/ScrollSections/SScrollSections.stories.ts new file mode 100644 index 00000000..aa8e59a6 --- /dev/null +++ b/src/stories/ScrollSections/SScrollSections.stories.ts @@ -0,0 +1,22 @@ +import StoryRouter from 'storybook-vue-router' +import { SScrollSectionItem, SScrollSections } from '../../components' + +export default { + component: SScrollSections, + title: 'Design System/Scroll Sections', + decorators: [StoryRouter({}, { initialEntry: '/' })] +} + +export const defaultUsage = () => ({ + components: { SScrollSections, SScrollSectionItem }, + template: ` + +

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Officiis, blanditiis expedita? Earum eligendi pariatur quaerat quos expedita ab quibusdam ratione veniam in, mollitia fuga repudiandae?

+
+
` +}) diff --git a/src/types/components.ts b/src/types/components.ts index cb207ddb..659eef9d 100644 --- a/src/types/components.ts +++ b/src/types/components.ts @@ -17,6 +17,8 @@ export enum Components { SMenuItem = 'SMenuItem', SMenuItemGroup = 'SMenuItemGroup', SRow = 'SRow', + SScrollSectionItem = 'SScrollSectionItem', + SScrollSections = 'SScrollSections', SSubmenu = 'SSubmenu', STooltip = 'STooltip' } diff --git a/yarn.lock b/yarn.lock index 62a5f715..6881c4bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14190,6 +14190,11 @@ store2@^2.7.1: resolved "https://registry.yarnpkg.com/store2/-/store2-2.11.2.tgz#a298e5e97b21b3ce7419b732540bc7c79cb007db" integrity sha512-TQMKs+C6n9idtzLpxluikmDCYiDJrTbbIGn9LFxMg0BVTu+8JZKSlXTWYRpOFKlfKD5HlDWLVpJJyNGZ2e9l1A== +storybook-vue-router@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/storybook-vue-router/-/storybook-vue-router-1.0.7.tgz#366451212149d9d0a32557545b244667bb01768e" + integrity sha512-R+DYARQ40YVbMbV5moLDmQvodJX5FQPVy5cULb782P1gD5rAkulWtgt8yrM7pmjYru+LTPdLS4blrFPnWlb0sQ== + stream-browserify@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" @@ -15652,6 +15657,11 @@ vue-property-decorator@^8.4.1: dependencies: vue-class-component "^7.1.0" +vue-router@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.3.4.tgz#4e38abc34a11c41b6c3d8244449a2e363ba6250b" + integrity sha512-SdKRBeoXUjaZ9R/8AyxsdTqkOfMcI5tWxPZOUX5Ie1BTL5rPSZ0O++pbiZCeYeythiZIdLEfkDiQPKIaWk5hDg== + vue-runtime-helpers@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vue-runtime-helpers/-/vue-runtime-helpers-1.1.2.tgz#446b7b820888ab0c5264d2c3a32468e72e4100f3"