@uni-design-system/uni-angular 7.1.0 → 7.3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uni-design-system/uni-angular",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@angular/core": "^21.2.0",
|
|
23
23
|
"@angular/forms": "^21.2.0",
|
|
24
24
|
"@emotion/css": "^11.0.0",
|
|
25
|
-
"@uni-design-system/uni-core": "^7.
|
|
25
|
+
"@uni-design-system/uni-core": "^7.3.0"
|
|
26
26
|
},
|
|
27
27
|
"module": "fesm2022/uni-design-system-uni-angular.mjs",
|
|
28
28
|
"typings": "types/uni-design-system-uni-angular.d.ts",
|
|
@@ -2,6 +2,19 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
let _angular_devkit_schematics = require("@angular-devkit/schematics");
|
|
3
3
|
let _angular_devkit_schematics_tasks = require("@angular-devkit/schematics/tasks");
|
|
4
4
|
//#region ../core/dist/esm/index.js
|
|
5
|
+
/** Duration (seconds) the default theme assigns `expand`'s `transitionSpeed`. */
|
|
6
|
+
var EXPAND_DEFAULT_SPEED = .35;
|
|
7
|
+
/**
|
|
8
|
+
* Duration envelope at the default speed. A tiny region never blinks past
|
|
9
|
+
* faster than the min; a full-page region never drags longer than the max.
|
|
10
|
+
* Expressed at `EXPAND_DEFAULT_SPEED` and applied as scale-factor clamps, so a
|
|
11
|
+
* theme that slows `transitionSpeed` down widens its envelope proportionally
|
|
12
|
+
* instead of being capped back to the stock feel.
|
|
13
|
+
*/
|
|
14
|
+
var EXPAND_MIN_DURATION = .15;
|
|
15
|
+
var EXPAND_MAX_DURATION = .6;
|
|
16
|
+
EXPAND_MIN_DURATION / EXPAND_DEFAULT_SPEED;
|
|
17
|
+
EXPAND_MAX_DURATION / EXPAND_DEFAULT_SPEED;
|
|
5
18
|
var cycle = (angle) => {
|
|
6
19
|
if (angle > 360) return angle - 360;
|
|
7
20
|
if (angle < 0) return angle + 360;
|
|
@@ -577,6 +590,7 @@ var BaseIcons = {
|
|
|
577
590
|
arrowLeft: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m294.92-450 227.85 227.85L480-180 180-480l300-300 42.77 42.15L294.92-510H780v60H294.92Z'/%3e%3c/svg%3e",
|
|
578
591
|
arrowRight: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M665.08-450H180v-60h485.08L437.23-737.85 480-780l300 300-300 300-42.77-42.15L665.08-450Z'/%3e%3c/svg%3e",
|
|
579
592
|
home: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M240-200h133.85v-237.69h212.3V-200H720v-360L480-740.77 240-560v360Zm-60 60v-450l300-225.77L780-590v450H526.15v-237.69h-92.3V-140H180Zm300-330.38Z'/%3e%3c/svg%3e",
|
|
593
|
+
building: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M130-136.92v-540h160v-160h380v320h160v380H530v-160H430v160H130Zm60-60h100v-100H190v100Zm0-160h100v-100H190v100Zm0-160h100v-100H190v100Zm160 160h100v-100H350v100Zm0-160h100v-100H350v100Zm0-160h100v-100H350v100Zm160 320h100v-100H510v100Zm0-160h100v-100H510v100Zm0-160h100v-100H510v100Zm160 480h100v-100H670v100Zm0-160h100v-100H670v100Z'/%3e%3c/svg%3e",
|
|
580
594
|
externalLink: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M212.31-140Q182-140 161-161q-21-21-21-51.31v-535.38Q140-778 161-799q21-21 51.31-21h252.3v60h-252.3q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v535.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h535.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-252.3h60v252.3Q820-182 799-161q-21 21-51.31 21H212.31Zm176.46-206.62-42.15-42.15L717.85-760H560v-60h260v260h-60v-157.85L388.77-346.62Z'/%3e%3c/svg%3e",
|
|
581
595
|
link: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M432.31-298.46H281.54q-75.34 0-128.44-53.1Q100-404.65 100-479.98q0-75.33 53.1-128.44 53.1-53.12 128.44-53.12h150.77v60H281.54q-50.39 0-85.96 35.58Q160-530.38 160-480q0 50.38 35.58 85.96 35.57 35.58 85.96 35.58h150.77v60ZM330-450v-60h300v60H330Zm197.69 151.54v-60h150.77q50.39 0 85.96-35.58Q800-429.62 800-480q0-50.38-35.58-85.96-35.57-35.58-85.96-35.58H527.69v-60h150.77q75.34 0 128.44 53.1Q860-555.35 860-480.02q0 75.33-53.1 128.44-53.1 53.12-128.44 53.12H527.69Z'/%3e%3c/svg%3e",
|
|
582
596
|
expand: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M140-140v-300h60v198.23L718.23-760H520v-60h300v300h-60v-198.23L241.77-200H440v60H140Z'/%3e%3c/svg%3e",
|
|
@@ -596,6 +610,7 @@ var BaseIcons = {
|
|
|
596
610
|
share: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M672.22-100q-44.91 0-76.26-31.41-31.34-31.41-31.34-76.28 0-6 4.15-29.16L284.31-404.31q-14.46 15-34.36 23.5t-42.64 8.5q-44.71 0-76.01-31.54Q100-435.39 100-480q0-44.61 31.3-76.15 31.3-31.54 76.01-31.54 22.74 0 42.64 8.5 19.9 8.5 34.36 23.5l284.46-167.08q-2.38-7.38-3.27-14.46-.88-7.08-.88-15.08 0-44.87 31.43-76.28Q627.49-860 672.4-860t76.25 31.44Q780-797.13 780-752.22q0 44.91-31.41 76.26-31.41 31.34-76.28 31.34-22.85 0-42.5-8.69Q610.15-662 595.69-677L311.23-509.54q2.38 7.39 3.27 14.46.88 7.08.88 15.08t-.88 15.08q-.89 7.07-3.27 14.46L595.69-283q14.46-15 34.12-23.69 19.65-8.69 42.5-8.69 44.87 0 76.28 31.43Q780-252.51 780-207.6t-31.44 76.25Q717.13-100 672.22-100Zm.09-60q20.27 0 33.98-13.71Q720-187.42 720-207.69q0-20.27-13.71-33.98-13.71-13.72-33.98-13.72-20.27 0-33.98 13.72-13.72 13.71-13.72 33.98 0 20.27 13.72 33.98Q652.04-160 672.31-160Zm-465-272.31q20.43 0 34.25-13.8 13.83-13.81 13.83-33.89t-13.83-33.89q-13.82-13.8-34.25-13.8-20.11 0-33.71 13.8Q160-500.08 160-480t13.6 33.89q13.6 13.8 33.71 13.8Zm498.88-286.02Q720-732.04 720-752.31q0-20.27-13.71-33.98Q692.58-800 672.31-800q-20.27 0-33.98 13.71-13.72 13.71-13.72 33.98 0 20.27 13.81 33.98 13.81 13.72 33.89 13.72 20.07 0 33.88-13.72Zm-33.88 510.64ZM207.69-480Zm464.62-272.31Z'/%3e%3c/svg%3e",
|
|
597
611
|
send: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M140-190v-580l688.46 290L140-190Zm60-90 474-200-474-200v147.69L416.92-480 200-427.69V-280Zm0 0v-400 400Z'/%3e%3c/svg%3e",
|
|
598
612
|
filter: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M411.15-260v-60h137.31v60H411.15ZM256.16-450v-60h447.3v60h-447.3ZM140-640v-60h680v60H140Z'/%3e%3c/svg%3e",
|
|
613
|
+
funnel: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M455.39-180q-15.08 0-25.23-10.16Q420-200.31 420-215.39v-231.53L196.08-731.38q-11.54-15.39-3.35-32 8.2-16.62 27.66-16.62h519.22q19.46 0 27.66 16.62 8.19 16.61-3.35 32L540-446.92v231.53q0 15.08-10.16 25.23Q519.69-180 504.61-180h-49.22ZM480-468l198-252H282l198 252Zm0 0Z'/%3e%3c/svg%3e",
|
|
599
614
|
refresh: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M481.54-180q-125.63 0-212.81-87.17-87.19-87.17-87.19-212.77 0-125.6 87.19-212.83Q355.91-780 481.54-780q70.15 0 132.77 31.19 62.61 31.2 104.15 88.04V-780h60v244.61H533.85v-59.99h158q-31.62-57.93-87.7-91.27Q548.08-720 481.54-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h63.23q-27.23 97.92-107.27 158.96Q583.46-180 481.54-180Z'/%3e%3c/svg%3e",
|
|
600
615
|
dragHandle: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M360-175.39q-26.65 0-45.63-18.98-18.98-18.98-18.98-45.63 0-26.65 18.98-45.63 18.98-18.98 45.63-18.98 26.65 0 45.63 18.98 18.98 18.98 18.98 45.63 0 26.65-18.98 45.63-18.98 18.98-45.63 18.98Zm240 0q-26.65 0-45.63-18.98-18.98-18.98-18.98-45.63 0-26.65 18.98-45.63 18.98-18.98 45.63-18.98 26.65 0 45.63 18.98 18.98 18.98 18.98 45.63 0 26.65-18.98 45.63-18.98 18.98-45.63 18.98Zm-240-240q-26.65 0-45.63-18.98-18.98-18.98-18.98-45.63 0-26.65 18.98-45.63 18.98-18.98 45.63-18.98 26.65 0 45.63 18.98 18.98 18.98 18.98 45.63 0 26.65-18.98 45.63-18.98 18.98-45.63 18.98Zm240 0q-26.65 0-45.63-18.98-18.98-18.98-18.98-45.63 0-26.65 18.98-45.63 18.98-18.98 45.63-18.98 26.65 0 45.63 18.98 18.98 18.98 18.98 45.63 0 26.65-18.98 45.63-18.98 18.98-45.63 18.98Zm-240-240q-26.65 0-45.63-18.98-18.98-18.98-18.98-45.63 0-26.65 18.98-45.63 18.98-18.98 45.63-18.98 26.65 0 45.63 18.98 18.98 18.98 18.98 45.63 0 26.65-18.98 45.63-18.98 18.98-45.63 18.98Zm240 0q-26.65 0-45.63-18.98-18.98-18.98-18.98-45.63 0-26.65 18.98-45.63 18.98-18.98 45.63-18.98 26.65 0 45.63 18.98 18.98 18.98 18.98 45.63 0 26.65-18.98 45.63-18.98 18.98-45.63 18.98Z'/%3e%3c/svg%3e",
|
|
601
616
|
qrCode: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M140-520v-300h300v300H140Zm60-60h180v-180H200v180Zm-60 440v-300h300v300H140Zm60-60h180v-180H200v180Zm320-320v-300h300v300H520Zm60-60h180v-180H580v180Zm165 440v-75h75v75h-75ZM520-365v-75h75v75h-75Zm75 75v-75h75v75h-75Zm-75 75v-75h75v75h-75Zm75 75v-75h75v75h-75Zm75-75v-75h75v75h-75Zm0-150v-75h75v75h-75Zm75 75v-75h75v75h-75Z'/%3e%3c/svg%3e",
|
|
@@ -970,6 +985,38 @@ var buildComponents = (c) => ({
|
|
|
970
985
|
color: "primary-surface",
|
|
971
986
|
shadow: "menu"
|
|
972
987
|
} },
|
|
988
|
+
menu: { options: {
|
|
989
|
+
minWidth: 184,
|
|
990
|
+
color: void 0,
|
|
991
|
+
border: void 0,
|
|
992
|
+
borderRadius: void 0,
|
|
993
|
+
shadow: void 0,
|
|
994
|
+
paddingVertical: "xs",
|
|
995
|
+
paddingHorizontal: "none",
|
|
996
|
+
dividerBorder: "light",
|
|
997
|
+
dividerSpacing: "xs"
|
|
998
|
+
} },
|
|
999
|
+
menuItem: {
|
|
1000
|
+
options: {
|
|
1001
|
+
height: 38,
|
|
1002
|
+
paddingHorizontal: "md",
|
|
1003
|
+
gap: "md",
|
|
1004
|
+
borderRadius: "none",
|
|
1005
|
+
typeface: "label",
|
|
1006
|
+
textColor: void 0,
|
|
1007
|
+
hoverColor: "primary-container",
|
|
1008
|
+
activeSymbol: "check",
|
|
1009
|
+
transitionSpeed: .35
|
|
1010
|
+
},
|
|
1011
|
+
variants: { warn: {
|
|
1012
|
+
color: c.warn,
|
|
1013
|
+
"&:hover, &:focus": {
|
|
1014
|
+
backgroundColor: c["warn-container"],
|
|
1015
|
+
color: c["on-warn-container"]
|
|
1016
|
+
}
|
|
1017
|
+
} }
|
|
1018
|
+
},
|
|
1019
|
+
expand: { options: { transitionSpeed: .35 } },
|
|
973
1020
|
footer: { options: {
|
|
974
1021
|
height: 52,
|
|
975
1022
|
color: "primary",
|
|
@@ -1576,7 +1623,7 @@ var emitThemeFile = (input) => {
|
|
|
1576
1623
|
"const components = (colors: Colors): ComponentThemes => ({});",
|
|
1577
1624
|
"",
|
|
1578
1625
|
"/**",
|
|
1579
|
-
" * Icon primitives, merged over the built-in
|
|
1626
|
+
" * Icon primitives, merged over the built-in 61-icon set per name: reuse a",
|
|
1580
1627
|
" * built-in name to reskin it, or add any new name. Define an icon ONCE here",
|
|
1581
1628
|
" * and render it anywhere via `<uni-icon name='…'/>` — never inline SVG in",
|
|
1582
1629
|
" * components.",
|
|
@@ -1707,7 +1754,7 @@ var UniThemes = {
|
|
|
1707
1754
|
Object.keys(UniThemes)[0];
|
|
1708
1755
|
//#endregion
|
|
1709
1756
|
//#region package.json
|
|
1710
|
-
var version = "7.
|
|
1757
|
+
var version = "7.3.0";
|
|
1711
1758
|
//#endregion
|
|
1712
1759
|
//#region schematics-src/ng-add/transforms.ts
|
|
1713
1760
|
var addDependencies = (packageJsonText, deps) => {
|
|
@@ -3,6 +3,7 @@ import { Signal, WritableSignal, InjectionToken, ElementRef, TemplateRef, OnInit
|
|
|
3
3
|
import * as _uni_design_system_uni_core from '@uni-design-system/uni-core';
|
|
4
4
|
import { IconName, Variant, ContainerColorToken, PaletteConfig, GenerateColorsConfig, Radii, UniTheme, ComponentName, ComponentTheme, NullableSize, ThemeName, TextRole, ContentColorToken, Size, Thickness, NullableStyleExpression, ColorKey, ColorToken, Typeface, Radius, OptionalSize, Border, Shadow, ZIndexableElements, Elevation, RadiiSize, TextColor, JustifyContent, StyleExpression, Orientation, CssLength, OptionalAlignSelf, OptionalAlignItems, OptionalAlignContent, OptionalJustifyContent, OptionalDisplay, OptionalPosition, OptionalOverflow, OptionalFlexDirection, OptionalTextAlign, OptionalWrap, ColorScheme, ColorCategory, ThemeShape, ContrastCheck, Colors, GenerationInput } from '@uni-design-system/uni-core';
|
|
5
5
|
import { FormCheckboxControl, FormValueControl } from '@angular/forms/signals';
|
|
6
|
+
import * as _uni_design_system_uni_angular from '@uni-design-system/uni-angular';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Returns a document-unique id for wiring ARIA relationships
|
|
@@ -977,6 +978,10 @@ declare class UniDropdownComponent extends BaseComponent<UniDropdownOptions> imp
|
|
|
977
978
|
readonly popoverId: string;
|
|
978
979
|
paddingVertical: _angular_core.InputSignal<NullableSize>;
|
|
979
980
|
paddingHorizontal: _angular_core.InputSignal<NullableSize>;
|
|
981
|
+
border: _angular_core.InputSignal<string>;
|
|
982
|
+
borderRadius: _angular_core.InputSignal<string>;
|
|
983
|
+
shadow: _angular_core.InputSignal<string>;
|
|
984
|
+
color: _angular_core.InputSignal<ContainerColorToken>;
|
|
980
985
|
dropdownShowing: _angular_core.OutputEmitterRef<boolean>;
|
|
981
986
|
dropdownHiding: _angular_core.OutputEmitterRef<boolean>;
|
|
982
987
|
dropdownRef: ElementRef<HTMLDivElement>;
|
|
@@ -997,11 +1002,32 @@ declare class UniDropdownComponent extends BaseComponent<UniDropdownOptions> imp
|
|
|
997
1002
|
hideDropdown(): void;
|
|
998
1003
|
ngOnDestroy(): void;
|
|
999
1004
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniDropdownComponent, never>;
|
|
1000
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniDropdownComponent, "uni-dropdown", never, { "trigger": { "alias": "trigger"; "required": true; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; "paddingVertical": { "alias": "paddingVertical"; "required": false; "isSignal": true; }; "paddingHorizontal": { "alias": "paddingHorizontal"; "required": false; "isSignal": true; }; }, { "dropdownShowing": "dropdownShowing"; "dropdownHiding": "dropdownHiding"; }, never, ["*"], true, never>;
|
|
1005
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniDropdownComponent, "uni-dropdown", never, { "trigger": { "alias": "trigger"; "required": true; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; "paddingVertical": { "alias": "paddingVertical"; "required": false; "isSignal": true; }; "paddingHorizontal": { "alias": "paddingHorizontal"; "required": false; "isSignal": true; }; "border": { "alias": "border"; "required": false; "isSignal": true; }; "borderRadius": { "alias": "borderRadius"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, { "dropdownShowing": "dropdownShowing"; "dropdownHiding": "dropdownHiding"; }, never, ["*"], true, never>;
|
|
1001
1006
|
}
|
|
1002
1007
|
|
|
1003
|
-
|
|
1008
|
+
/** Theme-level options for `uni-expand`. */
|
|
1009
|
+
interface UniExpandOptions {
|
|
1010
|
+
/**
|
|
1011
|
+
* Base reveal/collapse duration in seconds (matching alert/card
|
|
1012
|
+
* `transitionSpeed`), lives in the `expand` theme options. The default
|
|
1013
|
+
* theme uses `0.35`. This is the duration at a 240px-tall region; the
|
|
1014
|
+
* actual duration scales with content height (√-of-height, clamped —
|
|
1015
|
+
* `expandDuration` in uni-core) so short regions stay snappy and tall
|
|
1016
|
+
* ones aren't rushed. Also drives `uni-expand-toggle`'s chevron rotation
|
|
1017
|
+
* so trigger and region move on the same clock.
|
|
1018
|
+
*/
|
|
1019
|
+
transitionSpeed?: number;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
declare class UniExpandComponent extends BaseComponent<UniExpandOptions> {
|
|
1004
1023
|
collapsed: _angular_core.ModelSignal<boolean>;
|
|
1024
|
+
/**
|
|
1025
|
+
* Exact per-instance duration in seconds. Bypasses size-aware scaling —
|
|
1026
|
+
* an explicit number means the consumer wants that number. Omitted, the
|
|
1027
|
+
* duration derives from the `expand` theme options' `transitionSpeed`
|
|
1028
|
+
* scaled by content height (see `duration`).
|
|
1029
|
+
*/
|
|
1030
|
+
transitionSpeed: _angular_core.InputSignal<number>;
|
|
1005
1031
|
/** Referenced by the controlling toggle's aria-controls. */
|
|
1006
1032
|
readonly regionId: string;
|
|
1007
1033
|
/**
|
|
@@ -1010,26 +1036,103 @@ declare class UniExpandComponent {
|
|
|
1010
1036
|
* animations only after the first render, i.e. on real state changes.
|
|
1011
1037
|
*/
|
|
1012
1038
|
protected readonly ready: _angular_core.WritableSignal<boolean>;
|
|
1039
|
+
private readonly contentRef;
|
|
1040
|
+
/**
|
|
1041
|
+
* Last observed content height. Retained after collapse (the observer
|
|
1042
|
+
* disconnects but the signal keeps its value) so the leave animation and
|
|
1043
|
+
* the next reveal are timed to the real size. Until the first measurement
|
|
1044
|
+
* lands — one frame into the very first reveal — the duration falls back
|
|
1045
|
+
* to the unscaled token; CSS remaps animation progress when
|
|
1046
|
+
* `animation-duration` updates, so the retime is imperceptible that early.
|
|
1047
|
+
*/
|
|
1048
|
+
private readonly contentHeight;
|
|
1013
1049
|
constructor();
|
|
1014
1050
|
toggle(): void;
|
|
1051
|
+
/**
|
|
1052
|
+
* The resolved duration in seconds: the `transitionSpeed` input verbatim,
|
|
1053
|
+
* or the `expand` theme options' `transitionSpeed` scaled by content height
|
|
1054
|
+
* (`expandDuration` — √-of-height, clamped) so short regions stay snappy
|
|
1055
|
+
* and tall ones aren't rushed. The public sync hook: Expand Area binds this
|
|
1056
|
+
* to its toggle so the chevron rotates on the region's clock, and consumers
|
|
1057
|
+
* can bind adjacent styling the same way
|
|
1058
|
+
* (`[style.transition-duration]="expand.duration() + 's'"`).
|
|
1059
|
+
*/
|
|
1060
|
+
readonly duration: _angular_core.Signal<number>;
|
|
1061
|
+
protected readonly cssDuration: _angular_core.Signal<string>;
|
|
1062
|
+
/**
|
|
1063
|
+
* A custom element is `display: inline` by default, which would lay the
|
|
1064
|
+
* animated grid out as a block-in-inline box and distort the revealed
|
|
1065
|
+
* content's spacing. Every consumer would otherwise have to write
|
|
1066
|
+
* `uni-expand { display: block }` themselves.
|
|
1067
|
+
*/
|
|
1068
|
+
protected readonly hostClassName: string;
|
|
1015
1069
|
expandClassName: string;
|
|
1016
1070
|
contentClassName: string;
|
|
1017
1071
|
private expand;
|
|
1018
1072
|
private collapse;
|
|
1073
|
+
/**
|
|
1074
|
+
* Reveal is motion-safe (WCAG 2.3.3): under `prefers-reduced-motion` these
|
|
1075
|
+
* classes are empty, so the region appears and disappears instantly.
|
|
1076
|
+
* `overflow: hidden` rides inside the guard deliberately — it exists to clip
|
|
1077
|
+
* the growing box mid-animation, and leaving it applied at rest would crop
|
|
1078
|
+
* decorations that legitimately paint outside the region (focus rings,
|
|
1079
|
+
* offset outlines). Angular removes a leaving node on the next frame when it
|
|
1080
|
+
* detects no animation, so nothing hangs when the guard strips them.
|
|
1081
|
+
*
|
|
1082
|
+
* The classes carry the default duration; the animated div's
|
|
1083
|
+
* `[style.animation-duration]` binding overrides it with the resolved
|
|
1084
|
+
* `duration`, so the classes stay static while timing tracks the theme and
|
|
1085
|
+
* the content's size through signals alone.
|
|
1086
|
+
*/
|
|
1019
1087
|
expandAnimation: string;
|
|
1020
1088
|
collapseAnimation: string;
|
|
1021
1089
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniExpandComponent, never>;
|
|
1022
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniExpandComponent, "uni-expand", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, ["*"], true, never>;
|
|
1090
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniExpandComponent, "uni-expand", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "transitionSpeed": { "alias": "transitionSpeed"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, ["*"], true, never>;
|
|
1023
1091
|
}
|
|
1024
1092
|
|
|
1093
|
+
/**
|
|
1094
|
+
* Trigger for a {@link UniExpandComponent} region.
|
|
1095
|
+
*
|
|
1096
|
+
* Two shapes, chosen by whether `label` is set:
|
|
1097
|
+
* - **Icon only** (default) — the bare chevron, sized for a Card Header.
|
|
1098
|
+
* - **Labelled** — chevron plus a label and optional muted sublabel, as a
|
|
1099
|
+
* single full-width button. Most real disclosures need a name for the
|
|
1100
|
+
* section, and building that row by hand is the thing this saves; it also
|
|
1101
|
+
* makes the label the button's accessible name rather than adjacent text.
|
|
1102
|
+
*/
|
|
1025
1103
|
declare class UniExpandToggleComponent {
|
|
1026
1104
|
collapsed: _angular_core.ModelSignal<boolean>;
|
|
1027
1105
|
/** Id of the Expand region this toggle controls (see UniExpandComponent.regionId). */
|
|
1028
1106
|
ariaControls: _angular_core.InputSignal<string>;
|
|
1107
|
+
/** Names the region. Setting it switches the toggle to its labelled shape. */
|
|
1108
|
+
label: _angular_core.InputSignal<string>;
|
|
1109
|
+
/** Muted qualifier beside the label ("for POs & custom orders"). Needs `label`. */
|
|
1110
|
+
sublabel: _angular_core.InputSignal<string>;
|
|
1111
|
+
/**
|
|
1112
|
+
* Rotation duration in seconds. Expand Area binds the region's resolved
|
|
1113
|
+
* `duration` here so chevron and reveal share one clock even when the
|
|
1114
|
+
* region is size-scaled or overridden per instance.
|
|
1115
|
+
*/
|
|
1116
|
+
transitionSpeed: _angular_core.InputSignal<number>;
|
|
1117
|
+
/** Fallback clock when no `transitionSpeed` is bound: the `expand` theme options' `transitionSpeed`. */
|
|
1118
|
+
private readonly expandOptions;
|
|
1119
|
+
private readonly speed;
|
|
1120
|
+
/**
|
|
1121
|
+
* The glyph rotates, never the host.
|
|
1122
|
+
*
|
|
1123
|
+
* The host is taller than the glyph (an inline-level box reserves baseline
|
|
1124
|
+
* descender space), so spinning it about its own centre walks the glyph
|
|
1125
|
+
* off-centre. `uni-icon` is a centred square sized to the glyph, which makes
|
|
1126
|
+
* it the only box here that rotates symmetrically. It also keeps a label
|
|
1127
|
+
* from turning upside down with the chevron.
|
|
1128
|
+
*/
|
|
1129
|
+
private readonly glyphStyles;
|
|
1029
1130
|
protected readonly className: _angular_core.Signal<string>;
|
|
1131
|
+
protected readonly triggerClassName: string;
|
|
1132
|
+
protected readonly labelClassName: string;
|
|
1030
1133
|
toggle(): void;
|
|
1031
1134
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniExpandToggleComponent, never>;
|
|
1032
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniExpandToggleComponent, "uni-expand-toggle", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, never, true, never>;
|
|
1135
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniExpandToggleComponent, "uni-expand-toggle", never, { "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "sublabel": { "alias": "sublabel"; "required": false; "isSignal": true; }; "transitionSpeed": { "alias": "transitionSpeed"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; }, never, never, true, never>;
|
|
1033
1136
|
}
|
|
1034
1137
|
|
|
1035
1138
|
declare class UniExpandAreaComponent {
|
|
@@ -1156,6 +1259,15 @@ declare class UniIconButtonComponent {
|
|
|
1156
1259
|
loading: _angular_core.InputSignal<boolean>;
|
|
1157
1260
|
opticalSize: _angular_core.InputSignal<number>;
|
|
1158
1261
|
protected readonly srOnlyClass: string;
|
|
1262
|
+
/**
|
|
1263
|
+
* Sizes `iconName` from the size token's `fontSize`, the same value that sizes
|
|
1264
|
+
* a `symbolName` ligature — so the two paths render the same glyph size and
|
|
1265
|
+
* `symbolName` → `iconName` is a like-for-like swap. Without it a masked icon
|
|
1266
|
+
* fills the whole button box, since the base size tokens carry no padding.
|
|
1267
|
+
* Themes that do use padding (Carbon) set a matching `fontSize`, so they land
|
|
1268
|
+
* on the same glyph either way.
|
|
1269
|
+
*/
|
|
1270
|
+
protected readonly glyphSize: _angular_core.Signal<string | number>;
|
|
1159
1271
|
protected readonly className: _angular_core.Signal<string>;
|
|
1160
1272
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UniIconButtonComponent, never>;
|
|
1161
1273
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UniIconButtonComponent, "button[uni-icon-button], button[icon-button]", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "iconName": { "alias": "iconName"; "required": false; "isSignal": true; }; "symbolName": { "alias": "symbolName"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disable": { "alias": "disable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "opticalSize": { "alias": "opticalSize"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof RippleDirective; inputs: {}; outputs: {}; }]>;
|
|
@@ -1365,25 +1477,76 @@ declare class UniWrapComponent extends UniBoxComponent {
|
|
|
1365
1477
|
interface BaseMenuItem {
|
|
1366
1478
|
symbolName?: string;
|
|
1367
1479
|
action?: () => void;
|
|
1480
|
+
/** Tone routed through the theme's `menuItem.variants` (e.g. 'warn' for destructive actions). */
|
|
1481
|
+
variant?: Variant;
|
|
1482
|
+
disabled?: boolean;
|
|
1368
1483
|
}
|
|
1369
1484
|
interface MenuItemWithLabel extends BaseMenuItem {
|
|
1370
1485
|
label: string;
|
|
1371
1486
|
template?: never;
|
|
1372
1487
|
context?: never;
|
|
1488
|
+
divider?: never;
|
|
1373
1489
|
}
|
|
1374
1490
|
interface MenuItemWithTemplate<T = any> extends BaseMenuItem {
|
|
1375
1491
|
label?: never;
|
|
1376
1492
|
template: TemplateRef<T>;
|
|
1377
1493
|
context: T;
|
|
1494
|
+
divider?: never;
|
|
1495
|
+
}
|
|
1496
|
+
/** A non-interactive separator between item groups; styled by the theme's `menu` options. */
|
|
1497
|
+
interface MenuDivider {
|
|
1498
|
+
divider: true;
|
|
1499
|
+
}
|
|
1500
|
+
type MenuItem<T = any> = MenuDivider | MenuItemWithLabel | MenuItemWithTemplate<T>;
|
|
1501
|
+
declare const isDivider: (item: MenuItem) => item is MenuDivider;
|
|
1502
|
+
/** Theme options for the `menuItem` component entry. */
|
|
1503
|
+
interface UniMenuItemOptions {
|
|
1504
|
+
height?: number;
|
|
1505
|
+
paddingHorizontal?: NullableSize;
|
|
1506
|
+
gap?: NullableSize;
|
|
1507
|
+
borderRadius?: Radius;
|
|
1508
|
+
typeface?: Typeface;
|
|
1509
|
+
/** Resting text color; undefined inherits the panel's on-color. */
|
|
1510
|
+
textColor?: ColorKey;
|
|
1511
|
+
hoverColor?: ContainerColorToken;
|
|
1512
|
+
/** Trailing symbol marking the active item; undefined/'' renders none. */
|
|
1513
|
+
activeSymbol?: string;
|
|
1514
|
+
/** Hover/focus transition in seconds; 0 switches instantly. */
|
|
1515
|
+
transitionSpeed?: number;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* Theme options for the `menu` component entry. The panel-chrome fields
|
|
1520
|
+
* (color/border/borderRadius/shadow) fall back to the theme's `dropdown`
|
|
1521
|
+
* options when undefined, so menus follow generic popovers until a theme
|
|
1522
|
+
* deliberately splits them.
|
|
1523
|
+
*/
|
|
1524
|
+
interface UniMenuOptions {
|
|
1525
|
+
/** Panel minimum width in px; undefined sizes to the widest item. */
|
|
1526
|
+
minWidth?: number;
|
|
1527
|
+
color?: ContainerColorToken;
|
|
1528
|
+
border?: Border;
|
|
1529
|
+
borderRadius?: Radius;
|
|
1530
|
+
shadow?: Shadow;
|
|
1531
|
+
paddingVertical?: NullableSize;
|
|
1532
|
+
paddingHorizontal?: NullableSize;
|
|
1533
|
+
dividerBorder?: Border;
|
|
1534
|
+
/** Vertical margin and horizontal inset applied to dividers. */
|
|
1535
|
+
dividerSpacing?: NullableSize;
|
|
1378
1536
|
}
|
|
1379
|
-
type MenuItem<T = any> = MenuItemWithLabel | MenuItemWithTemplate<T>;
|
|
1380
1537
|
|
|
1381
1538
|
declare class UniMenuComponent {
|
|
1539
|
+
private theme;
|
|
1382
1540
|
menuItems: _angular_core.InputSignal<MenuItem[]>;
|
|
1383
1541
|
activeItem: _angular_core.InputSignal<MenuItem>;
|
|
1384
1542
|
placement: _angular_core.InputSignal<Placement>;
|
|
1385
1543
|
menuItemClicked: _angular_core.OutputEmitterRef<MenuItem>;
|
|
1386
1544
|
TriggerClassName: string;
|
|
1545
|
+
/** Type guard for the template: dividers render as separators, not items. */
|
|
1546
|
+
protected readonly isDivider: (item: MenuItem) => item is _uni_design_system_uni_angular.MenuDivider;
|
|
1547
|
+
protected readonly menuOptions: _angular_core.Signal<UniMenuOptions>;
|
|
1548
|
+
protected readonly menuClassName: _angular_core.Signal<string>;
|
|
1549
|
+
protected readonly dividerClassName: _angular_core.Signal<string>;
|
|
1387
1550
|
private itemComponents;
|
|
1388
1551
|
private dropdownComponent;
|
|
1389
1552
|
/** Which item receives focus when the menu opens (ArrowUp opens onto the last item). */
|
|
@@ -2321,6 +2484,13 @@ declare class UniTooltipComponent extends BaseComponent<UniTooltipOptions> {
|
|
|
2321
2484
|
isMouseInside: _angular_core.WritableSignal<boolean>;
|
|
2322
2485
|
/** Whether the bubble is currently shown (or fading out). */
|
|
2323
2486
|
private readonly visible;
|
|
2487
|
+
/**
|
|
2488
|
+
* Set when the wrapped control is activated: clicking a button is not a
|
|
2489
|
+
* request to toggle the bubble, and re-showing it right away makes a
|
|
2490
|
+
* state-flipping label ("Expand" → "Collapse") blink back mid-interaction.
|
|
2491
|
+
* Re-arms when the pointer leaves or focus moves away.
|
|
2492
|
+
*/
|
|
2493
|
+
private readonly suppressed;
|
|
2324
2494
|
readonly tooltipId: string;
|
|
2325
2495
|
private readonly anchorName;
|
|
2326
2496
|
hoverDelay: _angular_core.InputSignal<number>;
|
|
@@ -2334,6 +2504,13 @@ declare class UniTooltipComponent extends BaseComponent<UniTooltipOptions> {
|
|
|
2334
2504
|
onFocusIn(event: FocusEvent): void;
|
|
2335
2505
|
onFocusOut(): void;
|
|
2336
2506
|
onEscape(event: Event): void;
|
|
2507
|
+
/**
|
|
2508
|
+
* A click on an interactive element inside the host is an activation of
|
|
2509
|
+
* that control — hide the bubble and stay suppressed until re-arm. A click
|
|
2510
|
+
* anywhere else (inline-text tooltips, tap on a non-interactive host)
|
|
2511
|
+
* keeps the tap-to-toggle behavior.
|
|
2512
|
+
*/
|
|
2513
|
+
protected onClick(event: Event): void;
|
|
2337
2514
|
toggleTooltip(): void;
|
|
2338
2515
|
mouseenter(): void;
|
|
2339
2516
|
mouseleave(): void;
|
|
@@ -2367,5 +2544,5 @@ declare class DragAndDropDirective {
|
|
|
2367
2544
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DragAndDropDirective, "[uni-drag-n-drop], [dragAndDrop]", never, {}, { "onFileDropped": "onFileDropped"; }, never, never, true, never>;
|
|
2368
2545
|
}
|
|
2369
2546
|
|
|
2370
|
-
export { BodyRenderDirective, ConfirmationDialogComponent, DragAndDropDirective, FOCUSABLE_SELECTOR, LocalStorageService, NotificationService, NotificationsComponent, RippleDirective, ThemeService, UNI_THEMES, UniAlertComponent, UniAppBarComponent, UniAvatarComponent, UniAvatarGroupComponent, UniBackgroundComponent, UniBadgeComponent, UniBaseDatasource, UniBoxComponent, UniBreadcrumbComponent, UniButtonComponent, UniButtonGroupComponent, UniCardComponent, UniCardContentComponent, UniCardHeaderComponent, UniCenterComponent, UniCheckboxComponent, UniDataSearchComponent, UniDataTableComponent, UniDebounceInputComponent, UniDialogButtonsComponent, UniDialogComponent, UniDialogHeaderComponent, UniDividerComponent, UniDrawerComponent, UniDropdownComponent, UniExpandAreaComponent, UniExpandComponent, UniExpandToggleComponent, UniFileDropZoneComponent, UniGridAreaComponent, UniGridComponent, UniIconButtonComponent, UniIconComponent, UniInputBoxComponent, UniInputComponent, UniJsonViewComponent, UniMenuComponent, UniMultiSelectComponent, UniMultiSelectDropdownComponent, UniNotificationBadgeComponent, UniPaginatorComponent, UniPopoverComponent, UniProgressBarComponent, UniProgressGaugeComponent, UniRadioComponent, UniRecordDatasource, UniRowComponent, UniScrollAreaComponent, UniSearchInputComponent, UniSelectComponent, UniServerSideDatasource, UniSkeletonComponent, UniSliderComponent, UniSnackbarComponent, UniSortHeaderComponent, UniStackComponent, UniStatComponent, UniSymbolComponent, UniTabComponent, UniTabsComponent, UniTagComponent, UniTextComponent, UniTextareaComponent, UniThemeBuilderComponent, UniThemeSwitchComponent, UniToggleComponent, UniTooltipComponent, UniWrapComponent, acceptableFile, anchorArrowStyles, anchorStyles, getFileExtension, motionSafe, newAnchorName, resolveFocusTarget, uniqueId, useTimer, visuallyHidden };
|
|
2371
|
-
export type { Alert, AnchorOffset, BrandPaletteConfig, BreadcrumbItem, ButtonGroupConfig, ButtonGroupItem, ColumnDefinition, Confirmation, DataLoader, DrawerMode, DrawerPosition, ImagePosition, MenuItem, MenuItemWithLabel, MenuItemWithTemplate, Option, Options, PageRequest, PageResponse, Placement, ScrollbarAppearance, SkeletonShape, Snackbar, Sort, SortDirection, UniAppBarOptions, UniAvatarGroupOptions, UniAvatarOptions, UniBreadcrumbOptions, UniCheckboxOptions, UniDataSearchOptions, UniDataTableOptions, UniDatasource, UniDrawerOptions, UniInputBoxOptions, UniMultiSelectDropdownOptions, UniNotificationBadgeOptions, UniPaginatorOptions, UniRadioOption, UniRadioOptions, UniSearchInputOptions, UniSkeletonOptions, UniSliderOptions, UniStatOptions, UniTabsOptions, UniTextareaOptions, UniToggleOptions };
|
|
2547
|
+
export { BodyRenderDirective, ConfirmationDialogComponent, DragAndDropDirective, FOCUSABLE_SELECTOR, LocalStorageService, NotificationService, NotificationsComponent, RippleDirective, ThemeService, UNI_THEMES, UniAlertComponent, UniAppBarComponent, UniAvatarComponent, UniAvatarGroupComponent, UniBackgroundComponent, UniBadgeComponent, UniBaseDatasource, UniBoxComponent, UniBreadcrumbComponent, UniButtonComponent, UniButtonGroupComponent, UniCardComponent, UniCardContentComponent, UniCardHeaderComponent, UniCenterComponent, UniCheckboxComponent, UniDataSearchComponent, UniDataTableComponent, UniDebounceInputComponent, UniDialogButtonsComponent, UniDialogComponent, UniDialogHeaderComponent, UniDividerComponent, UniDrawerComponent, UniDropdownComponent, UniExpandAreaComponent, UniExpandComponent, UniExpandToggleComponent, UniFileDropZoneComponent, UniGridAreaComponent, UniGridComponent, UniIconButtonComponent, UniIconComponent, UniInputBoxComponent, UniInputComponent, UniJsonViewComponent, UniMenuComponent, UniMultiSelectComponent, UniMultiSelectDropdownComponent, UniNotificationBadgeComponent, UniPaginatorComponent, UniPopoverComponent, UniProgressBarComponent, UniProgressGaugeComponent, UniRadioComponent, UniRecordDatasource, UniRowComponent, UniScrollAreaComponent, UniSearchInputComponent, UniSelectComponent, UniServerSideDatasource, UniSkeletonComponent, UniSliderComponent, UniSnackbarComponent, UniSortHeaderComponent, UniStackComponent, UniStatComponent, UniSymbolComponent, UniTabComponent, UniTabsComponent, UniTagComponent, UniTextComponent, UniTextareaComponent, UniThemeBuilderComponent, UniThemeSwitchComponent, UniToggleComponent, UniTooltipComponent, UniWrapComponent, acceptableFile, anchorArrowStyles, anchorStyles, getFileExtension, isDivider, motionSafe, newAnchorName, resolveFocusTarget, uniqueId, useTimer, visuallyHidden };
|
|
2548
|
+
export type { Alert, AnchorOffset, BrandPaletteConfig, BreadcrumbItem, ButtonGroupConfig, ButtonGroupItem, ColumnDefinition, Confirmation, DataLoader, DrawerMode, DrawerPosition, ImagePosition, MenuDivider, MenuItem, MenuItemWithLabel, MenuItemWithTemplate, Option, Options, PageRequest, PageResponse, Placement, ScrollbarAppearance, SkeletonShape, Snackbar, Sort, SortDirection, UniAppBarOptions, UniAvatarGroupOptions, UniAvatarOptions, UniBreadcrumbOptions, UniCheckboxOptions, UniDataSearchOptions, UniDataTableOptions, UniDatasource, UniDrawerOptions, UniExpandOptions, UniInputBoxOptions, UniMenuItemOptions, UniMenuOptions, UniMultiSelectDropdownOptions, UniNotificationBadgeOptions, UniPaginatorOptions, UniRadioOption, UniRadioOptions, UniSearchInputOptions, UniSkeletonOptions, UniSliderOptions, UniStatOptions, UniTabsOptions, UniTextareaOptions, UniToggleOptions };
|