@warp-ds/elements 2.10.0-next.2 → 2.10.0-next.3

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.
Files changed (56) hide show
  1. package/dist/custom-elements.json +140 -69
  2. package/dist/docs/combobox/accessibility.md +71 -0
  3. package/dist/docs/combobox/api.md +60 -30
  4. package/dist/docs/combobox/combobox.md +203 -30
  5. package/dist/docs/combobox/examples.md +44 -0
  6. package/dist/docs/combobox/usage.md +28 -0
  7. package/dist/docs/icon/accessibility.md +5 -0
  8. package/dist/docs/icon/api.md +37 -0
  9. package/dist/docs/icon/examples.md +45 -0
  10. package/dist/docs/icon/icon.md +107 -0
  11. package/dist/docs/icon/usage.md +11 -0
  12. package/dist/docs/link/api.md +18 -22
  13. package/dist/docs/link/examples.md +75 -0
  14. package/dist/docs/link/link.md +111 -22
  15. package/dist/docs/link/usage.md +18 -0
  16. package/dist/index.d.ts +443 -171
  17. package/dist/packages/affix/affix.js +3 -3
  18. package/dist/packages/affix/affix.js.map +3 -3
  19. package/dist/packages/alert/alert.js +1 -1
  20. package/dist/packages/alert/alert.js.map +3 -3
  21. package/dist/packages/attention/attention.js.map +3 -3
  22. package/dist/packages/button/button.js.map +2 -2
  23. package/dist/packages/checkbox/checkbox.d.ts +40 -11
  24. package/dist/packages/checkbox/checkbox.js.map +2 -2
  25. package/dist/packages/checkbox-group/checkbox-group.d.ts +30 -5
  26. package/dist/packages/checkbox-group/checkbox-group.js.map +2 -2
  27. package/dist/packages/combobox/combobox.a11y.test.js +24 -0
  28. package/dist/packages/combobox/combobox.d.ts +65 -45
  29. package/dist/packages/combobox/combobox.hydration.test.js +39 -1
  30. package/dist/packages/combobox/combobox.js +13 -13
  31. package/dist/packages/combobox/combobox.js.map +3 -3
  32. package/dist/packages/combobox/combobox.stories.js +28 -15
  33. package/dist/packages/combobox/combobox.test.js +110 -0
  34. package/dist/packages/datepicker/datepicker.js.map +3 -3
  35. package/dist/packages/expandable/expandable.js +2 -2
  36. package/dist/packages/expandable/expandable.js.map +3 -3
  37. package/dist/packages/icon/icon.d.ts +13 -3
  38. package/dist/packages/icon/icon.js +2 -2
  39. package/dist/packages/icon/icon.js.map +3 -3
  40. package/dist/packages/icon/icon.react.stories.d.ts +1 -1
  41. package/dist/packages/icon/react.d.ts +2 -2
  42. package/dist/packages/link/link.d.ts +15 -16
  43. package/dist/packages/link/link.js.map +2 -2
  44. package/dist/packages/modal-header/modal-header.js +1 -1
  45. package/dist/packages/modal-header/modal-header.js.map +3 -3
  46. package/dist/packages/pagination/pagination.js.map +3 -3
  47. package/dist/packages/pill/pill.js.map +3 -3
  48. package/dist/packages/select/select.js.map +3 -3
  49. package/dist/packages/step/step.js +1 -1
  50. package/dist/packages/step/step.js.map +3 -3
  51. package/dist/packages/toast/toast.js +3 -3
  52. package/dist/packages/toast/toast.js.map +3 -3
  53. package/dist/packages/toast/toast.stories.d.ts +1 -5
  54. package/dist/packages/toast/toast.stories.js +0 -17
  55. package/dist/web-types.json +129 -72
  56. package/package.json +1 -1
@@ -10,16 +10,41 @@ export declare class WCheckboxGroup extends WCheckboxGroup_base {
10
10
  serializable?: boolean;
11
11
  slotAssignment?: SlotAssignmentMode;
12
12
  };
13
- /** The group label displayed above the checkboxes. */
13
+ /**
14
+ * The group label displayed above the checkboxes.
15
+ *
16
+ * Use this to describe the shared question or topic for the checkbox options. The label is connected to the internal group for assistive technologies.
17
+ */
14
18
  label: string;
15
- /** The name applied to child checkboxes when they do not provide one. */
19
+ /**
20
+ * The name applied to child checkboxes when they do not provide one.
21
+ *
22
+ * Use this when the grouped checkboxes should submit values under the same form field name. Individual checkboxes can still override the group name with their own `name`.
23
+ */
16
24
  name: string;
17
- /** Whether to show optional text next to the label. */
25
+ /**
26
+ * Whether to show optional text next to the label.
27
+ *
28
+ * Use this to indicate that selecting an option from the group is not required.
29
+ */
18
30
  optional: boolean;
31
+ /**
32
+ * Help text displayed below the checkbox group.
33
+ *
34
+ * Use this for supporting guidance or validation feedback. When required validation fails, the group replaces this text with the localized required message.
35
+ */
19
36
  helpText: string;
20
- /** Makes the checkbox group required. */
37
+ /**
38
+ * Whether at least one checkbox in the group must be selected.
39
+ *
40
+ * Required validation is managed by the group. The individual checkboxes provide the submitted form values.
41
+ */
21
42
  required: boolean;
22
- /** Marks the checkbox group as invalid. */
43
+ /**
44
+ * Whether the checkbox group is visually invalid.
45
+ *
46
+ * Use this to show an externally managed validation error for the group. The invalid state is also shared with child checkboxes for consistent styling and accessibility state.
47
+ */
23
48
  invalid: boolean;
24
49
  private _internalTabIndex;
25
50
  static styles: import("lit").CSSResult;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../node_modules/.pnpm/@lingui+core@5.9.5_@lingui+babel-plugin-lingui-macro@5.9.5_typescript@5.9.3_/node_modules/@lingui/core/dist/index.mjs", "../../../node_modules/.pnpm/@open-wc+form-control@1.0.0/node_modules/@open-wc/form-control/src/FormControlMixin.ts", "../../../packages/checkbox-group/checkbox-group.ts", "../../../packages/i18n.ts", "../../../packages/checkbox-group/locales/da/messages.mjs", "../../../packages/checkbox-group/locales/en/messages.mjs", "../../../packages/checkbox-group/locales/fi/messages.mjs", "../../../packages/checkbox-group/locales/nb/messages.mjs", "../../../packages/checkbox-group/locales/sv/messages.mjs"],
