-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 chore: Add const like breakpoints & breakpointSubject to the config…
… + platformhelpers (#1146) * Create PR for #1134 * Create PR for #1133 * Create PR for #1126 * ✨ feature: Update Stencil (#1130) * Create PR for #1128 * chore: update stencil --------- Co-authored-by: hirsch88 <hirsch88@users.noreply.github.com> Co-authored-by: Gery Hirschfeld <gerhard.hirschfeld@baloise.ch> * 💥 breaking: remove Deprecated Mode Style (#1139) * Create PR for #1129 * breaking: remove deprecated mode style * chore: fix lint issues * chore: remove deprecated bal-body class * chore: format files --------- Co-authored-by: hirsch88 <hirsch88@users.noreply.github.com> Co-authored-by: Gery Hirschfeld <gerhard.hirschfeld@baloise.ch> * 🔧 chore: update Error Component (#1140) * Create PR for #1131 * chore: improve error component --------- Co-authored-by: hirsch88 <hirsch88@users.noreply.github.com> Co-authored-by: Gery Hirschfeld <gerhard.hirschfeld@baloise.ch> * 🔧 chore: update value accessor (#1141) * Create PR for #1132 * chore: improve value accessors * chore: update value accessors * chore: add missing icon --------- Co-authored-by: hirsch88 <hirsch88@users.noreply.github.com> Co-authored-by: Gery Hirschfeld <gerhard.hirschfeld@baloise.ch> * Create PR for #1126 * breaking: setInvalid is not by default enabled * chore: remove default import to reduce side effects * chore: update default config object * chore: add platform helpers * Create PR for #1126 * 💥 breaking: remove Deprecated Mode Style (#1139) * Create PR for #1129 * breaking: remove deprecated mode style * chore: fix lint issues * chore: remove deprecated bal-body class * chore: format files --------- Co-authored-by: hirsch88 <hirsch88@users.noreply.github.com> Co-authored-by: Gery Hirschfeld <gerhard.hirschfeld@baloise.ch> * 🔧 chore: update value accessor (#1141) * Create PR for #1132 * chore: improve value accessors * chore: update value accessors * chore: add missing icon --------- Co-authored-by: hirsch88 <hirsch88@users.noreply.github.com> Co-authored-by: Gery Hirschfeld <gerhard.hirschfeld@baloise.ch> * chore: format code * chore: fix lint issue --------- Co-authored-by: hirsch88 <hirsch88@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Gery Hirschfeld <gerhard.hirschfeld@baloise.ch>
- Loading branch information
1 parent
6d873e5
commit 9f3b5b8
Showing
21 changed files
with
160 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
packages/components/src/components/bal-popover/bal-popover-content/bal-popover-content.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { initializeBaloiseDesignSystem } from './initialize' | ||
import { initialize } from './initialize' | ||
|
||
export default function () { | ||
initializeBaloiseDesignSystem() | ||
initialize() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import { setPlatformHelpers } from '@stencil/core' | ||
import { balToastController } from './components/bal-toast/bal-toast.controller' | ||
import { balSnackbarController } from './components/bal-snackbar/bal-snackbar.controller' | ||
import { BalConfig, initialize } from './utils/config' | ||
import { BalConfig, BalPlatformConfig, setupConfig } from './utils/config' | ||
import { VERSION } from './utils/constants/version.constant' | ||
import { balBrowser } from './utils/browser' | ||
import { balBreakpoints } from './utils/breakpoints' | ||
|
||
export const initializeBaloiseDesignSystem = (initConfig: BalConfig = {}) => { | ||
if (balBrowser.hasWindow) { | ||
const win = window as any | ||
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {} | ||
export const initialize = (userConfig: BalConfig = {}, platformConfig: BalPlatformConfig = {}, win = {} as any) => { | ||
if (Object.keys(win).length === 0 && balBrowser.hasWindow) { | ||
win = window as any | ||
} | ||
|
||
initialize(initConfig, win) | ||
balBreakpoints.detect() | ||
win.BaloiseDesignSystem = win.BaloiseDesignSystem || {} | ||
|
||
win.BaloiseDesignSystem.toastController = balToastController | ||
win.BaloiseDesignSystem.snackbarController = balSnackbarController | ||
win.BaloiseDesignSystem.initialize = () => initialize(win.BaloiseDesignSystem.config, win) | ||
win.BaloiseDesignSystem.version = VERSION | ||
} | ||
setPlatformHelpers(platformConfig) | ||
setupConfig(userConfig, win) | ||
|
||
win.BaloiseDesignSystem.toastController = balToastController | ||
win.BaloiseDesignSystem.snackbarController = balSnackbarController | ||
win.BaloiseDesignSystem.initialize = () => setupConfig(win.BaloiseDesignSystem.config, win) | ||
win.BaloiseDesignSystem.version = VERSION | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import type { BalConfigState } from './config.types' | ||
import { defaultLoggerConfig } from '../log' | ||
import { | ||
balIconClose, | ||
balIconInfoCircle, | ||
balIconPlus, | ||
balIconMinus, | ||
balIconEdit, | ||
balIconTrash, | ||
balIconNavGoLeft, | ||
balIconNavGoRight, | ||
balIconNavGoDown, | ||
balIconNavGoUp, | ||
balIconCheck, | ||
balIconDate, | ||
balIconDocument, | ||
balIconUpload, | ||
balIconMenuBars, | ||
balIconFacebook, | ||
balIconInstagram, | ||
balIconLinkedin, | ||
balIconTwitter, | ||
balIconX, | ||
balIconXing, | ||
balIconYoutube, | ||
balIconWeb, | ||
balIconCaretDown, | ||
balIconCaretLeft, | ||
balIconCaretRight, | ||
balIconCaretUp, | ||
} from '../constants/icons.constant' | ||
|
||
export const defaultIcons = { | ||
balIconClose, | ||
balIconInfoCircle, | ||
balIconPlus, | ||
balIconMinus, | ||
balIconEdit, | ||
balIconTrash, | ||
balIconNavGoLeft, | ||
balIconNavGoRight, | ||
balIconNavGoDown, | ||
balIconNavGoUp, | ||
balIconCheck, | ||
balIconDate, | ||
balIconDocument, | ||
balIconUpload, | ||
balIconMenuBars, | ||
balIconFacebook, | ||
balIconInstagram, | ||
balIconLinkedin, | ||
balIconTwitter, | ||
balIconX, | ||
balIconXing, | ||
balIconYoutube, | ||
balIconWeb, | ||
balIconCaretDown, | ||
balIconCaretLeft, | ||
balIconCaretRight, | ||
balIconCaretUp, | ||
} | ||
|
||
export const defaultConfig: BalConfigState = { | ||
region: 'CH', | ||
language: 'de', | ||
allowedLanguages: ['de', 'fr', 'it', 'en'], | ||
icons: defaultIcons, | ||
fallbackLanguage: 'de', | ||
logger: defaultLoggerConfig, | ||
animated: true, | ||
} | ||
|
||
export const defaultLocale = `${defaultConfig.language}-${defaultConfig.region}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.