@ntmats/hc-ui 0.8.0 → 0.9.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/dist/index.d.ts +10 -1
- package/dist/index.js +2 -1
- package/dist/styles.css +41 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -953,9 +953,18 @@ export interface CombatDialViewProps {
|
|
|
953
953
|
/**
|
|
954
954
|
* `comfortable` (default): 40px cells. `compact`: 34px cells, 6px gaps, 13px numbers and
|
|
955
955
|
* tighter point chips, for dense lists (HCUI's compact dial of the unit view on phones).
|
|
956
|
+
* `dense`: 25px cells and rows, 3px between rows, 11–12px numbers, the compact header,
|
|
957
|
+
* for a dial next to other content (the Arena's table card).
|
|
956
958
|
* The printed presentation keeps its own measures.
|
|
957
959
|
*/
|
|
958
|
-
density?: 'comfortable' | 'compact';
|
|
960
|
+
density?: 'comfortable' | 'compact' | 'dense';
|
|
961
|
+
/**
|
|
962
|
+
* How the current click is marked. `bar` (default): a muted column with a thin accent
|
|
963
|
+
* bar on top. `framed`: the column is framed in light gray behind the cells and the click
|
|
964
|
+
* number becomes a filled circle in the text color, easier to find mid-game; the power
|
|
965
|
+
* colors stay intact. Ignored by the printed presentation.
|
|
966
|
+
*/
|
|
967
|
+
currentMark?: 'bar' | 'framed';
|
|
959
968
|
/** Without it the dial is static: it neither marks nor changes the click; only cells with a tip react. */
|
|
960
969
|
onClickChange?: (click: number) => void;
|
|
961
970
|
onSelectPoint: (point: CombatDialPoint) => void;
|
package/dist/index.js
CHANGED
|
@@ -1574,6 +1574,7 @@ var CombatDialView = forwardRef(function CombatDialView2({
|
|
|
1574
1574
|
labels,
|
|
1575
1575
|
presentation = "default",
|
|
1576
1576
|
density = "comfortable",
|
|
1577
|
+
currentMark = "bar",
|
|
1577
1578
|
onClickChange,
|
|
1578
1579
|
onSelectPoint,
|
|
1579
1580
|
tip,
|
|
@@ -1677,7 +1678,7 @@ var CombatDialView = forwardRef(function CombatDialView2({
|
|
|
1677
1678
|
COMBAT_DIAL_STATS.map((stat) => /* @__PURE__ */ jsx("div", { className: "hc-ui-combat-dial__cell", "data-kind": "ko", children: labels.koCell }, stat))
|
|
1678
1679
|
] })
|
|
1679
1680
|
] }, rowIndex);
|
|
1680
|
-
return /* @__PURE__ */ jsxs("section", { ref, className: "hc-ui-combat-dial", "data-presentation": presentation, "data-density": density === "
|
|
1681
|
+
return /* @__PURE__ */ jsxs("section", { ref, className: "hc-ui-combat-dial", "data-presentation": presentation, "data-density": density === "comfortable" ? void 0 : density, "data-current-mark": currentMark === "framed" ? "framed" : void 0, "data-static": flag(!tracksClick), children: [
|
|
1681
1682
|
presentation !== "printed" && /* @__PURE__ */ jsxs("header", { className: "hc-ui-combat-dial__header", children: [
|
|
1682
1683
|
/* @__PURE__ */ jsxs("div", { className: "hc-ui-combat-dial__header-top", children: [
|
|
1683
1684
|
/* @__PURE__ */ jsx("span", { className: "hc-ui-combat-dial__label", children: labels.heading }),
|
package/dist/styles.css
CHANGED
|
@@ -1915,6 +1915,47 @@
|
|
|
1915
1915
|
[data-hc-ds] .hc-ui-combat-dial[data-density='compact']:not([data-presentation='printed']) :is(.hc-ui-combat-dial__cell[data-kind='value'], .hc-ui-combat-dial__range) { font-size: var(--hc-font-size-sm); }
|
|
1916
1916
|
[data-hc-ds] .hc-ui-combat-dial[data-density='compact']:not([data-presentation='printed']) .hc-ui-combat-dial__special-icon { width: 18px; height: 18px; }
|
|
1917
1917
|
|
|
1918
|
+
/* `density="dense"`: the compact header (point chips) with 25px cells and rows, 3px between
|
|
1919
|
+
rows and 6px between clicks, 11px click numbers and 12px values, 15px special icons:
|
|
1920
|
+
a dial that sits beside other content (the Arena's table card). */
|
|
1921
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__header { gap: 0; }
|
|
1922
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__points { gap: var(--hc-space-1); padding: var(--hc-space-1) 0; }
|
|
1923
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__chip { gap: var(--hc-space-2); padding: var(--hc-space-2); border-radius: var(--hc-radius-lg); }
|
|
1924
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__grid-wrap { padding: 5px 0; }
|
|
1925
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__grid { gap: 6px; }
|
|
1926
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__col { grid-template-rows: repeat(5, 25px); gap: 3px; }
|
|
1927
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__col[data-start]::before { top: 28px; }
|
|
1928
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__cell { width: 25px; height: 25px; }
|
|
1929
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__cell[data-tip]::after { inset: -2px; }
|
|
1930
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__cell[data-kind='number'] { font-size: 11px; }
|
|
1931
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) :is(.hc-ui-combat-dial__cell:is([data-kind='value'], [data-kind='ko']), .hc-ui-combat-dial__range) { font-size: 12px; }
|
|
1932
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__special-icon { width: 15px; height: 15px; }
|
|
1933
|
+
[data-hc-ds] .hc-ui-combat-dial[data-density='dense']:not([data-presentation='printed']) .hc-ui-combat-dial__bolt { height: 11px; }
|
|
1934
|
+
|
|
1935
|
+
/* `currentMark="framed"`: the current click's column is framed in light gray behind its
|
|
1936
|
+
cells (a little larger than them) and its number becomes a filled circle in the text
|
|
1937
|
+
color. Shape and contrast mark it without relying on color; the power colors stay. */
|
|
1938
|
+
[data-hc-ds] .hc-ui-combat-dial[data-current-mark='framed']:not([data-presentation='printed']) .hc-ui-combat-dial__col[data-current] {
|
|
1939
|
+
isolation: isolate;
|
|
1940
|
+
background: none;
|
|
1941
|
+
box-shadow: none;
|
|
1942
|
+
}
|
|
1943
|
+
[data-hc-ds] .hc-ui-combat-dial[data-current-mark='framed']:not([data-presentation='printed']) .hc-ui-combat-dial__col[data-current]::after {
|
|
1944
|
+
content: '';
|
|
1945
|
+
position: absolute;
|
|
1946
|
+
inset: -4px -3px;
|
|
1947
|
+
z-index: -1;
|
|
1948
|
+
border-radius: 8px;
|
|
1949
|
+
background: var(--hc-color-bg-muted-2);
|
|
1950
|
+
box-shadow: inset 0 0 0 1px var(--hc-color-border);
|
|
1951
|
+
}
|
|
1952
|
+
[data-hc-ds] .hc-ui-combat-dial[data-current-mark='framed']:not([data-presentation='printed']) .hc-ui-combat-dial__col[data-current] .hc-ui-combat-dial__cell[data-kind='number'] {
|
|
1953
|
+
border-radius: 50%;
|
|
1954
|
+
background: var(--hc-color-text-primary);
|
|
1955
|
+
color: var(--hc-color-text-inverse);
|
|
1956
|
+
font-weight: 800;
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1918
1959
|
/* `presentation="printed"`: the physical card's dial, at HCUnits' measures (20px
|
|
1919
1960
|
cells, 23px between clicks, 24px between rows); the white legend sits on the
|
|
1920
1961
|
card's dark window. Its numbers use the `font` shorthand, with ROND right after it
|