4
- "sourcesContent": ["import { compileMessage } from '@lingui/message-utils/compileMessage';\n\nconst isString = (s) => typeof s === \"string\";\nconst isFunction = (f) => typeof f === \"function\";\n\nconst cache = /* @__PURE__ */ new Map();\nconst defaultLocale = \"en\";\nfunction normalizeLocales(locales) {\n const out = Array.isArray(locales) ? locales : [locales];\n return [...out, defaultLocale];\n}\nfunction date(locales, value, format) {\n const _locales = normalizeLocales(locales);\n if (!format) {\n format = \"default\";\n }\n let o;\n if (typeof format === \"string\") {\n o = {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\"\n };\n switch (format) {\n case \"full\":\n o.weekday = \"long\";\n case \"long\":\n o.month = \"long\";\n break;\n case \"short\":\n o.month = \"numeric\";\n break;\n }\n } else {\n o = format;\n }\n const formatter = getMemoized(\n () => cacheKey(\"date\", _locales, format),\n () => new Intl.DateTimeFormat(_locales, o)\n );\n return formatter.format(isString(value) ? new Date(value) : value);\n}\nfunction time(locales, value, format) {\n let o;\n if (!format) {\n format = \"default\";\n }\n if (typeof format === \"string\") {\n o = {\n second: \"numeric\",\n minute: \"numeric\",\n hour: \"numeric\"\n };\n switch (format) {\n case \"full\":\n case \"long\":\n o.timeZoneName = \"short\";\n break;\n case \"short\":\n delete o.second;\n }\n } else {\n o = format;\n }\n return date(locales, value, o);\n}\nfunction number(locales, value, format) {\n const _locales = normalizeLocales(locales);\n const formatter = getMemoized(\n () => cacheKey(\"number\", _locales, format),\n () => new Intl.NumberFormat(_locales, format)\n );\n return formatter.format(value);\n}\nfunction plural(locales, ordinal, value, { offset = 0, ...rules }) {\n const _locales = normalizeLocales(locales);\n const plurals = ordinal ? getMemoized(\n () => cacheKey(\"plural-ordinal\", _locales),\n () => new Intl.PluralRules(_locales, { type: \"ordinal\" })\n ) : getMemoized(\n () => cacheKey(\"plural-cardinal\", _locales),\n () => new Intl.PluralRules(_locales, { type: \"cardinal\" })\n );\n return rules[value] ?? rules[plurals.select(value - offset)] ?? rules.other;\n}\nfunction getMemoized(getKey, construct) {\n const key = getKey();\n let formatter = cache.get(key);\n if (!formatter) {\n formatter = construct();\n cache.set(key, formatter);\n }\n return formatter;\n}\nfunction cacheKey(type, locales, options) {\n const localeKey = locales.join(\"-\");\n return `${type}-${localeKey}-${JSON.stringify(options)}`;\n}\n\nconst formats = {\n __proto__: null,\n date: date,\n defaultLocale: defaultLocale,\n number: number,\n plural: plural,\n time: time\n};\n\nconst ESCAPE_SEQUENCE_REGEX = /\\\\u[a-fA-F0-9]{4}|\\\\x[a-fA-F0-9]{2}/;\nconst decodeEscapeSequences = (str) => {\n return str.replace(\n // Same pattern but with capturing groups for extracting values during replacement\n /\\\\u([a-fA-F0-9]{4})|\\\\x([a-fA-F0-9]{2})/g,\n (_, unicode, hex) => {\n if (unicode) {\n const codePoint = parseInt(unicode, 16);\n return String.fromCharCode(codePoint);\n } else {\n const codePoint = parseInt(hex, 16);\n return String.fromCharCode(codePoint);\n }\n }\n );\n};\n\nconst OCTOTHORPE_PH = \"%__lingui_octothorpe__%\";\nconst getDefaultFormats = (locale, passedLocales, formats = {}) => {\n const locales = passedLocales || locale;\n const style = (format) => {\n if (typeof format === \"object\")\n return format;\n return formats[format];\n };\n const replaceOctothorpe = (value, message) => {\n const numberFormat = Object.keys(formats).length ? style(\"number\") : void 0;\n const valueStr = number(locales, value, numberFormat);\n return message.replace(new RegExp(OCTOTHORPE_PH, \"g\"), valueStr);\n };\n return {\n plural: (value, cases) => {\n const { offset = 0 } = cases;\n const message = plural(locales, false, value, cases);\n return replaceOctothorpe(value - offset, message);\n },\n selectordinal: (value, cases) => {\n const { offset = 0 } = cases;\n const message = plural(locales, true, value, cases);\n return replaceOctothorpe(value - offset, message);\n },\n select: selectFormatter,\n number: (value, format) => number(\n locales,\n value,\n style(format) || { style: format }\n ),\n date: (value, format) => date(locales, value, style(format) || format),\n time: (value, format) => time(locales, value, style(format) || format)\n };\n};\nconst selectFormatter = (value, rules) => rules[value] ?? rules.other;\nfunction interpolate(translation, locale, locales) {\n return (values = {}, formats) => {\n const formatters = getDefaultFormats(locale, locales, formats);\n const formatMessage = (tokens, replaceOctothorpe = false) => {\n if (!Array.isArray(tokens))\n return tokens;\n return tokens.reduce((message, token) => {\n if (token === \"#\" && replaceOctothorpe) {\n return message + OCTOTHORPE_PH;\n }\n if (isString(token)) {\n return message + token;\n }\n const [name, type, format] = token;\n let interpolatedFormat = {};\n if (type === \"plural\" || type === \"selectordinal\" || type === \"select\") {\n Object.entries(format).forEach(\n ([key, value2]) => {\n interpolatedFormat[key] = formatMessage(\n value2,\n type === \"plural\" || type === \"selectordinal\"\n );\n }\n );\n } else {\n interpolatedFormat = format;\n }\n let value;\n if (type) {\n const formatter = formatters[type];\n value = formatter(values[name], interpolatedFormat);\n } else {\n value = values[name];\n }\n if (value == null) {\n return message;\n }\n return message + value;\n }, \"\");\n };\n const result = formatMessage(translation);\n if (isString(result) && ESCAPE_SEQUENCE_REGEX.test(result)) {\n return decodeEscapeSequences(result);\n }\n if (isString(result))\n return result;\n return result ? String(result) : \"\";\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField$1 = (obj, key, value) => {\n __defNormalProp$1(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass EventEmitter {\n constructor() {\n __publicField$1(this, \"_events\", {});\n }\n on(event, listener) {\n var _a;\n (_a = this._events)[event] ?? (_a[event] = []);\n this._events[event].push(listener);\n return () => this.removeListener(event, listener);\n }\n removeListener(event, listener) {\n const maybeListeners = this._getListeners(event);\n if (!maybeListeners)\n return;\n const index = maybeListeners.indexOf(listener);\n if (~index)\n maybeListeners.splice(index, 1);\n }\n emit(event, ...args) {\n const maybeListeners = this._getListeners(event);\n if (!maybeListeners)\n return;\n maybeListeners.map((listener) => listener.apply(this, args));\n }\n _getListeners(event) {\n const maybeListeners = this._events[event];\n return Array.isArray(maybeListeners) ? maybeListeners : false;\n }\n}\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass I18n extends EventEmitter {\n constructor(params) {\n super();\n __publicField(this, \"_locale\", \"\");\n __publicField(this, \"_locales\");\n __publicField(this, \"_localeData\", {});\n __publicField(this, \"_messages\", {});\n __publicField(this, \"_missing\");\n __publicField(this, \"_messageCompiler\");\n /**\n * Alias for {@see I18n._}\n */\n __publicField(this, \"t\", this._.bind(this));\n if (process.env.NODE_ENV !== \"production\") {\n this.setMessagesCompiler(compileMessage);\n }\n if (params.missing != null)\n this._missing = params.missing;\n if (params.messages != null)\n this.load(params.messages);\n if (params.localeData != null)\n this.loadLocaleData(params.localeData);\n if (typeof params.locale === \"string\" || params.locales) {\n this.activate(params.locale ?? defaultLocale, params.locales);\n }\n }\n get locale() {\n return this._locale;\n }\n get locales() {\n return this._locales;\n }\n get messages() {\n return this._messages[this._locale] ?? {};\n }\n /**\n * @deprecated this has no effect. Please remove this from the code. Deprecated in v4\n */\n get localeData() {\n return this._localeData[this._locale] ?? {};\n }\n _loadLocaleData(locale, localeData) {\n const maybeLocaleData = this._localeData[locale];\n if (!maybeLocaleData) {\n this._localeData[locale] = localeData;\n } else {\n Object.assign(maybeLocaleData, localeData);\n }\n }\n /**\n * Registers a `MessageCompiler` to enable the use of uncompiled catalogs at runtime.\n *\n * In production builds, the `MessageCompiler` is typically excluded to reduce bundle size.\n * By default, message catalogs should be precompiled during the build process. However,\n * if you need to compile catalogs at runtime, you can use this method to set a message compiler.\n *\n * Example usage:\n *\n * ```ts\n * import { compileMessage } from \"@lingui/message-utils/compileMessage\";\n *\n * i18n.setMessagesCompiler(compileMessage);\n * ```\n */\n setMessagesCompiler(compiler) {\n this._messageCompiler = compiler;\n return this;\n }\n /**\n * @deprecated Plurals automatically used from Intl.PluralRules you can safely remove this call. Deprecated in v4\n */\n loadLocaleData(localeOrAllData, localeData) {\n if (typeof localeOrAllData === \"string\") {\n this._loadLocaleData(localeOrAllData, localeData);\n } else {\n Object.keys(localeOrAllData).forEach(\n (locale) => this._loadLocaleData(locale, localeOrAllData[locale])\n );\n }\n this.emit(\"change\");\n }\n _load(locale, messages) {\n const maybeMessages = this._messages[locale];\n if (!maybeMessages) {\n this._messages[locale] = messages;\n } else {\n Object.assign(maybeMessages, messages);\n }\n }\n load(localeOrMessages, messages) {\n if (typeof localeOrMessages == \"string\" && typeof messages === \"object\") {\n this._load(localeOrMessages, messages);\n } else {\n Object.entries(localeOrMessages).forEach(\n ([locale, messages2]) => this._load(locale, messages2)\n );\n }\n this.emit(\"change\");\n }\n /**\n * @param options {@link LoadAndActivateOptions}\n */\n loadAndActivate({ locale, locales, messages }) {\n this._locale = locale;\n this._locales = locales || void 0;\n this._messages[this._locale] = messages;\n this.emit(\"change\");\n }\n activate(locale, locales) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!this._messages[locale]) {\n console.warn(`Messages for locale \"${locale}\" not loaded.`);\n }\n }\n this._locale = locale;\n this._locales = locales;\n this.emit(\"change\");\n }\n _(id, values, options) {\n if (!this.locale) {\n throw new Error(\n \"Lingui: Attempted to call a translation function without setting a locale.\\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\\nThis issue may also occur due to a race condition in your initialization logic.\"\n );\n }\n let message = options?.message;\n if (!id) {\n id = \"\";\n }\n if (!isString(id)) {\n values = id.values || values;\n message = id.message;\n id = id.id;\n }\n const messageForId = this.messages[id];\n const messageMissing = messageForId === void 0;\n const missing = this._missing;\n if (missing && messageMissing) {\n return isFunction(missing) ? missing(this._locale, id) : missing;\n }\n if (messageMissing) {\n this.emit(\"missing\", { id, locale: this._locale });\n }\n let translation = messageForId || message || id;\n if (isString(translation)) {\n if (this._messageCompiler) {\n translation = this._messageCompiler(translation);\n } else {\n console.warn(`Uncompiled message detected! Message:\n\n> ${translation}\n\nThat means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.\nICU features such as interpolation and plurals will not work properly for that message. \n\nPlease compile your catalog first. \n`);\n }\n }\n if (isString(translation) && ESCAPE_SEQUENCE_REGEX.test(translation))\n return decodeEscapeSequences(translation);\n if (isString(translation))\n return translation;\n return interpolate(\n translation,\n this._locale,\n this._locales\n )(values, options?.formats);\n }\n date(value, format) {\n return date(this._locales || this._locale, value, format);\n }\n number(value, format) {\n return number(this._locales || this._locale, value, format);\n }\n}\nfunction setupI18n(params = {}) {\n return new I18n(params);\n}\n\nconst i18n = setupI18n();\n\nexport { I18n, formats, i18n, setupI18n };\n", "import { Constructor, CustomValidityState, FormControlInterface, FormValue, IControlHost, validationMessageCallback, Validator } from './types.js';\n\nexport function FormControlMixin<\n TBase extends Constructor<HTMLElement & IControlHost> & { observedAttributes?: string [] }\n>(SuperClass: TBase) {\n class FormControl extends SuperClass {\n /** Wires up control instances to be form associated */\n static get formAssociated(): boolean {\n return true;\n }\n\n /**\n * A list of Validator objects that will be evaluated when a control's form\n * value is modified or optionally when a given attribute changes.\n *\n * When a Validator's callback returns false, the entire form control will\n * be set to an invalid state.\n */\n declare static formControlValidators: Validator[];\n\n /**\n * If set to true the control described should be evaluated and validated\n * as part of a group. Like a radio, if any member of the group's validity\n * changes the the other members should update as well.\n */\n declare static formControlValidationGroup: boolean;\n\n private static get validators(): Validator[] {\n return this.formControlValidators || [];\n }\n\n /**\n * Allows the FormControl instance to respond to Validator attributes.\n * For instance, if a given Validator has a `required` attribute, that\n * validator will be evaluated whenever the host's required attribute\n * is updated.\n */\n static get observedAttributes(): string[] {\n const validatorAttributes = this.validators.map((validator) => validator.attribute).flat();\n\n const observedAttributes = super.observedAttributes || [];\n\n /** Make sure there are no duplicates inside the attributes list */\n const attributeSet = new Set([...observedAttributes, ...validatorAttributes]);\n return [...attributeSet] as string[];\n }\n\n /**\n * Return the validator associated with a given attribute. If no\n * Validator is associated with the attribute, it will return null.\n */\n static getValidator(attribute: string): Validator | null {\n return this.validators.find((validator) => validator.attribute === attribute) || null;\n }\n\n /**\n * Get all validators that are set to react to a given attribute\n * @param {string} attribute - The attribute that has changed\n * @returns {Validator[]}\n */\n static getValidators(attribute: string): Validator[] | null {\n return this.validators.filter(validator => {\n if (validator.attribute === attribute || validator.attribute?.includes(attribute)) {\n return true;\n }\n });\n }\n\n /** The ElementInternals instance for the control. */\n internals = this.attachInternals();\n\n /**\n * Keep track of if the control has focus\n * @private\n */\n #focused = false;\n\n /**\n * Exists to control when an error should be displayed\n * @private\n */\n #forceError = false;\n\n /**\n * Toggles to true whenever the element has been focused. This property\n * will reset whenever the control's formResetCallback is called.\n * @private\n */\n #touched = false;\n\n /** An internal abort controller for cancelling pending async validation */\n #abortController?: AbortController;\n #previousAbortController?: AbortController;\n\n /**\n * Used for tracking if a validation target has been set to manage focus\n * when the control's validity is reported\n */\n #awaitingValidationTarget = true;\n\n /** All of the controls within a root with a matching local name and form name */\n get #formValidationGroup(): NodeListOf<FormControl> {\n const rootNode = this.getRootNode() as HTMLElement;\n const selector = `${this.localName}[name=\"${this.getAttribute('name')}\"]`;\n return rootNode.querySelectorAll<FormControl>(selector);\n }\n\n /**\n * Acts as a cache for the current value so the value can be re-evaluated\n * whenever an attribute changes or on some other event.\n */\n #value: FormValue = '';\n\n /**\n * Set this[touched] and this[focused]\n * to true when the element is focused\n * @private\n */\n #onFocus = (): void => {\n this.#touched = true;\n this.#focused = true;\n this.#shouldShowError();\n };\n\n /**\n * Reset this[focused] on blur\n * @private\n */\n #onBlur = (): void => {\n this.#focused = false;\n\n this.#runValidators(this.shouldFormValueUpdate() ? this.#value : '');\n\n /**\n * Set forceError to ensure error messages persist until\n * the value is changed.\n */\n if (!this.validity.valid && this.#touched) {\n this.#forceError = true;\n }\n const showError = this.#shouldShowError();\n if (this.validationMessageCallback) {\n this.validationMessageCallback(showError ? this.internals.validationMessage : '');\n }\n };\n\n /**\n * For the show error state on invalid\n * @private\n */\n #onInvalid = (): void => {\n if (this.#awaitingValidationTarget && this.validationTarget) {\n this.internals.setValidity(\n this.validity,\n this.validationMessage,\n this.validationTarget\n );\n this.#awaitingValidationTarget = false;\n }\n this.#touched = true;\n this.#forceError = true;\n this.#shouldShowError();\n this?.validationMessageCallback?.(this.showError ? this.internals.validationMessage : '');\n };\n\n /** Return a reference to the control's form */\n get form(): HTMLFormElement {\n return this.internals.form;\n }\n\n /**\n * Will return true if it is recommended that the control shows an internal\n * error. If using this property, it is wise to listen for 'invalid' events\n * on the element host and call preventDefault on the event. Doing this will\n * prevent browsers from showing a validation popup.\n */\n get showError(): boolean {\n return this.#shouldShowError();\n }\n\n /**\n * Forward the internals checkValidity method\n * will return the valid state of the control.\n */\n checkValidity(): boolean {\n return this.internals.checkValidity();\n }\n\n /** The element's validity state */\n get validity(): ValidityState {\n return this.internals.validity;\n }\n\n /**\n * The validation message shown by a given Validator object. If the control\n * is in a valid state this should be falsy.\n */\n get validationMessage(): string {\n return this.internals.validationMessage;\n }\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n constructor(...args: any[]) {\n super(...args);\n this.addEventListener?.('focus', this.#onFocus);\n this.addEventListener?.('blur', this.#onBlur);\n this.addEventListener?.('invalid', this.#onInvalid);\n this.setValue(null);\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n\n /**\n * Check to see if a Validator is associated with the changed attribute.\n * If one exists, call control's validate function which will perform\n * control validation.\n */\n const proto = this.constructor as typeof FormControl;\n const validators = proto.getValidators(name);\n\n if (validators?.length && this.validationTarget) {\n this.setValue(this.#value);\n }\n }\n\n /** PUBLIC LIFECYCLE METHODS */\n\n /**\n * Sets the control's form value if the call to `shouldFormValueUpdate`\n * returns `true`.\n * @param value {FormValue} - The value to pass to the form\n */\n setValue(value: FormValue): void {\n this.#forceError = false;\n this.validationMessageCallback?.('');\n this.#value = value;\n const valueShouldUpdate = this.shouldFormValueUpdate();\n const valueToUpdate = valueShouldUpdate ? value : null;\n this.internals.setFormValue(valueToUpdate as string);\n this.#runValidators(valueToUpdate);\n if (this.valueChangedCallback) {\n this.valueChangedCallback(valueToUpdate);\n }\n this.#shouldShowError();\n }\n\n /**\n * This method can be overridden to determine if the control's form value\n * should be set on a call to `setValue`. An example of when a user might want\n * to skip this step is when implementing checkbox-like behavior, first checking\n * to see if `this.checked` is set to a truthy value. By default this returns\n * `true`.\n */\n shouldFormValueUpdate(): boolean {\n return true;\n }\n\n /** Save a reference to the validation complete resolver */\n #validationCompleteResolver?: (value: void | PromiseLike<void>) => void;\n\n /** When true validation will be pending */\n #isValidationPending = false;\n\n #validationComplete = Promise.resolve();\n\n /** A promise that will resolve when all pending validations are complete */\n get validationComplete(): Promise<void> {\n return new Promise(resolve => resolve(this.#validationComplete));\n }\n\n /** DECLARED INSTANCE METHODS AND PROPERTIES*/\n\n /**\n * Resets a form control to its initial state\n */\n declare resetFormControl: () => void;\n\n /**\n * This method is used to override the controls' validity message\n * for a given Validator key. This has the highest level of priority when\n * setting a validationMessage, so use this method wisely.\n *\n * The returned value will be used as the validationMessage for the given key.\n * @param validationKey {string} - The key that has returned invalid\n */\n declare validityCallback: (validationKey: string) => string | void;\n\n /**\n * Called when the control's validationMessage should be changed\n * @param message { string } - The new validation message\n */\n declare validationMessageCallback: (message: string) => void;\n\n /**\n * A callback for when the controls' form value changes. The value\n * passed to this function should not be confused with the control's\n * value property, this is the value that will appear on the form.\n *\n * In cases where `checked` did not exist on the control's prototype\n * upon initialization, this value and the value property will be identical;\n * in cases where `checked` is present upon initialization, this will be\n * effectively `this.checked && this.value`.\n */\n declare valueChangedCallback: (value: FormValue) => void;\n\n /**\n * The element that will receive focus when the control's validity\n * state is reported either by a form submission or via API\n *\n * We use declare since this is optional and we don't particularly\n * care how the consuming component implements this (as a field, member\n * or getter/setter)\n */\n declare validationTarget: HTMLElement | null;\n\n /** PRIVATE LIFECYCLE METHODS */\n\n /**\n * Check to see if an error should be shown. This method will also\n * update the internals state object with the --show-error state\n * if necessary.\n * @private\n */\n #shouldShowError(): boolean {\n if (this.hasAttribute('disabled')) {\n return false;\n }\n\n const showError = this.#forceError || (this.#touched && !this.validity.valid && !this.#focused);\n\n /**\n * At the time of writing Firefox doesn't support states\n * TODO: Remove when check for states when fully support is in place\n */\n if (showError && this.internals.states) {\n this.internals.states.add('--show-error');\n } else if (this.internals.states) {\n this.internals.states.delete('--show-error');\n }\n\n return showError;\n }\n\n #runValidators(value: FormValue): void {\n const proto = this.constructor as typeof FormControl;\n const validity: CustomValidityState = {};\n const validators = proto.validators;\n const asyncValidators: Promise<boolean|void>[] = [];\n const hasAsyncValidators = validators.some((validator) => validator.isValid instanceof Promise)\n\n if (!this.#isValidationPending) {\n this.#validationComplete = new Promise(resolve => {\n this.#validationCompleteResolver = resolve\n });\n this.#isValidationPending = true;\n }\n\n /**\n * If an abort controller exists from a previous validation step\n * notify still-running async validators that we are requesting they\n * discontinue any work.\n */\n if (this.#abortController) {\n this.#abortController.abort();\n this.#previousAbortController = this.#abortController;\n }\n\n /**\n * Create a new abort controller and replace the instance reference\n * so we can clean it up for next time\n */\n const abortController = new AbortController();\n this.#abortController = abortController;\n let validationMessage: string | undefined = undefined;\n\n /** Track to see if any validity key has changed */\n let hasChange = false;\n\n if (!validators.length) {\n return;\n }\n\n validators.forEach(validator => {\n const key = validator.key || 'customError';\n const isValid = validator.isValid(this, value, abortController.signal);\n const isAsyncValidator = isValid instanceof Promise;\n\n if (isAsyncValidator) {\n asyncValidators.push(isValid);\n\n isValid.then(isValidatorValid => {\n if (isValidatorValid === undefined || isValidatorValid === null) {\n return;\n }\n /** Invert the validity state to correspond to the ValidityState API */\n validity[key] = !isValidatorValid;\n\n validationMessage = this.#getValidatorMessageForValue(validator, value);\n this.#setValidityWithOptionalTarget(validity, validationMessage);\n });\n } else {\n /** Invert the validity state to correspond to the ValidityState API */\n validity[key] = !isValid;\n\n if (this.validity[key] !== !isValid) {\n hasChange = true;\n }\n\n // only update the validationMessage for the first invalid scenario\n // so that earlier invalid validators dont get their messages overwritten by later ones\n // in the validators array\n if (!isValid && !validationMessage) {\n validationMessage = this.#getValidatorMessageForValue(validator, value);\n }\n }\n });\n\n /** Once all the async validators have settled, resolve validationComplete */\n Promise.allSettled(asyncValidators)\n .then(() => {\n /** Don't resolve validations if the signal is aborted */\n if (!abortController?.signal.aborted) {\n this.#isValidationPending = false;\n this.#validationCompleteResolver?.();\n }\n });\n\n /**\n * If async validators are present:\n * Only run updates when a sync validator has a change. This is to prevent\n * situations where running sync validators can override async validators\n * that are still in progress\n *\n * If async validators are not present, always update validity\n */\n if (hasChange || !hasAsyncValidators) {\n this.#setValidityWithOptionalTarget(validity, validationMessage);\n }\n }\n\n /**\n * If the validationTarget is not set, the user can decide how they would\n * prefer to handle focus when the field is validated.\n */\n #setValidityWithOptionalTarget(validity: Partial<ValidityState>, validationMessage: string|undefined): void {\n if (this.validationTarget) {\n this.internals.setValidity(validity, validationMessage, this.validationTarget);\n this.#awaitingValidationTarget = false;\n } else {\n this.internals.setValidity(validity, validationMessage);\n\n if (this.internals.validity.valid) {\n return;\n }\n\n /**\n * Sets mark the component as awaiting a validation target\n * if the element dispatches an invalid event, the #onInvalid listener\n * will check to see if the validation target has been set since this call\n * has run. This useful in cases like Lit's use of the query\n * decorator for setting the validationTarget or any scenario\n * where the validationTarget isn't available upon construction\n */\n this.#awaitingValidationTarget = true;\n }\n }\n\n /** Process the validator message attribute */\n #getValidatorMessageForValue(validator: Validator, value: FormValue): string {\n /** If the validity callback exists and returns, use that as the result */\n if (this.validityCallback) {\n const message = this.validityCallback(validator.key || 'customError');\n\n if (message) {\n return message;\n }\n }\n\n if (validator.message instanceof Function) {\n return (validator.message as validationMessageCallback)(this, value);\n } else {\n return validator.message as string;\n }\n }\n\n /** Reset control state when the form is reset */\n formResetCallback() {\n this.#touched = false;\n this.#forceError = false;\n this.#shouldShowError();\n this.resetFormControl?.();\n\n this.validationMessageCallback?.(\n this.#shouldShowError() ? this.validationMessage : ''\n );\n }\n }\n\n return FormControl as Constructor<FormControlInterface> & TBase;\n}\n", "import { i18n } from '@lingui/core';\nimport { FormControlMixin } from '@open-wc/form-control';\nimport { css, html, LitElement, nothing, PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { activateI18n } from '../i18n';\nimport { messages as daMessages } from './locales/da/messages.mjs';\nimport { messages as enMessages } from './locales/en/messages.mjs';\nimport { messages as fiMessages } from './locales/fi/messages.mjs';\nimport { messages as nbMessages } from './locales/nb/messages.mjs';\nimport { messages as svMessages } from './locales/sv/messages.mjs';\n\nactivateI18n(enMessages, nbMessages, fiMessages, daMessages, svMessages);\n\nconst REQUIRED_MESSAGE = () =>\n i18n._({\n id: 'checkbox-group.validation.required',\n message: 'At least one selection is required.',\n comment: 'Shown when required checkbox group has no selections',\n });\n\nexport class WCheckboxGroup extends FormControlMixin(LitElement) {\n // Use delegatesFocus so focus delegates to an internal focusable element\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /** The group label displayed above the checkboxes. */\n @property({ type: String, reflect: true })\n label: string;\n\n /** The name applied to child checkboxes when they do not provide one. */\n @property({ type: String, reflect: true })\n name: string;\n\n /** Whether to show optional text next to the label. */\n @property({ type: Boolean, reflect: true })\n optional = false;\n\n @property({ type: String, reflect: true, attribute: 'help-text' })\n helpText: string;\n\n /** Makes the checkbox group required. */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /** Marks the checkbox group as invalid. */\n @property({ type: Boolean, reflect: true })\n invalid = false;\n\n // Track whether the user has interacted with the group.\n #hasInteracted = false;\n\n // Track whether we've warned about missing name in a form.\n #hasWarnedMissingName = false;\n\n // Internal tabindex for the focusable wrapper element (reactive)\n @state()\n private _internalTabIndex = -1;\n\n #unsubscribeI18n?: () => void;\n\n static styles = css`\n .wrapper {\n display: inline-flex;\n flex-direction: column;\n gap: 16px;\n }\n\n .checkbox-group {\n display: grid;\n gap: 16px;\n }\n\n .label {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--w-font-size-s);\n line-height: var(--w-line-height-s);\n font-weight: 700;\n color: var(--w-s-color-text);\n }\n\n .optional {\n font-weight: 400;\n color: var(--w-s-color-text-subtle);\n }\n\n .help-text {\n display: block;\n font-size: var(--w-font-size-xs);\n line-height: var(--w-line-height-xs);\n color: var(--w-s-color-text-subtle);\n }\n\n .error {\n color: var(--w-s-color-text-negative);\n }\n `;\n\n render() {\n const hasSelection = this.#getCheckedCount() > 0;\n const requiredInvalid = this.required && !hasSelection;\n const showRequiredError = requiredInvalid && this.#hasInteracted;\n const isInvalid = this.invalid || showRequiredError;\n const helpText = isInvalid ? this.#getRequiredMessage() : this.helpText;\n const helpId = helpText ? 'checkbox-group__help' : undefined;\n const labelId = this.label ? 'checkbox-group__label' : undefined;\n const ariaInvalid = isInvalid ? 'true' : undefined;\n\n return html`\n <div class=\"wrapper\" tabindex=\"${this._internalTabIndex}\">\n ${this.label\n ? html`\n <div class=\"label\" id=\"${labelId}\">\n <span>${this.label}</span>\n ${this.optional\n ? html`\n <span class=\"optional\">\n ${i18n._({\n id: 'checkbox-group.label.optional',\n message: 'Optional',\n comment: 'Shown behind label when marked as optional',\n })}\n </span>\n `\n : nothing}\n </div>\n `\n : nothing}\n <div\n class=\"checkbox-group\"\n role=\"group\"\n aria-labelledby=${ifDefined(labelId)}\n aria-describedby=${ifDefined(helpId)}\n aria-invalid=${ifDefined(ariaInvalid)}\n >\n <slot></slot>\n </div>\n ${helpText\n ? html`<div class=\"${isInvalid ? 'help-text error' : 'help-text'}\" id=\"${helpId}\">${helpText}</div>`\n : nothing}\n </div>\n `;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('change', this.#handleChange);\n this.addEventListener('invalid', this.#handleInvalid);\n this.addEventListener('slotchange', this.#handleSlotChange);\n this.#unsubscribeI18n = i18n.on('change', this.#handleI18nChange);\n this.setValue(null);\n this.#warnIfMissingName();\n }\n\n disconnectedCallback(): void {\n this.#unsubscribeI18n?.();\n this.#unsubscribeI18n = undefined;\n super.disconnectedCallback();\n }\n\n /** Checks whether the group passes constraint validation */\n checkValidity(): boolean {\n this.#updateValidity();\n return this.internals.checkValidity();\n }\n\n /** Checks validity and shows the validation message if invalid */\n reportValidity(): boolean {\n this.#markInteracted();\n this.#updateValidity();\n return this.internals.checkValidity();\n }\n\n /** Sets focus on the checkbox group. */\n focus(options?: FocusOptions) {\n const anchor = this.#getValidationAnchor() as HTMLElement | undefined;\n if (anchor?.focus) {\n anchor.focus(options);\n return;\n }\n HTMLElement.prototype.focus.call(this, options);\n }\n\n #handleChange = () => {\n this.#markInteracted();\n this.#updateValidity();\n this.requestUpdate();\n };\n\n #handleInvalid = () => {\n this.#markInteracted();\n this.#updateValidity();\n this.requestUpdate();\n };\n\n #handleSlotChange = () => {\n this.#applyGroupName();\n this.#updateValidity();\n this.requestUpdate();\n };\n\n #markInteracted(): void {\n this.#hasInteracted = true;\n }\n\n #handleI18nChange = () => {\n this.requestUpdate();\n };\n\n #getCheckedCount(): number {\n return this.#getAssignedElements().filter(el => (el as { checked?: boolean }).checked).length;\n }\n\n #applyGroupName(): void {\n if (!this.name) return;\n for (const el of this.#getAssignedElements()) {\n // Use non-reflecting _groupName to avoid DOM changes during hydration\n const checkbox = el as { _groupName?: string; name?: string };\n if (checkbox && typeof checkbox === 'object' && !checkbox.name) {\n checkbox._groupName = this.name;\n }\n }\n }\n\n #syncChildInvalid(isInvalid: boolean): void {\n for (const el of this.#getAssignedElements()) {\n // Use non-reflecting _groupInvalid to avoid DOM changes during hydration\n if ('_groupInvalid' in el) {\n (el as { _groupInvalid: boolean })._groupInvalid = isInvalid;\n }\n }\n }\n\n #getValidationAnchor(): HTMLElement | undefined {\n return this.#getAssignedElements()[0] as HTMLElement | undefined;\n }\n\n #getAssignedElements(): Element[] {\n const slot = this.shadowRoot?.querySelector('slot');\n return slot?.assignedElements({ flatten: true }) ?? [];\n }\n\n #getRequiredMessage(): string {\n return REQUIRED_MESSAGE();\n }\n\n updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n\n if (this.#shouldUpdateValidity(changedProperties)) {\n if (changedProperties.has('name')) {\n this.#applyGroupName();\n }\n this.#updateValidity();\n }\n }\n\n #shouldUpdateValidity(changedProperties: PropertyValues<this>): boolean {\n return (\n changedProperties.has('invalid') ||\n changedProperties.has('required') ||\n changedProperties.has('helpText') ||\n changedProperties.has('name')\n );\n }\n\n #setValidityState(state: ValidityStateFlags): void {\n // Suppress native validation popovers (Safari) and provide a focusable anchor.\n const anchor = this.#getValidationAnchor();\n this.internals.setValidity(state, ' ', anchor ?? undefined);\n }\n\n #syncInternalTabIndex(shouldBeFocusable: boolean): void {\n // Use internal tabindex to avoid DOM changes on host during hydration\n this._internalTabIndex = shouldBeFocusable ? 0 : -1;\n }\n\n #updateValidity(): void {\n this.#warnIfMissingName();\n const hasSelection = this.#getCheckedCount() > 0;\n const requiredInvalid = this.required && !hasSelection;\n const externalInvalid = this.invalid;\n const showRequiredError = requiredInvalid && this.#hasInteracted;\n const showInvalidUi = externalInvalid || showRequiredError;\n\n this.#syncInternalTabIndex(showInvalidUi);\n\n if (requiredInvalid) {\n this.#setValidityState({ valueMissing: true });\n this.#syncChildInvalid(showInvalidUi);\n return;\n }\n\n if (externalInvalid) {\n this.#setValidityState({ customError: true });\n this.#syncChildInvalid(true);\n return;\n }\n\n this.internals.setValidity({});\n this.#syncChildInvalid(false);\n }\n\n #warnIfMissingName(): void {\n if (this.#hasWarnedMissingName) return;\n if (!this.internals.form) return;\n if (this.name && this.name.trim().length > 0) return;\n console.warn('w-checkbox-group: \"name\" is required for form submission.');\n this.#hasWarnedMissingName = true;\n }\n}\n\nif (!customElements.get('w-checkbox-group')) {\n customElements.define('w-checkbox-group', WCheckboxGroup);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'w-checkbox-group': WCheckboxGroup;\n }\n}\n", "import { i18n, Messages } from '@lingui/core';\n\nexport const supportedLocales = ['en', 'nb', 'fi', 'da', 'sv'] as const;\ntype SupportedLocale = (typeof supportedLocales)[number];\n\nexport const defaultLocale = 'en';\n\nexport const getSupportedLocale = (usedLocale: string) => {\n return (\n supportedLocales.find((locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)) ||\n defaultLocale\n );\n};\n\nexport function detectLocale(): SupportedLocale {\n if (typeof window === 'undefined') {\n /**\n * Server locale detection. This requires e.g LANG environment variable to be set on the server.\n */\n const serverLocale = process.env.NMP_LANGUAGE || Intl.DateTimeFormat().resolvedOptions().locale;\n return getSupportedLocale(serverLocale);\n }\n\n try {\n /**\n * Client locale detection. Expects the lang attribute to be defined.\n */\n const htmlLocale = getDocumentLang(document);\n if (htmlLocale) {\n return getSupportedLocale(htmlLocale);\n }\n\n const frameLocale = getFrameElementLang();\n if (frameLocale) {\n return getSupportedLocale(frameLocale);\n }\n\n const parentLocale = getDocumentLang(getParentDocument());\n if (parentLocale) {\n return getSupportedLocale(parentLocale);\n }\n\n return defaultLocale;\n } catch (e) {\n console.warn('could not detect locale, falling back to source locale', e);\n return defaultLocale;\n }\n}\n\nexport const getMessages = (\n locale: SupportedLocale,\n enMsg: Messages,\n nbMsg: Messages,\n fiMsg: Messages,\n daMsg: Messages,\n svMsg: Messages,\n) => {\n if (locale === 'nb') return nbMsg;\n if (locale === 'fi') return fiMsg;\n if (locale === 'da') return daMsg;\n if (locale === 'sv') return svMsg;\n // Default to English\n return enMsg;\n};\n\nexport const activateI18n = (\n enMessages: Messages,\n nbMessages: Messages,\n fiMessages: Messages,\n daMessages: Messages,\n svMessages: Messages,\n) => {\n // Load all locales upfront to support dynamic locale switching\n i18n.load('en', enMessages);\n i18n.load('nb', nbMessages);\n i18n.load('fi', fiMessages);\n i18n.load('da', daMessages);\n i18n.load('sv', svMessages);\n\n const locale = detectLocale();\n i18n.activate(locale);\n notifyI18nChange();\n\n setupLangObserver();\n};\n\nexport const I18N_CHANGE_EVENT = 'warp-i18n-change';\n\nexport function notifyI18nChange() {\n if (typeof window === 'undefined') return;\n window.dispatchEvent(new Event(I18N_CHANGE_EVENT));\n}\n\nlet langObserverInitialized = false;\n\nfunction setupLangObserver() {\n if (langObserverInitialized) return;\n if (typeof window === 'undefined') return;\n if (!document?.documentElement) return;\n\n langObserverInitialized = true;\n\n const handleLangChange = () => {\n const nextLocale = detectLocale();\n if (i18n.locale !== nextLocale) {\n i18n.activate(nextLocale);\n notifyI18nChange();\n }\n };\n\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'lang') {\n handleLangChange();\n break;\n }\n }\n });\n\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] });\n\n const parentDocument = getParentDocument();\n if (parentDocument && parentDocument.documentElement && parentDocument !== document) {\n observer.observe(parentDocument.documentElement, { attributes: true, attributeFilter: ['lang'] });\n }\n\n const frameEl = getFrameElement();\n if (frameEl) {\n observer.observe(frameEl, { attributes: true, attributeFilter: ['lang'] });\n }\n}\n\nfunction getParentDocument(): Document | null {\n try {\n return window.parent?.document ?? null;\n } catch {\n return null;\n }\n}\n\nfunction getDocumentLang(doc: Document | null | undefined): string {\n try {\n return doc?.documentElement?.lang ?? '';\n } catch {\n return '';\n }\n}\n\nfunction getFrameElement(): HTMLElement | null {\n try {\n return (window.frameElement as HTMLElement | null) ?? null;\n } catch {\n return null;\n }\n}\n\nfunction getFrameElementLang(): string {\n try {\n return window.frameElement?.getAttribute?.('lang') ?? '';\n } catch {\n return '';\n }\n}\n", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"checkbox-group.label.optional\\\":[\\\"Valgfri\\\"],\\\"checkbox-group.validation.required\\\":[\\\"Mindst \u00E9n valgt mulighed er p\u00E5kr\u00E6vet.\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"checkbox-group.label.optional\\\":[\\\"Optional\\\"],\\\"checkbox-group.validation.required\\\":[\\\"At least one selection is required.\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"checkbox-group.label.optional\\\":[\\\"Valinnainen\\\"],\\\"checkbox-group.validation.required\\\":[\\\"V\u00E4hint\u00E4\u00E4n yksi valinta vaaditaan.\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"checkbox-group.label.optional\\\":[\\\"Valgfri\\\"],\\\"checkbox-group.validation.required\\\":[\\\"Minst ett valg er p\u00E5krevd.\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"checkbox-group.label.optional\\\":[\\\"Valfritt\\\"],\\\"checkbox-group.validation.required\\\":[\\\"Minst ett val kr\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B,KAAK,MAAQ,KAAK,KAAK,KAAK,EAAE,OAAS,IAC3C,QAAQ,KAAK,2DAA2D,EACxEmC,EAAA,KAAKnC,EAAwB,KAC/B,EApSWmB,EAEJ,kBAAoB,CACzB,GAAGE,GAAW,kBACd,eAAgB,EAClB,EALWF,EA0CJ,OAAS8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAjChBC,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAR9BhC,EASX,qBAIA+B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAZ9BhC,EAaX,oBAIA+B,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAhB/BhC,EAiBX,wBAGA+B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,WAAY,CAAC,GAnBtDhC,EAoBX,wBAIA+B,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAvB/BhC,EAwBX,wBAIA+B,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA3B/BhC,EA4BX,uBAUQ+B,EAAA,CADPN,GAAM,GArCIzB,EAsCH,iCAiQL,eAAe,IAAI,kBAAkB,GACxC,eAAe,OAAO,mBAAoBA,CAAc",
4
+ "sourcesContent": ["import { compileMessage } from '@lingui/message-utils/compileMessage';\n\nconst isString = (s) => typeof s === \"string\";\nconst isFunction = (f) => typeof f === \"function\";\n\nconst cache = /* @__PURE__ */ new Map();\nconst defaultLocale = \"en\";\nfunction normalizeLocales(locales) {\n const out = Array.isArray(locales) ? locales : [locales];\n return [...out, defaultLocale];\n}\nfunction date(locales, value, format) {\n const _locales = normalizeLocales(locales);\n if (!format) {\n format = \"default\";\n }\n let o;\n if (typeof format === \"string\") {\n o = {\n day: \"numeric\",\n month: \"short\",\n year: \"numeric\"\n };\n switch (format) {\n case \"full\":\n o.weekday = \"long\";\n case \"long\":\n o.month = \"long\";\n break;\n case \"short\":\n o.month = \"numeric\";\n break;\n }\n } else {\n o = format;\n }\n const formatter = getMemoized(\n () => cacheKey(\"date\", _locales, format),\n () => new Intl.DateTimeFormat(_locales, o)\n );\n return formatter.format(isString(value) ? new Date(value) : value);\n}\nfunction time(locales, value, format) {\n let o;\n if (!format) {\n format = \"default\";\n }\n if (typeof format === \"string\") {\n o = {\n second: \"numeric\",\n minute: \"numeric\",\n hour: \"numeric\"\n };\n switch (format) {\n case \"full\":\n case \"long\":\n o.timeZoneName = \"short\";\n break;\n case \"short\":\n delete o.second;\n }\n } else {\n o = format;\n }\n return date(locales, value, o);\n}\nfunction number(locales, value, format) {\n const _locales = normalizeLocales(locales);\n const formatter = getMemoized(\n () => cacheKey(\"number\", _locales, format),\n () => new Intl.NumberFormat(_locales, format)\n );\n return formatter.format(value);\n}\nfunction plural(locales, ordinal, value, { offset = 0, ...rules }) {\n const _locales = normalizeLocales(locales);\n const plurals = ordinal ? getMemoized(\n () => cacheKey(\"plural-ordinal\", _locales),\n () => new Intl.PluralRules(_locales, { type: \"ordinal\" })\n ) : getMemoized(\n () => cacheKey(\"plural-cardinal\", _locales),\n () => new Intl.PluralRules(_locales, { type: \"cardinal\" })\n );\n return rules[value] ?? rules[plurals.select(value - offset)] ?? rules.other;\n}\nfunction getMemoized(getKey, construct) {\n const key = getKey();\n let formatter = cache.get(key);\n if (!formatter) {\n formatter = construct();\n cache.set(key, formatter);\n }\n return formatter;\n}\nfunction cacheKey(type, locales, options) {\n const localeKey = locales.join(\"-\");\n return `${type}-${localeKey}-${JSON.stringify(options)}`;\n}\n\nconst formats = {\n __proto__: null,\n date: date,\n defaultLocale: defaultLocale,\n number: number,\n plural: plural,\n time: time\n};\n\nconst ESCAPE_SEQUENCE_REGEX = /\\\\u[a-fA-F0-9]{4}|\\\\x[a-fA-F0-9]{2}/;\nconst decodeEscapeSequences = (str) => {\n return str.replace(\n // Same pattern but with capturing groups for extracting values during replacement\n /\\\\u([a-fA-F0-9]{4})|\\\\x([a-fA-F0-9]{2})/g,\n (_, unicode, hex) => {\n if (unicode) {\n const codePoint = parseInt(unicode, 16);\n return String.fromCharCode(codePoint);\n } else {\n const codePoint = parseInt(hex, 16);\n return String.fromCharCode(codePoint);\n }\n }\n );\n};\n\nconst OCTOTHORPE_PH = \"%__lingui_octothorpe__%\";\nconst getDefaultFormats = (locale, passedLocales, formats = {}) => {\n const locales = passedLocales || locale;\n const style = (format) => {\n if (typeof format === \"object\")\n return format;\n return formats[format];\n };\n const replaceOctothorpe = (value, message) => {\n const numberFormat = Object.keys(formats).length ? style(\"number\") : void 0;\n const valueStr = number(locales, value, numberFormat);\n return message.replace(new RegExp(OCTOTHORPE_PH, \"g\"), valueStr);\n };\n return {\n plural: (value, cases) => {\n const { offset = 0 } = cases;\n const message = plural(locales, false, value, cases);\n return replaceOctothorpe(value - offset, message);\n },\n selectordinal: (value, cases) => {\n const { offset = 0 } = cases;\n const message = plural(locales, true, value, cases);\n return replaceOctothorpe(value - offset, message);\n },\n select: selectFormatter,\n number: (value, format) => number(\n locales,\n value,\n style(format) || { style: format }\n ),\n date: (value, format) => date(locales, value, style(format) || format),\n time: (value, format) => time(locales, value, style(format) || format)\n };\n};\nconst selectFormatter = (value, rules) => rules[value] ?? rules.other;\nfunction interpolate(translation, locale, locales) {\n return (values = {}, formats) => {\n const formatters = getDefaultFormats(locale, locales, formats);\n const formatMessage = (tokens, replaceOctothorpe = false) => {\n if (!Array.isArray(tokens))\n return tokens;\n return tokens.reduce((message, token) => {\n if (token === \"#\" && replaceOctothorpe) {\n return message + OCTOTHORPE_PH;\n }\n if (isString(token)) {\n return message + token;\n }\n const [name, type, format] = token;\n let interpolatedFormat = {};\n if (type === \"plural\" || type === \"selectordinal\" || type === \"select\") {\n Object.entries(format).forEach(\n ([key, value2]) => {\n interpolatedFormat[key] = formatMessage(\n value2,\n type === \"plural\" || type === \"selectordinal\"\n );\n }\n );\n } else {\n interpolatedFormat = format;\n }\n let value;\n if (type) {\n const formatter = formatters[type];\n value = formatter(values[name], interpolatedFormat);\n } else {\n value = values[name];\n }\n if (value == null) {\n return message;\n }\n return message + value;\n }, \"\");\n };\n const result = formatMessage(translation);\n if (isString(result) && ESCAPE_SEQUENCE_REGEX.test(result)) {\n return decodeEscapeSequences(result);\n }\n if (isString(result))\n return result;\n return result ? String(result) : \"\";\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField$1 = (obj, key, value) => {\n __defNormalProp$1(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass EventEmitter {\n constructor() {\n __publicField$1(this, \"_events\", {});\n }\n on(event, listener) {\n var _a;\n (_a = this._events)[event] ?? (_a[event] = []);\n this._events[event].push(listener);\n return () => this.removeListener(event, listener);\n }\n removeListener(event, listener) {\n const maybeListeners = this._getListeners(event);\n if (!maybeListeners)\n return;\n const index = maybeListeners.indexOf(listener);\n if (~index)\n maybeListeners.splice(index, 1);\n }\n emit(event, ...args) {\n const maybeListeners = this._getListeners(event);\n if (!maybeListeners)\n return;\n maybeListeners.map((listener) => listener.apply(this, args));\n }\n _getListeners(event) {\n const maybeListeners = this._events[event];\n return Array.isArray(maybeListeners) ? maybeListeners : false;\n }\n}\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass I18n extends EventEmitter {\n constructor(params) {\n super();\n __publicField(this, \"_locale\", \"\");\n __publicField(this, \"_locales\");\n __publicField(this, \"_localeData\", {});\n __publicField(this, \"_messages\", {});\n __publicField(this, \"_missing\");\n __publicField(this, \"_messageCompiler\");\n /**\n * Alias for {@see I18n._}\n */\n __publicField(this, \"t\", this._.bind(this));\n if (process.env.NODE_ENV !== \"production\") {\n this.setMessagesCompiler(compileMessage);\n }\n if (params.missing != null)\n this._missing = params.missing;\n if (params.messages != null)\n this.load(params.messages);\n if (params.localeData != null)\n this.loadLocaleData(params.localeData);\n if (typeof params.locale === \"string\" || params.locales) {\n this.activate(params.locale ?? defaultLocale, params.locales);\n }\n }\n get locale() {\n return this._locale;\n }\n get locales() {\n return this._locales;\n }\n get messages() {\n return this._messages[this._locale] ?? {};\n }\n /**\n * @deprecated this has no effect. Please remove this from the code. Deprecated in v4\n */\n get localeData() {\n return this._localeData[this._locale] ?? {};\n }\n _loadLocaleData(locale, localeData) {\n const maybeLocaleData = this._localeData[locale];\n if (!maybeLocaleData) {\n this._localeData[locale] = localeData;\n } else {\n Object.assign(maybeLocaleData, localeData);\n }\n }\n /**\n * Registers a `MessageCompiler` to enable the use of uncompiled catalogs at runtime.\n *\n * In production builds, the `MessageCompiler` is typically excluded to reduce bundle size.\n * By default, message catalogs should be precompiled during the build process. However,\n * if you need to compile catalogs at runtime, you can use this method to set a message compiler.\n *\n * Example usage:\n *\n * ```ts\n * import { compileMessage } from \"@lingui/message-utils/compileMessage\";\n *\n * i18n.setMessagesCompiler(compileMessage);\n * ```\n */\n setMessagesCompiler(compiler) {\n this._messageCompiler = compiler;\n return this;\n }\n /**\n * @deprecated Plurals automatically used from Intl.PluralRules you can safely remove this call. Deprecated in v4\n */\n loadLocaleData(localeOrAllData, localeData) {\n if (typeof localeOrAllData === \"string\") {\n this._loadLocaleData(localeOrAllData, localeData);\n } else {\n Object.keys(localeOrAllData).forEach(\n (locale) => this._loadLocaleData(locale, localeOrAllData[locale])\n );\n }\n this.emit(\"change\");\n }\n _load(locale, messages) {\n const maybeMessages = this._messages[locale];\n if (!maybeMessages) {\n this._messages[locale] = messages;\n } else {\n Object.assign(maybeMessages, messages);\n }\n }\n load(localeOrMessages, messages) {\n if (typeof localeOrMessages == \"string\" && typeof messages === \"object\") {\n this._load(localeOrMessages, messages);\n } else {\n Object.entries(localeOrMessages).forEach(\n ([locale, messages2]) => this._load(locale, messages2)\n );\n }\n this.emit(\"change\");\n }\n /**\n * @param options {@link LoadAndActivateOptions}\n */\n loadAndActivate({ locale, locales, messages }) {\n this._locale = locale;\n this._locales = locales || void 0;\n this._messages[this._locale] = messages;\n this.emit(\"change\");\n }\n activate(locale, locales) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!this._messages[locale]) {\n console.warn(`Messages for locale \"${locale}\" not loaded.`);\n }\n }\n this._locale = locale;\n this._locales = locales;\n this.emit(\"change\");\n }\n _(id, values, options) {\n if (!this.locale) {\n throw new Error(\n \"Lingui: Attempted to call a translation function without setting a locale.\\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\\nThis issue may also occur due to a race condition in your initialization logic.\"\n );\n }\n let message = options?.message;\n if (!id) {\n id = \"\";\n }\n if (!isString(id)) {\n values = id.values || values;\n message = id.message;\n id = id.id;\n }\n const messageForId = this.messages[id];\n const messageMissing = messageForId === void 0;\n const missing = this._missing;\n if (missing && messageMissing) {\n return isFunction(missing) ? missing(this._locale, id) : missing;\n }\n if (messageMissing) {\n this.emit(\"missing\", { id, locale: this._locale });\n }\n let translation = messageForId || message || id;\n if (isString(translation)) {\n if (this._messageCompiler) {\n translation = this._messageCompiler(translation);\n } else {\n console.warn(`Uncompiled message detected! Message:\n\n> ${translation}\n\nThat means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.\nICU features such as interpolation and plurals will not work properly for that message. \n\nPlease compile your catalog first. \n`);\n }\n }\n if (isString(translation) && ESCAPE_SEQUENCE_REGEX.test(translation))\n return decodeEscapeSequences(translation);\n if (isString(translation))\n return translation;\n return interpolate(\n translation,\n this._locale,\n this._locales\n )(values, options?.formats);\n }\n date(value, format) {\n return date(this._locales || this._locale, value, format);\n }\n number(value, format) {\n return number(this._locales || this._locale, value, format);\n }\n}\nfunction setupI18n(params = {}) {\n return new I18n(params);\n}\n\nconst i18n = setupI18n();\n\nexport { I18n, formats, i18n, setupI18n };\n", "import { Constructor, CustomValidityState, FormControlInterface, FormValue, IControlHost, validationMessageCallback, Validator } from './types.js';\n\nexport function FormControlMixin<\n TBase extends Constructor<HTMLElement & IControlHost> & { observedAttributes?: string [] }\n>(SuperClass: TBase) {\n class FormControl extends SuperClass {\n /** Wires up control instances to be form associated */\n static get formAssociated(): boolean {\n return true;\n }\n\n /**\n * A list of Validator objects that will be evaluated when a control's form\n * value is modified or optionally when a given attribute changes.\n *\n * When a Validator's callback returns false, the entire form control will\n * be set to an invalid state.\n */\n declare static formControlValidators: Validator[];\n\n /**\n * If set to true the control described should be evaluated and validated\n * as part of a group. Like a radio, if any member of the group's validity\n * changes the the other members should update as well.\n */\n declare static formControlValidationGroup: boolean;\n\n private static get validators(): Validator[] {\n return this.formControlValidators || [];\n }\n\n /**\n * Allows the FormControl instance to respond to Validator attributes.\n * For instance, if a given Validator has a `required` attribute, that\n * validator will be evaluated whenever the host's required attribute\n * is updated.\n */\n static get observedAttributes(): string[] {\n const validatorAttributes = this.validators.map((validator) => validator.attribute).flat();\n\n const observedAttributes = super.observedAttributes || [];\n\n /** Make sure there are no duplicates inside the attributes list */\n const attributeSet = new Set([...observedAttributes, ...validatorAttributes]);\n return [...attributeSet] as string[];\n }\n\n /**\n * Return the validator associated with a given attribute. If no\n * Validator is associated with the attribute, it will return null.\n */\n static getValidator(attribute: string): Validator | null {\n return this.validators.find((validator) => validator.attribute === attribute) || null;\n }\n\n /**\n * Get all validators that are set to react to a given attribute\n * @param {string} attribute - The attribute that has changed\n * @returns {Validator[]}\n */\n static getValidators(attribute: string): Validator[] | null {\n return this.validators.filter(validator => {\n if (validator.attribute === attribute || validator.attribute?.includes(attribute)) {\n return true;\n }\n });\n }\n\n /** The ElementInternals instance for the control. */\n internals = this.attachInternals();\n\n /**\n * Keep track of if the control has focus\n * @private\n */\n #focused = false;\n\n /**\n * Exists to control when an error should be displayed\n * @private\n */\n #forceError = false;\n\n /**\n * Toggles to true whenever the element has been focused. This property\n * will reset whenever the control's formResetCallback is called.\n * @private\n */\n #touched = false;\n\n /** An internal abort controller for cancelling pending async validation */\n #abortController?: AbortController;\n #previousAbortController?: AbortController;\n\n /**\n * Used for tracking if a validation target has been set to manage focus\n * when the control's validity is reported\n */\n #awaitingValidationTarget = true;\n\n /** All of the controls within a root with a matching local name and form name */\n get #formValidationGroup(): NodeListOf<FormControl> {\n const rootNode = this.getRootNode() as HTMLElement;\n const selector = `${this.localName}[name=\"${this.getAttribute('name')}\"]`;\n return rootNode.querySelectorAll<FormControl>(selector);\n }\n\n /**\n * Acts as a cache for the current value so the value can be re-evaluated\n * whenever an attribute changes or on some other event.\n */\n #value: FormValue = '';\n\n /**\n * Set this[touched] and this[focused]\n * to true when the element is focused\n * @private\n */\n #onFocus = (): void => {\n this.#touched = true;\n this.#focused = true;\n this.#shouldShowError();\n };\n\n /**\n * Reset this[focused] on blur\n * @private\n */\n #onBlur = (): void => {\n this.#focused = false;\n\n this.#runValidators(this.shouldFormValueUpdate() ? this.#value : '');\n\n /**\n * Set forceError to ensure error messages persist until\n * the value is changed.\n */\n if (!this.validity.valid && this.#touched) {\n this.#forceError = true;\n }\n const showError = this.#shouldShowError();\n if (this.validationMessageCallback) {\n this.validationMessageCallback(showError ? this.internals.validationMessage : '');\n }\n };\n\n /**\n * For the show error state on invalid\n * @private\n */\n #onInvalid = (): void => {\n if (this.#awaitingValidationTarget && this.validationTarget) {\n this.internals.setValidity(\n this.validity,\n this.validationMessage,\n this.validationTarget\n );\n this.#awaitingValidationTarget = false;\n }\n this.#touched = true;\n this.#forceError = true;\n this.#shouldShowError();\n this?.validationMessageCallback?.(this.showError ? this.internals.validationMessage : '');\n };\n\n /** Return a reference to the control's form */\n get form(): HTMLFormElement {\n return this.internals.form;\n }\n\n /**\n * Will return true if it is recommended that the control shows an internal\n * error. If using this property, it is wise to listen for 'invalid' events\n * on the element host and call preventDefault on the event. Doing this will\n * prevent browsers from showing a validation popup.\n */\n get showError(): boolean {\n return this.#shouldShowError();\n }\n\n /**\n * Forward the internals checkValidity method\n * will return the valid state of the control.\n */\n checkValidity(): boolean {\n return this.internals.checkValidity();\n }\n\n /** The element's validity state */\n get validity(): ValidityState {\n return this.internals.validity;\n }\n\n /**\n * The validation message shown by a given Validator object. If the control\n * is in a valid state this should be falsy.\n */\n get validationMessage(): string {\n return this.internals.validationMessage;\n }\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n constructor(...args: any[]) {\n super(...args);\n this.addEventListener?.('focus', this.#onFocus);\n this.addEventListener?.('blur', this.#onBlur);\n this.addEventListener?.('invalid', this.#onInvalid);\n this.setValue(null);\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n\n /**\n * Check to see if a Validator is associated with the changed attribute.\n * If one exists, call control's validate function which will perform\n * control validation.\n */\n const proto = this.constructor as typeof FormControl;\n const validators = proto.getValidators(name);\n\n if (validators?.length && this.validationTarget) {\n this.setValue(this.#value);\n }\n }\n\n /** PUBLIC LIFECYCLE METHODS */\n\n /**\n * Sets the control's form value if the call to `shouldFormValueUpdate`\n * returns `true`.\n * @param value {FormValue} - The value to pass to the form\n */\n setValue(value: FormValue): void {\n this.#forceError = false;\n this.validationMessageCallback?.('');\n this.#value = value;\n const valueShouldUpdate = this.shouldFormValueUpdate();\n const valueToUpdate = valueShouldUpdate ? value : null;\n this.internals.setFormValue(valueToUpdate as string);\n this.#runValidators(valueToUpdate);\n if (this.valueChangedCallback) {\n this.valueChangedCallback(valueToUpdate);\n }\n this.#shouldShowError();\n }\n\n /**\n * This method can be overridden to determine if the control's form value\n * should be set on a call to `setValue`. An example of when a user might want\n * to skip this step is when implementing checkbox-like behavior, first checking\n * to see if `this.checked` is set to a truthy value. By default this returns\n * `true`.\n */\n shouldFormValueUpdate(): boolean {\n return true;\n }\n\n /** Save a reference to the validation complete resolver */\n #validationCompleteResolver?: (value: void | PromiseLike<void>) => void;\n\n /** When true validation will be pending */\n #isValidationPending = false;\n\n #validationComplete = Promise.resolve();\n\n /** A promise that will resolve when all pending validations are complete */\n get validationComplete(): Promise<void> {\n return new Promise(resolve => resolve(this.#validationComplete));\n }\n\n /** DECLARED INSTANCE METHODS AND PROPERTIES*/\n\n /**\n * Resets a form control to its initial state\n */\n declare resetFormControl: () => void;\n\n /**\n * This method is used to override the controls' validity message\n * for a given Validator key. This has the highest level of priority when\n * setting a validationMessage, so use this method wisely.\n *\n * The returned value will be used as the validationMessage for the given key.\n * @param validationKey {string} - The key that has returned invalid\n */\n declare validityCallback: (validationKey: string) => string | void;\n\n /**\n * Called when the control's validationMessage should be changed\n * @param message { string } - The new validation message\n */\n declare validationMessageCallback: (message: string) => void;\n\n /**\n * A callback for when the controls' form value changes. The value\n * passed to this function should not be confused with the control's\n * value property, this is the value that will appear on the form.\n *\n * In cases where `checked` did not exist on the control's prototype\n * upon initialization, this value and the value property will be identical;\n * in cases where `checked` is present upon initialization, this will be\n * effectively `this.checked && this.value`.\n */\n declare valueChangedCallback: (value: FormValue) => void;\n\n /**\n * The element that will receive focus when the control's validity\n * state is reported either by a form submission or via API\n *\n * We use declare since this is optional and we don't particularly\n * care how the consuming component implements this (as a field, member\n * or getter/setter)\n */\n declare validationTarget: HTMLElement | null;\n\n /** PRIVATE LIFECYCLE METHODS */\n\n /**\n * Check to see if an error should be shown. This method will also\n * update the internals state object with the --show-error state\n * if necessary.\n * @private\n */\n #shouldShowError(): boolean {\n if (this.hasAttribute('disabled')) {\n return false;\n }\n\n const showError = this.#forceError || (this.#touched && !this.validity.valid && !this.#focused);\n\n /**\n * At the time of writing Firefox doesn't support states\n * TODO: Remove when check for states when fully support is in place\n */\n if (showError && this.internals.states) {\n this.internals.states.add('--show-error');\n } else if (this.internals.states) {\n this.internals.states.delete('--show-error');\n }\n\n return showError;\n }\n\n #runValidators(value: FormValue): void {\n const proto = this.constructor as typeof FormControl;\n const validity: CustomValidityState = {};\n const validators = proto.validators;\n const asyncValidators: Promise<boolean|void>[] = [];\n const hasAsyncValidators = validators.some((validator) => validator.isValid instanceof Promise)\n\n if (!this.#isValidationPending) {\n this.#validationComplete = new Promise(resolve => {\n this.#validationCompleteResolver = resolve\n });\n this.#isValidationPending = true;\n }\n\n /**\n * If an abort controller exists from a previous validation step\n * notify still-running async validators that we are requesting they\n * discontinue any work.\n */\n if (this.#abortController) {\n this.#abortController.abort();\n this.#previousAbortController = this.#abortController;\n }\n\n /**\n * Create a new abort controller and replace the instance reference\n * so we can clean it up for next time\n */\n const abortController = new AbortController();\n this.#abortController = abortController;\n let validationMessage: string | undefined = undefined;\n\n /** Track to see if any validity key has changed */\n let hasChange = false;\n\n if (!validators.length) {\n return;\n }\n\n validators.forEach(validator => {\n const key = validator.key || 'customError';\n const isValid = validator.isValid(this, value, abortController.signal);\n const isAsyncValidator = isValid instanceof Promise;\n\n if (isAsyncValidator) {\n asyncValidators.push(isValid);\n\n isValid.then(isValidatorValid => {\n if (isValidatorValid === undefined || isValidatorValid === null) {\n return;\n }\n /** Invert the validity state to correspond to the ValidityState API */\n validity[key] = !isValidatorValid;\n\n validationMessage = this.#getValidatorMessageForValue(validator, value);\n this.#setValidityWithOptionalTarget(validity, validationMessage);\n });\n } else {\n /** Invert the validity state to correspond to the ValidityState API */\n validity[key] = !isValid;\n\n if (this.validity[key] !== !isValid) {\n hasChange = true;\n }\n\n // only update the validationMessage for the first invalid scenario\n // so that earlier invalid validators dont get their messages overwritten by later ones\n // in the validators array\n if (!isValid && !validationMessage) {\n validationMessage = this.#getValidatorMessageForValue(validator, value);\n }\n }\n });\n\n /** Once all the async validators have settled, resolve validationComplete */\n Promise.allSettled(asyncValidators)\n .then(() => {\n /** Don't resolve validations if the signal is aborted */\n if (!abortController?.signal.aborted) {\n this.#isValidationPending = false;\n this.#validationCompleteResolver?.();\n }\n });\n\n /**\n * If async validators are present:\n * Only run updates when a sync validator has a change. This is to prevent\n * situations where running sync validators can override async validators\n * that are still in progress\n *\n * If async validators are not present, always update validity\n */\n if (hasChange || !hasAsyncValidators) {\n this.#setValidityWithOptionalTarget(validity, validationMessage);\n }\n }\n\n /**\n * If the validationTarget is not set, the user can decide how they would\n * prefer to handle focus when the field is validated.\n */\n #setValidityWithOptionalTarget(validity: Partial<ValidityState>, validationMessage: string|undefined): void {\n if (this.validationTarget) {\n this.internals.setValidity(validity, validationMessage, this.validationTarget);\n this.#awaitingValidationTarget = false;\n } else {\n this.internals.setValidity(validity, validationMessage);\n\n if (this.internals.validity.valid) {\n return;\n }\n\n /**\n * Sets mark the component as awaiting a validation target\n * if the element dispatches an invalid event, the #onInvalid listener\n * will check to see if the validation target has been set since this call\n * has run. This useful in cases like Lit's use of the query\n * decorator for setting the validationTarget or any scenario\n * where the validationTarget isn't available upon construction\n */\n this.#awaitingValidationTarget = true;\n }\n }\n\n /** Process the validator message attribute */\n #getValidatorMessageForValue(validator: Validator, value: FormValue): string {\n /** If the validity callback exists and returns, use that as the result */\n if (this.validityCallback) {\n const message = this.validityCallback(validator.key || 'customError');\n\n if (message) {\n return message;\n }\n }\n\n if (validator.message instanceof Function) {\n return (validator.message as validationMessageCallback)(this, value);\n } else {\n return validator.message as string;\n }\n }\n\n /** Reset control state when the form is reset */\n formResetCallback() {\n this.#touched = false;\n this.#forceError = false;\n this.#shouldShowError();\n this.resetFormControl?.();\n\n this.validationMessageCallback?.(\n this.#shouldShowError() ? this.validationMessage : ''\n );\n }\n }\n\n return FormControl as Constructor<FormControlInterface> & TBase;\n}\n", "import { i18n } from '@lingui/core';\nimport { FormControlMixin } from '@open-wc/form-control';\nimport { css, html, LitElement, nothing, PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { activateI18n } from '../i18n';\nimport { messages as daMessages } from './locales/da/messages.mjs';\nimport { messages as enMessages } from './locales/en/messages.mjs';\nimport { messages as fiMessages } from './locales/fi/messages.mjs';\nimport { messages as nbMessages } from './locales/nb/messages.mjs';\nimport { messages as svMessages } from './locales/sv/messages.mjs';\n\nactivateI18n(enMessages, nbMessages, fiMessages, daMessages, svMessages);\n\nconst REQUIRED_MESSAGE = () =>\n i18n._({\n id: 'checkbox-group.validation.required',\n message: 'At least one selection is required.',\n comment: 'Shown when required checkbox group has no selections',\n });\n\nexport class WCheckboxGroup extends FormControlMixin(LitElement) {\n // Use delegatesFocus so focus delegates to an internal focusable element\n static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n /**\n * The group label displayed above the checkboxes.\n *\n * Use this to describe the shared question or topic for the checkbox options. The label is connected to the internal group for assistive technologies.\n */\n @property({ type: String, reflect: true })\n label: string;\n\n /**\n * The name applied to child checkboxes when they do not provide one.\n *\n * Use this when the grouped checkboxes should submit values under the same form field name. Individual checkboxes can still override the group name with their own `name`.\n */\n @property({ type: String, reflect: true })\n name: string;\n\n /**\n * Whether to show optional text next to the label.\n *\n * Use this to indicate that selecting an option from the group is not required.\n */\n @property({ type: Boolean, reflect: true })\n optional = false;\n\n /**\n * Help text displayed below the checkbox group.\n *\n * Use this for supporting guidance or validation feedback. When required validation fails, the group replaces this text with the localized required message.\n */\n @property({ type: String, reflect: true, attribute: 'help-text' })\n helpText: string;\n\n /**\n * Whether at least one checkbox in the group must be selected.\n *\n * Required validation is managed by the group. The individual checkboxes provide the submitted form values.\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * Whether the checkbox group is visually invalid.\n *\n * Use this to show an externally managed validation error for the group. The invalid state is also shared with child checkboxes for consistent styling and accessibility state.\n */\n @property({ type: Boolean, reflect: true })\n invalid = false;\n\n // Track whether the user has interacted with the group.\n #hasInteracted = false;\n\n // Track whether we've warned about missing name in a form.\n #hasWarnedMissingName = false;\n\n // Internal tabindex for the focusable wrapper element (reactive)\n @state()\n private _internalTabIndex = -1;\n\n #unsubscribeI18n?: () => void;\n\n static styles = css`\n .wrapper {\n display: inline-flex;\n flex-direction: column;\n gap: 16px;\n }\n\n .checkbox-group {\n display: grid;\n gap: 16px;\n }\n\n .label {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--w-font-size-s);\n line-height: var(--w-line-height-s);\n font-weight: 700;\n color: var(--w-s-color-text);\n }\n\n .optional {\n font-weight: 400;\n color: var(--w-s-color-text-subtle);\n }\n\n .help-text {\n display: block;\n font-size: var(--w-font-size-xs);\n line-height: var(--w-line-height-xs);\n color: var(--w-s-color-text-subtle);\n }\n\n .error {\n color: var(--w-s-color-text-negative);\n }\n `;\n\n render() {\n const hasSelection = this.#getCheckedCount() > 0;\n const requiredInvalid = this.required && !hasSelection;\n const showRequiredError = requiredInvalid && this.#hasInteracted;\n const isInvalid = this.invalid || showRequiredError;\n const helpText = isInvalid ? this.#getRequiredMessage() : this.helpText;\n const helpId = helpText ? 'checkbox-group__help' : undefined;\n const labelId = this.label ? 'checkbox-group__label' : undefined;\n const ariaInvalid = isInvalid ? 'true' : undefined;\n\n return html`\n <div class=\"wrapper\" tabindex=\"${this._internalTabIndex}\">\n ${this.label\n ? html`\n <div class=\"label\" id=\"${labelId}\">\n <span>${this.label}</span>\n ${this.optional\n ? html`\n <span class=\"optional\">\n ${i18n._({\n id: 'checkbox-group.label.optional',\n message: 'Optional',\n comment: 'Shown behind label when marked as optional',\n })}\n </span>\n `\n : nothing}\n </div>\n `\n : nothing}\n <div\n class=\"checkbox-group\"\n role=\"group\"\n aria-labelledby=${ifDefined(labelId)}\n aria-describedby=${ifDefined(helpId)}\n aria-invalid=${ifDefined(ariaInvalid)}\n >\n <slot></slot>\n </div>\n ${helpText\n ? html`<div class=\"${isInvalid ? 'help-text error' : 'help-text'}\" id=\"${helpId}\">${helpText}</div>`\n : nothing}\n </div>\n `;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('change', this.#handleChange);\n this.addEventListener('invalid', this.#handleInvalid);\n this.addEventListener('slotchange', this.#handleSlotChange);\n this.#unsubscribeI18n = i18n.on('change', this.#handleI18nChange);\n this.setValue(null);\n this.#warnIfMissingName();\n }\n\n disconnectedCallback(): void {\n this.#unsubscribeI18n?.();\n this.#unsubscribeI18n = undefined;\n super.disconnectedCallback();\n }\n\n /** Checks whether the group passes constraint validation */\n checkValidity(): boolean {\n this.#updateValidity();\n return this.internals.checkValidity();\n }\n\n /** Checks validity and shows the validation message if invalid */\n reportValidity(): boolean {\n this.#markInteracted();\n this.#updateValidity();\n return this.internals.checkValidity();\n }\n\n /** Sets focus on the checkbox group. */\n focus(options?: FocusOptions) {\n const anchor = this.#getValidationAnchor() as HTMLElement | undefined;\n if (anchor?.focus) {\n anchor.focus(options);\n return;\n }\n HTMLElement.prototype.focus.call(this, options);\n }\n\n #handleChange = () => {\n this.#markInteracted();\n this.#updateValidity();\n this.requestUpdate();\n };\n\n #handleInvalid = () => {\n this.#markInteracted();\n this.#updateValidity();\n this.requestUpdate();\n };\n\n #handleSlotChange = () => {\n this.#applyGroupName();\n this.#updateValidity();\n this.requestUpdate();\n };\n\n #markInteracted(): void {\n this.#hasInteracted = true;\n }\n\n #handleI18nChange = () => {\n this.requestUpdate();\n };\n\n #getCheckedCount(): number {\n return this.#getAssignedElements().filter(el => (el as { checked?: boolean }).checked).length;\n }\n\n #applyGroupName(): void {\n if (!this.name) return;\n for (const el of this.#getAssignedElements()) {\n // Use non-reflecting _groupName to avoid DOM changes during hydration\n const checkbox = el as { _groupName?: string; name?: string };\n if (checkbox && typeof checkbox === 'object' && !checkbox.name) {\n checkbox._groupName = this.name;\n }\n }\n }\n\n #syncChildInvalid(isInvalid: boolean): void {\n for (const el of this.#getAssignedElements()) {\n // Use non-reflecting _groupInvalid to avoid DOM changes during hydration\n if ('_groupInvalid' in el) {\n (el as { _groupInvalid: boolean })._groupInvalid = isInvalid;\n }\n }\n }\n\n #getValidationAnchor(): HTMLElement | undefined {\n return this.#getAssignedElements()[0] as HTMLElement | undefined;\n }\n\n #getAssignedElements(): Element[] {\n const slot = this.shadowRoot?.querySelector('slot');\n return slot?.assignedElements({ flatten: true }) ?? [];\n }\n\n #getRequiredMessage(): string {\n return REQUIRED_MESSAGE();\n }\n\n updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n\n if (this.#shouldUpdateValidity(changedProperties)) {\n if (changedProperties.has('name')) {\n this.#applyGroupName();\n }\n this.#updateValidity();\n }\n }\n\n #shouldUpdateValidity(changedProperties: PropertyValues<this>): boolean {\n return (\n changedProperties.has('invalid') ||\n changedProperties.has('required') ||\n changedProperties.has('helpText') ||\n changedProperties.has('name')\n );\n }\n\n #setValidityState(state: ValidityStateFlags): void {\n // Suppress native validation popovers (Safari) and provide a focusable anchor.\n const anchor = this.#getValidationAnchor();\n this.internals.setValidity(state, ' ', anchor ?? undefined);\n }\n\n #syncInternalTabIndex(shouldBeFocusable: boolean): void {\n // Use internal tabindex to avoid DOM changes on host during hydration\n this._internalTabIndex = shouldBeFocusable ? 0 : -1;\n }\n\n #updateValidity(): void {\n this.#warnIfMissingName();\n const hasSelection = this.#getCheckedCount() > 0;\n const requiredInvalid = this.required && !hasSelection;\n const externalInvalid = this.invalid;\n const showRequiredError = requiredInvalid && this.#hasInteracted;\n const showInvalidUi = externalInvalid || showRequiredError;\n\n this.#syncInternalTabIndex(showInvalidUi);\n\n if (requiredInvalid) {\n this.#setValidityState({ valueMissing: true });\n this.#syncChildInvalid(showInvalidUi);\n return;\n }\n\n if (externalInvalid) {\n this.#setValidityState({ customError: true });\n this.#syncChildInvalid(true);\n return;\n }\n\n this.internals.setValidity({});\n this.#syncChildInvalid(false);\n }\n\n #warnIfMissingName(): void {\n if (this.#hasWarnedMissingName) return;\n if (!this.internals.form) return;\n if (this.name && this.name.trim().length > 0) return;\n console.warn('w-checkbox-group: \"name\" is required for form submission.');\n this.#hasWarnedMissingName = true;\n }\n}\n\nif (!customElements.get('w-checkbox-group')) {\n customElements.define('w-checkbox-group', WCheckboxGroup);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'w-checkbox-group': WCheckboxGroup;\n }\n}\n", "import { i18n, Messages } from '@lingui/core';\n\nexport const supportedLocales = ['en', 'nb', 'fi', 'da', 'sv'] as const;\ntype SupportedLocale = (typeof supportedLocales)[number];\n\nexport const defaultLocale = 'en';\n\nexport const getSupportedLocale = (usedLocale: string) => {\n return (\n supportedLocales.find((locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)) ||\n defaultLocale\n );\n};\n\nexport function detectLocale(): SupportedLocale {\n if (typeof window === 'undefined') {\n /**\n * Server locale detection. This requires e.g LANG environment variable to be set on the server.\n */\n const serverLocale = process.env.NMP_LANGUAGE || Intl.DateTimeFormat().resolvedOptions().locale;\n return getSupportedLocale(serverLocale);\n }\n\n try {\n /**\n * Client locale detection. Expects the lang attribute to be defined.\n */\n const htmlLocale = getDocumentLang(document);\n if (htmlLocale) {\n return getSupportedLocale(htmlLocale);\n }\n\n const frameLocale = getFrameElementLang();\n if (frameLocale) {\n return getSupportedLocale(frameLocale);\n }\n\n const parentLocale = getDocumentLang(getParentDocument());\n if (parentLocale) {\n return getSupportedLocale(parentLocale);\n }\n\n return defaultLocale;\n } catch (e) {\n console.warn('could not detect locale, falling back to source locale', e);\n return defaultLocale;\n }\n}\n\nexport const getMessages = (\n locale: SupportedLocale,\n enMsg: Messages,\n nbMsg: Messages,\n fiMsg: Messages,\n daMsg: Messages,\n svMsg: Messages,\n) => {\n if (locale === 'nb') return nbMsg;\n if (locale === 'fi') return fiMsg;\n if (locale === 'da') return daMsg;\n if (locale === 'sv') return svMsg;\n // Default to English\n return enMsg;\n};\n\nexport const activateI18n = (\n enMessages: Messages,\n nbMessages: Messages,\n fiMessages: Messages,\n daMessages: Messages,\n svMessages: Messages,\n) => {\n // Load all locales upfront to support dynamic locale switching\n i18n.load('en', enMessages);\n i18n.load('nb', nbMessages);\n i18n.load('fi', fiMessages);\n i18n.load('da', daMessages);\n i18n.load('sv', svMessages);\n\n const locale = detectLocale();\n i18n.activate(locale);\n notifyI18nChange();\n\n setupLangObserver();\n};\n\nexport const I18N_CHANGE_EVENT = 'warp-i18n-change';\n\nexport function notifyI18nChange() {\n if (typeof window === 'undefined') return;\n window.dispatchEvent(new Event(I18N_CHANGE_EVENT));\n}\n\nlet langObserverInitialized = false;\n\nfunction setupLangObserver() {\n if (langObserverInitialized) return;\n if (typeof window === 'undefined') return;\n if (!document?.documentElement) return;\n\n langObserverInitialized = true;\n\n const handleLangChange = () => {\n const nextLocale = detectLocale();\n if (i18n.locale !== nextLocale) {\n i18n.activate(nextLocale);\n notifyI18nChange();\n }\n };\n\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'lang') {\n handleLangChange();\n break;\n }\n }\n });\n\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] });\n\n const parentDocument = getParentDocument();\n if (parentDocument && parentDocument.documentElement && parentDocument !== document) {\n observer.observe(parentDocument.documentElement, { attributes: true, attributeFilter: ['lang'] });\n }\n\n const frameEl = getFrameElement();\n if (frameEl) {\n observer.observe(frameEl, { attributes: true, attributeFilter: ['lang'] });\n }\n}\n\nfunction getParentDocument(): Document | null {\n try {\n return window.parent?.document ?? null;\n } catch {\n return null;\n }\n}\n\nfunction getDocumentLang(doc: Document | null | undefined): string {\n try {\n return doc?.documentElement?.lang ?? '';\n } catch {\n return '';\n }\n}\n\nfunction getFrameElement(): HTMLElement | null {\n try {\n return (window.frameElement as HTMLElement | null) ?? null;\n } catch {\n return null;\n }\n}\n\nfunction getFrameElementLang(): string {\n try {\n return window.frameElement?.getAttribute?.('lang') ?? '';\n } catch {\n return '';\n }\n}\n", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"checkbox-group.label.optional\\\":[\\\"Valgfri\\\"],\\\"checkbox-group.validation.required\\\":[\\\"Mindst \u00E9n valgt mulighed er p\u00E5kr\u00E6vet.\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"checkbox-group.label.optional\\\":[\\\"Optional\\\"],\\\"checkbox-group.validation.required\\\":[\\\"At least one selection is required.\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"checkbox-group.label.optional\\\":[\\\"Valinnainen\\\"],\\\"checkbox-group.validation.required\\\":[\\\"V\u00E4hint\u00E4\u00E4n yksi valinta vaaditaan.\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"checkbox-group.label.optional\\\":[\\\"Valgfri\\\"],\\\"checkbox-group.validation.required\\\":[\\\"Minst ett valg er p\u00E5krevd.\\\"]}\");", "/*eslint-disable*/export const messages=JSON.parse(\"{\\\"checkbox-group.label.optional\\\":[\\\"Valfritt\\\"],\\\"checkbox-group.validation.required\\\":[\\\"Minst ett val kr\u00E4vs.\\\"]}\");"],
5
+ "mappings": "4kBAEA,IAAMA,EAAYC,GAAM,OAAOA,GAAM,SAC/BC,GAAcC,GAAM,OAAOA,GAAM,WAEjCC,GAAwB,IAAI,IAC5BC,GAAgB,KACtB,SAASC,GAAiBC,EAAS,CAEjC,MAAO,CAAC,GADI,MAAM,QAAQA,CAAO,EAAIA,EAAU,CAACA,CAAO,EACvCF,EAAa,CAC/B,CACA,SAASG,GAAKD,EAASE,EAAOC,EAAQ,CACpC,IAAMC,EAAWL,GAAiBC,CAAO,EACpCG,IACHA,EAAS,WAEX,IAAIE,EACJ,GAAI,OAAOF,GAAW,SAMpB,OALAE,EAAI,CACF,IAAK,UACL,MAAO,QACP,KAAM,SACR,EACQF,EAAQ,CACd,IAAK,OACHE,EAAE,QAAU,OACd,IAAK,OACHA,EAAE,MAAQ,OACV,MACF,IAAK,QACHA,EAAE,MAAQ,UACV,KACJ,MAEAA,EAAIF,EAMN,OAJkBG,EAChB,IAAMC,EAAS,OAAQH,EAAUD,CAAM,EACvC,IAA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AC,GA5B/BhC,EA6BX,wBAQA+B,EAAA,CADCC,EAAS,CAAE,KAAM,OAAQ,QAAS,GAAM,UAAW,WAAY,CAAC,GApCtDhC,EAqCX,wBAQA+B,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GA5C/BhC,EA6CX,wBAQA+B,EAAA,CADCC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GApD/BhC,EAqDX,uBAUQ+B,EAAA,CADPN,GAAM,GA9DIzB,EA+DH,iCAiQL,eAAe,IAAI,kBAAkB,GACxC,eAAe,OAAO,mBAAoBA,CAAc",
6
6
  "names": ["isString", "s", "isFunction", "f", "cache", "defaultLocale", "normalizeLocales", "locales", "date", "value", "format", "_locales", "o", "getMemoized", "cacheKey", "time", "number", "plural", "ordinal", "offset", "rules", "_a", "_b", "plurals", "getKey", "construct", "key", "formatter", "type", "options", "localeKey", "ESCAPE_SEQUENCE_REGEX", "decodeEscapeSequences", "str", "_", "unicode", "hex", "codePoint", "OCTOTHORPE_PH", "getDefaultFormats", "locale", "passedLocales", "formats", "locales", "style", "format", "replaceOctothorpe", "value", "message", "numberFormat", "valueStr", "number", "cases", "offset", "plural", "selectFormatter", "date", "time", "rules", "_a", "interpolate", "translation", "values", "formatters", "formatMessage", "tokens", "token", "isString", "name", "type", "interpolatedFormat", "key", "value2", "formatter", "result", "__defProp$1", "__defNormalProp$1", "obj", "__publicField$1", "EventEmitter", "event", "listener", "maybeListeners", "index", "args", "__defProp", "__defNormalProp", "__publicField", "I18n", "params", "defaultLocale", "localeData", "maybeLocaleData", "compiler", "localeOrAllData", "messages", "maybeMessages", "localeOrMessages", "messages2", "id", "options", "messageForId", "messageMissing", "missing", "isFunction", "setupI18n", "i18n", "FormControlMixin", "SuperClass", "FormControl", "args", "_FormControl_focused", "_FormControl_forceError", "_FormControl_touched", "_FormControl_abortController", "_FormControl_previousAbortController", "_FormControl_awaitingValidationTarget", "_FormControl_value", "_FormControl_onFocus", "__classPrivateFieldSet", "__classPrivateFieldGet", "_FormControl_instances", "_FormControl_shouldShowError", "_FormControl_onBlur", "_FormControl_runValidators", "showError", "_FormControl_onInvalid", "_a", "_FormControl_validationCompleteResolver", "_FormControl_isValidationPending", "_FormControl_validationComplete", "_b", "_c", "validatorAttributes", "validator", "observedAttributes", "attribute", "name", "oldValue", "newValue", "validators", "value", "valueToUpdate", "resolve", "rootNode", "selector", "proto", "validity", "asyncValidators", "hasAsyncValidators", "abortController", "validationMessage", "hasChange", "key", "isValid", "isValidatorValid", "_FormControl_getValidatorMessageForValue", "_FormControl_setValidityWithOptionalTarget", "message", "css", "html", "LitElement", "nothing", "property", "state", "ifDefined", "supportedLocales", "defaultLocale", "getSupportedLocale", "usedLocale", "locale", "detectLocale", "serverLocale", "htmlLocale", "getDocumentLang", "frameLocale", "getFrameElementLang", "parentLocale", "getParentDocument", "e", "activateI18n", "enMessages", "nbMessages", "fiMessages", "daMessages", "svMessages", "i18n", "locale", "detectLocale", "notifyI18nChange", "setupLangObserver", "I18N_CHANGE_EVENT", "langObserverInitialized", "handleLangChange", "nextLocale", "observer", "mutations", "mutation", "parentDocument", "getParentDocument", "frameEl", "getFrameElement", "_a", "_b", "getDocumentLang", "doc", "e", "getFrameElementLang", "_c", "messages", "messages", "messages", "messages", "messages", "activateI18n", "messages", "REQUIRED_MESSAGE", "i18n", "_hasInteracted", "_hasWarnedMissingName", "_unsubscribeI18n", "_handleChange", "_handleInvalid", "_handleSlotChange", "_WCheckboxGroup_instances", "markInteracted_fn", "_handleI18nChange", "getCheckedCount_fn", "applyGroupName_fn", "syncChildInvalid_fn", "getValidationAnchor_fn", "getAssignedElements_fn", "getRequiredMessage_fn", "shouldUpdateValidity_fn", "setValidityState_fn", "syncInternalTabIndex_fn", "updateValidity_fn", "warnIfMissingName_fn", "WCheckboxGroup", "FormControlMixin", "LitElement", "__privateAdd", "__privateMethod", "hasSelection", "showRequiredError", "__privateGet", "isInvalid", "helpText", "helpId", "labelId", "ariaInvalid", "html", "nothing", "ifDefined", "__privateSet", "_a", "options", "anchor", "changedProperties", "el", "checkbox", "_b", "slot", "state", "shouldBeFocusable", "requiredInvalid", "externalInvalid", "showInvalidUi", "css", "__decorateClass", "property"]
7
7
  }
