@joanroucoux/cairn-ui 0.10.0 → 0.11.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/CHANGELOG.md +37 -0
- package/README.md +2 -0
- package/fesm2022/joanroucoux-cairn-ui-action-bar.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-alert.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-amount.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-async.mjs +85 -81
- package/fesm2022/joanroucoux-cairn-ui-async.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-avatar.mjs +6 -6
- package/fesm2022/joanroucoux-cairn-ui-back-link.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-badge.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-button.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-card.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-choice-chips.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-delta.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-dialog.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-dialog.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-donut.mjs +7 -7
- package/fesm2022/joanroucoux-cairn-ui-donut.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-drawer.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-drawer.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-empty.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-empty.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-external-link.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-external-link.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-fact.mjs +6 -6
- package/fesm2022/joanroucoux-cairn-ui-fact.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-field.mjs +9 -9
- package/fesm2022/joanroucoux-cairn-ui-filter-chips.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-group-header.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-group-header.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-icon-toggle.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-input.mjs +6 -6
- package/fesm2022/joanroucoux-cairn-ui-input.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-line-chart.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-menu.mjs +17 -10
- package/fesm2022/joanroucoux-cairn-ui-menu.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-meter.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-motion.mjs +12 -12
- package/fesm2022/joanroucoux-cairn-ui-nav-item.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-result-group.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-result-group.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-row.mjs +15 -15
- package/fesm2022/joanroucoux-cairn-ui-row.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-segmented.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-select-pill.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-select.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-skeleton.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-stale-link.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-stat.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-switch.mjs +3 -3
- package/fesm2022/joanroucoux-cairn-ui-tab-bar.mjs +6 -6
- package/fesm2022/joanroucoux-cairn-ui-table.mjs +27 -27
- package/fesm2022/joanroucoux-cairn-ui-table.mjs.map +1 -1
- package/fesm2022/joanroucoux-cairn-ui-toast.mjs +7 -7
- package/fesm2022/joanroucoux-cairn-ui-toast.mjs.map +1 -1
- package/mcp-manifest.json +1 -0
- package/package.json +5 -2
- package/styles/theme.css +4 -0
- package/styles/tokens.css +0 -4
- package/types/joanroucoux-cairn-ui-async.d.ts +7 -5
- package/types/joanroucoux-cairn-ui-choice-chips.d.ts +2 -2
- package/types/joanroucoux-cairn-ui-dialog.d.ts +3 -0
- package/types/joanroucoux-cairn-ui-donut.d.ts +1 -1
- package/types/joanroucoux-cairn-ui-drawer.d.ts +1 -1
- package/types/joanroucoux-cairn-ui-empty.d.ts +3 -3
- package/types/joanroucoux-cairn-ui-external-link.d.ts +1 -1
- package/types/joanroucoux-cairn-ui-fact.d.ts +1 -1
- package/types/joanroucoux-cairn-ui-group-header.d.ts +1 -1
- package/types/joanroucoux-cairn-ui-input.d.ts +4 -1
- package/types/joanroucoux-cairn-ui-menu.d.ts +3 -3
- package/types/joanroucoux-cairn-ui-result-group.d.ts +3 -3
- package/types/joanroucoux-cairn-ui-row.d.ts +1 -1
- package/types/joanroucoux-cairn-ui-stale-link.d.ts +2 -2
- package/types/joanroucoux-cairn-ui-table.d.ts +16 -6
- package/types/joanroucoux-cairn-ui-toast.d.ts +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"joanroucoux-cairn-ui-fact.mjs","names":[],"sources":["../../../projects/ui/fact/fact.ts"],"sourcesContent":["import { Component, Directive, booleanAttribute, computed, input } from '@angular/core';\n\n/** Available fact row sizes. */\nexport const FACT_SIZES = ['md', 'sm', 'auto', 'recap'] as const;\nexport type FactSize = (typeof FACT_SIZES)[number];\n\n/**
|
|
1
|
+
{"version":3,"file":"joanroucoux-cairn-ui-fact.mjs","names":[],"sources":["../../../projects/ui/fact/fact.ts"],"sourcesContent":["import { Component, Directive, booleanAttribute, computed, input } from '@angular/core';\n\n/** Available fact row sizes. */\nexport const FACT_SIZES = ['md', 'sm', 'auto', 'recap'] as const;\nexport type FactSize = (typeof FACT_SIZES)[number];\n\n/** Color of the line under a fact value. `stale` flags an out-of-date figure. */\nexport const FACT_SUB_TONES = ['subtle', 'stale'] as const;\nexport type FactSubTone = (typeof FACT_SUB_TONES)[number];\n\nconst SIZE_CLASSES: Record<FactSize, { row: string; value: string }> = {\n md: { row: 'gap-4 py-3 [&:not(:first-child)]:shadow-[inset_0_1px_0_var(--hairline)]', value: 'text-body' },\n sm: { row: 'gap-4 py-2.5', value: 'text-label' },\n auto: {\n row: 'gap-4 py-3 lg:py-2.5 max-lg:[&:not(:first-child)]:shadow-[inset_0_1px_0_var(--hairline)]',\n value: 'text-body lg:text-label',\n },\n recap: { row: 'gap-3 py-[9px] [&:not(:first-child)]:shadow-[inset_0_1px_0_var(--hairline)]', value: 'text-label' },\n};\n\nconst SUB_TONE_CLASSES: Record<FactSubTone, string> = {\n subtle: 'text-(--subtle-foreground)',\n stale: 'text-(--stale)',\n};\n\n/**\n * The list that holds `div[ui-fact]` rows, as a native description list.\n *\n * @example\n * <dl uiFacts>\n * <div ui-fact label=\"Quantity\">500</div>\n * <div ui-fact label=\"Price\" sub=\"24/09 · Yahoo\">28,64 €</div>\n * </dl>\n */\n@Directive({\n selector: 'dl[uiFacts]',\n host: { '[class]': 'classes()' },\n})\nexport class UiFacts {\n readonly ruled = input(false, { transform: booleanAttribute });\n\n protected readonly classes = computed(() =>\n this.ruled() ? 'm-0 flex flex-col shadow-[inset_0_1px_0_var(--hairline)]' : 'm-0 flex flex-col',\n );\n}\n\n/**\n * One fact of a `dl[uiFacts]`: a label, its value (the projected content) and an optional sub-line\n * under the value.\n *\n * @example\n * <div ui-fact label=\"Price\" sub=\"24/09 · Yahoo\" subTone=\"stale\">28,64 €</div>\n */\n@Component({\n selector: 'div[ui-fact]',\n template: `\n <dt class=\"text-label text-(--muted-foreground)\">{{ label() }}</dt>\n <dd class=\"m-0 flex flex-col items-end text-right\">\n <span [class]=\"valueClasses()\"><ng-content /></span>\n @if (sub()) {\n <span [class]=\"subClasses()\">{{ sub() }}</span>\n }\n </dd>\n `,\n host: { '[class]': 'classes()' },\n})\nexport class UiFact {\n readonly label = input.required<string>();\n readonly sub = input<string>();\n readonly subTone = input<FactSubTone>('subtle');\n readonly size = input<FactSize>('md');\n\n protected readonly classes = computed(() => `flex items-baseline justify-between ${SIZE_CLASSES[this.size()].row}`);\n protected readonly valueClasses = computed(() => `${SIZE_CLASSES[this.size()].value} tabular-nums`);\n protected readonly subClasses = computed(() => `text-caption ${SUB_TONE_CLASSES[this.subTone()]}`);\n}\n"],"mappings":";;AAGA,MAAa,aAAa;CAAC;CAAM;CAAM;CAAQ;AAAO;AAItD,MAAa,iBAAiB,CAAC,UAAU,OAAO;AAGhD,MAAM,eAAiE;CACrE,IAAI;EAAE,KAAK;EAA2E,OAAO;CAAW;CACxG,IAAI;EAAE,KAAK;EAAgB,OAAO;CAAY;CAC9C,MAAM;EACJ,KAAK;EACL,OAAO;CACR;CACD,OAAO;EAAE,KAAK;EAA+E,OAAO;CAAY;AACjH;AAED,MAAM,mBAAgD;CACpD,QAAQ;CACR,OAAO;AACR;AAeD,IAAa,UAAb,MAAa,QAAO;CACT,QAAQ,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CAExC,UAAU,eAC3B,KAAK,MAAK,IAAK,6DAA6D,qBAC7E,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CALU,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAO,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAP,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAO,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,OAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mB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AAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,KAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,SAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,MAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA,EAAA,YAAA,EAAA,SAAA,YAAA,EAAA;EAAA,UAAA;EAAA,UAXP;;;;;;;;;EAQT,UAAA;CAAA,CAAA;;AAGU,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAM,YAAA,CAAA;EAblB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;;;;;;;;;GASV,MAAM,EAAE,WAAW,YAAW;EAC/B,CAAA"}
|
|
@@ -8,7 +8,7 @@ const nextId = (() => {
|
|
|
8
8
|
var UiFieldLeading = class UiFieldLeading {
|
|
9
9
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
10
10
|
minVersion: "12.0.0",
|
|
11
|
-
version: "22.2.
|
|
11
|
+
version: "22.2.2",
|
|
12
12
|
ngImport: i0,
|
|
13
13
|
type: UiFieldLeading,
|
|
14
14
|
deps: [],
|
|
@@ -16,7 +16,7 @@ var UiFieldLeading = class UiFieldLeading {
|
|
|
16
16
|
});
|
|
17
17
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
18
18
|
minVersion: "14.0.0",
|
|
19
|
-
version: "22.2.
|
|
19
|
+
version: "22.2.2",
|
|
20
20
|
type: UiFieldLeading,
|
|
21
21
|
isStandalone: true,
|
|
22
22
|
selector: "[uiFieldLeading]",
|
|
@@ -29,7 +29,7 @@ var UiFieldLeading = class UiFieldLeading {
|
|
|
29
29
|
};
|
|
30
30
|
i0.ɵɵngDeclareClassMetadata({
|
|
31
31
|
minVersion: "12.0.0",
|
|
32
|
-
version: "22.2.
|
|
32
|
+
version: "22.2.2",
|
|
33
33
|
ngImport: i0,
|
|
34
34
|
type: UiFieldLeading,
|
|
35
35
|
decorators: [{
|
|
@@ -46,7 +46,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
46
46
|
var UiFieldTrailing = class UiFieldTrailing {
|
|
47
47
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
48
48
|
minVersion: "12.0.0",
|
|
49
|
-
version: "22.2.
|
|
49
|
+
version: "22.2.2",
|
|
50
50
|
ngImport: i0,
|
|
51
51
|
type: UiFieldTrailing,
|
|
52
52
|
deps: [],
|
|
@@ -54,7 +54,7 @@ var UiFieldTrailing = class UiFieldTrailing {
|
|
|
54
54
|
});
|
|
55
55
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
56
56
|
minVersion: "14.0.0",
|
|
57
|
-
version: "22.2.
|
|
57
|
+
version: "22.2.2",
|
|
58
58
|
type: UiFieldTrailing,
|
|
59
59
|
isStandalone: true,
|
|
60
60
|
selector: "[uiFieldTrailing]",
|
|
@@ -64,7 +64,7 @@ var UiFieldTrailing = class UiFieldTrailing {
|
|
|
64
64
|
};
|
|
65
65
|
i0.ɵɵngDeclareClassMetadata({
|
|
66
66
|
minVersion: "12.0.0",
|
|
67
|
-
version: "22.2.
|
|
67
|
+
version: "22.2.2",
|
|
68
68
|
ngImport: i0,
|
|
69
69
|
type: UiFieldTrailing,
|
|
70
70
|
decorators: [{
|
|
@@ -130,7 +130,7 @@ var UiField = class UiField {
|
|
|
130
130
|
}
|
|
131
131
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
132
132
|
minVersion: "12.0.0",
|
|
133
|
-
version: "22.2.
|
|
133
|
+
version: "22.2.2",
|
|
134
134
|
ngImport: i0,
|
|
135
135
|
type: UiField,
|
|
136
136
|
deps: [],
|
|
@@ -138,7 +138,7 @@ var UiField = class UiField {
|
|
|
138
138
|
});
|
|
139
139
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
140
140
|
minVersion: "17.0.0",
|
|
141
|
-
version: "22.2.
|
|
141
|
+
version: "22.2.2",
|
|
142
142
|
type: UiField,
|
|
143
143
|
isStandalone: true,
|
|
144
144
|
selector: "ui-field",
|
|
@@ -252,7 +252,7 @@ var UiField = class UiField {
|
|
|
252
252
|
};
|
|
253
253
|
i0.ɵɵngDeclareClassMetadata({
|
|
254
254
|
minVersion: "12.0.0",
|
|
255
|
-
version: "22.2.
|
|
255
|
+
version: "22.2.2",
|
|
256
256
|
ngImport: i0,
|
|
257
257
|
type: UiField,
|
|
258
258
|
decorators: [{
|
|
@@ -17,7 +17,7 @@ var UiFilterChips = class UiFilterChips {
|
|
|
17
17
|
}
|
|
18
18
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
19
19
|
minVersion: "12.0.0",
|
|
20
|
-
version: "22.2.
|
|
20
|
+
version: "22.2.2",
|
|
21
21
|
ngImport: i0,
|
|
22
22
|
type: UiFilterChips,
|
|
23
23
|
deps: [],
|
|
@@ -25,7 +25,7 @@ var UiFilterChips = class UiFilterChips {
|
|
|
25
25
|
});
|
|
26
26
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
27
27
|
minVersion: "17.0.0",
|
|
28
|
-
version: "22.2.
|
|
28
|
+
version: "22.2.2",
|
|
29
29
|
type: UiFilterChips,
|
|
30
30
|
isStandalone: true,
|
|
31
31
|
selector: "ui-filter-chips",
|
|
@@ -91,7 +91,7 @@ var UiFilterChips = class UiFilterChips {
|
|
|
91
91
|
};
|
|
92
92
|
i0.ɵɵngDeclareClassMetadata({
|
|
93
93
|
minVersion: "12.0.0",
|
|
94
|
-
version: "22.2.
|
|
94
|
+
version: "22.2.2",
|
|
95
95
|
ngImport: i0,
|
|
96
96
|
type: UiFilterChips,
|
|
97
97
|
decorators: [{
|
|
@@ -19,7 +19,7 @@ var UiGroupHeader = class UiGroupHeader {
|
|
|
19
19
|
}
|
|
20
20
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
21
21
|
minVersion: "12.0.0",
|
|
22
|
-
version: "22.2.
|
|
22
|
+
version: "22.2.2",
|
|
23
23
|
ngImport: i0,
|
|
24
24
|
type: UiGroupHeader,
|
|
25
25
|
deps: [],
|
|
@@ -27,7 +27,7 @@ var UiGroupHeader = class UiGroupHeader {
|
|
|
27
27
|
});
|
|
28
28
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
29
29
|
minVersion: "17.0.0",
|
|
30
|
-
version: "22.2.
|
|
30
|
+
version: "22.2.2",
|
|
31
31
|
type: UiGroupHeader,
|
|
32
32
|
isStandalone: true,
|
|
33
33
|
selector: "ui-group-header",
|
|
@@ -146,7 +146,7 @@ var UiGroupHeader = class UiGroupHeader {
|
|
|
146
146
|
};
|
|
147
147
|
i0.ɵɵngDeclareClassMetadata({
|
|
148
148
|
minVersion: "12.0.0",
|
|
149
|
-
version: "22.2.
|
|
149
|
+
version: "22.2.2",
|
|
150
150
|
ngImport: i0,
|
|
151
151
|
type: UiGroupHeader,
|
|
152
152
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"joanroucoux-cairn-ui-group-header.mjs","names":[],"sources":["../../../projects/ui/group-header/group-header.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport { Component, booleanAttribute, input, model } from '@angular/core';\n\n/**\n * Header of a card on a phone: the name, its meta underneath, the projected total on the right.\n *\n * With `collapsible` the header is a button inside the heading, with a chevron that turns when the\n * group is folded and a press scale. `expanded` is a model: the page keeps the fold memory and hides\n * the card body itself. `toggleDisabled` keeps the button focusable and announced, but a click\n * changes nothing (a filter holds the group open). `controls` is the id of the body it folds.\n *\n * @example\n * <ui-group-header name=\"Northwind PEA\" meta=\"PEA · 3
|
|
1
|
+
{"version":3,"file":"joanroucoux-cairn-ui-group-header.mjs","names":[],"sources":["../../../projects/ui/group-header/group-header.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport { Component, booleanAttribute, input, model } from '@angular/core';\n\n/**\n * Header of a card on a phone: the name, its meta underneath, the projected total on the right.\n *\n * With `collapsible` the header is a button inside the heading, with a chevron that turns when the\n * group is folded and a press scale. `expanded` is a model: the page keeps the fold memory and hides\n * the card body itself. `toggleDisabled` keeps the button focusable and announced, but a click\n * changes nothing (a filter holds the group open). `controls` is the id of the body it folds.\n *\n * @example\n * <ui-group-header name=\"Northwind PEA\" meta=\"PEA · 3 holdings\" collapsible [(expanded)]=\"open\">\n * <ui-amount [value]=\"total\" />\n * </ui-group-header>\n */\n@Component({\n selector: 'ui-group-header',\n imports: [NgTemplateOutlet],\n host: { class: 'block' },\n template: `\n <ng-template #total><ng-content /></ng-template>\n @if (collapsible()) {\n <h2 class=\"m-0 font-normal\">\n <button\n class=\"rounded-control flex min-h-11 w-full items-end justify-between gap-3 px-1 pt-3 text-left transition-transform [transition-duration:var(--duration-press)] ease-out not-aria-disabled:cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) not-aria-disabled:active:scale-(--press-scale)\"\n type=\"button\"\n [attr.aria-controls]=\"controls() || null\"\n [attr.aria-disabled]=\"toggleDisabled() ? 'true' : null\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggle()\"\n >\n <span class=\"flex min-w-0 items-center gap-2\">\n <svg\n aria-hidden=\"true\"\n class=\"flex-none stroke-(--muted-foreground) transition-transform duration-(--duration-fast) ease-out\"\n fill=\"none\"\n height=\"20\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.75\"\n viewBox=\"0 0 24 24\"\n width=\"20\"\n [class.-rotate-90]=\"!expanded()\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n <span class=\"flex min-w-0 flex-col\">\n <span class=\"text-title font-semibold\">{{ name() }}</span>\n @if (meta()) {\n <span class=\"text-label text-(--muted-foreground)\">{{ meta() }}</span>\n }\n </span>\n </span>\n <span class=\"text-title font-semibold whitespace-nowrap tabular-nums\">\n <ng-container [ngTemplateOutlet]=\"total\" />\n </span>\n </button>\n </h2>\n } @else {\n <div class=\"flex min-h-11 w-full items-end justify-between gap-3 px-1 pt-3\">\n <div class=\"flex min-w-0 flex-col\">\n <h2 class=\"text-title m-0 font-semibold\">{{ name() }}</h2>\n @if (meta()) {\n <span class=\"text-label text-(--muted-foreground)\">{{ meta() }}</span>\n }\n </div>\n <span class=\"text-title font-semibold whitespace-nowrap tabular-nums\">\n <ng-container [ngTemplateOutlet]=\"total\" />\n </span>\n </div>\n }\n `,\n})\nexport class UiGroupHeader {\n readonly name = input.required<string>();\n readonly meta = input<string>();\n readonly collapsible = input(false, { transform: booleanAttribute });\n readonly expanded = model(true);\n readonly toggleDisabled = input(false, { transform: booleanAttribute });\n readonly controls = input<string>();\n\n protected toggle(): void {\n if (!this.toggleDisabled()) {\n this.expanded.update((expanded) => !expanded);\n }\n }\n}\n"],"mappings":";;;AA0EA,IAAa,gBAAb,MAAa,cAAa;CACf,OAAO,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,OAAO,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACtB,cAAc,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACxD,WAAW,MAAM,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACtB,iBAAiB,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,iBAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CAC3D,WAAW,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAEzB,SAAM;EACd,IAAI,CAA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GAC1B,MAAM,EAAE,OAAO,QAAO;GACtB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDX,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { Directive } from "@angular/core";
|
|
|
3
3
|
var UiIconToggle = class UiIconToggle {
|
|
4
4
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5
5
|
minVersion: "12.0.0",
|
|
6
|
-
version: "22.2.
|
|
6
|
+
version: "22.2.2",
|
|
7
7
|
ngImport: i0,
|
|
8
8
|
type: UiIconToggle,
|
|
9
9
|
deps: [],
|
|
@@ -11,7 +11,7 @@ var UiIconToggle = class UiIconToggle {
|
|
|
11
11
|
});
|
|
12
12
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
13
13
|
minVersion: "14.0.0",
|
|
14
|
-
version: "22.2.
|
|
14
|
+
version: "22.2.2",
|
|
15
15
|
type: UiIconToggle,
|
|
16
16
|
isStandalone: true,
|
|
17
17
|
selector: "button[uiIconToggle]",
|
|
@@ -24,7 +24,7 @@ var UiIconToggle = class UiIconToggle {
|
|
|
24
24
|
};
|
|
25
25
|
i0.ɵɵngDeclareClassMetadata({
|
|
26
26
|
minVersion: "12.0.0",
|
|
27
|
-
version: "22.2.
|
|
27
|
+
version: "22.2.2",
|
|
28
28
|
ngImport: i0,
|
|
29
29
|
type: UiIconToggle,
|
|
30
30
|
decorators: [{
|
|
@@ -28,7 +28,7 @@ var UiInput = class UiInput {
|
|
|
28
28
|
classes = computed(() => `${CONTROL_BASE_CLASSES} ${SEARCH_CLASSES} ${CONTROL_SURFACE_CLASSES[this.surface()]} ${CONTROL_SIZE_CLASSES[this.size()]}`, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
29
29
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
30
30
|
minVersion: "12.0.0",
|
|
31
|
-
version: "22.2.
|
|
31
|
+
version: "22.2.2",
|
|
32
32
|
ngImport: i0,
|
|
33
33
|
type: UiInput,
|
|
34
34
|
deps: [],
|
|
@@ -36,7 +36,7 @@ var UiInput = class UiInput {
|
|
|
36
36
|
});
|
|
37
37
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
38
38
|
minVersion: "17.1.0",
|
|
39
|
-
version: "22.2.
|
|
39
|
+
version: "22.2.2",
|
|
40
40
|
type: UiInput,
|
|
41
41
|
isStandalone: true,
|
|
42
42
|
selector: "input[uiInput]",
|
|
@@ -80,7 +80,7 @@ var UiInput = class UiInput {
|
|
|
80
80
|
};
|
|
81
81
|
i0.ɵɵngDeclareClassMetadata({
|
|
82
82
|
minVersion: "12.0.0",
|
|
83
|
-
version: "22.2.
|
|
83
|
+
version: "22.2.2",
|
|
84
84
|
ngImport: i0,
|
|
85
85
|
type: UiInput,
|
|
86
86
|
decorators: [{
|
|
@@ -134,7 +134,7 @@ var UiTextarea = class UiTextarea {
|
|
|
134
134
|
touched = input(false, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
|
|
135
135
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
136
136
|
minVersion: "12.0.0",
|
|
137
|
-
version: "22.2.
|
|
137
|
+
version: "22.2.2",
|
|
138
138
|
ngImport: i0,
|
|
139
139
|
type: UiTextarea,
|
|
140
140
|
deps: [],
|
|
@@ -142,7 +142,7 @@ var UiTextarea = class UiTextarea {
|
|
|
142
142
|
});
|
|
143
143
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
144
144
|
minVersion: "17.1.0",
|
|
145
|
-
version: "22.2.
|
|
145
|
+
version: "22.2.2",
|
|
146
146
|
type: UiTextarea,
|
|
147
147
|
isStandalone: true,
|
|
148
148
|
selector: "textarea[uiTextarea]",
|
|
@@ -172,7 +172,7 @@ var UiTextarea = class UiTextarea {
|
|
|
172
172
|
};
|
|
173
173
|
i0.ɵɵngDeclareClassMetadata({
|
|
174
174
|
minVersion: "12.0.0",
|
|
175
|
-
version: "22.2.
|
|
175
|
+
version: "22.2.2",
|
|
176
176
|
ngImport: i0,
|
|
177
177
|
type: UiTextarea,
|
|
178
178
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"joanroucoux-cairn-ui-input.mjs","names":[],"sources":["../../../projects/ui/input/input.ts"],"sourcesContent":["import { Directive, computed, forwardRef, input } from '@angular/core';\n\nimport { UI_CONTROL, type UiControl, type UiControlError } from '@joanroucoux/cairn-ui/control';\n\n/** Available control sizes. */\nexport const CONTROL_SIZES = ['sm', 'md', 'lg', 'xl'] as const;\nexport type ControlSize = (typeof CONTROL_SIZES)[number];\n\nexport const CONTROL_BASE_CLASSES =\n 'w-full rounded-control px-3 text-body text-(--foreground) shadow-[inset_0_0_0_1px_var(--border)] placeholder:text-(--muted-foreground) focus-visible:shadow-[inset_0_0_0_2px_var(--ring)] aria-invalid:shadow-[inset_0_0_0_2px_var(--negative)] disabled:cursor-not-allowed disabled:opacity-50';\n\nexport const CONTROL_SURFACES = ['background', 'card'] as const;\nexport type ControlSurface = (typeof CONTROL_SURFACES)[number];\n\nexport const CONTROL_SURFACE_CLASSES: Record<ControlSurface, string> = {\n background: 'bg-(--background)',\n card: 'bg-(--card)',\n};\n\nexport const CONTROL_SIZE_CLASSES: Record<ControlSize, string> = {\n sm: 'h-9',\n md: 'min-h-(--row-min)',\n lg: 'min-h-12 lg:min-h-(--row-min)',\n xl: 'h-12 lg:h-11',\n};\n\nconst SEARCH_CLASSES = '[&::-webkit-search-cancel-button]:appearance-none';\n\n/**\n * Styled native text input. The host stays a plain `<input>`, so every forms flavor and native\n * attribute keeps working. Declares the `errors` and `touched` inputs Angular's `[formField]` fills,\n * so a surrounding `ui-field` can show the message.\n *\n * @example\n * <input uiInput type=\"email\" placeholder=\"you@
|
|
1
|
+
{"version":3,"file":"joanroucoux-cairn-ui-input.mjs","names":[],"sources":["../../../projects/ui/input/input.ts"],"sourcesContent":["import { Directive, computed, forwardRef, input } from '@angular/core';\n\nimport { UI_CONTROL, type UiControl, type UiControlError } from '@joanroucoux/cairn-ui/control';\n\n/** Available control sizes. */\nexport const CONTROL_SIZES = ['sm', 'md', 'lg', 'xl'] as const;\nexport type ControlSize = (typeof CONTROL_SIZES)[number];\n\n/** @internal Shared with `select` and `choice-chips`. */\nexport const CONTROL_BASE_CLASSES =\n 'w-full rounded-control px-3 text-body text-(--foreground) shadow-[inset_0_0_0_1px_var(--border)] placeholder:text-(--muted-foreground) focus-visible:shadow-[inset_0_0_0_2px_var(--ring)] aria-invalid:shadow-[inset_0_0_0_2px_var(--negative)] disabled:cursor-not-allowed disabled:opacity-50';\n\nexport const CONTROL_SURFACES = ['background', 'card'] as const;\nexport type ControlSurface = (typeof CONTROL_SURFACES)[number];\n\n/** @internal Shared with `select` and `choice-chips`. */\nexport const CONTROL_SURFACE_CLASSES: Record<ControlSurface, string> = {\n background: 'bg-(--background)',\n card: 'bg-(--card)',\n};\n\n/** @internal Shared with `select` and `choice-chips`. */\nexport const CONTROL_SIZE_CLASSES: Record<ControlSize, string> = {\n sm: 'h-9',\n md: 'min-h-(--row-min)',\n lg: 'min-h-12 lg:min-h-(--row-min)',\n xl: 'h-12 lg:h-11',\n};\n\nconst SEARCH_CLASSES = '[&::-webkit-search-cancel-button]:appearance-none';\n\n/**\n * Styled native text input. The host stays a plain `<input>`, so every forms flavor and native\n * attribute keeps working. Declares the `errors` and `touched` inputs Angular's `[formField]` fills,\n * so a surrounding `ui-field` can show the message.\n *\n * @example\n * <input uiInput type=\"email\" placeholder=\"you@contoso.com\" />\n */\n@Directive({\n selector: 'input[uiInput]',\n host: {\n '[class]': 'classes()',\n },\n providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiInput) }],\n})\nexport class UiInput implements UiControl {\n readonly size = input<ControlSize>('md');\n readonly surface = input<ControlSurface>('background');\n readonly errors = input<readonly UiControlError[]>([]);\n readonly touched = input(false);\n\n protected readonly classes = computed(\n () =>\n `${CONTROL_BASE_CLASSES} ${SEARCH_CLASSES} ${CONTROL_SURFACE_CLASSES[this.surface()]} ${CONTROL_SIZE_CLASSES[this.size()]}`,\n );\n}\n\n/**\n * Styled native textarea. It takes no size: it grows from a minimum height. Declares the `errors`\n * and `touched` inputs Angular's `[formField]` fills, so a surrounding `ui-field` can show the message.\n *\n * @example\n * <textarea uiTextarea maxlength=\"280\"></textarea>\n */\n@Directive({\n selector: 'textarea[uiTextarea]',\n host: {\n class: `${CONTROL_BASE_CLASSES} bg-(--background) min-h-24 py-2`,\n },\n providers: [{ provide: UI_CONTROL, useExisting: forwardRef(() => UiTextarea) }],\n})\nexport class UiTextarea implements UiControl {\n readonly errors = input<readonly UiControlError[]>([]);\n readonly touched = input(false);\n}\n"],"mappings":";;;AAKA,MAAa,gBAAgB;CAAC;CAAM;CAAM;CAAM;AAAI;AAIpD,MAAa,uBACX;AAEF,MAAa,mBAAmB,CAAC,cAAc,MAAM;AAIrD,MAAa,0BAA0D;CACrE,YAAY;CACZ,MAAM;AACP;AAGD,MAAa,uBAAoD;CAC/D,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACL;AAED,MAAM,iBAAiB;AAiBvB,IAAa,UAAb,MAAa,QAAO;CACT,OAAO,MAAmB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,UAAU,MAAsB,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC7C,SAAS,MAAiC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAC7C,UAAU,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAEZ,UAAU,eAEzB,GAAG,qBAAoB,GAAI,eAAc,GAAI,wBAAwB,KAAK,QAAO,GAAG,GAAI,qBAAqB,KAAK,KAAI,MACzH,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+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OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAU,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAV,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAU,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,QAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,SAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA,EAAA,gBAAA,kUAAA;EAAA,WAFV,CAAC;GAAE,SAAS;GAAY,aAAa,iBAAiB,UAAU;EAAC,CAAE;EAAC,UAAA;CAAA,CAAA;;AAEpE,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAU,YAAA,CAAA;EAPtB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EACJ,OAAO,GAAG,qBAAoB,kCAC/B;GACD,WAAW,CAAC;IAAE,SAAS;IAAY,aAAa,iBAAgB,UAAW;GAAC,CAAE;EAC/E,CAAA"}
|
|
@@ -550,7 +550,7 @@ var UiLineChart = class UiLineChart {
|
|
|
550
550
|
}
|
|
551
551
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
552
552
|
minVersion: "12.0.0",
|
|
553
|
-
version: "22.2.
|
|
553
|
+
version: "22.2.2",
|
|
554
554
|
ngImport: i0,
|
|
555
555
|
type: UiLineChart,
|
|
556
556
|
deps: [],
|
|
@@ -558,7 +558,7 @@ var UiLineChart = class UiLineChart {
|
|
|
558
558
|
});
|
|
559
559
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
560
560
|
minVersion: "17.0.0",
|
|
561
|
-
version: "22.2.
|
|
561
|
+
version: "22.2.2",
|
|
562
562
|
type: UiLineChart,
|
|
563
563
|
isStandalone: true,
|
|
564
564
|
selector: "ui-line-chart",
|
|
@@ -858,7 +858,7 @@ var UiLineChart = class UiLineChart {
|
|
|
858
858
|
};
|
|
859
859
|
i0.ɵɵngDeclareClassMetadata({
|
|
860
860
|
minVersion: "12.0.0",
|
|
861
|
-
version: "22.2.
|
|
861
|
+
version: "22.2.2",
|
|
862
862
|
ngImport: i0,
|
|
863
863
|
type: UiLineChart,
|
|
864
864
|
decorators: [{
|
|
@@ -30,7 +30,7 @@ var UiMenuItem = class UiMenuItem {
|
|
|
30
30
|
}
|
|
31
31
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
32
32
|
minVersion: "12.0.0",
|
|
33
|
-
version: "22.2.
|
|
33
|
+
version: "22.2.2",
|
|
34
34
|
ngImport: i0,
|
|
35
35
|
type: UiMenuItem,
|
|
36
36
|
deps: [],
|
|
@@ -38,7 +38,7 @@ var UiMenuItem = class UiMenuItem {
|
|
|
38
38
|
});
|
|
39
39
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
40
40
|
minVersion: "17.1.0",
|
|
41
|
-
version: "22.2.
|
|
41
|
+
version: "22.2.2",
|
|
42
42
|
type: UiMenuItem,
|
|
43
43
|
isStandalone: true,
|
|
44
44
|
selector: "button[uiMenuItem]",
|
|
@@ -72,7 +72,7 @@ var UiMenuItem = class UiMenuItem {
|
|
|
72
72
|
};
|
|
73
73
|
i0.ɵɵngDeclareClassMetadata({
|
|
74
74
|
minVersion: "12.0.0",
|
|
75
|
-
version: "22.2.
|
|
75
|
+
version: "22.2.2",
|
|
76
76
|
ngImport: i0,
|
|
77
77
|
type: UiMenuItem,
|
|
78
78
|
decorators: [{
|
|
@@ -184,11 +184,18 @@ var UiMenu = class UiMenu {
|
|
|
184
184
|
#isSheet() {
|
|
185
185
|
return this.sheet() && typeof window.matchMedia === "function" && !window.matchMedia("(min-width: 64rem)").matches;
|
|
186
186
|
}
|
|
187
|
+
#layoutWidth() {
|
|
188
|
+
const style = getComputedStyle(this.#host);
|
|
189
|
+
const width = parseFloat(style.width);
|
|
190
|
+
if (Number.isNaN(width)) return this.#host.offsetWidth;
|
|
191
|
+
if (style.boxSizing === "border-box") return width;
|
|
192
|
+
return width + parseFloat(style.paddingLeft) + parseFloat(style.paddingRight) + parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);
|
|
193
|
+
}
|
|
187
194
|
#position(trigger) {
|
|
188
195
|
const margin = 8;
|
|
189
196
|
const triggerRect = trigger.getBoundingClientRect();
|
|
190
197
|
const menuRect = {
|
|
191
|
-
width: this.#
|
|
198
|
+
width: this.#layoutWidth(),
|
|
192
199
|
height: this.#host.offsetHeight
|
|
193
200
|
};
|
|
194
201
|
const fitsBelow = window.innerHeight - triggerRect.bottom >= menuRect.height + margin;
|
|
@@ -203,7 +210,7 @@ var UiMenu = class UiMenu {
|
|
|
203
210
|
}
|
|
204
211
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
205
212
|
minVersion: "12.0.0",
|
|
206
|
-
version: "22.2.
|
|
213
|
+
version: "22.2.2",
|
|
207
214
|
ngImport: i0,
|
|
208
215
|
type: UiMenu,
|
|
209
216
|
deps: [],
|
|
@@ -211,7 +218,7 @@ var UiMenu = class UiMenu {
|
|
|
211
218
|
});
|
|
212
219
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
213
220
|
minVersion: "17.0.0",
|
|
214
|
-
version: "22.2.
|
|
221
|
+
version: "22.2.2",
|
|
215
222
|
type: UiMenu,
|
|
216
223
|
isStandalone: true,
|
|
217
224
|
selector: "ui-menu",
|
|
@@ -280,7 +287,7 @@ var UiMenu = class UiMenu {
|
|
|
280
287
|
};
|
|
281
288
|
i0.ɵɵngDeclareClassMetadata({
|
|
282
289
|
minVersion: "12.0.0",
|
|
283
|
-
version: "22.2.
|
|
290
|
+
version: "22.2.2",
|
|
284
291
|
ngImport: i0,
|
|
285
292
|
type: UiMenu,
|
|
286
293
|
decorators: [{
|
|
@@ -356,7 +363,7 @@ var UiMenuTrigger = class UiMenuTrigger {
|
|
|
356
363
|
}
|
|
357
364
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
358
365
|
minVersion: "12.0.0",
|
|
359
|
-
version: "22.2.
|
|
366
|
+
version: "22.2.2",
|
|
360
367
|
ngImport: i0,
|
|
361
368
|
type: UiMenuTrigger,
|
|
362
369
|
deps: [],
|
|
@@ -364,7 +371,7 @@ var UiMenuTrigger = class UiMenuTrigger {
|
|
|
364
371
|
});
|
|
365
372
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
366
373
|
minVersion: "17.1.0",
|
|
367
|
-
version: "22.2.
|
|
374
|
+
version: "22.2.2",
|
|
368
375
|
type: UiMenuTrigger,
|
|
369
376
|
isStandalone: true,
|
|
370
377
|
selector: "[uiMenuTrigger]",
|
|
@@ -388,7 +395,7 @@ var UiMenuTrigger = class UiMenuTrigger {
|
|
|
388
395
|
};
|
|
389
396
|
i0.ɵɵngDeclareClassMetadata({
|
|
390
397
|
minVersion: "12.0.0",
|
|
391
|
-
version: "22.2.
|
|
398
|
+
version: "22.2.2",
|
|
392
399
|
ngImport: i0,
|
|
393
400
|
type: UiMenuTrigger,
|
|
394
401
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"joanroucoux-cairn-ui-menu.mjs","names":[],"sources":["../../../projects/ui/menu/menu.ts"],"sourcesContent":["import {\n Component,\n Directive,\n ElementRef,\n booleanAttribute,\n computed,\n contentChildren,\n inject,\n input,\n numberAttribute,\n signal,\n} from '@angular/core';\n\nconst MENU_CLASSES =\n 'm-0 min-w-44 p-1 rounded-container bg-(--elevated) shadow-[0_8px_24px_rgb(0_0_0/0.16),inset_0_0_0_1px_var(--border)] text-(--foreground) transition-[opacity,scale,overlay,display] transition-discrete duration-(--duration-fast) not-open:duration-[120ms] ease-out starting:open:opacity-0 starting:open:scale-(--enter-scale) opacity-0 scale-(--enter-scale) open:opacity-100 open:scale-100';\n\nconst SHEET_CLASSES =\n 'max-lg:fixed max-lg:inset-x-4 max-lg:top-auto max-lg:w-auto max-lg:bottom-[calc(76px+env(safe-area-inset-bottom))] max-lg:min-w-0 max-lg:p-1.5 max-lg:bg-(--card) max-lg:shadow-[0_12px_32px_rgb(0_0_0/0.2),inset_0_0_0_1px_var(--border)] max-lg:backdrop:bg-[rgb(0_0_0/0.36)] max-lg:transition-[opacity,translate,overlay,display] max-lg:scale-100 max-lg:translate-y-4 max-lg:open:translate-y-0 max-lg:starting:open:scale-100 max-lg:starting:open:translate-y-4 max-lg:motion-reduce:translate-y-0 max-lg:motion-reduce:starting:open:translate-y-0';\n\nconst SHEET_ITEM_CLASSES =\n 'flex w-full items-center gap-3 lg:pointer-fine:gap-2.5 min-h-12 lg:min-h-11 lg:pointer-fine:min-h-9 px-3 lg:pointer-fine:px-2.5 rounded-[calc(var(--radius-container)-6px)] lg:rounded-[calc(var(--radius-container)-4px)] text-body lg:pointer-fine:text-label text-left whitespace-nowrap hover:bg-(--glow) focus-visible:bg-(--glow) active:bg-(--soft) transition-[background-color] duration-(--duration-fast) ease-out outline-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--ring) [:where(&>svg)]:size-5 [:where(&>svg)]:flex-none lg:[:where(&>svg)]:size-[18px] lg:pointer-fine:[:where(&>svg)]:size-4';\n\nconst ITEM_CLASSES =\n 'flex w-full items-center gap-3 pointer-fine:gap-2.5 min-h-11 pointer-fine:min-h-9 px-3 pointer-fine:px-2.5 rounded-[calc(var(--radius-container)-4px)] text-body pointer-fine:text-label text-left whitespace-nowrap hover:bg-(--glow) focus-visible:bg-(--glow) active:bg-(--soft) transition-[background-color] duration-(--duration-fast) ease-out outline-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--ring) [:where(&>svg)]:size-[18px] [:where(&>svg)]:flex-none pointer-fine:[:where(&>svg)]:size-4';\n\nconst CHECK_CLASSES =\n \"after:ms-auto after:block after:h-3 after:w-1.5 after:flex-none after:rotate-45 after:border-r-2 after:border-b-2 after:border-current after:content-['']\";\n\nconst nextId = (() => {\n let count = 0;\n\n return () => `ui-menu-${++count}`;\n})();\n\n/**\n * One action of a `ui-menu`; `destructive` paints it in `--negative`. Giving it `checked` makes it a radio\n * choice (`menuitemradio`): the current one carries a check mark and `aria-checked=\"true\"`.\n *\n * @example\n * <button uiMenuItem destructive (click)=\"remove()\">Delete the line</button>\n * <button uiMenuItem [checked]=\"account() === 'pea'\" (click)=\"account.set('pea')\">Northwind PEA</button>\n */\n@Directive({\n selector: 'button[uiMenuItem]',\n host: {\n '[attr.role]': 'role()',\n '[attr.aria-checked]': 'checked() === undefined ? null : checked()',\n tabindex: '-1',\n '[class]': 'classes()',\n '(click)': 'onClick()',\n },\n})\nexport class UiMenuItem {\n readonly destructive = input(false, { transform: booleanAttribute });\n readonly checked = input<boolean>();\n\n readonly #host = inject<ElementRef<HTMLButtonElement>>(ElementRef).nativeElement;\n readonly #menu = inject(UiMenu);\n\n protected readonly role = computed(() => (this.checked() === undefined ? 'menuitem' : 'menuitemradio'));\n\n protected readonly classes = computed(\n () =>\n `${this.#menu.sheet() ? SHEET_ITEM_CLASSES : ITEM_CLASSES}${this.destructive() ? ' text-(--negative)' : ''}${this.checked() ? ` ${CHECK_CLASSES}` : ''}`,\n );\n\n focus(): void {\n this.#host.focus();\n }\n\n hasFocus(): boolean {\n return this.#host === document.activeElement;\n }\n\n protected onClick(): void {\n this.#menu.close();\n }\n}\n\n/**\n * Secondary actions menu, opened from its trigger through the native Popover API. With `sheet`, below\n * 64rem it opens as a bottom action sheet instead of beside its trigger, and `heading` names what\n * the actions apply to. `width` fixes the popover width in pixels; without it the menu fits its content.\n *\n * @example\n * <button ui-button size=\"icon\" aria-label=\"More\" [uiMenuTrigger]=\"menu\">...</button>\n * <ui-menu #menu label=\"Line actions\">\n * <button uiMenuItem (click)=\"edit()\">Edit</button>\n * <button uiMenuItem destructive (click)=\"remove()\">Delete the line</button>\n * </ui-menu>\n */\n@Component({\n selector: 'ui-menu',\n template: `\n @if (sheet() && heading()) {\n <div aria-hidden=\"true\" class=\"text-label px-3 pt-2 pb-1.5 leading-[17px] text-(--muted-foreground) lg:hidden\">\n {{ heading() }}\n </div>\n }\n <ng-content />\n `,\n host: {\n role: 'menu',\n popover: 'auto',\n '[id]': 'menuId',\n '[style.--ui-menu-width]': 'widthVar()',\n '[class]': 'classes()',\n '[attr.aria-label]': 'label()',\n '(toggle)': 'onToggle($event)',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class UiMenu {\n readonly label = input.required<string>();\n readonly sheet = input(false, { transform: booleanAttribute });\n readonly heading = input<string>();\n readonly width = input<number | undefined, unknown>(undefined, { transform: numberAttribute });\n\n readonly menuId = nextId();\n readonly isOpen = signal(false);\n\n protected readonly hasWidth = computed(() => Number.isFinite(this.width()));\n protected readonly widthVar = computed(() => (this.hasWidth() ? `${this.width()}px` : null));\n protected readonly classes = computed(() => {\n const width = !this.hasWidth() ? '' : this.sheet() ? ' lg:w-(--ui-menu-width)' : ' w-(--ui-menu-width)';\n return `${MENU_CLASSES}${this.sheet() ? ` ${SHEET_CLASSES}` : ''}${width}`;\n });\n protected readonly items = contentChildren(UiMenuItem);\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n #trigger: HTMLElement | null = null;\n\n open(trigger: HTMLElement): void {\n this.#trigger = trigger;\n this.isOpen.set(true);\n if (typeof this.#host.showPopover === 'function') {\n this.#host.showPopover();\n }\n if (this.#isSheet()) {\n this.#host.style.position = '';\n this.#host.style.top = '';\n this.#host.style.left = '';\n this.#host.style.right = '';\n this.#host.style.bottom = '';\n } else {\n this.#position(trigger);\n }\n (this.items().find((item) => item.checked()) ?? this.items()[0])?.focus();\n }\n\n close(): void {\n const wasOpen = this.isOpen();\n\n this.#applyClosed();\n\n if (wasOpen && typeof this.#host.hidePopover === 'function') {\n this.#host.hidePopover();\n }\n }\n\n #applyClosed(): void {\n this.isOpen.set(false);\n this.#trigger?.focus();\n this.#trigger = null;\n }\n\n protected onToggle(event: Event): void {\n if ((event as ToggleEvent).newState === 'closed') {\n this.#applyClosed();\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Tab' || event.key === 'Escape') {\n event.preventDefault();\n this.close();\n return;\n }\n\n const items = this.items();\n const currentIndex = items.findIndex((item) => item.hasFocus());\n const lastIndex = items.length - 1;\n\n let nextIndex: number | undefined;\n switch (event.key) {\n case 'ArrowDown':\n nextIndex = currentIndex >= lastIndex ? 0 : currentIndex + 1;\n break;\n case 'ArrowUp':\n nextIndex = currentIndex <= 0 ? lastIndex : currentIndex - 1;\n break;\n case 'Home':\n nextIndex = 0;\n break;\n case 'End':\n nextIndex = lastIndex;\n break;\n }\n\n if (nextIndex === undefined) {\n return;\n }\n event.preventDefault();\n items[nextIndex]?.focus();\n }\n\n #isSheet(): boolean {\n return this.sheet() && typeof window.matchMedia === 'function' && !window.matchMedia('(min-width: 64rem)').matches;\n }\n\n #position(trigger: HTMLElement): void {\n const margin = 8;\n const triggerRect = trigger.getBoundingClientRect();\n const menuRect = { width: this.#host.offsetWidth, height: this.#host.offsetHeight };\n const fitsBelow = window.innerHeight - triggerRect.bottom >= menuRect.height + margin;\n\n const top = fitsBelow ? triggerRect.bottom + 4 : Math.max(margin, triggerRect.top - menuRect.height - 4);\n const left = Math.min(\n Math.max(triggerRect.right - menuRect.width, margin),\n window.innerWidth - menuRect.width - margin,\n );\n\n this.#host.style.position = 'fixed';\n this.#host.style.top = `${Math.min(top, window.innerHeight - menuRect.height - margin)}px`;\n this.#host.style.left = `${left}px`;\n this.#host.style.right = 'auto';\n this.#host.style.bottom = 'auto';\n this.#host.style.transformOrigin = fitsBelow ? 'top right' : 'bottom right';\n }\n}\n\n/**\n * Opens a `ui-menu` from a trigger element and wires its ARIA attributes.\n *\n * @example\n * <button ui-button size=\"icon\" aria-label=\"More\" [uiMenuTrigger]=\"menu\">...</button>\n */\n@Directive({\n selector: '[uiMenuTrigger]',\n host: {\n 'aria-haspopup': 'menu',\n '[attr.aria-expanded]': 'uiMenuTrigger().isOpen()',\n '[attr.aria-controls]': 'uiMenuTrigger().menuId',\n '(click)': 'toggle()',\n },\n})\nexport class UiMenuTrigger {\n readonly uiMenuTrigger = input.required<UiMenu>();\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n protected toggle(): void {\n const menu = this.uiMenuTrigger();\n\n if (menu.isOpen()) {\n menu.close();\n } else {\n menu.open(this.#host);\n }\n }\n}\n"],"mappings":";;AAaA,MAAM,eACJ;AAEF,MAAM,gBACJ;AAEF,MAAM,qBACJ;AAEF,MAAM,eACJ;AAEF,MAAM,gBACJ;AAEF,MAAM,gBAAe;CACnB,IAAI,QAAQ;CAEZ,aAAa,WAAW,EAAE;AAC5B,EAAA,CAAE;AAoBF,IAAa,aAAb,MAAa,WAAU;CACZ,cAAc,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACxD,UAAU,MAAgB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAE1B,QAAQ,OAAsC,UAAU,CAAC,CAAC;CAC1D,QAAQ,OAAO,MAAM;CAEX,OAAO,eAAgB,KAAK,QAAO,MAAO,SAAY,aAAa,iBAAiB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAEpF,UAAU,eAEzB,GAAG,KAAK,MAAM,MAAK,IAAK,qBAAqB,eAAe,KAAK,YAAW,IAAK,uBAAuB,KAAK,KAAK,QAAO,IAAK,IAAI,kBAAkB,MACvJ,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAED,QAAK;EACH,KAAK,MAAM,MAAK;CAClB;CAEA,WAAQ;EACN,OAAO,KAAK,UAAU,SAAS;CACjC;CAEU,UAAO;EACf,KAAK,MAAM,MAAK;CAClB;CAxBW,OAAA,OAAA,GAA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AAb,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAa,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,eAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,iBAAA,OAAA;GAAA,WAAA,EAAA,SAAA,WAAA;GAAA,YAAA;IAAA,sBAAA;IAAA,sBAAA;GAAA;EAAA;EAAA,UAAA;CAAA,CAAA;;AAAb,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EATzB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM;IACJ,iBAAiB;IACjB,wBAAwB;IACxB,wBAAwB;IACxB,WAAW;GACZ;EACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"joanroucoux-cairn-ui-menu.mjs","names":[],"sources":["../../../projects/ui/menu/menu.ts"],"sourcesContent":["import {\n Component,\n Directive,\n ElementRef,\n booleanAttribute,\n computed,\n contentChildren,\n inject,\n input,\n numberAttribute,\n signal,\n} from '@angular/core';\n\nconst MENU_CLASSES =\n 'm-0 min-w-44 p-1 rounded-container bg-(--elevated) shadow-[0_8px_24px_rgb(0_0_0/0.16),inset_0_0_0_1px_var(--border)] text-(--foreground) transition-[opacity,scale,overlay,display] transition-discrete duration-(--duration-fast) not-open:duration-[120ms] ease-out starting:open:opacity-0 starting:open:scale-(--enter-scale) opacity-0 scale-(--enter-scale) open:opacity-100 open:scale-100';\n\nconst SHEET_CLASSES =\n 'max-lg:fixed max-lg:inset-x-4 max-lg:top-auto max-lg:w-auto max-lg:bottom-[calc(76px+env(safe-area-inset-bottom))] max-lg:min-w-0 max-lg:p-1.5 max-lg:bg-(--card) max-lg:shadow-[0_12px_32px_rgb(0_0_0/0.2),inset_0_0_0_1px_var(--border)] max-lg:backdrop:bg-[rgb(0_0_0/0.36)] max-lg:transition-[opacity,translate,overlay,display] max-lg:scale-100 max-lg:translate-y-4 max-lg:open:translate-y-0 max-lg:starting:open:scale-100 max-lg:starting:open:translate-y-4 max-lg:motion-reduce:translate-y-0 max-lg:motion-reduce:starting:open:translate-y-0';\n\nconst SHEET_ITEM_CLASSES =\n 'flex w-full items-center gap-3 lg:pointer-fine:gap-2.5 min-h-12 lg:min-h-11 lg:pointer-fine:min-h-9 px-3 lg:pointer-fine:px-2.5 rounded-[calc(var(--radius-container)-6px)] lg:rounded-[calc(var(--radius-container)-4px)] text-body lg:pointer-fine:text-label text-left whitespace-nowrap hover:bg-(--glow) focus-visible:bg-(--glow) active:bg-(--soft) transition-[background-color] duration-(--duration-fast) ease-out outline-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--ring) [:where(&>svg)]:size-5 [:where(&>svg)]:flex-none lg:[:where(&>svg)]:size-[18px] lg:pointer-fine:[:where(&>svg)]:size-4';\n\nconst ITEM_CLASSES =\n 'flex w-full items-center gap-3 pointer-fine:gap-2.5 min-h-11 pointer-fine:min-h-9 px-3 pointer-fine:px-2.5 rounded-[calc(var(--radius-container)-4px)] text-body pointer-fine:text-label text-left whitespace-nowrap hover:bg-(--glow) focus-visible:bg-(--glow) active:bg-(--soft) transition-[background-color] duration-(--duration-fast) ease-out outline-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--ring) [:where(&>svg)]:size-[18px] [:where(&>svg)]:flex-none pointer-fine:[:where(&>svg)]:size-4';\n\nconst CHECK_CLASSES =\n \"after:ms-auto after:block after:h-3 after:w-1.5 after:flex-none after:rotate-45 after:border-r-2 after:border-b-2 after:border-current after:content-['']\";\n\nconst nextId = (() => {\n let count = 0;\n\n return () => `ui-menu-${++count}`;\n})();\n\n/**\n * One action of a `ui-menu`; `destructive` paints it in `--negative`. Giving it `checked` makes it a radio\n * choice (`menuitemradio`): the current one carries a check mark and `aria-checked=\"true\"`.\n *\n * @example\n * <button uiMenuItem destructive (click)=\"remove()\">Delete the holding</button>\n * <button uiMenuItem [checked]=\"account() === 'pea'\" (click)=\"account.set('pea')\">Northwind PEA</button>\n */\n@Directive({\n selector: 'button[uiMenuItem]',\n host: {\n '[attr.role]': 'role()',\n '[attr.aria-checked]': 'checked() === undefined ? null : checked()',\n tabindex: '-1',\n '[class]': 'classes()',\n '(click)': 'onClick()',\n },\n})\nexport class UiMenuItem {\n readonly destructive = input(false, { transform: booleanAttribute });\n readonly checked = input<boolean>();\n\n readonly #host = inject<ElementRef<HTMLButtonElement>>(ElementRef).nativeElement;\n readonly #menu = inject(UiMenu);\n\n protected readonly role = computed(() => (this.checked() === undefined ? 'menuitem' : 'menuitemradio'));\n\n protected readonly classes = computed(\n () =>\n `${this.#menu.sheet() ? SHEET_ITEM_CLASSES : ITEM_CLASSES}${this.destructive() ? ' text-(--negative)' : ''}${this.checked() ? ` ${CHECK_CLASSES}` : ''}`,\n );\n\n focus(): void {\n this.#host.focus();\n }\n\n hasFocus(): boolean {\n return this.#host === document.activeElement;\n }\n\n protected onClick(): void {\n this.#menu.close();\n }\n}\n\n/**\n * Secondary actions menu, opened from its trigger through the native Popover API. With `sheet`, below\n * 64rem it opens as a bottom action sheet instead of beside its trigger, and `heading` names what\n * the actions apply to. `width` fixes the popover width in pixels; without it the menu fits its content.\n *\n * @example\n * <button ui-button size=\"icon\" aria-label=\"More\" [uiMenuTrigger]=\"menu\">...</button>\n * <ui-menu #menu label=\"Holding actions\">\n * <button uiMenuItem (click)=\"edit()\">Edit</button>\n * <button uiMenuItem destructive (click)=\"remove()\">Delete the holding</button>\n * </ui-menu>\n */\n@Component({\n selector: 'ui-menu',\n template: `\n @if (sheet() && heading()) {\n <div aria-hidden=\"true\" class=\"text-label px-3 pt-2 pb-1.5 leading-[17px] text-(--muted-foreground) lg:hidden\">\n {{ heading() }}\n </div>\n }\n <ng-content />\n `,\n host: {\n role: 'menu',\n popover: 'auto',\n '[id]': 'menuId',\n '[style.--ui-menu-width]': 'widthVar()',\n '[class]': 'classes()',\n '[attr.aria-label]': 'label()',\n '(toggle)': 'onToggle($event)',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class UiMenu {\n readonly label = input.required<string>();\n readonly sheet = input(false, { transform: booleanAttribute });\n readonly heading = input<string>();\n readonly width = input<number | undefined, unknown>(undefined, { transform: numberAttribute });\n\n readonly menuId = nextId();\n readonly isOpen = signal(false);\n\n protected readonly hasWidth = computed(() => Number.isFinite(this.width()));\n protected readonly widthVar = computed(() => (this.hasWidth() ? `${this.width()}px` : null));\n protected readonly classes = computed(() => {\n const width = !this.hasWidth() ? '' : this.sheet() ? ' lg:w-(--ui-menu-width)' : ' w-(--ui-menu-width)';\n return `${MENU_CLASSES}${this.sheet() ? ` ${SHEET_CLASSES}` : ''}${width}`;\n });\n protected readonly items = contentChildren(UiMenuItem);\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n #trigger: HTMLElement | null = null;\n\n open(trigger: HTMLElement): void {\n this.#trigger = trigger;\n this.isOpen.set(true);\n if (typeof this.#host.showPopover === 'function') {\n this.#host.showPopover();\n }\n if (this.#isSheet()) {\n this.#host.style.position = '';\n this.#host.style.top = '';\n this.#host.style.left = '';\n this.#host.style.right = '';\n this.#host.style.bottom = '';\n } else {\n this.#position(trigger);\n }\n (this.items().find((item) => item.checked()) ?? this.items()[0])?.focus();\n }\n\n close(): void {\n const wasOpen = this.isOpen();\n\n this.#applyClosed();\n\n if (wasOpen && typeof this.#host.hidePopover === 'function') {\n this.#host.hidePopover();\n }\n }\n\n #applyClosed(): void {\n this.isOpen.set(false);\n this.#trigger?.focus();\n this.#trigger = null;\n }\n\n protected onToggle(event: Event): void {\n if ((event as ToggleEvent).newState === 'closed') {\n this.#applyClosed();\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Tab' || event.key === 'Escape') {\n event.preventDefault();\n this.close();\n return;\n }\n\n const items = this.items();\n const currentIndex = items.findIndex((item) => item.hasFocus());\n const lastIndex = items.length - 1;\n\n let nextIndex: number | undefined;\n switch (event.key) {\n case 'ArrowDown':\n nextIndex = currentIndex >= lastIndex ? 0 : currentIndex + 1;\n break;\n case 'ArrowUp':\n nextIndex = currentIndex <= 0 ? lastIndex : currentIndex - 1;\n break;\n case 'Home':\n nextIndex = 0;\n break;\n case 'End':\n nextIndex = lastIndex;\n break;\n }\n\n if (nextIndex === undefined) {\n return;\n }\n event.preventDefault();\n items[nextIndex]?.focus();\n }\n\n #isSheet(): boolean {\n return this.sheet() && typeof window.matchMedia === 'function' && !window.matchMedia('(min-width: 64rem)').matches;\n }\n\n #layoutWidth(): number {\n const style = getComputedStyle(this.#host);\n const width = parseFloat(style.width);\n\n if (Number.isNaN(width)) {\n return this.#host.offsetWidth;\n }\n\n if (style.boxSizing === 'border-box') {\n return width;\n }\n\n return (\n width +\n parseFloat(style.paddingLeft) +\n parseFloat(style.paddingRight) +\n parseFloat(style.borderLeftWidth) +\n parseFloat(style.borderRightWidth)\n );\n }\n\n #position(trigger: HTMLElement): void {\n const margin = 8;\n const triggerRect = trigger.getBoundingClientRect();\n const menuRect = { width: this.#layoutWidth(), height: this.#host.offsetHeight };\n const fitsBelow = window.innerHeight - triggerRect.bottom >= menuRect.height + margin;\n\n const top = fitsBelow ? triggerRect.bottom + 4 : Math.max(margin, triggerRect.top - menuRect.height - 4);\n const left = Math.min(\n Math.max(triggerRect.right - menuRect.width, margin),\n window.innerWidth - menuRect.width - margin,\n );\n\n this.#host.style.position = 'fixed';\n this.#host.style.top = `${Math.min(top, window.innerHeight - menuRect.height - margin)}px`;\n this.#host.style.left = `${left}px`;\n this.#host.style.right = 'auto';\n this.#host.style.bottom = 'auto';\n this.#host.style.transformOrigin = fitsBelow ? 'top right' : 'bottom right';\n }\n}\n\n/**\n * Opens a `ui-menu` from a trigger element and wires its ARIA attributes.\n *\n * @example\n * <button ui-button size=\"icon\" aria-label=\"More\" [uiMenuTrigger]=\"menu\">...</button>\n */\n@Directive({\n selector: '[uiMenuTrigger]',\n host: {\n 'aria-haspopup': 'menu',\n '[attr.aria-expanded]': 'uiMenuTrigger().isOpen()',\n '[attr.aria-controls]': 'uiMenuTrigger().menuId',\n '(click)': 'toggle()',\n },\n})\nexport class UiMenuTrigger {\n readonly uiMenuTrigger = input.required<UiMenu>();\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n protected toggle(): void {\n const menu = this.uiMenuTrigger();\n\n if (menu.isOpen()) {\n menu.close();\n } else {\n menu.open(this.#host);\n }\n }\n}\n"],"mappings":";;AAaA,MAAM,eACJ;AAEF,MAAM,gBACJ;AAEF,MAAM,qBACJ;AAEF,MAAM,eACJ;AAEF,MAAM,gBACJ;AAEF,MAAM,gBAAe;CACnB,IAAI,QAAQ;CAEZ,aAAa,WAAW,EAAE;AAC5B,EAAA,CAAE;AAoBF,IAAa,aAAb,MAAa,WAAU;CACZ,cAAc,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,cAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACxD,UAAU,MAAgB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAE1B,QAAQ,OAAsC,UAAU,CAAC,CAAC;CAC1D,QAAQ,OAAO,MAAM;CAEX,OAAO,eAAgB,KAAK,QAAO,MAAO,SAAY,aAAa,iBAAiB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAEpF,UAAU,eAEzB,GAAG,KAAK,MAAM,MAAK,IAAK,qBAAqB,eAAe,KAAK,YAAW,IAAK,uBAAuB,KAAK,KAAK,QAAO,IAAK,IAAI,kBAAkB,MACvJ,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAED,QAAK;EACH,KAAK,MAAM,MAAK;CAClB;CAEA,WAAQ;EACN,OAAO,KAAK,UAAU,SAAS;CACjC;CAEU,UAAO;EACf,KAAK,MA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AAA,WAAA,gBAAA,CAAA,+BAAA,CAAA,CAAA;CAExC,QAAQ,OAAgC,UAAU,CAAC,CAAC;CAEnD,SAAM;EACd,MAAM,OAAO,KAAK,cAAa;EAE/B,IAAI,KAAK,OAAM,GACb,KAAK,MAAK;OAEV,KAAK,KAAK,KAAK,KAAK;CAExB;CAbW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAa,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAb,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAa,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,eAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,iBAAA,OAAA;GAAA,WAAA,EAAA,SAAA,WAAA;GAAA,YAAA;IAAA,sBAAA;IAAA,sBAAA;GAAA;EAAA;EAAA,UAAA;CAAA,CAAA;;AAAb,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAa,YAAA,CAAA;EATzB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM;IACJ,iBAAiB;IACjB,wBAAwB;IACxB,wBAAwB;IACxB,WAAW;GACZ;EACF,CAAA"}
|
|
@@ -32,7 +32,7 @@ var UiMeter = class UiMeter {
|
|
|
32
32
|
fillClasses = computed(() => `h-full rounded-pill ${TONE_CLASSES[this.tone()]}`, ...ngDevMode ? [{ debugName: "fillClasses" }] : /* istanbul ignore next */ []);
|
|
33
33
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
34
34
|
minVersion: "12.0.0",
|
|
35
|
-
version: "22.2.
|
|
35
|
+
version: "22.2.2",
|
|
36
36
|
ngImport: i0,
|
|
37
37
|
type: UiMeter,
|
|
38
38
|
deps: [],
|
|
@@ -40,7 +40,7 @@ var UiMeter = class UiMeter {
|
|
|
40
40
|
});
|
|
41
41
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
42
42
|
minVersion: "17.1.0",
|
|
43
|
-
version: "22.2.
|
|
43
|
+
version: "22.2.2",
|
|
44
44
|
type: UiMeter,
|
|
45
45
|
isStandalone: true,
|
|
46
46
|
selector: "ui-meter",
|
|
@@ -101,7 +101,7 @@ var UiMeter = class UiMeter {
|
|
|
101
101
|
};
|
|
102
102
|
i0.ɵɵngDeclareClassMetadata({
|
|
103
103
|
minVersion: "12.0.0",
|
|
104
|
-
version: "22.2.
|
|
104
|
+
version: "22.2.2",
|
|
105
105
|
ngImport: i0,
|
|
106
106
|
type: UiMeter,
|
|
107
107
|
decorators: [{
|
|
@@ -25,7 +25,7 @@ var FlipItems = class FlipItems {
|
|
|
25
25
|
}
|
|
26
26
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
27
27
|
minVersion: "12.0.0",
|
|
28
|
-
version: "22.2.
|
|
28
|
+
version: "22.2.2",
|
|
29
29
|
ngImport: i0,
|
|
30
30
|
type: FlipItems,
|
|
31
31
|
deps: [],
|
|
@@ -33,14 +33,14 @@ var FlipItems = class FlipItems {
|
|
|
33
33
|
});
|
|
34
34
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
35
35
|
minVersion: "12.0.0",
|
|
36
|
-
version: "22.2.
|
|
36
|
+
version: "22.2.2",
|
|
37
37
|
ngImport: i0,
|
|
38
38
|
type: FlipItems
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
41
|
i0.ɵɵngDeclareClassMetadata({
|
|
42
42
|
minVersion: "12.0.0",
|
|
43
|
-
version: "22.2.
|
|
43
|
+
version: "22.2.2",
|
|
44
44
|
ngImport: i0,
|
|
45
45
|
type: FlipItems,
|
|
46
46
|
decorators: [{ type: Injectable }]
|
|
@@ -151,7 +151,7 @@ var UiFlipList = class UiFlipList {
|
|
|
151
151
|
}
|
|
152
152
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
153
153
|
minVersion: "12.0.0",
|
|
154
|
-
version: "22.2.
|
|
154
|
+
version: "22.2.2",
|
|
155
155
|
ngImport: i0,
|
|
156
156
|
type: UiFlipList,
|
|
157
157
|
deps: [],
|
|
@@ -159,7 +159,7 @@ var UiFlipList = class UiFlipList {
|
|
|
159
159
|
});
|
|
160
160
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
161
161
|
minVersion: "14.0.0",
|
|
162
|
-
version: "22.2.
|
|
162
|
+
version: "22.2.2",
|
|
163
163
|
type: UiFlipList,
|
|
164
164
|
isStandalone: true,
|
|
165
165
|
selector: "[uiFlipList]",
|
|
@@ -169,7 +169,7 @@ var UiFlipList = class UiFlipList {
|
|
|
169
169
|
};
|
|
170
170
|
i0.ɵɵngDeclareClassMetadata({
|
|
171
171
|
minVersion: "12.0.0",
|
|
172
|
-
version: "22.2.
|
|
172
|
+
version: "22.2.2",
|
|
173
173
|
ngImport: i0,
|
|
174
174
|
type: UiFlipList,
|
|
175
175
|
decorators: [{
|
|
@@ -192,7 +192,7 @@ var UiFlipItem = class UiFlipItem {
|
|
|
192
192
|
}
|
|
193
193
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
194
194
|
minVersion: "12.0.0",
|
|
195
|
-
version: "22.2.
|
|
195
|
+
version: "22.2.2",
|
|
196
196
|
ngImport: i0,
|
|
197
197
|
type: UiFlipItem,
|
|
198
198
|
deps: [],
|
|
@@ -200,7 +200,7 @@ var UiFlipItem = class UiFlipItem {
|
|
|
200
200
|
});
|
|
201
201
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
202
202
|
minVersion: "14.0.0",
|
|
203
|
-
version: "22.2.
|
|
203
|
+
version: "22.2.2",
|
|
204
204
|
type: UiFlipItem,
|
|
205
205
|
isStandalone: true,
|
|
206
206
|
selector: "[uiFlipItem]",
|
|
@@ -209,7 +209,7 @@ var UiFlipItem = class UiFlipItem {
|
|
|
209
209
|
};
|
|
210
210
|
i0.ɵɵngDeclareClassMetadata({
|
|
211
211
|
minVersion: "12.0.0",
|
|
212
|
-
version: "22.2.
|
|
212
|
+
version: "22.2.2",
|
|
213
213
|
ngImport: i0,
|
|
214
214
|
type: UiFlipItem,
|
|
215
215
|
decorators: [{
|
|
@@ -332,7 +332,7 @@ var UiHighlight = class UiHighlight {
|
|
|
332
332
|
}
|
|
333
333
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
334
334
|
minVersion: "12.0.0",
|
|
335
|
-
version: "22.2.
|
|
335
|
+
version: "22.2.2",
|
|
336
336
|
ngImport: i0,
|
|
337
337
|
type: UiHighlight,
|
|
338
338
|
deps: [],
|
|
@@ -340,7 +340,7 @@ var UiHighlight = class UiHighlight {
|
|
|
340
340
|
});
|
|
341
341
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
342
342
|
minVersion: "17.1.0",
|
|
343
|
-
version: "22.2.
|
|
343
|
+
version: "22.2.2",
|
|
344
344
|
type: UiHighlight,
|
|
345
345
|
isStandalone: true,
|
|
346
346
|
selector: "[uiHighlight]",
|
|
@@ -357,7 +357,7 @@ var UiHighlight = class UiHighlight {
|
|
|
357
357
|
};
|
|
358
358
|
i0.ɵɵngDeclareClassMetadata({
|
|
359
359
|
minVersion: "12.0.0",
|
|
360
|
-
version: "22.2.
|
|
360
|
+
version: "22.2.2",
|
|
361
361
|
ngImport: i0,
|
|
362
362
|
type: UiHighlight,
|
|
363
363
|
decorators: [{
|