@chayns-components/core 5.0.0-beta.990 → 5.0.0-beta.991
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/lib/cjs/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/cjs/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
- package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js +14 -20
- package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.styles.js +5 -2
- package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.styles.js.map +1 -1
- package/lib/cjs/components/combobox/ComboBox.js.map +1 -1
- package/lib/cjs/components/combobox/ComboBox.styles.js.map +1 -1
- package/lib/cjs/components/page-provider/PageProvider.js +0 -2
- package/lib/cjs/components/page-provider/PageProvider.js.map +1 -1
- package/lib/cjs/components/scroll-view/ScrollView.js.map +1 -1
- package/lib/cjs/components/scroll-view/ScrollView.styles.js.map +1 -1
- package/lib/cjs/components/search-box/SearchBox.js.map +1 -1
- package/lib/cjs/components/search-box/SearchBox.styles.js.map +1 -1
- package/lib/cjs/components/search-box/search-box-body/SearchBoxBody.js.map +1 -1
- package/lib/cjs/components/search-box/search-box-body/SearchBoxBody.styles.js.map +1 -1
- package/lib/cjs/components/text-area/TextArea.js.map +1 -1
- package/lib/cjs/components/text-area/TextArea.styles.js.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/types/chayns.js +0 -11
- package/lib/cjs/types/chayns.js.map +1 -1
- package/lib/cjs/types/colorSchemeProvider.js.map +1 -1
- package/lib/cjs/types/signature.js.map +1 -1
- package/lib/cjs/utils/font.js +1 -5
- package/lib/cjs/utils/font.js.map +1 -1
- package/lib/esm/components/accordion/accordion-body/AccordionBody.js.map +1 -1
- package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
- package/lib/esm/components/accordion/accordion-content/AccordionContent.js.map +1 -1
- package/lib/esm/components/accordion/accordion-content/AccordionContent.styles.js.map +1 -1
- package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js +14 -19
- package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
- package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.styles.js +10 -4
- package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.styles.js.map +1 -1
- package/lib/esm/components/combobox/ComboBox.js.map +1 -1
- package/lib/esm/components/combobox/ComboBox.styles.js.map +1 -1
- package/lib/esm/components/page-provider/PageProvider.js +0 -2
- package/lib/esm/components/page-provider/PageProvider.js.map +1 -1
- package/lib/esm/components/scroll-view/ScrollView.js.map +1 -1
- package/lib/esm/components/scroll-view/ScrollView.styles.js.map +1 -1
- package/lib/esm/components/search-box/SearchBox.js.map +1 -1
- package/lib/esm/components/search-box/SearchBox.styles.js.map +1 -1
- package/lib/esm/components/search-box/search-box-body/SearchBoxBody.js.map +1 -1
- package/lib/esm/components/search-box/search-box-body/SearchBoxBody.styles.js.map +1 -1
- package/lib/esm/components/text-area/TextArea.js.map +1 -1
- package/lib/esm/components/text-area/TextArea.styles.js.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/types/chayns.js +1 -6
- package/lib/esm/types/chayns.js.map +1 -1
- package/lib/esm/types/colorSchemeProvider.js.map +1 -1
- package/lib/esm/types/signature.js.map +1 -1
- package/lib/esm/utils/font.js +1 -5
- package/lib/esm/utils/font.js.map +1 -1
- package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +2 -2
- package/lib/types/components/accordion/accordion-content/AccordionContent.styles.d.ts +2 -2
- package/lib/types/components/color-scheme-provider/ColorSchemeProvider.d.ts +1 -9
- package/lib/types/components/color-scheme-provider/ColorSchemeProvider.styles.d.ts +3 -1
- package/lib/types/components/combobox/ComboBox.styles.d.ts +2 -2
- package/lib/types/components/scroll-view/ScrollView.styles.d.ts +2 -2
- package/lib/types/components/search-box/SearchBox.styles.d.ts +2 -2
- package/lib/types/components/search-box/search-box-body/SearchBoxBody.d.ts +2 -2
- package/lib/types/components/search-box/search-box-body/SearchBoxBody.styles.d.ts +2 -2
- package/lib/types/components/text-area/TextArea.styles.d.ts +2 -2
- package/lib/types/index.d.ts +1 -0
- package/lib/types/types/chayns.d.ts +1 -122
- package/lib/types/types/colorSchemeProvider.d.ts +23 -19
- package/lib/types/types/signature.d.ts +0 -5
- package/package.json +5 -5
- package/lib/cjs/api/theme/get.js +0 -32
- package/lib/cjs/api/theme/get.js.map +0 -1
- package/lib/esm/api/theme/get.js +0 -24
- package/lib/esm/api/theme/get.js.map +0 -1
- package/lib/types/api/theme/get.d.ts +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"font.js","names":["IconStyle","convertIconStyle","iconStyle","SOLID","DUOTONE","SHARP","LIGHT","getFontSize","element","document","createElement","style","position","opacity","textContent","body","appendChild","fontSize","window","getComputedStyle","removeChild","replace","hexToRgb","hex","r","g","b","a","result","exec","parseInt","undefined","getHeadlineColorSelector","data","themeResult","headlineMap","h1","h2","h3","h4","h5","h6","p","footer","forEach","_ref","selector","color","backgroundColor","
|
|
1
|
+
{"version":3,"file":"font.js","names":["IconStyle","convertIconStyle","iconStyle","SOLID","DUOTONE","SHARP","LIGHT","getFontSize","element","document","createElement","style","position","opacity","textContent","body","appendChild","fontSize","window","getComputedStyle","removeChild","replace","hexToRgb","hex","r","g","b","a","result","exec","parseInt","undefined","getHeadlineColorSelector","data","themeResult","headlineMap","h1","h2","h3","h4","h5","h6","p","footer","forEach","_ref","selector","color","backgroundColor","selectors","split","tag","length","trim","path","rgb"],"sources":["../../../src/utils/font.ts"],"sourcesContent":["import { IconStyle, type ParagraphFormat } from '../types/colorSchemeProvider';\n\nexport const convertIconStyle = (iconStyle: IconStyle) => {\n switch (iconStyle) {\n case IconStyle.SOLID:\n return 'fa-solid';\n case IconStyle.DUOTONE:\n return 'fa-duotone';\n case IconStyle.SHARP:\n return 'fa-sharp';\n case IconStyle.LIGHT:\n return 'fa-light';\n default:\n return 'fa-regular';\n }\n};\n\nexport const getFontSize = () => {\n const element = document.createElement('p');\n\n element.style.position = 'absolute';\n element.style.opacity = '0';\n\n element.textContent = 'Ich war hier';\n\n document.body.appendChild(element);\n\n const { fontSize } = window.getComputedStyle(element);\n\n document.body.removeChild(element);\n\n return fontSize.replace('px', '');\n};\n\nconst hexToRgb = (hex: string) => {\n let r: number;\n let g: number;\n let b: number;\n let a: number;\n\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})?$/i.exec(hex);\n\n if (result) {\n r = parseInt(result[1] ?? '0', 16);\n g = parseInt(result[2] ?? '0', 16);\n b = parseInt(result[3] ?? '0', 16);\n a = result[4] ? parseInt(result[4], 16) / 100 : 1;\n\n return { r, g, b, a };\n }\n\n return undefined;\n};\n\nexport const getHeadlineColorSelector = (data: ParagraphFormat[]) => {\n const themeResult: { [key: string]: string } = {};\n const headlineMap: { [key: string]: string } = {\n h1: 'headline-1',\n h2: 'headline-2',\n h3: 'headline-3',\n h4: 'headline-4',\n h5: 'headline-5',\n h6: 'headline-6',\n p: 'text',\n footer: 'footer',\n '.button': 'button',\n };\n\n data.forEach(({ selector, color, backgroundColor }) => {\n const selectors = selector.split(',');\n\n const tag = selectors[selectors.length - 1]?.trim();\n\n const path = headlineMap[tag ?? ''];\n\n if (!path) {\n return;\n }\n\n if (path === 'button' && backgroundColor) {\n themeResult[`${path}BackgroundColor`] = backgroundColor;\n\n if (color) {\n themeResult[`${path}Color`] = color;\n }\n\n return;\n }\n\n if (!color) {\n return;\n }\n\n themeResult[path] = color;\n\n const rgb = hexToRgb(color);\n\n if (!rgb) {\n return;\n }\n\n const { r, g, b } = rgb;\n\n themeResult[`${path}-rgb`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AAe;MAEvD,IAAID,KAAK,EAAE;QACPb,WAAW,CAAC,GAAGoB,IAAI,OAAO,CAAC,GAAGP,KAAK;MACvC;MAEA;IACJ;IAEA,IAAI,CAACA,KAAK,EAAE;MACR;IACJ;IAEAb,WAAW,CAACoB,IAAI,CAAC,GAAGP,KAAK;IAEzB,MAAMQ,GAAG,GAAGjC,QAAQ,CAACyB,KAAK,CAAC;IAE3B,IAAI,CAACQ,GAAG,EAAE;MACN;IACJ;IAEA,MAAM;MAAE/B,CAAC;MAAEC,CAAC;MAAEC;IAAE,CAAC,GAAG6B,GAAG;IAEvBrB,WAAW,CAAC,GAAGoB,IAAI,MAAM,CAAC,GAAG,GAAG9B,CAAC,KAAKC,CAAC,KAAKC,CAAC,EAAE;EACnD,CAAC,CAAC;EAEF,OAAO;IAAEQ;EAAY,CAAC;AAC1B,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BrowserName } from '../../../types/chayns';
|
|
2
2
|
import type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';
|
|
3
3
|
type StyledMotionAccordionBodyProps = WithTheme<{
|
|
4
4
|
$maxHeight?: number;
|
|
5
|
-
$browser:
|
|
5
|
+
$browser: BrowserName;
|
|
6
6
|
}>;
|
|
7
7
|
export declare const StyledMotionAccordionBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
|
|
8
8
|
slot?: string | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BrowserName } from '../../../types/chayns';
|
|
2
2
|
import type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';
|
|
3
3
|
type StyledAccordionContentProps = WithTheme<{
|
|
4
4
|
$isWrapped?: boolean;
|
|
5
5
|
$maxHeight?: number;
|
|
6
|
-
$browser:
|
|
6
|
+
$browser: BrowserName;
|
|
7
7
|
$shouldPreventBottomSpace: boolean;
|
|
8
8
|
}>;
|
|
9
9
|
export declare const StyledAccordionContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledAccordionContentProps>> & string;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
+
import { ColorMode } from 'chayns-api';
|
|
1
2
|
import React, { FC, ReactNode } from 'react';
|
|
2
3
|
import type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';
|
|
3
|
-
declare enum ColorMode {
|
|
4
|
-
Classic = 0,
|
|
5
|
-
Dark = 1,
|
|
6
|
-
Light = 2
|
|
7
|
-
}
|
|
8
4
|
export type ColorSchemeProviderProps = {
|
|
9
5
|
/**
|
|
10
6
|
* The content of the application or the components for which the styles should be set
|
|
@@ -40,10 +36,6 @@ export type ColorSchemeProviderProps = {
|
|
|
40
36
|
* The secondary hex color to be used for the children
|
|
41
37
|
*/
|
|
42
38
|
secondaryColor?: string;
|
|
43
|
-
/**
|
|
44
|
-
* The site id of the page for which the design settings should be fetched
|
|
45
|
-
*/
|
|
46
|
-
siteId?: string;
|
|
47
39
|
/**
|
|
48
40
|
* Additional styles set on the root element
|
|
49
41
|
*/
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export declare const StyledColorSchemeProvider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
1
|
+
export declare const StyledColorSchemeProvider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
+
theme: import("./ColorSchemeProvider").Theme;
|
|
3
|
+
}>> & string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Browser } from 'detect-browser';
|
|
2
1
|
import type { CSSProperties } from 'react';
|
|
2
|
+
import { BrowserName } from '../../types/chayns';
|
|
3
3
|
import { ComboBoxDirection } from '../../types/comboBox';
|
|
4
4
|
import type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';
|
|
5
5
|
import type { ComboBoxProps } from './ComboBox';
|
|
@@ -36,7 +36,7 @@ type StyledComboBoxBodyProps = WithTheme<{
|
|
|
36
36
|
$overflowY: CSSProperties['overflowY'];
|
|
37
37
|
$maxHeight: CSSProperties['maxHeight'];
|
|
38
38
|
$direction: ComboBoxDirection;
|
|
39
|
-
$browser:
|
|
39
|
+
$browser: BrowserName;
|
|
40
40
|
$minWidth: number;
|
|
41
41
|
$shouldUseCurrentItemWidth: boolean;
|
|
42
42
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Browser } from 'detect-browser';
|
|
2
1
|
import type { CSSProperties } from 'react';
|
|
2
|
+
import { BrowserName } from '../../types/chayns';
|
|
3
3
|
import type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';
|
|
4
4
|
type StyledScrollViewProps = WithTheme<{
|
|
5
5
|
$maxHeight?: CSSProperties['height'] | null;
|
|
@@ -8,7 +8,7 @@ type StyledScrollViewProps = WithTheme<{
|
|
|
8
8
|
$width?: CSSProperties['width'];
|
|
9
9
|
$overflowX: 'scroll' | 'auto';
|
|
10
10
|
$overflowY: 'scroll' | 'auto';
|
|
11
|
-
$browser:
|
|
11
|
+
$browser: BrowserName;
|
|
12
12
|
}>;
|
|
13
13
|
export declare const StyledScrollView: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledScrollViewProps>> & string;
|
|
14
14
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BrowserName } from '../../types/chayns';
|
|
2
2
|
import type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';
|
|
3
3
|
export declare const StyledSearchBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
4
|
type StyledMotionSearchBoxBodyProps = WithTheme<{
|
|
5
5
|
$height: number;
|
|
6
6
|
$width: number;
|
|
7
|
-
$browser:
|
|
7
|
+
$browser: BrowserName;
|
|
8
8
|
}>;
|
|
9
9
|
export declare const StyledMotionSearchBoxBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<{
|
|
10
10
|
slot?: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Browser } from 'detect-browser';
|
|
2
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { BrowserName } from '../../../types/chayns';
|
|
3
3
|
import type { IFilterButtonItem } from '../../../types/filterButtons';
|
|
4
4
|
export type SearchBoxBodyProps = {
|
|
5
5
|
children: ReactNode;
|
|
@@ -7,7 +7,7 @@ export type SearchBoxBodyProps = {
|
|
|
7
7
|
selectedGroups?: string[];
|
|
8
8
|
height: number;
|
|
9
9
|
width: number;
|
|
10
|
-
browser:
|
|
10
|
+
browser: BrowserName;
|
|
11
11
|
onGroupSelect?: (keys: string[]) => void;
|
|
12
12
|
coordinates: {
|
|
13
13
|
x: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BrowserName } from '../../../types/chayns';
|
|
2
2
|
import type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';
|
|
3
3
|
type StyledMotionSearchBoxBodyProps = WithTheme<{
|
|
4
4
|
$width: number;
|
|
@@ -278,7 +278,7 @@ export declare const StyledSearchBoxBodyHeadGroupName: import("styled-components
|
|
|
278
278
|
type StyledSearchBoxBodyContentProps = WithTheme<{
|
|
279
279
|
$height: number;
|
|
280
280
|
$headHeight: number;
|
|
281
|
-
$browser:
|
|
281
|
+
$browser: BrowserName;
|
|
282
282
|
}>;
|
|
283
283
|
export declare const StyledSearchBoxBodyContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledSearchBoxBodyContentProps>> & string;
|
|
284
284
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Browser } from 'detect-browser';
|
|
2
1
|
import type { CSSProperties } from 'react';
|
|
2
|
+
import { BrowserName } from '../../types/chayns';
|
|
3
3
|
import type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';
|
|
4
4
|
import type { TextAreaProps } from './TextArea';
|
|
5
5
|
type StyledTextAreaProps = WithTheme<{
|
|
@@ -13,7 +13,7 @@ type StyledTextAreaContentWrapperProps = WithTheme<{
|
|
|
13
13
|
export declare const StyledTextAreaContentWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledTextAreaContentWrapperProps>> & string;
|
|
14
14
|
export declare const StyledTextAreaContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
15
15
|
type StyledTextAreaInputProps = WithTheme<{
|
|
16
|
-
$browser:
|
|
16
|
+
$browser: BrowserName;
|
|
17
17
|
$isInvalid: TextAreaProps['isInvalid'];
|
|
18
18
|
$isOverflowing: boolean;
|
|
19
19
|
$maxHeight: CSSProperties['maxHeight'];
|
package/lib/types/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export { default as Tooltip } from './components/tooltip/Tooltip';
|
|
|
51
51
|
export { default as Truncation } from './components/truncation/Truncation';
|
|
52
52
|
export { MentionFinderPopupAlignment } from './constants/mentionFinder';
|
|
53
53
|
export { useElementSize } from './hooks/useElementSize';
|
|
54
|
+
export type { BrowserName } from './types/chayns';
|
|
54
55
|
export { ComboBoxDirection } from './types/comboBox';
|
|
55
56
|
export { ContentCardType } from './types/contentCard';
|
|
56
57
|
export { ContextMenuAlignment } from './types/contextMenu';
|
|
@@ -1,122 +1 @@
|
|
|
1
|
-
|
|
2
|
-
let chayns: Chayns;
|
|
3
|
-
}
|
|
4
|
-
export interface Chayns {
|
|
5
|
-
dialog: Dialog;
|
|
6
|
-
env: Env;
|
|
7
|
-
openImage(urls: string | string[], start?: number): Promise<undefined>;
|
|
8
|
-
openVideo(url: string): Promise<void>;
|
|
9
|
-
register(config: object): any;
|
|
10
|
-
getWindowMetrics(): Promise<WindowMetrics>;
|
|
11
|
-
addDesignSettingsChangeListener(callback: () => any): Promise<any>;
|
|
12
|
-
removeDesignSettingsChangeListener(callback: () => any): Promise<any>;
|
|
13
|
-
}
|
|
14
|
-
export interface WindowMetrics {
|
|
15
|
-
bottomBarHeight: number;
|
|
16
|
-
coverHeight: 0;
|
|
17
|
-
frameX: number;
|
|
18
|
-
frameY: number;
|
|
19
|
-
height: number;
|
|
20
|
-
menuHeight: number;
|
|
21
|
-
offsetTop: number;
|
|
22
|
-
pageYOffset: number;
|
|
23
|
-
scrollTop: number;
|
|
24
|
-
windowHeight: number;
|
|
25
|
-
windowWidth: number;
|
|
26
|
-
}
|
|
27
|
-
export interface Dialog {
|
|
28
|
-
select(config: {
|
|
29
|
-
title?: string;
|
|
30
|
-
message?: string;
|
|
31
|
-
list: Array<SelectDialogItem>;
|
|
32
|
-
multiselect?: boolean;
|
|
33
|
-
type?: SelectType;
|
|
34
|
-
preventCloseOnClick?: boolean;
|
|
35
|
-
buttons?: DialogButton[];
|
|
36
|
-
selectAllButton?: string;
|
|
37
|
-
}): Promise<SelectDialogResult>;
|
|
38
|
-
alert(headline: string, text: string): Promise<ButtonType>;
|
|
39
|
-
iFrame(config: {
|
|
40
|
-
url: string;
|
|
41
|
-
input?: object;
|
|
42
|
-
title?: string;
|
|
43
|
-
message?: string;
|
|
44
|
-
buttons?: DialogButton[];
|
|
45
|
-
seamless?: boolean;
|
|
46
|
-
transparent?: boolean;
|
|
47
|
-
waitCursor?: boolean;
|
|
48
|
-
maxHeight?: string;
|
|
49
|
-
width?: number;
|
|
50
|
-
customTransitionTimeout?: number;
|
|
51
|
-
}): Promise<any>;
|
|
52
|
-
signature(config: {
|
|
53
|
-
buttons?: DialogButton[];
|
|
54
|
-
}): Promise<{
|
|
55
|
-
buttonType: ButtonType;
|
|
56
|
-
value: string;
|
|
57
|
-
}>;
|
|
58
|
-
}
|
|
59
|
-
declare enum ButtonText {
|
|
60
|
-
Cancel = "Abbrechen",
|
|
61
|
-
No = "Nein",
|
|
62
|
-
Ok = "OK",
|
|
63
|
-
Yes = "Ja",
|
|
64
|
-
Save = "Speichern"
|
|
65
|
-
}
|
|
66
|
-
export declare enum ButtonType {
|
|
67
|
-
Cancel = -1,
|
|
68
|
-
Negative = 0,
|
|
69
|
-
Positive = 1
|
|
70
|
-
}
|
|
71
|
-
export interface DialogButton {
|
|
72
|
-
text: ButtonText | string;
|
|
73
|
-
buttonType: ButtonType | number;
|
|
74
|
-
collapseTime?: number;
|
|
75
|
-
textColor?: string;
|
|
76
|
-
backgroundColor?: string;
|
|
77
|
-
}
|
|
78
|
-
export interface SelectDialogItem {
|
|
79
|
-
name: string;
|
|
80
|
-
value: string | number;
|
|
81
|
-
isSelected?: boolean;
|
|
82
|
-
}
|
|
83
|
-
export interface SelectDialogResult {
|
|
84
|
-
buttonType: ButtonType | number;
|
|
85
|
-
selection: Array<SelectDialogItem>;
|
|
86
|
-
}
|
|
87
|
-
declare enum SelectType {
|
|
88
|
-
Default = 0,
|
|
89
|
-
Icon = 1,
|
|
90
|
-
IconAndText
|
|
91
|
-
}
|
|
92
|
-
export interface Group {
|
|
93
|
-
id: number;
|
|
94
|
-
isActive: boolean;
|
|
95
|
-
}
|
|
96
|
-
export interface User {
|
|
97
|
-
name: string;
|
|
98
|
-
firstName: string;
|
|
99
|
-
gender: number;
|
|
100
|
-
lastName: string;
|
|
101
|
-
id: number;
|
|
102
|
-
personId: string;
|
|
103
|
-
tobitAccessToken: string;
|
|
104
|
-
groups: Group[];
|
|
105
|
-
isAuthenticated: boolean;
|
|
106
|
-
adminMode: boolean;
|
|
107
|
-
isAdmin: boolean;
|
|
108
|
-
}
|
|
109
|
-
export interface Site {
|
|
110
|
-
id: string;
|
|
111
|
-
colorMode: 0 | 1 | 2;
|
|
112
|
-
}
|
|
113
|
-
export interface Env {
|
|
114
|
-
site: Site;
|
|
115
|
-
user: User;
|
|
116
|
-
language: any;
|
|
117
|
-
parameters: any;
|
|
118
|
-
isApp: boolean;
|
|
119
|
-
isMobile: boolean;
|
|
120
|
-
isTablet: boolean;
|
|
121
|
-
}
|
|
122
|
-
export {};
|
|
1
|
+
export type BrowserName = 'aol' | 'edge' | 'edge-ios' | 'yandexbrowser' | 'kakaotalk' | 'samsung' | 'silk' | 'miui' | 'beaker' | 'edge-chromium' | 'chrome' | 'chromium-webview' | 'phantomjs' | 'crios' | 'firefox' | 'fxios' | 'opera-mini' | 'opera' | 'pie' | 'netfront' | 'ie' | 'bb10' | 'android' | 'ios' | 'safari' | 'facebook' | 'instagram' | 'ios-webview' | 'curl' | 'searchbot' | 'bot' | null | undefined;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
+
import { ColorMode } from 'chayns-api';
|
|
1
2
|
export interface DesignSettings {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
siteId?: string;
|
|
4
|
+
color: string;
|
|
5
|
+
secondaryColor?: string;
|
|
6
|
+
colorMode: ColorMode;
|
|
7
|
+
fontSize: number;
|
|
7
8
|
iconStyle: IconStyle;
|
|
9
|
+
headlineFontId?: number;
|
|
10
|
+
backgroundType?: number;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
headerBarColor?: string;
|
|
13
|
+
accordionIcon?: number;
|
|
14
|
+
accordionLines: boolean;
|
|
15
|
+
cardBorderRadius?: number;
|
|
16
|
+
cardBackgroundOpacity?: number;
|
|
17
|
+
cardShadow?: number;
|
|
8
18
|
}
|
|
9
19
|
export declare enum IconStyle {
|
|
10
20
|
SOLID = 0,
|
|
@@ -15,18 +25,12 @@ export declare enum IconStyle {
|
|
|
15
25
|
}
|
|
16
26
|
export interface ParagraphFormat {
|
|
17
27
|
selector: string;
|
|
18
|
-
fontSizePx
|
|
19
|
-
lineHeight
|
|
20
|
-
marginBeforePx
|
|
21
|
-
marginAfterPx
|
|
22
|
-
color
|
|
23
|
-
fontId
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
fontName: string | null;
|
|
27
|
-
fontFactor: number | null;
|
|
28
|
-
letterSpacing: number | null;
|
|
29
|
-
wordSpacing: number | null;
|
|
30
|
-
fontBackup: string | null;
|
|
31
|
-
fontHasBold: boolean | null;
|
|
28
|
+
fontSizePx?: number;
|
|
29
|
+
lineHeight?: number;
|
|
30
|
+
marginBeforePx?: number;
|
|
31
|
+
marginAfterPx?: number;
|
|
32
|
+
color?: string;
|
|
33
|
+
fontId?: number;
|
|
34
|
+
buttonDesignType?: number;
|
|
35
|
+
backgroundColor?: string;
|
|
32
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.991",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -78,14 +78,14 @@
|
|
|
78
78
|
"uuid": "^10.0.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"chayns-api": "
|
|
81
|
+
"chayns-api": "^2.2.0-beta.2",
|
|
82
82
|
"framer-motion": ">=10.18.0",
|
|
83
|
-
"react": ">=
|
|
84
|
-
"react-dom": ">=
|
|
83
|
+
"react": ">=18.0.0",
|
|
84
|
+
"react-dom": ">=18.0.0",
|
|
85
85
|
"styled-components": ">=5.3.11"
|
|
86
86
|
},
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "6ed1ca79a66254c138d4ab065c78b555973e770f"
|
|
91
91
|
}
|
package/lib/cjs/api/theme/get.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getParagraphFormat = exports.getDesignSettings = void 0;
|
|
7
|
-
var _chaynsApi = require("chayns-api");
|
|
8
|
-
const getDesignSettings = async siteId => {
|
|
9
|
-
let id = siteId;
|
|
10
|
-
if (!id) id = (0, _chaynsApi.getSite)().id;
|
|
11
|
-
const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {
|
|
12
|
-
method: 'GET'
|
|
13
|
-
});
|
|
14
|
-
if (response.status === 200) {
|
|
15
|
-
return await response.json();
|
|
16
|
-
}
|
|
17
|
-
return undefined;
|
|
18
|
-
};
|
|
19
|
-
exports.getDesignSettings = getDesignSettings;
|
|
20
|
-
const getParagraphFormat = async siteId => {
|
|
21
|
-
let id = siteId;
|
|
22
|
-
if (!id) id = (0, _chaynsApi.getSite)().id;
|
|
23
|
-
const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, {
|
|
24
|
-
method: 'GET'
|
|
25
|
-
});
|
|
26
|
-
if (response.status === 200) {
|
|
27
|
-
return await response.json();
|
|
28
|
-
}
|
|
29
|
-
return undefined;
|
|
30
|
-
};
|
|
31
|
-
exports.getParagraphFormat = getParagraphFormat;
|
|
32
|
-
//# sourceMappingURL=get.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","names":["_chaynsApi","require","getDesignSettings","siteId","id","getSite","response","fetch","method","status","json","undefined","exports","getParagraphFormat"],"sources":["../../../../src/api/theme/get.ts"],"sourcesContent":["import { getSite } from 'chayns-api';\nimport type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';\n\nexport const getDesignSettings = async (siteId?: string): Promise<DesignSettings | undefined> => {\n let id = siteId;\n\n if (!id) id = getSite().id;\n\n const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as DesignSettings;\n }\n\n return undefined;\n};\n\nexport const getParagraphFormat = async (\n siteId?: string,\n): Promise<ParagraphFormat[] | undefined> => {\n let id = siteId;\n\n if (!id) id = getSite().id;\n\n const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as ParagraphFormat[];\n }\n\n return undefined;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAGO,MAAMC,iBAAiB,GAAG,MAAOC,MAAe,IAA0C;EAC7F,IAAIC,EAAE,GAAGD,MAAM;EAEf,IAAI,CAACC,EAAE,EAAEA,EAAE,GAAG,IAAAC,kBAAO,EAAC,CAAC,CAACD,EAAE;EAE1B,MAAME,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BH,EAAE,WAAW,EAAE;IACtEI,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC;AAACC,OAAA,CAAAV,iBAAA,GAAAA,iBAAA;AAEK,MAAMW,kBAAkB,GAAG,MAC9BV,MAAe,IAC0B;EACzC,IAAIC,EAAE,GAAGD,MAAM;EAEf,IAAI,CAACC,EAAE,EAAEA,EAAE,GAAG,IAAAC,kBAAO,EAAC,CAAC,CAACD,EAAE;EAE1B,MAAME,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BH,EAAE,kBAAkB,EAAE;IAC7EI,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC;AAACC,OAAA,CAAAC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
package/lib/esm/api/theme/get.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { getSite } from 'chayns-api';
|
|
2
|
-
export const getDesignSettings = async siteId => {
|
|
3
|
-
let id = siteId;
|
|
4
|
-
if (!id) id = getSite().id;
|
|
5
|
-
const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {
|
|
6
|
-
method: 'GET'
|
|
7
|
-
});
|
|
8
|
-
if (response.status === 200) {
|
|
9
|
-
return await response.json();
|
|
10
|
-
}
|
|
11
|
-
return undefined;
|
|
12
|
-
};
|
|
13
|
-
export const getParagraphFormat = async siteId => {
|
|
14
|
-
let id = siteId;
|
|
15
|
-
if (!id) id = getSite().id;
|
|
16
|
-
const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, {
|
|
17
|
-
method: 'GET'
|
|
18
|
-
});
|
|
19
|
-
if (response.status === 200) {
|
|
20
|
-
return await response.json();
|
|
21
|
-
}
|
|
22
|
-
return undefined;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=get.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","names":["getSite","getDesignSettings","siteId","id","response","fetch","method","status","json","undefined","getParagraphFormat"],"sources":["../../../../src/api/theme/get.ts"],"sourcesContent":["import { getSite } from 'chayns-api';\nimport type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';\n\nexport const getDesignSettings = async (siteId?: string): Promise<DesignSettings | undefined> => {\n let id = siteId;\n\n if (!id) id = getSite().id;\n\n const response = await fetch(`https://api.chayns.net/css/${id}/style/v2`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as DesignSettings;\n }\n\n return undefined;\n};\n\nexport const getParagraphFormat = async (\n siteId?: string,\n): Promise<ParagraphFormat[] | undefined> => {\n let id = siteId;\n\n if (!id) id = getSite().id;\n\n const response = await fetch(`https://api.chayns.net/css/${id}/paragraphFormat`, {\n method: 'GET',\n });\n\n if (response.status === 200) {\n return (await response.json()) as ParagraphFormat[];\n }\n\n return undefined;\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,YAAY;AAGpC,OAAO,MAAMC,iBAAiB,GAAG,MAAOC,MAAe,IAA0C;EAC7F,IAAIC,EAAE,GAAGD,MAAM;EAEf,IAAI,CAACC,EAAE,EAAEA,EAAE,GAAGH,OAAO,CAAC,CAAC,CAACG,EAAE;EAE1B,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BF,EAAE,WAAW,EAAE;IACtEG,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAG,MAC9BR,MAAe,IAC0B;EACzC,IAAIC,EAAE,GAAGD,MAAM;EAEf,IAAI,CAACC,EAAE,EAAEA,EAAE,GAAGH,OAAO,CAAC,CAAC,CAACG,EAAE;EAE1B,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAAC,8BAA8BF,EAAE,kBAAkB,EAAE;IAC7EG,MAAM,EAAE;EACZ,CAAC,CAAC;EAEF,IAAIF,QAAQ,CAACG,MAAM,KAAK,GAAG,EAAE;IACzB,OAAQ,MAAMH,QAAQ,CAACI,IAAI,CAAC,CAAC;EACjC;EAEA,OAAOC,SAAS;AACpB,CAAC","ignoreList":[]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DesignSettings, ParagraphFormat } from '../../types/colorSchemeProvider';
|
|
2
|
-
export declare const getDesignSettings: (siteId?: string) => Promise<DesignSettings | undefined>;
|
|
3
|
-
export declare const getParagraphFormat: (siteId?: string) => Promise<ParagraphFormat[] | undefined>;
|