Skip to content

Commit

Permalink
Merge pull request #59 from FRC2713/themes
Browse files Browse the repository at this point in the history
theming works!
  • Loading branch information
tytremblay authored Dec 20, 2024
2 parents 40ad0b4 + ef42af3 commit f273a92
Show file tree
Hide file tree
Showing 8 changed files with 309 additions and 193 deletions.
176 changes: 96 additions & 80 deletions public/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,116 +25,103 @@
"properties": {
"background": {
"type": "string",
"pattern": "\\d+\\s+\\d+%\\s+\\d+%",
"default": "0 0% 100%"
"pattern": "\\d+\\s+\\d+%\\s+\\d+%"
},
"foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 3.9%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"card": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 100%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"card_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 3.9%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"popover": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 100%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"popover_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 3.9%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"primary": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "354.44 71.3% 47.9%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"primary_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 85.7% 97.3%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"secondary": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 96.1%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"secondary_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 9%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"muted": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 96.1%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"muted_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 45.1%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"accent": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 96.1%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"accent_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 9%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"destructive": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 84.2% 60.2%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"destructive_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 98%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"border": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 89.8%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"input": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 89.8%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"ring": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "354.44 71.3% 47.9%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"chart_1": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "12 76% 61%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"chart_2": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "173 58% 39%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"chart_3": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "197 37% 24%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"chart_4": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "43 74% 66%"
"$ref": "#/properties/theme/properties/light/properties/background"
},
"chart_5": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "27 87% 67%"
"$ref": "#/properties/theme/properties/light/properties/background"
}
},
"required": [
"background",
"foreground",
"card",
"card_foreground",
"popover",
"popover_foreground",
"primary",
"primary_foreground",
"secondary",
"secondary_foreground",
"muted",
"muted_foreground",
"accent",
"accent_foreground",
"destructive",
"destructive_foreground",
"border",
"input",
"ring"
"ring",
"chart_1",
"chart_2",
"chart_3",
"chart_4",
"chart_5"
],
"additionalProperties": false
},
Expand All @@ -146,7 +133,61 @@
"light",
"dark"
],
"additionalProperties": false
"additionalProperties": false,
"default": {
"light": {
"background": "0 0% 100%",
"foreground": "0 0% 3.9%",
"card": "0 0% 100%",
"card_foreground": "0 0% 3.9%",
"popover": "0 0% 100%",
"popover_foreground": "0 0% 3.9%",
"primary": "354.44 71.3% 47.9%",
"primary_foreground": "0 85.7% 97.3%",
"secondary": "0 0% 96.1%",
"secondary_foreground": "0 0% 9%",
"muted": "0 0% 96.1%",
"muted_foreground": "0 0% 45.1%",
"accent": "0 0% 96.1%",
"accent_foreground": "0 0% 9%",
"destructive": "0 84.2% 60.2%",
"destructive_foreground": "0 0% 98%",
"border": "0 0% 89.8%",
"input": "0 0% 89.8%",
"ring": "354.44 71.3% 47.9%",
"chart_1": "12 76% 61%",
"chart_2": "173 58% 39%",
"chart_3": "197 37% 24%",
"chart_4": "43 74% 66%",
"chart_5": "27 87% 67%"
},
"dark": {
"background": "0 0% 3.9%",
"foreground": "0 0% 98%",
"card": "0 0% 3.9%",
"card_foreground": "0 0% 98%",
"popover": "0 0% 3.9%",
"popover_foreground": "0 0% 98%",
"primary": "354.44 71.3% 47.9%",
"primary_foreground": "0 85.7% 97.3%",
"secondary": "0 0% 14.9%",
"secondary_foreground": "0 0% 98%",
"muted": "0 0% 14.9%",
"muted_foreground": "0 0% 63.9%",
"accent": "0 0% 14.9%",
"accent_foreground": "0 0% 98%",
"destructive": "0 62.8% 30.6%",
"destructive_foreground": "0 0% 98%",
"border": "0 0% 14.9%",
"input": "0 0% 14.9%",
"ring": "354.44 71.3% 47.9%",
"chart_1": "220 70% 50%",
"chart_2": "160 60% 45%",
"chart_3": "30 80% 55%",
"chart_4": "280 65% 60%",
"chart_5": "340 75% 55%"
}
}
},
"sections": {
"type": "array",
Expand Down Expand Up @@ -199,10 +240,6 @@
"default": 0,
"description": "The default value"
},
"value": {
"type": "number",
"description": "The value of the input"
},
"min": {
"type": "number",
"description": "The minimum value"
Expand Down Expand Up @@ -259,10 +296,6 @@
"default": "",
"description": "The default value"
},
"value": {
"type": "string",
"description": "The value of the input"
},
"min": {
"type": "number",
"description": "The minimum length of the string"
Expand Down Expand Up @@ -310,10 +343,6 @@
"default": 0,
"description": "The default value"
},
"value": {
"type": "number",
"description": "The value of the input"
},
"min": {
"type": "number",
"description": "The minimum value"
Expand Down Expand Up @@ -362,12 +391,9 @@
},
"defaultValue": {
"type": "string",
"default": "",
"description": "The default value. Must be one of the choices"
},
"value": {
"type": "string",
"description": "The value of the input"
},
"choices": {
"type": "object",
"additionalProperties": {
Expand All @@ -384,8 +410,7 @@
"title",
"type",
"required",
"code",
"defaultValue"
"code"
],
"additionalProperties": false
},
Expand Down Expand Up @@ -416,12 +441,9 @@
},
"defaultValue": {
"type": "number",
"default": 0,
"description": "The default value"
},
"value": {
"type": "number",
"description": "The value of the input"
},
"min": {
"type": "number",
"description": "The minimum value"
Expand Down Expand Up @@ -475,11 +497,8 @@
},
"defaultValue": {
"type": "boolean",
"default": false,
"description": "The default value"
},
"value": {
"type": "boolean",
"description": "The value of the input"
}
},
"required": [
Expand Down Expand Up @@ -519,10 +538,6 @@
"type": "number",
"default": 0,
"description": "The default value"
},
"value": {
"type": "number",
"description": "The value of the input"
}
},
"required": [
Expand Down Expand Up @@ -553,6 +568,7 @@
"page_title",
"delimiter",
"teamNumber",
"theme",
"sections"
],
"additionalProperties": false,
Expand Down
Loading

0 comments on commit f273a92

Please sign in to comment.