@eevenkoto/core 0.1.1 → 0.2.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/README.md +6 -2
- package/dist/index.d.ts +199 -4
- package/dist/index.js +109 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Shared prop types and pure className helpers for Eevenkoto. No DOM, no templates, no CSS.
|
|
4
4
|
|
|
5
|
+
Source modules live under `core/` and `domain/` (Atoms / Molecules / Organisms). The package root barrel keeps a stable public API.
|
|
6
|
+
|
|
5
7
|
Most apps use this indirectly through `@eevenkoto/html`, `@eevenkoto/react`, or `@eevenkoto/vue`.
|
|
6
8
|
|
|
7
9
|
## Install
|
|
@@ -23,11 +25,13 @@ const className = buttonClassNames({
|
|
|
23
25
|
// "eevenkoto-button eevenkoto-button--primary eevenkoto-button--sm eevenkoto-button--icon-left"
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
Helpers: `buttonClassNames`, `badgeClassNames`, `headingClassNames`, `paragraphClassNames`, `captionClassNames`, `flowClassNames
|
|
28
|
+
Helpers: `buttonClassNames`, `badgeClassNames`, `headingClassNames`, `paragraphClassNames`, `listClassNames`, `captionClassNames`, `flowClassNames`, `proseClassNames`, plus Domain helpers (`abilityScoreClassNames`, `statblockClassNames`, …).
|
|
27
29
|
|
|
28
30
|
Pair with `@eevenkoto/css` for styling.
|
|
29
31
|
|
|
30
32
|
## Related
|
|
31
33
|
|
|
32
|
-
- `@eevenkoto/css` — tokens and component styles
|
|
34
|
+
- `@eevenkoto/css` — tokens and component styles (consume / never rules live there)
|
|
33
35
|
- `@eevenkoto/html` / `@eevenkoto/react` / `@eevenkoto/vue` — markup bindings
|
|
36
|
+
|
|
37
|
+
For agents: feed Storybook `/llms.txt` or `/llms-full.txt` (generated via `npm run generate:llms`).
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ type ButtonSize = 'sm' | 'md' | 'lg';
|
|
|
4
4
|
type ButtonIconName = 'star' | 'check' | 'arrow' | 'plus';
|
|
5
5
|
type ButtonIconPosition = 'left' | 'right' | 'only';
|
|
6
6
|
interface ButtonProps {
|
|
7
|
-
|
|
7
|
+
/** Default: primary (host class alone is also primary in CSS) */
|
|
8
|
+
variant?: ButtonVariant;
|
|
8
9
|
label: string;
|
|
9
10
|
/** Default: md */
|
|
10
11
|
size?: ButtonSize;
|
|
@@ -17,7 +18,7 @@ interface ButtonProps {
|
|
|
17
18
|
/** Props that affect Button BEM class names (excludes label/disabled content). */
|
|
18
19
|
type ButtonClassNameProps = Pick<ButtonProps, 'variant' | 'size' | 'icon' | 'iconPosition'>;
|
|
19
20
|
declare const resolveButtonIconPosition: (props: Pick<ButtonProps, "icon" | "iconPosition">) => ButtonIconPosition | undefined;
|
|
20
|
-
declare const buttonClassNames: (props
|
|
21
|
+
declare const buttonClassNames: (props?: ButtonClassNameProps) => string;
|
|
21
22
|
|
|
22
23
|
type BadgeVariant = 'subtle' | 'solid' | 'outline';
|
|
23
24
|
type BadgeSize = 'sm' | 'md' | 'lg';
|
|
@@ -41,12 +42,15 @@ declare const badgeClassNames: (props?: BadgeClassNameProps) => string;
|
|
|
41
42
|
|
|
42
43
|
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
43
44
|
type HeadingTone = 'primary' | 'secondary';
|
|
45
|
+
/** Levels that support run-in (inline into the following Paragraph). */
|
|
46
|
+
declare const HEADING_RUN_IN_LEVELS: readonly [3, 6];
|
|
47
|
+
type HeadingRunInLevel = (typeof HEADING_RUN_IN_LEVELS)[number];
|
|
44
48
|
interface HeadingProps {
|
|
45
49
|
level: HeadingLevel;
|
|
46
50
|
text: string;
|
|
47
51
|
tone?: HeadingTone;
|
|
48
52
|
/**
|
|
49
|
-
*
|
|
53
|
+
* Levels 3 and 6: flow the heading into the following Paragraph
|
|
50
54
|
* (`.eevenkoto-heading--run-in` + sibling `.eevenkoto-paragraph`).
|
|
51
55
|
*/
|
|
52
56
|
runIn?: boolean;
|
|
@@ -64,6 +68,11 @@ interface ParagraphProps {
|
|
|
64
68
|
type ParagraphClassNameProps = Pick<ParagraphProps, 'size' | 'tone'>;
|
|
65
69
|
declare const paragraphClassNames: (props?: ParagraphClassNameProps) => string;
|
|
66
70
|
|
|
71
|
+
interface ListItemProps {
|
|
72
|
+
/** Visible item copy (`li` text node). */
|
|
73
|
+
text: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
67
76
|
type CaptionTone = 'primary' | 'secondary';
|
|
68
77
|
interface CaptionProps {
|
|
69
78
|
text: string;
|
|
@@ -72,13 +81,199 @@ interface CaptionProps {
|
|
|
72
81
|
type CaptionClassNameProps = Pick<CaptionProps, 'tone'>;
|
|
73
82
|
declare const captionClassNames: (props?: CaptionClassNameProps) => string;
|
|
74
83
|
|
|
84
|
+
declare const frameClassNames: () => string;
|
|
85
|
+
|
|
86
|
+
type ScrollAxis = 'x' | 'y' | 'both';
|
|
87
|
+
interface ScrollClassNameProps {
|
|
88
|
+
/** Overflow axis. Defaults to `x` (wide tables). */
|
|
89
|
+
axis?: ScrollAxis;
|
|
90
|
+
}
|
|
91
|
+
interface ScrollProps extends ScrollClassNameProps {
|
|
92
|
+
}
|
|
93
|
+
declare const scrollClassNames: (props?: ScrollClassNameProps) => string;
|
|
94
|
+
|
|
95
|
+
type TableCellKind = 'index' | 'numeric' | 'text';
|
|
96
|
+
interface TableCellClassNameProps {
|
|
97
|
+
/** Column role. Defaults to `text`. */
|
|
98
|
+
kind?: TableCellKind;
|
|
99
|
+
}
|
|
100
|
+
interface TableCellProps extends TableCellClassNameProps {
|
|
101
|
+
/** Cell copy (product / locale data). */
|
|
102
|
+
text: string;
|
|
103
|
+
/** Render as header cell. */
|
|
104
|
+
header?: boolean;
|
|
105
|
+
/** `scope` when `header` is true. */
|
|
106
|
+
scope?: 'col' | 'row';
|
|
107
|
+
/** Wrap header label for angled numeric heads (numeric + header). */
|
|
108
|
+
angled?: boolean;
|
|
109
|
+
}
|
|
110
|
+
declare const tableCellClassNames: (props?: TableCellClassNameProps) => string;
|
|
111
|
+
declare const tableColClassNames: (props?: TableCellClassNameProps) => string;
|
|
112
|
+
|
|
75
113
|
type FlowDensity = 'tight' | 'loose';
|
|
76
114
|
interface FlowProps {
|
|
77
115
|
density?: FlowDensity;
|
|
78
116
|
}
|
|
79
117
|
declare const flowClassNames: (props?: FlowProps) => string;
|
|
80
118
|
|
|
119
|
+
declare const proseClassNames: () => string;
|
|
120
|
+
|
|
121
|
+
type ListVariant = 'unordered' | 'ordered';
|
|
122
|
+
type ListSize = 'sm' | 'md' | 'lg';
|
|
123
|
+
type ListTone = 'primary' | 'secondary';
|
|
124
|
+
interface ListProps {
|
|
125
|
+
items: ListItemProps[];
|
|
126
|
+
variant?: ListVariant;
|
|
127
|
+
size?: ListSize;
|
|
128
|
+
tone?: ListTone;
|
|
129
|
+
}
|
|
130
|
+
type ListClassNameProps = Pick<ListProps, 'variant' | 'size' | 'tone'>;
|
|
131
|
+
declare const listClassNames: (props?: ListClassNameProps) => string;
|
|
132
|
+
|
|
133
|
+
interface PropertyItem {
|
|
134
|
+
/** Definition term for `dt` (colon is rendered by CSS). Product copy stays in the app. */
|
|
135
|
+
label: string;
|
|
136
|
+
/** Value shown in `dd`. */
|
|
137
|
+
value: string;
|
|
138
|
+
}
|
|
139
|
+
interface PropertyProps extends PropertyItem {
|
|
140
|
+
}
|
|
141
|
+
declare const propertyClassNames: () => string;
|
|
142
|
+
|
|
143
|
+
interface PropertyListProps {
|
|
144
|
+
items: PropertyItem[];
|
|
145
|
+
}
|
|
146
|
+
declare const propertyListClassNames: () => string;
|
|
147
|
+
|
|
148
|
+
type StatShape = 'disk' | 'arch' | 'shield';
|
|
149
|
+
type StatSize = 'sm' | 'md' | 'lg';
|
|
150
|
+
interface StatProps {
|
|
151
|
+
/** Displayed numeric or signed value (e.g. `16`, `+3`). */
|
|
152
|
+
value: string;
|
|
153
|
+
/** Geometric treatment. Default: `disk` */
|
|
154
|
+
shape?: StatShape;
|
|
155
|
+
/** Shared sm | md | lg ladder. Default: `md` */
|
|
156
|
+
size?: StatSize;
|
|
157
|
+
/**
|
|
158
|
+
* Deep accent border (`content-accent-strong`) plus a thicker stroke/outline
|
|
159
|
+
* so emphasis is not color-only. Used for proficient saving throws.
|
|
160
|
+
*/
|
|
161
|
+
emphasis?: boolean;
|
|
162
|
+
}
|
|
163
|
+
type StatClassNameProps = Pick<StatProps, 'shape' | 'size' | 'emphasis'>;
|
|
164
|
+
declare const statClassNames: (props?: StatClassNameProps) => string;
|
|
165
|
+
|
|
166
|
+
type TableVariant = 'default' | 'numeric' | 'pair';
|
|
167
|
+
type TableStripe = 'row' | 'column' | 'none';
|
|
168
|
+
interface TableColumn {
|
|
169
|
+
key: string;
|
|
170
|
+
/** Visible header label (locale / product data). */
|
|
171
|
+
header: string;
|
|
172
|
+
kind?: TableCellKind;
|
|
173
|
+
}
|
|
174
|
+
interface TableClassNameProps {
|
|
175
|
+
variant?: TableVariant;
|
|
176
|
+
/** Alternating band. Defaults to `row`. */
|
|
177
|
+
stripe?: TableStripe;
|
|
178
|
+
}
|
|
179
|
+
interface TableProps extends TableClassNameProps {
|
|
180
|
+
caption?: string;
|
|
181
|
+
columns: TableColumn[];
|
|
182
|
+
/** Row cells aligned to `columns` order. */
|
|
183
|
+
rows: string[][];
|
|
184
|
+
}
|
|
185
|
+
declare const tableClassNames: (props?: TableClassNameProps) => string;
|
|
186
|
+
declare const tableCaptionClassNames: () => string;
|
|
187
|
+
|
|
188
|
+
declare const tableShellClassNames: () => string;
|
|
189
|
+
declare const tableShellFooterClassNames: () => string;
|
|
190
|
+
|
|
191
|
+
interface AbilityScoreProps {
|
|
192
|
+
/** Ability name shown in the column header (product copy). */
|
|
193
|
+
label: string;
|
|
194
|
+
/**
|
|
195
|
+
* Optional stable id for the label element. Used as `aria-labelledby` on the
|
|
196
|
+
* stats `dl`. When omitted, renderers derive an id from `label` / framework ids.
|
|
197
|
+
*/
|
|
198
|
+
labelId?: string;
|
|
199
|
+
/** Base score value. */
|
|
200
|
+
score: string;
|
|
201
|
+
/** Modifier, typically signed (`+3`). */
|
|
202
|
+
modifier: string;
|
|
203
|
+
/** Saving throw bonus, typically signed. */
|
|
204
|
+
save: string;
|
|
205
|
+
/** Visually hidden term for score. Default: `Score` */
|
|
206
|
+
scoreLabel?: string;
|
|
207
|
+
/** Visually hidden term for modifier. Default: `Modifier` */
|
|
208
|
+
modifierLabel?: string;
|
|
209
|
+
/** Visually hidden term for save. Default: `Save` */
|
|
210
|
+
saveLabel?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Creature is proficient in this save — thicker deep-gold border + outline on
|
|
213
|
+
* the shield (not color-only). Default: false
|
|
214
|
+
*/
|
|
215
|
+
saveProficient?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Suffix in the visually hidden save term when `saveProficient` is true.
|
|
218
|
+
* Default: `proficient`
|
|
219
|
+
*/
|
|
220
|
+
proficientLabel?: string;
|
|
221
|
+
}
|
|
222
|
+
declare const abilityScoreClassNames: (props?: {
|
|
223
|
+
saveProficient?: boolean;
|
|
224
|
+
}) => string;
|
|
225
|
+
|
|
226
|
+
interface AbilityScoreGroupProps {
|
|
227
|
+
abilities: AbilityScoreProps[];
|
|
228
|
+
}
|
|
229
|
+
declare const abilityScoreGroupClassNames: () => string;
|
|
230
|
+
|
|
231
|
+
interface StatblockFeatureProps {
|
|
232
|
+
/** Feature / action name (rendered as H3 run-in). */
|
|
233
|
+
name: string;
|
|
234
|
+
/**
|
|
235
|
+
* Body copy after the run-in name.
|
|
236
|
+
* HTML renderer: plain text or a small allowlist of inline tags
|
|
237
|
+
* (`em`, `strong`, `i`, `b`, `br`) — sanitized before insert.
|
|
238
|
+
* React/Vue: prefer framework nodes; string props stay text.
|
|
239
|
+
*/
|
|
240
|
+
description: string;
|
|
241
|
+
}
|
|
242
|
+
declare const statblockFeatureClassNames: () => string;
|
|
243
|
+
|
|
244
|
+
interface StatblockSectionProps {
|
|
245
|
+
/** Section heading (e.g. Actions / Reactions) — semantic H2. */
|
|
246
|
+
title: string;
|
|
247
|
+
features: StatblockFeatureProps[];
|
|
248
|
+
}
|
|
249
|
+
declare const statblockSectionClassNames: () => string;
|
|
250
|
+
|
|
251
|
+
/** Heading levels allowed for the creature name (embed-safe). */
|
|
252
|
+
type StatblockNameLevel = Extract<HeadingLevel, 1 | 2>;
|
|
253
|
+
interface StatblockProps {
|
|
254
|
+
/** Creature / entity name. */
|
|
255
|
+
name: string;
|
|
256
|
+
/**
|
|
257
|
+
* Semantic heading level for `name`. Default `1` for a dedicated entry page.
|
|
258
|
+
* Use `2` when the host document already owns an H1.
|
|
259
|
+
*/
|
|
260
|
+
nameLevel?: StatblockNameLevel;
|
|
261
|
+
/** Optional flavor paragraph. */
|
|
262
|
+
flavor?: string;
|
|
263
|
+
/** Optional italic type line (size / type). */
|
|
264
|
+
typeLine?: string;
|
|
265
|
+
/** Combat vitals — rendered in the ability group header slot. */
|
|
266
|
+
vitals: PropertyItem[];
|
|
267
|
+
/** Ability columns. */
|
|
268
|
+
abilities: AbilityScoreProps[];
|
|
269
|
+
/** Skills, senses, languages, CR — ability group footer rail. */
|
|
270
|
+
details: PropertyItem[];
|
|
271
|
+
/** Named sections (Actions, Reactions, …). */
|
|
272
|
+
sections?: StatblockSectionProps[];
|
|
273
|
+
}
|
|
274
|
+
declare const statblockClassNames: () => string;
|
|
275
|
+
|
|
81
276
|
/** Placeholder SVG path data until a shared icon library exists. */
|
|
82
277
|
declare const buttonIconPaths: Record<ButtonIconName, string>;
|
|
83
278
|
|
|
84
|
-
export { type BadgeClassNameProps, type BadgeIntent, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, type ButtonClassNameProps, type ButtonIconName, type ButtonIconPosition, type ButtonProps, type ButtonSize, type ButtonVariant, type CaptionClassNameProps, type CaptionProps, type CaptionTone, type FlowDensity, type FlowProps, type HeadingClassNameProps, type HeadingLevel, type HeadingProps, type HeadingTone, type ParagraphClassNameProps, type ParagraphProps, type ParagraphSize, type ParagraphTone, badgeClassNames, buttonClassNames, buttonIconPaths, captionClassNames, flowClassNames, headingClassNames, paragraphClassNames, resolveButtonIconPosition };
|
|
279
|
+
export { type AbilityScoreGroupProps, type AbilityScoreProps, type BadgeClassNameProps, type BadgeIntent, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, type ButtonClassNameProps, type ButtonIconName, type ButtonIconPosition, type ButtonProps, type ButtonSize, type ButtonVariant, type CaptionClassNameProps, type CaptionProps, type CaptionTone, type FlowDensity, type FlowProps, HEADING_RUN_IN_LEVELS, type HeadingClassNameProps, type HeadingLevel, type HeadingProps, type HeadingRunInLevel, type HeadingTone, type ListClassNameProps, type ListItemProps, type ListProps, type ListSize, type ListTone, type ListVariant, type ParagraphClassNameProps, type ParagraphProps, type ParagraphSize, type ParagraphTone, type PropertyItem, type PropertyListProps, type PropertyProps, type ScrollAxis, type ScrollClassNameProps, type ScrollProps, type StatClassNameProps, type StatProps, type StatShape, type StatSize, type StatblockFeatureProps, type StatblockNameLevel, type StatblockProps, type StatblockSectionProps, type TableCellClassNameProps, type TableCellKind, type TableCellProps, type TableClassNameProps, type TableColumn, type TableProps, type TableStripe, type TableVariant, abilityScoreClassNames, abilityScoreGroupClassNames, badgeClassNames, buttonClassNames, buttonIconPaths, captionClassNames, flowClassNames, frameClassNames, headingClassNames, listClassNames, paragraphClassNames, propertyClassNames, propertyListClassNames, proseClassNames, resolveButtonIconPosition, scrollClassNames, statClassNames, statblockClassNames, statblockFeatureClassNames, statblockSectionClassNames, tableCaptionClassNames, tableCellClassNames, tableClassNames, tableColClassNames, tableShellClassNames, tableShellFooterClassNames };
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
// src/button.ts
|
|
1
|
+
// src/core/atoms/button.ts
|
|
2
2
|
var resolveButtonIconPosition = (props) => {
|
|
3
3
|
if (!props.icon) return props.iconPosition;
|
|
4
4
|
return props.iconPosition ?? "left";
|
|
5
5
|
};
|
|
6
|
-
var buttonClassNames = (props) => {
|
|
6
|
+
var buttonClassNames = (props = {}) => {
|
|
7
|
+
const variant = props.variant ?? "primary";
|
|
7
8
|
const size = props.size ?? "md";
|
|
8
9
|
const iconPosition = resolveButtonIconPosition(props);
|
|
9
10
|
const iconClass = iconPosition ? ` eevenkoto-button--icon-${iconPosition}` : "";
|
|
10
|
-
return `eevenkoto-button eevenkoto-button--${
|
|
11
|
+
return `eevenkoto-button eevenkoto-button--${variant} eevenkoto-button--${size}${iconClass}`;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
// src/badge.ts
|
|
14
|
+
// src/core/atoms/badge.ts
|
|
14
15
|
var badgeClassNames = (props = {}) => {
|
|
15
16
|
const variant = props.variant ?? "subtle";
|
|
16
17
|
const intent = props.intent ?? "neutral";
|
|
@@ -25,33 +26,111 @@ var badgeClassNames = (props = {}) => {
|
|
|
25
26
|
].join(" ");
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
// src/heading.ts
|
|
29
|
+
// src/core/atoms/heading.ts
|
|
30
|
+
var HEADING_RUN_IN_LEVELS = [3, 6];
|
|
31
|
+
var isRunInLevel = (level) => HEADING_RUN_IN_LEVELS.includes(level);
|
|
29
32
|
var headingClassNames = (props) => {
|
|
30
33
|
const tone = props.tone ?? "primary";
|
|
31
|
-
const runInClass = props.runIn && props.level
|
|
34
|
+
const runInClass = props.runIn && isRunInLevel(props.level) ? " eevenkoto-heading--run-in" : "";
|
|
32
35
|
return `eevenkoto-heading eevenkoto-heading--${props.level} eevenkoto-heading--${tone}${runInClass}`;
|
|
33
36
|
};
|
|
34
37
|
|
|
35
|
-
// src/paragraph.ts
|
|
38
|
+
// src/core/atoms/paragraph.ts
|
|
36
39
|
var paragraphClassNames = (props = {}) => {
|
|
37
40
|
const size = props.size ?? "md";
|
|
38
41
|
const tone = props.tone ?? "primary";
|
|
39
42
|
return `eevenkoto-paragraph eevenkoto-paragraph--${size} eevenkoto-paragraph--${tone}`;
|
|
40
43
|
};
|
|
41
44
|
|
|
42
|
-
// src/caption.ts
|
|
45
|
+
// src/core/atoms/caption.ts
|
|
43
46
|
var captionClassNames = (props = {}) => {
|
|
44
47
|
const tone = props.tone ?? "secondary";
|
|
45
48
|
return `eevenkoto-caption eevenkoto-caption--${tone}`;
|
|
46
49
|
};
|
|
47
50
|
|
|
48
|
-
// src/
|
|
51
|
+
// src/core/atoms/frame.ts
|
|
52
|
+
var frameClassNames = () => "eevenkoto-frame";
|
|
53
|
+
|
|
54
|
+
// src/core/atoms/scroll.ts
|
|
55
|
+
var scrollClassNames = (props = {}) => {
|
|
56
|
+
const axis = props.axis ?? "x";
|
|
57
|
+
return `eevenkoto-scroll eevenkoto-scroll--${axis}`;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// src/core/atoms/tableCell.ts
|
|
61
|
+
var tableCellClassNames = (props = {}) => {
|
|
62
|
+
const kind = props.kind ?? "text";
|
|
63
|
+
return `eevenkoto-table-cell eevenkoto-table-cell--${kind}`;
|
|
64
|
+
};
|
|
65
|
+
var tableColClassNames = (props = {}) => {
|
|
66
|
+
const kind = props.kind ?? "text";
|
|
67
|
+
return `eevenkoto-table__col eevenkoto-table__col--${kind}`;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// src/core/molecules/flow.ts
|
|
49
71
|
var flowClassNames = (props = {}) => {
|
|
50
72
|
const densityClass = props.density ? ` eevenkoto-flow--${props.density}` : "";
|
|
51
73
|
return `eevenkoto-flow${densityClass}`;
|
|
52
74
|
};
|
|
53
75
|
|
|
54
|
-
// src/
|
|
76
|
+
// src/core/molecules/prose.ts
|
|
77
|
+
var proseClassNames = () => "eevenkoto-prose";
|
|
78
|
+
|
|
79
|
+
// src/core/molecules/list.ts
|
|
80
|
+
var listClassNames = (props = {}) => {
|
|
81
|
+
const variant = props.variant ?? "unordered";
|
|
82
|
+
const size = props.size ?? "md";
|
|
83
|
+
const tone = props.tone ?? "primary";
|
|
84
|
+
return `eevenkoto-list eevenkoto-list--${variant} eevenkoto-list--${size} eevenkoto-list--${tone}`;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
// src/core/atoms/property.ts
|
|
88
|
+
var propertyClassNames = () => "eevenkoto-property";
|
|
89
|
+
|
|
90
|
+
// src/core/molecules/propertyList.ts
|
|
91
|
+
var propertyListClassNames = () => "eevenkoto-property-list";
|
|
92
|
+
|
|
93
|
+
// src/core/atoms/stat.ts
|
|
94
|
+
var statClassNames = (props = {}) => {
|
|
95
|
+
const shape = props.shape ?? "disk";
|
|
96
|
+
const size = props.size ?? "md";
|
|
97
|
+
const emphasis = props.emphasis ? " eevenkoto-stat--emphasis" : "";
|
|
98
|
+
return `eevenkoto-stat eevenkoto-stat--${shape} eevenkoto-stat--${size}${emphasis}`;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// src/core/molecules/table.ts
|
|
102
|
+
var tableClassNames = (props = {}) => {
|
|
103
|
+
const variant = props.variant ?? "default";
|
|
104
|
+
const stripe = props.stripe ?? "row";
|
|
105
|
+
const variantClass = variant === "default" ? "" : ` eevenkoto-table--${variant}`;
|
|
106
|
+
const stripeClass = stripe === "row" ? "" : ` eevenkoto-table--stripe-${stripe}`;
|
|
107
|
+
return `eevenkoto-table${variantClass}${stripeClass}`;
|
|
108
|
+
};
|
|
109
|
+
var tableCaptionClassNames = () => "eevenkoto-table__caption";
|
|
110
|
+
|
|
111
|
+
// src/core/organisms/tableShell.ts
|
|
112
|
+
var tableShellClassNames = () => "eevenkoto-table-shell";
|
|
113
|
+
var tableShellFooterClassNames = () => "eevenkoto-table-shell__footer";
|
|
114
|
+
|
|
115
|
+
// src/domain/molecules/abilityScore.ts
|
|
116
|
+
var abilityScoreClassNames = (props = {}) => {
|
|
117
|
+
const proficient = props.saveProficient ? " eevenkoto-ability-score--save-proficient" : "";
|
|
118
|
+
return `eevenkoto-ability-score${proficient}`;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// src/domain/organisms/abilityScoreGroup.ts
|
|
122
|
+
var abilityScoreGroupClassNames = () => "eevenkoto-ability-score-group";
|
|
123
|
+
|
|
124
|
+
// src/domain/molecules/statblockFeature.ts
|
|
125
|
+
var statblockFeatureClassNames = () => "eevenkoto-statblock-feature";
|
|
126
|
+
|
|
127
|
+
// src/domain/molecules/statblockSection.ts
|
|
128
|
+
var statblockSectionClassNames = () => "eevenkoto-statblock-section";
|
|
129
|
+
|
|
130
|
+
// src/domain/organisms/statblock.ts
|
|
131
|
+
var statblockClassNames = () => "eevenkoto-statblock";
|
|
132
|
+
|
|
133
|
+
// src/core/atoms/icons.ts
|
|
55
134
|
var buttonIconPaths = {
|
|
56
135
|
star: "M8 1.5a.75.75 0 0 1 .67.41l1.52 3.08 3.4.5a.75.75 0 0 1 .42 1.28l-2.46 2.4.58 3.39a.75.75 0 0 1-1.09.79L8 12.27l-3.04 1.6a.75.75 0 0 1-1.09-.79l.58-3.39-2.46-2.4a.75.75 0 0 1 .42-1.28l3.4-.5L7.33 1.91A.75.75 0 0 1 8 1.5Z",
|
|
57
136
|
check: "M12.207 4.793a1 1 0 0 1 0 1.414l-4.5 4.5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L7 8.586l3.793-3.793a1 1 0 0 1 1.414 0Z",
|
|
@@ -59,12 +138,31 @@ var buttonIconPaths = {
|
|
|
59
138
|
plus: "M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3Z"
|
|
60
139
|
};
|
|
61
140
|
export {
|
|
141
|
+
HEADING_RUN_IN_LEVELS,
|
|
142
|
+
abilityScoreClassNames,
|
|
143
|
+
abilityScoreGroupClassNames,
|
|
62
144
|
badgeClassNames,
|
|
63
145
|
buttonClassNames,
|
|
64
146
|
buttonIconPaths,
|
|
65
147
|
captionClassNames,
|
|
66
148
|
flowClassNames,
|
|
149
|
+
frameClassNames,
|
|
67
150
|
headingClassNames,
|
|
151
|
+
listClassNames,
|
|
68
152
|
paragraphClassNames,
|
|
69
|
-
|
|
153
|
+
propertyClassNames,
|
|
154
|
+
propertyListClassNames,
|
|
155
|
+
proseClassNames,
|
|
156
|
+
resolveButtonIconPosition,
|
|
157
|
+
scrollClassNames,
|
|
158
|
+
statClassNames,
|
|
159
|
+
statblockClassNames,
|
|
160
|
+
statblockFeatureClassNames,
|
|
161
|
+
statblockSectionClassNames,
|
|
162
|
+
tableCaptionClassNames,
|
|
163
|
+
tableCellClassNames,
|
|
164
|
+
tableClassNames,
|
|
165
|
+
tableColClassNames,
|
|
166
|
+
tableShellClassNames,
|
|
167
|
+
tableShellFooterClassNames
|
|
70
168
|
};
|