first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
import * as React from 'react';
import type { IBeakProps } from './Beak.types';
export declare const BEAK_HEIGHT = 10;
export declare const BEAK_WIDTH = 18;
export declare const Beak: React.FunctionComponent<IBeakProps>;
+66
View File
@@ -0,0 +1,66 @@
import * as React from 'react';
import { classNamesFunction } from '../../../Utilities';
import { getStyles } from './Beak.styles';
import { RectangleEdge } from '../../../Positioning';
export var BEAK_HEIGHT = 10;
export var BEAK_WIDTH = 18;
export var Beak = React.forwardRef(function (props, forwardedRef) {
var left = props.left, top = props.top, bottom = props.bottom, right = props.right, color = props.color, _a = props.direction, direction = _a === void 0 ? RectangleEdge.top : _a;
var svgHeight;
var svgWidth;
if (direction === RectangleEdge.top || direction === RectangleEdge.bottom) {
svgHeight = BEAK_HEIGHT;
svgWidth = BEAK_WIDTH;
}
else {
svgHeight = BEAK_WIDTH;
svgWidth = BEAK_HEIGHT;
}
var pointOne;
var pointTwo;
var pointThree;
var transform;
switch (direction) {
case RectangleEdge.top:
case RectangleEdge.right:
pointOne = "0, 0";
pointTwo = "".concat(BEAK_HEIGHT, ", ").concat(BEAK_HEIGHT);
pointThree = "0, ".concat(BEAK_WIDTH);
transform = 'translateX(100%)';
break;
case RectangleEdge.bottom:
pointOne = "0, 0";
pointTwo = "".concat(BEAK_WIDTH, ", 0");
pointThree = "".concat(BEAK_WIDTH / 2, ", ").concat(BEAK_HEIGHT);
transform = 'translateY(100%)';
break;
case RectangleEdge.left:
pointOne = "".concat(BEAK_HEIGHT, ", 0");
pointTwo = "0, ".concat(BEAK_HEIGHT);
pointThree = "".concat(BEAK_HEIGHT, ", ").concat(BEAK_WIDTH);
transform = 'translateX(-100%)';
break;
default:
pointOne = "".concat(BEAK_WIDTH / 2, ", 0");
pointTwo = "".concat(BEAK_WIDTH, ", ").concat(BEAK_HEIGHT);
pointThree = "0, ".concat(BEAK_HEIGHT);
transform = 'translateY(-100%)';
break;
}
var getClassNames = classNamesFunction();
var classNames = getClassNames(getStyles, {
left: left,
top: top,
bottom: bottom,
right: right,
height: "".concat(svgHeight, "px"),
width: "".concat(svgWidth, "px"),
transform: transform,
color: color,
});
return (React.createElement("div", { className: classNames.root, role: "presentation", ref: forwardedRef },
React.createElement("svg", { height: svgHeight, width: svgWidth, className: classNames.beak },
React.createElement("polygon", { points: pointOne + ' ' + pointTwo + ' ' + pointThree }))));
});
Beak.displayName = 'Beak';
//# sourceMappingURL=Beak.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Beak.js","sourceRoot":"../src/","sources":["components/Coachmark/Beak/Beak.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,MAAM,CAAC,IAAM,WAAW,GAAG,EAAE,CAAC;AAC9B,MAAM,CAAC,IAAM,UAAU,GAAG,EAAE,CAAC;AAE7B,MAAM,CAAC,IAAM,IAAI,GAAwC,KAAK,CAAC,UAAU,CACvE,UAAC,KAAK,EAAE,YAAY;IACV,IAAA,IAAI,GAA+D,KAAK,KAApE,EAAE,GAAG,GAA0D,KAAK,IAA/D,EAAE,MAAM,GAAkD,KAAK,OAAvD,EAAE,KAAK,GAA2C,KAAK,MAAhD,EAAE,KAAK,GAAoC,KAAK,MAAzC,EAAE,KAAkC,KAAK,UAAV,EAA7B,SAAS,mBAAG,aAAa,CAAC,GAAG,KAAA,CAAW;IAEjF,IAAI,SAAiB,CAAC;IACtB,IAAI,QAAgB,CAAC;IAErB,IAAI,SAAS,KAAK,aAAa,CAAC,GAAG,IAAI,SAAS,KAAK,aAAa,CAAC,MAAM,EAAE,CAAC;QAC1E,SAAS,GAAG,WA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a,CAAC,SAAS,EAAE;QAC1C,IAAI,MAAA;QACJ,GAAG,KAAA;QACH,MAAM,QAAA;QACN,KAAK,OAAA;QACL,MAAM,EAAE,UAAG,SAAS,OAAI;QACxB,KAAK,EAAE,UAAG,QAAQ,OAAI;QACtB,SAAS,WAAA;QACT,KAAK,OAAA;KACN,CAAC,CAAC;IAEH,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,EAAC,cAAc,EAAC,GAAG,EAAE,YAAY;QACpE,6BAAK,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,IAAI;YACjE,iCAAS,MAAM,EAAE,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,GAAG,GAAG,UAAU,GAAI,CAC7D,CACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AACF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC","sourcesContent":["import * as React from 'react';\nimport { classNamesFunction } from '../../../Utilities';\nimport { getStyles } from './Beak.styles';\nimport { RectangleEdge } from '../../../Positioning';\nimport type { IBeakProps, IBeakStylesProps } from './Beak.types';\nimport type { IBeakStyles } from './Beak.styles';\n\nexport const BEAK_HEIGHT = 10;\nexport const BEAK_WIDTH = 18;\n\nexport const Beak: React.FunctionComponent<IBeakProps> = React.forwardRef<HTMLDivElement, IBeakProps>(\n (props, forwardedRef) => {\n const { left, top, bottom, right, color, direction = RectangleEdge.top } = props;\n\n let svgHeight: number;\n let svgWidth: number;\n\n if (direction === RectangleEdge.top || direction === RectangleEdge.bottom) {\n svgHeight = BEAK_HEIGHT;\n svgWidth = BEAK_WIDTH;\n } else {\n svgHeight = BEAK_WIDTH;\n svgWidth = BEAK_HEIGHT;\n }\n\n let pointOne: string;\n let pointTwo: string;\n let pointThree: string;\n let transform: string;\n\n switch (direction) {\n case RectangleEdge.top:\n case RectangleEdge.right:\n pointOne = `0, 0`;\n pointTwo = `${BEAK_HEIGHT}, ${BEAK_HEIGHT}`;\n pointThree = `0, ${BEAK_WIDTH}`;\n transform = 'translateX(100%)';\n break;\n case RectangleEdge.bottom:\n pointOne = `0, 0`;\n pointTwo = `${BEAK_WIDTH}, 0`;\n pointThree = `${BEAK_WIDTH / 2}, ${BEAK_HEIGHT}`;\n transform = 'translateY(100%)';\n break;\n case RectangleEdge.left:\n pointOne = `${BEAK_HEIGHT}, 0`;\n pointTwo = `0, ${BEAK_HEIGHT}`;\n pointThree = `${BEAK_HEIGHT}, ${BEAK_WIDTH}`;\n transform = 'translateX(-100%)';\n break;\n default:\n pointOne = `${BEAK_WIDTH / 2}, 0`;\n pointTwo = `${BEAK_WIDTH}, ${BEAK_HEIGHT}`;\n pointThree = `0, ${BEAK_HEIGHT}`;\n transform = 'translateY(-100%)';\n break;\n }\n\n const getClassNames = classNamesFunction<IBeakStylesProps, IBeakStyles>();\n const classNames = getClassNames(getStyles, {\n left,\n top,\n bottom,\n right,\n height: `${svgHeight}px`,\n width: `${svgWidth}px`,\n transform,\n color,\n });\n\n return (\n <div className={classNames.root} role=\"presentation\" ref={forwardedRef}>\n <svg height={svgHeight} width={svgWidth} className={classNames.beak}>\n <polygon points={pointOne + ' ' + pointTwo + ' ' + pointThree} />\n </svg>\n </div>\n );\n },\n);\nBeak.displayName = 'Beak';\n"]}
@@ -0,0 +1,10 @@
import type { IStyle } from '../../../Styling';
import type { IBeakStylesProps } from './Beak.types';
export interface IBeakStyles {
/**
* Style for the root element in the default enabled/unchecked state.
*/
root?: IStyle;
beak?: IStyle;
}
export declare function getStyles(props: IBeakStylesProps): IBeakStyles;
@@ -0,0 +1,31 @@
import { HighContrastSelector } from '../../../Styling';
export function getStyles(props) {
var _a;
return {
root: [
{
position: 'absolute',
boxShadow: 'inherit',
border: 'none',
boxSizing: 'border-box',
transform: props.transform,
width: props.width,
height: props.height,
left: props.left,
top: props.top,
right: props.right,
bottom: props.bottom,
},
],
beak: {
fill: props.color,
display: 'block',
selectors: (_a = {},
_a[HighContrastSelector] = {
fill: 'windowtext',
},
_a),
},
};
}
//# sourceMappingURL=Beak.styles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Beak.styles.js","sourceRoot":"../src/","sources":["components/Coachmark/Beak/Beak.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAYxD,MAAM,UAAU,SAAS,CAAC,KAAuB;;IAC/C,OAAO;QACL,IAAI,EAAE;YACJ;gBACE,QAAQ,EAAE,UAAU;gBACpB,SAAS,EAAE,SAAS;gBACpB,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,YAAY;gBACvB,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,GAAG,EAAE,KAAK,CAAC,GAAG;gBACd,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB;SACF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,KAAK,CAAC,KAAK;YACjB,OAAO,EAAE,OAAO;YAChB,SAAS;gBACP,GAAC,oBAAoB,IAAG;oBACtB,IAAI,EAAE,YAAY;iBACnB;mBACF;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { HighContrastSelector } from '../../../Styling';\nimport type { IStyle } from '../../../Styling';\nimport type { IBeakStylesProps } from './Beak.types';\n\nexport interface IBeakStyles {\n /**\n * Style for the root element in the default enabled/unchecked state.\n */\n root?: IStyle;\n beak?: IStyle;\n}\n\nexport function getStyles(props: IBeakStylesProps): IBeakStyles {\n return {\n root: [\n {\n position: 'absolute',\n boxShadow: 'inherit',\n border: 'none',\n boxSizing: 'border-box',\n transform: props.transform,\n width: props.width,\n height: props.height,\n left: props.left,\n top: props.top,\n right: props.right,\n bottom: props.bottom,\n },\n ],\n beak: {\n fill: props.color,\n display: 'block',\n selectors: {\n [HighContrastSelector]: {\n fill: 'windowtext',\n },\n },\n },\n };\n}\n"]}
@@ -0,0 +1,46 @@
import * as React from 'react';
import { RectangleEdge } from '../../../Positioning';
export interface IBeakProps extends React.RefAttributes<HTMLDivElement> {
/**
* @deprecated Not used.
*/
width?: number;
/**
* @deprecated Not used.
*/
height?: number;
/**
* Color of the beak
*/
color?: string;
/**
* Left position of the beak
*/
left?: string;
/**
* Top position of the beak
*/
top?: string;
/**
* Right position of the beak
*/
right?: string;
/**
* Bottom position of the beak
*/
bottom?: string;
/**
* Direction of beak
*/
direction?: RectangleEdge;
}
export interface IBeakStylesProps {
left?: string | undefined;
top?: string | undefined;
bottom?: string | undefined;
right?: string | undefined;
width?: string;
height?: string;
transform?: string;
color?: string;
}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=Beak.types.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Beak.types.js","sourceRoot":"../src/","sources":["components/Coachmark/Beak/Beak.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { RectangleEdge } from '../../../Positioning';\n\nexport interface IBeakProps extends React.RefAttributes<HTMLDivElement> {\n /**\n * @deprecated Not used.\n */\n width?: number;\n\n /**\n * @deprecated Not used.\n */\n height?: number;\n\n /**\n * Color of the beak\n */\n color?: string;\n\n /**\n * Left position of the beak\n */\n left?: string;\n\n /**\n * Top position of the beak\n */\n top?: string;\n\n /**\n * Right position of the beak\n */\n right?: string;\n\n /**\n * Bottom position of the beak\n */\n bottom?: string;\n\n /**\n * Direction of beak\n */\n direction?: RectangleEdge;\n}\n\nexport interface IBeakStylesProps {\n left?: string | undefined;\n top?: string | undefined;\n bottom?: string | undefined;\n right?: string | undefined;\n width?: string;\n height?: string;\n transform?: string;\n color?: string;\n}\n"]}