@federball/components 0.0.23 → 0.0.24

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.
@@ -0,0 +1,8 @@
1
+ import type { EventType } from "@federball/types";
2
+ type EventNameFieldProps = {
3
+ name: EventType;
4
+ isReadonly?: boolean;
5
+ };
6
+ export declare const EventNameField: ({ name, isReadonly, }: EventNameFieldProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=EventNameField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventNameField.d.ts","sourceRoot":"","sources":["../../src/fields/EventNameField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,KAAK,mBAAmB,GAAG;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,uBAG5B,mBAAmB,4CAYrB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { InputGroup, Label, TextField } from "@heroui/react";
3
+ import { Labels } from "../labels";
4
+ import { EventIcon } from "../icons/EventIcon";
5
+ export const EventNameField = ({ name, isReadonly = false, }) => {
6
+ return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: isReadonly, children: [_jsx(Label, { children: Labels.EVENT_NAME }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(EventIcon, {}) }), _jsx(InputGroup.Input, { "aria-label": Labels.EVENT_NAME, value: name })] })] }));
7
+ };
8
+ //# sourceMappingURL=EventNameField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventNameField.js","sourceRoot":"","sources":["../../src/fields/EventNameField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAO/C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC9B,IAAI,EACJ,UAAU,GAAG,KAAK,GACG,EAAE,EAAE;IACzB,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,UAAU,EAAE,UAAU,aAChE,KAAC,KAAK,cAAE,MAAM,CAAC,UAAU,GAAS,EAClC,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,SAAS,KAAG,GACM,EACpB,KAAC,UAAU,CAAC,KAAK,kBAAa,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,GAAI,IACpD,IACF,CACZ,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { EventType } from "@federball/types";
2
+ type EventTypeFieldProps = {
3
+ type: EventType;
4
+ isReadonly?: boolean;
5
+ };
6
+ export declare const EventTypeField: ({ type, isReadonly, }: EventTypeFieldProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=EventTypeField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventTypeField.d.ts","sourceRoot":"","sources":["../../src/fields/EventTypeField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,KAAK,mBAAmB,GAAG;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,uBAG5B,mBAAmB,4CAerB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { InputGroup, Label, TextField } from "@heroui/react";
3
+ import { getLabelForEventType, Labels } from "../labels";
4
+ import { EventTypeIcon } from "../icons/EventTypeIcon";
5
+ export const EventTypeField = ({ type, isReadonly = false, }) => {
6
+ return (_jsxs(TextField, { type: "text", variant: "secondary", isReadOnly: isReadonly, children: [_jsx(Label, { children: Labels.EVENT_TYPE }), _jsxs(InputGroup, { children: [_jsx(InputGroup.Prefix, { children: _jsx(EventTypeIcon, { type: type }) }), _jsx(InputGroup.Input, { "aria-label": Labels.EVENT_TYPE, value: getLabelForEventType(type) })] })] }));
7
+ };
8
+ //# sourceMappingURL=EventTypeField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventTypeField.js","sourceRoot":"","sources":["../../src/fields/EventTypeField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAOvD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC9B,IAAI,EACJ,UAAU,GAAG,KAAK,GACG,EAAE,EAAE;IACzB,OAAO,CACN,MAAC,SAAS,IAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,UAAU,EAAE,UAAU,aAChE,KAAC,KAAK,cAAE,MAAM,CAAC,UAAU,GAAS,EAClC,MAAC,UAAU,eACV,KAAC,UAAU,CAAC,MAAM,cACjB,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAI,GACV,EACpB,KAAC,UAAU,CAAC,KAAK,kBACJ,MAAM,CAAC,UAAU,EAC7B,KAAK,EAAE,oBAAoB,CAAC,IAAI,CAAC,GAChC,IACU,IACF,CACZ,CAAC;AACH,CAAC,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { DrawTypeField } from "./DrawTypeField";
2
+ import { EventNameField } from "./EventNameField";
3
+ import { EventTypeField } from "./EventTypeField";
2
4
  import { ScoringSystemField } from "./ScoringSystemField";
3
- export { DrawTypeField, ScoringSystemField };
5
+ export { DrawTypeField, EventNameField, EventTypeField, ScoringSystemField };
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { DrawTypeField } from "./DrawTypeField";
2
+ import { EventNameField } from "./EventNameField";
3
+ import { EventTypeField } from "./EventTypeField";
2
4
  import { ScoringSystemField } from "./ScoringSystemField";
3
- export { DrawTypeField, ScoringSystemField };
5
+ export { DrawTypeField, EventNameField, EventTypeField, ScoringSystemField };
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC"}
package/dist/labels.d.ts CHANGED
@@ -1,11 +1,14 @@
1
- import type { DrawStage, DrawType, ScoringSystem } from "@federball/types";
1
+ import type { DrawStage, DrawType, EventType, ScoringSystem } from "@federball/types";
2
2
  import type { UserType } from "./types";
3
3
  export declare const getLabelForDrawStage: (stage: DrawStage) => "Group" | "Round of 32" | "Round of 16" | "Quarterfinal" | "Semifinal" | "Final";
4
4
  export declare const getLabelForDrawType: (drawType: DrawType) => "Group" | "Knockout";
5
+ export declare const getLabelForEventType: (eventType: EventType) => "Singles" | "Doubles";
5
6
  export declare const getLabelForScoringSystem: (scoringSystem: ScoringSystem) => "11 points" | "21 points";
6
7
  export declare const getLabelForUserType: (userType: UserType) => "Admin" | "Member";
7
8
  export declare enum Labels {
8
9
  DRAW_TYPE = "Type of draw",
10
+ EVENT_NAME = "Name of event",
11
+ EVENT_TYPE = "Type of event",
9
12
  SCORING_SYSTEM = "Scoring system"
10
13
  }
11
14
  //# sourceMappingURL=labels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../src/labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,oBAAoB,GAAI,OAAO,SAAS,qFAiBpD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,QAAQ,yBASrD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,eAAe,aAAa,8BASpE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,QAAQ,uBASrD,CAAC;AAEF,oBAAY,MAAM;IACjB,SAAS,iBAAiB;IAC1B,cAAc,mBAAmB;CACjC"}
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../src/labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,aAAa,EACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,oBAAoB,GAAI,OAAO,SAAS,qFAiBpD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,QAAQ,yBASrD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,WAAW,SAAS,0BASxD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,eAAe,aAAa,8BASpE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,QAAQ,uBASrD,CAAC;AAEF,oBAAY,MAAM;IACjB,SAAS,iBAAiB;IAC1B,UAAU,kBAAkB;IAC5B,UAAU,kBAAkB;IAC5B,cAAc,mBAAmB;CACjC"}
package/dist/labels.js CHANGED
@@ -26,6 +26,16 @@ export const getLabelForDrawType = (drawType) => {
26
26
  throw new Error(`Unknown draw type: ${drawType}`);
27
27
  }
28
28
  };
