@mhmo91/schmancy 0.9.22 → 0.9.24
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/custom-elements.json +116 -0
- package/dist/agent/schmancy.agent.js +582 -262
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +139 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/handover/agent-runtime-v2-loopback.md +5 -5
- package/dist/handover/claude-design-brief.md +54 -19
- package/dist/index.cjs +1 -1
- package/dist/index.js +27 -26
- package/dist/metric.cjs +69 -0
- package/dist/metric.cjs.map +1 -0
- package/dist/metric.js +93 -0
- package/dist/metric.js.map +1 -0
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/{src-C9DpHCWF.cjs → src-Ci10_Iwf.cjs} +1 -1
- package/dist/{src-C9DpHCWF.cjs.map → src-Ci10_Iwf.cjs.map} +1 -1
- package/dist/{src-B0jLOpqn.js → src-DNuhxDig.js} +1 -0
- package/dist/{src-B0jLOpqn.js.map → src-DNuhxDig.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/typography.cjs +3 -3
- package/dist/typography.cjs.map +1 -1
- package/dist/typography.js +107 -10
- package/dist/typography.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/metric/index.ts +1 -0
- package/src/metric/metric.ts +127 -0
- package/src/typography/typography.ts +94 -1
- package/types/src/index.d.ts +1 -0
- package/types/src/metric/index.d.ts +1 -0
- package/types/src/metric/metric.d.ts +39 -0
- package/types/src/typography/typography.d.ts +32 -0
package/types/src/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './metric';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type MetricTrend = 'up' | 'down' | 'neutral';
|
|
2
|
+
export type MetricSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
declare const SchmancyMetric_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
4
|
+
/**
|
|
5
|
+
* KPI metric — a label + value pair for dashboards, with optional trend + delta indicators.
|
|
6
|
+
*
|
|
7
|
+
* @element schmancy-metric
|
|
8
|
+
* @summary The building block of dashboards and meta bars. Pass `label` + `value` for a basic stat; add `trend` / `delta` for the delta-from-last-period pattern. Use multiple metrics side-by-side with Tailwind flex/grid utilities.
|
|
9
|
+
* @example
|
|
10
|
+
* <schmancy-metric label="In flight" value="4"></schmancy-metric>
|
|
11
|
+
* <schmancy-metric label="Open value" value="€165,900" trend="up" delta="+12%"></schmancy-metric>
|
|
12
|
+
* <schmancy-metric label="Error rate" value="0.3%" trend="down" delta="-0.1%"></schmancy-metric>
|
|
13
|
+
* @platform div - Styled `<div>` with two text lines + optional trend arrow. Degrades to a plain div+spans if the tag never registers.
|
|
14
|
+
* @slot - Optional custom value rendering (overrides the `value` attribute if present).
|
|
15
|
+
* @slot label - Optional custom label rendering (overrides the `label` attribute if present).
|
|
16
|
+
* @csspart label - The label line.
|
|
17
|
+
* @csspart value - The value line.
|
|
18
|
+
* @csspart delta - The delta pill (only when `delta` is set).
|
|
19
|
+
*/
|
|
20
|
+
export declare class SchmancyMetric extends SchmancyMetric_base {
|
|
21
|
+
/** Upper-case caption shown above the value. */
|
|
22
|
+
label: string;
|
|
23
|
+
/** Primary metric value, rendered large. Pre-format numbers/currency yourself. */
|
|
24
|
+
value: string;
|
|
25
|
+
/** Optional trend direction. Controls the color + arrow on the delta pill. */
|
|
26
|
+
trend?: MetricTrend;
|
|
27
|
+
/** Optional delta copy displayed in a pill next to the value (e.g. `+12%`). */
|
|
28
|
+
delta?: string;
|
|
29
|
+
/** Size scale affecting label + value typography. */
|
|
30
|
+
size: MetricSize;
|
|
31
|
+
private _arrowFor;
|
|
32
|
+
protected render(): unknown;
|
|
33
|
+
}
|
|
34
|
+
declare global {
|
|
35
|
+
interface HTMLElementTagNameMap {
|
|
36
|
+
'schmancy-metric': SchmancyMetric;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import { type PropertyValues } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Preset → (type, token) shorthand. Saves the two-decision-per-text-node
|
|
4
|
+
* fatigue that 50+ typography nodes in a single page cause.
|
|
5
|
+
*/
|
|
6
|
+
export type TypographyPreset = 'display' | 'display-lg' | 'display-md' | 'display-sm' | 'heading-lg' | 'heading-md' | 'heading-sm' | 'title-lg' | 'title-md' | 'title-sm' | 'body-lg' | 'body-md' | 'body-sm' | 'label-lg' | 'label-md' | 'label-sm' | 'caption';
|
|
7
|
+
/**
|
|
8
|
+
* Allowed semantic tag names for the `as` prop. Closed enum so we can
|
|
9
|
+
* use `literal` template parts safely with `lit/static-html`.
|
|
10
|
+
*/
|
|
11
|
+
export type TypographyTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
|
|
1
12
|
declare const SchmancyTypography_base: import("../../mixins").Constructor<CustomElementConstructor> & import("../../mixins").Constructor<import("@mixins/tailwind.mixin").ITailwindElementMixin> & import("../../mixins").Constructor<import("lit").LitElement> & import("../../mixins").Constructor<import("../../mixins").IBaseMixin>;
|
|
2
13
|
/**
|
|
3
14
|
* @element schmancy-typography
|
|
@@ -11,6 +22,26 @@ export declare class SchmancyTypography extends SchmancyTypography_base {
|
|
|
11
22
|
* @type {'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label'}
|
|
12
23
|
*/
|
|
13
24
|
type: 'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label';
|
|
25
|
+
/**
|
|
26
|
+
* Shorthand for picking a (type, token) pair in one go. When set, derives
|
|
27
|
+
* `type` and `token` automatically — saves the two-decisions-per-text-node
|
|
28
|
+
* fatigue that hits when a single page has 50+ typography nodes.
|
|
29
|
+
*
|
|
30
|
+
* @attr preset
|
|
31
|
+
* @type {TypographyPreset}
|
|
32
|
+
* @example <schmancy-typography preset="heading-md">Title</schmancy-typography>
|
|
33
|
+
*/
|
|
34
|
+
preset?: TypographyPreset;
|
|
35
|
+
/**
|
|
36
|
+
* Render the slot wrapped in the requested semantic HTML element so screen
|
|
37
|
+
* readers expose the right role / heading level. Without `as`, the slot
|
|
38
|
+
* sits directly in the shadow root and the host is a generic element.
|
|
39
|
+
*
|
|
40
|
+
* @attr as
|
|
41
|
+
* @type {TypographyTag}
|
|
42
|
+
* @example <schmancy-typography preset="heading-md" as="h2">Section</schmancy-typography>
|
|
43
|
+
*/
|
|
44
|
+
as?: TypographyTag;
|
|
14
45
|
/**
|
|
15
46
|
* @attr token - The size token.
|
|
16
47
|
* @deprecated Prefer using Tailwind responsive text classes for better responsive design.
|
|
@@ -49,6 +80,7 @@ export declare class SchmancyTypography extends SchmancyTypography_base {
|
|
|
49
80
|
/** Placeholder shown when editable and empty */
|
|
50
81
|
placeholder: string;
|
|
51
82
|
private _editRef;
|
|
83
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
52
84
|
/** Focus and select all text in editable mode */
|
|
53
85
|
selectAll(): void;
|
|
54
86
|
connectedCallback(): void;
|