import { StyledElement } from '../internals/StyledElement.js';
import { default as React } from 'react';
type ElementParts = 'host' | 'label' | 'value' | 'trend';
export type InfoFieldFormat = 'number' | 'currency' | 'date';
export type InfoFieldSize = 'default' | 'lg';
export type InfoFieldTrend = 'up' | 'down' | 'flat';
export type InfoFieldTone = 'positive' | 'negative' | 'neutral';
/** 값이 "아직 없음"인가 — `0` 과 `false` 는 **값이다**. */
export declare function isBlank(v: unknown): boolean;
/**
* 정보 필드 — 읽기 전용 라벨-값 한 쌍.
*
* 🔴★**"아직 없음"과 "0"은 다른 사실이다.**
* `null`·`undefined`·빈 문자열 → **`—`**
* `0`·`false`·`'0'` → **그 값 그대로**
*
* ⚠이 규칙을 사람이 기억하는 방식으로 두면 **반드시 어긋난다.** 실제로 한 소비앱에서
* *"부수가 0인 주문"* 과 *"부수가 아직 안 정해진 주문"* 이 화면에서 똑같이 `—` 로 보였고,
* 그 둘은 업무적으로 전혀 다른 상태였다. 그래서 규칙을 컴포넌트가 소유한다.
*
* ```html
*
* 동서인쇄
*
* ```
*/
export declare class InfoField extends StyledElement {
static styles: import('lit').CSSResultGroup[];
/** 필드 이름. */
label: string;
/**
* 값. `null`/`undefined`/빈 문자열이면 `blank` 문구로 대체된다.
* ⚠`0`·`false` 는 **대체되지 않는다** — 값이기 때문이다.
* 속성(`value="…"`)과 프로퍼티(`.value=`) 둘 다 받는다 — HTML 속성은 항상 문자열이라
* `type: String` 변환기가 붙어도 `.value=${order.quantity}` 같은 비-문자열 프로퍼티
* 바인딩은 그대로 통과한다(변환기는 속성 파싱에만 관여한다). 렌더는 `format` 이 없으면
* 항상 `String(value)`.
*/
value?: unknown;
/** "아직 없음"을 나타낼 문구. */
blank: string;
/**
* 숫자 값 — 우정렬 + 고정폭 숫자(`tabular-nums`).
* ★자릿수가 세로로 맞아야 크기 비교가 눈으로 된다. LOB 화면은 금액·수량이 절반이다.
* `format` 이 `'number'`/`'currency'` 면 이 정렬이 자동으로 함의된다 — 따로 켤 필요 없다.
*/
numeric: boolean;
/**
* Renders the value through `@iyulab/components`' `formatNumber`/`formatCurrency`/
* `formatDate`. When unset (default), falls back to plain `String(value)` as before.
*/
format?: InfoFieldFormat;
/**
* Currency code to use when `format="currency"` (e.g. `'KRW'`). **No default** — if
* omitted, degrades to plain number formatting without a currency symbol (does not throw).
*/
currency?: string;
/**
* Display size. `'lg'` renders the value at the `title` type-scale step
* (`--u-text-title-size`/`--u-text-title-weight`) — intended for dashboard KPI tiles
* composed inside `u-info-section`. Reflects to the `size` attribute so
* `:host([size="lg"])` styling works.
*/
size: InfoFieldSize;
/**
* Trend direction (optional). Renders a trend indicator when set. The directional glyph
* (▲/▼) is decorative (`aria-hidden`) — **pair `trend` with `trendLabel`** so the indicator
* has an accessible name; `trend` alone conveys direction by color only.
*/
trend?: InfoFieldTrend;
/**
* Trend copy, e.g. `"+12% vs last month"`. **Wording is the consumer's responsibility** — this
* component does not compose domain phrasing. Setting this alone (without `trend`) still shows
* the trend part, toned `neutral` unless `tone` is set.
*/
trendLabel?: string;
/**
* Explicit tone override. When unset, resolves from `trend` (`up→positive`, `down→negative`,
* `flat`/unset→`neutral`). **Always wins over inference** — some metrics invert the usual
* direction-to-sentiment mapping (e.g. a falling "open tickets" count is `positive`).
*
* Colors the value text itself, independent of `trend` — a static "balance due" figure can be
* toned `negative` without a trend arrow. `neutral` has no visual effect on the value text
* (it already renders at full strength; only `positive`/`negative` stand out from it).
*/
tone?: InfoFieldTone;
private get hasSlotted();
private formatValue;
render(): import('lit-html').TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'u-info-field': InfoField;
}
}
declare module 'react' {
namespace JSX {
interface IntrinsicElements {
'u-info-field': React.DetailedHTMLProps, HTMLElement> & {
label?: string;
value?: string;
blank?: string;
numeric?: boolean;
format?: InfoFieldFormat;
currency?: string;
size?: InfoFieldSize;
trend?: InfoFieldTrend;
/** 프로퍼티는 `trendLabel`이지만 Lit 기본 속성명 규칙(소문자화, kebab
* 아님)상 실제 HTML 속성명은 `trendlabel`이다. */
trendlabel?: string;
tone?: InfoFieldTone;
};
}
}
}
export {};