@zitadel/components 0.1.0-alpha.11 → 0.1.0-alpha.13
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 +25 -42
- package/dist/atoms/index.d.mts +2 -2
- package/dist/atoms/index.mjs +2 -2
- package/dist/{atoms-BHSt5lSe.mjs → atoms-BSwVl736.mjs} +616 -10
- package/dist/atoms-BSwVl736.mjs.map +1 -0
- package/dist/default-W5MwYLBc.mjs +6 -0
- package/dist/default-W5MwYLBc.mjs.map +1 -0
- package/dist/{index-DVDCrfkv.d.mts → index-D4LkdeFl.d.mts} +798 -78
- package/dist/index-D4LkdeFl.d.mts.map +1 -0
- package/dist/{index-Bv62se8F.d.mts → index-ojrCi-_k.d.mts} +30 -8
- package/dist/index-ojrCi-_k.d.mts.map +1 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/manifests.d.mts.map +1 -1
- package/dist/manifests.mjs +4 -2
- package/dist/manifests.mjs.map +1 -1
- package/dist/orchestrator/index.d.mts +2 -2
- package/dist/orchestrator/index.mjs +2 -2
- package/dist/{orchestrator-BeTmVk54.mjs → orchestrator-SBANwyzM.mjs} +83 -23
- package/dist/orchestrator-SBANwyzM.mjs.map +1 -0
- package/dist/standalone.mjs +707 -30
- package/package.json +2 -5
- package/dist/atoms-BHSt5lSe.mjs.map +0 -1
- package/dist/default-Cpl78hQN.mjs +0 -6
- package/dist/default-Cpl78hQN.mjs.map +0 -1
- package/dist/index-Bv62se8F.d.mts.map +0 -1
- package/dist/index-DVDCrfkv.d.mts.map +0 -1
- package/dist/orchestrator-BeTmVk54.mjs.map +0 -1
package/dist/standalone.mjs
CHANGED
|
@@ -1097,7 +1097,7 @@ const o$1 = e$3(t$2);
|
|
|
1097
1097
|
var icon_host_default = ":host {\n color: inherit;\n display: contents;\n}\n";
|
|
1098
1098
|
//#endregion
|
|
1099
1099
|
//#region ../shared-component-styles/src/icon.css?inline
|
|
1100
|
-
var icon_default = ".zr-icon {\n
|
|
1100
|
+
var icon_default = ".zr-icon {\n width: var(--zl-icon-size, 1.5rem);\n height: var(--zl-icon-size, 1.5rem);\n justify-content: center;\n align-items: center;\n display: inline-flex;\n}\n\n.zr-icon--16 {\n --zl-icon-size: 1rem;\n}\n\n.zr-icon--24 {\n --zl-icon-size: 1.5rem;\n}\n\n.zr-icon--tone-error {\n color: var(--zl-color-icon-error);\n}\n\n.zr-icon--tone-success {\n color: var(--zl-color-icon-success);\n}\n\n.zr-icon--tone-disabled {\n color: var(--zl-color-icon-disabled);\n}\n\n.zr-icon svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.zr-icon--spin svg {\n animation: .8s linear infinite zr-icon-spin;\n}\n\n@keyframes zr-icon-spin {\n to {\n transform: rotate(360deg);\n }\n}\n";
|
|
1101
1101
|
//#endregion
|
|
1102
1102
|
//#region ../../node_modules/.pnpm/lucide@1.16.0/node_modules/lucide/dist/esm/icons/arrow-left.mjs
|
|
1103
1103
|
/**
|
|
@@ -1126,6 +1126,15 @@ const ArrowRight = [["path", { d: "M5 12h14" }], ["path", { d: "m12 5 7 7-7 7" }
|
|
|
1126
1126
|
*/
|
|
1127
1127
|
const Check = [["path", { d: "M20 6 9 17l-5-5" }]];
|
|
1128
1128
|
//#endregion
|
|
1129
|
+
//#region ../../node_modules/.pnpm/lucide@1.16.0/node_modules/lucide/dist/esm/icons/chevron-down.mjs
|
|
1130
|
+
/**
|
|
1131
|
+
* @license lucide v1.16.0 - ISC
|
|
1132
|
+
*
|
|
1133
|
+
* This source code is licensed under the ISC license.
|
|
1134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1135
|
+
*/
|
|
1136
|
+
const ChevronDown = [["path", { d: "m6 9 6 6 6-6" }]];
|
|
1137
|
+
//#endregion
|
|
1129
1138
|
//#region ../../node_modules/.pnpm/lucide@1.16.0/node_modules/lucide/dist/esm/icons/circle-alert.mjs
|
|
1130
1139
|
/**
|
|
1131
1140
|
* @license lucide v1.16.0 - ISC
|
|
@@ -1362,6 +1371,7 @@ const ICON_NODES = {
|
|
|
1362
1371
|
"arrow-left": ArrowLeft,
|
|
1363
1372
|
spinner: LoaderCircle,
|
|
1364
1373
|
check: Check,
|
|
1374
|
+
"chevron-down": ChevronDown,
|
|
1365
1375
|
cross: X,
|
|
1366
1376
|
warning: TriangleAlert,
|
|
1367
1377
|
"alert-circle": CircleAlert,
|
|
@@ -1719,7 +1729,7 @@ const zlButtonManifest = {
|
|
|
1719
1729
|
var card_host_default = ":host {\n width: 100%;\n max-width: var(--zl-container-auth-card, 24rem);\n margin-inline: auto;\n display: block;\n}\n\n.zr-card ::slotted([slot=\"header\"]), .zr-card ::slotted([slot=\"footer\"]) {\n margin: 0;\n}\n";
|
|
1720
1730
|
//#endregion
|
|
1721
1731
|
//#region ../shared-component-styles/src/card.css?inline
|
|
1722
|
-
var card_default = ".zr-card {\n width: 100%;\n max-width: var(--zl-container-auth-card, 24rem);\n border: 1px solid var(--zl-color-surface-default-primary-gray, #252528);\n border-radius: var(--zl-radius-l, 1rem);\n padding: var(--zl-spacing-05, 2rem);\n gap: var(--zl-spacing-05, 2rem);\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n color: var(--zl-color-text-primary-white, #f4f4f6);\n box-sizing: border-box;\n background: none;\n flex-direction: column;\n margin-inline: auto;\n display: flex;\n}\n\n.zr-card--compact {\n gap: var(--zl-spacing-04, 1.5rem);\n}\n\n.zr-card__header, .zr-card__footer {\n gap: var(--zl-spacing-02, .5rem);\n flex-direction: column;\n display: flex;\n}\n\n.zr-card__region--empty {\n display: none;\n}\n\n.zr-card__body {\n gap: var(--zl-spacing-03, 1rem);\n flex-direction: column;\n display: flex;\n}\n";
|
|
1732
|
+
var card_default = ".zr-card {\n width: 100%;\n max-width: var(--zl-container-auth-card, 24rem);\n border: 1px solid var(--zl-color-surface-default-primary-gray, #252528);\n border-radius: var(--zl-radius-l, 1rem);\n padding: var(--zl-spacing-05, 2rem);\n gap: var(--zl-spacing-05, 2rem);\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n color: var(--zl-color-text-primary-white, #f4f4f6);\n box-sizing: border-box;\n background: none;\n flex-direction: column;\n margin-inline: auto;\n line-height: 1.5;\n display: flex;\n}\n\n.zr-card--compact {\n gap: var(--zl-spacing-04, 1.5rem);\n}\n\n.zr-card__header, .zr-card__footer {\n gap: var(--zl-spacing-02, .5rem);\n flex-direction: column;\n display: flex;\n}\n\n.zr-card__region--empty {\n display: none;\n}\n\n.zr-card__body {\n gap: var(--zl-spacing-03, 1rem);\n flex-direction: column;\n display: flex;\n}\n";
|
|
1723
1733
|
//#endregion
|
|
1724
1734
|
//#region src/atoms/zl-card.ts
|
|
1725
1735
|
let ZlCard = class ZlCard extends i$2 {
|
|
@@ -1813,11 +1823,11 @@ const zlCardManifest = {
|
|
|
1813
1823
|
}
|
|
1814
1824
|
});
|
|
1815
1825
|
//#endregion
|
|
1816
|
-
//#region ../shared-component-styles/src/lit/
|
|
1817
|
-
var
|
|
1826
|
+
//#region ../shared-component-styles/src/lit/checkbox-host.css?inline
|
|
1827
|
+
var checkbox_host_default = ":host {\n display: inline-flex;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n}\n";
|
|
1818
1828
|
//#endregion
|
|
1819
|
-
//#region ../shared-component-styles/src/
|
|
1820
|
-
var
|
|
1829
|
+
//#region ../shared-component-styles/src/checkbox.css?inline
|
|
1830
|
+
var checkbox_default = ".zr-checkbox {\n align-items: center;\n gap: var(--zl-spacing-02, .5rem);\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n color: var(--zl-color-text-primary-white, #f4f4f6);\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n line-height: 1.5;\n display: inline-flex;\n}\n\n.zr-checkbox, .zr-checkbox *, .zr-checkbox :before, .zr-checkbox :after {\n box-sizing: border-box;\n}\n\n.zr-checkbox--disabled {\n cursor: not-allowed;\n}\n\n.zr-checkbox__input {\n opacity: 0;\n pointer-events: none;\n border: 0;\n width: 1px;\n height: 1px;\n margin: 0;\n padding: 0;\n position: absolute;\n}\n\n.zr-checkbox__box {\n flex-shrink: 0;\n justify-content: center;\n align-items: center;\n width: 1rem;\n height: 1rem;\n display: inline-flex;\n position: relative;\n}\n\n.zr-checkbox__box:before {\n content: \"\";\n background: var(--zl-color-surface-default-primary-gray, #252528);\n opacity: 0;\n pointer-events: none;\n width: 2rem;\n height: 2rem;\n transition: opacity var(--zl-duration-fast, .12s)\n var(--zl-easing-standard, cubic-bezier(.2, 0, 0, 1));\n border-radius: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.zr-checkbox__face {\n z-index: 1;\n border: 1px solid var(--zl-color-icon-default-white, #f4f4f6);\n width: 1rem;\n height: 1rem;\n transition: border-color var(--zl-duration-fast, .12s) var(--zl-easing-standard, cubic-bezier(.2, 0, 0, 1)),\n background-color var(--zl-duration-fast, .12s) var(--zl-easing-standard, cubic-bezier(.2, 0, 0, 1));\n background: none;\n border-radius: 2px;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n position: relative;\n}\n\n.zr-checkbox__check {\n color: var(--zl-color-surface-default-black, #0f0f11);\n opacity: 0;\n display: inline-flex;\n}\n\n.zr-checkbox__label {\n color: var(--zl-color-text-primary-white, #f4f4f6);\n font-size: .875rem;\n font-weight: 400;\n line-height: 1.25rem;\n}\n\n.zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-color-icon-default-white, #f4f4f6);\n background: var(--zl-color-icon-default-white, #f4f4f6);\n}\n\n.zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__check, .zr-checkbox:not(.zr-checkbox--disabled):hover .zr-checkbox__box:before, .zr-checkbox:not(.zr-checkbox--disabled):active .zr-checkbox__box:before, .zr-checkbox__input:focus-visible + .zr-checkbox__box:before, .zr-checkbox[data-state=\"hovered\"] .zr-checkbox__box:before, .zr-checkbox[data-state=\"focused\"] .zr-checkbox__box:before, .zr-checkbox[data-state=\"pressed\"] .zr-checkbox__box:before {\n opacity: 1;\n}\n\n.zr-checkbox:not(.zr-checkbox--disabled):hover .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"hovered\"] .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-color-icon-default-gray, #bfbfcf);\n}\n\n.zr-checkbox:not(.zr-checkbox--disabled):hover .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"hovered\"] .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-color-icon-default-gray, #bfbfcf);\n background: var(--zl-color-icon-default-gray, #bfbfcf);\n}\n\n.zr-checkbox__input:focus-visible:not(:checked) + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox:not(.zr-checkbox--disabled):active .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"focused\"] .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"pressed\"] .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-color-surface-default-white, #f4f4f6);\n}\n\n.zr-checkbox__input:focus-visible:checked + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox:not(.zr-checkbox--disabled):active .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"focused\"] .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face, .zr-checkbox[data-state=\"pressed\"] .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-color-surface-default-white, #f4f4f6);\n background: var(--zl-color-surface-default-white, #f4f4f6);\n}\n\n.zr-checkbox__input:focus-visible + .zr-checkbox__box .zr-checkbox__face {\n outline: none;\n}\n\n.zr-checkbox--disabled .zr-checkbox__input:not(:checked) + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-color-text-disabled, #686883);\n}\n\n.zr-checkbox--disabled .zr-checkbox__input:checked + .zr-checkbox__box .zr-checkbox__face {\n border-color: var(--zl-color-text-disabled, #686883);\n background: var(--zl-color-text-disabled, #686883);\n}\n\n.zr-checkbox--disabled .zr-checkbox__label {\n color: var(--zl-color-text-disabled, #686883);\n}\n";
|
|
1821
1831
|
//#endregion
|
|
1822
1832
|
//#region src/internal/unique-id.ts
|
|
1823
1833
|
/**
|
|
@@ -1837,6 +1847,215 @@ function nextUid(prefix) {
|
|
|
1837
1847
|
return `${prefix}-${counter}`;
|
|
1838
1848
|
}
|
|
1839
1849
|
//#endregion
|
|
1850
|
+
//#region src/atoms/zl-checkbox.ts
|
|
1851
|
+
let ZlCheckbox = class ZlCheckbox extends i$2 {
|
|
1852
|
+
static formAssociated = true;
|
|
1853
|
+
static shadowRootOptions = {
|
|
1854
|
+
...i$2.shadowRootOptions,
|
|
1855
|
+
delegatesFocus: true
|
|
1856
|
+
};
|
|
1857
|
+
static styles = [baseHostStyles, ...surfaceStyles(checkbox_host_default, checkbox_default)];
|
|
1858
|
+
/**
|
|
1859
|
+
* Field name — used as the key in form submission and in `zl-change` detail.
|
|
1860
|
+
* The browser owns a native `name` property on form-associated elements, so
|
|
1861
|
+
* we manage it manually to avoid a conflicting auto-generated accessor (see
|
|
1862
|
+
* `<zl-field>`).
|
|
1863
|
+
*/
|
|
1864
|
+
get name() {
|
|
1865
|
+
return this.getAttribute("name") ?? "";
|
|
1866
|
+
}
|
|
1867
|
+
set name(value) {
|
|
1868
|
+
this.setAttribute("name", value);
|
|
1869
|
+
}
|
|
1870
|
+
#_label_accessor_storage = "";
|
|
1871
|
+
get label() {
|
|
1872
|
+
return this.#_label_accessor_storage;
|
|
1873
|
+
}
|
|
1874
|
+
set label(value) {
|
|
1875
|
+
this.#_label_accessor_storage = value;
|
|
1876
|
+
}
|
|
1877
|
+
#_value_accessor_storage = "on";
|
|
1878
|
+
get value() {
|
|
1879
|
+
return this.#_value_accessor_storage;
|
|
1880
|
+
}
|
|
1881
|
+
set value(value) {
|
|
1882
|
+
this.#_value_accessor_storage = value;
|
|
1883
|
+
}
|
|
1884
|
+
#_checked_accessor_storage = false;
|
|
1885
|
+
get checked() {
|
|
1886
|
+
return this.#_checked_accessor_storage;
|
|
1887
|
+
}
|
|
1888
|
+
set checked(value) {
|
|
1889
|
+
this.#_checked_accessor_storage = value;
|
|
1890
|
+
}
|
|
1891
|
+
#_disabled_accessor_storage = false;
|
|
1892
|
+
get disabled() {
|
|
1893
|
+
return this.#_disabled_accessor_storage;
|
|
1894
|
+
}
|
|
1895
|
+
set disabled(value) {
|
|
1896
|
+
this.#_disabled_accessor_storage = value;
|
|
1897
|
+
}
|
|
1898
|
+
#_required_accessor_storage = false;
|
|
1899
|
+
get required() {
|
|
1900
|
+
return this.#_required_accessor_storage;
|
|
1901
|
+
}
|
|
1902
|
+
set required(value) {
|
|
1903
|
+
this.#_required_accessor_storage = value;
|
|
1904
|
+
}
|
|
1905
|
+
#_ariaLabelText_accessor_storage = void 0;
|
|
1906
|
+
get ariaLabelText() {
|
|
1907
|
+
return this.#_ariaLabelText_accessor_storage;
|
|
1908
|
+
}
|
|
1909
|
+
set ariaLabelText(value) {
|
|
1910
|
+
this.#_ariaLabelText_accessor_storage = value;
|
|
1911
|
+
}
|
|
1912
|
+
#_testId_accessor_storage = void 0;
|
|
1913
|
+
get testId() {
|
|
1914
|
+
return this.#_testId_accessor_storage;
|
|
1915
|
+
}
|
|
1916
|
+
set testId(value) {
|
|
1917
|
+
this.#_testId_accessor_storage = value;
|
|
1918
|
+
}
|
|
1919
|
+
#_forcedState_accessor_storage = null;
|
|
1920
|
+
get forcedState() {
|
|
1921
|
+
return this.#_forcedState_accessor_storage;
|
|
1922
|
+
}
|
|
1923
|
+
set forcedState(value) {
|
|
1924
|
+
this.#_forcedState_accessor_storage = value;
|
|
1925
|
+
}
|
|
1926
|
+
#_inputEl_accessor_storage = null;
|
|
1927
|
+
get inputEl() {
|
|
1928
|
+
return this.#_inputEl_accessor_storage;
|
|
1929
|
+
}
|
|
1930
|
+
set inputEl(value) {
|
|
1931
|
+
this.#_inputEl_accessor_storage = value;
|
|
1932
|
+
}
|
|
1933
|
+
inputId = nextUid("zl-checkbox");
|
|
1934
|
+
internals;
|
|
1935
|
+
defaultChecked = false;
|
|
1936
|
+
constructor() {
|
|
1937
|
+
super();
|
|
1938
|
+
this.internals = this.attachInternals();
|
|
1939
|
+
}
|
|
1940
|
+
connectedCallback() {
|
|
1941
|
+
super.connectedCallback();
|
|
1942
|
+
this.defaultChecked = this.hasAttribute("checked");
|
|
1943
|
+
this.syncFormState();
|
|
1944
|
+
}
|
|
1945
|
+
willUpdate(changed) {
|
|
1946
|
+
if (changed.has("checked") || changed.has("required") || changed.has("value")) this.syncFormState();
|
|
1947
|
+
}
|
|
1948
|
+
formResetCallback() {
|
|
1949
|
+
this.checked = this.defaultChecked;
|
|
1950
|
+
}
|
|
1951
|
+
formStateRestoreCallback(state) {
|
|
1952
|
+
this.checked = state === this.value;
|
|
1953
|
+
}
|
|
1954
|
+
focus(options) {
|
|
1955
|
+
this.inputEl?.focus(options);
|
|
1956
|
+
}
|
|
1957
|
+
render() {
|
|
1958
|
+
const rootClass = e$2({
|
|
1959
|
+
"zr-checkbox": true,
|
|
1960
|
+
"zr-checkbox--disabled": this.disabled
|
|
1961
|
+
});
|
|
1962
|
+
const labelText = this.label;
|
|
1963
|
+
return b`
|
|
1964
|
+
<label class=${rootClass} part="root" data-state=${this.forcedState ?? A}>
|
|
1965
|
+
<input
|
|
1966
|
+
class="zr-checkbox__input"
|
|
1967
|
+
part="input"
|
|
1968
|
+
id=${this.inputId}
|
|
1969
|
+
type="checkbox"
|
|
1970
|
+
name=${this.name || A}
|
|
1971
|
+
.checked=${l(this.checked)}
|
|
1972
|
+
value=${this.value}
|
|
1973
|
+
?required=${this.required}
|
|
1974
|
+
?disabled=${this.disabled}
|
|
1975
|
+
aria-label=${o(labelText ? void 0 : this.ariaLabelText)}
|
|
1976
|
+
data-testid=${o(this.nativeInputTestId())}
|
|
1977
|
+
@change=${this.handleChange}
|
|
1978
|
+
/>
|
|
1979
|
+
<span class="zr-checkbox__box" part="box">
|
|
1980
|
+
<span class="zr-checkbox__face" part="face">
|
|
1981
|
+
<zl-icon class="zr-checkbox__check" part="check" name="check" size="16" decorative></zl-icon>
|
|
1982
|
+
</span>
|
|
1983
|
+
</span>
|
|
1984
|
+
${labelText ? b`<span class="zr-checkbox__label" part="label">${labelText}</span>` : b`<slot></slot>`}
|
|
1985
|
+
</label>
|
|
1986
|
+
`;
|
|
1987
|
+
}
|
|
1988
|
+
handleChange = (event) => {
|
|
1989
|
+
event.stopPropagation();
|
|
1990
|
+
const input = event.target;
|
|
1991
|
+
this.checked = input.checked;
|
|
1992
|
+
this.syncFormState();
|
|
1993
|
+
emit(this, "zl-change", {
|
|
1994
|
+
name: this.name,
|
|
1995
|
+
checked: this.checked,
|
|
1996
|
+
value: this.value
|
|
1997
|
+
});
|
|
1998
|
+
this.dispatchEvent(new Event("change", {
|
|
1999
|
+
bubbles: true,
|
|
2000
|
+
composed: true
|
|
2001
|
+
}));
|
|
2002
|
+
};
|
|
2003
|
+
syncFormState() {
|
|
2004
|
+
this.internals.setFormValue?.(this.checked ? this.value : null);
|
|
2005
|
+
if (this.required && !this.checked) this.internals.setValidity?.({ valueMissing: true }, "Please check this box to continue.");
|
|
2006
|
+
else this.internals.setValidity?.({});
|
|
2007
|
+
}
|
|
2008
|
+
nativeInputTestId() {
|
|
2009
|
+
if (this.name) return `zitadel-checkbox-${this.name}`;
|
|
2010
|
+
if (this.testId) return `${this.testId}-input`;
|
|
2011
|
+
}
|
|
2012
|
+
};
|
|
2013
|
+
__decorate([n$1()], ZlCheckbox.prototype, "label", null);
|
|
2014
|
+
__decorate([n$1()], ZlCheckbox.prototype, "value", null);
|
|
2015
|
+
__decorate([n$1({
|
|
2016
|
+
type: Boolean,
|
|
2017
|
+
reflect: true
|
|
2018
|
+
})], ZlCheckbox.prototype, "checked", null);
|
|
2019
|
+
__decorate([n$1({
|
|
2020
|
+
type: Boolean,
|
|
2021
|
+
reflect: true
|
|
2022
|
+
})], ZlCheckbox.prototype, "disabled", null);
|
|
2023
|
+
__decorate([n$1({ type: Boolean })], ZlCheckbox.prototype, "required", null);
|
|
2024
|
+
__decorate([n$1({ attribute: "aria-label" })], ZlCheckbox.prototype, "ariaLabelText", null);
|
|
2025
|
+
__decorate([n$1({ attribute: "data-testid" })], ZlCheckbox.prototype, "testId", null);
|
|
2026
|
+
__decorate([n$1({ attribute: "data-state" })], ZlCheckbox.prototype, "forcedState", null);
|
|
2027
|
+
__decorate([e$4(".zr-checkbox__input")], ZlCheckbox.prototype, "inputEl", null);
|
|
2028
|
+
ZlCheckbox = __decorate([t$4("zl-checkbox")], ZlCheckbox);
|
|
2029
|
+
const zlCheckboxManifest = {
|
|
2030
|
+
tag: "zl-checkbox",
|
|
2031
|
+
attrs: [
|
|
2032
|
+
"name",
|
|
2033
|
+
"label",
|
|
2034
|
+
"value",
|
|
2035
|
+
"checked",
|
|
2036
|
+
"disabled",
|
|
2037
|
+
"required",
|
|
2038
|
+
"aria-label",
|
|
2039
|
+
"data-testid"
|
|
2040
|
+
],
|
|
2041
|
+
parts: [
|
|
2042
|
+
"root",
|
|
2043
|
+
"input",
|
|
2044
|
+
"box",
|
|
2045
|
+
"face",
|
|
2046
|
+
"check",
|
|
2047
|
+
"label"
|
|
2048
|
+
],
|
|
2049
|
+
slots: [""],
|
|
2050
|
+
events: ["zl-change"]
|
|
2051
|
+
};
|
|
2052
|
+
//#endregion
|
|
2053
|
+
//#region ../shared-component-styles/src/lit/text-field-host.css?inline
|
|
2054
|
+
var text_field_host_default = ":host {\n display: block;\n}\n\n::slotted([slot=\"prefix\"]), ::slotted([slot=\"suffix\"]) {\n color: var(--zl-color-text-secondary-gray, #bfbfcf);\n display: inline-flex;\n}\n\n.zr-field__help[hidden], .zr-field__error[hidden] {\n display: none;\n}\n\n:host([data-state=\"hovered\"]:not([disabled])) .zr-field:not(.zr-field--invalid):not(.zr-field--success) .zr-field__wrap:not(:focus-within) {\n border-color: var(--zl-color-gray-500, #9e9eb2);\n background-color: color-mix(in srgb, var(--zl-color-text-primary-white, #f4f4f6) 10%, transparent);\n}\n\n:host([data-state=\"focused\"]:not([disabled])) .zr-field:not(.zr-field--invalid):not(.zr-field--success) .zr-field__wrap {\n border-color: var(--zl-color-border-default-white, #f4f4f6);\n}\n\n:host([data-state=\"focused\"]:not([disabled])) .zr-field--invalid .zr-field__wrap {\n border-color: var(--zl-color-border-error, #ea4f70);\n}\n\n:host([data-state=\"focused\"]:not([disabled])) .zr-field--success .zr-field__wrap {\n border-color: var(--zl-color-border-success, #33a779);\n}\n";
|
|
2055
|
+
//#endregion
|
|
2056
|
+
//#region ../shared-component-styles/src/text-field.css?inline
|
|
2057
|
+
var text_field_default = ".zr-field {\n align-items: stretch;\n gap: var(--zl-spacing-02, .5rem);\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n flex-direction: column;\n display: flex;\n}\n\n.zr-field__label-row {\n justify-content: space-between;\n align-items: flex-start;\n gap: var(--zl-spacing-02, .5rem);\n width: 100%;\n display: flex;\n}\n\n.zr-field__label {\n align-items: center;\n gap: var(--zl-spacing-01, .25rem);\n color: var(--zl-color-text-primary-white, #f4f4f6);\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.5rem;\n display: inline-flex;\n}\n\n.zr-field__link {\n color: var(--zl-color-icon-default-purple, #bba5e4);\n flex-shrink: 0;\n font-size: .875rem;\n font-weight: 400;\n line-height: 1.25rem;\n text-decoration: none;\n}\n\n.zr-field__link:hover {\n text-decoration: underline;\n}\n\n.zr-field__link:focus-visible {\n outline: var(--zl-focus-width, 2px) solid var(--zl-focus-color, #f4f4f6);\n outline-offset: var(--zl-focus-offset, 2px);\n border-radius: 2px;\n}\n\n.zr-field__required {\n color: var(--zl-color-text-error, #ea4f70);\n}\n\n.zr-field--disabled .zr-field__label {\n color: var(--zl-color-text-disabled, #686883);\n}\n\n.zr-field__wrap {\n align-items: center;\n gap: var(--zl-spacing-02, .5rem);\n padding-block: var(--zl-spacing-02, .5rem);\n padding-inline: var(--zl-spacing-03, 1rem);\n border-radius: var(--zl-radius-xs, .25rem);\n border: 1px solid var(--zl-color-border-default-gray-300, #686883);\n height: 2.5rem;\n transition: border-color var(--zl-duration-fast, .12s) var(--zl-easing-standard, cubic-bezier(.2, 0, 0, 1)),\n background-color var(--zl-duration-fast, .12s) var(--zl-easing-standard, cubic-bezier(.2, 0, 0, 1));\n box-sizing: border-box;\n background: none;\n display: flex;\n position: relative;\n overflow: visible;\n}\n\n.zr-field__wrap--trailing {\n padding-inline-end: 2.5rem;\n}\n\n.zr-field:not(.zr-field--disabled) .zr-field__wrap:hover:not(:focus-within) {\n border-color: var(--zl-color-gray-500, #9e9eb2);\n background-color: color-mix(in srgb, var(--zl-color-text-primary-white, #f4f4f6) 10%, transparent);\n}\n\n.zr-field:not(.zr-field--invalid):not(.zr-field--disabled):not(.zr-field--success) .zr-field__wrap:has(.zr-field__input:not(:placeholder-shown)):not(:focus-within) {\n border-color: var(--zl-color-border-default-gray-400, #82829c);\n}\n\n.zr-field:not(.zr-field--invalid):not(.zr-field--disabled):not(.zr-field--success) .zr-field__wrap:focus-within {\n border-color: var(--zl-color-border-default-white, #f4f4f6);\n outline: none;\n}\n\n.zr-field--invalid .zr-field__wrap {\n border-color: var(--zl-color-border-error, #ea4f70);\n}\n\n.zr-field--invalid .zr-field__wrap:focus-within {\n border-color: var(--zl-color-border-error, #ea4f70);\n outline: none;\n}\n\n.zr-field--success .zr-field__wrap {\n border-color: var(--zl-color-border-success, #33a779);\n}\n\n.zr-field--success .zr-field__wrap:focus-within {\n border-color: var(--zl-color-border-success, #33a779);\n outline: none;\n}\n\n.zr-field--disabled .zr-field__wrap {\n border-color: var(--zl-color-border-default-gray-200, #484a57);\n}\n\n.zr-field__input {\n min-width: 0;\n height: 100%;\n color: var(--zl-color-text-primary-white, #f4f4f6);\n background: none;\n border: 0;\n outline: none;\n flex: auto;\n padding: 0;\n font-family: inherit;\n font-size: .875rem;\n font-weight: 400;\n line-height: 1.25rem;\n}\n\n.zr-field__input[type=\"password\"] {\n letter-spacing: .125rem;\n}\n\n.zr-field__input::placeholder {\n color: var(--zl-color-text-secondary-gray, #bfbfcf);\n}\n\n.zr-field__input:focus, .zr-field__input:focus-visible {\n outline: none;\n}\n\n.zr-field__input:disabled {\n cursor: not-allowed;\n color: var(--zl-color-text-disabled, #686883);\n}\n\n.zr-field--disabled .zr-field__wrap:hover {\n border-color: var(--zl-color-border-default-gray-200, #484a57);\n background-color: #0000;\n}\n\n.zr-field__trailing {\n width: 1rem;\n height: 1rem;\n color: var(--zl-color-text-secondary-gray, #bfbfcf);\n justify-content: center;\n align-items: center;\n display: inline-flex;\n position: absolute;\n top: 50%;\n right: .9375rem;\n transform: translateY(-50%);\n}\n\n.zr-field__trailing-action {\n color: inherit;\n cursor: pointer;\n background: none;\n border: 0;\n justify-content: center;\n align-items: center;\n margin: 0;\n padding: 0;\n line-height: 0;\n display: inline-flex;\n}\n\n.zr-field__trailing-action:focus-visible {\n outline: var(--zl-focus-width, 2px) solid var(--zl-focus-color, #f4f4f6);\n outline-offset: var(--zl-focus-offset, 2px);\n border-radius: 2px;\n}\n\n.zr-field__trailing-action:disabled {\n cursor: not-allowed;\n}\n\n.zr-field--invalid .zr-field__trailing {\n color: var(--zl-color-text-error, #ea4f70);\n}\n\n.zr-field--success .zr-field__trailing {\n color: var(--zl-color-text-success, #33a779);\n}\n\n.zr-field__help {\n color: var(--zl-color-text-primary-white, #f4f4f6);\n font-size: .75rem;\n line-height: 1rem;\n}\n\n.zr-field__success {\n color: var(--zl-color-text-success, #33a779);\n font-size: .75rem;\n line-height: 1rem;\n}\n\n.zr-field__error {\n color: var(--zl-color-text-error, #ea4f70);\n font-size: .75rem;\n line-height: 1rem;\n}\n";
|
|
2058
|
+
//#endregion
|
|
1840
2059
|
//#region src/atoms/zl-field.ts
|
|
1841
2060
|
let ZlField = class ZlField extends i$2 {
|
|
1842
2061
|
static formAssociated = true;
|
|
@@ -2277,7 +2496,7 @@ const zlFieldManifest = {
|
|
|
2277
2496
|
var page_shell_host_default = ":host {\n background: var(--zl-color-surface-default-black, #0f0f11);\n min-height: 100vh;\n color: var(--zl-color-text-primary-white, #f4f4f6);\n display: block;\n}\n\n:host([data-embedded]) {\n height: 100%;\n min-height: 100%;\n}\n\n:host([data-embedded]) .zr-page-shell {\n min-height: 100%;\n}\n\n.zr-page-shell ::slotted([slot=\"header\"]), .zr-page-shell ::slotted([slot=\"footer\"]) {\n margin: 0;\n}\n";
|
|
2278
2497
|
//#endregion
|
|
2279
2498
|
//#region ../shared-component-styles/src/page-shell.css?inline
|
|
2280
|
-
var page_shell_default = ".zr-page-shell {\n background: var(--zl-color-surface-default-black, #0f0f11);\n min-height: 100vh;\n color: var(--zl-color-text-primary-white, #f4f4f6);\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n justify-content: center;\n align-items: center;\n gap: var(--zl-spacing-04, 1.5rem);\n padding-block: var(--zl-spacing-05, 2rem);\n padding-inline: var(--zl-spacing-03, 1rem);\n box-sizing: border-box;\n flex-direction: column;\n display: flex;\n}\n\n@media (width >= 48rem) {\n .zr-page-shell {\n padding-block: 3.25rem;\n padding-inline: var(--zl-spacing-03, 1rem);\n }\n}\n\n.zr-page-shell__header, .zr-page-shell__main, .zr-page-shell__footer {\n justify-content: center;\n align-items: center;\n width: 100%;\n display: flex;\n}\n\n.zr-page-shell__main {\n flex: none;\n}\n\n.zr-page-shell__footer {\n min-height: 1.5rem;\n}\n\n.zr-page-shell__region--empty {\n display: none;\n}\n\n.zr-page-shell[data-embedded] {\n height: 100%;\n min-height: 100%;\n}\n";
|
|
2499
|
+
var page_shell_default = ".zr-page-shell {\n background: var(--zl-color-surface-default-black, #0f0f11);\n min-height: 100vh;\n color: var(--zl-color-text-primary-white, #f4f4f6);\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n justify-content: center;\n align-items: center;\n gap: var(--zl-spacing-04, 1.5rem);\n padding-block: var(--zl-spacing-05, 2rem);\n padding-inline: var(--zl-spacing-03, 1rem);\n box-sizing: border-box;\n flex-direction: column;\n line-height: 1.5;\n display: flex;\n}\n\n@media (width >= 48rem) {\n .zr-page-shell {\n padding-block: 3.25rem;\n padding-inline: var(--zl-spacing-03, 1rem);\n }\n}\n\n.zr-page-shell__header, .zr-page-shell__main, .zr-page-shell__footer {\n justify-content: center;\n align-items: center;\n width: 100%;\n display: flex;\n}\n\n.zr-page-shell__main {\n flex: none;\n}\n\n.zr-page-shell__footer {\n min-height: 1.5rem;\n}\n\n.zr-page-shell__region--empty {\n display: none;\n}\n\n.zr-page-shell[data-embedded] {\n height: 100%;\n min-height: 100%;\n}\n";
|
|
2281
2500
|
//#endregion
|
|
2282
2501
|
//#region src/atoms/zl-page-shell.ts
|
|
2283
2502
|
let ZlPageShell = class ZlPageShell extends i$2 {
|
|
@@ -2660,6 +2879,402 @@ const zlPillManifest = {
|
|
|
2660
2879
|
events: []
|
|
2661
2880
|
};
|
|
2662
2881
|
//#endregion
|
|
2882
|
+
//#region ../shared-component-styles/src/lit/select-host.css?inline
|
|
2883
|
+
var select_host_default = ":host {\n display: block;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n}\n";
|
|
2884
|
+
//#endregion
|
|
2885
|
+
//#region ../shared-component-styles/src/select.css?inline
|
|
2886
|
+
var select_default = ".zr-select {\n align-items: stretch;\n gap: var(--zl-spacing-02, .5rem);\n font-family: var(--zl-font-family-sans, system-ui, sans-serif);\n color: var(--zl-color-text-primary-white, #f4f4f6);\n flex-direction: column;\n line-height: 1.5;\n display: flex;\n}\n\n.zr-select, .zr-select *, .zr-select :before, .zr-select :after {\n box-sizing: border-box;\n}\n\n.zr-select__label {\n align-items: center;\n gap: var(--zl-spacing-01, .25rem);\n color: var(--zl-color-text-primary-white, #f4f4f6);\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.5rem;\n display: inline-flex;\n}\n\n.zr-select__required {\n color: var(--zl-color-text-error, #ea4f70);\n}\n\n.zr-select--disabled .zr-select__label {\n color: var(--zl-color-text-disabled, #686883);\n}\n\n.zr-select__field {\n position: relative;\n}\n\n.zr-select__trigger {\n align-items: center;\n gap: var(--zl-spacing-02, .5rem);\n width: 100%;\n height: 2.5rem;\n padding-block: var(--zl-spacing-02, .5rem);\n padding-inline: var(--zl-spacing-03, 1rem);\n border-radius: var(--zl-radius-xs, .25rem);\n border: 1px solid var(--zl-color-border-default-gray-300, #686883);\n color: var(--zl-color-text-primary-white, #f4f4f6);\n text-align: start;\n cursor: pointer;\n transition: border-color var(--zl-duration-fast, .12s) var(--zl-easing-standard, cubic-bezier(.2, 0, 0, 1)),\n background-color var(--zl-duration-fast, .12s) var(--zl-easing-standard, cubic-bezier(.2, 0, 0, 1));\n background: none;\n margin: 0;\n font-family: inherit;\n font-size: .875rem;\n font-weight: 400;\n line-height: 1.25rem;\n display: flex;\n}\n\n.zr-select__value {\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n color: var(--zl-color-text-primary-white, #f4f4f6);\n flex: auto;\n overflow: hidden;\n}\n\n.zr-select__value--placeholder {\n color: var(--zl-color-text-secondary-gray, #bfbfcf);\n}\n\n.zr-select__icon {\n color: var(--zl-color-text-secondary-gray, #bfbfcf);\n transition: transform var(--zl-duration-fast, .12s)\n var(--zl-easing-standard, cubic-bezier(.2, 0, 0, 1));\n flex-shrink: 0;\n display: inline-flex;\n}\n\n.zr-select--open .zr-select__icon {\n transform: rotate(180deg);\n}\n\n.zr-select:not(.zr-select--disabled):not(.zr-select--open) .zr-select__trigger:hover {\n border-color: var(--zl-color-gray-500, #9e9eb2);\n background-color: color-mix(in srgb, var(--zl-color-text-primary-white, #f4f4f6) 10%, transparent);\n}\n\n.zr-select:not(.zr-select--disabled) .zr-select__trigger:focus-visible, .zr-select--open .zr-select__trigger {\n border-color: var(--zl-color-border-default-white, #f4f4f6);\n outline: none;\n}\n\n.zr-select--disabled .zr-select__trigger {\n border-color: var(--zl-color-border-default-gray-200, #484a57);\n color: var(--zl-color-text-disabled, #686883);\n cursor: not-allowed;\n}\n\n.zr-select--disabled .zr-select__value--placeholder {\n color: var(--zl-color-text-disabled, #686883);\n}\n\n.zr-select__listbox {\n top: calc(100% + var(--zl-spacing-02, .5rem));\n z-index: 20;\n border-radius: var(--zl-radius-xs, .25rem);\n border: 1px solid var(--zl-color-border-default-gray-200, #484a57);\n background: var(--zl-color-surface-default-black, #0f0f11);\n max-height: 15rem;\n margin: 0;\n padding: 0;\n list-style: none;\n position: absolute;\n left: 0;\n right: 0;\n overflow-y: auto;\n}\n\n.zr-select__listbox[hidden] {\n display: none;\n}\n\n.zr-select__option {\n align-items: center;\n gap: var(--zl-spacing-02, .5rem);\n height: 2.5rem;\n padding-block: var(--zl-spacing-02, .5rem);\n padding-inline: var(--zl-spacing-03, 1rem);\n color: var(--zl-color-text-primary-white, #f4f4f6);\n cursor: pointer;\n font-size: .875rem;\n line-height: 1.25rem;\n display: flex;\n}\n\n.zr-select__option-label {\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: auto;\n min-width: 0;\n overflow: hidden;\n}\n\n.zr-select__option-check {\n color: var(--zl-color-text-primary-white, #f4f4f6);\n opacity: 0;\n flex-shrink: 0;\n display: inline-flex;\n}\n\n.zr-select__option:not([aria-disabled=\"true\"]):hover, .zr-select__option[data-active=\"true\"]:not([aria-disabled=\"true\"]) {\n background-color: color-mix(in srgb, var(--zl-color-text-primary-white, #f4f4f6) 10%, transparent);\n}\n\n.zr-select__option[aria-selected=\"true\"] {\n background-color: var(--zl-color-surface-default-primary-gray, #252528);\n}\n\n.zr-select__option[aria-selected=\"true\"] .zr-select__option-check {\n opacity: 1;\n}\n\n.zr-select__option[aria-disabled=\"true\"] {\n color: var(--zl-color-text-disabled, #686883);\n cursor: not-allowed;\n}\n";
|
|
2887
|
+
//#endregion
|
|
2888
|
+
//#region src/atoms/zl-select.ts
|
|
2889
|
+
let ZlSelect = class ZlSelect extends i$2 {
|
|
2890
|
+
static formAssociated = true;
|
|
2891
|
+
static shadowRootOptions = {
|
|
2892
|
+
...i$2.shadowRootOptions,
|
|
2893
|
+
delegatesFocus: true
|
|
2894
|
+
};
|
|
2895
|
+
static styles = [baseHostStyles, ...surfaceStyles(select_host_default, select_default)];
|
|
2896
|
+
/**
|
|
2897
|
+
* Field name — used as the key in form submission and in `zl-change` detail.
|
|
2898
|
+
* Managed manually to avoid clobbering the native form-associated `name`
|
|
2899
|
+
* accessor the browser owns (see `<zl-field>` / `<zl-checkbox>`).
|
|
2900
|
+
*/
|
|
2901
|
+
get name() {
|
|
2902
|
+
return this.getAttribute("name") ?? "";
|
|
2903
|
+
}
|
|
2904
|
+
set name(value) {
|
|
2905
|
+
this.setAttribute("name", value);
|
|
2906
|
+
}
|
|
2907
|
+
#_label_accessor_storage = "";
|
|
2908
|
+
get label() {
|
|
2909
|
+
return this.#_label_accessor_storage;
|
|
2910
|
+
}
|
|
2911
|
+
set label(value) {
|
|
2912
|
+
this.#_label_accessor_storage = value;
|
|
2913
|
+
}
|
|
2914
|
+
#_value_accessor_storage = "";
|
|
2915
|
+
get value() {
|
|
2916
|
+
return this.#_value_accessor_storage;
|
|
2917
|
+
}
|
|
2918
|
+
set value(value) {
|
|
2919
|
+
this.#_value_accessor_storage = value;
|
|
2920
|
+
}
|
|
2921
|
+
#_placeholder_accessor_storage = "Select…";
|
|
2922
|
+
get placeholder() {
|
|
2923
|
+
return this.#_placeholder_accessor_storage;
|
|
2924
|
+
}
|
|
2925
|
+
set placeholder(value) {
|
|
2926
|
+
this.#_placeholder_accessor_storage = value;
|
|
2927
|
+
}
|
|
2928
|
+
#_options_accessor_storage = [];
|
|
2929
|
+
get options() {
|
|
2930
|
+
return this.#_options_accessor_storage;
|
|
2931
|
+
}
|
|
2932
|
+
set options(value) {
|
|
2933
|
+
this.#_options_accessor_storage = value;
|
|
2934
|
+
}
|
|
2935
|
+
#_required_accessor_storage = false;
|
|
2936
|
+
get required() {
|
|
2937
|
+
return this.#_required_accessor_storage;
|
|
2938
|
+
}
|
|
2939
|
+
set required(value) {
|
|
2940
|
+
this.#_required_accessor_storage = value;
|
|
2941
|
+
}
|
|
2942
|
+
#_disabled_accessor_storage = false;
|
|
2943
|
+
get disabled() {
|
|
2944
|
+
return this.#_disabled_accessor_storage;
|
|
2945
|
+
}
|
|
2946
|
+
set disabled(value) {
|
|
2947
|
+
this.#_disabled_accessor_storage = value;
|
|
2948
|
+
}
|
|
2949
|
+
#_open_accessor_storage = false;
|
|
2950
|
+
get open() {
|
|
2951
|
+
return this.#_open_accessor_storage;
|
|
2952
|
+
}
|
|
2953
|
+
set open(value) {
|
|
2954
|
+
this.#_open_accessor_storage = value;
|
|
2955
|
+
}
|
|
2956
|
+
#_ariaLabelText_accessor_storage = void 0;
|
|
2957
|
+
get ariaLabelText() {
|
|
2958
|
+
return this.#_ariaLabelText_accessor_storage;
|
|
2959
|
+
}
|
|
2960
|
+
set ariaLabelText(value) {
|
|
2961
|
+
this.#_ariaLabelText_accessor_storage = value;
|
|
2962
|
+
}
|
|
2963
|
+
#_testId_accessor_storage = void 0;
|
|
2964
|
+
get testId() {
|
|
2965
|
+
return this.#_testId_accessor_storage;
|
|
2966
|
+
}
|
|
2967
|
+
set testId(value) {
|
|
2968
|
+
this.#_testId_accessor_storage = value;
|
|
2969
|
+
}
|
|
2970
|
+
#_activeIndex_accessor_storage = -1;
|
|
2971
|
+
get activeIndex() {
|
|
2972
|
+
return this.#_activeIndex_accessor_storage;
|
|
2973
|
+
}
|
|
2974
|
+
set activeIndex(value) {
|
|
2975
|
+
this.#_activeIndex_accessor_storage = value;
|
|
2976
|
+
}
|
|
2977
|
+
#_triggerEl_accessor_storage = null;
|
|
2978
|
+
get triggerEl() {
|
|
2979
|
+
return this.#_triggerEl_accessor_storage;
|
|
2980
|
+
}
|
|
2981
|
+
set triggerEl(value) {
|
|
2982
|
+
this.#_triggerEl_accessor_storage = value;
|
|
2983
|
+
}
|
|
2984
|
+
baseId = nextUid("zl-select");
|
|
2985
|
+
internals;
|
|
2986
|
+
defaultValue = "";
|
|
2987
|
+
constructor() {
|
|
2988
|
+
super();
|
|
2989
|
+
this.internals = this.attachInternals();
|
|
2990
|
+
}
|
|
2991
|
+
connectedCallback() {
|
|
2992
|
+
super.connectedCallback();
|
|
2993
|
+
this.defaultValue = this.getAttribute("value") ?? "";
|
|
2994
|
+
this.syncFormState();
|
|
2995
|
+
document.addEventListener("pointerdown", this.handleDocumentPointerDown, true);
|
|
2996
|
+
}
|
|
2997
|
+
disconnectedCallback() {
|
|
2998
|
+
super.disconnectedCallback();
|
|
2999
|
+
document.removeEventListener("pointerdown", this.handleDocumentPointerDown, true);
|
|
3000
|
+
}
|
|
3001
|
+
willUpdate(changed) {
|
|
3002
|
+
if (changed.has("value") || changed.has("required")) this.syncFormState();
|
|
3003
|
+
if (changed.has("disabled") && this.disabled) this.open = false;
|
|
3004
|
+
}
|
|
3005
|
+
formResetCallback() {
|
|
3006
|
+
this.value = this.defaultValue;
|
|
3007
|
+
this.open = false;
|
|
3008
|
+
}
|
|
3009
|
+
formStateRestoreCallback(state) {
|
|
3010
|
+
this.value = state ?? "";
|
|
3011
|
+
}
|
|
3012
|
+
focus(options) {
|
|
3013
|
+
this.triggerEl?.focus(options);
|
|
3014
|
+
}
|
|
3015
|
+
render() {
|
|
3016
|
+
const labelId = `${this.baseId}-label`;
|
|
3017
|
+
const listboxId = `${this.baseId}-listbox`;
|
|
3018
|
+
const selected = this.options.find((option) => option.value === this.value);
|
|
3019
|
+
return b`
|
|
3020
|
+
<div class=${e$2({
|
|
3021
|
+
"zr-select": true,
|
|
3022
|
+
"zr-select--open": this.open,
|
|
3023
|
+
"zr-select--disabled": this.disabled
|
|
3024
|
+
})} part="root">
|
|
3025
|
+
${this.renderLabel(labelId)}
|
|
3026
|
+
<div class="zr-select__field" part="field">
|
|
3027
|
+
<button
|
|
3028
|
+
type="button"
|
|
3029
|
+
class="zr-select__trigger"
|
|
3030
|
+
part="trigger"
|
|
3031
|
+
id=${`${this.baseId}-trigger`}
|
|
3032
|
+
role="combobox"
|
|
3033
|
+
aria-haspopup="listbox"
|
|
3034
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
3035
|
+
aria-controls=${listboxId}
|
|
3036
|
+
aria-labelledby=${this.label ? labelId : A}
|
|
3037
|
+
aria-label=${o(this.label ? void 0 : this.ariaLabelText)}
|
|
3038
|
+
aria-activedescendant=${this.open && this.activeIndex >= 0 ? this.optionId(this.activeIndex) : A}
|
|
3039
|
+
data-testid=${o(this.triggerTestId())}
|
|
3040
|
+
?disabled=${this.disabled}
|
|
3041
|
+
@click=${this.handleTriggerClick}
|
|
3042
|
+
@keydown=${this.handleTriggerKeyDown}
|
|
3043
|
+
>
|
|
3044
|
+
<span
|
|
3045
|
+
class=${e$2({
|
|
3046
|
+
"zr-select__value": true,
|
|
3047
|
+
"zr-select__value--placeholder": !selected
|
|
3048
|
+
})}
|
|
3049
|
+
>
|
|
3050
|
+
${selected ? selected.label : this.placeholder}
|
|
3051
|
+
</span>
|
|
3052
|
+
<zl-icon class="zr-select__icon" name="chevron-down" size="16" decorative></zl-icon>
|
|
3053
|
+
</button>
|
|
3054
|
+
<ul
|
|
3055
|
+
class="zr-select__listbox"
|
|
3056
|
+
part="listbox"
|
|
3057
|
+
id=${listboxId}
|
|
3058
|
+
role="listbox"
|
|
3059
|
+
tabindex="-1"
|
|
3060
|
+
aria-labelledby=${this.label ? labelId : A}
|
|
3061
|
+
?hidden=${!this.open}
|
|
3062
|
+
>
|
|
3063
|
+
${this.options.map((option, index) => this.renderOption(option, index))}
|
|
3064
|
+
</ul>
|
|
3065
|
+
</div>
|
|
3066
|
+
</div>
|
|
3067
|
+
`;
|
|
3068
|
+
}
|
|
3069
|
+
renderLabel(labelId) {
|
|
3070
|
+
if (!this.label) return null;
|
|
3071
|
+
return b`
|
|
3072
|
+
<label class="zr-select__label" part="label" id=${labelId} @click=${this.handleLabelClick}>
|
|
3073
|
+
<span>${this.label}</span>
|
|
3074
|
+
${this.required ? b`<span class="zr-select__required" aria-hidden="true">*</span>` : null}
|
|
3075
|
+
</label>
|
|
3076
|
+
`;
|
|
3077
|
+
}
|
|
3078
|
+
renderOption(option, index) {
|
|
3079
|
+
const isSelected = option.value === this.value;
|
|
3080
|
+
return b`
|
|
3081
|
+
<li
|
|
3082
|
+
class="zr-select__option"
|
|
3083
|
+
part="option"
|
|
3084
|
+
id=${this.optionId(index)}
|
|
3085
|
+
role="option"
|
|
3086
|
+
aria-selected=${isSelected ? "true" : "false"}
|
|
3087
|
+
aria-disabled=${option.disabled ? "true" : A}
|
|
3088
|
+
data-active=${this.open && index === this.activeIndex ? "true" : A}
|
|
3089
|
+
data-value=${option.value}
|
|
3090
|
+
@click=${() => this.handleOptionClick(index)}
|
|
3091
|
+
@pointermove=${() => this.handleOptionPointerMove(index)}
|
|
3092
|
+
>
|
|
3093
|
+
<span class="zr-select__option-label">${option.label}</span>
|
|
3094
|
+
<zl-icon class="zr-select__option-check" name="check" size="16" decorative></zl-icon>
|
|
3095
|
+
</li>
|
|
3096
|
+
`;
|
|
3097
|
+
}
|
|
3098
|
+
optionId(index) {
|
|
3099
|
+
return `${this.baseId}-option-${index}`;
|
|
3100
|
+
}
|
|
3101
|
+
handleLabelClick = () => {
|
|
3102
|
+
if (!this.disabled) this.triggerEl?.focus();
|
|
3103
|
+
};
|
|
3104
|
+
handleTriggerClick = () => {
|
|
3105
|
+
if (this.disabled) return;
|
|
3106
|
+
if (this.open) this.close();
|
|
3107
|
+
else this.openMenu();
|
|
3108
|
+
};
|
|
3109
|
+
handleTriggerKeyDown = (event) => {
|
|
3110
|
+
if (this.disabled) return;
|
|
3111
|
+
switch (event.key) {
|
|
3112
|
+
case "ArrowDown":
|
|
3113
|
+
case "ArrowUp":
|
|
3114
|
+
event.preventDefault();
|
|
3115
|
+
if (!this.open) this.openMenu();
|
|
3116
|
+
else this.moveActive(event.key === "ArrowDown" ? 1 : -1);
|
|
3117
|
+
break;
|
|
3118
|
+
case "Home":
|
|
3119
|
+
if (this.open) {
|
|
3120
|
+
event.preventDefault();
|
|
3121
|
+
this.setActive(this.firstEnabledIndex());
|
|
3122
|
+
}
|
|
3123
|
+
break;
|
|
3124
|
+
case "End":
|
|
3125
|
+
if (this.open) {
|
|
3126
|
+
event.preventDefault();
|
|
3127
|
+
this.setActive(this.lastEnabledIndex());
|
|
3128
|
+
}
|
|
3129
|
+
break;
|
|
3130
|
+
case "Enter":
|
|
3131
|
+
case " ":
|
|
3132
|
+
event.preventDefault();
|
|
3133
|
+
if (this.open) this.commitActive();
|
|
3134
|
+
else this.openMenu();
|
|
3135
|
+
break;
|
|
3136
|
+
case "Escape":
|
|
3137
|
+
if (this.open) {
|
|
3138
|
+
event.preventDefault();
|
|
3139
|
+
this.close();
|
|
3140
|
+
}
|
|
3141
|
+
break;
|
|
3142
|
+
case "Tab":
|
|
3143
|
+
if (this.open) this.close();
|
|
3144
|
+
break;
|
|
3145
|
+
default: break;
|
|
3146
|
+
}
|
|
3147
|
+
};
|
|
3148
|
+
handleOptionClick(index) {
|
|
3149
|
+
if (this.options[index]?.disabled) return;
|
|
3150
|
+
this.setActive(index);
|
|
3151
|
+
this.commitActive();
|
|
3152
|
+
}
|
|
3153
|
+
handleOptionPointerMove(index) {
|
|
3154
|
+
if (!this.options[index]?.disabled && index !== this.activeIndex) this.activeIndex = index;
|
|
3155
|
+
}
|
|
3156
|
+
handleDocumentPointerDown = (event) => {
|
|
3157
|
+
if (this.open && !event.composedPath().includes(this)) this.close();
|
|
3158
|
+
};
|
|
3159
|
+
openMenu() {
|
|
3160
|
+
if (this.options.length === 0) return;
|
|
3161
|
+
this.open = true;
|
|
3162
|
+
const selectedIndex = this.options.findIndex((option) => option.value === this.value);
|
|
3163
|
+
this.activeIndex = selectedIndex >= 0 ? selectedIndex : this.firstEnabledIndex();
|
|
3164
|
+
}
|
|
3165
|
+
close() {
|
|
3166
|
+
if (!this.open) return;
|
|
3167
|
+
this.open = false;
|
|
3168
|
+
this.activeIndex = -1;
|
|
3169
|
+
this.triggerEl?.focus();
|
|
3170
|
+
}
|
|
3171
|
+
commitActive() {
|
|
3172
|
+
const option = this.options[this.activeIndex];
|
|
3173
|
+
if (!option || option.disabled) return;
|
|
3174
|
+
const changed = option.value !== this.value;
|
|
3175
|
+
this.value = option.value;
|
|
3176
|
+
this.open = false;
|
|
3177
|
+
this.activeIndex = -1;
|
|
3178
|
+
this.triggerEl?.focus();
|
|
3179
|
+
this.syncFormState();
|
|
3180
|
+
if (changed) {
|
|
3181
|
+
emit(this, "zl-change", {
|
|
3182
|
+
name: this.name,
|
|
3183
|
+
value: this.value
|
|
3184
|
+
});
|
|
3185
|
+
this.dispatchEvent(new Event("change", {
|
|
3186
|
+
bubbles: true,
|
|
3187
|
+
composed: true
|
|
3188
|
+
}));
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
moveActive(delta) {
|
|
3192
|
+
const count = this.options.length;
|
|
3193
|
+
if (count === 0) return;
|
|
3194
|
+
let next = this.activeIndex;
|
|
3195
|
+
for (let step = 0; step < count; step += 1) {
|
|
3196
|
+
next = (next + delta + count) % count;
|
|
3197
|
+
if (!this.options[next]?.disabled) {
|
|
3198
|
+
this.setActive(next);
|
|
3199
|
+
return;
|
|
3200
|
+
}
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
setActive(index) {
|
|
3204
|
+
if (index >= 0 && index < this.options.length) this.activeIndex = index;
|
|
3205
|
+
}
|
|
3206
|
+
firstEnabledIndex() {
|
|
3207
|
+
return this.options.findIndex((option) => !option.disabled);
|
|
3208
|
+
}
|
|
3209
|
+
lastEnabledIndex() {
|
|
3210
|
+
for (let index = this.options.length - 1; index >= 0; index -= 1) if (!this.options[index]?.disabled) return index;
|
|
3211
|
+
return -1;
|
|
3212
|
+
}
|
|
3213
|
+
syncFormState() {
|
|
3214
|
+
this.internals.setFormValue?.(this.value || null);
|
|
3215
|
+
if (this.required && !this.value) this.internals.setValidity?.({ valueMissing: true }, "Please select an item in the list.", this.triggerEl ?? void 0);
|
|
3216
|
+
else this.internals.setValidity?.({});
|
|
3217
|
+
}
|
|
3218
|
+
triggerTestId() {
|
|
3219
|
+
if (this.name) return `zitadel-select-${this.name}`;
|
|
3220
|
+
if (this.testId) return `${this.testId}-trigger`;
|
|
3221
|
+
}
|
|
3222
|
+
};
|
|
3223
|
+
__decorate([n$1()], ZlSelect.prototype, "label", null);
|
|
3224
|
+
__decorate([n$1()], ZlSelect.prototype, "value", null);
|
|
3225
|
+
__decorate([n$1()], ZlSelect.prototype, "placeholder", null);
|
|
3226
|
+
__decorate([n$1({
|
|
3227
|
+
attribute: "options",
|
|
3228
|
+
converter: { fromAttribute(value) {
|
|
3229
|
+
if (!value) return [];
|
|
3230
|
+
try {
|
|
3231
|
+
const parsed = JSON.parse(value);
|
|
3232
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
3233
|
+
} catch {
|
|
3234
|
+
return [];
|
|
3235
|
+
}
|
|
3236
|
+
} }
|
|
3237
|
+
})], ZlSelect.prototype, "options", null);
|
|
3238
|
+
__decorate([n$1({ type: Boolean })], ZlSelect.prototype, "required", null);
|
|
3239
|
+
__decorate([n$1({
|
|
3240
|
+
type: Boolean,
|
|
3241
|
+
reflect: true
|
|
3242
|
+
})], ZlSelect.prototype, "disabled", null);
|
|
3243
|
+
__decorate([n$1({
|
|
3244
|
+
type: Boolean,
|
|
3245
|
+
reflect: true
|
|
3246
|
+
})], ZlSelect.prototype, "open", null);
|
|
3247
|
+
__decorate([n$1({ attribute: "aria-label" })], ZlSelect.prototype, "ariaLabelText", null);
|
|
3248
|
+
__decorate([n$1({ attribute: "data-testid" })], ZlSelect.prototype, "testId", null);
|
|
3249
|
+
__decorate([r$1()], ZlSelect.prototype, "activeIndex", null);
|
|
3250
|
+
__decorate([e$4(".zr-select__trigger")], ZlSelect.prototype, "triggerEl", null);
|
|
3251
|
+
ZlSelect = __decorate([t$4("zl-select")], ZlSelect);
|
|
3252
|
+
const zlSelectManifest = {
|
|
3253
|
+
tag: "zl-select",
|
|
3254
|
+
attrs: [
|
|
3255
|
+
"name",
|
|
3256
|
+
"label",
|
|
3257
|
+
"value",
|
|
3258
|
+
"placeholder",
|
|
3259
|
+
"options",
|
|
3260
|
+
"required",
|
|
3261
|
+
"disabled",
|
|
3262
|
+
"open",
|
|
3263
|
+
"aria-label",
|
|
3264
|
+
"data-testid"
|
|
3265
|
+
],
|
|
3266
|
+
parts: [
|
|
3267
|
+
"root",
|
|
3268
|
+
"label",
|
|
3269
|
+
"field",
|
|
3270
|
+
"trigger",
|
|
3271
|
+
"listbox",
|
|
3272
|
+
"option"
|
|
3273
|
+
],
|
|
3274
|
+
slots: [],
|
|
3275
|
+
events: ["zl-change"]
|
|
3276
|
+
};
|
|
3277
|
+
//#endregion
|
|
2663
3278
|
//#region ../api/dist/runtime/auth.mjs
|
|
2664
3279
|
/**
|
|
2665
3280
|
* Module-global bearer token used by the orval-generated client's
|
|
@@ -2811,6 +3426,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
2811
3426
|
* OpenAPI spec version: 0.0.1
|
|
2812
3427
|
*/
|
|
2813
3428
|
var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
3429
|
+
activateFlowDefinition: () => activateFlowDefinition,
|
|
2814
3430
|
authorizeDevice: () => authorizeDevice,
|
|
2815
3431
|
authorizeGet: () => authorizeGet,
|
|
2816
3432
|
createAuthAttempt: () => createAuthAttempt,
|
|
@@ -2822,9 +3438,11 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
2822
3438
|
createSession: () => createSession,
|
|
2823
3439
|
createTeam: () => createTeam,
|
|
2824
3440
|
createUser: () => createUser,
|
|
3441
|
+
deactivateFlowDefinition: () => deactivateFlowDefinition,
|
|
2825
3442
|
deleteFlowDefinition: () => deleteFlowDefinition,
|
|
2826
3443
|
endSession: () => endSession,
|
|
2827
3444
|
exchangeHandoff: () => exchangeHandoff,
|
|
3445
|
+
getActivateFlowDefinitionUrl: () => getActivateFlowDefinitionUrl,
|
|
2828
3446
|
getAuthAttempt: () => getAuthAttempt,
|
|
2829
3447
|
getAuthorizeDeviceUrl: () => getAuthorizeDeviceUrl,
|
|
2830
3448
|
getAuthorizeGetUrl: () => getAuthorizeGetUrl,
|
|
@@ -2837,6 +3455,7 @@ var zitadelNextGen_exports = /* @__PURE__ */ __exportAll({
|
|
|
2837
3455
|
getCreateSessionUrl: () => getCreateSessionUrl,
|
|
2838
3456
|
getCreateTeamUrl: () => getCreateTeamUrl,
|
|
2839
3457
|
getCreateUserUrl: () => getCreateUserUrl,
|
|
3458
|
+
getDeactivateFlowDefinitionUrl: () => getDeactivateFlowDefinitionUrl,
|
|
2840
3459
|
getDeleteFlowDefinitionUrl: () => getDeleteFlowDefinitionUrl,
|
|
2841
3460
|
getEndSessionUrl: () => getEndSessionUrl,
|
|
2842
3461
|
getExchangeHandoffUrl: () => getExchangeHandoffUrl,
|
|
@@ -3672,7 +4291,7 @@ const getCreateFlowDefinitionUrl = () => {
|
|
|
3672
4291
|
Flow definitions are templates that define the sequence of steps (capabilities)
|
|
3673
4292
|
for a particular user journey (e.g., registration, login, password reset).
|
|
3674
4293
|
|
|
3675
|
-
Flow definitions are created based on the flow
|
|
4294
|
+
Flow definitions are created based on the flow definition schema, which includes the flow's purpose, audience, and the steps involved.
|
|
3676
4295
|
|
|
3677
4296
|
* @summary Create a new flow definition
|
|
3678
4297
|
*/
|
|
@@ -3734,13 +4353,15 @@ const getUpdateFlowDefinitionUrl = (id, params) => {
|
|
|
3734
4353
|
return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions/${id}?${stringifiedParams}` : `${getProxyPath()}/flow_definitions/${id}`;
|
|
3735
4354
|
};
|
|
3736
4355
|
/**
|
|
3737
|
-
* Update a flow definition by id
|
|
4356
|
+
* Update a flow definition by id. This endpoint replaces the existing flow definition.
|
|
4357
|
+
If `flow_definition.status` is omitted, the current status is preserved
|
|
4358
|
+
|
|
3738
4359
|
* @summary Update a flow definition by id
|
|
3739
4360
|
*/
|
|
3740
4361
|
const updateFlowDefinition = async (id, updateFlowDefinitionBody, params, options) => {
|
|
3741
4362
|
return customFetch(getUpdateFlowDefinitionUrl(id, params), {
|
|
3742
4363
|
...options,
|
|
3743
|
-
method: "
|
|
4364
|
+
method: "PUT",
|
|
3744
4365
|
headers: {
|
|
3745
4366
|
"Content-Type": "application/json",
|
|
3746
4367
|
...options?.headers
|
|
@@ -3757,7 +4378,10 @@ const getDeleteFlowDefinitionUrl = (id, params) => {
|
|
|
3757
4378
|
return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions/${id}?${stringifiedParams}` : `${getProxyPath()}/flow_definitions/${id}`;
|
|
3758
4379
|
};
|
|
3759
4380
|
/**
|
|
3760
|
-
* Delete a flow definition by id
|
|
4381
|
+
* Delete a flow definition by id.
|
|
4382
|
+
If the flow definition is currently being used by a flow, the deletion will fail.
|
|
4383
|
+
If the flow definition is the last active flow definition for a given purpose, the deletion will fail to prevent disruption of new flows being started for that purpose.
|
|
4384
|
+
|
|
3761
4385
|
* @summary Delete a flow definition by id
|
|
3762
4386
|
*/
|
|
3763
4387
|
const deleteFlowDefinition = async (id, params, options) => {
|
|
@@ -3766,6 +4390,47 @@ const deleteFlowDefinition = async (id, params, options) => {
|
|
|
3766
4390
|
method: "DELETE"
|
|
3767
4391
|
});
|
|
3768
4392
|
};
|
|
4393
|
+
const getActivateFlowDefinitionUrl = (id, params) => {
|
|
4394
|
+
const normalizedParams = new URLSearchParams();
|
|
4395
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4396
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
4397
|
+
});
|
|
4398
|
+
const stringifiedParams = normalizedParams.toString();
|
|
4399
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions/${id}/activate?${stringifiedParams}` : `${getProxyPath()}/flow_definitions/${id}/activate`;
|
|
4400
|
+
};
|
|
4401
|
+
/**
|
|
4402
|
+
* Activate a flow definition by transitioning it from a `draft` state to an `active` state.
|
|
4403
|
+
Alternatively, the status of a flow definition can also be set via the `POST /flow_definitions` and `PUT /flow_definitions/{id}` endpoints by setting the `status` attribute in the flow definition payload.
|
|
4404
|
+
|
|
4405
|
+
* @summary Activate a flow definition by ID.
|
|
4406
|
+
*/
|
|
4407
|
+
const activateFlowDefinition = async (id, params, options) => {
|
|
4408
|
+
return customFetch(getActivateFlowDefinitionUrl(id, params), {
|
|
4409
|
+
...options,
|
|
4410
|
+
method: "POST"
|
|
4411
|
+
});
|
|
4412
|
+
};
|
|
4413
|
+
const getDeactivateFlowDefinitionUrl = (id, params) => {
|
|
4414
|
+
const normalizedParams = new URLSearchParams();
|
|
4415
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
4416
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
4417
|
+
});
|
|
4418
|
+
const stringifiedParams = normalizedParams.toString();
|
|
4419
|
+
return stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions/${id}/deactivate?${stringifiedParams}` : `${getProxyPath()}/flow_definitions/${id}/deactivate`;
|
|
4420
|
+
};
|
|
4421
|
+
/**
|
|
4422
|
+
* Deactivates a flow definition in the `active` state by transitioning it to the `draft` state.
|
|
4423
|
+
Flow definitions in `draft` state cannot be used to start new flows. Existing flows that use the deactivated flow definition must gracefully handle this.
|
|
4424
|
+
Alternatively, the status of a flow definition can also be set via the `POST /flow_definitions` and `PUT /flow_definitions/{id}` endpoints by setting the `status` attribute in the flow definition payload.
|
|
4425
|
+
|
|
4426
|
+
* @summary Deactivate a flow definition by ID.
|
|
4427
|
+
*/
|
|
4428
|
+
const deactivateFlowDefinition = async (id, params, options) => {
|
|
4429
|
+
return customFetch(getDeactivateFlowDefinitionUrl(id, params), {
|
|
4430
|
+
...options,
|
|
4431
|
+
method: "POST"
|
|
4432
|
+
});
|
|
4433
|
+
};
|
|
3769
4434
|
const getCreateTeamUrl = (params) => {
|
|
3770
4435
|
const normalizedParams = new URLSearchParams();
|
|
3771
4436
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -8804,7 +9469,7 @@ function lookup(locale, key) {
|
|
|
8804
9469
|
}
|
|
8805
9470
|
//#endregion
|
|
8806
9471
|
//#region src/orchestrator/templates/default.liquid
|
|
8807
|
-
var default_default = "<zl-page-shell data-zl-template-root>\n {% if branding.logo_url %}\n <img slot=\"header\" class=\"zl-card-logo\" src=\"{{ branding.logo_url }}\" alt=\"\" />\n {% endif %}\n <zl-card>\n <h1 slot=\"header\" class=\"zl-card-title\">{{ step.texts.title_key | t: identity.display_name }}</h1>\n {% if step.texts.description_key %}\n {% assign card_subtitle = step.texts.description_key | t: identity.display_name %}\n {% if card_subtitle != \"\" %}\n <p slot=\"header\" class=\"zl-card-subtitle\">{{ card_subtitle }}</p>\n {% endif %}\n {% endif %}\n\n {% if errors and errors.size > 0 %}\n {% for err in errors %}\n {% if err | formLevelError %}\n {% assign alert_heading = err.text_key | alertHeading %}\n {% assign alert_body = err.text_key | alertBody %}\n <zl-alert severity=\"error\"{% if alert_heading != \"\" %} heading=\"{{ alert_heading | t }}\"{% endif %}>\n {% if alert_body != \"\" %}{{ alert_body | t }}{% elsif err.text_key %}{{ err.text_key | t }}{% else %}{{ err.message }}{% endif %}\n </zl-alert>\n {% endif %}\n {% endfor %}\n {% endif %}\n\n {% for f in fields %}\n {% assign field_placeholder = f.text_key | fieldPlaceholder %}\n {% assign field_help = f.text_key | fieldHelp %}\n {% assign field_err = f.name | fieldError: errors %}\n {% assign autocomplete_val = '' %}\n
|
|
9472
|
+
var default_default = "<zl-page-shell data-zl-template-root>\n {% if branding.logo_url %}\n <img slot=\"header\" class=\"zl-card-logo\" src=\"{{ branding.logo_url }}\" alt=\"\" />\n {% endif %}\n <zl-card>\n <h1 slot=\"header\" class=\"zl-card-title\">{{ step.texts.title_key | t: identity.display_name }}</h1>\n {% if step.texts.description_key %}\n {% assign card_subtitle = step.texts.description_key | t: identity.display_name %}\n {% if card_subtitle != \"\" %}\n <p slot=\"header\" class=\"zl-card-subtitle\">{{ card_subtitle }}</p>\n {% endif %}\n {% endif %}\n\n {% if errors and errors.size > 0 %}\n {% for err in errors %}\n {% if err | formLevelError %}\n {% assign alert_heading = err.text_key | alertHeading %}\n {% assign alert_body = err.text_key | alertBody %}\n <zl-alert severity=\"error\"{% if alert_heading != \"\" %} heading=\"{{ alert_heading | t }}\"{% endif %}>\n {% if alert_body != \"\" %}{{ alert_body | t }}{% elsif err.text_key %}{{ err.text_key | t }}{% else %}{{ err.message }}{% endif %}\n </zl-alert>\n {% endif %}\n {% endfor %}\n {% endif %}\n\n {% for f in fields %}\n {% assign field_placeholder = f.text_key | fieldPlaceholder %}\n {% assign field_help = f.text_key | fieldHelp %}\n {% assign field_err = f.name | fieldError: errors %}\n {% case f.type %}\n {% when 'checkbox' %}\n <zl-checkbox\n name=\"{{ f.name }}\"\n data-testid=\"zitadel-field-{{ f.name }}\"\n label=\"{{ f.text_key | t }}\"\n value=\"true\"\n {% if f.value %}checked{% endif %}\n {% if f.required %}required{% endif %}\n ></zl-checkbox>\n {% when 'select' %}\n <zl-select\n name=\"{{ f.name }}\"\n data-testid=\"zitadel-field-{{ f.name }}\"\n label=\"{{ f.text_key | t }}\"\n value=\"{{ f.value }}\"\n options='{{ f.validation.enum | selectOptions | json }}'\n {% if f.required %}required{% endif %}\n {% if field_placeholder != \"\" %}placeholder=\"{{ field_placeholder }}\"{% endif %}\n ></zl-select>\n {% else %}\n {% assign autocomplete_val = '' %}\n {% if f.name == 'email' %}\n {% assign autocomplete_val = 'email' %}\n {% elsif f.type == 'password' and step.name contains 'register' %}\n {% assign autocomplete_val = 'new-password' %}\n {% elsif f.type == 'password' %}\n {% assign autocomplete_val = 'current-password' %}\n {% endif %}\n <zl-field\n name=\"{{ f.name }}\"\n data-testid=\"zitadel-field-{{ f.name }}\"\n label=\"{{ f.text_key | t }}\"\n type=\"{{ f.type }}\"\n value=\"{{ f.value }}\"\n {% if autocomplete_val != '' %}autocomplete=\"{{ autocomplete_val }}\"{% endif %}\n {% if f.required %}required{% endif %}\n {% if field_placeholder != \"\" %}placeholder=\"{{ field_placeholder }}\"{% endif %}\n {% if field_err != \"\" %}invalid error=\"{{ field_err }}\"{% endif %}\n >\n {% if field_help != \"\" %}\n <span slot=\"help\">{{ field_help }}</span>\n {% endif %}\n </zl-field>\n {% endcase %}\n {% endfor %}\n\n {% assign recover = actions | where: \"name\", \"recover\" | first %}\n {% if recover %}\n <p class=\"zl-card-forgot\">\n <a href=\"#\" class=\"zl-card-forgot__link\" data-action=\"recover\">{{ recover.text_key | t }}</a>\n </p>\n {% endif %}\n\n {% for a in actions %}\n {% if a.primary %}\n <zl-button\n hierarchy=\"primary\"\n size=\"medium\"\n type=\"submit\"\n block\n action=\"{{ a.name }}\"\n data-testid=\"zitadel-action-{{ a.name }}\"\n label=\"{{ a.text_key | t }}\"\n {% if loading %}loading{% endif %}\n ></zl-button>\n {% endif %}\n {% endfor %}\n\n {% for a in actions %}\n {% unless a.primary or a.name == 'passkey' or a.name == 'register' or a.name == 'sign_in' or a.name == 'recover' %}\n <zl-button\n hierarchy=\"secondary\"\n size=\"medium\"\n type=\"button\"\n block\n action=\"{{ a.name }}\"\n data-testid=\"zitadel-action-{{ a.name }}\"\n label=\"{{ a.text_key | t }}\"\n ></zl-button>\n {% endunless %}\n {% endfor %}\n\n {% assign passkey = actions | where: \"name\", \"passkey\" | first %}\n {% if passkey %}\n <zl-button\n hierarchy=\"secondary\"\n size=\"medium\"\n block\n action=\"passkey\"\n data-testid=\"zitadel-action-passkey\"\n label=\"{{ passkey.text_key | t }}\"\n ></zl-button>\n {% endif %}\n\n\n {% assign register = actions | where: \"name\", \"register\" | first %}\n {% if register %}\n <p class=\"zl-card-nav\">\n {{ 'identifier.action.register.lead' | t }}<a href=\"#\" class=\"zl-card-nav__link\" data-action=\"register\" data-testid=\"zitadel-action-register-link\">{{ 'identifier.action.register.link' | t }}</a>\n </p>\n {% endif %}\n\n {% assign sign_in = actions | where: \"name\", \"sign_in\" | first %}\n {% if sign_in %}\n <p class=\"zl-card-nav\">\n {{ 'register.action.sign_in.lead' | t }}<a href=\"#\" class=\"zl-card-nav__link\" data-action=\"sign_in\" data-testid=\"zitadel-action-sign_in-link\">{{ 'register.action.sign_in.link' | t }}</a>\n </p>\n {% endif %}\n\n {% if challenge %}\n {% if challenge.method == \"passkey\" or challenge.method == \"passkey_register\" %}\n {% assign ceremony = \"authenticate\" %}\n {% assign submit_method = challenge.method %}\n {% if challenge.method == \"passkey_register\" or challenge.options.user %}\n {% assign ceremony = \"register\" %}\n {% assign submit_method = \"passkey_register\" %}\n {% endif %}\n <zl-passkey\n ceremony=\"{{ ceremony }}\"\n method=\"{{ submit_method }}\"\n challenge-id=\"{{ challenge.challenge_id }}\"\n options='{{ challenge.options | json }}'\n ></zl-passkey>\n {% endif %}\n {% endif %}\n\n {% mandatory_gates %}\n </zl-card>\n</zl-page-shell>\n";
|
|
8808
9473
|
//#endregion
|
|
8809
9474
|
//#region src/orchestrator/liquid.ts
|
|
8810
9475
|
/**
|
|
@@ -8851,6 +9516,22 @@ function createLiquidEngine(options) {
|
|
|
8851
9516
|
const lookupKey = `${stringify(textKey)}.help`;
|
|
8852
9517
|
return options.locale[lookupKey] ?? "";
|
|
8853
9518
|
});
|
|
9519
|
+
/**
|
|
9520
|
+
* Builds `<zl-select>` options from a field's closed `validation.enum`. The
|
|
9521
|
+
* wire only carries the allowed values (strings), so the label defaults to the
|
|
9522
|
+
* value — author the enum with display-ready text. Piped through `| json` into
|
|
9523
|
+
* the element's `options` attribute.
|
|
9524
|
+
*/
|
|
9525
|
+
engine.registerFilter("selectOptions", (values) => {
|
|
9526
|
+
if (!Array.isArray(values)) return [];
|
|
9527
|
+
return values.map((value) => {
|
|
9528
|
+
const v = stringify(value);
|
|
9529
|
+
return {
|
|
9530
|
+
value: v,
|
|
9531
|
+
label: v
|
|
9532
|
+
};
|
|
9533
|
+
});
|
|
9534
|
+
});
|
|
8854
9535
|
/** Maps `error.*` text keys to a field name (Figma inline-error annotations). */
|
|
8855
9536
|
const fieldErrorKeys = {
|
|
8856
9537
|
"error.email_required": "email",
|
|
@@ -8968,12 +9649,10 @@ const en = {
|
|
|
8968
9649
|
"collect-credentials.field.email": "Work email",
|
|
8969
9650
|
"collect-credentials.field.email.placeholder": "you@company.com",
|
|
8970
9651
|
"collect-credentials.field.password": "Password",
|
|
8971
|
-
"collect-credentials.field.password.help": "At least 8 characters, including a symbol and number.",
|
|
8972
9652
|
"collect-credentials.action.submit": "Sign up",
|
|
8973
9653
|
"register-password.title": "Create your password",
|
|
8974
9654
|
"register-password.description": "Choose a secure password for your account",
|
|
8975
9655
|
"register-password.field.password": "Password",
|
|
8976
|
-
"register-password.field.password.help": "At least 8 characters, including a symbol and number.",
|
|
8977
9656
|
"register-password.action.submit": "Sign up",
|
|
8978
9657
|
"passkey-upsell.title": "Sign in faster next time",
|
|
8979
9658
|
"passkey-upsell.description": "No password needed ever again.",
|
|
@@ -9004,12 +9683,12 @@ const en = {
|
|
|
9004
9683
|
"register.field.email": "Work email",
|
|
9005
9684
|
"register.field.email.placeholder": "you@company.com",
|
|
9006
9685
|
"register.field.password": "Password",
|
|
9007
|
-
"register.field.password.help": "At least 8 characters, including a symbol and number.",
|
|
9008
9686
|
"register.field.givenName": "Given name",
|
|
9009
9687
|
"register.field.familyName": "Family name",
|
|
9010
9688
|
"register.field.dateOfBirth": "Date of birth",
|
|
9011
|
-
"register.field.
|
|
9012
|
-
"register.field.
|
|
9689
|
+
"register.field.country": "Country",
|
|
9690
|
+
"register.field.country.placeholder": "Select your country",
|
|
9691
|
+
"register.field.terms": "I agree to the terms of service",
|
|
9013
9692
|
"register.action.password": "Continue with password",
|
|
9014
9693
|
"register.action.passkey": "Continue with a passkey",
|
|
9015
9694
|
"register.action.submit": "Sign up",
|
|
@@ -9069,12 +9748,10 @@ const de = {
|
|
|
9069
9748
|
"collect-credentials.field.email": "E-Mail",
|
|
9070
9749
|
"collect-credentials.field.email.placeholder": "du@unternehmen.com",
|
|
9071
9750
|
"collect-credentials.field.password": "Passwort",
|
|
9072
|
-
"collect-credentials.field.password.help": "Mindestens 8 Zeichen, einschließlich eines Sonderzeichens und einer Zahl.",
|
|
9073
9751
|
"collect-credentials.action.submit": "Registrieren",
|
|
9074
9752
|
"register-password.title": "Passwort erstellen",
|
|
9075
9753
|
"register-password.description": "Wähle ein sicheres Passwort für dein Konto",
|
|
9076
9754
|
"register-password.field.password": "Passwort",
|
|
9077
|
-
"register-password.field.password.help": "Mindestens 8 Zeichen, einschließlich eines Sonderzeichens und einer Zahl.",
|
|
9078
9755
|
"register-password.action.submit": "Registrieren",
|
|
9079
9756
|
"passkey-upsell.title": "Nächstes Mal schneller anmelden",
|
|
9080
9757
|
"passkey-upsell.description": "Kein Passwort mehr nötig.",
|
|
@@ -9105,12 +9782,12 @@ const de = {
|
|
|
9105
9782
|
"register.field.email": "E-Mail",
|
|
9106
9783
|
"register.field.email.placeholder": "du@unternehmen.com",
|
|
9107
9784
|
"register.field.password": "Passwort",
|
|
9108
|
-
"register.field.password.help": "Mindestens 8 Zeichen, einschließlich eines Sonderzeichens und einer Zahl.",
|
|
9109
9785
|
"register.field.givenName": "Vorname",
|
|
9110
9786
|
"register.field.familyName": "Nachname",
|
|
9111
9787
|
"register.field.dateOfBirth": "Geburtsdatum",
|
|
9112
|
-
"register.field.
|
|
9113
|
-
"register.field.
|
|
9788
|
+
"register.field.country": "Land",
|
|
9789
|
+
"register.field.country.placeholder": "Land auswählen",
|
|
9790
|
+
"register.field.terms": "Ich stimme den Nutzungsbedingungen zu",
|
|
9114
9791
|
"register.action.password": "Mit Passwort fortfahren",
|
|
9115
9792
|
"register.action.passkey": "Weiter mit Passkey",
|
|
9116
9793
|
"register.action.submit": "Registrieren",
|
|
@@ -9172,12 +9849,10 @@ const builtinLocales = {
|
|
|
9172
9849
|
"collect-credentials.field.email": "E-mail aziendale",
|
|
9173
9850
|
"collect-credentials.field.email.placeholder": "tu@azienda.com",
|
|
9174
9851
|
"collect-credentials.field.password": "Password",
|
|
9175
|
-
"collect-credentials.field.password.help": "Almeno 8 caratteri, incluso un simbolo e un numero.",
|
|
9176
9852
|
"collect-credentials.action.submit": "Registrati",
|
|
9177
9853
|
"register-password.title": "Crea la tua password",
|
|
9178
9854
|
"register-password.description": "Scegli una password sicura per il tuo account",
|
|
9179
9855
|
"register-password.field.password": "Password",
|
|
9180
|
-
"register-password.field.password.help": "Almeno 8 caratteri, incluso un simbolo e un numero.",
|
|
9181
9856
|
"register-password.action.submit": "Registrati",
|
|
9182
9857
|
"passkey-upsell.title": "Accedi più velocemente la prossima volta",
|
|
9183
9858
|
"passkey-upsell.description": "Nessuna password necessaria.",
|
|
@@ -9208,12 +9883,12 @@ const builtinLocales = {
|
|
|
9208
9883
|
"register.field.email": "E-mail aziendale",
|
|
9209
9884
|
"register.field.email.placeholder": "tu@azienda.com",
|
|
9210
9885
|
"register.field.password": "Password",
|
|
9211
|
-
"register.field.password.help": "Almeno 8 caratteri, incluso un simbolo e un numero.",
|
|
9212
9886
|
"register.field.givenName": "Nome",
|
|
9213
9887
|
"register.field.familyName": "Cognome",
|
|
9214
9888
|
"register.field.dateOfBirth": "Data di nascita",
|
|
9215
|
-
"register.field.
|
|
9216
|
-
"register.field.
|
|
9889
|
+
"register.field.country": "Paese",
|
|
9890
|
+
"register.field.country.placeholder": "Seleziona il tuo paese",
|
|
9891
|
+
"register.field.terms": "Accetto i termini di servizio",
|
|
9217
9892
|
"register.action.password": "Continua con password",
|
|
9218
9893
|
"register.action.passkey": "Continua con passkey",
|
|
9219
9894
|
"register.action.submit": "Registrati",
|
|
@@ -10950,11 +11625,13 @@ const manifestRegistry = [
|
|
|
10950
11625
|
zlAlertManifest,
|
|
10951
11626
|
zlButtonManifest,
|
|
10952
11627
|
zlCardManifest,
|
|
11628
|
+
zlCheckboxManifest,
|
|
10953
11629
|
zlFieldManifest,
|
|
10954
11630
|
zlIconManifest,
|
|
10955
11631
|
zlPageShellManifest,
|
|
10956
11632
|
zlPasskeyManifest,
|
|
10957
|
-
zlPillManifest
|
|
11633
|
+
zlPillManifest,
|
|
11634
|
+
zlSelectManifest
|
|
10958
11635
|
];
|
|
10959
11636
|
function findManifest(tag) {
|
|
10960
11637
|
return manifestRegistry.find((manifest) => manifest.tag === tag);
|
|
@@ -11496,7 +12173,7 @@ let ZitadelLogin = class ZitadelLogin extends i$2 {
|
|
|
11496
12173
|
actions,
|
|
11497
12174
|
gates: step.gates ?? {},
|
|
11498
12175
|
sso_providers: step.sso_providers ?? [],
|
|
11499
|
-
challenge: step.challenge ?? null,
|
|
12176
|
+
challenge: this.loading ? null : step.challenge ?? null,
|
|
11500
12177
|
messages: [],
|
|
11501
12178
|
identity: this.deriveIdentity(),
|
|
11502
12179
|
errors,
|
|
@@ -12184,4 +12861,4 @@ function fillTemplateTokens(fragment, name, email, initial) {
|
|
|
12184
12861
|
}
|
|
12185
12862
|
}
|
|
12186
12863
|
//#endregion
|
|
12187
|
-
export { TEMPLATE_NAMES, ThemeController, ZitadelLogin, ZitadelLogout, ZlAlert, ZlButton, ZlCard, ZlField, ZlIcon, ZlPageShell, ZlPill, applyBrandingTokens, applyFontUrl, baseHostStyles, buildBrandingStylesheet, builtinLocales, createSanitiser, cssVars, de, default_default as defaultTemplate, en, findManifest, focusVisibleStyles, getCurrentStep, layout_chrome_default as layoutChromeCss, listKnownTags, manifestRegistry, patchMandatoryGates, resolveTheme, startFlow, submitStep, t, tokens, validateBranding, zlAlertManifest, zlButtonManifest, zlCardManifest, zlFieldManifest, zlIconManifest, zlPageShellManifest, zlPillManifest };
|
|
12864
|
+
export { TEMPLATE_NAMES, ThemeController, ZitadelLogin, ZitadelLogout, ZlAlert, ZlButton, ZlCard, ZlCheckbox, ZlField, ZlIcon, ZlPageShell, ZlPill, ZlSelect, applyBrandingTokens, applyFontUrl, baseHostStyles, buildBrandingStylesheet, builtinLocales, createSanitiser, cssVars, de, default_default as defaultTemplate, en, findManifest, focusVisibleStyles, getCurrentStep, layout_chrome_default as layoutChromeCss, listKnownTags, manifestRegistry, patchMandatoryGates, resolveTheme, startFlow, submitStep, t, tokens, validateBranding, zlAlertManifest, zlButtonManifest, zlCardManifest, zlCheckboxManifest, zlFieldManifest, zlIconManifest, zlPageShellManifest, zlPillManifest, zlSelectManifest };
|