@tensor_1/react 2.65.1 → 2.67.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 +5 -0
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/component-inventory.json +1124 -0
- package/dist/{ChartCore-CY5a4teJ.d.cts → ChartCore-BX0frnUz.d.cts} +1 -8
- package/dist/ChartMetric-bCAW4yvf.d.cts +16 -0
- package/dist/{GlanceCharts-Cb39RqDC.d.cts → GlanceCharts-PVaEwyp2.d.cts} +1 -1
- package/dist/chart-analytic.cjs +41 -38
- package/dist/chart-analytic.d.cts +3 -2
- package/dist/chart-analytic.d.ts +2 -1
- package/dist/chart-preset.cjs +37 -34
- package/dist/chart-preset.d.cts +5 -4
- package/dist/chart-preset.d.ts +2 -1
- package/dist/chart.cjs +37 -34
- package/dist/chart.d.cts +5 -4
- package/dist/chart.d.ts +2 -1
- package/dist/components/Avatar.d.ts +6 -3
- package/dist/components/Avatar.js +9 -3
- package/dist/components/Chart.d.ts +2 -1
- package/dist/components/ChartCore.d.ts +3 -8
- package/dist/components/ChartCore.js +1 -7
- package/dist/components/ChartMetric.d.ts +16 -0
- package/dist/components/ChartMetric.js +12 -0
- package/dist/components/ChartPanels.d.ts +1 -0
- package/dist/components/FocusOnMount.d.ts +15 -15
- package/dist/components/GlanceCharts.d.ts +1 -0
- package/dist/components/MotionList.d.ts +16 -16
- package/dist/components/RuleBuilder.d.ts +8 -1
- package/dist/components/RuleBuilder.js +34 -12
- package/dist/glyphs-BAAgp2Xv.d.cts +256 -0
- package/dist/icons/Icon.d.ts +23 -24
- package/dist/icons/Icon.js +13 -8
- package/dist/icons/components.d.ts +13 -1
- package/dist/icons/components.js +24 -0
- package/dist/icons/glyphs.d.ts +21 -1
- package/dist/icons/glyphs.js +33 -3
- package/dist/icons/intrinsic-components.d.ts +273 -0
- package/dist/icons/intrinsic-components.js +540 -0
- package/dist/icons/types.d.ts +9 -2
- package/dist/icons-intrinsic.cjs +1383 -0
- package/dist/icons-intrinsic.d.cts +275 -0
- package/dist/icons-intrinsic.d.ts +4 -0
- package/dist/icons-intrinsic.js +5 -0
- package/dist/icons.cjs +72 -11
- package/dist/icons.d.cts +18 -247
- package/dist/icons.d.ts +1 -1
- package/dist/index.cjs +355 -304
- package/dist/index.d.cts +17 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/rule-builder-model.d.ts +4 -2
- package/dist/rule-builder-model.js +7 -1
- package/dist/{types-B7OIndwg.d.cts → types-cpbqVqOW.d.cts} +9 -2
- package/package.json +7 -2
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,9 @@ import * as react from 'react';
|
|
|
2
2
|
import { RefObject, HTMLAttributes, PointerEvent, FocusEvent, KeyboardEvent as KeyboardEvent$1, AnchorHTMLAttributes, ReactNode, ButtonHTMLAttributes, AriaAttributes, CSSProperties, SelectHTMLAttributes, MouseEvent, Ref, SyntheticEvent, SVGAttributes, InputHTMLAttributes, TdHTMLAttributes, TableHTMLAttributes, ThHTMLAttributes, TextareaHTMLAttributes, DetailsHTMLAttributes, LiHTMLAttributes, ReactElement, TransitionEvent } from 'react';
|
|
3
3
|
import { P as Placement } from './overlay-position-2Afke51l.cjs';
|
|
4
4
|
export { A as Align, a as PositionOptions, b as PositionResult, R as Rect, S as Side, c as Size, d as computePosition } from './overlay-position-2Afke51l.cjs';
|
|
5
|
-
import { U as UixIcon } from './types-
|
|
5
|
+
import { U as UixIcon } from './types-cpbqVqOW.cjs';
|
|
6
6
|
export { C as ChartStatPoint, L as LinearFit, P as PredictionBandPoint, l as linearFit, n as normalQuantile, p as predictionBand, q as quantiles, s as studentTQuantile } from './chart-stats-o4zDhpVm.cjs';
|
|
7
|
+
export { C as ChartMetric, a as ChartMetricProps } from './ChartMetric-bCAW4yvf.cjs';
|
|
7
8
|
|
|
8
9
|
declare function cx(...args: (string | false | null | undefined | 0)[]): string;
|
|
9
10
|
|
|
@@ -2775,7 +2776,7 @@ declare function isRuleGroup(node: RuleCondition | RuleGroup): node is RuleGroup
|
|
|
2775
2776
|
declare function ruleDepth(group: RuleGroup): number;
|
|
2776
2777
|
declare function findRuleNodeDepth(group: RuleGroup, id: string, depth?: number): number | undefined;
|
|
2777
2778
|
declare function mapRuleGroup(group: RuleGroup, id: string, update: (node: RuleCondition | RuleGroup) => RuleCondition | RuleGroup): RuleGroup;
|
|
2778
|
-
declare function appendRuleNode(group: RuleGroup, parentId: string, node: RuleCondition | RuleGroup, maxDepth?: number): RuleGroup;
|
|
2779
|
+
declare function appendRuleNode(group: RuleGroup, parentId: string, node: RuleCondition | RuleGroup, maxDepth?: number, maxConditions?: number): RuleGroup;
|
|
2779
2780
|
declare function removeRuleNode(group: RuleGroup, id: string): RuleGroup;
|
|
2780
2781
|
declare function moveRuleNode(group: RuleGroup, id: string, direction: -1 | 1): RuleGroup;
|
|
2781
2782
|
/** Set `combinator` on a group and on every group nested in it. */
|
|
@@ -2885,6 +2886,13 @@ interface RuleBuilderProps {
|
|
|
2885
2886
|
/** The action types of the "Then" block. Not needed with `conditionsOnly`. */
|
|
2886
2887
|
actions?: RuleActionDefinition[];
|
|
2887
2888
|
maxDepth?: number;
|
|
2889
|
+
/**
|
|
2890
|
+
* Maximum condition leaves across the whole definition (unlimited by default).
|
|
2891
|
+
* At capacity, add actions are absent. Existing over-limit controlled input is
|
|
2892
|
+
* preserved for editing/removal. Use 1 with conditionsOnly and allowGroups=false
|
|
2893
|
+
* for an optional single condition; checks.emptyGroup=false permits the empty value.
|
|
2894
|
+
*/
|
|
2895
|
+
maxConditions?: number;
|
|
2888
2896
|
/**
|
|
2889
2897
|
* `true`: the same builder with every control disabled and no add, move or remove buttons.
|
|
2890
2898
|
* `'summary'`: one sentence instead of the controls (what `readOnly` rendered up to 2.31.0;
|
|
@@ -2927,7 +2935,7 @@ interface RuleBuilderProps {
|
|
|
2927
2935
|
labels?: Partial<RuleBuilderLabels>;
|
|
2928
2936
|
}
|
|
2929
2937
|
/** Declarative controlled when-conditions-to-actions editor with bounded nesting. */
|
|
2930
|
-
declare function RuleBuilder({ value, onChange, fields, operators, actions, maxDepth, readOnly, conditionsOnly, combinator, hideCombinator, allowGroups, checks, validate, className, addConditionLabel, addGroupLabel, addActionLabel, labels: labelOverrides, }: RuleBuilderProps): react.JSX.Element;
|
|
2938
|
+
declare function RuleBuilder({ value, onChange, fields, operators, actions, maxDepth, readOnly, conditionsOnly, maxConditions, combinator, hideCombinator, allowGroups, checks, validate, className, addConditionLabel, addGroupLabel, addActionLabel, labels: labelOverrides, }: RuleBuilderProps): react.JSX.Element;
|
|
2931
2939
|
|
|
2932
2940
|
/** File helpers shared by `FileUpload` and `Attachment` (HAR-984/985). Pure. */
|
|
2933
2941
|
interface FileSizeOptions {
|
|
@@ -4772,7 +4780,8 @@ declare const DEFAULT_PRESENCE_LABELS: Record<AvatarPresence, string>;
|
|
|
4772
4780
|
interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4773
4781
|
/** TENSOR RX-125 (UIX-04): translatable; English default. Still honoured for `online`. */
|
|
4774
4782
|
onlineLabel?: string;
|
|
4775
|
-
size
|
|
4783
|
+
/** Named kit size, or positive pixels with proportional initials. Invalid numbers use md. */
|
|
4784
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | number;
|
|
4776
4785
|
src?: string;
|
|
4777
4786
|
alt?: string;
|
|
4778
4787
|
/** Initials / fallback shown when there is no `src`. */
|
|
@@ -4789,9 +4798,11 @@ interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
4789
4798
|
presenceLabels?: Partial<Record<AvatarPresence, string>>;
|
|
4790
4799
|
}
|
|
4791
4800
|
/** Avatar over `.uix-avatar`. Renders an image when `src` is set, else children (initials). */
|
|
4792
|
-
declare function Avatar({ size, src, alt, children, status, presence, presenceLabels, onlineLabel, className, ...props }: AvatarProps): react.JSX.Element;
|
|
4801
|
+
declare function Avatar({ size, src, alt, children, status, presence, presenceLabels, onlineLabel, className, style, ...props }: AvatarProps): react.JSX.Element;
|
|
4793
4802
|
interface PresenceDotProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
4794
4803
|
presence: AvatarPresence;
|
|
4804
|
+
/** Positive pixel dimensions; invalid or omitted values keep the kit default. */
|
|
4805
|
+
size?: number;
|
|
4795
4806
|
/**
|
|
4796
4807
|
* The state in words for assistive technology. Default: the English word. Pass `null` when
|
|
4797
4808
|
* the state is already written next to the dot, to make the dot decorative.
|
|
@@ -4799,7 +4810,7 @@ interface PresenceDotProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'childr
|
|
|
4799
4810
|
label?: string | null;
|
|
4800
4811
|
}
|
|
4801
4812
|
/** The presence dot on its own, for a row or a menu that shows no avatar (HAR-1374). */
|
|
4802
|
-
declare function PresenceDot({ presence, label, className, ...props }: PresenceDotProps): react.JSX.Element;
|
|
4813
|
+
declare function PresenceDot({ presence, label, size, className, style, ...props }: PresenceDotProps): react.JSX.Element;
|
|
4803
4814
|
interface AvatarGroupProps extends HTMLAttributes<HTMLSpanElement> {
|
|
4804
4815
|
children?: ReactNode;
|
|
4805
4816
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -168,6 +168,7 @@ export { DEFAULT_DIFF_VIEWER_LABELS, DiffSide, DiffViewer, DiffViewerLabels, Dif
|
|
|
168
168
|
export { DiffEntry, DiffKind, DiffResolution, DiffSummary, buildThreeWayDiff, summarizeDiff } from './diff-model.js';
|
|
169
169
|
export { DEFAULT_TEXT_DIFF_LABELS, TextDiff, TextDiffLabels, TextDiffProps } from './components/TextDiff.js';
|
|
170
170
|
export { TextDiffGranularity, TextDiffLine, TextDiffOp, TextDiffOptions, TextDiffResult, TextDiffRow, TextDiffSegment, diffText, diffTokens, textDiffRows, tokenizeText } from './text-diff-model.js';
|
|
171
|
+
export { ChartMetric, ChartMetricProps } from './components/ChartMetric.js';
|
|
171
172
|
export { ColorPicker, ColorPickerLabels, ColorPickerProps, DEFAULT_COLOR_PICKER_LABELS } from './components/ColorPicker.js';
|
|
172
173
|
export { HsvColor, RgbColor, contrastRatio, hexToRgb, hsvToHex, hsvToRgb, meetsContrast, normalizeHex, rgbToHex, rgbToHsv } from './color-model.js';
|
|
173
174
|
export { AttachmentLabels, DEFAULT_ATTACHMENT_LABELS } from './attachment-labels.js';
|
package/dist/index.js
CHANGED
|
@@ -317,6 +317,7 @@ import { DEFAULT_DIFF_VIEWER_LABELS, DiffViewer } from "./components/DiffViewer.
|
|
|
317
317
|
import { buildThreeWayDiff, summarizeDiff } from "./diff-model.js";
|
|
318
318
|
import { DEFAULT_TEXT_DIFF_LABELS, TextDiff } from "./components/TextDiff.js";
|
|
319
319
|
import { diffText, diffTokens, textDiffRows, tokenizeText } from "./text-diff-model.js";
|
|
320
|
+
import { ChartMetric } from "./components/ChartMetric.js";
|
|
320
321
|
import { ColorPicker, DEFAULT_COLOR_PICKER_LABELS } from "./components/ColorPicker.js";
|
|
321
322
|
import { contrastRatio, hexToRgb, hsvToHex, hsvToRgb, meetsContrast, normalizeHex, rgbToHex, rgbToHsv } from "./color-model.js";
|
|
322
323
|
export {
|
|
@@ -348,6 +349,7 @@ export {
|
|
|
348
349
|
CellSub,
|
|
349
350
|
ChangeHighlight,
|
|
350
351
|
ChartCard,
|
|
352
|
+
ChartMetric,
|
|
351
353
|
Checkbox,
|
|
352
354
|
CheckboxGroup,
|
|
353
355
|
Chip,
|
|
@@ -41,9 +41,11 @@ interface RuleValidationOptions {
|
|
|
41
41
|
}
|
|
42
42
|
declare function isRuleGroup(node: RuleCondition | RuleGroup): node is RuleGroup;
|
|
43
43
|
declare function ruleDepth(group: RuleGroup): number;
|
|
44
|
+
/** Count condition leaves, including those in nested groups. */
|
|
45
|
+
declare function ruleConditionCount(node: RuleCondition | RuleGroup): number;
|
|
44
46
|
declare function findRuleNodeDepth(group: RuleGroup, id: string, depth?: number): number | undefined;
|
|
45
47
|
declare function mapRuleGroup(group: RuleGroup, id: string, update: (node: RuleCondition | RuleGroup) => RuleCondition | RuleGroup): RuleGroup;
|
|
46
|
-
declare function appendRuleNode(group: RuleGroup, parentId: string, node: RuleCondition | RuleGroup, maxDepth?: number): RuleGroup;
|
|
48
|
+
declare function appendRuleNode(group: RuleGroup, parentId: string, node: RuleCondition | RuleGroup, maxDepth?: number, maxConditions?: number): RuleGroup;
|
|
47
49
|
declare function removeRuleNode(group: RuleGroup, id: string): RuleGroup;
|
|
48
50
|
declare function moveRuleNode(group: RuleGroup, id: string, direction: -1 | 1): RuleGroup;
|
|
49
51
|
/** Set `combinator` on a group and on every group nested in it. */
|
|
@@ -70,4 +72,4 @@ declare function summarizeRule(value: RuleDefinition, labels?: {
|
|
|
70
72
|
conditionsOnly?: boolean;
|
|
71
73
|
}): string;
|
|
72
74
|
|
|
73
|
-
export { DEFAULT_RULE_SUMMARY_WORDS, DEFAULT_RULE_VALIDATION_MESSAGES, type RuleAction, type RuleCheck, type RuleCondition, type RuleDefinition, type RuleGroup, type RuleSummaryWords, type RuleValidationIssue, type RuleValidationOptions, appendRuleNode, findRuleNodeDepth, isRuleGroup, mapRuleGroup, moveRuleNode, removeRuleNode, ruleDepth, setRuleCombinator, summarizeRule, validateRuleDefinition };
|
|
75
|
+
export { DEFAULT_RULE_SUMMARY_WORDS, DEFAULT_RULE_VALIDATION_MESSAGES, type RuleAction, type RuleCheck, type RuleCondition, type RuleDefinition, type RuleGroup, type RuleSummaryWords, type RuleValidationIssue, type RuleValidationOptions, appendRuleNode, findRuleNodeDepth, isRuleGroup, mapRuleGroup, moveRuleNode, removeRuleNode, ruleConditionCount, ruleDepth, setRuleCombinator, summarizeRule, validateRuleDefinition };
|
|
@@ -14,6 +14,9 @@ function isRuleGroup(node) {
|
|
|
14
14
|
function ruleDepth(group) {
|
|
15
15
|
return 1 + Math.max(0, ...group.conditions.filter(isRuleGroup).map(ruleDepth));
|
|
16
16
|
}
|
|
17
|
+
function ruleConditionCount(node) {
|
|
18
|
+
return isRuleGroup(node) ? node.conditions.reduce((sum, child) => sum + ruleConditionCount(child), 0) : 1;
|
|
19
|
+
}
|
|
17
20
|
function findRuleNodeDepth(group, id, depth = 1) {
|
|
18
21
|
if (group.id === id) return depth;
|
|
19
22
|
for (const node of group.conditions) {
|
|
@@ -35,7 +38,9 @@ function mapRuleGroup(group, id, update) {
|
|
|
35
38
|
})
|
|
36
39
|
};
|
|
37
40
|
}
|
|
38
|
-
function appendRuleNode(group, parentId, node, maxDepth = 3) {
|
|
41
|
+
function appendRuleNode(group, parentId, node, maxDepth = 3, maxConditions = Number.POSITIVE_INFINITY) {
|
|
42
|
+
const capacity = Number.isNaN(maxConditions) ? 0 : Math.max(0, Math.floor(maxConditions));
|
|
43
|
+
if (capacity !== Number.POSITIVE_INFINITY && ruleConditionCount(group) + ruleConditionCount(node) > capacity) return group;
|
|
39
44
|
const parentDepth = findRuleNodeDepth(group, parentId);
|
|
40
45
|
if (parentDepth === void 0) return group;
|
|
41
46
|
const addedDepth = isRuleGroup(node) ? ruleDepth(node) : 0;
|
|
@@ -130,6 +135,7 @@ export {
|
|
|
130
135
|
mapRuleGroup,
|
|
131
136
|
moveRuleNode,
|
|
132
137
|
removeRuleNode,
|
|
138
|
+
ruleConditionCount,
|
|
133
139
|
ruleDepth,
|
|
134
140
|
setRuleCombinator,
|
|
135
141
|
summarizeRule,
|
|
@@ -7,14 +7,21 @@ type IconTone = 'current' | 'muted' | 'accent' | 'success' | 'warning' | 'danger
|
|
|
7
7
|
interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
|
|
8
8
|
/**
|
|
9
9
|
* `sm` 16 px, `md` 20 px (default), `lg` 24 px — the `--uix-icon-*` tokens — or a CSS length
|
|
10
|
-
* / pixel number.
|
|
10
|
+
* / pixel number. Presets use CSS; numeric/length values use inline dimensions by default.
|
|
11
11
|
*/
|
|
12
12
|
size?: IconSize | number | string;
|
|
13
|
+
/**
|
|
14
|
+
* `intrinsic` emits numeric/CSS-length dimensions as SVG presentation attributes so
|
|
15
|
+
* control and product CSS retain their precedence. The named intrinsic entry defaults
|
|
16
|
+
* to this mode and 24 units. Existing icons keep `explicit` sizing by default.
|
|
17
|
+
*/
|
|
18
|
+
sizeMode?: 'explicit' | 'intrinsic';
|
|
13
19
|
/** Colour from a UIx token. Default `current`: inherits the text colour. */
|
|
14
20
|
tone?: IconTone;
|
|
15
21
|
/**
|
|
16
22
|
* Accessible name. With it the icon is `role="img"`; without it the icon is decorative
|
|
17
|
-
* (`aria-hidden`).
|
|
23
|
+
* (`aria-hidden`). Intrinsic mode also honors raw ARIA attributes and title children.
|
|
24
|
+
* An icon-only button names the button instead, so leave this empty there.
|
|
18
25
|
*/
|
|
19
26
|
label?: string;
|
|
20
27
|
/** Stroke width in the 24-unit box. Default 2. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tensor_1/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.67.0",
|
|
4
4
|
"description": "Thin React wrappers over the UIx v2 CSS component library.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -65,7 +65,12 @@
|
|
|
65
65
|
"import": "./dist/icons.js",
|
|
66
66
|
"require": "./dist/icons.cjs"
|
|
67
67
|
},
|
|
68
|
-
"./page-rules": "./page-rules/index.mjs"
|
|
68
|
+
"./page-rules": "./page-rules/index.mjs",
|
|
69
|
+
"./icons/intrinsic": {
|
|
70
|
+
"types": "./dist/icons-intrinsic.d.ts",
|
|
71
|
+
"import": "./dist/icons-intrinsic.js",
|
|
72
|
+
"require": "./dist/icons-intrinsic.cjs"
|
|
73
|
+
}
|
|
69
74
|
},
|
|
70
75
|
"scripts": {
|
|
71
76
|
"build": "node scripts/clean-dist.mjs && tsup && node scripts/check-dist.mjs",
|