@@ -49,5 +49,29 @@ describe('w-combobox accessibility (WCAG 2.2)', () => {
49
49
  const page = render(html `<w-combobox label="Select a fruit" open-on-focus .options="${sampleOptions}"></w-combobox>`);
50
50
  await expect(page).toHaveNoAxeViolations();
51
51
  });
52
+ test('with light-DOM option children has no violations', async () => {
53
+ const page = render(html `
54
+ <w-combobox label="Select a fruit">
55
+ <option value="apple">Apple</option>
56
+ <option value="banana">Banana</option>
57
+ <option value="orange">Orange</option>
58
+ </w-combobox>
59
+ `);
60
+ await expect(page).toHaveNoAxeViolations();
61
+ });
62
+ test('open with light-DOM option children has no violations', async () => {
63
+ const page = render(html `
64
+ <w-combobox data-testid="combobox" label="Select a fruit" open-on-focus>
65
+ <option value="apple">Apple</option>
66
+ <option value="banana">Banana</option>
67
+ <option value="orange">Orange</option>
68
+ </w-combobox>
69
+ `);
70
+ const el = (await page.getByTestId('combobox').element());
71
+ const input = el?.shadowRoot?.querySelector('w-textfield')?.shadowRoot?.querySelector('input');
72
+ input?.focus();
73
+ await new Promise((resolve) => setTimeout(resolve, 100));
74
+ await expect(page).toHaveNoAxeViolations();
75
+ });
52
76
  });
