@monospaced/set-core 0.0.1 → 0.2.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.
- package/dist/components/button/button.d.ts +3 -3
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/icon/icon.d.ts +9 -7
- package/dist/components/icon/icon.d.ts.map +1 -1
- package/dist/components/icon/icons-custom.d.ts +10 -0
- package/dist/components/icon/icons-custom.d.ts.map +1 -0
- package/dist/components/icon/icons-tdesign.d.ts +2 -0
- package/dist/components/icon/icons-tdesign.d.ts.map +1 -0
- package/dist/components/icon/icons.generated.d.ts +3 -3
- package/dist/components/icon/icons.generated.d.ts.map +1 -1
- package/dist/components/logo/logo.d.ts +1 -1
- package/dist/components/logo/logo.d.ts.map +0 -1
- package/dist/components/menu/menu.d.ts +2 -2
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1521 -27831
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SetNode } from "../../helpers/node";
|
|
2
2
|
import type { SetComponentSpec } from "../../spec";
|
|
3
|
-
import { type SetIconMirrorMode } from "../icon/icon";
|
|
3
|
+
import { type SetIconMirrorMode, type SetIconName } from "../icon/icon";
|
|
4
4
|
export type SetButtonAppearance = "outline" | "solid" | "text";
|
|
5
5
|
export type SetButtonHasPopup = "menu";
|
|
6
6
|
export type SetButtonLabelVisibility = "visible" | "hidden" | "hiddenBelowTablet";
|
|
@@ -38,8 +38,8 @@ export interface SetButtonProps {
|
|
|
38
38
|
haspopup?: SetButtonHasPopup;
|
|
39
39
|
/** DOM id. */
|
|
40
40
|
id?: string;
|
|
41
|
-
/** Optional icon name
|
|
42
|
-
icon?:
|
|
41
|
+
/** Optional icon name. */
|
|
42
|
+
icon?: SetIconName;
|
|
43
43
|
/** Optional icon mirroring mode. Ignored when `icon` is omitted. */
|
|
44
44
|
iconMirrored?: SetIconMirrorMode;
|
|
45
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAC/D,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACvC,MAAM,MAAM,wBAAwB,GAChC,SAAS,GACT,QAAQ,GACR,mBAAmB,CAAC;AACxB,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,KAAK,CAAC;AACjD,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC/C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAClD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,oEAAoE;IACpE,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAC3C,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAmF7D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAE7D;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,gBAyL7B,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type SetNode } from "../../helpers/node";
|
|
2
2
|
import type { SetComponentSpec } from "../../spec";
|
|
3
|
-
|
|
3
|
+
import type { SET_ICON_CUSTOM } from "./icons-custom";
|
|
4
|
+
import type { TDESIGN_ICON_NAMES } from "./icons-tdesign";
|
|
4
5
|
export type SetIconMirrorMode = "always" | "rtl";
|
|
6
|
+
export type SetIconName = (typeof TDESIGN_ICON_NAMES)[number] | keyof typeof SET_ICON_CUSTOM;
|
|
5
7
|
export type SetIconSize = "2xs" | "xs" | "sm" | "md" | "lg" | "fill";
|
|
8
|
+
export declare const SET_ICON_NAMES: SetIconName[];
|
|
6
9
|
export interface SetIconProps {
|
|
7
10
|
/** Emits `aria-hidden="true"` when true. @default true */
|
|
8
11
|
ariaHidden?: boolean;
|
|
@@ -10,8 +13,8 @@ export interface SetIconProps {
|
|
|
10
13
|
id?: string;
|
|
11
14
|
/** SVG title text. Required when `ariaHidden` is false. */
|
|
12
15
|
title?: string;
|
|
13
|
-
/**
|
|
14
|
-
name:
|
|
16
|
+
/** Set icon name. */
|
|
17
|
+
name: SetIconName;
|
|
15
18
|
/** Horizontal mirroring behavior. Omit for no mirroring. */
|
|
16
19
|
mirrored?: SetIconMirrorMode;
|
|
17
20
|
/** Size variant. @default "md" */
|
|
@@ -20,9 +23,8 @@ export interface SetIconProps {
|
|
|
20
23
|
/**
|
|
21
24
|
* Builds the IR tree for the Set icon component.
|
|
22
25
|
*
|
|
23
|
-
* Emits inline `<svg>` markup for
|
|
24
|
-
*
|
|
25
|
-
* not set them.
|
|
26
|
+
* Emits inline `<svg>` markup for a Set icon. Stroke, fill, and linecap are
|
|
27
|
+
* authored per-path in the source SVGs, so the SVG root does not set them.
|
|
26
28
|
*
|
|
27
29
|
* @param props - Icon component props.
|
|
28
30
|
* @returns IR node for the Set icon component.
|
|
@@ -31,7 +33,7 @@ export declare function buildSetIcon({ ariaHidden, id, mirrored, name, size, tit
|
|
|
31
33
|
/**
|
|
32
34
|
* SSR renderer for the Set icon component.
|
|
33
35
|
*
|
|
34
|
-
* Emits inline `<svg>` markup for
|
|
36
|
+
* Emits inline `<svg>` markup for a Set icon.
|
|
35
37
|
*
|
|
36
38
|
* @param props - Icon component props.
|
|
37
39
|
* @returns HTML string for the Set icon component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,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AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAEzD;AAED,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,gBAkH3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons-custom.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icons-custom.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,eAAe;;;;;;;;CAQU,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const TDESIGN_ICON_NAMES: readonly ["adjustment", "arrow-down", "arrow-left-right-1", "arrow-left", "arrow-right", "arrow-up-down-1", "arrow-up", "check-circle", "chevron-down", "chevron-right", "circle", "city-6", "close", "copy", "download", "enter", "error-circle", "error-triangle", "horizontal", "info-circle", "jump", "layers", "link", "member", "pantone", "play", "rectangle", "refresh", "robot-1", "search", "setting-1", "swap", "user-1", "view-list"];
|
|
2
|
+
//# sourceMappingURL=icons-tdesign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons-tdesign.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icons-tdesign.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,mbAmCrB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface IconNode {
|
|
2
2
|
tag: string;
|
|
3
3
|
attrs: Record<string, string>;
|
|
4
|
-
children?:
|
|
4
|
+
children?: IconNode[];
|
|
5
5
|
}
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const ICON_NODES: Record<string, IconNode[]>;
|
|
7
7
|
//# sourceMappingURL=icons.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.generated.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icons.generated.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icons.generated.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icons.generated.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,CA6nBjD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type SetNode } from "../../helpers/node";
|
|
2
2
|
import type { SetComponentSpec } from "../../spec";
|
|
3
3
|
export type SetLogoTone = "default" | "neutral";
|
|
4
|
-
export type SetLogoSize = "sm" | "md" | "lg" | "fill";
|
|
4
|
+
export type SetLogoSize = "sm" | "md" | "lg" | "xl" | "fill";
|
|
5
5
|
export type SetLogoVariant = "primary" | "secondary" | "typographic" | "graphic";
|
|
6
6
|
export interface SetLogoProps {
|
|
7
7
|
/** DOM id. */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../src/components/logo/logo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAChD,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AACtD,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,WAAW,GACX,aAAa,GACb,SAAS,CAAC;AAEd,MAAM,WAAW,YAAY;IAC3B,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,kCAAkC;IAClC,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,KAAK,EACL,IAAW,EACX,IAAgB,EAChB,OAAmB,GACpB,EAAE,YAAY,GAAG,OAAO,CAsBxB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAEzD;AAED,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,gBAmE3B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { type SetNode } from "../../helpers/node";
|
|
|
2
2
|
import type { SetComponentSpec } from "../../spec";
|
|
3
3
|
import type { SetControlSize } from "../../types";
|
|
4
4
|
import { type SetButtonLabelVisibility, type SetButtonPlacement } from "../button/button";
|
|
5
|
-
import type { SetIconMirrorMode } from "../icon/icon";
|
|
5
|
+
import type { SetIconMirrorMode, SetIconName } from "../icon/icon";
|
|
6
6
|
export declare const SET_MENU_TAG_NAME = "set-menu";
|
|
7
7
|
export declare const SET_MENU_EVENT_CHOOSE = "set-menu-choose";
|
|
8
8
|
export type SetMenuAlign = "start" | "end";
|
|
@@ -24,7 +24,7 @@ export interface SetMenuProps {
|
|
|
24
24
|
/** Control size applied to the host and composed trigger button. @default "md" */
|
|
25
25
|
size?: SetControlSize;
|
|
26
26
|
/** Icon name for the trigger button. */
|
|
27
|
-
triggerIcon?:
|
|
27
|
+
triggerIcon?: SetIconName;
|
|
28
28
|
/** Icon mirroring mode for the trigger button icon. */
|
|
29
29
|
triggerIconMirrored?: SetIconMirrorMode;
|
|
30
30
|
/** Icon placement within the trigger button. @default "start" */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AA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