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
@@ -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>;
+67
View File
@@ -0,0 +1,67 @@
define(["require", "exports", "react", "../../../Utilities", "./Beak.styles", "../../../Positioning"], function (require, exports, React, Utilities_1, Beak_styles_1, Positioning_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Beak = exports.BEAK_WIDTH = exports.BEAK_HEIGHT = void 0;
exports.BEAK_HEIGHT = 10;
exports.BEAK_WIDTH = 18;
exports.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 ? Positioning_1.RectangleEdge.top : _a;
var svgHeight;
var svgWidth;
if (direction === Positioning_1.RectangleEdge.top || direction === Positioning_1.RectangleEdge.bottom) {
svgHeight = exports.BEAK_HEIGHT;
svgWidth = exports.BEAK_WIDTH;
}
else {
svgHeight = exports.BEAK_WIDTH;
svgWidth = exports.BEAK_HEIGHT;
}
var pointOne;
var pointTwo;
var pointThree;
var transform;
switch (direction) {
case Positioning_1.RectangleEdge.top:
case Positioning_1.RectangleEdge.right:
pointOne = "0, 0";
pointTwo = "".concat(exports.BEAK_HEIGHT, ", ").concat(exports.BEAK_HEIGHT);
pointThree = "0, ".concat(exports.BEAK_WIDTH);
transform = 'translateX(100%)';
break;
case Positioning_1.RectangleEdge.bottom:
pointOne = "0, 0";
pointTwo = "".concat(exports.BEAK_WIDTH, ", 0");
pointThree = "".concat(exports.BEAK_WIDTH / 2, ", ").concat(exports.BEAK_HEIGHT);
transform = 'translateY(100%)';
break;
case Positioning_1.RectangleEdge.left:
pointOne = "".concat(exports.BEAK_HEIGHT, ", 0");
pointTwo = "0, ".concat(exports.BEAK_HEIGHT);
pointThree = "".concat(exports.BEAK_HEIGHT, ", ").concat(exports.BEAK_WIDTH);
transform = 'translateX(-100%)';
break;
default:
pointOne = "".concat(exports.BEAK_WIDTH / 2, ", 0");
pointTwo = "".concat(exports.BEAK_WIDTH, ", ").concat(exports.BEAK_HEIGHT);
pointThree = "0, ".concat(exports.BEAK_HEIGHT);
transform = 'translateY(-100%)';
break;
}
var getClassNames = (0, Utilities_1.classNamesFunction)();
var classNames = getClassNames(Beak_styles_1.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 }))));
});
exports.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":";;;;IAOa,QAAA,WAAW,GAAG,EAAE,CAAC;IACjB,QAAA,UAAU,GAAG,EAAE,CAAC;IAEhB,QAAA,IAAI,GAAwC,KAAK,CAAC,UAAU,CACvE,UAAC,KAAK,EAAE,YAAY;QACV,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,2BAAa,CAAC,GAAG,KAAA,CAAW;QAEjF,IAAI,SAAiB,CAAC;QACtB,IAAI,QAAgB,CAAC;QAErB,IAAI,SAAS,KAAK,2BAAa,CAAC,GAAG,IAAI,SAAS,KAAK,2BAAa,CAAC,MAAM,EAAE,CAAC;YAC1E,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M,aAAa,GAAG,IAAA,8BAAkB,GAAiC,CAAC;QAC1E,IAAM,UAAU,GAAG,aAAa,CAAC,uBAAS,EAAE;YAC1C,IAAI,MAAA;YACJ,GAAG,KAAA;YACH,MAAM,QAAA;YACN,KAAK,OAAA;YACL,MAAM,EAAE,UAAG,SAAS,OAAI;YACxB,KAAK,EAAE,UAAG,QAAQ,OAAI;YACtB,SAAS,WAAA;YACT,KAAK,OAAA;SACN,CAAC,CAAC;QAEH,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,EAAC,cAAc,EAAC,GAAG,EAAE,YAAY;YACpE,6BAAK,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,IAAI;gBACjE,iCAAS,MAAM,EAAE,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,GAAG,GAAG,UAAU,GAAI,CAC7D,CACF,CACP,CAAC;IACJ,CAAC,CACF,CAAC;IACF,YAAI,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,35 @@
define(["require", "exports", "../../../Styling"], function (require, exports, Styling_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStyles = getStyles;
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[Styling_1.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":";;;IAYA,8BA2BC;IA3BD,SAAgB,SAAS,CAAC,KAAuB;;QAC/C,OAAO;YACL,IAAI,EAAE;gBACJ;oBACE,QAAQ,EAAE,UAAU;oBACpB,SAAS,EAAE,SAAS;oBACpB,MAAM,EAAE,MAAM;oBACd,SAAS,EAAE,YAAY;oBACvB,SAAS,EAAE,KAAK,CAAC,SAAS;oBAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,GAAG,EAAE,KAAK,CAAC,GAAG;oBACd,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;iBACrB;aACF;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,KAAK,CAAC,KAAK;gBACjB,OAAO,EAAE,OAAO;gBAChB,SAAS;oBACP,GAAC,8BAAoB,IAAG;wBACtB,IAAI,EAAE,YAAY;qBACnB;uBACF;aACF;SACF,CAAC;IACJ,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,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# 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"]}