53
77
  });
@@ -12,79 +12,94 @@ declare const WarpCombobox_base: import("@open-wc/form-control").Constructor<imp
12
12
  */
13
13
  export declare class WarpCombobox extends WarpCombobox_base {
14
14
  #private;
15
- /** The available options to select from
16
- * @summary
17
- * @description
15
+ /**
16
+ * The available options to select from.
17
+ *
18
+ * Use this for framework usage, application state, or remote search results. When `options` contains entries, it is used instead of child `<option>` elements.
18
19
  */
19
20
  options: ComboboxOption[];
20
- /** Label above input
21
- * @summary
22
- * @description
21
+ /**
22
+ * The label displayed above the input.
23
+ *
24
+ * Use this to give the combobox a visible and accessible name.
23
25
  */
24
26
  label?: string;
25
- /** Input placeholder
26
- * @summary
27
- * @description
27
+ /**
28
+ * Placeholder text displayed when the input is empty.
29
+ *
30
+ * Use this as a short hint for the expected input. Do not use placeholder text as a replacement for a label.
28
31
  */
29
32
  placeholder?: string;
30
- /** The input value
31
- * @summary
32
- * @description
33
+ /**
34
+ * The selected or typed value.
35
+ *
36
+ * When an option is selected, this is set to the option value. The displayed text may differ when the option has a separate label.
33
37
  */
34
38
  value: string;
35
- /** Whether the popover opens when focus is on the text field
36
- * @summary
37
- * @description
39
+ /**
40
+ * Whether the option list opens when the input receives focus.
41
+ *
42
+ * Use this when users should see available options before they start typing.
38
43
  */
39
44
  openOnFocus: boolean;
40
- /** Select active option on blur
41
- * @summary
42
- * @description
45
+ /**
46
+ * Whether the active option is selected when the input loses focus.
47
+ *
48
+ * When enabled, the combobox selects the keyboard-highlighted option, or an option whose value exactly matches the current input value, on blur.
43
49
  */
44
50
  selectOnBlur: boolean;
45
- /** Whether the matching text segments in the options should be highlighted
46
- * @summary
47
- * @description
51
+ /**
52
+ * Whether matching text segments in options are highlighted.
53
+ *
54
+ * Use this to visually emphasize the part of each option that matches the current input value.
48
55
  */
49
56
  matchTextSegments: boolean;
50
- /** Disable client-side static filtering
51
- * @summary
52
- * @description
57
+ /**
58
+ * Whether built-in client-side filtering is disabled.
59
+ *
60
+ * Use this for remote search or externally filtered results. When disabled, all entries in `options` are rendered as provided.
53
61
  */
54
62
  disableStaticFiltering: boolean;
55
- /** Renders the input field in an invalid state
56
- * @summary
57
- * @description
63
+ /**
64
+ * Whether the combobox is visually invalid.
65
+ *
66
+ * Use this to show an externally managed validation error. Pair it with `help-text` to explain how to fix the error.
58
67
  */
59
68
  invalid: boolean;
60
- /** The content to display as the help text
61
- * @summary
62
- * @description
69
+ /**
70
+ * Help text displayed below the input.
71
+ *
72
+ * Use this for supporting guidance or validation feedback.
63
73
  */
64
74
  helpText?: string;
65
- /** Whether the element is disabled
66
- * @summary
67
- * @description
75
+ /**
76
+ * Whether the combobox is disabled.
77
+ *
78
+ * Disabled comboboxes cannot be focused, changed, or submitted with form data.
68
79
  */
69
80
  disabled: boolean;
70
- /** Whether the element is required
71
- * @summary
72
- * @description
81
+ /**
82
+ * Whether the combobox is required before form submission.
83
+ *
84
+ * Use this when the user must provide a value before submitting the form.
73
85
  */
74
86
  required: boolean;
75
- /** Whether to show optional text
76
- * @summary
77
- * @description
87
+ /**
88
+ * Whether to show optional text next to the label.
89
+ *
90
+ * Use this to indicate that the combobox is not required.
78
91
  */
79
92
  optional: boolean;
80
- /** Name attribute for form submission
81
- * @summary
82
- * @description
93
+ /**
94
+ * The name submitted with the combobox value.
95
+ *
96
+ * Use this when the combobox belongs to a form and its value should be included in form data.
83
97
  */
84
98
  name?: string;
85
- /** Autocomplete attribute for the input field
86
- * @summary
87
- * @description
99
+ /**
100
+ * The autocomplete attribute passed to the internal input.
101
+ *
102
+ * Defaults to `off`. Set this when browser autocomplete should be enabled or scoped to a specific autocomplete token.
88
103
  */
89
104
  autocomplete?: string;
90
105
  /** @internal Options list open boolean */
@@ -93,6 +108,8 @@ export declare class WarpCombobox extends WarpCombobox_base {
93
108
  private _navigationOption;
94
109
  /** @internal Available options based on user's input value */
95
110
  private _currentOptions;
111
+ /** @internal Options parsed from light-DOM <option> children */
112
+ private _lightDomOptions;
96
113
  /** @internal Unique identifier counter for options */
97
114
  private _optionIdCounter;
98
115
  /** @internal The text displayed in the input field (may differ from value when option has label) */
@@ -102,9 +119,12 @@ export declare class WarpCombobox extends WarpCombobox_base {
102
119
  firstUpdated(changedProps: Map<string, unknown>): void;
103
120
  updated(changedProperties: Map<string, unknown>): void;
104
121
  resetFormControl(): void;
122
+ connectedCallback(): void;
123
+ disconnectedCallback(): void;
105
124
  private get _listboxId();
106
125
  private get _id();
107
126
  private get _helpId();
127
+ private get _sourceOptions();
108
128
  /** Get the display text for the navigation option or current display value */
109
129
  private get _navigationLabelOrDisplayValue();
110
130
  /** Get the actual value for the navigation option or current value */