@dcrackel/hematournamentui 1.0.696 → 1.0.698

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 (71) hide show
  1. package/AGENTS.md +85 -0
  2. package/README.md +22 -6
  3. package/dist/HemaTournamentUI-lib.es.js +43127 -44314
  4. package/dist/HemaTournamentUI-lib.umd.js +34 -38
  5. package/dist/hematournamentui-tailwind.css +3724 -0
  6. package/dist/hematournamentui.css +2 -9
  7. package/package.json +48 -43
  8. package/src/stories/Atoms/Input/BaseInput.vue +21 -18
  9. package/src/stories/Atoms/RadioGroup/BaseRadioGroup.vue +1 -0
  10. package/src/stories/Atoms/Tag/BaseTag.vue +17 -31
  11. package/src/stories/Atoms/Text/BaseText.vue +67 -144
  12. package/src/stories/Molecules/Boxes/BoutBoxes/PassesBox/PassesBox.vue +1 -0
  13. package/src/stories/Molecules/Boxes/BoutBoxes/TimerBox/TimerBox.vue +1 -0
  14. package/src/stories/Molecules/Boxes/CounterBox/CounterBox.vue +1 -0
  15. package/src/stories/Molecules/CombinationInputs/TitledInput/TitledInput.vue +1 -0
  16. package/src/stories/Molecules/Filters/FilterAndSortBar/FilterAndSortBar.vue +1 -0
  17. package/src/stories/Molecules/Filters/FilterUpcomingPast/FilterUpcomingPast.vue +1 -0
  18. package/src/stories/Molecules/Inputs/MultiSelect/MultiSelect.vue +1 -0
  19. package/src/stories/Molecules/Inputs/Toggle/Toggle.vue +1 -0
  20. package/src/stories/Molecules/Modals/AddDisplayModal/AddDisplayModal.vue +1 -0
  21. package/src/stories/Molecules/Modals/EditBoutModal/EditBoutModal.vue +1 -0
  22. package/src/stories/Molecules/Modals/EventWizardModal/EventWizardModal.vue +1 -0
  23. package/src/stories/Molecules/Reorder/ReorderableShell.vue +1 -0
  24. package/src/stories/Organisms/Cards/BoutCard/BoutCard.vue +3 -0
  25. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardActive/BoutCardActive.vue +1 -0
  26. package/src/stories/Organisms/Cards/BoutCard/Variants/BoutCardInactive/BoutCardInactive.vue +1 -0
  27. package/src/stories/Organisms/Cards/FencerCard/FencerCard.vue +1 -0
  28. package/src/stories/Organisms/Cards/FencerPoolResultsCard/FencerPoolResultsCard.vue +1 -0
  29. package/src/stories/Organisms/Cards/ImportFencerCard/ImportFencerCard.vue +1 -0
  30. package/src/stories/Organisms/Cards/KioskCard/KioskCard.vue +30 -24
  31. package/src/stories/Organisms/Cards/PenaltyCard/PenaltyCard.vue +29 -39
  32. package/src/stories/Organisms/Cards/PoolFencerCard/PoolFencerCard.vue +1 -0
  33. package/src/stories/Organisms/Cards/StaffCard/StaffCard.vue +1 -0
  34. package/src/stories/Organisms/Cards/TableauBoutCard/TableauBoutCard.vue +1 -0
  35. package/src/stories/Organisms/Cards/TableauFencerCard/TableauFencerCard.vue +1 -0
  36. package/src/stories/Organisms/Cards/TournamentAdminCard/TournamentAdminCard.vue +17 -19
  37. package/src/stories/Organisms/ComplexInputs/AddressAutocomplete/AddressAutocomplete.vue +1 -0
  38. package/src/stories/Organisms/ComplexInputs/ClubColorPicker/ClubColorPicker.vue +1 -0
  39. package/src/stories/Organisms/ComplexInputs/DatePicker/DatePicker.vue +2 -1
  40. package/src/stories/Organisms/ComplexInputs/DropDown/DropDownMenu.vue +1 -0
  41. package/src/stories/Organisms/ComplexInputs/FindOrAddPerson/FindOrAddPerson.vue +1 -0
  42. package/src/stories/Organisms/ComplexInputs/FindPerson/FindPerson.vue +1 -0
  43. package/src/stories/Organisms/ComplexInputs/ImageCropper/ImageCropper.vue +1 -0
  44. package/src/stories/Organisms/Containers/PoolResults/PoolResultsTable.vue +1 -0
  45. package/src/stories/Organisms/Containers/TableauColumn/TableauColumn.vue +1 -0
  46. package/src/stories/Organisms/Form/AddDisplay/AddDisplay.vue +1 -0
  47. package/src/stories/Organisms/Form/AddNewPerson/AddNewPerson.vue +1 -0
  48. package/src/stories/Organisms/Grids/GridContainer.vue +113 -141
  49. package/src/stories/Organisms/Headers/EventFinalResultsHeader/EventFinalResultsHeader.vue +1 -0
  50. package/src/stories/Organisms/Headers/PoolResultsHeader/PoolResultsHeader.vue +1 -0
  51. package/src/stories/Organisms/Headers/PoolSummary/PoolSummary.vue +1 -0
  52. package/src/stories/Organisms/Headers/ToggleHeader/ToggleHeader.vue +1 -0
  53. package/src/stories/Organisms/Wizards/EditEventWizard/BasicEventInfo/BasicEventInfo.vue +1 -0
  54. package/src/stories/Organisms/Wizards/EditEventWizard/DirectEliminationPromotion/DirectEliminationPromotion.vue +21 -34
  55. package/src/stories/Organisms/Wizards/EditEventWizard/EditEventWizard.vue +77 -72
  56. package/src/stories/Organisms/Wizards/EditEventWizard/PoolConfiguration/PoolConfiguration.vue +1 -0
  57. package/src/stories/Templates/Assignment/Assignment.vue +56 -70
  58. package/src/stories/Templates/EventManagement/Bracket/Bracket.vue +1 -0
  59. package/src/stories/Templates/EventManagement/EditEventInfo/EditEventInfo.vue +1 -0
  60. package/src/stories/Templates/EventManagement/EventAttendance/EventAttendance.vue +26 -26
  61. package/src/stories/Templates/EventManagement/EventFinalResults/EventFinalResults.vue +1 -0
  62. package/src/stories/Templates/EventManagement/PoolLive/PoolLive.vue +0 -2
  63. package/src/stories/Templates/EventManagement/PoolManagement/PoolManagement.vue +2 -0
  64. package/src/stories/Templates/EventManagement/PoolResults/PoolResults.vue +1 -0
  65. package/src/stories/Templates/EventManagement/StaffList/StaffList.vue +1 -0
  66. package/src/stories/Templates/PersonManagement/Attendance/Attendance.vue +27 -33
  67. package/src/stories/Templates/TournamentManagement/TouranmentResultsImport/TournamentResultsImport.vue +0 -0
  68. package/src/stories/Templates/TournamentManagement/TournamentManagement.vue +1 -0
  69. package/src/stories/Templates/TournamentManagement/TournamentPageTwo/TouranmentPageTwo.vue +80 -4
  70. package/src/stories/Util/tabs.js +1 -0
  71. package/tailwind/tailwind.css +5 -6
