Skip to content

Commit 2178e3a

Browse files
committed
initialize repository
0 parents  commit 2178e3a

71 files changed

Lines changed: 10255 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
- uses: bahmutov/npm-install@v1
17+
- run: npm run build-keycloak-theme
18+
19+
check_if_version_upgraded:
20+
name: Check if version upgrade
21+
if: github.event_name == 'push'
22+
runs-on: ubuntu-latest
23+
needs: test
24+
outputs:
25+
from_version: ${{ steps.step1.outputs.from_version }}
26+
to_version: ${{ steps.step1.outputs.to_version }}
27+
is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }}
28+
is_pre_release: ${{steps.step1.outputs.is_pre_release }}
29+
steps:
30+
- uses: garronej/ts-ci@v2.1.5
31+
id: step1
32+
with:
33+
action_name: is_package_json_version_upgraded
34+
branch: ${{ github.head_ref || github.ref }}
35+
36+
create_github_release:
37+
runs-on: ubuntu-latest
38+
needs: check_if_version_upgraded
39+
if: needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true'
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions/setup-node@v4
43+
- uses: bahmutov/npm-install@v1
44+
- run: npm run build-keycloak-theme
45+
- uses: softprops/action-gh-release@v2
46+
with:
47+
name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
48+
tag_name: v${{ needs.check_if_version_upgraded.outputs.to_version }}
49+
target_commitish: ${{ github.head_ref || github.ref }}
50+
generate_release_notes: true
51+
draft: false
52+
prerelease: ${{ needs.check_if_version_upgraded.outputs.is_pre_release == 'true' }}
53+
files: dist_keycloak/keycloak-theme-*.jar
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21+
.grunt
22+
23+
# node-waf configuration
24+
.lock-wscript
25+
26+
# Compiled binary addons (http://nodejs.org/api/addons.html)
27+
build/Release
28+
29+
# Dependency directories
30+
node_modules
31+
jspm_packages
32+
33+
# Optional npm cache directory
34+
.npm
35+
36+
# yarn cache directory
37+
.pnp.*
38+
.yarn/*
39+
!.yarn/patches
40+
!.yarn/plugins
41+
!.yarn/releases
42+
!.yarn/sdks
43+
!.yarn/versions
44+
45+
46+
# Optional REPL history
47+
.node_repl_history
48+
49+
.vscode
50+
51+
.DS_Store
52+
53+
/dist
54+
55+
/dist_keycloak
56+
/build
57+
/storybook-static
58+
59+
# build output of `jsx-email`
60+
/.rendered

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
/dist/
3+
/dist_keycloak/
4+
/public/keycloakify-dev-resources/
5+
/.vscode/
6+
/.yarn_home/

.prettierrc.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"printWidth": 90,
3+
"tabWidth": 4,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": false,
7+
"trailingComma": "none",
8+
"bracketSpacing": true,
9+
"arrowParens": "avoid",
10+
"overrides": [
11+
{
12+
"files": [
13+
"**/login/pages/*.tsx",
14+
"**/account/pages/*.tsx",
15+
"**/login/Template.tsx",
16+
"**/account/Template.tsx",
17+
"**/login/UserProfileFormFields.tsx",
18+
"KcApp.tsx"
19+
],
20+
"options": {
21+
"printWidth": 150
22+
}
23+
}
24+
]
25+
}

.storybook/main.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type { StorybookConfig } from "@storybook/react-vite";
2+
3+
const config: StorybookConfig = {
4+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5+
addons: [],
6+
framework: {
7+
name: "@storybook/react-vite",
8+
options: {}
9+
},
10+
staticDirs: ["../public"],
11+
async viteFinal(config) {
12+
config.define = {
13+
...config.define,
14+
"process.env": "{}",
15+
global: "globalThis"
16+
};
17+
return config;
18+
}
19+
};
20+
export default config;

.storybook/preview-head.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<style>
2+
body.sb-show-main.sb-main-padded {
3+
padding: 0;
4+
}
5+
6+
/* Following styles are just meant to avoid white flash when switching from one story to another */
7+
@keyframes fadeToTransparent {
8+
from {
9+
background-color: #393939;
10+
}
11+
12+
to {
13+
background-color: transparent;
14+
}
15+
}
16+
html {
17+
animation: fadeToTransparent 500ms forwards ease-in;
18+
}
19+
body > .sb-preparing-docs {
20+
visibility: hidden;
21+
}
22+
body > .sb-preparing-story {
23+
visibility: hidden;
24+
}
25+
</style>

.storybook/preview.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import type { Preview } from "@storybook/react-vite";
2+
import "@helpwave/hightide/style/globals.css";
3+
4+
if (typeof window !== "undefined" && typeof process === "undefined") {
5+
(window as any).process = { env: {} };
6+
}
7+
8+
const hideLanguageSwitcherCss = `
9+
.kc-locale,
10+
[id*="kc-locale"],
11+
[class*="kc-locale"],
12+
[id*="locale"],
13+
[class*="locale"],
14+
.pf-c-select,
15+
select[id*="locale"],
16+
select[name*="locale"],
17+
form[action*="locale"],
18+
.kc-dropdown,
19+
[class*="kc-dropdown"] {
20+
display: none !important;
21+
}
22+
`;
23+
24+
const preview: Preview = {
25+
parameters: {
26+
controls: {
27+
matchers: {
28+
color: /(background|color)$/i,
29+
date: /Date$/i
30+
}
31+
}
32+
},
33+
decorators: [
34+
(Story) => {
35+
if (typeof document !== "undefined") {
36+
const styleId = "hide-language-switcher";
37+
if (!document.getElementById(styleId)) {
38+
const style = document.createElement("style");
39+
style.id = styleId;
40+
style.textContent = hideLanguageSwitcherCss;
41+
document.head.appendChild(style);
42+
}
43+
}
44+
return Story();
45+
}
46+
]
47+
};
48+
49+
export default preview;

0 commit comments

Comments
 (0)