@yanolja-next/design-core 0.0.1 → 0.1.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/AGENTS.md +37 -0
- package/README.md +145 -1
- package/RULES.md +470 -0
- package/catalog.json +1345 -0
- package/dist/catalog.d.ts +11 -0
- package/dist/components/button/ActionRow.d.ts +2 -0
- package/dist/components/button/Button.d.ts +20 -0
- package/dist/components/button/ButtonLink.d.ts +9 -0
- package/dist/components/button/CopyBox.d.ts +7 -0
- package/dist/components/button/CopyButton.d.ts +6 -0
- package/dist/components/button/CopyText.d.ts +10 -0
- package/dist/components/button/ExpandToggle.d.ts +8 -0
- package/dist/components/button/GoLink.d.ts +11 -0
- package/dist/components/button/TextButton.d.ts +3 -0
- package/dist/components/button/ToolButton.d.ts +7 -0
- package/dist/components/button/index.d.ts +19 -0
- package/dist/components/data/card/Card.d.ts +31 -0
- package/dist/components/data/card/index.d.ts +2 -0
- package/dist/components/data/change-group/ChangeGroup.d.ts +10 -0
- package/dist/components/data/change-group/MarkList.d.ts +12 -0
- package/dist/components/data/change-group/index.d.ts +4 -0
- package/dist/components/data/clip-text/ClipText.d.ts +6 -0
- package/dist/components/data/clip-text/index.d.ts +2 -0
- package/dist/components/data/collection-filter/CollectionFilter.d.ts +19 -0
- package/dist/components/data/collection-filter/ToolbarDivider.d.ts +2 -0
- package/dist/components/data/collection-filter/index.d.ts +3 -0
- package/dist/components/data/container/Container.d.ts +26 -0
- package/dist/components/data/container/SectionStack.d.ts +2 -0
- package/dist/components/data/container/index.d.ts +3 -0
- package/dist/components/data/disclosure/Disclosure.d.ts +10 -0
- package/dist/components/data/disclosure/index.d.ts +2 -0
- package/dist/components/data/divided/Divided.d.ts +2 -0
- package/dist/components/data/divided/index.d.ts +1 -0
- package/dist/components/data/empty-state/EmptyState.d.ts +16 -0
- package/dist/components/data/empty-state/index.d.ts +2 -0
- package/dist/components/data/facts/Facts.d.ts +11 -0
- package/dist/components/data/facts/index.d.ts +2 -0
- package/dist/components/data/fail-state/FailLine.d.ts +5 -0
- package/dist/components/data/fail-state/FailState.d.ts +11 -0
- package/dist/components/data/fail-state/index.d.ts +4 -0
- package/dist/components/data/figures/Figures.d.ts +30 -0
- package/dist/components/data/figures/index.d.ts +2 -0
- package/dist/components/data/index.d.ts +38 -0
- package/dist/components/data/info-panel/InfoPanel.d.ts +22 -0
- package/dist/components/data/info-panel/index.d.ts +2 -0
- package/dist/components/data/inline-list/InlineList.d.ts +5 -0
- package/dist/components/data/inline-list/index.d.ts +2 -0
- package/dist/components/data/key-value/KeyValue.d.ts +7 -0
- package/dist/components/data/key-value/KeyValueColumns.d.ts +10 -0
- package/dist/components/data/key-value/index.d.ts +4 -0
- package/dist/components/data/lines/Lines.d.ts +6 -0
- package/dist/components/data/lines/index.d.ts +2 -0
- package/dist/components/data/link-card/LinkCard.d.ts +22 -0
- package/dist/components/data/link-card/index.d.ts +2 -0
- package/dist/components/data/machine-text/MachineText.d.ts +6 -0
- package/dist/components/data/machine-text/index.d.ts +2 -0
- package/dist/components/data/meta/Meta.d.ts +7 -0
- package/dist/components/data/meta/index.d.ts +2 -0
- package/dist/components/data/metric-strip/MetricStrip.d.ts +17 -0
- package/dist/components/data/metric-strip/index.d.ts +2 -0
- package/dist/components/data/more-text/MoreText.d.ts +8 -0
- package/dist/components/data/more-text/index.d.ts +2 -0
- package/dist/components/data/name-text/NameText.d.ts +4 -0
- package/dist/components/data/name-text/index.d.ts +2 -0
- package/dist/components/data/note/Note.d.ts +7 -0
- package/dist/components/data/note/index.d.ts +2 -0
- package/dist/components/data/page-foot/PageFoot.d.ts +3 -0
- package/dist/components/data/page-foot/index.d.ts +1 -0
- package/dist/components/data/pagination/Pagination.d.ts +10 -0
- package/dist/components/data/pagination/index.d.ts +2 -0
- package/dist/components/data/pick-list/PickList.d.ts +24 -0
- package/dist/components/data/pick-list/index.d.ts +2 -0
- package/dist/components/data/prose/PlainText.d.ts +3 -0
- package/dist/components/data/prose/Prose.d.ts +3 -0
- package/dist/components/data/prose/index.d.ts +4 -0
- package/dist/components/data/rail/Rail.d.ts +30 -0
- package/dist/components/data/rail/index.d.ts +1 -0
- package/dist/components/data/skeleton/Skeleton.d.ts +48 -0
- package/dist/components/data/skeleton/index.d.ts +2 -0
- package/dist/components/data/skeleton/placeholder.d.ts +13 -0
- package/dist/components/data/split-panes/SplitPanes.d.ts +3 -0
- package/dist/components/data/split-panes/index.d.ts +2 -0
- package/dist/components/data/steps/Steps.d.ts +10 -0
- package/dist/components/data/steps/index.d.ts +2 -0
- package/dist/components/data/sub-head/SubHead.d.ts +6 -0
- package/dist/components/data/sub-head/index.d.ts +2 -0
- package/dist/components/data/table/Table.d.ts +95 -0
- package/dist/components/data/table/TableClip.d.ts +6 -0
- package/dist/components/data/table/TableMore.d.ts +2 -0
- package/dist/components/data/table/TableSkeleton.d.ts +20 -0
- package/dist/components/data/table/TableSubLine.d.ts +8 -0
- package/dist/components/data/table/index.d.ts +9 -0
- package/dist/components/data/tabs/Tabs.d.ts +14 -0
- package/dist/components/data/tabs/index.d.ts +2 -0
- package/dist/components/data/term-list/TermList.d.ts +10 -0
- package/dist/components/data/term-list/index.d.ts +2 -0
- package/dist/components/data/url-text/UrlText.d.ts +11 -0
- package/dist/components/data/url-text/index.d.ts +2 -0
- package/dist/components/data/usage-bar/UsageBar.d.ts +19 -0
- package/dist/components/data/usage-bar/index.d.ts +2 -0
- package/dist/components/data/veiled/Veiled.d.ts +6 -0
- package/dist/components/data/veiled/index.d.ts +2 -0
- package/dist/components/data/warn-line/WarnLine.d.ts +6 -0
- package/dist/components/data/warn-line/index.d.ts +2 -0
- package/dist/components/forms/badge/Badge.d.ts +10 -0
- package/dist/components/forms/badge/index.d.ts +2 -0
- package/dist/components/forms/checkbox/Checkbox.d.ts +18 -0
- package/dist/components/forms/checkbox/index.d.ts +2 -0
- package/dist/components/forms/chip/Chip.d.ts +14 -0
- package/dist/components/forms/chip/ChipList.d.ts +2 -0
- package/dist/components/forms/chip/index.d.ts +3 -0
- package/dist/components/forms/code-input/CodeInput.d.ts +8 -0
- package/dist/components/forms/code-input/index.d.ts +2 -0
- package/dist/components/forms/combobox/Combobox.d.ts +28 -0
- package/dist/components/forms/combobox/index.d.ts +2 -0
- package/dist/components/forms/control.d.ts +6 -0
- package/dist/components/forms/field/Field.d.ts +32 -0
- package/dist/components/forms/field/index.d.ts +2 -0
- package/dist/components/forms/field-group/FieldGroup.d.ts +6 -0
- package/dist/components/forms/field-group/index.d.ts +2 -0
- package/dist/components/forms/form/Form.d.ts +2 -0
- package/dist/components/forms/form/index.d.ts +1 -0
- package/dist/components/forms/form-actions/FormActions.d.ts +5 -0
- package/dist/components/forms/form-actions/index.d.ts +2 -0
- package/dist/components/forms/index.d.ts +16 -0
- package/dist/components/forms/input/Input.d.ts +12 -0
- package/dist/components/forms/input/index.d.ts +2 -0
- package/dist/components/forms/radio/Radio.d.ts +10 -0
- package/dist/components/forms/radio/index.d.ts +2 -0
- package/dist/components/forms/segmented/Segmented.d.ts +20 -0
- package/dist/components/forms/segmented/index.d.ts +2 -0
- package/dist/components/forms/select/Select.d.ts +30 -0
- package/dist/components/forms/select/SelectText.d.ts +2 -0
- package/dist/components/forms/select/index.d.ts +3 -0
- package/dist/components/forms/status-indicator/StatusIndicator.d.ts +12 -0
- package/dist/components/forms/status-indicator/index.d.ts +2 -0
- package/dist/components/forms/switch/Switch.d.ts +7 -0
- package/dist/components/forms/switch/index.d.ts +2 -0
- package/dist/components/forms/textarea/Textarea.d.ts +5 -0
- package/dist/components/forms/textarea/index.d.ts +2 -0
- package/dist/components/icon/Icon.d.ts +10 -0
- package/dist/components/icon/SwapIcon.d.ts +2 -0
- package/dist/components/icon/icons.d.ts +286 -0
- package/dist/components/icon/index.d.ts +3 -0
- package/dist/components/link/Link.d.ts +12 -0
- package/dist/components/link/TextLink.d.ts +8 -0
- package/dist/components/link/index.d.ts +4 -0
- package/dist/components/overlay/index.d.ts +6 -0
- package/dist/components/overlay/menu/Menu.d.ts +36 -0
- package/dist/components/overlay/menu/index.d.ts +2 -0
- package/dist/components/overlay/modal/ConfirmModal.d.ts +15 -0
- package/dist/components/overlay/modal/Modal.d.ts +34 -0
- package/dist/components/overlay/modal/PanelHeader.d.ts +32 -0
- package/dist/components/overlay/modal/index.d.ts +5 -0
- package/dist/components/overlay/popover/Popover.d.ts +23 -0
- package/dist/components/overlay/popover/index.d.ts +2 -0
- package/dist/components/overlay/sheet/Sheet.d.ts +31 -0
- package/dist/components/overlay/sheet/index.d.ts +2 -0
- package/dist/components/overlay/toast/Toast.d.ts +20 -0
- package/dist/components/overlay/toast/index.d.ts +2 -0
- package/dist/components/overlay/tooltip/InfoTip.d.ts +8 -0
- package/dist/components/overlay/tooltip/TipText.d.ts +6 -0
- package/dist/components/overlay/tooltip/Tooltip.d.ts +14 -0
- package/dist/components/overlay/tooltip/index.d.ts +6 -0
- package/dist/components/reason/LockedPreview.d.ts +2 -0
- package/dist/components/reason/WithReason.d.ts +10 -0
- package/dist/components/reason/index.d.ts +3 -0
- package/dist/components/shell/app-shell/AppShell.d.ts +7 -0
- package/dist/components/shell/app-shell/index.d.ts +4 -0
- package/dist/components/shell/app-shell/sideNav.d.ts +12 -0
- package/dist/components/shell/drawer/Drawer.d.ts +36 -0
- package/dist/components/shell/drawer/index.d.ts +2 -0
- package/dist/components/shell/help-panel/HelpPanel.d.ts +33 -0
- package/dist/components/shell/help-panel/index.d.ts +2 -0
- package/dist/components/shell/index.d.ts +12 -0
- package/dist/components/shell/match/Keycap.d.ts +2 -0
- package/dist/components/shell/match/MatchText.d.ts +4 -0
- package/dist/components/shell/page-head/HeadMore.d.ts +15 -0
- package/dist/components/shell/page-head/PageHead.d.ts +39 -0
- package/dist/components/shell/page-head/index.d.ts +6 -0
- package/dist/components/shell/page-head/pagePath.d.ts +10 -0
- package/dist/components/shell/rank.d.ts +1 -0
- package/dist/components/shell/sidebar/Sidebar.d.ts +40 -0
- package/dist/components/shell/sidebar/index.d.ts +2 -0
- package/dist/components/shell/sign-in-card/SignInCard.d.ts +29 -0
- package/dist/components/shell/sign-in-card/index.d.ts +2 -0
- package/dist/components/shell/slash.d.ts +3 -0
- package/dist/components/shell/standalone-panel/StandalonePanel.d.ts +6 -0
- package/dist/components/shell/standalone-panel/index.d.ts +2 -0
- package/dist/components/shell/topbar/Topbar.d.ts +76 -0
- package/dist/components/shell/topbar/index.d.ts +2 -0
- package/dist/components/viz/chart/BarChart.d.ts +6 -0
- package/dist/components/viz/chart/ChartFrame.d.ts +34 -0
- package/dist/components/viz/chart/ChartHead.d.ts +9 -0
- package/dist/components/viz/chart/ChartLegend.d.ts +17 -0
- package/dist/components/viz/chart/ChartSkeleton.d.ts +6 -0
- package/dist/components/viz/chart/LineChart.d.ts +6 -0
- package/dist/components/viz/chart/Sparkline.d.ts +14 -0
- package/dist/components/viz/chart/TimeSeriesChart.d.ts +7 -0
- package/dist/components/viz/chart/bubble.d.ts +1 -0
- package/dist/components/viz/chart/index.d.ts +16 -0
- package/dist/components/viz/chart/layout.d.ts +212 -0
- package/dist/components/viz/chart/timeSeries.d.ts +44 -0
- package/dist/components/viz/code-block/CodeBlock.d.ts +18 -0
- package/dist/components/viz/code-block/index.d.ts +2 -0
- package/dist/components/viz/index.d.ts +2 -0
- package/dist/i18n/en.d.ts +88 -0
- package/dist/i18n/index.d.ts +15 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +10142 -0
- package/dist/lib/afterPress.d.ts +1 -0
- package/dist/lib/arrival.d.ts +3 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/copied.d.ts +5 -0
- package/dist/lib/floating.d.ts +5 -0
- package/dist/lib/focusAfter.d.ts +2 -0
- package/dist/lib/hit.d.ts +1 -0
- package/dist/lib/level.d.ts +1 -0
- package/dist/lib/media.d.ts +3 -0
- package/dist/lib/motion.d.ts +20 -0
- package/dist/lib/pageScroll.d.ts +6 -0
- package/dist/lib/scrollbar.d.ts +1 -0
- package/dist/styles.css +2 -0
- package/llms.txt +201 -0
- package/package.json +69 -5
- package/skill/SKILL.md +38 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LegendItem } from './ChartLegend';
|
|
2
|
+
import { Measure, Readout, Shape } from './layout';
|
|
3
|
+
export type ChartEmpty = string | {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
};
|
|
7
|
+
export interface ChartFrameProps {
|
|
8
|
+
label: string;
|
|
9
|
+
height: number;
|
|
10
|
+
empty?: ChartEmpty;
|
|
11
|
+
legend?: LegendItem[];
|
|
12
|
+
className?: string;
|
|
13
|
+
touchHint?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function placeTip(o: {
|
|
16
|
+
x: number;
|
|
17
|
+
top: number;
|
|
18
|
+
width: number;
|
|
19
|
+
right?: number;
|
|
20
|
+
bottom?: number;
|
|
21
|
+
tip: {
|
|
22
|
+
w: number;
|
|
23
|
+
h: number;
|
|
24
|
+
};
|
|
25
|
+
pillHalf?: number;
|
|
26
|
+
}): {
|
|
27
|
+
left: number;
|
|
28
|
+
top: number;
|
|
29
|
+
};
|
|
30
|
+
export declare const sortedRows: (rows: Readout["rows"]) => import('./layout').ReadoutRow[];
|
|
31
|
+
export declare function ChartFrame({ label, height, empty, legend, className, touchHint, layout, read, }: ChartFrameProps & {
|
|
32
|
+
layout: (width: number, measure: Measure) => Shape[];
|
|
33
|
+
read?: (width: number, measure: Measure) => Readout[];
|
|
34
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ChartHeadProps {
|
|
3
|
+
title?: ReactNode;
|
|
4
|
+
as?: 'h3' | 'h4' | 'div';
|
|
5
|
+
titleId?: string;
|
|
6
|
+
legend?: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function ChartHead({ title, as: Tag, titleId, legend, className }: ChartHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const legendGlyphVariants: (props?: ({
|
|
2
|
+
glyph?: "line" | "marker" | "chip-s1" | "chip-s2" | "chip-s3" | "chip-s4" | "chip-s5" | "chip-s6" | "chip-spent" | "chip-rest" | "chip-partial" | "chip-partial-s2" | "chip-partial-spent" | "chip-partial-rest" | "line-spent" | "line-s2" | "line-ref" | "line-r1" | "line-r2" | "line-r3" | "line-r4" | "line-r5" | "line-r6" | "line-rest" | "dash-spent" | "dash-compare" | "dash" | "dash-req" | "chip-forecast" | "band" | null | undefined;
|
|
3
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
4
|
+
export type LegendGlyph = NonNullable<Parameters<typeof legendGlyphVariants>[0]>['glyph'] & string;
|
|
5
|
+
export interface LegendItem {
|
|
6
|
+
glyph: LegendGlyph;
|
|
7
|
+
label: string;
|
|
8
|
+
key?: string;
|
|
9
|
+
off?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ChartLegendProps {
|
|
12
|
+
items: LegendItem[];
|
|
13
|
+
className?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
onToggle?: (key: string) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function ChartLegend({ items, className, label, onToggle }: ChartLegendProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChartFrameProps } from './ChartFrame';
|
|
2
|
+
import { LineLayoutInput } from './layout';
|
|
3
|
+
export interface LineChartProps extends Omit<ChartFrameProps, 'height'>, Omit<LineLayoutInput, 'width' | 'height'> {
|
|
4
|
+
height?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function LineChart({ label, empty, legend, className, height, ...spec }: LineChartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SeriesTone } from './layout';
|
|
2
|
+
export interface SparklineProps {
|
|
3
|
+
label: string;
|
|
4
|
+
values: (number | null)[];
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
tone?: SparklineTone;
|
|
8
|
+
titles?: string[];
|
|
9
|
+
format?: (v: number) => string;
|
|
10
|
+
interactive?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export type SparklineTone = Exclude<SeriesTone, 'rest'> | 'muted';
|
|
14
|
+
export declare function Sparkline({ label, values, width, height, tone, titles, format, interactive, className, }: SparklineProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChartFrameProps } from './ChartFrame';
|
|
2
|
+
import { TimeSeriesInput } from './timeSeries';
|
|
3
|
+
export type { SeriesAnnotation, SeriesTone, TimeSeries } from './timeSeries';
|
|
4
|
+
export interface TimeSeriesChartProps extends Omit<ChartFrameProps, 'height'>, Omit<TimeSeriesInput, 'width' | 'height'> {
|
|
5
|
+
height?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function TimeSeriesChart({ label, empty, legend, className, height, ...spec }: TimeSeriesChartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const chartBubble = "pointer-events-none absolute z-140 whitespace-nowrap rounded-field bg-panel px-3 py-2 text-12 [--ls-cur:var(--ls-12)] leading-18 shadow-[0_0_0_1px_rgba(17,24,39,.06),0_8px_24px_rgba(17,24,39,.12)]";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type { BarChartProps } from './BarChart';
|
|
2
|
+
export { BarChart } from './BarChart';
|
|
3
|
+
export type { ChartEmpty } from './ChartFrame';
|
|
4
|
+
export type { ChartHeadProps } from './ChartHead';
|
|
5
|
+
export { ChartHead } from './ChartHead';
|
|
6
|
+
export type { ChartLegendProps, LegendGlyph, LegendItem } from './ChartLegend';
|
|
7
|
+
export { ChartLegend, legendGlyphVariants } from './ChartLegend';
|
|
8
|
+
export type { ChartSkeletonProps } from './ChartSkeleton';
|
|
9
|
+
export { ChartSkeleton } from './ChartSkeleton';
|
|
10
|
+
export type { LineChartProps } from './LineChart';
|
|
11
|
+
export { LineChart } from './LineChart';
|
|
12
|
+
export type { BarLayoutInput, BarTone, LineLayoutInput, LineTone, Point } from './layout';
|
|
13
|
+
export type { SparklineProps, SparklineTone } from './Sparkline';
|
|
14
|
+
export { Sparkline } from './Sparkline';
|
|
15
|
+
export type { SeriesAnnotation, SeriesTone, TimeSeries, TimeSeriesChartProps, } from './TimeSeriesChart';
|
|
16
|
+
export { TimeSeriesChart } from './TimeSeriesChart';
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
export declare const TOP = 24;
|
|
2
|
+
export declare const BOT = 22;
|
|
3
|
+
export type SeriesTone = 's1' | 's2' | 's3' | 's4' | 's5' | 's6' | 'rest';
|
|
4
|
+
export type BarTone = SeriesTone | 'spent' | 'zero';
|
|
5
|
+
export type LineTone = 'spent' | 's1' | 's2';
|
|
6
|
+
export type TextRole = 'ax-y' | 'ax-x' | 'ax-now' | 'ref-lab' | 'ann' | 'mk-lab' | 'ann-tag' | 'fc-lab' | 'pill';
|
|
7
|
+
export type LineRole = 'grid' | 'base' | 'ref' | 'ref-req' | 'fc-end' | 'ann-lead' | 'mk' | 'gap';
|
|
8
|
+
export type PathRole = 'fc-line' | 'fc-band' | 'fc-stack' | 'area-spent' | 'area-ink' | 'fill-r1' | 'fill-r2' | 'fill-r3' | 'fill-r4' | 'fill-r5' | 'fill-r6' | 'fill-rest' | 'ann-bg';
|
|
9
|
+
export type PolyRole = 'spent' | 'ln-s1' | 'ln-s2' | 'fc-line' | 'fc-spent' | 'ln-r1' | 'ln-r2' | 'ln-r3' | 'ln-r4' | 'ln-r5' | 'ln-r6' | 'ln-rest' | 'compare';
|
|
10
|
+
export type CircleRole = 'pt' | 'pt-spent' | 'pt-solo' | 'now' | 'now-halo' | 'pt-fc';
|
|
11
|
+
export type Shape = {
|
|
12
|
+
kind: 'line';
|
|
13
|
+
role: LineRole;
|
|
14
|
+
x1: number;
|
|
15
|
+
y1: number;
|
|
16
|
+
x2: number;
|
|
17
|
+
y2: number;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'rect';
|
|
20
|
+
tone: BarTone;
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
col: number;
|
|
26
|
+
top?: boolean;
|
|
27
|
+
partial?: boolean;
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'path';
|
|
30
|
+
role: PathRole;
|
|
31
|
+
d: string;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'polyline';
|
|
34
|
+
role: PolyRole;
|
|
35
|
+
points: string;
|
|
36
|
+
} | {
|
|
37
|
+
kind: 'circle';
|
|
38
|
+
role: CircleRole;
|
|
39
|
+
cx: number;
|
|
40
|
+
cy: number;
|
|
41
|
+
r: number;
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'text';
|
|
44
|
+
role: TextRole;
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
anchor: 'start' | 'middle' | 'end';
|
|
48
|
+
text: string;
|
|
49
|
+
};
|
|
50
|
+
export type LegendGlyphName = string;
|
|
51
|
+
export interface ReadoutRow {
|
|
52
|
+
label?: string;
|
|
53
|
+
value: string;
|
|
54
|
+
n?: number;
|
|
55
|
+
glyph?: LegendGlyphName;
|
|
56
|
+
kind?: 'total' | 'extra' | 'note';
|
|
57
|
+
}
|
|
58
|
+
export interface Readout {
|
|
59
|
+
x0: number;
|
|
60
|
+
x1: number;
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
title: string;
|
|
64
|
+
rows: ReadoutRow[];
|
|
65
|
+
pill?: string;
|
|
66
|
+
points?: {
|
|
67
|
+
y: number;
|
|
68
|
+
glyph: LegendGlyphName;
|
|
69
|
+
}[];
|
|
70
|
+
dot?: boolean;
|
|
71
|
+
key?: string;
|
|
72
|
+
empty?: boolean;
|
|
73
|
+
tick?: string;
|
|
74
|
+
}
|
|
75
|
+
export type Measure = (text: string, role: TextRole) => number;
|
|
76
|
+
type Box = {
|
|
77
|
+
x0: number;
|
|
78
|
+
x1: number;
|
|
79
|
+
y0: number;
|
|
80
|
+
y1: number;
|
|
81
|
+
};
|
|
82
|
+
export declare const r1: (v: number) => number;
|
|
83
|
+
export declare function fmt(v: number, money?: boolean, digits?: number): string;
|
|
84
|
+
export declare function axisLabel(ticks: number[], money?: boolean, format?: (v: number) => string): (v: number) => string;
|
|
85
|
+
export declare function exact(v: number, money?: boolean): string;
|
|
86
|
+
export declare function scale(max: number, { integer }?: {
|
|
87
|
+
integer?: boolean;
|
|
88
|
+
}): {
|
|
89
|
+
top: number;
|
|
90
|
+
ticks: number[];
|
|
91
|
+
};
|
|
92
|
+
export declare function axisRoom(min: number, sc: {
|
|
93
|
+
ticks: number[];
|
|
94
|
+
}, spec: {
|
|
95
|
+
money?: boolean;
|
|
96
|
+
format?: (v: number) => string;
|
|
97
|
+
}, measure?: Measure): number;
|
|
98
|
+
export declare const GRID_REF_GAP = 14;
|
|
99
|
+
export declare function axisRight(plotR: number, sc: {
|
|
100
|
+
ticks: number[];
|
|
101
|
+
}, base: number, y: (v: number) => number, label: (v: number) => string, refs?: number[]): Shape[];
|
|
102
|
+
export declare function placeAnnotation(o: {
|
|
103
|
+
cx: number;
|
|
104
|
+
text: string;
|
|
105
|
+
width: number;
|
|
106
|
+
topAt: (x0: number, x1: number) => number;
|
|
107
|
+
placed: Box[];
|
|
108
|
+
measure: Measure;
|
|
109
|
+
ownTop?: number;
|
|
110
|
+
drop?: boolean;
|
|
111
|
+
}): Shape[];
|
|
112
|
+
export declare function pickTicks(o: {
|
|
113
|
+
n: number;
|
|
114
|
+
at: (i: number) => number;
|
|
115
|
+
spacing: number;
|
|
116
|
+
now?: number;
|
|
117
|
+
tickStep: number;
|
|
118
|
+
keep?: number[];
|
|
119
|
+
keepGap?: number;
|
|
120
|
+
minPx?: number;
|
|
121
|
+
}): number[];
|
|
122
|
+
export declare function placeTicks(o: {
|
|
123
|
+
pick: number[];
|
|
124
|
+
xAt: (i: number) => number;
|
|
125
|
+
wOf: (i: number) => number;
|
|
126
|
+
now?: number;
|
|
127
|
+
last: number;
|
|
128
|
+
keep: number[];
|
|
129
|
+
shift: number;
|
|
130
|
+
}): {
|
|
131
|
+
i: number;
|
|
132
|
+
x: number;
|
|
133
|
+
}[];
|
|
134
|
+
export declare function labelGap(labels: string[], width: (label: string) => number): number;
|
|
135
|
+
export interface BarSeriesInput {
|
|
136
|
+
tone: BarTone;
|
|
137
|
+
name?: string;
|
|
138
|
+
values: (number | null)[];
|
|
139
|
+
}
|
|
140
|
+
export interface BarLayoutInput {
|
|
141
|
+
width: number;
|
|
142
|
+
height: number;
|
|
143
|
+
labels: string[];
|
|
144
|
+
axisLabels?: string[];
|
|
145
|
+
now?: number;
|
|
146
|
+
money?: boolean;
|
|
147
|
+
integer?: boolean;
|
|
148
|
+
format?: (v: number) => string;
|
|
149
|
+
partial?: number;
|
|
150
|
+
tickStep?: number;
|
|
151
|
+
axisStep?: number;
|
|
152
|
+
minAxisWidth?: number;
|
|
153
|
+
series: BarSeriesInput[];
|
|
154
|
+
forecast?: {
|
|
155
|
+
values: (number | null)[];
|
|
156
|
+
until?: number;
|
|
157
|
+
style?: 'line' | 'band' | 'stack';
|
|
158
|
+
};
|
|
159
|
+
annotations?: {
|
|
160
|
+
at: number;
|
|
161
|
+
text: string;
|
|
162
|
+
}[];
|
|
163
|
+
keepTicks?: number[];
|
|
164
|
+
}
|
|
165
|
+
export declare const CHIP: Record<BarTone, string>;
|
|
166
|
+
export declare function readBars(spec: BarLayoutInput, measure?: Measure): Readout[];
|
|
167
|
+
export declare function layoutBars(spec: BarLayoutInput, measure: Measure): Shape[];
|
|
168
|
+
export type Point = [t: number, v: number];
|
|
169
|
+
export type GapPoint = [t: number, v: number | null];
|
|
170
|
+
export interface LineLayoutInput {
|
|
171
|
+
width: number;
|
|
172
|
+
height: number;
|
|
173
|
+
domain: [number, number];
|
|
174
|
+
money?: boolean;
|
|
175
|
+
integer?: boolean;
|
|
176
|
+
format?: (v: number) => string;
|
|
177
|
+
name?: string;
|
|
178
|
+
pointLabel?: (t: number) => string;
|
|
179
|
+
spent: number[] | GapPoint[];
|
|
180
|
+
tone?: LineTone;
|
|
181
|
+
forecast?: Point[];
|
|
182
|
+
forecastLabel?: string;
|
|
183
|
+
references?: {
|
|
184
|
+
value: number;
|
|
185
|
+
label?: string;
|
|
186
|
+
request?: boolean;
|
|
187
|
+
}[];
|
|
188
|
+
ticks?: {
|
|
189
|
+
at: number;
|
|
190
|
+
label: string;
|
|
191
|
+
now?: boolean;
|
|
192
|
+
}[];
|
|
193
|
+
tickStep?: number;
|
|
194
|
+
annotations?: {
|
|
195
|
+
at: number;
|
|
196
|
+
text: string;
|
|
197
|
+
}[];
|
|
198
|
+
markers?: {
|
|
199
|
+
at: number;
|
|
200
|
+
label: string;
|
|
201
|
+
}[];
|
|
202
|
+
stops?: {
|
|
203
|
+
at: number;
|
|
204
|
+
value: number;
|
|
205
|
+
label: string;
|
|
206
|
+
}[];
|
|
207
|
+
minAxisWidth?: number;
|
|
208
|
+
top?: number;
|
|
209
|
+
}
|
|
210
|
+
export declare function readLine(spec: LineLayoutInput, measure?: Measure): Readout[];
|
|
211
|
+
export declare function layoutLine(spec: LineLayoutInput, measure: Measure): Shape[];
|
|
212
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Measure, Readout, SeriesTone, Shape } from './layout';
|
|
2
|
+
export type { SeriesTone };
|
|
3
|
+
export interface TimeSeries {
|
|
4
|
+
key: string;
|
|
5
|
+
name: string;
|
|
6
|
+
tone: SeriesTone;
|
|
7
|
+
values: (number | null)[];
|
|
8
|
+
}
|
|
9
|
+
export interface TimeSeriesInput {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
kind: 'bar' | 'line' | 'area';
|
|
13
|
+
labels: string[];
|
|
14
|
+
axisLabels?: string[];
|
|
15
|
+
now?: number;
|
|
16
|
+
partial?: number;
|
|
17
|
+
series: TimeSeries[];
|
|
18
|
+
hidden?: string[];
|
|
19
|
+
compare?: {
|
|
20
|
+
label: string;
|
|
21
|
+
values: (number | null)[];
|
|
22
|
+
titles?: string[];
|
|
23
|
+
};
|
|
24
|
+
format: (v: number) => string;
|
|
25
|
+
axisFormat?: (v: number) => string;
|
|
26
|
+
integer?: boolean;
|
|
27
|
+
money?: boolean;
|
|
28
|
+
totals?: (number | null)[];
|
|
29
|
+
totalLabel?: string;
|
|
30
|
+
delta?: (cur: number | null, prev: number | null) => string;
|
|
31
|
+
minAxisWidth?: number;
|
|
32
|
+
annotations?: SeriesAnnotation[];
|
|
33
|
+
}
|
|
34
|
+
export interface SeriesAnnotation {
|
|
35
|
+
at: number;
|
|
36
|
+
label: string;
|
|
37
|
+
title?: string;
|
|
38
|
+
rows?: {
|
|
39
|
+
label: string;
|
|
40
|
+
value: string;
|
|
41
|
+
}[];
|
|
42
|
+
}
|
|
43
|
+
export declare function readSeries(spec: TimeSeriesInput, measure?: Measure): Readout[];
|
|
44
|
+
export declare function layoutSeries(spec: TimeSeriesInput, measure: Measure): Shape[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const codeBlockVariants: (props?: ({
|
|
3
|
+
inset?: boolean | null | undefined;
|
|
4
|
+
wrap?: "none" | "always" | "phone" | null | undefined;
|
|
5
|
+
copyable?: boolean | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface CodeBlockProps extends Pick<VariantProps<typeof codeBlockVariants>, 'inset' | 'wrap'> {
|
|
8
|
+
code: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
copyable?: boolean;
|
|
11
|
+
secret?: {
|
|
12
|
+
value: string;
|
|
13
|
+
reveal?: number;
|
|
14
|
+
};
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function CodeBlock({ code, label, copyable, secret, inset, wrap, loading, className, }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
복사됨: string;
|
|
3
|
+
나: string;
|
|
4
|
+
'\uBCF5\uC0AC \uC2E4\uD328': string;
|
|
5
|
+
'{label} \uBCF5\uC0AC': string;
|
|
6
|
+
'{name} \uBA54\uB274': string;
|
|
7
|
+
'{name} \uB3D9\uC791': string;
|
|
8
|
+
검색: string;
|
|
9
|
+
'\uC120\uD0DD\uD55C \uD589 \uB3D9\uC791': string;
|
|
10
|
+
'{count}\uAC1C \uC120\uD0DD\uB428': string;
|
|
11
|
+
'{count}{unit} \uC120\uD0DD\uB428': string;
|
|
12
|
+
'\uC120\uD0DD \uD574\uC81C': string;
|
|
13
|
+
'\uB2E4\uC2DC \uC2DC\uB3C4': string;
|
|
14
|
+
'\uCABD \uB118\uAE40': string;
|
|
15
|
+
'\uC774\uC804 \uCABD': string;
|
|
16
|
+
쪽: string;
|
|
17
|
+
'\uB2E4\uC74C \uCABD': string;
|
|
18
|
+
'\uBD88\uB7EC\uC624\uB294 \uC911': string;
|
|
19
|
+
'\uCC98\uC74C \uCE78\uC73C\uB85C': string;
|
|
20
|
+
'\uC624\uB978\uCABD \uCE78 \uBCF4\uAE30': string;
|
|
21
|
+
'\uBAA8\uB450 \uC120\uD0DD': string;
|
|
22
|
+
'\uC120\uD0DD@@\uD45C\uC758 \uACE0\uB974\uAE30 \uCE78': string;
|
|
23
|
+
에서: string;
|
|
24
|
+
'{marks} \uC9C0\uB0A8': string;
|
|
25
|
+
'{marks} \uC544\uC9C1': string;
|
|
26
|
+
'{text}, \uB208\uAE08 {marks}': string;
|
|
27
|
+
없음: string;
|
|
28
|
+
완료: string;
|
|
29
|
+
'\uC77C\uCE58\uD558\uB294 \uD56D\uBAA9 \uC5C6\uC74C': string;
|
|
30
|
+
'{count}\uAC1C \uB354 \uC788\uC2B5\uB2C8\uB2E4. \uB354 \uC785\uB825\uD574 \uC881\uD600 \uC8FC\uC138\uC694': string;
|
|
31
|
+
'{action} \uC2E4\uD328. \uB2E4\uC2DC \uC2DC\uB3C4': string;
|
|
32
|
+
취소: string;
|
|
33
|
+
로그인: string;
|
|
34
|
+
'\uD655\uC778 \uAE00\uC790 \uC785\uB825 \uD544\uC694': string;
|
|
35
|
+
'\uD655\uC778\uC744 \uC704\uD574 {subject}': string;
|
|
36
|
+
입력: string;
|
|
37
|
+
닫기: string;
|
|
38
|
+
알림: string;
|
|
39
|
+
'\uC54C\uB9BC ({hotkey})': string;
|
|
40
|
+
'\uBCF8\uBB38\uC73C\uB85C \uAC74\uB108\uB6F0\uAE30': string;
|
|
41
|
+
메뉴: string;
|
|
42
|
+
'\uBA54\uB274 \uB2EB\uAE30': string;
|
|
43
|
+
'\uD604\uC7AC {kind}': string;
|
|
44
|
+
'\uB3C4\uC6C0\uB9D0 \uD328\uB110': string;
|
|
45
|
+
'\uB3C4\uC6C0\uB9D0 \uB2EB\uAE30': string;
|
|
46
|
+
'\uB354 \uC54C\uC544\uBCF4\uAE30': string;
|
|
47
|
+
'\uC0C8 \uCC3D': string;
|
|
48
|
+
정보: string;
|
|
49
|
+
'\uC2DD\uBCC4\uC790 {id} \uBCF5\uC0AC': string;
|
|
50
|
+
', \uCC98\uB9AC\uD560 \uC77C {count}': string;
|
|
51
|
+
'\uB9C9\uB300\uB97C \uB20C\uB7EC \uAC12 \uBCF4\uAE30': string;
|
|
52
|
+
'\uC120\uC744 \uB20C\uB7EC \uAC12 \uBCF4\uAE30': string;
|
|
53
|
+
'\uB20C\uB7EC \uAC12 \uBCF4\uAE30': string;
|
|
54
|
+
'\uB204\uB974\uAC70\uB098 \uC606\uC73C\uB85C \uBC00\uC5B4 \uAC12 \uBCF4\uAE30': string;
|
|
55
|
+
'\uC88C\uC6B0 \uD654\uC0B4\uD45C\uB85C \uCE78\uB9C8\uB2E4 \uAC12 \uC77D\uAE30': string;
|
|
56
|
+
보이기: string;
|
|
57
|
+
숨기기: string;
|
|
58
|
+
합계: string;
|
|
59
|
+
예상: string;
|
|
60
|
+
'\uC6D4\uB9D0 \uC608\uC0C1': string;
|
|
61
|
+
'{title} (\uC9C4\uD589 \uC911)': string;
|
|
62
|
+
변화: string;
|
|
63
|
+
코드: string;
|
|
64
|
+
'\uC606\uC73C\uB85C \uB354 \uC788\uC74C': string;
|
|
65
|
+
경로: string;
|
|
66
|
+
사이드바: string;
|
|
67
|
+
'\uC54C\uB9BC, \uC0C8 \uC54C\uB9BC \uC788\uC74C': string;
|
|
68
|
+
'\uC704\uD5D8 \uAD6C\uC5ED': string;
|
|
69
|
+
'"{query}" \uACB0\uACFC \uC5C6\uC74C': string;
|
|
70
|
+
'\uAC80\uC0C9 \uACB0\uACFC': string;
|
|
71
|
+
'{count}\uAC1C \uB354 \uBCF4\uAE30': {
|
|
72
|
+
one: string;
|
|
73
|
+
other: string;
|
|
74
|
+
};
|
|
75
|
+
'\uB354 \uBCF4\uAE30': string;
|
|
76
|
+
접기: string;
|
|
77
|
+
'{label} \uB354 \uBCF4\uAE30': string;
|
|
78
|
+
'{label} \uC811\uAE30': string;
|
|
79
|
+
'\uC774\uB3D9@@\uCC3E\uAE30 \uCC3D \uD0A4 \uC548\uB0B4': string;
|
|
80
|
+
열기: string;
|
|
81
|
+
'\uC55E \uD654\uBA74': string;
|
|
82
|
+
'(\uC0C8 \uD0ED)': string;
|
|
83
|
+
도움말: string;
|
|
84
|
+
로그아웃: string;
|
|
85
|
+
'\uB0B4 \uACC4\uC815 \uBA54\uB274, {name}': string;
|
|
86
|
+
언어: string;
|
|
87
|
+
};
|
|
88
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type Locale = 'ko' | 'en';
|
|
2
|
+
export type Plural = {
|
|
3
|
+
one: string;
|
|
4
|
+
other: string;
|
|
5
|
+
};
|
|
6
|
+
export type Messages = Record<string, string | Plural>;
|
|
7
|
+
export type MessageVars = Record<string, string | number>;
|
|
8
|
+
export declare const addMessages: (messages: Messages) => void;
|
|
9
|
+
export declare const designSystemMessages: () => Messages;
|
|
10
|
+
export declare const englishMessages: () => Messages;
|
|
11
|
+
export declare const getLocale: () => Locale;
|
|
12
|
+
export declare const setLocale: (locale: Locale) => void;
|
|
13
|
+
export declare const useLocale: () => Locale;
|
|
14
|
+
export declare const msg: <S extends string>(source: S) => S;
|
|
15
|
+
export declare const t: (source: string, vars?: MessageVars) => string;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type { Token, TokenName } from '@yanolja-next/design-tokens';
|
|
2
|
+
export { tokens } from '@yanolja-next/design-tokens';
|
|
3
|
+
export { type CatalogEntry, catalog } from './catalog';
|
|
4
|
+
export * from './components/button';
|
|
5
|
+
export * from './components/data';
|
|
6
|
+
export * from './components/forms';
|
|
7
|
+
export * from './components/icon';
|
|
8
|
+
export * from './components/link';
|
|
9
|
+
export * from './components/overlay';
|
|
10
|
+
export * from './components/reason';
|
|
11
|
+
export * from './components/shell';
|
|
12
|
+
export * from './components/viz';
|
|
13
|
+
export { addMessages, designSystemMessages, englishMessages, getLocale, type Locale, type Messages, type MessageVars, msg, type Plural, setLocale, t, useLocale, } from './i18n';
|
|
14
|
+
export { afterPress } from './lib/afterPress';
|
|
15
|
+
export { ARRIVAL_ATTR, ARRIVAL_MS, markArrival } from './lib/arrival';
|
|
16
|
+
export { cn } from './lib/cn';
|
|
17
|
+
export { COPIED_MS, type CopyState, copyText, useCopied, useCopy } from './lib/copied';
|
|
18
|
+
export { focusAfterRemoval, focusAfterRetry } from './lib/focusAfter';
|
|
19
|
+
export { phoneHit } from './lib/hit';
|
|
20
|
+
export { isPhone } from './lib/media';
|
|
21
|
+
export { DELAY, EASE, MOTION, prefersReducedMotion } from './lib/motion';
|
|
22
|
+
export { focusIsLost, focusSheet, onPageScroll, pageScroller, pageScrollTop, scrollPageTo, } from './lib/pageScroll';
|