diff --git a/packages/vlossom/.storybook/examples/style-set.ts b/packages/vlossom/.storybook/examples/style-set.ts index 4dd5fe9b1..b6a1f26dc 100644 --- a/packages/vlossom/.storybook/examples/style-set.ts +++ b/packages/vlossom/.storybook/examples/style-set.ts @@ -7,6 +7,7 @@ import type { VsPageStyleSet, VsValueTagStyleSet, VsNoticeStyleSet, + VsProgressStyleSet, } from '@/components/types'; const vsButton: VsButtonStyleSet = { @@ -52,6 +53,12 @@ const vsValueTag: VsValueTagStyleSet = { width: '50%', }; +const vsProgress: VsProgressStyleSet = { + borderRadius: '0.4rem', + height: '0.7rem', + width: '100%', +}; + export const styleSet: StyleSet = { VsButton: { myStyleSet: vsButton }, VsDivider: { myStyleSet: vsDivider }, @@ -59,5 +66,6 @@ export const styleSet: StyleSet = { VsNotice: { myStyleSet: vsNotice }, VsSection: { myStyleSet: vsSection }, VsPage: { myStyleSet: vsPage }, + VsProgress: { myStyleSet: vsProgress }, VsValueTag: { myStyleSet: vsValueTag }, }; diff --git a/packages/vlossom/src/components/types.ts b/packages/vlossom/src/components/types.ts index 26f50ce7c..f10756d95 100644 --- a/packages/vlossom/src/components/types.ts +++ b/packages/vlossom/src/components/types.ts @@ -5,8 +5,9 @@ export type * from './vs-form'; export type * from './vs-input'; export type * from './vs-input-wrapper'; export type * from './vs-message'; -export type * from './vs-page'; export type * from './vs-notice'; +export type * from './vs-page'; +export type * from './vs-progress'; export type * from './vs-section'; export type * from './vs-value-tag'; export type * from './vs-wrapper'; diff --git a/packages/vlossom/src/components/vs-progress/VsProgress.scss b/packages/vlossom/src/components/vs-progress/VsProgress.scss new file mode 100644 index 000000000..9ac85bd98 --- /dev/null +++ b/packages/vlossom/src/components/vs-progress/VsProgress.scss @@ -0,0 +1,23 @@ +progress { + -webkit-appearance: none; + appearance: none; + width: var(--vs-progress-width, 100%); + height: var(--vs-progress-height, 0.7rem); +} + +progress[value] { + &::-webkit-progress-bar { + overflow: hidden; + background-color: var(--vs-light-backgroundColor); + border-radius: var(--vs-progress-borderRadius, 0.4rem); + } + + &::-webkit-progress-value { + position: relative; + background-color: var(--vs-progress-backgroundColor, var(--vs-comp-backgroundColor)); + } + + &.primary::-webkit-progress-value { + background-color: var(--vs-progress-backgroundColor, var(--vs-comp-backgroundColor-primary)); + } +} diff --git a/packages/vlossom/src/components/vs-progress/VsProgress.vue b/packages/vlossom/src/components/vs-progress/VsProgress.vue new file mode 100644 index 000000000..ff1a7086a --- /dev/null +++ b/packages/vlossom/src/components/vs-progress/VsProgress.vue @@ -0,0 +1,54 @@ + + + + +