@dcrackel/hematournamentui 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/HemaTouranmentUI-lib.es.js +8 -4
  2. package/dist/HemaTouranmentUI-lib.umd.js +2 -2
  3. package/package.json +3 -1
  4. package/src/index.js +1 -1
  5. package/src/stories/Atoms/Icon/BaseIcon.test.js +91 -0
  6. package/src/stories/Atoms/Icon/BaseIcon.vue +1 -0
  7. package/src/stories/Atoms/RadioGroup/BaseRadioGroup.test.js +49 -0
  8. package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.test.js +80 -0
  9. package/src/stories/Molecules/Breadcrumb/Admin/Breadcrumb.vue +2 -2
  10. package/src/stories/Templates/Forms/AddTournamentPageOne/AddTournamentPageOne.vue +2 -1
  11. package/package/.eslintrc.js +0 -18
  12. package/package/.gitattributes +0 -2
  13. package/package/.prettierignore +0 -1
  14. package/package/.storybook/main.js +0 -18
  15. package/package/.storybook/mockRoutes.js +0 -9
  16. package/package/.storybook/preview-head.html +0 -1
  17. package/package/.storybook/preview.js +0 -17
  18. package/package/LICENSE +0 -21
  19. package/package/README.md +0 -83
  20. package/package/index.html +0 -12
  21. package/package/package.json +0 -49
  22. package/package/postcss.config.js +0 -6
  23. package/package/prettier.config.js +0 -10
  24. package/package/src/assets/default-tournament.png +0 -0
  25. package/package/src/index.js +0 -15
  26. package/package/src/main.js +0 -2
  27. package/package/src/mocks/fileMock.js +0 -1
  28. package/package/src/mocks/tournamentMock.js +0 -34
  29. package/package/src/stories/Base/Button/BaseButton.stories.js +0 -69
  30. package/package/src/stories/Base/Button/BaseButton.test.js +0 -146
  31. package/package/src/stories/Base/Button/BaseButton.vue +0 -126
  32. package/package/src/stories/Base/Input/BaseInput.stories.js +0 -28
  33. package/package/src/stories/Base/Input/BaseInput.test.js +0 -46
  34. package/package/src/stories/Base/Input/BaseInput.vue +0 -45
  35. package/package/src/stories/Base/Tag/BaseTag.stories.js +0 -29
  36. package/package/src/stories/Base/Tag/BaseTag.test.js +0 -42
  37. package/package/src/stories/Base/Tag/BaseTag.vue +0 -57
  38. package/package/src/stories/Base/Text/BaseText.stories.js +0 -77
  39. package/package/src/stories/Base/Text/BaseText.test.js +0 -153
  40. package/package/src/stories/Base/Text/BaseText.vue +0 -163
  41. package/package/src/stories/Breadcrumb/Admin/Breadcrumb.stories.js +0 -41
  42. package/package/src/stories/Breadcrumb/Admin/Breadcrumb.vue +0 -31
  43. package/package/src/stories/Cards/TournamentCard/Detail/TournamentCardDetail.stories.js +0 -33
  44. package/package/src/stories/Cards/TournamentCard/Detail/TournamentCardDetail.vue +0 -38
  45. package/package/src/stories/Cards/TournamentCard/Header/TournamentCardHeader.stories.js +0 -48
  46. package/package/src/stories/Cards/TournamentCard/Header/TournamentCardHeader.vue +0 -40
  47. package/package/src/stories/Cards/TournamentCard/TournamentCard.stories.js +0 -37
  48. package/package/src/stories/Cards/TournamentCard/TournamentCard.vue +0 -35
  49. package/package/src/stories/Configure.mdx +0 -320
  50. package/package/src/stories/Containers/Grid/GridContainer.stories.js +0 -47
  51. package/package/src/stories/Containers/Grid/GridContainer.vue +0 -108
  52. package/package/src/stories/Filters/FilterAndSortBar/FilterAndSortBar.stories.js +0 -36
  53. package/package/src/stories/Filters/FilterAndSortBar/FilterAndSortBar.vue +0 -48
  54. package/package/src/stories/Filters/FilterUpcomingPast/FilterUpcomingPast.stories.js +0 -32
  55. package/package/src/stories/Filters/FilterUpcomingPast/FilterUpcomingPast.vue +0 -46
  56. package/package/src/stories/Menu/Admin/AdminLeftMenu.stories.js +0 -28
  57. package/package/src/stories/Menu/Admin/AdminLeftMenu.vue +0 -57
  58. package/package/src/stories/Menu/DropDown/DropDownMenu.stories.js +0 -34
  59. package/package/src/stories/Menu/DropDown/DropDownMenu.vue +0 -51
  60. package/package/tailwind/output.css +0 -1072
  61. package/package/tailwind/tailwind.css +0 -4
  62. package/package/tailwind.config.js +0 -25
  63. package/package/vite.config.js +0 -23
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcrackel/hematournamentui",
3
3
  "private": false,
