Skip to content

Commit

Permalink
feat(VsTable): add component (#166)
Browse files Browse the repository at this point in the history
Co-authored-by: Suyeon Woo <[email protected]>
  • Loading branch information
yeriiiii and seaneez authored Apr 29, 2024
1 parent 9c7efc0 commit 2a3c7f9
Show file tree
Hide file tree
Showing 26 changed files with 2,214 additions and 3 deletions.
19 changes: 18 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/vlossom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"dependencies": {
"@vueuse/core": "^10.9.0",
"lodash-es": "^4.17.21",
"vuedraggable": "^4.1.0",
"nanoid": "^5.0.7"
}
}
4 changes: 4 additions & 0 deletions packages/vlossom/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ export { default as VsStepper } from './vs-stepper/VsStepper.vue';
export { type VsSwitchStyleSet } from './vs-switch/types';
export { default as VsSwitch } from './vs-switch/VsSwitch.vue';

export { type VsTableStyleSet } from './vs-table/types';
export { default as VsTable } from './vs-table/VsTable.vue';

export { type VsTabsStyleSet } from './vs-tabs/types';
export { default as VsTabs } from './vs-tabs/VsTabs.vue';

Expand Down Expand Up @@ -150,6 +153,7 @@ declare module 'vue' {
VsSelect: typeof import('./')['VsSelect'];
VsStepper: typeof import('./')['VsStepper'];
VsSwitch: typeof import('./')['VsSwitch'];
VsTable: typeof import('./')['VsTable'];
VsTabs: typeof import('./')['VsTabs'];
VsTextarea: typeof import('./')['VsTextarea'];
VsTextWrap: typeof import('./')['VsTextWrap'];
Expand Down
2 changes: 2 additions & 0 deletions packages/vlossom/src/components/vs-select/VsSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
:id="id"
role="combobox"
:aria-expanded="isOpen || isVisible"
:aria-label="ariaLabel"
aria-controls="vs-select-options"
:aria-autocomplete="autocomplete ? 'list' : undefined"
:aria-activedescendant="focusedOptionId"
Expand Down Expand Up @@ -220,6 +221,7 @@ export default defineComponent({
...getResponsiveProps(),
colorScheme: { type: String as PropType<ColorScheme> },
styleSet: { type: [String, Object] as PropType<string | VsSelectStyleSet> },
ariaLabel: { type: String, default: '' },
autocomplete: { type: Boolean, default: false },
closableChips: {
type: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,20 @@ describe('vs-select', () => {
});
});

describe('aria-label', () => {
it('aria-label을 설정할 수 있다', () => {
// given
const wrapper: ReturnType<typeof mountComponent> = mount(VsSelect, {
props: {
ariaLabel: 'aria-label',
},
});

// then
expect(wrapper.find('input').attributes('aria-label')).toBe('aria-label');
});
});

describe('focus / blur', () => {
it('focus 이벤트를 발생시킬 수 있다', async () => {
// given
Expand Down
Loading

0 comments on commit 2a3c7f9

Please sign in to comment.