Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
@@ -0,0 +1,7 @@
import * as React from "react";
export declare type FluentIconsProps<TBaseAttributes extends React.SVGAttributes<SVGElement> | React.HTMLAttributes<HTMLElement> = React.SVGAttributes<SVGElement>, TRefType extends HTMLElement | SVGSVGElement = SVGSVGElement> = TBaseAttributes & React.RefAttributes<TRefType> & {
primaryFill?: string;
className?: string;
filled?: boolean;
title?: string;
};
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
+3
View File
@@ -0,0 +1,3 @@
import { FluentIcon } from "./createFluentIcon";
declare const bundleIcon: (FilledIcon: FluentIcon, RegularIcon: FluentIcon) => FluentIcon;
export default bundleIcon;
+37
View File
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const constants_1 = require("./constants");
const react_1 = require("@griffel/react");
const useBundledIconStyles = react_1.__styles({
"root": {
"mc9l5x": "fjseox"
},
"visible": {
"mc9l5x": "f1w7gpdv"
}
}, {
"d": [".fjseox{display:none;}", ".f1w7gpdv{display:inline;}"]
});
const bundleIcon = (FilledIcon, RegularIcon) => {
const Component = props => {
const {
className,
filled,
...rest
} = props;
const styles = useBundledIconStyles();
return React.createElement(React.Fragment, null, React.createElement(FilledIcon, Object.assign({}, rest, {
className: react_1.mergeClasses(styles.root, filled && styles.visible, constants_1.iconFilledClassName, className)
})), React.createElement(RegularIcon, Object.assign({}, rest, {
className: react_1.mergeClasses(styles.root, !filled && styles.visible, constants_1.iconRegularClassName, className)
})));
};
Component.displayName = "CompoundIcon";
return Component;
};
exports.default = bundleIcon;
+4
View File
@@ -0,0 +1,4 @@
export declare const iconFilledClassName = "fui-Icon-filled";
export declare const iconRegularClassName = "fui-Icon-regular";
export declare const iconLightClassName = "fui-Icon-light";
export declare const fontIconClassName = "fui-Icon-font";
+10
View File
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.fontIconClassName = exports.iconLightClassName = exports.iconRegularClassName = exports.iconFilledClassName = void 0;
exports.iconFilledClassName = "fui-Icon-filled";
exports.iconRegularClassName = "fui-Icon-regular";
exports.iconLightClassName = "fui-Icon-light";
exports.fontIconClassName = "fui-Icon-font";
+10
View File
@@ -0,0 +1,10 @@
/// <reference types="react" />
import { FluentIconsProps } from "./FluentIconsProps.types";
export declare type FluentIcon = {
(props: FluentIconsProps): JSX.Element;
displayName?: string;
};
export declare type CreateFluentIconOptions = {
flipInRtl?: boolean;
};
export declare const createFluentIcon: (displayName: string, width: string, paths: string[], options?: CreateFluentIconOptions | undefined) => FluentIcon;
+31
View File
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createFluentIcon = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const useIconState_1 = require("./useIconState");
const createFluentIcon = (displayName, width, paths, options) => {
const viewBoxWidth = width === "1em" ? "20" : width;
const Icon = React.forwardRef((props, ref) => {
const state = {
...useIconState_1.useIconState(props, {
flipInRtl: options === null || options === void 0 ? void 0 : options.flipInRtl
}),
ref,
width,
height: width,
viewBox: `0 0 ${viewBoxWidth} ${viewBoxWidth}`,
xmlns: "http://www.w3.org/2000/svg"
};
return React.createElement("svg", state, ...paths.map(d => React.createElement("path", {
d,
fill: state.fill
})));
});
Icon.displayName = displayName;
return Icon;
};
exports.createFluentIcon = createFluentIcon;
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,183 @@
{
"AccessibilityCheckmark32Light": 57344,
"Add32Light": 57345,
"Alert32Light": 57346,
"AppFolder32Light": 57347,
"AppGeneric32Light": 57348,
"Archive32Light": 57349,
"ArchiveSettings32Light": 57350,
"ArrowClockwise32Light": 57351,
"ArrowDown32Light": 57352,
"ArrowDownload32Light": 57353,
"ArrowForward32Light": 57354,
"ArrowHookUpLeft32Light": 57355,
"ArrowRedo32Light": 57356,
"ArrowReply32Light": 57357,
"ArrowReplyAll32Light": 57358,
"ArrowUndo32Light": 57359,
"Attach32Light": 57360,
"AutoFit32Light": 57361,
"Autocorrect32Light": 57362,
"BreakoutRoom32Light": 57363,
"Broom32Light": 57364,
"Calendar3Day32Light": 57365,
"CalendarClock32Light": 57366,
"CalendarDataBar32Light": 57367,
"CalendarDay32Light": 57368,
"CalendarEdit32Light": 57369,
"CalendarEmpty32Light": 57370,
"CalendarLtr32Light": 57371,
"CalendarMonth32Light": 57372,
"CalendarMultiple32Light": 57373,
"CalendarPattern32Light": 57374,
"CalendarReply32Light": 57375,
"CalendarSparkle32Light": 57376,
"CalendarTodo32Light": 57377,
"CalendarWorkWeek32Light": 57378,
"Chat32Light": 57379,
"Checkmark32Light": 57380,
"CheckmarkCircle32Light": 57381,
"Classification32Light": 57382,
"ClipboardPaste32Light": 57383,
"Clock32Light": 57384,
"ClockAlarm32Light": 57385,
"Color32Light": 57386,
"ColorFill32Light": 57387,
"ColorFillAccent32Light": 57388,
"Comment32Light": 57389,
"CommentAdd32Light": 57390,
"Compose32Light": 57391,
"Copy32Light": 57392,
"Crop32Light": 57393,
"Cursor32Light": 57394,
"Delete32Light": 57395,
"Dismiss32Light": 57396,
"DismissCircle32Light": 57397,
"Document24Light": 57398,
"Document28Light": 57399,
"Document32Light": 57400,
"Document48Light": 57401,
"DocumentLightning32Light": 57402,
"DocumentSignature32Light": 57403,
"DocumentSparkle24Light": 57404,
"DocumentSparkle28Light": 57405,
"DocumentSparkle32Light": 57406,
"DocumentSparkle48Light": 57407,
"DoorArrowRight32Light": 57408,
"Edit32Light": 57409,
"Emoji32Light": 57410,
"Eye32Light": 57411,
"EyeOff32Light": 57412,
"Filter32Light": 57413,
"Flag32Light": 57414,
"FlagOff32Light": 57415,
"Flash32Light": 57416,
"FolderArrowRight32Light": 57417,
"FolderMail32Light": 57418,
"HandDraw32Light": 57419,
"History32Light": 57420,
"ImageAdd32Light": 57421,
"ImageAltText32Light": 57422,
"ImageCopy32Light": 57423,
"ImageReflection32Light": 57424,
"ImageShadow32Light": 57425,
"ImmersiveReader32Light": 57426,
"Important32Light": 57427,
"Lasso32Light": 57428,
"LayoutColumnTwo32Light": 57429,
"LayoutColumnTwoFocusLeft32Light": 57430,
"LayoutColumnTwoFocusRight32Light": 57431,
"LayoutRowTwo32Light": 57432,
"LayoutRowTwoFocusTop32Light": 57433,
"LayoutRowTwoFocusTopSettings32Light": 57434,
"LayoutRowTwoSettings32Light": 57435,
"Lightbulb32Light": 57436,
"Link32Light": 57437,
"LockClosed32Light": 57438,
"LockOpen32Light": 57439,
"Mail32Light": 57440,
"MailAlert32Light": 57441,
"MailArrowClockwise32Light": 57442,
"MailArrowDoubleBack32Light": 57443,
"MailCopy32Light": 57444,
"MailEdit32Light": 57445,
"MailList32Light": 57446,
"MailMultiple32Light": 57447,
"MailRead32Light": 57448,
"MailReadMultiple32Light": 57449,
"MailRewind32Light": 57450,
"MailSettings32Light": 57451,
"MailUnread32Light": 57452,
"Mic32Light": 57453,
"Molecule32Light": 57454,
"Note32Light": 57455,
"Options32Light": 57456,
"PaintBrush32Light": 57457,
"PanelLeftDefault32Light": 57458,
"PanelLeftFocusRight32Light": 57459,
"PenSparkle32Light": 57460,
"People32Light": 57461,
"PeopleAdd32Light": 57462,
"PeopleCommunity32Light": 57463,
"PeopleEdit32Light": 57464,
"PeopleList32Light": 57465,
"PeopleSettings32Light": 57466,
"PeopleSync32Light": 57467,
"Person32Light": 57468,
"PersonAdd32Light": 57469,
"PersonAvailable32Light": 57470,
"PersonFeedback32Light": 57471,
"PersonMail32Light": 57472,
"PersonProhibited32Light": 57473,
"PersonSuport32Light": 57474,
"Phone32Light": 57475,
"PictureInPicture32Light": 57476,
"Pin32Light": 57477,
"PinOff32Light": 57478,
"Poll32Light": 57479,
"Print32Light": 57480,
"Question32Light": 57481,
"ReadAloud32Light": 57482,
"RectangleLandscape32Light": 57483,
"RotateLeft32Light": 57484,
"Save32Light": 57485,
"SendClock32Light": 57486,
"Settings32Light": 57487,
"Share32Light": 57488,
"ShieldError32Light": 57489,
"Signature32Light": 57490,
"SquareArrowForward32Light": 57491,
"Stamp32Light": 57492,
"StarAdd32Light": 57493,
"StarArrowRight32Light": 57494,
"TabAdd32Light": 57495,
"Table32Light": 57496,
"TableAltText32Light": 57497,
"TableCellsMerge32Light": 57498,
"TableCellsSplit32Light": 57499,
"TableDismiss32Light": 57500,
"TableMoveAbove32Light": 57501,
"TableMoveBelow32Light": 57502,
"TableMoveLeft32Light": 57503,
"TableMoveRight32Light": 57504,
"TableSettings32Light": 57505,
"TableSimple32Light": 57506,
"Tag32Light": 57507,
"Text32Light": 57508,
"TextClearFormatting32Light": 57509,
"TextCollapse32Light": 57510,
"TextDensity32Light": 57511,
"TextEditStyle32Light": 57512,
"TextExpand32Light": 57513,
"TextboxAlignTopLeft32Light": 57514,
"Toolbox32Light": 57515,
"Translate32Light": 57516,
"Video32Light": 57517,
"VideoClip32Light": 57518,
"WeatherMoon32Light": 57519,
"WeatherSunny32Light": 57520,
"Window32Light": 57521,
"WrenchScrewdriver32Light": 57522,
"ZoomIn32Light": 57523,
"ZoomOut32Light": 57524
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,14 @@
import * as React from 'react';
import { FluentIconsProps } from '../FluentIconsProps.types';
export declare const enum FontFile {
Filled = 0,
Regular = 1,
Resizable = 2,
Light = 3
}
export declare type CreateFluentFontIconOptions = {
flipInRtl?: boolean;
};
export declare function createFluentFontIcon(displayName: string, codepoint: string, font: FontFile, fontSize?: number, options?: CreateFluentFontIconOptions): React.FC<FluentIconsProps<React.HTMLAttributes<HTMLElement>, HTMLElement>> & {
codepoint: string;
};
@@ -0,0 +1,114 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createFluentFontIcon = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_1 = require("@griffel/react");
const useIconState_1 = require("../useIconState");
const constants_1 = require("../constants");
const FluentSystemIcons_Filled_ttf_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Filled.ttf"));
const FluentSystemIcons_Filled_woff_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Filled.woff"));
const FluentSystemIcons_Filled_woff2_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Filled.woff2"));
const FluentSystemIcons_Regular_ttf_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Regular.ttf"));
const FluentSystemIcons_Regular_woff_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Regular.woff"));
const FluentSystemIcons_Regular_woff2_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Regular.woff2"));
const FluentSystemIcons_Light_ttf_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Light.ttf"));
const FluentSystemIcons_Light_woff_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Light.woff"));
const FluentSystemIcons_Light_woff2_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Light.woff2"));
const FluentSystemIcons_Resizable_ttf_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Resizable.ttf"));
const FluentSystemIcons_Resizable_woff_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Resizable.woff"));
const FluentSystemIcons_Resizable_woff2_1 = tslib_1.__importDefault(require("./FluentSystemIcons-Resizable.woff2"));
const FONT_FAMILY_MAP = {
[0 /* Filled */]: 'FluentSystemIconsFilled',
[1 /* Regular */]: 'FluentSystemIconsRegular',
[2 /* Resizable */]: 'FluentSystemIcons'
};
const useStaticStyles = react_1.makeStaticStyles(`
@font-face {
font-family: ${FONT_FAMILY_MAP[0 /* Filled */]};
font-display: "block";
src: url(${JSON.stringify(FluentSystemIcons_Filled_woff2_1.default)}) format("woff2"),
url(${JSON.stringify(FluentSystemIcons_Filled_woff_1.default)}) format("woff"),
url(${JSON.stringify(FluentSystemIcons_Filled_ttf_1.default)}) format("truetype");
}
@font-face {
font-family: ${FONT_FAMILY_MAP[1 /* Regular */]};
font-display: "block";
src: url(${JSON.stringify(FluentSystemIcons_Regular_woff2_1.default)}) format("woff2"),
url(${JSON.stringify(FluentSystemIcons_Regular_woff_1.default)}) format("woff"),
url(${JSON.stringify(FluentSystemIcons_Regular_ttf_1.default)}) format("truetype");
}
@font-face {
font-family: ${FONT_FAMILY_MAP[3 /* Light */]};
src: url(${JSON.stringify(FluentSystemIcons_Light_woff2_1.default)}) format("woff2"),
url(${JSON.stringify(FluentSystemIcons_Light_woff_1.default)}) format("woff"),
url(${JSON.stringify(FluentSystemIcons_Light_ttf_1.default)}) format("truetype");
}
@font-face {
font-family: ${FONT_FAMILY_MAP[2 /* Resizable */]};
font-display: "block";
src: url(${JSON.stringify(FluentSystemIcons_Resizable_woff2_1.default)}) format("woff2"),
url(${JSON.stringify(FluentSystemIcons_Resizable_woff_1.default)}) format("woff"),
url(${JSON.stringify(FluentSystemIcons_Resizable_ttf_1.default)}) format("truetype");
}
`);
const useRootStyles = react_1.__styles({
"0": {
"Bahqtrf": "f9dzkbp"
},
"1": {
"Bahqtrf": "f1krtbx5"
},
"2": {
"Bahqtrf": "f1sxfq9t"
},
"3": {
"Bahqtrf": "fgtzeza"
},
"root": {
"mc9l5x": "f14t3ns0",
"B80ckks": "fmd4ok8",
"Bg96gwp": "fne0op0",
"sj55zd": "f303qgw",
"ycbfsm": "fg4l7m0"
}
}, {
"d": [".f9dzkbp{font-family:FluentSystemIconsFilled;}", ".f1krtbx5{font-family:FluentSystemIconsRegular;}", ".f1sxfq9t{font-family:FluentSystemIcons;}", ".fgtzeza{font-family:FluentSystemIconsLight;}", ".f14t3ns0{display:inline-block;}", ".fmd4ok8{font-style:normal;}", ".fne0op0{line-height:1em;}", ".f303qgw{color:currentColor;}"],
"t": ["@media (forced-colors: active){.fg4l7m0{forced-color-adjust:auto;}}"]
});
function createFluentFontIcon(displayName, codepoint, font, fontSize, options) {
const Component = props => {
useStaticStyles();
const styles = useRootStyles();
const className = react_1.mergeClasses(styles.root, styles[font], constants_1.fontIconClassName, props.className);
const state = useIconState_1.useIconState({
...props,
className
}, {
flipInRtl: options === null || options === void 0 ? void 0 : options.flipInRtl
});
// We want to keep the same API surface as the SVG icons, so translate `primaryFill` to `color`
if (props.primaryFill && props.primaryFill.toLowerCase() !== 'currentcolor') {
state.style = {
...state.style,
color: props.primaryFill
};
}
if (fontSize) {
state.style = {
...state.style,
fontSize
};
}
return React.createElement("i", Object.assign({}, state), codepoint);
};
Component.displayName = displayName;
Component.codepoint = codepoint;
return Component;
}
exports.createFluentFontIcon = createFluentFontIcon;
+6
View File
@@ -0,0 +1,6 @@
/// <reference types="react" />
import { FluentIconsProps } from "./FluentIconsProps.types";
export declare type UseIconStateOptions = {
flipInRtl?: boolean;
};
export declare const useIconState: <TBaseAttributes extends import("react").HTMLAttributes<HTMLElement> | import("react").SVGAttributes<SVGElement> = import("react").SVGAttributes<SVGElement>, TRefType extends HTMLElement | SVGSVGElement = SVGSVGElement>(props: FluentIconsProps<TBaseAttributes, TRefType>, options?: UseIconStateOptions | undefined) => Pick<FluentIconsProps<TBaseAttributes, TRefType>, "title" | "filled" | "ref" | "key" | "className" | Exclude<keyof TBaseAttributes, "primaryFill">>;
+46
View File
@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useIconState = void 0;
const contexts_1 = require("../contexts");
const react_1 = require("@griffel/react");
const useRootStyles = react_1.__styles({
"root": {
"mc9l5x": "f1w7gpdv",
"Bg96gwp": "fez10in",
"ycbfsm": "fg4l7m0"
},
"rtl": {
"Bz10aip": "f13rod7r"
}
}, {
"d": [".f1w7gpdv{display:inline;}", ".fez10in{line-height:0;}", ".f13rod7r{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1);}"],
"t": ["@media (forced-colors: active){.fg4l7m0{forced-color-adjust:auto;}}"]
});
const useIconState = (props, options) => {
const {
title,
primaryFill = "currentColor",
...rest
} = props;
const state = {
...rest,
title: undefined,
fill: primaryFill
};
const styles = useRootStyles();
const iconContext = contexts_1.useIconContext();
state.className = react_1.mergeClasses(styles.root, (options === null || options === void 0 ? void 0 : options.flipInRtl) && (iconContext === null || iconContext === void 0 ? void 0 : iconContext.textDirection) === 'rtl' && styles.rtl, state.className);
if (title) {
state['aria-label'] = title;
}
if (!state['aria-label'] && !state['aria-labelledby']) {
state['aria-hidden'] = true;
} else {
state['role'] = 'img';
}
return state;
};
exports.useIconState = useIconState;
+5
View File
@@ -0,0 +1,5 @@
/// <reference types="react" />
import { FluentIconsProps } from "./FluentIconsProps.types";
import { CreateFluentIconOptions, FluentIcon } from "./createFluentIcon";
declare const wrapIcon: (Icon: (iconProps: FluentIconsProps) => JSX.Element, displayName?: string | undefined, options?: CreateFluentIconOptions | undefined) => FluentIcon;
export default wrapIcon;
+22
View File
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const useIconState_1 = require("./useIconState");
const wrapIcon = (Icon, displayName, options) => {
const WrappedIcon = React.forwardRef((props, ref) => {
const state = {
...useIconState_1.useIconState(props, {
flipInRtl: options === null || options === void 0 ? void 0 : options.flipInRtl
}),
ref
};
return React.createElement(Icon, Object.assign({}, state));
});
WrappedIcon.displayName = displayName;
return WrappedIcon;
};
exports.default = wrapIcon;