@joanroucoux/cairn-ui 0.7.1 → 0.7.2
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/package.json
CHANGED
package/styles/motion.css
CHANGED
|
@@ -69,6 +69,15 @@
|
|
|
69
69
|
transition: none !important;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
[data-ui-settling],
|
|
73
|
+
[data-ui-settling]::before,
|
|
74
|
+
[data-ui-settling]::after,
|
|
75
|
+
[data-ui-settling] *,
|
|
76
|
+
[data-ui-settling] *::before,
|
|
77
|
+
[data-ui-settling] *::after {
|
|
78
|
+
transition: none !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
72
81
|
@media (prefers-reduced-motion: reduce) {
|
|
73
82
|
.ui-enter-fade-up,
|
|
74
83
|
.ui-enter-panel {
|
|
@@ -116,6 +116,7 @@ declare class UiAsync {
|
|
|
116
116
|
protected readonly titleClasses: _angular_core.Signal<string>;
|
|
117
117
|
protected readonly messageClasses: _angular_core.Signal<string>;
|
|
118
118
|
protected readonly retryButtonClasses: _angular_core.Signal<string>;
|
|
119
|
+
constructor();
|
|
119
120
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiAsync, never>;
|
|
120
121
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiAsync, "ui-async", never, { "state": { "alias": "state"; "required": true; "isSignal": true; }; "errorTitle": { "alias": "errorTitle"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "retryLabel": { "alias": "retryLabel"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "card": { "alias": "card"; "required": false; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, { "retry": "retry"; }, never, ["[asyncLoading]", "[asyncEmpty]", "*"], true, never>;
|
|
121
122
|
}
|
|
@@ -151,7 +152,8 @@ declare class UiAvatar {
|
|
|
151
152
|
/**
|
|
152
153
|
* Round hit area around a `ui-avatar` that links somewhere: 44px on touch, 40px from 64rem, with a
|
|
153
154
|
* glow on hover and the press scale. On the current page (`aria-current="page"`, which `routerLinkActive`
|
|
154
|
-
* sets through `ariaCurrentWhenActive`) it holds a soft halo
|
|
155
|
+
* sets through `ariaCurrentWhenActive`) it holds a soft halo, drawn at once when the route changes. The avatar
|
|
156
|
+
* itself keeps its own size.
|
|
155
157
|
*
|
|
156
158
|
* @example
|
|
157
159
|
* <a uiAvatarLink routerLink="/profile"><ui-avatar initials="JR" label="Profile" size="auto" /></a>
|
|
@@ -174,6 +176,7 @@ declare class UiBackLink {
|
|
|
174
176
|
readonly size: _angular_core.InputSignal<"sm" | "md" | "header">;
|
|
175
177
|
protected readonly chevron: _angular_core.Signal<number>;
|
|
176
178
|
protected readonly classes: _angular_core.Signal<string>;
|
|
179
|
+
constructor();
|
|
177
180
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiBackLink, never>;
|
|
178
181
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiBackLink, "a[ui-back-link]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
179
182
|
}
|
|
@@ -722,6 +725,10 @@ type EndRef = ElementRef<SVGCircleElement>;
|
|
|
722
725
|
* only the first, middle and last ticks count; with `auto` every tick counts from `sm` up and the
|
|
723
726
|
* three core ticks below it. Tick positions are unchanged.
|
|
724
727
|
*
|
|
728
|
+
* A new series interpolates from the drawn curve, fading the start label and the dashed line. With
|
|
729
|
+
* `rangeKey` bound, only a series that comes with a new key does so: a new series under the same key
|
|
730
|
+
* (a reload after a buy) is drawn at once, with no fade. The key may change before its series arrives.
|
|
731
|
+
*
|
|
725
732
|
* @example
|
|
726
733
|
* <ui-line-chart [points]="points" label="Net worth over one month" startLabel="Since" [valueFormat]="formatEur" />
|
|
727
734
|
*/
|
|
@@ -742,6 +749,7 @@ declare class UiLineChart {
|
|
|
742
749
|
readonly tooltipDelta: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
743
750
|
readonly axisGap: _angular_core.InputSignal<number | "auto">;
|
|
744
751
|
readonly axisTicks: _angular_core.InputSignalWithTransform<AxisTicks, string | 3 | 5>;
|
|
752
|
+
readonly rangeKey: _angular_core.InputSignal<string | null>;
|
|
745
753
|
protected readonly svgRef: _angular_core.Signal<PlotRef>;
|
|
746
754
|
protected readonly lineRef: _angular_core.Signal<LineRef | undefined>;
|
|
747
755
|
protected readonly endRef: _angular_core.Signal<EndRef | undefined>;
|
|
@@ -781,7 +789,7 @@ declare class UiLineChart {
|
|
|
781
789
|
protected onPointerLeave(): void;
|
|
782
790
|
protected onKeydown(event: KeyboardEvent): void;
|
|
783
791
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiLineChart, never>;
|
|
784
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiLineChart, "ui-line-chart", never, { "points": { "alias": "points"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "tooltipFormat": { "alias": "tooltipFormat"; "required": false; "isSignal": true; }; "deltaFormat": { "alias": "deltaFormat"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "axisFormat": { "alias": "axisFormat"; "required": false; "isSignal": true; }; "startLabel": { "alias": "startLabel"; "required": false; "isSignal": true; }; "timeColumnLabel": { "alias": "timeColumnLabel"; "required": false; "isSignal": true; }; "valueColumnLabel": { "alias": "valueColumnLabel"; "required": false; "isSignal": true; }; "sparkline": { "alias": "sparkline"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipDelta": { "alias": "tooltipDelta"; "required": false; "isSignal": true; }; "axisGap": { "alias": "axisGap"; "required": false; "isSignal": true; }; "axisTicks": { "alias": "axisTicks"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
792
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiLineChart, "ui-line-chart", never, { "points": { "alias": "points"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "tooltipFormat": { "alias": "tooltipFormat"; "required": false; "isSignal": true; }; "deltaFormat": { "alias": "deltaFormat"; "required": false; "isSignal": true; }; "timeFormat": { "alias": "timeFormat"; "required": false; "isSignal": true; }; "axisFormat": { "alias": "axisFormat"; "required": false; "isSignal": true; }; "startLabel": { "alias": "startLabel"; "required": false; "isSignal": true; }; "timeColumnLabel": { "alias": "timeColumnLabel"; "required": false; "isSignal": true; }; "valueColumnLabel": { "alias": "valueColumnLabel"; "required": false; "isSignal": true; }; "sparkline": { "alias": "sparkline"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipDelta": { "alias": "tooltipDelta"; "required": false; "isSignal": true; }; "axisGap": { "alias": "axisGap"; "required": false; "isSignal": true; }; "axisTicks": { "alias": "axisTicks"; "required": false; "isSignal": true; }; "rangeKey": { "alias": "rangeKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
785
793
|
}
|
|
786
794
|
|
|
787
795
|
/**
|
|
@@ -864,7 +872,7 @@ declare class UiMeter {
|
|
|
864
872
|
readonly value: _angular_core.InputSignal<number>;
|
|
865
873
|
readonly label: _angular_core.InputSignal<string>;
|
|
866
874
|
readonly valueText: _angular_core.InputSignal<string>;
|
|
867
|
-
readonly tone: _angular_core.InputSignal<2 |
|
|
875
|
+
readonly tone: _angular_core.InputSignal<2 | 3 | 1 | 4 | 6 | 5>;
|
|
868
876
|
readonly size: _angular_core.InputSignal<"sm" | "md">;
|
|
869
877
|
protected readonly trackClasses: _angular_core.Signal<string>;
|
|
870
878
|
protected readonly percent: _angular_core.Signal<number>;
|
|
@@ -979,7 +987,23 @@ declare class UiHighlight {
|
|
|
979
987
|
declare function injectReducedMotion(): Signal<boolean>;
|
|
980
988
|
|
|
981
989
|
/**
|
|
982
|
-
*
|
|
990
|
+
* Holds the transitions of the host and of everything inside it until two frames after its first
|
|
991
|
+
* render, through the `data-ui-settling` attribute and the matching rule of `styles/motion.css`.
|
|
992
|
+
* A route's elements are created a tick before their classes are bound; a layout read in between
|
|
993
|
+
* would otherwise turn the bound fill, colour or switch track into a transition on page open. Call it
|
|
994
|
+
* in an injection context. A host whose view is never refreshed (a detached change detector) keeps the
|
|
995
|
+
* attribute, and with it no transition.
|
|
996
|
+
*
|
|
997
|
+
* @example
|
|
998
|
+
* constructor() {
|
|
999
|
+
* holdTransitionsUntilRendered();
|
|
1000
|
+
* }
|
|
1001
|
+
*/
|
|
1002
|
+
declare function holdTransitionsUntilRendered(): void;
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* One destination of the sidebar navigation (Portfolio, Holdings, Allocation, Accounts). The active
|
|
1006
|
+
* fill and text colour switch at once on navigation; only the hover fill fades.
|
|
983
1007
|
*
|
|
984
1008
|
* @example
|
|
985
1009
|
* <a ui-nav-item [active]="url === '/'" routerLink="/">
|
|
@@ -990,6 +1014,7 @@ declare function injectReducedMotion(): Signal<boolean>;
|
|
|
990
1014
|
declare class UiNavItem {
|
|
991
1015
|
readonly active: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
992
1016
|
protected readonly classes: _angular_core.Signal<string>;
|
|
1017
|
+
constructor();
|
|
993
1018
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiNavItem, never>;
|
|
994
1019
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiNavItem, "a[ui-nav-item]", never, { "active": { "alias": "active"; "required": false; "isSignal": true; }; }, {}, never, ["[navIcon]", "*"], true, never>;
|
|
995
1020
|
}
|
|
@@ -1090,6 +1115,7 @@ declare class UiSegmented {
|
|
|
1090
1115
|
readonly size: _angular_core.InputSignal<"sm" | "md">;
|
|
1091
1116
|
protected readonly radios: _angular_core.Signal<readonly ElementRef<HTMLButtonElement>[]>;
|
|
1092
1117
|
protected readonly thumbIndex: _angular_core.Signal<number>;
|
|
1118
|
+
constructor();
|
|
1093
1119
|
protected optionClasses(optionValue: string): string;
|
|
1094
1120
|
protected tabIndexFor(optionValue: string): number;
|
|
1095
1121
|
protected select(optionValue: string): void;
|
|
@@ -1139,19 +1165,24 @@ declare class UiSkeleton {
|
|
|
1139
1165
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiSkeleton, "ui-skeleton", never, { "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "lines": { "alias": "lines"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1140
1166
|
}
|
|
1141
1167
|
|
|
1168
|
+
/** Available stale link sizes. `StaleLinkSize` is derived from this tuple. */
|
|
1169
|
+
declare const STALE_LINK_SIZES: readonly ["caption", "label"];
|
|
1170
|
+
type StaleLinkSize = (typeof STALE_LINK_SIZES)[number];
|
|
1142
1171
|
/**
|
|
1143
1172
|
* Link in the stale tone, for a caption about data that is late or left out of a total, such as
|
|
1144
|
-
* "1 ligne sans cours, non comptée".
|
|
1145
|
-
*
|
|
1173
|
+
* "1 ligne sans cours, non comptée". Weight 500, underlined on hover, with an optional trailing
|
|
1174
|
+
* chevron. `size` is `caption` (12/17, the default) or `label` (14/20, the dashboard total's
|
|
1175
|
+
* "1 cours en retard").
|
|
1146
1176
|
*
|
|
1147
1177
|
* @example
|
|
1148
|
-
* <a uiStaleLink chevron routerLink="/holdings">1 cours en retard</a>
|
|
1178
|
+
* <a uiStaleLink chevron size="label" routerLink="/holdings">1 cours en retard</a>
|
|
1149
1179
|
*/
|
|
1150
1180
|
declare class UiStaleLink {
|
|
1151
1181
|
readonly chevron: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1152
|
-
|
|
1182
|
+
readonly size: _angular_core.InputSignal<"label" | "caption">;
|
|
1183
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
1153
1184
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiStaleLink, never>;
|
|
1154
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiStaleLink, "a[uiStaleLink]", never, { "chevron": { "alias": "chevron"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1185
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiStaleLink, "a[uiStaleLink]", never, { "chevron": { "alias": "chevron"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1155
1186
|
}
|
|
1156
1187
|
|
|
1157
1188
|
/** Available stat sizes. `StatSize` is derived from this tuple. */
|
|
@@ -1191,6 +1222,7 @@ declare class UiStat {
|
|
|
1191
1222
|
*/
|
|
1192
1223
|
declare class UiSwitch {
|
|
1193
1224
|
protected readonly classes = "relative shrink-0 w-[51px] h-[31px] pointer-fine:w-10 pointer-fine:h-6 appearance-none cursor-pointer rounded-pill bg-(--muted) checked:bg-(--primary) transition-[background-color] duration-(--duration-fast) ease-out disabled:pointer-events-none disabled:opacity-40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) before:absolute before:inset-x-0 before:top-1/2 before:-translate-y-1/2 before:h-(--row-min) before:content-[''] after:absolute after:top-0.5 after:left-0.5 after:size-[27px] pointer-fine:after:size-5 after:rounded-pill after:bg-(--card) after:shadow-[0_1px_3px_rgb(0_0_0/0.2)] after:transition-transform after:duration-(--duration-fast) after:ease-out after:content-[''] checked:after:translate-x-[20px] pointer-fine:checked:after:translate-x-4";
|
|
1225
|
+
constructor();
|
|
1194
1226
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiSwitch, never>;
|
|
1195
1227
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiSwitch, "input[type=checkbox][uiSwitch]", never, {}, {}, never, never, true, never>;
|
|
1196
1228
|
}
|
|
@@ -1289,6 +1321,7 @@ declare class UiTable {
|
|
|
1289
1321
|
readonly rule: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1290
1322
|
readonly spaced: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1291
1323
|
protected readonly classes: _angular_core.Signal<string>;
|
|
1324
|
+
constructor();
|
|
1292
1325
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTable, never>;
|
|
1293
1326
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiTable, "table[uiTable]", never, { "row": { "alias": "row"; "required": false; "isSignal": true; }; "rule": { "alias": "rule"; "required": false; "isSignal": true; }; "spaced": { "alias": "spaced"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1294
1327
|
}
|
|
@@ -1404,5 +1437,5 @@ declare class UiCellSub {
|
|
|
1404
1437
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiCellSub, "[uiCellSub]", never, { "narrow": { "alias": "narrow"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1405
1438
|
}
|
|
1406
1439
|
|
|
1407
|
-
export { ALERT_VARIANTS, AMOUNT_MASKINGS, AMOUNT_NUMERICS, ASYNC_ALIGNS, ASYNC_STATES, ASYNC_VARIANTS, AVATAR_SIZES, BACK_LINK_SIZES, BADGE_SIZES, BADGE_VARIANTS, BUTTON_SIZES, BUTTON_VARIANTS, CARD_PADDINGS, CARD_SURFACES, CARD_VARIANTS, CELL_BREAKPOINTS, CONTROL_SIZES, CONTROL_SURFACES, DELTA_EMPHASES, DELTA_SIZES, DELTA_WEIGHTS, DIALOG_CLOSE_REASONS, DIALOG_LAYOUTS, DIALOG_WIDTHS, FACT_SIZES, FACT_SUB_TONES, GROUP_SIZES, METER_SIZES, METER_TONES, ROW_GAPS, ROW_PADDINGS, ROW_SIZES, SEGMENTED_SIZES, SKELETON_SHAPES, STAT_SIZES, SUB_TONES, TABLE_ROWS, UI_AMOUNT_MASKED, UiActionBar, UiAlert, UiAmount, UiAsync, UiAvatar, UiAvatarLink, UiBackLink, UiBadge, UiButton, UiCard, UiCellSub, UiChoiceChips, UiDelta, UiDialog, UiDonut, UiEmpty, UiExternalLink, UiFact, UiFacts, UiField, UiFieldLeading, UiFieldTrailing, UiFilterChips, UiFlipItem, UiFlipList, UiGroup, UiGroupCell, UiHighlight, UiInput, UiLineChart, UiListRow, UiMenu, UiMenuItem, UiMenuTrigger, UiMeter, UiNavItem, UiRow, UiRowAction, UiRowItem, UiRowLink, UiRowTile, UiSegmented, UiSelect, UiSkeleton, UiStaleLink, UiStat, UiSwitch, UiTab, UiTabBar, UiTable, UiTd, UiTextarea, UiTh, UiToaster, UiToasts, UiTr, delayedState, formatAmount, injectReducedMotion };
|
|
1408
|
-
export type { AlertVariant, AmountFormatOptions, AmountMasking, AmountNumeric, AsyncAlign, AsyncState, AsyncVariant, AvatarSize, AxisTicks, BackLinkSize, BadgeSize, BadgeVariant, ButtonSize, ButtonVariant, CardPadding, CardSurface, CardVariant, CellBreakpoint, ChartPoint, ChoiceChipOption, ControlSize, ControlSurface, DeltaEmphasis, DeltaSize, DeltaWeight, DialogCloseReason, DialogLayout, DialogWidth, DonutSlice, FactSize, FactSubTone, FilterChipOption, GroupSize, MeterSize, MeterTone, RowGap, RowPadding, RowSize, SegmentedOption, SegmentedSize, SkeletonShape, StatSize, SubTone, TableRow, Toast, TooltipSize, UiControlError };
|
|
1440
|
+
export { ALERT_VARIANTS, AMOUNT_MASKINGS, AMOUNT_NUMERICS, ASYNC_ALIGNS, ASYNC_STATES, ASYNC_VARIANTS, AVATAR_SIZES, BACK_LINK_SIZES, BADGE_SIZES, BADGE_VARIANTS, BUTTON_SIZES, BUTTON_VARIANTS, CARD_PADDINGS, CARD_SURFACES, CARD_VARIANTS, CELL_BREAKPOINTS, CONTROL_SIZES, CONTROL_SURFACES, DELTA_EMPHASES, DELTA_SIZES, DELTA_WEIGHTS, DIALOG_CLOSE_REASONS, DIALOG_LAYOUTS, DIALOG_WIDTHS, FACT_SIZES, FACT_SUB_TONES, GROUP_SIZES, METER_SIZES, METER_TONES, ROW_GAPS, ROW_PADDINGS, ROW_SIZES, SEGMENTED_SIZES, SKELETON_SHAPES, STALE_LINK_SIZES, STAT_SIZES, SUB_TONES, TABLE_ROWS, UI_AMOUNT_MASKED, UiActionBar, UiAlert, UiAmount, UiAsync, UiAvatar, UiAvatarLink, UiBackLink, UiBadge, UiButton, UiCard, UiCellSub, UiChoiceChips, UiDelta, UiDialog, UiDonut, UiEmpty, UiExternalLink, UiFact, UiFacts, UiField, UiFieldLeading, UiFieldTrailing, UiFilterChips, UiFlipItem, UiFlipList, UiGroup, UiGroupCell, UiHighlight, UiInput, UiLineChart, UiListRow, UiMenu, UiMenuItem, UiMenuTrigger, UiMeter, UiNavItem, UiRow, UiRowAction, UiRowItem, UiRowLink, UiRowTile, UiSegmented, UiSelect, UiSkeleton, UiStaleLink, UiStat, UiSwitch, UiTab, UiTabBar, UiTable, UiTd, UiTextarea, UiTh, UiToaster, UiToasts, UiTr, delayedState, formatAmount, holdTransitionsUntilRendered, injectReducedMotion };
|
|
1441
|
+
export type { AlertVariant, AmountFormatOptions, AmountMasking, AmountNumeric, AsyncAlign, AsyncState, AsyncVariant, AvatarSize, AxisTicks, BackLinkSize, BadgeSize, BadgeVariant, ButtonSize, ButtonVariant, CardPadding, CardSurface, CardVariant, CellBreakpoint, ChartPoint, ChoiceChipOption, ControlSize, ControlSurface, DeltaEmphasis, DeltaSize, DeltaWeight, DialogCloseReason, DialogLayout, DialogWidth, DonutSlice, FactSize, FactSubTone, FilterChipOption, GroupSize, MeterSize, MeterTone, RowGap, RowPadding, RowSize, SegmentedOption, SegmentedSize, SkeletonShape, StaleLinkSize, StatSize, SubTone, TableRow, Toast, TooltipSize, UiControlError };
|