@fluid-topics/ft-icon 2.0.38 → 2.1.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.
@@ -1,8 +1,8 @@
1
1
  export declare const FtIconCssVariables: {
2
- size: import("@fluid-topics/ft-wc-utils").FtCssVariable;
3
- fluidTopicsFontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
4
- fileFormatFontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
5
- materialFontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
6
- verticalAlign: import("@fluid-topics/ft-wc-utils").FtCssVariable;
2
+ size: import("@fluid-topics/design-system-variables").FtCssVariable;
3
+ fluidTopicsFontFamily: import("@fluid-topics/design-system-variables").FtCssVariable;
4
+ fileFormatFontFamily: import("@fluid-topics/design-system-variables").FtCssVariable;
5
+ materialFontFamily: import("@fluid-topics/design-system-variables").FtCssVariable;
6
+ verticalAlign: import("@fluid-topics/design-system-variables").FtCssVariable;
7
7
  };
8
8
  export declare const styles: import("lit").CSSResult[];
package/build/index.d.ts CHANGED
@@ -2,8 +2,4 @@ export * from "./ft-icon.styles";
2
2
  export * from "./ft-icon.properties";
3
3
  export * from "./ft-icon";
4
4
  export * from "./icons";
5
- export * from "./ftds-icon.styles";
6
- export * from "./ftds-icon.properties";
7
- export * from "./ftds-icon";
8
- export * from "./ftds-icons";
9
5
  import "./define";
package/build/index.js CHANGED
@@ -2,8 +2,4 @@ export * from "./ft-icon.styles";
2
2
  export * from "./ft-icon.properties";
3
3
  export * from "./ft-icon";
4
4
  export * from "./icons";
5
- export * from "./ftds-icon.styles";
6
- export * from "./ftds-icon.properties";
7
- export * from "./ftds-icon";
8
- export * from "./ftds-icons";
9
5
  import "./define";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-icon",
3
- "version": "2.0.38",
3
+ "version": "2.1.0",
4
4
  "description": "Typography components",
5
5
  "keywords": [
6
6
  "Lit"
@@ -20,9 +20,9 @@
20
20
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
21
21
  },
22
22
  "dependencies": {
23
- "@fluid-topics/ft-wc-utils": "2.0.38",
24
- "@fortawesome/fontawesome-svg-core": "7.2.0",
23
+ "@fluid-topics/ft-wc-utils": "2.1.0",
24
+ "@fortawesome/fontawesome-svg-core": "7.3.0",
25
25
  "lit": "3.1.0"
26
26
  },
27
- "gitHead": "8a5f1d6fb69ac18ec2e6d05dcf82e036d7423c35"
27
+ "gitHead": "4727cf19d04236ad1d2b2cb43ce1c46298834c7e"
28
28
  }