package/AGENTS.md ADDED
@@ -0,0 +1,85 @@
1
+ # Agent Guide
2
+
3
+ This project is `@dcrackel/hematournamentui`, the shared Vue 3 Storybook/UI package for Meyer Squared tournament screens. It owns reusable presentation components, visual structure, Storybook examples, Tailwind styling, and small UI-only state. The consuming admin/frontend app owns routing, API calls, sockets, auth, localStorage, persistence, and tournament workflow orchestration.
4
+
5
+ ## Code Style
6
+
7
+ - Prefer small, single-use, named functions over long inline blocks.
8
+ - Prefer guard clauses and early returns over `else`.
9
+ - Avoid `else if`. Use named predicate helpers, lookup maps, or dispatch tables when branching by type/status/action.
10
+ - Prefer predicate dispatch tables over large `switch` statements or long conditional chains.
11
+ - Use clear, boring names for important logic. Favor searchable names that describe the component intent or emitted action.
12
+ - Keep comments sparse. Add comments for domain rules, accessibility choices, or non-obvious sequencing behavior, not for code that reads plainly.
13
+ - Preserve existing component props, emitted events, slots, class contracts, and exported component names unless the change intentionally updates the package API.
14
+ - Do not refactor unrelated files while fixing focused bugs or adding focused UI behavior.
15
+
16
+ ## Component Boundary
17
+
18
+ - Components in this package should stay dumb, reusable, and presentation-focused.
19
+ - App-specific tournament behavior belongs in the consuming frontend, not in this shared UI package.
20
+ - Components should receive data through props and emit user intent upward for the parent to handle.
21
+ - Emit events for parent-owned work such as persistence, API calls, socket messages, navigation, auth-sensitive behavior, and cross-screen workflow rules.
22
+ - Keep local component state only for UI-only behavior, such as folding/unfolding menus, open/closed modal state when locally controlled, transient hover/focus state, input draft display, and similar presentation concerns.
23
+ - Do not add API clients, socket code, localStorage workflow state, or route-level orchestration to this package unless the explicit goal is to create a reusable UI API around those concerns.
24
+ - Clone incoming objects before building emitted payloads when the component may add or reshape UI-specific fields.
25
+ - Keep emitted payload shapes stable. If an event contract changes, update the related Storybook examples and consuming documentation.
26
+
27
+ ## Atomic Design
28
+
29
+ - Follow the existing atomic design structure as much as practical: `Atoms`, `Molecules`, `Organisms`, `Templates`, and `Skeletons`.
30
+ - Put primitive, highly reusable controls in `Atoms`, such as base text, icons, inputs, tags, checkboxes, and radio groups.
31
+ - Put small composed controls in `Molecules`, such as modals, filters, menus, button groups, titled inputs, indicators, and compact UI combinations.
32
+ - Put larger reusable feature sections in `Organisms`, such as cards, containers, headers, forms, grids, complex inputs, wizards, and skeleton loaders.
33
+ - Put page-shaped reusable layouts in `Templates`. Templates may compose many organisms, but should still avoid owning app orchestration, API calls, sockets, routing, or persistence.
34
+ - Before creating a new component, check whether the behavior belongs in an existing atom, molecule, organism, or template instead of adding a near-duplicate.
35
+ - Keep lower-level components generic. Do not make atoms or molecules depend on one tournament workflow when a prop, slot, or emitted event can keep them reusable.
36
+
37
+ ## Interaction Pattern
38
+
39
+ - Prefer optimistic UI for direct user edits: update the visible component state right away, then emit the change upward.
40
+ - The parent should perform persistence/API work and pass authoritative data back down through props.
41
+ - Reconcile prop updates cleanly so the component reflects parent-owned truth after save, refresh, or rollback.
42
+ - Do not block simple visual feedback on API completion unless the user action cannot be represented safely before confirmation.
43
+ - Missing or invalid input data should degrade gracefully in the UI instead of crashing a component.
44
+
45
+ ## Vue Patterns
46
+
47
+ - Use computed fields when derived data can be expressed declaratively.
48
+ - Keep logic out of templates/JSX where practical. Move meaningful conditions, transformations, and class decisions into named computed values or helpers.
49
+ - Keep Vue methods focused. Fetching, transforming, emitting, and local UI state updates should be separable when practical.
50
+ - Prefer explicit `emits` declarations and prop definitions that document component contracts.
51
+ - Use watchers sparingly. Prefer computed values and direct event handlers unless side effects are truly needed.
52
+ - Keep Storybook stories aligned with the public component API and use them to demonstrate meaningful states, variants, empty states, disabled states, and responsive behavior.
53
+
54
+ ## Styling And Layout
55
+
56
+ - Use Tailwind for layout, spacing, color, state, and responsive design whenever practical.
57
+ - Prefer CSS/Tailwind responsive behavior over JavaScript-driven breakpoints or resize logic.
58
+ - Keep layout behavior stable across mobile and desktop. Avoid text overlap, dynamic content shifting controls, or assumptions about fixed viewport sizes.
59
+ - Preserve existing visual language and component hierarchy before introducing new style patterns.
60
+ - Keep reusable components theme-friendly. Avoid hard-coding app-specific colors or one-off layout assumptions unless the component already owns that visual contract.
61
+ - Prefer accessible native controls and semantic markup where possible.
62
+
63
+ ## Data Ownership
64
+
65
+ - Treat this package as a UI surface, not an authoritative data owner.
66
+ - The consuming app owns persisted tournament state, live scoring truth, socket freshness, sequence handling, auth, routing, and recovery after reload/reconnect.
67
+ - Scoreboards, cards, tables, menus, and forms in this package should display provided data and emit user intent; they should not invent tournament workflow state.
68
+ - Keep tournament domain rules explicit when they are needed for rendering. Name conditions that depend on pool vs DE, completed vs active, visible vs hidden, or editable vs read-only.
69
+ - If a rule requires backend knowledge or app workflow context, prefer making it a prop or emitted decision rather than embedding the rule in a shared component.
70
+
71
+ ## Package Boundary
72
+
73
+ - `src/index.js` is the package export surface. Keep exports intentional and stable.
74
+ - `src/stories` contains reusable components and their Storybook-facing examples. Follow the existing atoms, molecules, organisms, templates, and skeletons structure.
75
+ - `dist` is generated output. Do not edit it by hand.
76
+ - Ignore `dist` and `node_modules` while searching unless debugging generated package output or dependency internals.
77
+ - Do not add consuming-app-only dependencies to this package for one component. Prefer props, slots, events, or small local helpers.
78
+
79
+ ## Validation
80
+
81
+ - Run focused lint/build checks after UI changes when practical.
82
+ - Useful commands include `npm run lint`, `npm run build-storybook`, `npm run build:tailwind`, and `npm run test`.
83
+ - For component behavior changes, verify emitted events, optimistic display updates, prop reconciliation, empty states, disabled states, and responsive layout.
84
+ - For public API changes, update Storybook stories and check the consuming app contract.
85
+ - Avoid running package version/publish flows unless explicitly requested. `npm run build` currently patches the package version as part of the script.
package/README.md CHANGED
@@ -10,12 +10,28 @@ This template should help get you started developing with Vue 3 in Vite. The tem
10
10
 
11
11
 
12
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:
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
+ ## Shared CSS
17
+
18
+ Build the package stylesheet as a separate step:
19
+
20
+ ```bash
21
+ npm run build:package-css
22
+ ```
23
+
24
+ The generated file is `dist/hematournamentui-tailwind.css`. Consuming apps should import it from the package instead of manually copying `tailwind/output.css`:
25
+
26
+ ```js
27
+ import '@dcrackel/hematournamentui/tailwind.css';
28
+ ```
29
+
30
+ Use `npm run build:tailwind` for Storybook's local `tailwind/output.css` workflow. Use `npm run build:package-css` when preparing CSS for the parent app or package publish.
31
+
32
+ # 1. Setup & Prerequisites
33
+ Ensure you have an account on npm. If not, you can create one for free.
34
+ Verify node and npm installations:
19
35
  ```
20
36
  Copy code
21
37
  node -v