achery-ui 0.9.0 → 0.9.2
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/index.cjs +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1888,7 +1888,10 @@ interface EntityPillProps {
|
|
|
1888
1888
|
glyph?: GlyphName;
|
|
1889
1889
|
/** Tone applied to both stamp fill and border. @default 'neutral' */
|
|
1890
1890
|
tone?: LetterStampTone;
|
|
1891
|
-
/**
|
|
1891
|
+
/**
|
|
1892
|
+
* Raw hex colour — sets the stamp fill AND the pill border.
|
|
1893
|
+
* Takes precedence over `tone` for both.
|
|
1894
|
+
*/
|
|
1892
1895
|
colour?: string;
|
|
1893
1896
|
/** Size variant. @default 'md' */
|
|
1894
1897
|
size?: 'sm' | 'md';
|
|
@@ -1897,6 +1900,7 @@ interface EntityPillProps {
|
|
|
1897
1900
|
/** Makes the pill an `<a>` link. */
|
|
1898
1901
|
href?: string;
|
|
1899
1902
|
className?: string;
|
|
1903
|
+
style?: CSSProperties;
|
|
1900
1904
|
}
|
|
1901
1905
|
/**
|
|
1902
1906
|
* Compact entity identifier pill — combines a {@link LetterStamp} with a text label.
|
|
@@ -1908,7 +1912,7 @@ interface EntityPillProps {
|
|
|
1908
1912
|
* <EntityPill label="Subscriptions" glyph="flask" tone="rust" onClick={handleClick} />
|
|
1909
1913
|
* ```
|
|
1910
1914
|
*/
|
|
1911
|
-
declare function EntityPill({ label, letter, glyph, tone, colour, size, onClick, href, className, }: EntityPillProps): react_jsx_runtime.JSX.Element;
|
|
1915
|
+
declare function EntityPill({ label, letter, glyph, tone, colour, size, onClick, href, className, style, }: EntityPillProps): react_jsx_runtime.JSX.Element;
|
|
1912
1916
|
|
|
1913
1917
|
type SparklineTone = 'positive' | 'negative' | 'neutral';
|
|
1914
1918
|
/** Props for the {@link Sparkline} component. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1888,7 +1888,10 @@ interface EntityPillProps {
|
|
|
1888
1888
|
glyph?: GlyphName;
|
|
1889
1889
|
/** Tone applied to both stamp fill and border. @default 'neutral' */
|
|
1890
1890
|
tone?: LetterStampTone;
|
|
1891
|
-
/**
|
|
1891
|
+
/**
|
|
1892
|
+
* Raw hex colour — sets the stamp fill AND the pill border.
|
|
1893
|
+
* Takes precedence over `tone` for both.
|
|
1894
|
+
*/
|
|
1892
1895
|
colour?: string;
|
|
1893
1896
|
/** Size variant. @default 'md' */
|
|
1894
1897
|
size?: 'sm' | 'md';
|
|
@@ -1897,6 +1900,7 @@ interface EntityPillProps {
|
|
|
1897
1900
|
/** Makes the pill an `<a>` link. */
|
|
1898
1901
|
href?: string;
|
|
1899
1902
|
className?: string;
|
|
1903
|
+
style?: CSSProperties;
|
|
1900
1904
|
}
|
|
1901
1905
|
/**
|
|
1902
1906
|
* Compact entity identifier pill — combines a {@link LetterStamp} with a text label.
|
|
@@ -1908,7 +1912,7 @@ interface EntityPillProps {
|
|
|
1908
1912
|
* <EntityPill label="Subscriptions" glyph="flask" tone="rust" onClick={handleClick} />
|
|
1909
1913
|
* ```
|
|
1910
1914
|
*/
|
|
1911
|
-
declare function EntityPill({ label, letter, glyph, tone, colour, size, onClick, href, className, }: EntityPillProps): react_jsx_runtime.JSX.Element;
|
|
1915
|
+
declare function EntityPill({ label, letter, glyph, tone, colour, size, onClick, href, className, style, }: EntityPillProps): react_jsx_runtime.JSX.Element;
|
|
1912
1916
|
|
|
1913
1917
|
type SparklineTone = 'positive' | 'negative' | 'neutral';
|
|
1914
1918
|
/** Props for the {@link Sparkline} component. */
|
package/dist/index.js
CHANGED
|
@@ -3093,7 +3093,8 @@ function EntityPill({
|
|
|
3093
3093
|
size = "md",
|
|
3094
3094
|
onClick,
|
|
3095
3095
|
href,
|
|
3096
|
-
className
|
|
3096
|
+
className,
|
|
3097
|
+
style
|
|
3097
3098
|
}) {
|
|
3098
3099
|
const stampSize = size === "sm" ? 20 : 28;
|
|
3099
3100
|
const isInteractive = Boolean(onClick || href);
|
|
@@ -3101,6 +3102,10 @@ function EntityPill({
|
|
|
3101
3102
|
pill({ tone, size, interactive: isInteractive }),
|
|
3102
3103
|
className
|
|
3103
3104
|
].filter(Boolean).join(" ");
|
|
3105
|
+
const pillStyle = {
|
|
3106
|
+
...colour ? { borderColor: colour } : {},
|
|
3107
|
+
...style
|
|
3108
|
+
};
|
|
3104
3109
|
const labelClass = size === "sm" ? labelSm : labelMd;
|
|
3105
3110
|
const content3 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3106
3111
|
/* @__PURE__ */ jsx(
|
|
@@ -3116,12 +3121,12 @@ function EntityPill({
|
|
|
3116
3121
|
/* @__PURE__ */ jsx("span", { className: labelClass, children: label4 })
|
|
3117
3122
|
] });
|
|
3118
3123
|
if (href) {
|
|
3119
|
-
return /* @__PURE__ */ jsx("a", { href, className: pillClass, children: content3 });
|
|
3124
|
+
return /* @__PURE__ */ jsx("a", { href, className: pillClass, style: pillStyle, children: content3 });
|
|
3120
3125
|
}
|
|
3121
3126
|
if (onClick) {
|
|
3122
|
-
return /* @__PURE__ */ jsx("button", { type: "button", onClick, className: pillClass, children: content3 });
|
|
3127
|
+
return /* @__PURE__ */ jsx("button", { type: "button", onClick, className: pillClass, style: pillStyle, children: content3 });
|
|
3123
3128
|
}
|
|
3124
|
-
return /* @__PURE__ */ jsx("span", { className: pillClass, children: content3 });
|
|
3129
|
+
return /* @__PURE__ */ jsx("span", { className: pillClass, style: pillStyle, children: content3 });
|
|
3125
3130
|
}
|
|
3126
3131
|
|
|
3127
3132
|
// src/components/Sparkline/Sparkline.css.ts
|