@@ -1,13 +0,0 @@
1
- import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
2
- import { FtdsIconProperties, FtdsIconVariants } from "./ftds-icon.properties.js";
3
- import { FtdsIcons } from "./ftds-icons";
4
- export declare class FtdsIcon extends FtLitElement implements FtdsIconProperties {
5
- static elementDefinitions: ElementDefinitionsMap;
6
- static styles: import("lit").CSSResult[];
7
- variant?: FtdsIconVariants;
8
- icon?: FtdsIcons;
9
- monospace: boolean;
10
- ariaHidden: string;
11
- protected render(): import("lit-html").TemplateResult<1>;
12
- private buildIcon;
13
- }
@@ -1,55 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html } from "lit";
8
- import { property } from "lit/decorators.js";
9
- import { FtLitElement, } from "@fluid-topics/ft-wc-utils";
10
- import { unsafeHTML } from "lit/directives/unsafe-html.js";
11
- import { classMap } from "lit/directives/class-map.js";
12
- import { dsStyles } from "./ftds-icon.styles.js";
13
- import { all } from "./ftds-icons-definition.js";
14
- import { icon, library, } from "@fortawesome/fontawesome-svg-core";
15
- import { faPrefixByVariant, } from "./ftds-icons";
16
- export class FtdsIcon extends FtLitElement {
17
- constructor() {
18
- super(...arguments);
19
- this.monospace = false;
20
- this.ariaHidden = "true";
21
- }
22
- render() {
23
- const classes = {
24
- "ftds-icon": true,
25
- "ftds-icon--monospace": this.monospace,
26
- };
27
- return html `
28
- <div class="${classMap(classes)}">${unsafeHTML(this.buildIcon())}</div>
29
- `;
30
- }
31
- buildIcon() {
32
- const faPrefix = this.variant ? faPrefixByVariant[this.variant] : undefined;
33
- const iconDef = all.find((icon) => icon.iconName === this.icon && (faPrefix ? icon.prefix === faPrefix : true));
34
- if (!iconDef) {
35
- console.log(`Attempted usage of unknown ftds-icon : ${this.icon}/${this.variant}`);
36
- return "";
37
- }
38
- library.add(iconDef);
39
- return icon(iconDef).html[0];
40
- }
41
- }
42
- FtdsIcon.elementDefinitions = {};
43
- FtdsIcon.styles = dsStyles;
44
- __decorate([
45
- property()
46
- ], FtdsIcon.prototype, "variant", void 0);
47
- __decorate([
48
- property()
49
- ], FtdsIcon.prototype, "icon", void 0);
50
- __decorate([
51
- property({ type: Boolean })
52
- ], FtdsIcon.prototype, "monospace", void 0);
53
- __decorate([
54
- property({ reflect: true, attribute: "aria-hidden" })
55
- ], FtdsIcon.prototype, "ariaHidden", void 0);
@@ -1,11 +0,0 @@
1
- import { FtdsIcons } from "./ftds-icons";
2
- export declare enum FtdsIconVariants {
3
- regular = "regular",
4
- solid = "solid",
5
- custom = "custom"
6
- }
7
- export interface FtdsIconProperties {
8
- variant?: FtdsIconVariants;
9
- icon?: FtdsIcons;
10
- monospace?: boolean;
11
- }
@@ -1,6 +0,0 @@
1
- export var FtdsIconVariants;
2
- (function (FtdsIconVariants) {
3
- FtdsIconVariants["regular"] = "regular";
4
- FtdsIconVariants["solid"] = "solid";
5
- FtdsIconVariants["custom"] = "custom";
6
- })(FtdsIconVariants || (FtdsIconVariants = {}));
@@ -1,4 +0,0 @@
1
- export declare const FtdsIconCssVariables: {
2
- size: import("@fluid-topics/ft-wc-utils").FtCssVariable;
3
- };
4
- export declare const dsStyles: import("lit").CSSResult[];
@@ -1,26 +0,0 @@
1
- import { css } from "lit";
2
- import { FtCssVariableFactory, noTextSelect } from "@fluid-topics/ft-wc-utils";
3
- export const FtdsIconCssVariables = {
4
- size: FtCssVariableFactory.create("--ftds-icon-font-size", "", "SIZE", "24px"),
5
- };
6
- // language=css
7
- export const dsStyles = [
8
- css `
9
- :host {
10
- display: inline-flex;
11
- }
12
-
13
- .ftds-icon {
14
- display: inline-flex;
15
- }
16
-
17
- svg {
18
- height: ${FtdsIconCssVariables.size};
19
- }
20
-
21
- .ftds-icon--monospace svg {
22
- width: ${FtdsIconCssVariables.size};
23
- }
24
- `,
25
- noTextSelect,
26
- ];
@@ -1,4 +0,0 @@
1
- import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
2
- export type IconPrefix = "fak" | "fas" | "far";
3
- export type IconName = "lock-keyhole" | "link-simple-slash" | "table-layout" | "layer-group" | "circle-info" | "bars-progress" | "code-compare" | "hourglass-end" | "box-archive" | "arrows-rotate" | "circle-dot" | "angles-left" | "route" | "bars" | "arrow-down" | "lock-keyhole-open" | "desktop" | "angles-right" | "piggy-bank" | "angle-up" | "square" | "pen-nib" | "arrow-up-right-from-square" | "grid-2" | "books" | "tag" | "angles-up-down" | "arrow-rotate-left" | "eye-slash" | "circle-dollar" | "compress" | "radar" | "arrow-rotate-right" | "chart-network" | "plus" | "underline" | "arrow-left" | "upload" | "globe" | "language" | "toggle-on" | "download" | "message-quote" | "triangle-exclamation" | "star" | "bell-slash" | "hourglass-half" | "inbox" | "comment-dots" | "angle-down" | "cloud-arrow-down" | "bookmark-slash" | "link-simple" | "clock-rotate-left" | "spinner-third" | "plug" | "chart-simple" | "circle-play" | "file-magnifying-glass" | "pen" | "tablet" | "circle-check" | "file-invoice" | "xmark" | "arrow-right" | "bookmark" | "expand-wide" | "user" | "server" | "calendar-range" | "broom-wide" | "arrows-up-down-left-right" | "wifi-slash" | "check" | "italic" | "life-ring" | "table-cells" | "trash-can" | "wrench" | "paperclip" | "cabinet-filing" | "arrow-up" | "file" | "circle-question" | "columns-3" | "gear" | "chart-line" | "thumbs-up" | "hand" | "circle" | "calendar-day" | "cloud" | "list-tree" | "angle-right" | "code" | "align-center" | "comment-question" | "image" | "arrow-up-right-and-arrow-down-left-from-center" | "thumbs-down" | "diagram-sankey" | "message-check" | "bold" | "circle-stop" | "arrow-right-to-bracket" | "users" | "arrow-turn-down-right" | "print" | "align-right" | "flask" | "magnifying-glass-plus" | "shield-check" | "strikethrough" | "folder-open" | "clone" | "heart" | "paper-plane" | "magnifying-glass-minus" | "book" | "clock" | "ellipsis-vertical" | "arrow-right-to-line" | "angle-left" | "calendar-circle-exclamation" | "expand" | "equals" | "receipt" | "eye" | "align-left" | "paintbrush" | "key" | "palette" | "floppy-disk" | "magnifying-glass" | "ellipsis" | "share-nodes" | "arrows-from-line" | "power-off" | "envelope-open-text" | "circle-pause" | "mobile" | "bell" | "filter" | "medal" | "cloud-slash" | "minus" | "paste" | "calendar-check" | "hexagon-xmark" | "pause" | "chart-mixed" | "robot" | "anchor" | "wand-magic-sparkles" | "hexagon-exclamation" | "cubes" | "turn-right" | "square-info" | "message-bot" | "play" | "turn-left" | "address-card" | "crown" | "square-check" | "grip-lines" | "chart-area" | "trash" | "user-tie" | "circle-small" | "square-minus" | "regular-folder-open-lock" | "regular-user-circle-check" | "solid-left-panel" | "regular-binder-open" | "regular-bookmark-circle-plus" | "regular-diagram-sunburst" | "regular-preview" | "regular-context" | "regular-mobile-landscape" | "solid-file-rotate-right" | "regular-pip-wide" | "regular-clone-link-simple" | "regular-left-panel" | "light-file-lines-gear" | "regular-file-lines-gear" | "regular-circle-dashed-dollar-question" | "regular-table-cells-slash" | "regular-book-open-gear-slash" | "regular-tablet-landscape" | "regular-chart-bar-stacked" | "solid-circle-user-circle-check" | "regular-bullets-line" | "regular-language-circle-exclamation" | "solid-code-compare" | "regular-format-clear" | "regular-paper-plane-slash" | "regular-magnifying-glass-back" | "light-receipt-gear" | "regular-binder-open-arrow-left" | "regular-hourglass-half-circle-check" | "regular-threshold" | "regular-pip" | "regular-user-gear" | "solid-message-bot-circle-bolt" | "regular-bell-circle-plus" | "regular-cloud-slash-gear" | "regular-house-magnifying-glass" | "solid-circle-user-slash" | "regular-list-magnifying-glass" | "regular-computer-mouse-magnifying-glass" | "regular-language-slash" | "regular-chart-bar-grouped" | "regular-consumer" | "regular-chart-bar-normalized" | "regular-user-lock" | "regular-circle-dollar-slash" | "regular-binder-open-arrow-right" | "regular-bullets-lines" | "regular-binder-open-pen" | "regular-bookmark-circle-minus" | "regular-magnifying-glass-one" | "regular-book-open-gear" | "light-message-bot-circle-bolt" | "light-book-open-gear";
4
- export declare const all: IconDefinition[];