@vonq/hapi-elements-types 1.3.0 → 1.5.0
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.
- package/enums.ts +41 -0
- package/package.json +6 -7
- package/src/_window/api.types.ts +59 -0
- package/src/_window/auth.types.ts +11 -0
- package/src/_window/config.types.ts +30 -0
- package/src/_window/events.types.ts +157 -0
- package/src/_window/index.ts +16 -0
- package/src/_window/instances.types.ts +18 -0
- package/src/_window/qa.types.ts +28 -0
- package/src/_window/routing.types.ts +21 -0
- package/src/_window/sdk.types.ts +147 -0
- package/src/_window/service.types.ts +67 -0
- package/src/_window/state.types.ts +112 -0
- package/src/_window/ui.types.ts +13 -0
- package/src/_window/utils.types.ts +34 -0
- package/src/_window/validation.types.ts +43 -0
- package/src/_window/window.ts +56 -0
- package/src/alert/enums.ts +22 -0
- package/src/alert/functions.types.ts +13 -0
- package/src/alert/index.ts +9 -0
- package/src/alert/service.types.ts +15 -0
- package/src/alert/state.initial.ts +16 -0
- package/src/alert/state.types.ts +27 -0
- package/src/alert/state.validations.ts +11 -0
- package/src/alert/types.ts +63 -0
- package/src/ats/api.types.ts +16 -0
- package/src/ats/functions.types.ts +7 -0
- package/src/ats/index.ts +9 -0
- package/src/ats/service.types.ts +17 -0
- package/src/ats/state.initial.ts +5 -0
- package/src/ats/state.types.ts +5 -0
- package/src/ats/state.validations.ts +6 -0
- package/src/ats/types.ts +19 -0
- package/src/basket/consts.ts +1 -0
- package/src/basket/functions.types.ts +40 -0
- package/src/basket/index.ts +12 -0
- package/src/basket/service.types.ts +32 -0
- package/src/basket/state.initial.ts +11 -0
- package/src/basket/state.types.ts +34 -0
- package/src/basket/state.validations.ts +12 -0
- package/src/basket/types.ts +4 -0
- package/src/basket/utils.ts +79 -0
- package/src/basket/utils.types.ts +10 -0
- package/src/basket/validations.types.ts +25 -0
- package/src/campaign/api.types.ts +45 -0
- package/src/campaign/consts.ts +1 -0
- package/src/campaign/enums.ts +17 -0
- package/src/campaign/functions.types.ts +90 -0
- package/src/campaign/index.ts +15 -0
- package/src/campaign/qa.types.ts +12 -0
- package/src/campaign/service.types.ts +48 -0
- package/src/campaign/state.initial.ts +84 -0
- package/src/campaign/state.types.ts +55 -0
- package/src/campaign/state.validations.ts +16 -0
- package/src/campaign/types.ts +237 -0
- package/src/campaign/utils.ts +53 -0
- package/src/campaign/utils.types.ts +59 -0
- package/src/campaign/validations.types.ts +215 -0
- package/src/common/LocalStorage.ts +123 -0
- package/src/common/browser.ts +2 -0
- package/src/common/color.ts +9 -0
- package/src/common/events/EventCommand/enums.ts +49 -0
- package/src/common/events/EventCommand/index.ts +4 -0
- package/src/common/events/EventCommand/types.ts +18 -0
- package/src/common/events/index.ts +4 -0
- package/src/common/events/types.ts +52 -0
- package/src/common/immutable.ts +28 -0
- package/src/common/index.ts +22 -0
- package/src/common/instances/Instance.ts +13 -0
- package/src/common/instances/consts.ts +1 -0
- package/src/common/instances/index.ts +4 -0
- package/src/common/json.ts +25 -0
- package/src/common/logger/Logger.ts +70 -0
- package/src/common/logger/enums.ts +12 -0
- package/src/common/logger/index.ts +5 -0
- package/src/common/logger/types.ts +7 -0
- package/src/common/logger-datadog/LoggerDatadog.ts +42 -0
- package/src/common/logger-datadog/index.ts +3 -0
- package/src/common/misc.ts +114 -0
- package/src/common/promise.ts +161 -0
- package/src/common/proxy.ts +77 -0
- package/src/common/qa.types.ts +9 -0
- package/src/common/regExTest.ts +12 -0
- package/src/common/tree.ts +148 -0
- package/src/common/types.ts +110 -0
- package/src/common/utm.ts +19 -0
- package/src/common/validations.types.ts +89 -0
- package/src/common/validators.ts +21 -0
- package/src/common/webComponents.ts +26 -0
- package/src/config/functions.types.ts +23 -0
- package/src/config/index.ts +5 -0
- package/src/config/state.initial.ts +11 -0
- package/src/config/state.types.ts +15 -0
- package/src/consts.ts +980 -0
- package/src/contract/api.types.ts +47 -0
- package/src/contract/consts.ts +1 -0
- package/src/contract/functions.types.ts +112 -0
- package/src/contract/index.ts +14 -0
- package/src/contract/qa.types.ts +12 -0
- package/src/contract/service.types.ts +54 -0
- package/src/contract/state.initial.ts +39 -0
- package/src/contract/state.types.ts +74 -0
- package/src/contract/state.validations.ts +21 -0
- package/src/contract/types.ts +145 -0
- package/src/contract/utils.ts +36 -0
- package/src/contract/utils.types.ts +11 -0
- package/src/contract/validations.types.ts +104 -0
- package/src/debugging/functions.types.ts +34 -0
- package/src/debugging/index.ts +6 -0
- package/src/debugging/state.initial.ts +10 -0
- package/src/debugging/state.types.ts +18 -0
- package/src/debugging/state.validations.ts +10 -0
- package/src/index.ts +22 -0
- package/src/language/consts.ts +6 -0
- package/src/language/en.ts +530 -0
- package/src/language/functions.types.ts +29 -0
- package/src/language/index.ts +11 -0
- package/src/language/qa.types.ts +19 -0
- package/src/language/state.initial.ts +13 -0
- package/src/language/state.types.ts +25 -0
- package/src/language/state.validations.ts +10 -0
- package/src/language/utils.ts +17 -0
- package/src/language/validations.types.ts +13 -0
- package/src/modal/consts.ts +6 -0
- package/src/modal/enums.ts +14 -0
- package/src/modal/functions.types.ts +22 -0
- package/src/modal/index.ts +11 -0
- package/src/modal/service.types.ts +32 -0
- package/src/modal/state.initial.ts +9 -0
- package/src/modal/state.types.ts +8 -0
- package/src/modal/state.validations.ts +6 -0
- package/src/modal/store.types.ts +5 -0
- package/src/modal/types.ts +44 -0
- package/src/orderJourney/consts.ts +289 -0
- package/src/orderJourney/enums.ts +25 -0
- package/src/orderJourney/functions.types.ts +140 -0
- package/src/orderJourney/index.ts +13 -0
- package/src/orderJourney/qa.types.ts +16 -0
- package/src/orderJourney/state.initial.ts +401 -0
- package/src/orderJourney/state.types.ts +99 -0
- package/src/orderJourney/state.validations.ts +78 -0
- package/src/orderJourney/types.ts +31 -0
- package/src/orderJourney/utils.ts +7 -0
- package/src/orderJourney/utils.types.ts +11 -0
- package/src/orderJourney/validations.types.ts +34 -0
- package/src/product/api.types.ts +62 -0
- package/src/product/consts.ts +1 -0
- package/src/product/enums.ts +11 -0
- package/src/product/functions.types.ts +156 -0
- package/src/product/index.ts +14 -0
- package/src/product/qa.types.ts +11 -0
- package/src/product/service.types.ts +68 -0
- package/src/product/state.initial.ts +28 -0
- package/src/product/state.types.ts +93 -0
- package/src/product/state.validations.ts +25 -0
- package/src/product/types.ts +161 -0
- package/src/product/utils.types.ts +22 -0
- package/src/product/validations.types.ts +189 -0
- package/src/routing/functions.types.ts +48 -0
- package/src/routing/index.ts +5 -0
- package/src/routing/state.initial.ts +10 -0
- package/src/routing/state.types.ts +30 -0
- package/src/theming/consts.ts +7727 -0
- package/src/theming/functions.types.ts +13 -0
- package/src/theming/index.ts +11 -0
- package/src/theming/qa.types.ts +11 -0
- package/src/theming/state.initial.ts +16 -0
- package/src/theming/state.types.ts +6 -0
- package/src/theming/state.validations.ts +8 -0
- package/src/theming/types.ts +123 -0
- package/src/theming/utils.ts +581 -0
- package/src/theming/validations.types.ts +62 -0
- package/src/types.ts +229 -0
- package/src/ui/index.ts +3 -0
- package/src/ui/service.types.ts +26 -0
- package/src/utils.ts +3 -0
- package/src/wallet/api.types.ts +33 -0
- package/src/wallet/consts.ts +3 -0
- package/src/wallet/functions.types.ts +58 -0
- package/src/wallet/index.ts +11 -0
- package/src/wallet/service.types.ts +26 -0
- package/src/wallet/state.initial.ts +18 -0
- package/src/wallet/state.types.ts +58 -0
- package/src/wallet/state.validations.ts +18 -0
- package/src/wallet/types.ts +65 -0
- package/src/wallet/validations.types.ts +18 -0
- package/tsconfig.json +41 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
import { HapiFontOptions, HapiTheme, HapiThemingThemeProvider } from "./types"
|
2
|
+
|
3
|
+
export type ThemeStoreSetThemeProviderHandler = (
|
4
|
+
provider: HapiThemingThemeProvider,
|
5
|
+
) => void
|
6
|
+
|
7
|
+
export type ThemeStoreSetThemeHandler = (theme: HapiTheme) => void
|
8
|
+
export type ThemeStoreSetFontOptionsHandler = (options: HapiFontOptions) => void
|
9
|
+
|
10
|
+
export type ThemeStoreFunctions = {
|
11
|
+
setTheme: ThemeStoreSetThemeHandler
|
12
|
+
setFontOptions: ThemeStoreSetFontOptionsHandler
|
13
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// created from 'create-ts-index'
|
2
|
+
|
3
|
+
export * from './consts';
|
4
|
+
export * from './functions.types';
|
5
|
+
export * from './qa.types';
|
6
|
+
export * from './state.initial';
|
7
|
+
export * from './state.types';
|
8
|
+
export * from './state.validations';
|
9
|
+
export * from './types';
|
10
|
+
export * from './utils';
|
11
|
+
export * from './validations.types';
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { HapiFontOptions, HapiTheme } from "./types"
|
2
|
+
import { ModuleWithConstructorArgs } from "../types"
|
3
|
+
import { WindowHapiQA } from "../_window/qa.types"
|
4
|
+
|
5
|
+
export type WindowHapiQATheming = ModuleWithConstructorArgs<
|
6
|
+
{
|
7
|
+
setTheme: (updatedTheme: Partial<HapiTheme>) => HapiTheme
|
8
|
+
setFontOptions: (fontOptions: HapiFontOptions) => HapiFontOptions
|
9
|
+
},
|
10
|
+
{ readonly qa: WindowHapiQA }
|
11
|
+
>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { ThemeStoreState } from "./state.types"
|
2
|
+
import { THEME_LIGHT } from "./consts"
|
3
|
+
|
4
|
+
export const initialThemeStoreState: ThemeStoreState = {
|
5
|
+
fontOptions: {
|
6
|
+
fontFamily: "Poppins, Roboto, sans-serif",
|
7
|
+
fontFaces: [
|
8
|
+
{
|
9
|
+
src: "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700|Roboto:300,400,500,600,700",
|
10
|
+
rel: "stylesheet",
|
11
|
+
fontFamily: "Poppins",
|
12
|
+
},
|
13
|
+
],
|
14
|
+
},
|
15
|
+
theme: THEME_LIGHT,
|
16
|
+
}
|
@@ -0,0 +1,123 @@
|
|
1
|
+
import { Theming } from "theming"
|
2
|
+
|
3
|
+
export type ThemeGlobalStyles = {
|
4
|
+
borderRadius: string
|
5
|
+
|
6
|
+
primaryBackgroundColor: string
|
7
|
+
primaryTextColor: string
|
8
|
+
|
9
|
+
secondaryBackgroundColor: string
|
10
|
+
secondaryTextColor: string
|
11
|
+
|
12
|
+
successBackgroundColor: string
|
13
|
+
successTextColor: string
|
14
|
+
successSecondaryBackgroundColor: string
|
15
|
+
|
16
|
+
dangerBackgroundColor: string
|
17
|
+
dangerTextColor: string
|
18
|
+
dangerSecondaryBackgroundColor: string
|
19
|
+
|
20
|
+
warningBackgroundColor: string
|
21
|
+
warningTextColor: string
|
22
|
+
warningSecondaryBackgroundColor: string
|
23
|
+
|
24
|
+
infoBackgroundColor: string
|
25
|
+
infoTextColor: string
|
26
|
+
infoSecondaryBackgroundColor: string
|
27
|
+
|
28
|
+
fadedBackgroundColor: string
|
29
|
+
fadedTextColor: string
|
30
|
+
|
31
|
+
accentBackgroundColor: string
|
32
|
+
accentTextColor: string
|
33
|
+
}
|
34
|
+
|
35
|
+
export type HapiThemingThemeProvider = Theming<HapiTheme>["ThemeProvider"]
|
36
|
+
export type HapiThemingUseTheme = Theming<HapiTheme>["useTheme"]
|
37
|
+
|
38
|
+
export type HapiThemeRule =
|
39
|
+
| "global"
|
40
|
+
| "link"
|
41
|
+
| "modal"
|
42
|
+
| "modalBackdrop"
|
43
|
+
| "loadingSpinner"
|
44
|
+
| "userJourneyBar"
|
45
|
+
| "card"
|
46
|
+
| "tabHeaders"
|
47
|
+
| "tabHeader"
|
48
|
+
| "tabPanels"
|
49
|
+
| "tabPanel"
|
50
|
+
| "buttonBase"
|
51
|
+
| "buttonPrimary"
|
52
|
+
| "buttonSecondary"
|
53
|
+
| "buttonDanger"
|
54
|
+
| "buttonDangerSecondary"
|
55
|
+
| "buttonInfo"
|
56
|
+
| "buttonInfoSecondary"
|
57
|
+
| "buttonSuccess"
|
58
|
+
| "buttonSuccessSecondary"
|
59
|
+
| "buttonWarning"
|
60
|
+
| "buttonWarningSecondary"
|
61
|
+
| "buttonFaded"
|
62
|
+
| "buttonAccent"
|
63
|
+
| "badgeBase"
|
64
|
+
| "formFieldBase"
|
65
|
+
| "inputSelectBase"
|
66
|
+
| "input"
|
67
|
+
| "inputRange"
|
68
|
+
| "inputHtml"
|
69
|
+
| "inputTags"
|
70
|
+
| "textarea"
|
71
|
+
| "select"
|
72
|
+
| "checkbox"
|
73
|
+
| "radio"
|
74
|
+
| "accordionButton"
|
75
|
+
| "accordionArrow"
|
76
|
+
| "accordionPanel"
|
77
|
+
| "accordionTitle"
|
78
|
+
| "headingBase"
|
79
|
+
| "headingOne"
|
80
|
+
| "headingTwo"
|
81
|
+
| "headingThree"
|
82
|
+
| "headingFour"
|
83
|
+
| "headingFive"
|
84
|
+
| "headingSix"
|
85
|
+
| "alert"
|
86
|
+
|
87
|
+
export type HapiThemeComponentVariant =
|
88
|
+
| "primary"
|
89
|
+
| "secondary"
|
90
|
+
| "danger"
|
91
|
+
| "dangerSecondary"
|
92
|
+
| "warning"
|
93
|
+
| "warningSecondary"
|
94
|
+
| "info"
|
95
|
+
| "infoSecondary"
|
96
|
+
| "success"
|
97
|
+
| "successSecondary"
|
98
|
+
| "faded"
|
99
|
+
| "accent"
|
100
|
+
|
101
|
+
export type CSSPropertiesInJS = {
|
102
|
+
[key: string]: string | undefined | any[] | (() => any) | any
|
103
|
+
}
|
104
|
+
|
105
|
+
export type HapiTheme = {
|
106
|
+
[key in HapiThemeRule]: key extends "global"
|
107
|
+
? Partial<ThemeGlobalStyles>
|
108
|
+
: CSSPropertiesInJS
|
109
|
+
}
|
110
|
+
|
111
|
+
export type HapiFontOptions = {
|
112
|
+
fontFaces?: ThemeFontFaceOption[]
|
113
|
+
fontFamily: string
|
114
|
+
}
|
115
|
+
|
116
|
+
export type ThemeFontFaceOption = {
|
117
|
+
fontFamily: string
|
118
|
+
src: string
|
119
|
+
fontWeight?: string
|
120
|
+
fontStyle?: string
|
121
|
+
fontSize?: string
|
122
|
+
rel?: "stylesheet"
|
123
|
+
}
|