4
- "version": "1.0.21",
4
+ "version": "1.0.22",
5
5
  "type": "module",
6
6
  "main": "dist/HemaTouranmentUI-lib.umd.js",
7
7
  "module": "dist/HemaTouranmentUI-lib.es.js",
@@ -21,6 +21,8 @@
21
21
  "dependencies": {
22
22
  "@storybook/addon-actions": "^7.4.5",
23
23
  "@tiptap/extension-bold": "^2.1.11",
24
+ "@tiptap/extension-highlight": "^2.1.12",
25
+ "@tiptap/extension-text-align": "^2.1.12",
24
26
  "@tiptap/starter-kit": "^2.1.11",
25
27
  "@tiptap/vue-3": "^2.1.11",
26
28
  "@vuepic/vue-datepicker": "^7.1.0",
package/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { default as BaseIcon } from './stories/Atoms/Icon/BaseIcon.vue';
2
2
  export { default as BaseInput } from './stories/Atoms/Input/BaseInput.vue';
3
- export { default as BaseRaioGroup } from './stories/Atoms/RadioGroup/BaseRadioGroup.vue';
3
+ export { default as BaseRadioGroup } from './stories/Atoms/RadioGroup/BaseRadioGroup.vue';
4
4
  export { default as BaseTag } from './stories/Atoms/Tag/BaseTag.vue';
5
5
  export { default as BaseText } from './stories/Atoms/Text/BaseText.vue';
6
6
 
@@ -0,0 +1,91 @@
1
+ import { describe, it, expect, afterEach } from 'vitest';
2
+ import { mount } from '@vue/test-utils';
3
+ import BaseIcon from './BaseIcon.vue';
4
+
5
+ describe('BaseIcon', () => {
6
+ // Mocking console.warn
7
+ const originalWarn = console.warn;
8
+ let consoleOutput = [];
9
+ const mockedWarn = output => consoleOutput.push(output);
10
+ console.warn = mockedWarn;
11
+
12
+ afterEach(() => {
13
+ console.warn = originalWarn;
14
+ consoleOutput = [];
15
+ });
16
+
17
+ it('renders without errors', () => {
18
+ const wrapper = mount(BaseIcon, {
19
+ props: { iconName: 'fa-icons' }
20
+ });
21
+ expect(wrapper.exists()).toBeTruthy();
22
+ });
23
+
24
+ it('default values are correctly applied when props are not provided', () => {
25
+ const wrapper = mount(BaseIcon, {
26
+ props: {}
27
+ });
28
+ expect(wrapper.classes()).toContain('fa-solid');
29
+ expect(wrapper.classes()).toContain('fa-face-smile');
30
+ expect(wrapper.classes()).toContain('text-sm');
31
+ expect(wrapper.classes()).toContain('text-primary');
32
+ })
33
+
34
+ it('applies default props correctly', () => {
35
+ const wrapper = mount(BaseIcon, {
36
+ props: { iconName: 'fa-icons' }
37
+ });
38
+ expect(wrapper.classes()).toContain('fa-solid');
39
+ expect(wrapper.classes()).toContain('text-sm');
40
+ expect(wrapper.classes()).toContain('text-primary');
41
+ });
42
+
43
+ it('computes classes based on props', () => {
44
+ const wrapper = mount(BaseIcon, {
45
+ props: {
46
+ iconName: 'fa-icons',
47
+ style: 'fa-regular',
48
+ size: 'lg',
49
+ color: 'secondary'
50
+ }
51
+ });
52
+ expect(wrapper.classes()).toContain('fa-regular');
53
+ expect(wrapper.classes()).toContain('fa-icons');
54
+ expect(wrapper.classes()).toContain('text-lg');
55
+ expect(wrapper.classes()).toContain('text-secondary');
56
+ });
57
+
58
+ it('validates style prop correctly with valid value', () => {
59
+ mount(BaseIcon, {
60
+ props: { style: 'fa-solid' }
61
+ });
62
+ expect(consoleOutput).toHaveLength(0); // No warnings should be emitted
63
+ });
64
+
65
+ it('emits a warning with invalid style prop value', () => {
66
+ mount(BaseIcon, {
67
+ props: { style: 'invalid-style' }
68
+ });
69
+ const expectedWarning = '[Vue warn]: Invalid prop: custom validator check failed for prop "style".';
70
+ const styleWarning = consoleOutput.find(msg => msg.includes(expectedWarning));
71
+ expect(styleWarning).toBeFalsy(); // Check if specific warning is found
72
+ });
73
+
74
+ it('validates style size correctly with valid value', () => {
75
+ mount(BaseIcon, {
76
+ props: { size: 'sm' }
77
+ });
78
+ expect(consoleOutput).toHaveLength(0); // No warnings should be emitted
79
+ });
80
+
81
+ it('emits a warning with invalid size prop value', () => {
82
+ mount(BaseIcon, {
83
+ props: { size: 'invalid-size' }
84
+ });
85
+ const expectedWarning = '[Vue warn]: Invalid prop: custom validator check failed for prop "size".';
86
+ const styleWarning = consoleOutput.find(msg => msg.includes(expectedWarning));
87
+ expect(styleWarning).toBeFalsy(); // Check if specific warning is found
88
+ });
89
+
90
+ });
91
+
@@ -9,6 +9,7 @@ export default {
9
9
  props: {
10
10
  iconName: {
11
11
  type: String,
12
+ default: 'fa-face-smile',
12
13
  required: true
13
14
  },
14
15
  style: {
@@ -0,0 +1,49 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { mount } from '@vue/test-utils';
3
+ import BaseRadioGroup from './BaseRadioGroup.vue';
4
+
5
+ const items = [
6
+ { label: 'Option 1', description: 'Description 1', value: '1' },
7
+ { label: 'Option 2', description: 'Description 2', value: '2' },
8
+ { label: 'Option 3', description: 'Description 3', value: '3' },
9
+ // Add more items as needed
10
+ ];
11
+
12
+ describe('BaseRadioGroup', () => {
13
+ it('renders correct number of items', () => {
14
+ const wrapper = mount(BaseRadioGroup, {
15
+ props: { items }
16
+ });
17
+ expect(wrapper.findAll('[role="radio"]').length).toBe(items.length);
18
+ });
19
+
20
+ it('applies correct classes based on selectedIndex and invalid prop', async () => {
21
+ const wrapper = mount(BaseRadioGroup, {
22
+ props: { items, invalid: true }
23
+ });
24
+ await wrapper.vm.selectItem(0);
25
+ expect(wrapper.findAll('.bg-tertiary').length).toBe(1);
26
+ expect(wrapper.find('.border-alarm').exists()).toBeTruthy();
27
+ });
28
+
29
+ it('updates selectedIndex and emits event on item click', async () => {
30
+ const wrapper = mount(BaseRadioGroup, {
31
+ props: { items }
32
+ });
33
+ await wrapper.findAll('[role="radio"]')[0].trigger('click');
34
+
35
+ // console.log(wrapper.emitted())
36
+
37
+ expect(wrapper.vm.selectedIndex).toBe(0);
38
+ expect(wrapper.emitted('update:value')[0]).toEqual([items[0].value]);
39
+ });
40
+
41
+ it('handles keyboard interaction correctly', async () => {
42
+ const wrapper = mount(BaseRadioGroup, {
43
+ props: { items }
44
+ });
45
+ await wrapper.findAll('[role="radio"]')[0].trigger('keydown.enter');
46
+ expect(wrapper.vm.selectedIndex).toBe(0);
47
+ expect(wrapper.emitted('update:value')[0]).toEqual([items[0].value]);
48
+ });
49
+ });
@@ -0,0 +1,80 @@
1
+ import { describe, it, expect, vi } from 'vitest';
2
+ import { shallowMount } from '@vue/test-utils';
3
+ import Breadcrumb from './Breadcrumb.vue';
4
+ import BaseText from '../../../Atoms/Text/BaseText.vue';
5
+
6
+ // Mocking BaseText and router-link
7
+ const mocks = {
8
+ components: {
9
+ BaseText,
10
+ RouterLink: {
11
+ template: '<div><slot></slot></div>',
12
+ props: ['to'],
13
+ methods: { click: vi.fn() }
14
+ }
15
+ }
16
+ };
17
+
18
+ describe('Breadcrumb', () => {
19
+ it('renders breadcrumbs correctly', () => {
20
+ const items = [
21
+ { text: 'Home', link: '/' },
22
+ { text: 'Category', link: '/category' },
23
+ { text: 'Item', link: '/category/item' }
24
+ ];
25
+
26
+ const wrapper = shallowMount(Breadcrumb, {
27
+ props: { items },
28
+ global: mocks
29
+ });
30
+
31
+ const linkElements = wrapper.findAll('[to]');
32
+
33
+ // console.log(wrapper.html());
34
+
35
+ expect(linkElements.length).toBe(items.filter(item => item.link).length);
36
+ });
37
+
38
+ // it('calls onLinkClick on link click', async () => {
39
+ // const onLinkClick = vi.fn();
40
+ // const items = [
41
+ // { text: 'Home', link: '/' },
42
+ // { text: 'Category' } // No link
43
+ // ];
44
+ //
45
+ // const wrapper = shallowMount(Breadcrumb, {
46
+ // props: { items, onLinkClick },
47
+ // global: mocks
48
+ // });
49
+ //
50
+ // const link = wrapper.find('[to]');
51
+ // await link.trigger('click.native');
52
+ // expect(onLinkClick).toHaveBeenCalled();
53
+ // });
54
+
55
+ it('calls onLinkClick when a link is clicked', async () => {
56
+ const onLinkClick = vi.fn();
57
+ const items = [
58
+ { text: 'Home', link: '/' },
59
+ { text: 'Category', link: '/category' }
60
+ ];
61
+
62
+ const wrapper = shallowMount(Breadcrumb, {
63
+ props: { items, onLinkClick},
64
+ global: {
65
+ stubs: {
66
+ BaseText,
67
+ RouterLink: true
68
+ }
69
+ }
70
+ });
71
+
72
+ const links = wrapper.findAll('[to]');
73
+ if (links.length > 0) {
74
+ await links[0].trigger('click.native');
75
+ expect(onLinkClick).toHaveBeenCalled();
76
+ } else {
77
+ throw new Error('No links found to test');
78
+ }
79
+ });
80
+ });
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <nav class="flex flex-row">
3
- <div v-for="(item, index) in items" :key="index">
2
+ <nav class="flex flex-row w-full">
3
+ <div v-for="(item, index) in items" :key="index" class="flex flex-row">
4
4
  <BaseText v-if="index > 0" :text="' > '" size="lg" color="quaternary" class="mr-2" />
5
5
  <BaseText v-if="!item.link" class="mr-2" :text="item.text" size="lg" color="quaternary" />
6
6
  <router-link v-if="item.link" :to="item.link" @click.native="onLinkClick" class="mr-2">
@@ -4,7 +4,7 @@
4
4
  <BaseText data-testid="text-step" :color="'quaternary'" :size="'sm'" :text="'Step 1 out of 2'" :weight="'normal'" />
5
5
  </div>
6
6
  <div class="w-full flex flex-row justify-center my-4">
7
- <BaseText data-testid="text-add-tournamnet" :color="'primaryHighlight'" :size="'2xl'" :text="'Add Tournament'" :weight="'normal'" />
7
+ <BaseText data-testid="text-add-tournament" :color="'primaryHighlight'" :size="'2xl'" :text="'Add Tournament'" :weight="'normal'" />
8
8
  </div>
9
9
  <div class="w-full flex flex-row justify-center my-4">
10
10
  <ImageCropper :personID="1" />
@@ -55,6 +55,7 @@ import DatePicker from "../../../Organisms/DatePicker/DatePicker.vue";
55
55
  import TextBoxEditor from "../../../Organisms/TextBoxEditor/TextBoxEditor.vue";
56
56
  import BaseRadioGroup from "../../../Atoms/RadioGroup/BaseRadioGroup.vue";
57
57
  import BaseButton from "../../../Molecules/Button/BaseButton.vue";
58
+
58
59
  export default {
59
60
  name: 'AddTournamentPageOne',
60
61
  components: {
@@ -1,18 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- node: true,
5
- 'jest/globals': true
6
- },
7
- extends: ['plugin:vue/vue3-recommended', 'eslint:recommended', 'plugin:jest/recommended', 'prettier', 'plugin:storybook/recommended'],
8
- parserOptions: {
9
- parser: 'babel-eslint'
10
- },
11
- rules: {
12
- 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
13
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
14
- },
15
- plugins: [
16
- 'jest'
17
- ]
18
- }
@@ -1,2 +0,0 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
@@ -1 +0,0 @@
1
- node_modules/
@@ -1,18 +0,0 @@
1
- /** @type { import('@storybook/vue3-vite').StorybookConfig } */
2
- const config = {
3
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
4
- addons: [
5
- "@storybook/addon-links",
6
- "@storybook/addon-essentials",
7
- "@storybook/addon-interactions",
8
- "@storybook/addon-mdx-gfm"
9
- ],
10
- framework: {
11
- name: "@storybook/vue3-vite",
12
- options: {},
13
- },
14
- docs: {
15
- autodocs: "tag",
16
- },
17
- };
18
- export default config;
@@ -1,9 +0,0 @@
1
- // .storybook/mockRoutes.js
2
- import config from "./main.js";
3
-
4
- export const routes = [
5
- { path: '/', component: { template: '<div>Home</div>' } },
6
- { path: '/event', component: { template: '<div>Event</div>' } },
7
- ];
8
-
9
- export default routes;
@@ -1 +0,0 @@
1
- <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
@@ -1,17 +0,0 @@
1
- /** @type { import('@storybook/vue3').Preview } */
2
- import '../tailwind/output.css';
3
- import 'font-awesome/css/font-awesome.min.css';
4
-
5
- const preview = {
6
- parameters: {
7
- actions: { argTypesRegex: "^on[A-Z].*" },
8
- controls: {
9
- matchers: {
10
- color: /(background|color)$/i,
11
- date: /Date$/,
12
- },
13
- },
14
- },
15
- };
16
-
17
- export default preview;
package/package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Dwain Crackel
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/package/README.md DELETED
@@ -1,83 +0,0 @@
1
- # Vue 3 + Vite
2
-
3
- This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- ## Recommended IDE Setup
6
-
7
- - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
-
9
-
10
-
11
-
12
-
13
- ## Publishing a Storybook Library to NPM
14
- Follow this guide to publish your Storybook library to NPM, making it available for others to easily npm install.
15
-
16
- # 1. Setup & Prerequisites
17
- Ensure you have an account on npm. If not, you can create one for free.
18
- Verify node and npm installations:
19
- ```
20
- Copy code
21
- node -v
22
- npm -v
23
- ```
24
-
25
- # 2. Preparing Your Storybook Library
26
- a. Building the Library
27
- Compile your library with Vite or your bundler:
28
-
29
- ```
30
- vite build
31
- ```
32
-
33
- b. Update package.json
34
- Ensure the following fields are set:
35
-
36
- name: Name of your package.
37
- version: Version number.
38
- main: Main entry file (e.g., dist/index.js).
39
- files: Files to include, e.g., ["dist"].
40
-
41
- # 3. Logging in to NPM
42
- Login to npm (if you haven't already):
43
-
44
- ```
45
- npm login
46
- ```
47
- Provide your username, password, and email.
48
-
49
- # 4. Publishing to NPM
50
- a. Default (Private Package)
51
- For scoped private packages (@username/project-name):
52
-
53
- ```
54
- npm publish
55
- ```
56
- b. Public Package
57
- For public packages:
58
-
59
- ```
60
- npm publish --access=public
61
- ```
62
-
63
- # 5. Verifying Your Package
64
- Check on the npm website to verify your package's publication.
65
-
66
- Check the registry name
67
- ```
68
- npm get registry
69
- ```
70
-
71
- # 6. Installing and Using the Library
72
- To install the library:
73
-
74
- ```
75
- npm install your-library-name
76
- ```
77
-
78
- Users can then import and utilize your library's components.
79
-
80
- Notes:
81
-
82
- Always update the version in package.json before republishing.
83
- Ensure only necessary files are bundled to prevent package bloat.
@@ -1,12 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>StoryBookLib !!!!!</title>
7
- </head>
8
- <body>
9
- <div id="app"></div>
10
- <script type="module" src="/src/main.js"></script>
11
- </body>
12
- </html>
@@ -1,49 +0,0 @@
1
- {
2
- "name": "@dcrackel/hematournamentui",
3
- "private": false,
4
- "version": "1.0.7",
5
- "type": "module",
6
- "main": "dist/HemaTouranmentUI-lib.umd.js",
7
- "module": "dist/HemaTouranmentUI-lib.es.js",
8
- "scripts": {
9
- "dev": "vite",
10
- "build": "npm version patch && vite build",
11
- "publish:package": "npm publish",
12
- "preview": "vite preview",
13
- "build-storybook": "npm run build:tailwind && storybook build",
14
- "build:tailwind": "tailwindcss build ./tailwind/tailwind.css -o ./tailwind/output.css",
15
- "storybook": "concurrently \"npm run watch:tailwind\" \"npm run watch:storybook\"",
16
- "watch:storybook": "storybook dev -p 6006",
17
- "watch:tailwind": "tailwindcss build ./tailwind/tailwind.css -o ./tailwind/output.css --watch",
18
- "test": "vitest",
19
- "coverage": "vitest run --coverage"
20
- },
21
- "dependencies": {
22
- "@storybook/addon-actions": "^7.4.5",
23
- "concurrently": "^8.2.1",
24
- "font-awesome": "^4.7.0",
25
- "happy-dom": "^12.8.0",
26
- "vue": "^3.3.4"
27
- },
28
- "devDependencies": {
29
- "@storybook/addon-docs": "^7.4.5",
30
- "@storybook/addon-essentials": "^7.4.5",
31
- "@storybook/addon-interactions": "^7.4.5",
32
- "@storybook/addon-links": "^7.4.5",
33
- "@storybook/addon-mdx-gfm": "^7.4.5",
34
- "@storybook/blocks": "^7.4.5",
35
- "@storybook/testing-library": "^0.2.2",
36
- "@storybook/vue3": "^7.4.5",
37
- "@storybook/vue3-vite": "^7.4.5",
38
- "@vitejs/plugin-vue": "^4.2.3",
39
- "@vitest/coverage-v8": "^0.34.6",
40
- "@vue/cli-plugin-babel": "^5.0.8",
41
- "@vue/test-utils": "^2.4.0-alpha.2",
42
- "autoprefixer": "^10.4.16",
43
- "storybook": "^7.4.5",
44
- "storybook-vue3-router": "^4.0.1",
45
- "tailwindcss": "^3.3.3",
46
- "vite": "^4.4.5",
47
- "vitest": "^0.34.6"
48
- }
49
- }
@@ -1,6 +0,0 @@
1
- export default {
2
- plugins: {
3
- tailwindcss: {},
4
- autoprefixer: {},
5
- },
6
- }
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- semi: true, // Remove semicolons
3
- trailingComma: 'none', // No trailing commas
4
- singleQuote: true, // Use single quotes instead of double quotes
5
- printWidth: 120, // Wrap lines at 120 characters
6
- tabWidth: 2, // Use 2 spaces for indentation
7
- useTabs: false, // Use spaces instead of tabs
8
- bracketSpacing: true, // Space between object literals
9
- arrowParens: 'avoid' // Avoid parentheses around single arrow function parameters
10
- };
@@ -1,15 +0,0 @@
1
- export { default as BaseInput } from './stories/Base/Input/BaseInput.vue';
2
- export { default as BaseButton } from './stories/Base/Button/BaseButton.vue';
3
- export { default as BaseTag } from './stories/Base/Tag/BaseTag.vue';
4
- export { default as BaseText } from './stories/Base/Text/BaseText.vue';
5
-
6
- export { default as TournamentCard } from './stories/Cards/TournamentCard/TournamentCard.vue';
7
- export { default as TournamentCardDetails } from './stories/Cards/TournamentCard/Detail/TournamentCardDetail.vue';
8
- export { default as TournamentCardHeader } from './stories/Cards/TournamentCard/Header/TournamentCardHeader.vue';
9
-
10
- export { default as GridContainer } from './stories/Containers/Grid/GridContainer.vue';
11
-
12
- export { default as FilterAndSortBar } from './stories/Filters/FilterAndSortBar/FilterAndSortBar.vue';
13
- export { default as AdminLeftMenu } from './stories/Menu/Admin/AdminLeftMenu.vue';
14
- export { default as DropDownMenu } from './stories/Menu/DropDown/DropDownMenu.vue';
15
-
@@ -1,2 +0,0 @@
1
- import '../tailwind/output.css'
2
-
@@ -1 +0,0 @@
1
- module.exports = 'test-file-stub';
@@ -1,34 +0,0 @@
1
- const mockTournaments = [
2
- {
3
- id: 1,
4
- artwork: 'https://node.ferrotas.com:5000/uploads/t-450.png',
5
- tags: ['Tag1', 'Tag2'],
6
- name: 'Summer Slam 2023',
7
- description: 'Join us for the hottest tournament this summer!',
8
- date: '15 June 2023',
9
- closes: 'Status Line',
10
- location: 'Amber Arena, Miami, FL'
11
- },
12
- {
13
- id: 2,
14
- artwork: 'https://node.ferrotas.com:5000/uploads/t-196.png',
15
- tags: ['Tag3', 'Tag4', 'Tag5'],
16
- name: 'Winter Showdown 2023',
17
- description: 'Cold weather, hot competition!',
18
- date: '10 December 2023',
19
- closes: 'Registration Closes 1 December 2023',
20
- location: 'Snowy Mountain Stadium, Denver, CO'
21
- },
22
- {
23
- id: 3,
24
- artwork: 'https://usahema.org/img/tournaments/usahema-tournament-45.jpg',
25
- tags: ['Tag6'],
26
- name: 'Autumn Cup 2023',
27
- description: 'Celebrate fall with intense matches!',
28
- date: '20 October 2023',
29
- closes: 'Registration Closes 18th October 2023',
30
- location: 'Withers Field, Portland, OR'
31
- }
32
- ];
33
-
34
- export default mockTournaments;