@tectra-ng/blocks 0.0.0-stage → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/action-tile/README.md +33 -0
- package/actions-menu/README.md +42 -0
- package/app-footer/README.md +30 -0
- package/app-layout/README.md +51 -0
- package/command-palette/README.md +63 -0
- package/console-layout/README.md +70 -0
- package/cookie-notice/README.md +45 -0
- package/empty-state/README.md +35 -0
- package/fesm2022/tectra-ng-blocks-action-tile.mjs +294 -0
- package/fesm2022/tectra-ng-blocks-action-tile.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-actions-menu.mjs +380 -0
- package/fesm2022/tectra-ng-blocks-actions-menu.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-app-footer.mjs +276 -0
- package/fesm2022/tectra-ng-blocks-app-footer.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-app-layout.mjs +544 -0
- package/fesm2022/tectra-ng-blocks-app-layout.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-command-palette.mjs +663 -0
- package/fesm2022/tectra-ng-blocks-command-palette.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-console-layout.mjs +1060 -0
- package/fesm2022/tectra-ng-blocks-console-layout.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-cookie-notice.mjs +416 -0
- package/fesm2022/tectra-ng-blocks-cookie-notice.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-empty-state.mjs +278 -0
- package/fesm2022/tectra-ng-blocks-empty-state.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-filters-panel.mjs +959 -0
- package/fesm2022/tectra-ng-blocks-filters-panel.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-kanban.mjs +864 -0
- package/fesm2022/tectra-ng-blocks-kanban.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-network-status.mjs +303 -0
- package/fesm2022/tectra-ng-blocks-network-status.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-page-header.mjs +195 -0
- package/fesm2022/tectra-ng-blocks-page-header.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-pinned-tabs.mjs +692 -0
- package/fesm2022/tectra-ng-blocks-pinned-tabs.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-public-header.mjs +372 -0
- package/fesm2022/tectra-ng-blocks-public-header.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-qr-code.mjs +487 -0
- package/fesm2022/tectra-ng-blocks-qr-code.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-switch-language.mjs +316 -0
- package/fesm2022/tectra-ng-blocks-switch-language.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-switch-theme.mjs +416 -0
- package/fesm2022/tectra-ng-blocks-switch-theme.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-topbar-preferences.mjs +260 -0
- package/fesm2022/tectra-ng-blocks-topbar-preferences.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks-wizard.mjs +1284 -0
- package/fesm2022/tectra-ng-blocks-wizard.mjs.map +1 -0
- package/fesm2022/tectra-ng-blocks.mjs +4 -0
- package/fesm2022/tectra-ng-blocks.mjs.map +1 -0
- package/filters-panel/README.md +68 -0
- package/kanban/README.md +55 -0
- package/network-status/README.md +33 -0
- package/package.json +137 -3
- package/page-header/README.md +32 -0
- package/pinned-tabs/README.md +42 -0
- package/public-header/README.md +44 -0
- package/qr-code/README.md +52 -0
- package/switch-language/README.md +33 -0
- package/switch-theme/README.md +32 -0
- package/topbar-preferences/README.md +35 -0
- package/types/tectra-ng-blocks-action-tile.d.ts +114 -0
- package/types/tectra-ng-blocks-action-tile.d.ts.map +1 -0
- package/types/tectra-ng-blocks-actions-menu.d.ts +112 -0
- package/types/tectra-ng-blocks-actions-menu.d.ts.map +1 -0
- package/types/tectra-ng-blocks-app-footer.d.ts +111 -0
- package/types/tectra-ng-blocks-app-footer.d.ts.map +1 -0
- package/types/tectra-ng-blocks-app-layout.d.ts +212 -0
- package/types/tectra-ng-blocks-app-layout.d.ts.map +1 -0
- package/types/tectra-ng-blocks-command-palette.d.ts +291 -0
- package/types/tectra-ng-blocks-command-palette.d.ts.map +1 -0
- package/types/tectra-ng-blocks-console-layout.d.ts +454 -0
- package/types/tectra-ng-blocks-console-layout.d.ts.map +1 -0
- package/types/tectra-ng-blocks-cookie-notice.d.ts +168 -0
- package/types/tectra-ng-blocks-cookie-notice.d.ts.map +1 -0
- package/types/tectra-ng-blocks-empty-state.d.ts +138 -0
- package/types/tectra-ng-blocks-empty-state.d.ts.map +1 -0
- package/types/tectra-ng-blocks-filters-panel.d.ts +314 -0
- package/types/tectra-ng-blocks-filters-panel.d.ts.map +1 -0
- package/types/tectra-ng-blocks-kanban.d.ts +260 -0
- package/types/tectra-ng-blocks-kanban.d.ts.map +1 -0
- package/types/tectra-ng-blocks-network-status.d.ts +108 -0
- package/types/tectra-ng-blocks-network-status.d.ts.map +1 -0
- package/types/tectra-ng-blocks-page-header.d.ts +86 -0
- package/types/tectra-ng-blocks-page-header.d.ts.map +1 -0
- package/types/tectra-ng-blocks-pinned-tabs.d.ts +159 -0
- package/types/tectra-ng-blocks-pinned-tabs.d.ts.map +1 -0
- package/types/tectra-ng-blocks-public-header.d.ts +142 -0
- package/types/tectra-ng-blocks-public-header.d.ts.map +1 -0
- package/types/tectra-ng-blocks-qr-code.d.ts +160 -0
- package/types/tectra-ng-blocks-qr-code.d.ts.map +1 -0
- package/types/tectra-ng-blocks-switch-language.d.ts +106 -0
- package/types/tectra-ng-blocks-switch-language.d.ts.map +1 -0
- package/types/tectra-ng-blocks-switch-theme.d.ts +108 -0
- package/types/tectra-ng-blocks-switch-theme.d.ts.map +1 -0
- package/types/tectra-ng-blocks-topbar-preferences.d.ts +103 -0
- package/types/tectra-ng-blocks-topbar-preferences.d.ts.map +1 -0
- package/types/tectra-ng-blocks-wizard.d.ts +682 -0
- package/types/tectra-ng-blocks-wizard.d.ts.map +1 -0
- package/types/tectra-ng-blocks.d.ts +2 -0
- package/types/tectra-ng-blocks.d.ts.map +1 -0
- package/wizard/README.md +77 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, output } from "@angular/core";
|
|
3
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
4
|
+
import { injectTranslations } from "@tectra-ng/core/i18n";
|
|
5
|
+
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
6
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
7
|
+
import { TX_LANGUAGES, TxSwitchLanguage } from "@tectra-ng/blocks/switch-language";
|
|
8
|
+
import { TxSwitchTheme } from "@tectra-ng/blocks/switch-theme";
|
|
9
|
+
var TxTopbarPreferences = class TxTopbarPreferences {
|
|
10
|
+
layout = input("inline", ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
11
|
+
raised = input(false, {
|
|
12
|
+
...ngDevMode ? { debugName: "raised" } : /* istanbul ignore next */ {},
|
|
13
|
+
transform: booleanAttribute
|
|
14
|
+
});
|
|
15
|
+
languages = input(TX_LANGUAGES, ...ngDevMode ? [{ debugName: "languages" }] : /* istanbul ignore next */ []);
|
|
16
|
+
syncLocale = input(true, {
|
|
17
|
+
...ngDevMode ? { debugName: "syncLocale" } : /* istanbul ignore next */ {},
|
|
18
|
+
transform: booleanAttribute
|
|
19
|
+
});
|
|
20
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
21
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
22
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
23
|
+
unstyled = input(void 0, {
|
|
24
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
25
|
+
transform: optionalBoolean
|
|
26
|
+
});
|
|
27
|
+
languageChange = output();
|
|
28
|
+
modeChange = output();
|
|
29
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
30
|
+
passThrough = injectPassThrough("topbarPreferences", this, this.pt, this.ptOptions);
|
|
31
|
+
translations = injectTranslations();
|
|
32
|
+
hostStyle = computed(() => ({
|
|
33
|
+
...toStyleObject(this.dt(), "--tx-topbar-preferences"),
|
|
34
|
+
...this.passThrough().root?.style
|
|
35
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
36
|
+
onLanguage(code) {
|
|
37
|
+
if (code) this.languageChange.emit(code);
|
|
38
|
+
}
|
|
39
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
40
|
+
minVersion: "12.0.0",
|
|
41
|
+
version: "22.2.3",
|
|
42
|
+
ngImport: i0,
|
|
43
|
+
type: TxTopbarPreferences,
|
|
44
|
+
deps: [],
|
|
45
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
46
|
+
});
|
|
47
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
48
|
+
minVersion: "17.0.0",
|
|
49
|
+
version: "22.2.3",
|
|
50
|
+
type: TxTopbarPreferences,
|
|
51
|
+
isStandalone: true,
|
|
52
|
+
selector: "tx-topbar-preferences",
|
|
53
|
+
inputs: {
|
|
54
|
+
layout: {
|
|
55
|
+
classPropertyName: "layout",
|
|
56
|
+
publicName: "layout",
|
|
57
|
+
isSignal: true,
|
|
58
|
+
isRequired: false,
|
|
59
|
+
transformFunction: null
|
|
60
|
+
},
|
|
61
|
+
raised: {
|
|
62
|
+
classPropertyName: "raised",
|
|
63
|
+
publicName: "raised",
|
|
64
|
+
isSignal: true,
|
|
65
|
+
isRequired: false,
|
|
66
|
+
transformFunction: null
|
|
67
|
+
},
|
|
68
|
+
languages: {
|
|
69
|
+
classPropertyName: "languages",
|
|
70
|
+
publicName: "languages",
|
|
71
|
+
isSignal: true,
|
|
72
|
+
isRequired: false,
|
|
73
|
+
transformFunction: null
|
|
74
|
+
},
|
|
75
|
+
syncLocale: {
|
|
76
|
+
classPropertyName: "syncLocale",
|
|
77
|
+
publicName: "syncLocale",
|
|
78
|
+
isSignal: true,
|
|
79
|
+
isRequired: false,
|
|
80
|
+
transformFunction: null
|
|
81
|
+
},
|
|
82
|
+
dt: {
|
|
83
|
+
classPropertyName: "dt",
|
|
84
|
+
publicName: "dt",
|
|
85
|
+
isSignal: true,
|
|
86
|
+
isRequired: false,
|
|
87
|
+
transformFunction: null
|
|
88
|
+
},
|
|
89
|
+
pt: {
|
|
90
|
+
classPropertyName: "pt",
|
|
91
|
+
publicName: "pt",
|
|
92
|
+
isSignal: true,
|
|
93
|
+
isRequired: false,
|
|
94
|
+
transformFunction: null
|
|
95
|
+
},
|
|
96
|
+
ptOptions: {
|
|
97
|
+
classPropertyName: "ptOptions",
|
|
98
|
+
publicName: "ptOptions",
|
|
99
|
+
isSignal: true,
|
|
100
|
+
isRequired: false,
|
|
101
|
+
transformFunction: null
|
|
102
|
+
},
|
|
103
|
+
unstyled: {
|
|
104
|
+
classPropertyName: "unstyled",
|
|
105
|
+
publicName: "unstyled",
|
|
106
|
+
isSignal: true,
|
|
107
|
+
isRequired: false,
|
|
108
|
+
transformFunction: null
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
outputs: {
|
|
112
|
+
languageChange: "languageChange",
|
|
113
|
+
modeChange: "modeChange"
|
|
114
|
+
},
|
|
115
|
+
host: {
|
|
116
|
+
properties: {
|
|
117
|
+
"class": "passThrough().root?.class",
|
|
118
|
+
"style": "hostStyle()",
|
|
119
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
120
|
+
"attr.data-layout": "layout()",
|
|
121
|
+
"class.tx-topbar-preferences--raised": "raised()"
|
|
122
|
+
},
|
|
123
|
+
classAttribute: "tx-topbar-preferences"
|
|
124
|
+
},
|
|
125
|
+
ngImport: i0,
|
|
126
|
+
template: "@if (layout() === 'stacked') {\n <div class=\"tx-topbar-preferences__stack\" [class]=\"passThrough().stack?.class\" [style]=\"passThrough().stack?.style\">\n <div class=\"tx-topbar-preferences__row\" [class]=\"passThrough().row?.class\" [style]=\"passThrough().row?.style\">\n <span class=\"tx-topbar-preferences__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ translations().language }}</span>\n <tx-switch-language\n [languages]=\"languages()\"\n [syncLocale]=\"syncLocale()\"\n [ariaLabel]=\"translations().language\"\n [unstyled]=\"isUnstyled()\"\n (valueChange)=\"onLanguage($event)\"\n />\n </div>\n <div class=\"tx-topbar-preferences__row\" [class]=\"passThrough().row?.class\" [style]=\"passThrough().row?.style\">\n <span class=\"tx-topbar-preferences__label\" aria-hidden=\"true\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ translations().theme }}</span>\n <tx-switch-theme [unstyled]=\"isUnstyled()\" (modeChange)=\"modeChange.emit($event)\" />\n </div>\n </div>\n} @else {\n <div class=\"tx-topbar-preferences__capsule\" [class]=\"passThrough().capsule?.class\" [style]=\"passThrough().capsule?.style\">\n <tx-switch-language\n [languages]=\"languages()\"\n [syncLocale]=\"syncLocale()\"\n [unstyled]=\"isUnstyled()\"\n (valueChange)=\"onLanguage($event)\"\n />\n <span class=\"tx-topbar-preferences__divider\" aria-hidden=\"true\" [class]=\"passThrough().divider?.class\" [style]=\"passThrough().divider?.style\"></span>\n <tx-switch-theme [unstyled]=\"isUnstyled()\" (modeChange)=\"modeChange.emit($event)\" />\n </div>\n}\n",
|
|
127
|
+
styles: [":host{display:inline-flex}:host([data-layout=stacked]){display:flex}.tx-topbar-preferences__capsule{display:inline-flex;align-items:center}.tx-topbar-preferences__stack{display:flex;flex-direction:column;width:100%}.tx-topbar-preferences__row{display:flex;align-items:center;justify-content:space-between}:host([data-styled]) .tx-topbar-preferences__capsule{gap:var(--tx-topbar-preferences-gap);padding:var(--tx-topbar-preferences-padding);border-radius:var(--tx-topbar-preferences-border-radius);background:var(--tx-topbar-preferences-background);box-shadow:inset 0 0 0 1px var(--tx-topbar-preferences-ring-color)}:host([data-styled]) .tx-topbar-preferences__capsule tx-switch-language{--tx-switch-language-height: var(--tx-topbar-preferences-control-size);--tx-switch-language-padding: 0px;--tx-switch-language-background: transparent;--tx-switch-language-ring-color: transparent}:host([data-styled]) .tx-topbar-preferences__capsule tx-switch-theme{--tx-switch-theme-size: var(--tx-topbar-preferences-control-size);--tx-switch-theme-background: transparent;--tx-switch-theme-ring-color: transparent;--tx-switch-theme-shadow: 0 0 transparent;--tx-switch-theme-hover-background: var(--tx-topbar-preferences-theme-hover-background)}:host([data-styled]) .tx-topbar-preferences__divider{width:var(--tx-topbar-preferences-divider-width);height:var(--tx-topbar-preferences-divider-height);background:var(--tx-topbar-preferences-divider-color)}:host([data-styled]) .tx-topbar-preferences__row{gap:var(--tx-topbar-preferences-stacked-gap);padding:var(--tx-topbar-preferences-stacked-row-padding)}:host([data-styled]) .tx-topbar-preferences__label{color:var(--tx-topbar-preferences-stacked-label-color);font-family:var(--tx-font-family);font-size:var(--tx-topbar-preferences-stacked-label-font-size);font-weight:var(--tx-topbar-preferences-stacked-label-font-weight)}:host([data-styled].tx-topbar-preferences--raised) .tx-topbar-preferences__capsule{background:var(--tx-topbar-preferences-raised-background);box-shadow:inset 0 0 0 1px var(--tx-topbar-preferences-raised-ring-color),var(--tx-topbar-preferences-raised-shadow)}:host([data-styled].tx-topbar-preferences--raised) .tx-topbar-preferences__capsule tx-switch-language{--tx-switch-language-thumb-background: var(--tx-topbar-preferences-raised-thumb-background);--tx-switch-language-thumb-ring-color: var(--tx-topbar-preferences-raised-thumb-ring-color);--tx-switch-language-thumb-shadow: 0 0 transparent;--tx-switch-language-option-active-color: var(--tx-topbar-preferences-raised-active-color)}:host([data-styled].tx-topbar-preferences--raised) .tx-topbar-preferences__capsule tx-switch-theme{--tx-switch-theme-hover-background: var(--tx-topbar-preferences-raised-theme-hover-background)}\n"],
|
|
128
|
+
dependencies: [{
|
|
129
|
+
kind: "component",
|
|
130
|
+
type: TxSwitchLanguage,
|
|
131
|
+
selector: "tx-switch-language",
|
|
132
|
+
inputs: [
|
|
133
|
+
"languages",
|
|
134
|
+
"value",
|
|
135
|
+
"syncLocale",
|
|
136
|
+
"ariaLabel",
|
|
137
|
+
"dt",
|
|
138
|
+
"pt",
|
|
139
|
+
"ptOptions",
|
|
140
|
+
"unstyled"
|
|
141
|
+
],
|
|
142
|
+
outputs: ["valueChange"]
|
|
143
|
+
}, {
|
|
144
|
+
kind: "component",
|
|
145
|
+
type: TxSwitchTheme,
|
|
146
|
+
selector: "tx-switch-theme",
|
|
147
|
+
inputs: [
|
|
148
|
+
"revealDuration",
|
|
149
|
+
"revealEasing",
|
|
150
|
+
"dt",
|
|
151
|
+
"pt",
|
|
152
|
+
"ptOptions",
|
|
153
|
+
"unstyled"
|
|
154
|
+
],
|
|
155
|
+
outputs: ["modeChange"]
|
|
156
|
+
}],
|
|
157
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
161
|
+
minVersion: "12.0.0",
|
|
162
|
+
version: "22.2.3",
|
|
163
|
+
ngImport: i0,
|
|
164
|
+
type: TxTopbarPreferences,
|
|
165
|
+
decorators: [{
|
|
166
|
+
type: Component,
|
|
167
|
+
args: [{
|
|
168
|
+
selector: "tx-topbar-preferences",
|
|
169
|
+
imports: [TxSwitchLanguage, TxSwitchTheme],
|
|
170
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
171
|
+
host: {
|
|
172
|
+
class: "tx-topbar-preferences",
|
|
173
|
+
"[class]": "passThrough().root?.class",
|
|
174
|
+
"[style]": "hostStyle()",
|
|
175
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
176
|
+
"[attr.data-layout]": "layout()",
|
|
177
|
+
"[class.tx-topbar-preferences--raised]": "raised()"
|
|
178
|
+
},
|
|
179
|
+
template: "@if (layout() === 'stacked') {\n <div class=\"tx-topbar-preferences__stack\" [class]=\"passThrough().stack?.class\" [style]=\"passThrough().stack?.style\">\n <div class=\"tx-topbar-preferences__row\" [class]=\"passThrough().row?.class\" [style]=\"passThrough().row?.style\">\n <span class=\"tx-topbar-preferences__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ translations().language }}</span>\n <tx-switch-language\n [languages]=\"languages()\"\n [syncLocale]=\"syncLocale()\"\n [ariaLabel]=\"translations().language\"\n [unstyled]=\"isUnstyled()\"\n (valueChange)=\"onLanguage($event)\"\n />\n </div>\n <div class=\"tx-topbar-preferences__row\" [class]=\"passThrough().row?.class\" [style]=\"passThrough().row?.style\">\n <span class=\"tx-topbar-preferences__label\" aria-hidden=\"true\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ translations().theme }}</span>\n <tx-switch-theme [unstyled]=\"isUnstyled()\" (modeChange)=\"modeChange.emit($event)\" />\n </div>\n </div>\n} @else {\n <div class=\"tx-topbar-preferences__capsule\" [class]=\"passThrough().capsule?.class\" [style]=\"passThrough().capsule?.style\">\n <tx-switch-language\n [languages]=\"languages()\"\n [syncLocale]=\"syncLocale()\"\n [unstyled]=\"isUnstyled()\"\n (valueChange)=\"onLanguage($event)\"\n />\n <span class=\"tx-topbar-preferences__divider\" aria-hidden=\"true\" [class]=\"passThrough().divider?.class\" [style]=\"passThrough().divider?.style\"></span>\n <tx-switch-theme [unstyled]=\"isUnstyled()\" (modeChange)=\"modeChange.emit($event)\" />\n </div>\n}\n",
|
|
180
|
+
styles: [":host{display:inline-flex}:host([data-layout=stacked]){display:flex}.tx-topbar-preferences__capsule{display:inline-flex;align-items:center}.tx-topbar-preferences__stack{display:flex;flex-direction:column;width:100%}.tx-topbar-preferences__row{display:flex;align-items:center;justify-content:space-between}:host([data-styled]) .tx-topbar-preferences__capsule{gap:var(--tx-topbar-preferences-gap);padding:var(--tx-topbar-preferences-padding);border-radius:var(--tx-topbar-preferences-border-radius);background:var(--tx-topbar-preferences-background);box-shadow:inset 0 0 0 1px var(--tx-topbar-preferences-ring-color)}:host([data-styled]) .tx-topbar-preferences__capsule tx-switch-language{--tx-switch-language-height: var(--tx-topbar-preferences-control-size);--tx-switch-language-padding: 0px;--tx-switch-language-background: transparent;--tx-switch-language-ring-color: transparent}:host([data-styled]) .tx-topbar-preferences__capsule tx-switch-theme{--tx-switch-theme-size: var(--tx-topbar-preferences-control-size);--tx-switch-theme-background: transparent;--tx-switch-theme-ring-color: transparent;--tx-switch-theme-shadow: 0 0 transparent;--tx-switch-theme-hover-background: var(--tx-topbar-preferences-theme-hover-background)}:host([data-styled]) .tx-topbar-preferences__divider{width:var(--tx-topbar-preferences-divider-width);height:var(--tx-topbar-preferences-divider-height);background:var(--tx-topbar-preferences-divider-color)}:host([data-styled]) .tx-topbar-preferences__row{gap:var(--tx-topbar-preferences-stacked-gap);padding:var(--tx-topbar-preferences-stacked-row-padding)}:host([data-styled]) .tx-topbar-preferences__label{color:var(--tx-topbar-preferences-stacked-label-color);font-family:var(--tx-font-family);font-size:var(--tx-topbar-preferences-stacked-label-font-size);font-weight:var(--tx-topbar-preferences-stacked-label-font-weight)}:host([data-styled].tx-topbar-preferences--raised) .tx-topbar-preferences__capsule{background:var(--tx-topbar-preferences-raised-background);box-shadow:inset 0 0 0 1px var(--tx-topbar-preferences-raised-ring-color),var(--tx-topbar-preferences-raised-shadow)}:host([data-styled].tx-topbar-preferences--raised) .tx-topbar-preferences__capsule tx-switch-language{--tx-switch-language-thumb-background: var(--tx-topbar-preferences-raised-thumb-background);--tx-switch-language-thumb-ring-color: var(--tx-topbar-preferences-raised-thumb-ring-color);--tx-switch-language-thumb-shadow: 0 0 transparent;--tx-switch-language-option-active-color: var(--tx-topbar-preferences-raised-active-color)}:host([data-styled].tx-topbar-preferences--raised) .tx-topbar-preferences__capsule tx-switch-theme{--tx-switch-theme-hover-background: var(--tx-topbar-preferences-raised-theme-hover-background)}\n"]
|
|
181
|
+
}]
|
|
182
|
+
}],
|
|
183
|
+
propDecorators: {
|
|
184
|
+
layout: [{
|
|
185
|
+
type: i0.Input,
|
|
186
|
+
args: [{
|
|
187
|
+
isSignal: true,
|
|
188
|
+
alias: "layout",
|
|
189
|
+
required: false
|
|
190
|
+
}]
|
|
191
|
+
}],
|
|
192
|
+
raised: [{
|
|
193
|
+
type: i0.Input,
|
|
194
|
+
args: [{
|
|
195
|
+
isSignal: true,
|
|
196
|
+
alias: "raised",
|
|
197
|
+
required: false
|
|
198
|
+
}]
|
|
199
|
+
}],
|
|
200
|
+
languages: [{
|
|
201
|
+
type: i0.Input,
|
|
202
|
+
args: [{
|
|
203
|
+
isSignal: true,
|
|
204
|
+
alias: "languages",
|
|
205
|
+
required: false
|
|
206
|
+
}]
|
|
207
|
+
}],
|
|
208
|
+
syncLocale: [{
|
|
209
|
+
type: i0.Input,
|
|
210
|
+
args: [{
|
|
211
|
+
isSignal: true,
|
|
212
|
+
alias: "syncLocale",
|
|
213
|
+
required: false
|
|
214
|
+
}]
|
|
215
|
+
}],
|
|
216
|
+
dt: [{
|
|
217
|
+
type: i0.Input,
|
|
218
|
+
args: [{
|
|
219
|
+
isSignal: true,
|
|
220
|
+
alias: "dt",
|
|
221
|
+
required: false
|
|
222
|
+
}]
|
|
223
|
+
}],
|
|
224
|
+
pt: [{
|
|
225
|
+
type: i0.Input,
|
|
226
|
+
args: [{
|
|
227
|
+
isSignal: true,
|
|
228
|
+
alias: "pt",
|
|
229
|
+
required: false
|
|
230
|
+
}]
|
|
231
|
+
}],
|
|
232
|
+
ptOptions: [{
|
|
233
|
+
type: i0.Input,
|
|
234
|
+
args: [{
|
|
235
|
+
isSignal: true,
|
|
236
|
+
alias: "ptOptions",
|
|
237
|
+
required: false
|
|
238
|
+
}]
|
|
239
|
+
}],
|
|
240
|
+
unstyled: [{
|
|
241
|
+
type: i0.Input,
|
|
242
|
+
args: [{
|
|
243
|
+
isSignal: true,
|
|
244
|
+
alias: "unstyled",
|
|
245
|
+
required: false
|
|
246
|
+
}]
|
|
247
|
+
}],
|
|
248
|
+
languageChange: [{
|
|
249
|
+
type: i0.Output,
|
|
250
|
+
args: ["languageChange"]
|
|
251
|
+
}],
|
|
252
|
+
modeChange: [{
|
|
253
|
+
type: i0.Output,
|
|
254
|
+
args: ["modeChange"]
|
|
255
|
+
}]
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
export { TxTopbarPreferences };
|
|
259
|
+
|
|
260
|
+
//# sourceMappingURL=tectra-ng-blocks-topbar-preferences.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-blocks-topbar-preferences.mjs","names":[],"sources":["../../../../packages/blocks/topbar-preferences/src/topbar-preferences.component.ts","../../../../packages/blocks/topbar-preferences/src/topbar-preferences.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, output } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, TxThemeMode, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraTopbarPreferencesTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TX_LANGUAGES, TxLanguageOption, TxSwitchLanguage } from '@tectra-ng/blocks/switch-language';\nimport { TxSwitchTheme } from '@tectra-ng/blocks/switch-theme';\nimport { TxTopbarPreferencesLayout, TxTopbarPreferencesPart } from './topbar-preferences.types';\n\n@Component({\n selector: 'tx-topbar-preferences',\n imports: [TxSwitchLanguage, TxSwitchTheme],\n templateUrl: './topbar-preferences.component.html',\n styleUrl: './topbar-preferences.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-topbar-preferences',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-layout]': 'layout()',\n '[class.tx-topbar-preferences--raised]': 'raised()',\n },\n})\nexport class TxTopbarPreferences {\n readonly layout = input<TxTopbarPreferencesLayout>('inline');\n readonly raised = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly languages = input<readonly TxLanguageOption[]>(TX_LANGUAGES);\n readonly syncLocale = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraTopbarPreferencesTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTopbarPreferencesPart, TxTopbarPreferences> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly languageChange = output<string>();\n readonly modeChange = output<TxThemeMode>();\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('topbarPreferences', this, this.pt, this.ptOptions);\n protected readonly translations = injectTranslations();\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-topbar-preferences'), ...this.passThrough().root?.style }));\n\n protected onLanguage(code: string | undefined): void {\n if (code) {\n this.languageChange.emit(code);\n }\n }\n}\n","@if (layout() === 'stacked') {\n <div class=\"tx-topbar-preferences__stack\" [class]=\"passThrough().stack?.class\" [style]=\"passThrough().stack?.style\">\n <div class=\"tx-topbar-preferences__row\" [class]=\"passThrough().row?.class\" [style]=\"passThrough().row?.style\">\n <span class=\"tx-topbar-preferences__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ translations().language }}</span>\n <tx-switch-language\n [languages]=\"languages()\"\n [syncLocale]=\"syncLocale()\"\n [ariaLabel]=\"translations().language\"\n [unstyled]=\"isUnstyled()\"\n (valueChange)=\"onLanguage($event)\"\n />\n </div>\n <div class=\"tx-topbar-preferences__row\" [class]=\"passThrough().row?.class\" [style]=\"passThrough().row?.style\">\n <span class=\"tx-topbar-preferences__label\" aria-hidden=\"true\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ translations().theme }}</span>\n <tx-switch-theme [unstyled]=\"isUnstyled()\" (modeChange)=\"modeChange.emit($event)\" />\n </div>\n </div>\n} @else {\n <div class=\"tx-topbar-preferences__capsule\" [class]=\"passThrough().capsule?.class\" [style]=\"passThrough().capsule?.style\">\n <tx-switch-language\n [languages]=\"languages()\"\n [syncLocale]=\"syncLocale()\"\n [unstyled]=\"isUnstyled()\"\n (valueChange)=\"onLanguage($event)\"\n />\n <span class=\"tx-topbar-preferences__divider\" aria-hidden=\"true\" [class]=\"passThrough().divider?.class\" [style]=\"passThrough().divider?.style\"></span>\n <tx-switch-theme [unstyled]=\"isUnstyled()\" (modeChange)=\"modeChange.emit($event)\" />\n </div>\n}\n"],"mappings":";;;;;;;;AAwBA,IAAa,sBAAb,MAAa,oBAAmB;CACrB,SAAS,MAAiC,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACnD,SAAS,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,SAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACrE,YAAY,MAAmC,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAC5D,aAAa,MAAwB,MAAI;EAAA,GAAA,YAAA,EAAA,WAAA,aAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACxE,KAAK,MAAoE,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CACnF,KAAK,MAA+E,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAC9F,YAAY,MAAwC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAC9D,WAAW,MAAoC,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAe,CAAA;CAEtF,iBAAiB,OAAM;CACvB,aAAa,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