@trebired/frontend 1.13.1 → 1.13.3

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/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ This project follows semantic versioning once published.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.13.3
10
+
11
+ - Added package-owned entity icon helpers so ecosystem apps can remove local entity icon factories while keeping app-specific icon specs.
12
+
13
+ ## 1.13.2
14
+
15
+ - Added package-owned `.text-link` primitive styling so ecosystem apps can remove local text-link SCSS while keeping the shared class.
16
+
9
17
  ## 1.13.1
10
18
 
11
19
  - Fixed the shell mobile navigation section prop type so JSX content slots are accepted by package consumers.
@@ -0,0 +1,18 @@
1
+ import type { HTMLAttributes } from "react";
2
+ type EntityIconProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
3
+ alt?: string;
4
+ defaultSize?: string;
5
+ iconClassName?: string;
6
+ size?: string;
7
+ spec: string;
8
+ };
9
+ type EntityIconConfig = {
10
+ defaultSize?: string;
11
+ label?: string;
12
+ spec: string;
13
+ };
14
+ declare function EntityIcon(props: EntityIconProps): import("react").JSX.Element;
15
+ declare function createEntityIcon(config: EntityIconConfig): (props?: Omit<EntityIconProps, "defaultSize" | "spec">) => import("react").JSX.Element;
16
+ export { createEntityIcon, EntityIcon };
17
+ export type { EntityIconConfig, EntityIconProps };
18
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/entity/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAOF,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,+BA0BzC;AAED,iBAAS,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,IAE9C,QAAO,IAAI,CAAC,eAAe,EAAE,aAAa,GAAG,MAAM,CAAM,iCAW5D;AAED,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Icon } from "../icons/react/index.js";
3
+ function text(value, fallback = "") {
4
+ const out = String(value == null ? "" : value).trim();
5
+ return out || fallback;
6
+ }
7
+ function EntityIcon(props) {
8
+ const { alt, className, defaultSize = "xl3", iconClassName, size, spec, ...attrs } = props;
9
+ const altText = text(alt);
10
+ const sizeClass = text(size, defaultSize);
11
+ const wrapperClassName = [`text-${sizeClass}`, className]
12
+ .filter(Boolean)
13
+ .join(" ");
14
+ return (_jsx("div", { ...attrs, className: wrapperClassName, "aria-hidden": altText ? undefined : true, "aria-label": altText || undefined, children: _jsx(Icon, { spec: spec, className: iconClassName }) }));
15
+ }
16
+ function createEntityIcon(config) {
17
+ return function ConfiguredEntityIcon(props = {}) {
18
+ return (_jsx(EntityIcon, { ...props, alt: text(props.alt, config.label), defaultSize: config.defaultSize, spec: config.spec }));
19
+ };
20
+ }
21
+ export { createEntityIcon, EntityIcon };
22
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/entity/icon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,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AC;AACJ,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC"}
@@ -1,2 +1,3 @@
1
+ export * from "./icon.js";
1
2
  export * from "./list.js";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
@@ -1,2 +1,3 @@
1
+ export * from "./icon.js";
1
2
  export * from "./list.js";
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
@@ -58,6 +58,22 @@
58
58
  min-height: 0;
59
59
  }
60
60
 