29
+ export const getLabelForEventType = (eventType) => {
30
+ switch (eventType) {
31
+ case "SINGLES":
32
+ return "Singles";
33
+ case "DOUBLES":
34
+ return "Doubles";
35
+ default:
36
+ throw new Error(`Unknown event type: ${eventType}`);
37
+ }
38
+ };
29
39
  export const getLabelForScoringSystem = (scoringSystem) => {
30
40
  switch (scoringSystem) {
31
41
  case "FIRST_TO_11":
@@ -49,6 +59,8 @@ export const getLabelForUserType = (userType) => {
49
59
  export var Labels;
50
60
  (function (Labels) {
51
61
  Labels["DRAW_TYPE"] = "Type of draw";
62
+ Labels["EVENT_NAME"] = "Name of event";
63
+ Labels["EVENT_TYPE"] = "Type of event";
52
64
  Labels["SCORING_SYSTEM"] = "Scoring system";
53
65
  })(Labels || (Labels = {}));
54
66
  //# sourceMappingURL=labels.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"labels.js","sourceRoot":"","sources":["../src/labels.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgB,EAAE,EAAE;IACxD,QAAQ,KAAK,EAAE,CAAC;QACf,KAAK,OAAO;YACX,OAAO,OAAO,CAAC;QAChB,KAAK,UAAU;YACd,OAAO,aAAa,CAAC;QACtB,KAAK,UAAU;YACd,OAAO,aAAa,CAAC;QACtB,KAAK,cAAc;YAClB,OAAO,cAAc,CAAC;QACvB,KAAK,WAAW;YACf,OAAO,WAAW,CAAC;QACpB,KAAK,OAAO;YACX,OAAO,OAAO,CAAC;QAChB;YACC,MAAM,IAAI,KAAK,CAAC,uBAAuB,KAAK,EAAE,CAAC,CAAC;IAClD,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAkB,EAAE,EAAE;IACzD,QAAQ,QAAQ,EAAE,CAAC;QAClB,KAAK,OAAO;YACX,OAAO,OAAO,CAAC;QAChB,KAAK,UAAU;YACd,OAAO,UAAU,CAAC;QACnB;YACC,MAAM,IAAI,KAAK,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;IACpD,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,aAA4B,EAAE,EAAE;IACxE,QAAQ,aAAa,EAAE,CAAC;QACvB,KAAK,aAAa;YACjB,OAAO,WAAW,CAAC;QACpB,KAAK,aAAa;YACjB,OAAO,WAAW,CAAC;QACpB;YACC,MAAM,IAAI,KAAK,CAAC,2BAA2B,aA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AAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,SAAoB,EAAE,EAAE;IAC5D,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,SAAS;YACb,OAAO,SAAS,CAAC;QAClB,KAAK,SAAS;YACb,OAAO,SAAS,CAAC;QAClB;YACC,MAAM,IAAI,KAAK,CAAC,uBAAuB,SAAS,EAAE,CAAC,CAAC;IACtD,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,aAA4B,EAAE,EAAE;IACxE,QAAQ,aAAa,EAAE,CAAC;QACvB,KAAK,aAAa;YACjB,OAAO,WAAW,CAAC;QACpB,KAAK,aAAa;YACjB,OAAO,WAAW,CAAC;QACpB;YACC,MAAM,IAAI,KAAK,CAAC,2BAA2B,aAAa,EAAE,CAAC,CAAC;IAC9D,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAkB,EAAE,EAAE;IACzD,QAAQ,QAAQ,EAAE,CAAC;QAClB,KAAK,OAAO;YACX,OAAO,OAAO,CAAC;QAChB,KAAK,QAAQ;YACZ,OAAO,QAAQ,CAAC;QACjB;YACC,MAAM,IAAI,KAAK,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;IACpD,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,CAAN,IAAY,MAKX;AALD,WAAY,MAAM;IACjB,oCAA0B,CAAA;IAC1B,sCAA4B,CAAA;IAC5B,sCAA4B,CAAA;IAC5B,2CAAiC,CAAA;AAClC,CAAC,EALW,MAAM,KAAN,MAAM,QAKjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@federball/components",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "type": "module",
5
5
  "description": "Component library for federball.app",
6
6
  "source": "src/index.ts",