61
+ .text-link {
62
+ color: var(--text-color-muted, var(--tbf-text-muted, var(--tbf-text, currentColor)));
63
+ font-weight: inherit;
64
+ text-decoration-line: underline;
65
+ text-decoration-style: dotted;
66
+ text-decoration-thickness: 1px;
67
+ text-underline-offset: 3px;
68
+ transition: color var(--transition-fast, var(--tbf-transition-fast, 120ms ease));
69
+ }
70
+
71
+ .text-link:hover,
72
+ .text-link:focus {
73
+ color: var(--text-color, var(--tbf-text, currentColor));
74
+ text-decoration-style: solid;
75
+ }
76
+
61
77
  [data-tbf-table] {
62
78
  width: 100%;
63
79
  border-collapse: collapse;
@@ -0,0 +1,18 @@
1
+ import type { HTMLAttributes } from "react";
2
+ type EntityIconProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
3
+ alt?: string;
4
+ defaultSize?: string;
5
+ iconClassName?: string;
6
+ size?: string;
7
+ spec: string;
8
+ };
9
+ type EntityIconConfig = {
10
+ defaultSize?: string;
11
+ label?: string;
12
+ spec: string;
13
+ };
14
+ declare function EntityIcon(props: EntityIconProps): import("react").JSX.Element;
15
+ declare function createEntityIcon(config: EntityIconConfig): (props?: Omit<EntityIconProps, "defaultSize" | "spec">) => import("react").JSX.Element;
16
+ export { createEntityIcon, EntityIcon };
17
+ export type { EntityIconConfig, EntityIconProps };
18
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/entity/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAOF,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,+BA0BzC;AAED,iBAAS,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,IAE9C,QAAO,IAAI,CAAC,eAAe,EAAE,aAAa,GAAG,MAAM,CAAM,iCAW5D;AAED,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Icon } from "../../icons/react/index.js";
3
+ function text(value, fallback = "") {
4
+ const out = String(value == null ? "" : value).trim();
5
+ return out || fallback;
6
+ }
7
+ function EntityIcon(props) {
8
+ const { alt, className, defaultSize = "xl3", iconClassName, size, spec, ...attrs } = props;
9
+ const altText = text(alt);
10
+ const sizeClass = text(size, defaultSize);
11
+ const wrapperClassName = [`text-${sizeClass}`, className]
12
+ .filter(Boolean)
13
+ .join(" ");
14
+ return (_jsx("div", { ...attrs, className: wrapperClassName, "aria-hidden": altText ? undefined : true, "aria-label": altText || undefined, children: _jsx(Icon, { spec: spec, className: iconClassName }) }));
15
+ }
16
+ function createEntityIcon(config) {
17
+ return function ConfiguredEntityIcon(props = {}) {
18
+ return (_jsx(EntityIcon, { ...props, alt: text(props.alt, config.label), defaultSize: config.defaultSize, spec: config.spec }));
19
+ };
20
+ }
21
+ export { createEntityIcon, EntityIcon };
22
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/entity/icon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAgBrC,SAAS,IAAI,CAAC,KAAc,EAAE,QAAQ,GAAG,EAAE;IACzC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IACtD,OAAO,GAAG,IAAI,QAAQ,CAAC;AACzB,CAAC;AAED,SAAS,UAAU,CAAC,KAAsB;IACxC,MAAM,EACJ,GAAG,EACH,SAAS,EACT,WAAW,GAAG,KAAK,EACnB,aAAa,EACb,IAAI,EACJ,IAAI,EACJ,GAAG,KAAK,EACT,GAAG,KAAK,CAAC;IACV,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC1C,MAAM,gBAAgB,GAAG,CAAC,QAAQ,SAAS,EAAE,EAAE,SAAS,CAAC;SACxD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEX,OAAO,CACL,iBACI,KAAK,EACT,SAAS,EAAE,gBAAgB,iBACd,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,gBAC3B,OAAO,IAAI,SAAS,YAEhC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,GAAI,GACxC,CACP,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAwB;IAChD,OAAO,SAAS,oBAAoB,CAClC,QAAuD,EAAE;QAEzD,OAAO,CACL,KAAC,UAAU,OACP,KAAK,EACT,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,EAClC,WAAW,EAAE,MAAM,CAAC,WAAW,EAC/B,IAAI,EAAE,MAAM,CAAC,IAAI,GACf,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC"}
@@ -1,2 +1,3 @@
1
+ export * from "./icon.js";
1
2
  export * from "./list.js";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
@@ -1,2 +1,3 @@
1
+ export * from "./icon.js";
1
2
  export * from "./list.js";
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trebired/frontend",
3
- "version": "1.13.1",
3
+ "version": "1.13.3",
4
4
  "description": "Generic browser runtime systems for Trebired frontend packages and applications.",
5
5
  "type": "module",
6
6
  "private": false,