@unidy.io/sdk 1.1.6 → 1.1.7

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 (79) hide show
  1. package/dist/cjs/u-field.u-raw-field.entry.cjs.js.map +1 -1
  2. package/dist/cjs/u-field_2.cjs.entry.js +1 -1
  3. package/dist/cjs/u-flash-message.cjs.entry.js +2 -2
  4. package/dist/cjs/u-flash-message.entry.cjs.js.map +1 -1
  5. package/dist/cjs/u-password-field.cjs.entry.js +6 -4
  6. package/dist/cjs/u-password-field.entry.cjs.js.map +1 -1
  7. package/dist/cjs/u-profile.u-submit-button.entry.cjs.js.map +1 -1
  8. package/dist/cjs/u-profile_2.cjs.entry.js +1 -1
  9. package/dist/cjs/u-reset-password-button.cjs.entry.js +12 -3
  10. package/dist/cjs/u-reset-password-button.entry.cjs.js.map +1 -1
  11. package/dist/cjs/u-signin-root.entry.cjs.js.map +1 -1
  12. package/dist/cjs/u-social-login-button.cjs.entry.js +1 -1
  13. package/dist/cjs/u-spinner.cjs.entry.js +1 -1
  14. package/dist/cjs/u-spinner.entry.cjs.js.map +1 -1
  15. package/dist/collection/auth/components/password-field/password-field.js +6 -4
  16. package/dist/collection/auth/components/password-field/password-field.js.map +1 -1
  17. package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js +12 -3
  18. package/dist/collection/auth/components/reset-pass-button/reset-pass-button.js.map +1 -1
  19. package/dist/collection/auth/components/signin-root/signin-root.js.map +1 -1
  20. package/dist/collection/profile/components/field/field.css +1 -1
  21. package/dist/collection/shared/components/flash-message/flash-message.css +1 -1
  22. package/dist/collection/shared/components/flash-message/flash-message.js +2 -2
  23. package/dist/collection/shared/components/flash-message/flash-message.js.map +1 -1
  24. package/dist/collection/shared/components/spinner/spinner.css +1 -1
  25. package/dist/collection/shared/components/submit-button/submit-button.css +1 -1
  26. package/dist/components/field.js +1 -1
  27. package/dist/components/field.js.map +1 -1
  28. package/dist/components/spinner.js +1 -1
  29. package/dist/components/spinner.js.map +1 -1
  30. package/dist/components/submit-button.js +1 -1
  31. package/dist/components/submit-button.js.map +1 -1
  32. package/dist/components/u-flash-message.js +2 -2
  33. package/dist/components/u-flash-message.js.map +1 -1
  34. package/dist/components/u-password-field.js +6 -4
  35. package/dist/components/u-password-field.js.map +1 -1
  36. package/dist/components/u-reset-password-button.js +12 -3
  37. package/dist/components/u-reset-password-button.js.map +1 -1
  38. package/dist/components/u-signin-root.js.map +1 -1
  39. package/dist/esm/u-field.u-raw-field.entry.js.map +1 -1
  40. package/dist/esm/u-field_2.entry.js +1 -1
  41. package/dist/esm/u-flash-message.entry.js +2 -2
  42. package/dist/esm/u-flash-message.entry.js.map +1 -1
  43. package/dist/esm/u-password-field.entry.js +6 -4
  44. package/dist/esm/u-password-field.entry.js.map +1 -1
  45. package/dist/esm/u-profile.u-submit-button.entry.js.map +1 -1
  46. package/dist/esm/u-profile_2.entry.js +1 -1
  47. package/dist/esm/u-reset-password-button.entry.js +12 -3
  48. package/dist/esm/u-reset-password-button.entry.js.map +1 -1
  49. package/dist/esm/u-signin-root.entry.js.map +1 -1
  50. package/dist/esm/u-social-login-button.entry.js +1 -1
  51. package/dist/esm/u-spinner.entry.js +1 -1
  52. package/dist/esm/u-spinner.entry.js.map +1 -1
  53. package/dist/sdk/{p-5cc20a8b.entry.js → p-09cd77e6.entry.js} +2 -2
  54. package/dist/sdk/{p-5cc20a8b.entry.js.map → p-09cd77e6.entry.js.map} +1 -1
  55. package/dist/sdk/{p-e3611b71.entry.js → p-5557b4d9.entry.js} +2 -2
  56. package/dist/sdk/{p-e3611b71.entry.js.map → p-5557b4d9.entry.js.map} +1 -1
  57. package/dist/sdk/p-6086d248.entry.js +2 -0
  58. package/dist/sdk/{p-effaf86b.entry.js.map → p-6086d248.entry.js.map} +1 -1
  59. package/dist/sdk/p-7a34f391.entry.js +2 -0
  60. package/dist/sdk/{p-7a0cefff.entry.js.map → p-7a34f391.entry.js.map} +1 -1
  61. package/dist/sdk/p-afc65acd.entry.js +2 -0
  62. package/dist/sdk/p-afc65acd.entry.js.map +1 -0
  63. package/dist/sdk/{p-c31dbbb4.entry.js → p-b3980341.entry.js} +2 -2
  64. package/dist/sdk/{p-e3f28800.entry.js → p-f5615938.entry.js} +2 -2
  65. package/dist/sdk/{p-e3f28800.entry.js.map → p-f5615938.entry.js.map} +1 -1
  66. package/dist/sdk/sdk.esm.js +1 -1
  67. package/dist/sdk/u-field.u-raw-field.entry.esm.js.map +1 -1
  68. package/dist/sdk/u-flash-message.entry.esm.js.map +1 -1
  69. package/dist/sdk/u-profile.u-submit-button.entry.esm.js.map +1 -1
  70. package/dist/sdk/u-signin-root.entry.esm.js.map +1 -1
  71. package/dist/sdk/u-spinner.entry.esm.js.map +1 -1
  72. package/package.json +1 -1
  73. package/dist/sdk/p-7a0cefff.entry.js +0 -2
  74. package/dist/sdk/p-a6393d19.entry.js +0 -2
  75. package/dist/sdk/p-a6393d19.entry.js.map +0 -1
  76. package/dist/sdk/p-effaf86b.entry.js +0 -2
  77. package/dist/sdk/u-password-field.entry.js +0 -104
  78. package/dist/sdk/u-reset-password-button.entry.js +0 -54
  79. /package/dist/sdk/{p-c31dbbb4.entry.js.map → p-b3980341.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"u-field.u-raw-field.entry.cjs.js","sources":["src/profile/components/field/field.css?tag=u-field&encapsulation=shadow","src/profile/components/field/field.tsx","src/profile/components/raw-input-fields/RadioGroup.tsx","src/profile/components/raw-input-fields/Textarea.tsx","src/profile/components/raw-input-fields/Input.tsx","src/profile/components/raw-input-fields/Select.tsx","src/profile/components/raw-input-fields/MultiSelect.tsx","src/profile/components/raw-field/raw-field.tsx"],"sourcesContent":[":host {\n display: block;\n}\n.field-error:focus {\n border-color: red;\n outline-color: red;\n}\n\n.multi-select-readonly-container {\n list-style: none;\n}\n.multi-select-readonly-container li {\n display: inline-block;\n}\n\n[part=\"input\"]:disabled,\n[part=\"select\"]:disabled {\n cursor: not-allowed;\n}\n","import { Component, Prop, State, h, Element } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { state as profileState } from \"../../store/profile-store\";\n/**\n * @part select_field - Styles the base <select> element.\n * @part select_field--example_field - Example of a field-specific selector.\n * Replace `example_field` with your field name.\n * e.g. `custom_attributes.favorite_nut` → `select_field--custom_attributes-favorite_nut`, `country_code` → `select_field--country-code`\n * @part radio-group-item_radio\n * @part radio-group_field\n * @part radio-group-item_label\n * @part radio_checked\n * @part multi-select-item_checkbox\n * @part multi-select-group_field\n * @part multi-select-item_label\n * @part textarea_field\n * @part input_field\n */\n\n@Component({\n tag: \"u-field\",\n styleUrl: \"field.css\",\n shadow: true,\n})\nexport class Field {\n @Prop() field!: string;\n @Prop() required = false;\n @Prop() readonlyPlaceholder = \"No information\";\n @Prop() countryCodeDisplayOption?: \"icon\" | \"label\" = \"label\";\n @Prop() invalidPhoneMessage = \"Please enter a valid phone number.\";\n @Prop({ attribute: \"class-name\" }) componentClassName?: string;\n @Prop() emptyOption = true;\n @Prop() placeholder?: string;\n @Prop() renderDefaultLabel = true;\n\n @Prop() pattern?: string;\n @Prop() patternErrorMessage?: string;\n @Prop() validationFunc?: (value: string | string[]) => { valid: boolean; message?: string };\n\n @Element() el!: HTMLElement;\n\n @State() selected?: string | string[];\n\n private getFieldData() {\n return this.field.startsWith(\"custom_attributes.\")\n ? profileState.data.custom_attributes?.[this.field.replace(\"custom_attributes.\", \"\")]\n : profileState.data[this.field];\n }\n\n componentWillLoad() {}\n\n componentDidRender() {\n const fieldErrors = profileState.errors;\n\n if (Object.keys(fieldErrors)[0] === this.field) {\n this.el.shadowRoot?.getElementById(this.field)?.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n this.el.shadowRoot\n ?.getElementById(this.field)\n ?.querySelector<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>(\"input, select, textarea\")\n ?.focus();\n }\n }\n\n private createSpecificPartKey(fieldName: string) {\n if (fieldName.startsWith(\"custom_attributes.\")) {\n return fieldName.replace(/[^\\w-]/g, \"-\");\n }\n return fieldName;\n }\n\n // biome-ignore lint/suspicious/noExplicitAny: needed for dynamic fieldData\n private multiSelectLabel = (fieldData: any): string[] => {\n const multiselectMatches: string[] = [];\n if (Array.isArray(fieldData.value)) {\n for (const val of fieldData.value) {\n // biome-ignore lint/suspicious/noExplicitAny: needed for dynamic option\n const match = fieldData.options?.find((opt: any) => opt.value === val);\n const optionTranslationKey = `fields.${this.field}.options.${val}`;\n const translatedOptionLabel = t(optionTranslationKey);\n const optionLabel = translatedOptionLabel !== optionTranslationKey ? translatedOptionLabel : match?.label;\n multiselectMatches.push(optionLabel ?? val);\n }\n }\n return multiselectMatches;\n };\n\n render() {\n if (profileState.loading) {\n return <u-spinner />;\n }\n\n const fieldData = this.getFieldData();\n if (!fieldData) {\n return null;\n }\n\n const labelTranslationKey = `fields.${this.field}.label`;\n const label = t(labelTranslationKey, { defaultValue: fieldData?.label });\n\n const placeholderTranslationKey = `fields.${this.field}.placeholder`;\n const placeholder = t(placeholderTranslationKey, { defaultValue: this.placeholder ? this.placeholder : \"\" });\n\n const readonlyPlaceholderTranslationKey = `fields.${this.field}.readonlyPlaceholder`;\n const readonlyPlaceholder = t(readonlyPlaceholderTranslationKey, {\n defaultValue: this.readonlyPlaceholder ? this.readonlyPlaceholder : \"\",\n });\n\n const translatedOptions = (fieldData.options || []).map((opt) => {\n const translationKey = `fields.${this.field}.options.${opt.value}`;\n const label = t(translationKey, { defaultValue: opt.label });\n return { ...opt, label };\n });\n\n const translatedRadioOptions = (fieldData.radio_options || []).map((opt) => {\n const translationKey = `fields.${this.field}.options.${opt.value}`;\n const label = t(translationKey, { defaultValue: opt.label });\n return { ...opt, label };\n });\n\n const errorPrefix = t(\"errors.prefix\", { defaultValue: \"ERROR: \" });\n\n const isLocked = !!fieldData?.locked;\n const lockedText = fieldData?.locked_text ? fieldData.locked_text : \"\";\n const isReadonly = fieldData?.readonly === true;\n const multiSelectReadonlyLabels = this.multiSelectLabel(fieldData);\n\n return (\n <div part={`field-container field-container--${this.createSpecificPartKey(this.field)}`}>\n <slot name=\"label\" />\n\n {this.renderDefaultLabel && (\n <label htmlFor={this.field} part={`field_label field_label--${this.createSpecificPartKey(this.field)}`}>\n {label}\n {fieldData?.required || this.required ? <span part=\"required-indicator\"> *</span> : null}\n </label>\n )}\n {isReadonly && fieldData?.type !== \"checkbox\" ? (\n <span id={this.field} part=\"readonly-indicator\">\n {fieldData?.value || readonlyPlaceholder}\n </span>\n ) : null}\n {isReadonly && fieldData?.type === \"checkbox\" && (\n <ul id={this.field} class=\"multi-select-readonly-container\" part=\"multi-select-readonly-container\">\n {multiSelectReadonlyLabels.map((label) => (\n <li key={label} part=\"multi-select-readonly-field\">\n {label}\n </li>\n ))}\n </ul>\n )}\n {!isReadonly && (\n <u-raw-field\n id={this.field}\n field={this.field}\n type={fieldData.type as string}\n value={fieldData.value}\n options={fieldData.type === \"select\" ? translatedOptions : undefined}\n radioOptions={fieldData.type === \"radio\" ? translatedRadioOptions : undefined}\n multiSelectOptions={fieldData.type === \"checkbox\" ? translatedOptions : undefined}\n required={fieldData.required || this.required}\n disabled={isLocked}\n tooltip={isLocked ? lockedText : undefined}\n placeholder={placeholder}\n componentClassName={this.componentClassName}\n emptyOption={this.emptyOption}\n countryCodeDisplayOption={this.countryCodeDisplayOption}\n attrName={fieldData.attr_name}\n specificPartKey={this.createSpecificPartKey(this.field)}\n ariaDescribedBy={profileState.errors[this.field] ? `${this.field}-error` : undefined}\n pattern={this.pattern}\n patternErrorMessage={this.patternErrorMessage}\n validationFunc={this.validationFunc}\n />\n )}\n\n {profileState.errors[this.field] && (\n <span id={`${this.field}-error`} part=\"field-error-message\" aria-live=\"assertive\">\n {errorPrefix} {profileState.errors[this.field]}\n </span>\n )}\n </div>\n );\n }\n}\n","import { type FunctionalComponent, h } from \"@stencil/core\";\n\nexport type RadioOption = { value: string; label: string; checked: boolean };\n\ntype RadioGroupProps =\n | {\n options: RadioOption[];\n disabled?: boolean;\n type?: string;\n name?: string;\n title?: string;\n specificPartKey?: string;\n onChange: (value: string) => void;\n ariaDescribedBy?: string;\n required?: boolean;\n }\n | {\n value: string;\n checked: boolean;\n disabled?: boolean;\n type?: string;\n name: string;\n title?: string;\n componentClassName?: string;\n onChange: (value: string) => void;\n ariaDescribedBy?: string;\n required?: boolean;\n };\n\nexport const RadioGroup: FunctionalComponent<RadioGroupProps> = (props) => {\n if (!(\"options\" in props)) {\n return (\n <input\n type={props.type}\n name={props.name}\n required={props.required}\n value={String(props.value)}\n checked={props.checked}\n disabled={props.disabled}\n title={props.title}\n class={props.componentClassName}\n onChange={() => props.onChange(String(props.value))}\n aria-describedby={props.ariaDescribedBy || undefined}\n />\n );\n }\n\n return (\n <div\n part={`radio-group_field ${props.specificPartKey ? `radio-group_field--${props.specificPartKey}` : \"\"}`}\n title={props.title}\n aria-describedby={props.ariaDescribedBy || undefined}\n >\n {props.options.map((opt) => (\n <label\n htmlFor={`${props.name}-${opt.value}`}\n key={String(opt.value)}\n part={`radio-group-item_label ${props.specificPartKey ? `radio-group-item_label--${props.specificPartKey}` : \"\"} ${opt.checked ? \"radio_checked\" : \"\"}`}\n data-checked={opt.checked ? \"true\" : \"false\"}\n >\n <input\n id={`${props.name}-${opt.value}`}\n type={props.type}\n name={props.name}\n required={props.required}\n value={String(opt.value)}\n checked={opt.checked}\n disabled={props.disabled}\n onChange={() => props.onChange(String(opt.value))}\n part={`radio-group-item_radio ${props.specificPartKey ? `radio-group-item_radio--${props.specificPartKey}` : \"\"}`}\n />\n {opt.label}\n </label>\n ))}\n </div>\n );\n};\n","import { type FunctionalComponent, h } from \"@stencil/core\";\n\ntype TextareaProps = {\n id: string;\n value: string | undefined;\n disabled?: boolean;\n required?: boolean;\n title?: string;\n name?: string;\n componentClassName?: string;\n placeholder?: string;\n specificPartKey?: string;\n onChange: (value: string) => void;\n onBlur?: (e: Event) => void;\n ariaDescribedBy?: string;\n};\n\nexport const Textarea: FunctionalComponent<TextareaProps> = (props) => (\n <textarea\n id={props.id}\n value={props.value}\n name={props.name}\n class={props.componentClassName}\n required={props.required}\n part={`textarea_field ${props.specificPartKey ? `textarea_field--${props.specificPartKey}` : \"\"}`}\n disabled={props.disabled}\n title={props.title}\n onChange={(e) => props.onChange((e.target as HTMLTextAreaElement).value)}\n onBlur={props.onBlur}\n aria-describedby={props.ariaDescribedBy || undefined}\n />\n);\n","import { type FunctionalComponent, h } from \"@stencil/core\";\n\ntype InputProps = {\n id: string;\n type: string;\n value: string | undefined;\n componentClassName?: string;\n disabled?: boolean;\n required?: boolean;\n title?: string;\n placeholder?: string;\n specificPartKey?: string;\n onChange: (value: string) => void;\n onBlur?: (e: Event) => void;\n ariaDescribedBy?: string;\n};\n\nexport const Input: FunctionalComponent<InputProps> = (props) => (\n <input\n id={props.id}\n type={props.type}\n value={props.value}\n class={props.componentClassName}\n disabled={props.disabled}\n required={props.required}\n part={`input_field ${props.specificPartKey ? `input_field--${props.specificPartKey}` : \"\"}`}\n title={props.title}\n placeholder={props.placeholder}\n onChange={(e) => props.onChange((e.target as HTMLInputElement).value)}\n onBlur={(e) => props.onBlur?.(e)}\n aria-describedby={props.ariaDescribedBy || undefined}\n />\n);\n","import { type FunctionalComponent, h } from \"@stencil/core\";\n\nexport type Option = { value: string; label: string; selected?: boolean };\n\ntype SelectProps = {\n id: string;\n name?: string;\n value: string | string[] | null | undefined;\n options: Option[];\n disabled?: boolean;\n title?: string;\n countryCodeDisplayOption?: string;\n attr_name?: string;\n componentClassName?: string;\n emptyOption: boolean;\n specificPartKey?: string;\n onChange: (value: string) => void;\n countryIcon?: (code: string) => string;\n ariaDescribedBy?: string;\n};\n\nexport const Select: FunctionalComponent<SelectProps> = (props) => {\n const renderOptionLabel = (opt: Option) => {\n if (props.attr_name === \"country_code\" && props.countryCodeDisplayOption === \"icon\" && props.countryIcon) {\n return props.countryIcon(opt.value);\n }\n return opt.label;\n };\n return (\n <select\n id={props.id}\n name={props.name}\n class={props.componentClassName}\n data-value={props.value as string | undefined}\n part={`select_field ${props.specificPartKey ? `select_field--${props.specificPartKey}` : \"\"}`}\n disabled={props.disabled}\n title={props.title}\n onChange={(e) => props.onChange((e.target as HTMLSelectElement).value)}\n aria-describedby={props.ariaDescribedBy || undefined}\n >\n {props.emptyOption ? <option value=\"\" selected={props.value === null || props.value === \"\"} /> : null}\n {props.options.map((opt) => (\n <option\n key={opt.value}\n value={opt.value}\n data-selected={opt.value === props.value ? \"true\" : \"false\"}\n selected={opt.value === props.value}\n disabled={opt.value === \"--\"}\n >\n {renderOptionLabel(opt)}\n </option>\n ))}\n </select>\n );\n};\n","import { type FunctionalComponent, h } from \"@stencil/core\";\n\nexport type MultiSelectOption = { value: string; label: string };\n\ntype MultiSelectProps =\n | {\n value: string[];\n options: MultiSelectOption[];\n disabled?: boolean;\n title?: string;\n type?: string;\n specificPartKey?: string;\n onToggle: (optValue: string, checked: boolean) => void;\n ariaDescribedBy?: string;\n }\n | {\n id?: string;\n name: string;\n value: string;\n checked: boolean;\n componentClassName?: string;\n disabled?: boolean;\n title?: string;\n type?: string;\n onToggle: (optValue: string, checked: boolean) => void;\n ariaDescribedBy?: string;\n };\n\nexport const MultiSelect: FunctionalComponent<MultiSelectProps> = (props) => {\n if (!(\"options\" in props)) {\n return (\n <input\n id={props.id}\n type={props.type}\n name={props.name}\n value={props.value}\n checked={props.checked}\n disabled={props.disabled}\n title={props.title}\n class={props.componentClassName}\n onChange={(e) => props.onToggle(props.value, (e.target as HTMLInputElement).checked)}\n aria-describedby={props.ariaDescribedBy || undefined}\n />\n );\n }\n\n return (\n <div\n part={`multi-select-group_field ${props.specificPartKey ? `multi-select-group_field--${props.specificPartKey}` : \"\"}`}\n title={props.title}\n aria-describedby={props.ariaDescribedBy || undefined}\n >\n {props.options.map((opt) => (\n <label\n key={opt.value}\n htmlFor={`${props.specificPartKey}-${opt.value}`}\n part={`multi-select-item_label ${props.specificPartKey ? `multi-select-item_label--${props.specificPartKey}` : \"\"}`}\n >\n <input\n id={`${props.specificPartKey}-${opt.value}`}\n type={props.type}\n checked={Array.isArray(props.value) && props.value.includes(opt.value)}\n disabled={props.disabled}\n title={props.title}\n onChange={(e) => props.onToggle(opt.value, (e.target as HTMLInputElement).checked)}\n part={`multi-select-item_checkbox ${props.specificPartKey ? `multi-select-item_checkbox--${props.specificPartKey}` : \"\"}`}\n />\n {opt.label}\n </label>\n ))}\n </div>\n );\n};\n","import { Component, Element, Prop, State, h } from \"@stencil/core\";\nimport { RadioGroup, type RadioOption } from \"../raw-input-fields/RadioGroup\";\nimport { Textarea } from \"../raw-input-fields/Textarea\";\nimport { Input } from \"../raw-input-fields/Input\";\nimport { type ProfileNode, type ProfileRaw, state as profileState } from \"../../store/profile-store\";\nimport { Select, type Option } from \"../raw-input-fields/Select\";\nimport { MultiSelect, type MultiSelectOption } from \"../raw-input-fields/MultiSelect\";\nimport { UnidyComponent } from \"../../../logger\";\n\n@Component({\n tag: \"u-raw-field\",\n shadow: false,\n})\nexport class RawField extends UnidyComponent {\n @Prop() required = false;\n @Prop() readonlyPlaceholder = \"\";\n @Prop() countryCodeDisplayOption?: \"icon\" | \"label\" = \"label\";\n @Prop() invalidPhoneMessage = \"Please enter a valid phone number.\";\n @Prop({ attribute: \"class-name\" }) componentClassName?: string;\n\n @Prop() field!: string;\n @Prop() value?: string | string[];\n @Prop() checked?: boolean;\n @Prop() disabled?: boolean;\n @Prop() tooltip?: string;\n @Prop() type!: string;\n @Prop() placeholder?: string;\n @Prop() options?: string | Option[];\n @Prop() emptyOption = false;\n @Prop() attrName?: string;\n @Prop() radioOptions?: RadioOption[];\n @Prop() multiSelectOptions?: MultiSelectOption[];\n @Prop() specificPartKey?: string;\n @Prop() ariaDescribedBy = \"\";\n @Prop() pattern?: string;\n @Prop() patternErrorMessage?: string;\n @Prop() validationFunc?: (value: string | string[]) => { valid: boolean; message?: string };\n\n @Element() el!: HTMLElement;\n\n @State() selected?: string | string[];\n\n private readStore(fieldName: string): string | undefined | string[] {\n if (!fieldName) return;\n const data: ProfileRaw = profileState.data;\n\n if (!data) return;\n\n let field: ProfileNode | undefined;\n\n if (fieldName.startsWith(\"custom_attributes.\")) {\n const key = fieldName.replace(\"custom_attributes.\", \"\");\n field = data.custom_attributes?.[key];\n } else {\n field = data[fieldName];\n }\n\n if (!field) return;\n\n if (field.radio_options) {\n const checkedOption = field.radio_options.find((option: RadioOption) => option.checked);\n\n const checkedValue = checkedOption?.value ?? field.value ?? \"\";\n\n return String(checkedValue);\n }\n\n if (field.type === \"checkbox\") {\n return Array.isArray(field.value) ? field.value : [];\n }\n\n return field.value;\n }\n\n private writeStore(fieldName: string, value: string | string[]) {\n if (!fieldName) return;\n const data: ProfileRaw = profileState.data;\n if (!data) return;\n\n const isCustomAttribute = fieldName.startsWith(\"custom_attributes.\");\n const key = isCustomAttribute ? fieldName.replace(\"custom_attributes.\", \"\") : fieldName;\n\n if (isCustomAttribute) {\n const field = data.custom_attributes?.[key];\n profileState.data = {\n ...data,\n custom_attributes: {\n ...data.custom_attributes,\n [key]: { ...field, value },\n },\n };\n } else {\n const field = data[key];\n profileState.data = { ...data, [key]: { ...field, value } };\n }\n }\n\n private runExternalValidator(value: string | string[]) {\n if (this.validationFunc) {\n try {\n return this.validationFunc(value);\n } catch (e) {\n this.logger.error(\"External validator (validationFunc) threw an error:\", e);\n return null;\n }\n }\n }\n\n private validateValue(value: string | string[]): { valid: boolean; message: string } {\n // TODO: We should validate this when the component is loading.\n if (this.required) {\n const empty = value === undefined || value === null || value === \"\";\n if (empty) {\n return { valid: false, message: \"This field is required.\" };\n }\n }\n\n if (this.pattern && typeof value === \"string\") {\n const regex = new RegExp(this.pattern);\n if (!regex.test(value)) {\n return { valid: false, message: this.patternErrorMessage || \"Invalid format.\" };\n }\n }\n\n const externalResult = this.runExternalValidator(value);\n\n if (externalResult && !externalResult.valid) {\n return { valid: false, message: externalResult.message || \"Invalid input.\" };\n }\n\n if (this.type === \"tel\") {\n const phonePattern = /^(?=.{4,13}$)(\\+\\d+|\\d+)$/;\n if (typeof value === \"string\" && value !== \"\" && !phonePattern.test(value)) {\n return { valid: false, message: this.invalidPhoneMessage };\n }\n }\n\n return { valid: true, message: \"\" };\n }\n\n private getNormalizedOptions(): Option[] {\n if (Array.isArray(this.options)) return this.options;\n\n // unidy-raw-field select-options prop can be a JSON string\n if (typeof this.options === \"string\") return JSON.parse(this.options);\n\n return [];\n }\n\n private countryIcon(countryCode: string, placeholder = \"➖\"): string {\n if (!/^[A-Z]{2}$/.test(countryCode)) {\n return placeholder;\n }\n\n return Array.from(countryCode)\n .map((char) => String.fromCodePoint(0x1f1e6 + (char.charCodeAt(0) - \"A\".charCodeAt(0))))\n .join(\"\");\n }\n\n private onMultiToggle = (optValue: string, checked: boolean) => {\n const currentValues = Array.isArray(this.selected) ? this.selected : [];\n let updatedValues: string[];\n if (checked) {\n updatedValues = currentValues.includes(optValue) ? currentValues : [...currentValues, optValue];\n } else {\n updatedValues = currentValues.filter((v) => v !== optValue);\n }\n\n this.selected = updatedValues;\n // TODO: validate multiselect if needed\n this.writeStore(this.field, updatedValues);\n };\n\n private onBlurFieldValidation = (e: Event) => {\n const input = e.target as HTMLInputElement | HTMLTextAreaElement;\n const val = input.value;\n\n const result = this.validateValue(val);\n const newErrors = { ...profileState.errors };\n\n if (result.valid) {\n delete newErrors[this.field];\n } else {\n newErrors[this.field] = result.message;\n }\n\n profileState.errors = newErrors;\n };\n\n private onChangeFieldValidation = (newValue: string) => {\n this.selected = newValue;\n\n const result = this.validateValue(newValue);\n const newErrors = { ...profileState.errors };\n\n if (result.valid) {\n delete newErrors[this.field];\n this.writeStore(this.field, newValue);\n } else {\n newErrors[this.field] = result.message;\n }\n\n profileState.errors = newErrors;\n };\n\n componentWillLoad() {\n if (!this.field) throw new Error('u-raw-field: \"field\" is required.');\n if (!this.type) throw new Error('u-raw-field: \"type\" is required.');\n\n const allowed: Set<string> = new Set([\"text\", \"email\", \"tel\", \"password\", \"number\", \"date\", \"radio\", \"textarea\", \"select\", \"checkbox\"]);\n if (!allowed.has(this.type)) {\n this.type = \"text\";\n }\n\n const current = this.readStore(this.field);\n const isType =\n this.type === \"text\" ||\n this.type === \"email\" ||\n this.type === \"tel\" ||\n this.type === \"password\" ||\n this.type === \"number\" ||\n this.type === \"date\" ||\n this.type === \"textarea\" ||\n this.type === \"select\";\n\n if (isType && (current === undefined || current === null) && typeof this.value === \"string\") {\n this.writeStore(this.field, this.value);\n }\n\n this.selected = current;\n }\n\n componentDidRender() {\n const errs = profileState.errors;\n if (errs?.[this.field]) {\n this.el.querySelector<HTMLInputElement | HTMLTextAreaElement>(`#${CSS.escape(this.field)}`)?.focus();\n }\n }\n\n render() {\n if (this.type === \"radio\") {\n if (Array.isArray(this.radioOptions) && this.radioOptions.length) {\n const checkedOptions = this.radioOptions.map((opt) => ({\n ...opt,\n checked: String(opt.value) === this.selected,\n }));\n return (\n <RadioGroup\n name={this.field}\n disabled={this.disabled}\n title={this.tooltip}\n type=\"radio\"\n onChange={this.onChangeFieldValidation}\n options={checkedOptions}\n specificPartKey={this.specificPartKey}\n aria-describedby={this.ariaDescribedBy}\n required={this.required}\n />\n );\n }\n\n if (typeof this.value === \"string\") {\n const currentValue = this.readStore(this.field);\n const isChecked = currentValue != null && String(currentValue) === this.value;\n return (\n <RadioGroup\n name={this.field}\n value={this.value}\n checked={isChecked}\n disabled={this.disabled}\n title={this.tooltip}\n componentClassName={this.componentClassName}\n type=\"radio\"\n specificPartKey={this.specificPartKey}\n onChange={this.onChangeFieldValidation}\n aria-describedby={this.ariaDescribedBy}\n required={this.required}\n />\n );\n }\n }\n\n if (this.type === \"checkbox\") {\n if (Array.isArray(this.multiSelectOptions) && this.multiSelectOptions.length) {\n const selected = Array.isArray(this.selected) ? this.selected : [];\n return (\n <MultiSelect\n value={selected}\n options={this.multiSelectOptions}\n disabled={this.disabled}\n title={this.tooltip}\n type=\"checkbox\"\n specificPartKey={this.specificPartKey}\n onToggle={this.onMultiToggle}\n aria-describedby={this.ariaDescribedBy}\n />\n );\n }\n\n if (this.value) {\n const currentValue = (this.readStore(this.field) as string[]) ?? [];\n const isChecked = currentValue?.includes(this.value as string);\n return (\n <MultiSelect\n id={`${this.field}-${this.value}`}\n name={this.field}\n value={this.value as string}\n checked={isChecked}\n disabled={this.disabled}\n title={this.tooltip}\n componentClassName={this.componentClassName}\n type=\"checkbox\"\n onToggle={(val, checked) => {\n const current = this.readStore(this.field) as string[];\n const updated = checked ? [...current, val] : current.filter((v) => v !== val);\n this.writeStore(this.field, updated);\n }}\n aria-describedby={this.ariaDescribedBy}\n />\n );\n }\n }\n\n if (this.type === \"select\") {\n const currentValue = (this.readStore(this.field) as string) ?? \"\";\n const option = this.getNormalizedOptions();\n return (\n <Select\n id={this.field}\n name={this.field}\n value={currentValue}\n options={option}\n disabled={this.disabled}\n title={this.tooltip}\n emptyOption={this.emptyOption}\n onChange={this.onChangeFieldValidation}\n componentClassName={this.componentClassName}\n countryCodeDisplayOption={this.countryCodeDisplayOption}\n countryIcon={this.countryIcon}\n attr_name={this.attrName}\n specificPartKey={this.specificPartKey}\n aria-describedby={this.ariaDescribedBy}\n />\n );\n }\n\n if (this.type === \"textarea\") {\n const currentValue = (this.readStore(this.field) as string) || \"\";\n return (\n <Textarea\n id={this.field}\n value={currentValue}\n required={this.required}\n disabled={this.disabled}\n title={this.tooltip}\n componentClassName={this.componentClassName}\n specificPartKey={this.specificPartKey}\n onChange={this.onChangeFieldValidation}\n onBlur={this.onBlurFieldValidation}\n aria-describedby={this.ariaDescribedBy}\n />\n );\n }\n\n const currentValue = (this.readStore(this.field) as string) || \"\";\n return (\n <Input\n id={this.field}\n value={currentValue}\n required={this.required}\n disabled={this.disabled}\n title={this.tooltip}\n type={this.type}\n componentClassName={this.componentClassName}\n placeholder={this.placeholder}\n specificPartKey={this.specificPartKey}\n onChange={this.onChangeFieldValidation}\n onBlur={this.onBlurFieldValidation}\n aria-describedby={this.ariaDescribedBy}\n />\n );\n }\n}\n"],"names":["profileState","t","h","UnidyComponent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C,OAAO,EACnB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,QAAQ,EAAE,IAAI,CAAC,uBAAuB,EACtC,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAAA,kBAAA,EAChB,IAAI,CAAC,eAAe,EAAA,CACtC;;AAIN,QAAA,MAAM,YAAY,GAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAY,IAAI,EAAE;AACjE,QAAA,QACEA,OAAA,CAAC,KAAK,EAAA,EACJ,EAAE,EAAE,IAAI,CAAC,KAAK,EACd,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,QAAQ,EAAE,IAAI,CAAC,uBAAuB,EACtC,MAAM,EAAE,IAAI,CAAC,qBAAqB,sBAChB,IAAI,CAAC,eAAe,EAAA,CACtC;;;;;;;"}
1
+ {"version":3,"file":"u-field.u-raw-field.entry.cjs.js","sources":["src/profile/components/field/field.css?tag=u-field&encapsulation=shadow","src/profile/components/field/field.tsx","src/profile/components/raw-input-fields/RadioGroup.tsx","src/profile/components/raw-input-fields/Textarea.tsx","src/profile/components/raw-input-fields/Input.tsx","src/profile/components/raw-input-fields/Select.tsx","src/profile/components/raw-input-fields/MultiSelect.tsx","src/profile/components/raw-field/raw-field.tsx"],"sourcesContent":[":host {\n display: block;\n}\n.field-error:focus {\n border-color: red;\n outline-color: red;\n}\n\n.multi-select-readonly-container {\n list-style: none;\n}\n.multi-select-readonly-container li {\n display: inline-block;\n}\n\n[part=\"input\"]:disabled,\n[part=\"select\"]:disabled {\n cursor: not-allowed;\n}\n","import { Component, Prop, State, h, Element } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { state as profileState } from \"../../store/profile-store\";\n/**\n * @part select_field - Styles the base <select> element.\n * @part select_field--example_field - Example of a field-specific selector.\n * Replace `example_field` with your field name.\n * e.g. `custom_attributes.favorite_nut` → `select_field--custom_attributes-favorite_nut`, `country_code` → `select_field--country-code`\n * @part radio-group-item_radio\n * @part radio-group_field\n * @part radio-group-item_label\n * @part radio_checked\n * @part multi-select-item_checkbox\n * @part multi-select-group_field\n * @part multi-select-item_label\n * @part textarea_field\n * @part input_field\n */\n\n@Component({\n tag: \"u-field\",\n styleUrl: \"field.css\",\n shadow: true,\n})\nexport class Field {\n @Prop() field!: string;\n @Prop() required = false;\n @Prop() readonlyPlaceholder = \"No information\";\n @Prop() countryCodeDisplayOption?: \"icon\" | \"label\" = \"label\";\n @Prop() invalidPhoneMessage = \"Please enter a valid phone number.\";\n @Prop({ attribute: \"class-name\" }) componentClassName?: string;\n @Prop() emptyOption = true;\n @Prop() placeholder?: string;\n @Prop() renderDefaultLabel = true;\n\n @Prop() pattern?: string;\n @Prop() patternErrorMessage?: string;\n @Prop() validationFunc?: (value: string | string[]) => { valid: boolean; message?: string };\n\n @Element() el!: HTMLElement;\n\n @State() selected?: string | string[];\n\n private getFieldData() {\n return this.field.startsWith(\"custom_attributes.\")\n ? profileState.data.custom_attributes?.[this.field.replace(\"custom_attributes.\", \"\")]\n : profileState.data[this.field];\n }\n\n componentWillLoad() {}\n\n componentDidRender() {\n const fieldErrors = profileState.errors;\n\n if (Object.keys(fieldErrors)[0] === this.field) {\n this.el.shadowRoot?.getElementById(this.field)?.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n this.el.shadowRoot\n ?.getElementById(this.field)\n ?.querySelector<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>(\"input, select, textarea\")\n ?.focus();\n }\n }\n\n private createSpecificPartKey(fieldName: string) {\n if (fieldName.startsWith(\"custom_attributes.\")) {\n return fieldName.replace(/[^\\w-]/g, \"-\");\n }\n return fieldName;\n }\n\n // biome-ignore lint/suspicious/noExplicitAny: needed for dynamic fieldData\n private multiSelectLabel = (fieldData: any): string[] => {\n const multiselectMatches: string[] = [];\n if (Array.isArray(fieldData.value)) {\n for (const val of fieldData.value) {\n // biome-ignore lint/suspicious/noExplicitAny: needed for dynamic option\n const match = fieldData.options?.find((opt: any) => opt.value === val);\n const optionTranslationKey = `fields.${this.field}.options.${val}`;\n const translatedOptionLabel = t(optionTranslationKey);\n const optionLabel = translatedOptionLabel !== optionTranslationKey ? translatedOptionLabel : match?.label;\n multiselectMatches.push(optionLabel ?? val);\n }\n }\n return multiselectMatches;\n };\n\n render() {\n if (profileState.loading) {\n return <u-spinner />;\n }\n\n const fieldData = this.getFieldData();\n if (!fieldData) {\n return null;\n }\n\n const labelTranslationKey = `fields.${this.field}.label`;\n const label = t(labelTranslationKey, { defaultValue: fieldData?.label });\n\n const placeholderTranslationKey = `fields.${this.field}.placeholder`;\n const placeholder = t(placeholderTranslationKey, { defaultValue: this.placeholder ? this.placeholder : \"\" });\n\n const readonlyPlaceholderTranslationKey = `fields.${this.field}.readonlyPlaceholder`;\n const readonlyPlaceholder = t(readonlyPlaceholderTranslationKey, {\n defaultValue: this.readonlyPlaceholder ? this.readonlyPlaceholder : \"\",\n });\n\n const translatedOptions = (fieldData.options || []).map((opt) => {\n const translationKey = `fields.${this.field}.options.${opt.value}`;\n const label = t(translationKey, { defaultValue: opt.label });\n return { ...opt, label };\n });\n\n const translatedRadioOptions = (fieldData.radio_options || []).map((opt) => {\n const translationKey = `fields.${this.field}.options.${opt.value}`;\n const label = t(translationKey, { defaultValue: opt.label });\n return { ...opt, label };\n });\n\n const errorPrefix = t(\"errors.prefix\", { defaultValue: \"ERROR: \" });\n\n const isLocked = !!fieldData?.locked;\n const lockedText = fieldData?.locked_text ? fieldData.locked_text : \"\";\n const isReadonly = fieldData?.readonly === true;\n const multiSelectReadonlyLabels = this.multiSelectLabel(fieldData);\n\n return (\n <div part={`field-container field-container--${this.createSpecificPartKey(this.field)}`}>\n <slot name=\"label\" />\n\n {this.renderDefaultLabel && (\n <label htmlFor={this.field} part={`field_label field_label--${this.createSpecificPartKey(this.field)}`}>\n {label}\n {fieldData?.required || this.required ? <span part=\"required-indicator\"> *</span> : null}\n </label>\n )}\n {isReadonly && fieldData?.type !== \"checkbox\" ? (\n <span id={this.field} part=\"readonly-indicator\">\n {fieldData?.value || readonlyPlaceholder}\n </span>\n ) : null}\n {isReadonly && fieldData?.type === \"checkbox\" && (\n <ul id={this.field} class=\"multi-select-readonly-container\" part=\"multi-select-readonly-container\">\n {multiSelectReadonlyLabels.map((label) => (\n <li key={label} part=\"multi-select-readonly-field\">\n {label}\n </li>\n ))}\n </ul>\n )}\n {!isReadonly && (\n <u-raw-field\n id={this.field}\n field={this.field}\n type={fieldData.type as string}\n value={fieldData.value}\n options={fieldData.type === \"select\" ? translatedOptions : undefined}\n radioOptions={fieldData.type === \"radio\" ? translatedRadioOptions : undefined}\n multiSelectOptions={fieldData.type === \"checkbox\" ? translatedOptions : undefined}\n required={fieldData.required || this.required}\n disabled={isLocked}\n tooltip={isLocked ? lockedText : undefined}\n placeholder={placeholder}\n componentClassName={this.componentClassName}\n emptyOption={this.emptyOption}\n countryCodeDisplayOption={this.countryCodeDisplayOption}\n attrName={fieldData.attr_name}\n specificPartKey={this.createSpecificPartKey(this.field)}\n ariaDescribedBy={profileState.errors[this.field] ? `${this.field}-error` : undefined}\n pattern={this.pattern}\n patternErrorMessage={this.patternErrorMessage}\n validationFunc={this.validationFunc}\n />\n )}\n\n {profileState.errors[this.field] && (\n <span id={`${this.field}-error`} part=\"field-error-message\" aria-live=\"assertive\">\n {errorPrefix} {profileState.errors[this.field]}\n </span>\n )}\n </div>\n );\n }\n}\n","import { type FunctionalComponent, h } from \"@stencil/core\";\n\nexport type RadioOption = { value: string; label: string; checked: boolean };\n\ntype RadioGroupProps =\n | {\n options: RadioOption[];\n disabled?: boolean;\n type?: string;\n name?: string;\n title?: string;\n specificPartKey?: string;\n onChange: (value: string) => void;\n ariaDescribedBy?: string;\n required?: boolean;\n }\n | {\n value: string;\n checked: boolean;\n disabled?: boolean;\n type?: string;\n name: string;\n title?: string;\n componentClassName?: string;\n onChange: (value: string) => void;\n ariaDescribedBy?: string;\n required?: boolean;\n };\n\nexport const RadioGroup: FunctionalComponent<RadioGroupProps> = (props) => {\n if (!(\"options\" in props)) {\n return (\n <input\n type={props.type}\n name={props.name}\n required={props.required}\n value={String(props.value)}\n checked={props.checked}\n disabled={props.disabled}\n title={props.title}\n class={props.componentClassName}\n onChange={() => props.onChange(String(props.value))}\n aria-describedby={props.ariaDescribedBy || undefined}\n />\n );\n }\n\n return (\n <div\n part={`radio-group_field ${props.specificPartKey ? `radio-group_field--${props.specificPartKey}` : \"\"}`}\n title={props.title}\n aria-describedby={props.ariaDescribedBy || undefined}\n >\n {props.options.map((opt) => (\n <label\n htmlFor={`${props.name}-${opt.value}`}\n key={String(opt.value)}\n part={`radio-group-item_label ${props.specificPartKey ? `radio-group-item_label--${props.specificPartKey}` : \"\"} ${opt.checked ? \"radio_checked\" : \"\"}`}\n data-checked={opt.checked ? \"true\" : \"false\"}\n >\n <input\n id={`${props.name}-${opt.value}`}\n type={props.type}\n name={props.name}\n required={props.required}\n value={String(opt.value)}\n checked={opt.checked}\n disabled={props.disabled}\n onChange={() => props.onChange(String(opt.value))}\n part={`radio-group-item_radio ${props.specificPartKey ? `radio-group-item_radio--${props.specificPartKey}` : \"\"}`}\n />\n {opt.label}\n </label>\n ))}\n </div>\n );\n};\n","import { type FunctionalComponent, h } from \"@stencil/core\";\n\ntype TextareaProps = {\n id: string;\n value: string | undefined;\n disabled?: boolean;\n required?: boolean;\n title?: string;\n name?: string;\n componentClassName?: string;\n placeholder?: string;\n specificPartKey?: string;\n onChange: (value: string) => void;\n onBlur?: (e: Event) => void;\n ariaDescribedBy?: string;\n};\n\nexport const Textarea: FunctionalComponent<TextareaProps> = (props) => (\n <textarea\n id={props.id}\n value={props.value}\n name={props.name}\n class={props.componentClassName}\n required={props.required}\n part={`textarea_field ${props.specificPartKey ? `textarea_field--${props.specificPartKey}` : \"\"}`}\n disabled={props.disabled}\n title={props.title}\n onChange={(e) => props.onChange((e.target as HTMLTextAreaElement).value)}\n onBlur={props.onBlur}\n aria-describedby={props.ariaDescribedBy || undefined}\n />\n);\n","import { type FunctionalComponent, h } from \"@stencil/core\";\n\ntype InputProps = {\n id: string;\n type: string;\n value: string | undefined;\n componentClassName?: string;\n disabled?: boolean;\n required?: boolean;\n title?: string;\n placeholder?: string;\n specificPartKey?: string;\n onChange: (value: string) => void;\n onBlur?: (e: Event) => void;\n ariaDescribedBy?: string;\n};\n\nexport const Input: FunctionalComponent<InputProps> = (props) => (\n <input\n id={props.id}\n type={props.type}\n value={props.value}\n class={props.componentClassName}\n disabled={props.disabled}\n required={props.required}\n part={`input_field ${props.specificPartKey ? `input_field--${props.specificPartKey}` : \"\"}`}\n title={props.title}\n placeholder={props.placeholder}\n onChange={(e) => props.onChange((e.target as HTMLInputElement).value)}\n onBlur={(e) => props.onBlur?.(e)}\n aria-describedby={props.ariaDescribedBy || undefined}\n />\n);\n","import { type FunctionalComponent, h } from \"@stencil/core\";\n\nexport type Option = { value: string; label: string; selected?: boolean };\n\ntype SelectProps = {\n id: string;\n name?: string;\n value: string | string[] | null | undefined;\n options: Option[];\n disabled?: boolean;\n title?: string;\n countryCodeDisplayOption?: string;\n attr_name?: string;\n componentClassName?: string;\n emptyOption: boolean;\n specificPartKey?: string;\n onChange: (value: string) => void;\n countryIcon?: (code: string) => string;\n ariaDescribedBy?: string;\n};\n\nexport const Select: FunctionalComponent<SelectProps> = (props) => {\n const renderOptionLabel = (opt: Option) => {\n if (props.attr_name === \"country_code\" && props.countryCodeDisplayOption === \"icon\" && props.countryIcon) {\n return props.countryIcon(opt.value);\n }\n return opt.label;\n };\n return (\n <select\n id={props.id}\n name={props.name}\n class={props.componentClassName}\n data-value={props.value as string | undefined}\n part={`select_field ${props.specificPartKey ? `select_field--${props.specificPartKey}` : \"\"}`}\n disabled={props.disabled}\n title={props.title}\n onChange={(e) => props.onChange((e.target as HTMLSelectElement).value)}\n aria-describedby={props.ariaDescribedBy || undefined}\n >\n {props.emptyOption ? <option value=\"\" selected={props.value === null || props.value === \"\"} /> : null}\n {props.options.map((opt) => (\n <option\n key={opt.value}\n value={opt.value}\n data-selected={opt.value === props.value ? \"true\" : \"false\"}\n selected={opt.value === props.value}\n disabled={opt.value === \"--\"}\n >\n {renderOptionLabel(opt)}\n </option>\n ))}\n </select>\n );\n};\n","import { type FunctionalComponent, h } from \"@stencil/core\";\n\nexport type MultiSelectOption = { value: string; label: string };\n\ntype MultiSelectProps =\n | {\n value: string[];\n options: MultiSelectOption[];\n disabled?: boolean;\n title?: string;\n type?: string;\n specificPartKey?: string;\n onToggle: (optValue: string, checked: boolean) => void;\n ariaDescribedBy?: string;\n }\n | {\n id?: string;\n name: string;\n value: string;\n checked: boolean;\n componentClassName?: string;\n disabled?: boolean;\n title?: string;\n type?: string;\n onToggle: (optValue: string, checked: boolean) => void;\n ariaDescribedBy?: string;\n };\n\nexport const MultiSelect: FunctionalComponent<MultiSelectProps> = (props) => {\n if (!(\"options\" in props)) {\n return (\n <input\n id={props.id}\n type={props.type}\n name={props.name}\n value={props.value}\n checked={props.checked}\n disabled={props.disabled}\n title={props.title}\n class={props.componentClassName}\n onChange={(e) => props.onToggle(props.value, (e.target as HTMLInputElement).checked)}\n aria-describedby={props.ariaDescribedBy || undefined}\n />\n );\n }\n\n return (\n <div\n part={`multi-select-group_field ${props.specificPartKey ? `multi-select-group_field--${props.specificPartKey}` : \"\"}`}\n title={props.title}\n aria-describedby={props.ariaDescribedBy || undefined}\n >\n {props.options.map((opt) => (\n <label\n key={opt.value}\n htmlFor={`${props.specificPartKey}-${opt.value}`}\n part={`multi-select-item_label ${props.specificPartKey ? `multi-select-item_label--${props.specificPartKey}` : \"\"}`}\n >\n <input\n id={`${props.specificPartKey}-${opt.value}`}\n type={props.type}\n checked={Array.isArray(props.value) && props.value.includes(opt.value)}\n disabled={props.disabled}\n title={props.title}\n onChange={(e) => props.onToggle(opt.value, (e.target as HTMLInputElement).checked)}\n part={`multi-select-item_checkbox ${props.specificPartKey ? `multi-select-item_checkbox--${props.specificPartKey}` : \"\"}`}\n />\n {opt.label}\n </label>\n ))}\n </div>\n );\n};\n","import { Component, Element, Prop, State, h } from \"@stencil/core\";\nimport { RadioGroup, type RadioOption } from \"../raw-input-fields/RadioGroup\";\nimport { Textarea } from \"../raw-input-fields/Textarea\";\nimport { Input } from \"../raw-input-fields/Input\";\nimport { type ProfileNode, type ProfileRaw, state as profileState } from \"../../store/profile-store\";\nimport { Select, type Option } from \"../raw-input-fields/Select\";\nimport { MultiSelect, type MultiSelectOption } from \"../raw-input-fields/MultiSelect\";\nimport { UnidyComponent } from \"../../../logger\";\n\n@Component({\n tag: \"u-raw-field\",\n shadow: false,\n})\nexport class RawField extends UnidyComponent {\n @Prop() required = false;\n @Prop() readonlyPlaceholder = \"\";\n @Prop() countryCodeDisplayOption?: \"icon\" | \"label\" = \"label\";\n @Prop() invalidPhoneMessage = \"Please enter a valid phone number.\";\n @Prop({ attribute: \"class-name\" }) componentClassName?: string;\n\n @Prop() field!: string;\n @Prop() value?: string | string[];\n @Prop() checked?: boolean;\n @Prop() disabled?: boolean;\n @Prop() tooltip?: string;\n @Prop() type!: string;\n @Prop() placeholder?: string;\n @Prop() options?: string | Option[];\n @Prop() emptyOption = false;\n @Prop() attrName?: string;\n @Prop() radioOptions?: RadioOption[];\n @Prop() multiSelectOptions?: MultiSelectOption[];\n @Prop() specificPartKey?: string;\n @Prop() ariaDescribedBy = \"\";\n @Prop() pattern?: string;\n @Prop() patternErrorMessage?: string;\n @Prop() validationFunc?: (value: string | string[]) => { valid: boolean; message?: string };\n\n @Element() el!: HTMLElement;\n\n @State() selected?: string | string[];\n\n private readStore(fieldName: string): string | undefined | string[] {\n if (!fieldName) return;\n const data: ProfileRaw = profileState.data;\n\n if (!data) return;\n\n let field: ProfileNode | undefined;\n\n if (fieldName.startsWith(\"custom_attributes.\")) {\n const key = fieldName.replace(\"custom_attributes.\", \"\");\n field = data.custom_attributes?.[key];\n } else {\n field = data[fieldName];\n }\n\n if (!field) return;\n\n if (field.radio_options) {\n const checkedOption = field.radio_options.find((option: RadioOption) => option.checked);\n\n const checkedValue = checkedOption?.value ?? field.value ?? \"\";\n\n return String(checkedValue);\n }\n\n if (field.type === \"checkbox\") {\n return Array.isArray(field.value) ? field.value : [];\n }\n\n return field.value;\n }\n\n private writeStore(fieldName: string, value: string | string[]) {\n if (!fieldName) return;\n const data: ProfileRaw = profileState.data;\n if (!data) return;\n\n const isCustomAttribute = fieldName.startsWith(\"custom_attributes.\");\n const key = isCustomAttribute ? fieldName.replace(\"custom_attributes.\", \"\") : fieldName;\n\n if (isCustomAttribute) {\n const field = data.custom_attributes?.[key];\n profileState.data = {\n ...data,\n custom_attributes: {\n ...data.custom_attributes,\n [key]: { ...field, value },\n },\n };\n } else {\n const field = data[key];\n profileState.data = { ...data, [key]: { ...field, value } };\n }\n }\n\n private runExternalValidator(value: string | string[]) {\n if (this.validationFunc) {\n try {\n return this.validationFunc(value);\n } catch (e) {\n this.logger.error(\"External validator (validationFunc) threw an error:\", e);\n return null;\n }\n }\n }\n\n private validateValue(value: string | string[]): { valid: boolean; message: string } {\n // TODO: We should validate this when the component is loading.\n if (this.required) {\n const empty = value === undefined || value === null || value === \"\";\n if (empty) {\n return { valid: false, message: \"This field is required.\" };\n }\n }\n\n if (this.pattern && typeof value === \"string\") {\n const regex = new RegExp(this.pattern);\n if (!regex.test(value)) {\n return { valid: false, message: this.patternErrorMessage || \"Invalid format.\" };\n }\n }\n\n const externalResult = this.runExternalValidator(value);\n\n if (externalResult && !externalResult.valid) {\n return { valid: false, message: externalResult.message || \"Invalid input.\" };\n }\n\n if (this.type === \"tel\") {\n const phonePattern = /^(?=.{4,13}$)(\\+\\d+|\\d+)$/;\n if (typeof value === \"string\" && value !== \"\" && !phonePattern.test(value)) {\n return { valid: false, message: this.invalidPhoneMessage };\n }\n }\n\n return { valid: true, message: \"\" };\n }\n\n private getNormalizedOptions(): Option[] {\n if (Array.isArray(this.options)) return this.options;\n\n // unidy-raw-field select-options prop can be a JSON string\n if (typeof this.options === \"string\") return JSON.parse(this.options);\n\n return [];\n }\n\n private countryIcon(countryCode: string, placeholder = \"➖\"): string {\n if (!/^[A-Z]{2}$/.test(countryCode)) {\n return placeholder;\n }\n\n return Array.from(countryCode)\n .map((char) => String.fromCodePoint(0x1f1e6 + (char.charCodeAt(0) - \"A\".charCodeAt(0))))\n .join(\"\");\n }\n\n private onMultiToggle = (optValue: string, checked: boolean) => {\n const currentValues = Array.isArray(this.selected) ? this.selected : [];\n let updatedValues: string[];\n if (checked) {\n updatedValues = currentValues.includes(optValue) ? currentValues : [...currentValues, optValue];\n } else {\n updatedValues = currentValues.filter((v) => v !== optValue);\n }\n\n this.selected = updatedValues;\n // TODO: validate multiselect if needed\n this.writeStore(this.field, updatedValues);\n };\n\n private onBlurFieldValidation = (e: Event) => {\n const input = e.target as HTMLInputElement | HTMLTextAreaElement;\n const val = input.value;\n\n const result = this.validateValue(val);\n const newErrors = { ...profileState.errors };\n\n if (result.valid) {\n delete newErrors[this.field];\n } else {\n newErrors[this.field] = result.message;\n }\n\n profileState.errors = newErrors;\n };\n\n private onChangeFieldValidation = (newValue: string) => {\n this.selected = newValue;\n\n const result = this.validateValue(newValue);\n const newErrors = { ...profileState.errors };\n\n if (result.valid) {\n delete newErrors[this.field];\n this.writeStore(this.field, newValue);\n } else {\n newErrors[this.field] = result.message;\n }\n\n profileState.errors = newErrors;\n };\n\n componentWillLoad() {\n if (!this.field) throw new Error('u-raw-field: \"field\" is required.');\n if (!this.type) throw new Error('u-raw-field: \"type\" is required.');\n\n const allowed: Set<string> = new Set([\"text\", \"email\", \"tel\", \"password\", \"number\", \"date\", \"radio\", \"textarea\", \"select\", \"checkbox\"]);\n if (!allowed.has(this.type)) {\n this.type = \"text\";\n }\n\n const current = this.readStore(this.field);\n const isType =\n this.type === \"text\" ||\n this.type === \"email\" ||\n this.type === \"tel\" ||\n this.type === \"password\" ||\n this.type === \"number\" ||\n this.type === \"date\" ||\n this.type === \"textarea\" ||\n this.type === \"select\";\n\n if (isType && (current === undefined || current === null) && typeof this.value === \"string\") {\n this.writeStore(this.field, this.value);\n }\n\n this.selected = current;\n }\n\n componentDidRender() {\n const errs = profileState.errors;\n if (errs?.[this.field]) {\n this.el.querySelector<HTMLInputElement | HTMLTextAreaElement>(`#${CSS.escape(this.field)}`)?.focus();\n }\n }\n\n render() {\n if (this.type === \"radio\") {\n if (Array.isArray(this.radioOptions) && this.radioOptions.length) {\n const checkedOptions = this.radioOptions.map((opt) => ({\n ...opt,\n checked: String(opt.value) === this.selected,\n }));\n return (\n <RadioGroup\n name={this.field}\n disabled={this.disabled}\n title={this.tooltip}\n type=\"radio\"\n onChange={this.onChangeFieldValidation}\n options={checkedOptions}\n specificPartKey={this.specificPartKey}\n aria-describedby={this.ariaDescribedBy}\n required={this.required}\n />\n );\n }\n\n if (typeof this.value === \"string\") {\n const currentValue = this.readStore(this.field);\n const isChecked = currentValue != null && String(currentValue) === this.value;\n return (\n <RadioGroup\n name={this.field}\n value={this.value}\n checked={isChecked}\n disabled={this.disabled}\n title={this.tooltip}\n componentClassName={this.componentClassName}\n type=\"radio\"\n specificPartKey={this.specificPartKey}\n onChange={this.onChangeFieldValidation}\n aria-describedby={this.ariaDescribedBy}\n required={this.required}\n />\n );\n }\n }\n\n if (this.type === \"checkbox\") {\n if (Array.isArray(this.multiSelectOptions) && this.multiSelectOptions.length) {\n const selected = Array.isArray(this.selected) ? this.selected : [];\n return (\n <MultiSelect\n value={selected}\n options={this.multiSelectOptions}\n disabled={this.disabled}\n title={this.tooltip}\n type=\"checkbox\"\n specificPartKey={this.specificPartKey}\n onToggle={this.onMultiToggle}\n aria-describedby={this.ariaDescribedBy}\n />\n );\n }\n\n if (this.value) {\n const currentValue = (this.readStore(this.field) as string[]) ?? [];\n const isChecked = currentValue?.includes(this.value as string);\n return (\n <MultiSelect\n id={`${this.field}-${this.value}`}\n name={this.field}\n value={this.value as string}\n checked={isChecked}\n disabled={this.disabled}\n title={this.tooltip}\n componentClassName={this.componentClassName}\n type=\"checkbox\"\n onToggle={(val, checked) => {\n const current = this.readStore(this.field) as string[];\n const updated = checked ? [...current, val] : current.filter((v) => v !== val);\n this.writeStore(this.field, updated);\n }}\n aria-describedby={this.ariaDescribedBy}\n />\n );\n }\n }\n\n if (this.type === \"select\") {\n const currentValue = (this.readStore(this.field) as string) ?? \"\";\n const option = this.getNormalizedOptions();\n return (\n <Select\n id={this.field}\n name={this.field}\n value={currentValue}\n options={option}\n disabled={this.disabled}\n title={this.tooltip}\n emptyOption={this.emptyOption}\n onChange={this.onChangeFieldValidation}\n componentClassName={this.componentClassName}\n countryCodeDisplayOption={this.countryCodeDisplayOption}\n countryIcon={this.countryIcon}\n attr_name={this.attrName}\n specificPartKey={this.specificPartKey}\n aria-describedby={this.ariaDescribedBy}\n />\n );\n }\n\n if (this.type === \"textarea\") {\n const currentValue = (this.readStore(this.field) as string) || \"\";\n return (\n <Textarea\n id={this.field}\n value={currentValue}\n required={this.required}\n disabled={this.disabled}\n title={this.tooltip}\n componentClassName={this.componentClassName}\n specificPartKey={this.specificPartKey}\n onChange={this.onChangeFieldValidation}\n onBlur={this.onBlurFieldValidation}\n aria-describedby={this.ariaDescribedBy}\n />\n );\n }\n\n const currentValue = (this.readStore(this.field) as string) || \"\";\n return (\n <Input\n id={this.field}\n value={currentValue}\n required={this.required}\n disabled={this.disabled}\n title={this.tooltip}\n type={this.type}\n componentClassName={this.componentClassName}\n placeholder={this.placeholder}\n specificPartKey={this.specificPartKey}\n onChange={this.onChangeFieldValidation}\n onBlur={this.onBlurFieldValidation}\n aria-describedby={this.ariaDescribedBy}\n />\n );\n }\n}\n"],"names":["profileState","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AAE,IAAI,CAAC,OAAO,EACnB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,QAAQ,EAAE,IAAI,CAAC,uBAAuB,EACtC,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAAA,kBAAA,EAChB,IAAI,CAAC,eAAe,EAAA,CACtC;;AAIN,QAAA,MAAM,YAAY,GAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAY,IAAI,EAAE;AACjE,QAAA,QACEA,OAAA,CAAC,KAAK,EAAA,EACJ,EAAE,EAAE,IAAI,CAAC,KAAK,EACd,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,QAAQ,EAAE,IAAI,CAAC,uBAAuB,EACtC,MAAM,EAAE,IAAI,CAAC,qBAAqB,sBAChB,IAAI,CAAC,eAAe,EAAA,CACtC;;;;;;;"}
@@ -6,7 +6,7 @@ var profileStore = require('./profile-store-P_BcYkef.js');
6
6
  require('./unidy-store-7AbWnZ6g.js');
7
7
  require('./index-DLz3FT7T.js');
8
8
 
9
- const fieldCss = "/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme{:host,:root{--u-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--u-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--u-default-font-family:var(--u-font-sans);--u-default-mono-font-family:var(--u-font-mono);--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{font-family:var(--u-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--u-default-font-feature-settings,normal);font-variation-settings:var(--u-default-font-variation-settings,normal);-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent;line-height:1.5}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--u-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--u-default-mono-font-feature-settings,normal);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--u-default-mono-font-variation-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:currentColor;color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.u\\:flex{display:flex}.u\\:justify-end{justify-content:flex-end}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer base{}@layer components;@layer utilities{.block{display:block}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}:host{display:block}.field-error:focus{border-color:red;outline-color:red}.multi-select-readonly-container{list-style:none}.multi-select-readonly-container li{display:inline-block}[part=input]:disabled,[part=select]:disabled{cursor:not-allowed}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
9
+ const fieldCss = "/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme{:host,:root{--u-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--u-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--u-default-font-family:var(--u-font-sans);--u-default-mono-font-family:var(--u-font-mono);--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{font-family:var(--u-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--u-default-font-feature-settings,normal);font-variation-settings:var(--u-default-font-variation-settings,normal);-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent;line-height:1.5}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--u-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--u-default-mono-font-feature-settings,normal);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--u-default-mono-font-variation-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:currentColor;color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.u\\:flex{display:flex}.u\\:justify-end{justify-content:flex-end}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer base{}@layer components;@layer utilities{.block{display:block}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}:host{display:block}.field-error:focus{border-color:red;outline-color:red}.multi-select-readonly-container{list-style:none}.multi-select-readonly-container li{display:inline-block}[part=input]:disabled,[part=select]:disabled{cursor:not-allowed}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}";
10
10
 
11
11
  const Field = class {
12
12
  constructor(hostRef) {
@@ -6,7 +6,7 @@ require('./index-DLz3FT7T.js');
6
6
 
7
7
  const CloseIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("title", null, "Close"), index.h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), index.h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })));
8
8
 
9
- const flashMessageCss = "/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-border-style:solid;--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--u-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--u-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--u-color-red-50:oklch(97.1% .013 17.38);--u-color-red-300:oklch(80.8% .114 19.571);--u-color-red-800:oklch(44.4% .177 26.899);--u-color-green-50:oklch(98.2% .018 155.826);--u-color-green-400:oklch(79.2% .209 151.711);--u-color-green-800:oklch(44.8% .119 151.328);--u-color-blue-50:oklch(97% .014 254.604);--u-color-blue-300:oklch(80.9% .105 251.813);--u-color-blue-800:oklch(42.4% .199 265.638);--u-spacing:.25rem;--u-container-lg:32rem;--u-default-font-family:var(--u-font-sans);--u-default-mono-font-family:var(--u-font-mono);--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{font-family:var(--u-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--u-default-font-feature-settings,normal);font-variation-settings:var(--u-default-font-variation-settings,normal);-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent;line-height:1.5}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--u-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--u-default-mono-font-feature-settings,normal);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--u-default-mono-font-variation-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:currentColor;color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.u\\:z-\\[500\\]{z-index:500}.u\\:flex{display:flex}.u\\:max-w-lg{max-width:var(--u-container-lg)}.u\\:min-w-64{min-width:calc(var(--u-spacing)*64)}.u\\:cursor-pointer{cursor:pointer}.u\\:flex-col{flex-direction:column}.u\\:items-start{align-items:flex-start}.u\\:justify-between{justify-content:space-between}.u\\:gap-2{gap:calc(var(--u-spacing)*2)}.u\\:gap-3{gap:calc(var(--u-spacing)*3)}.u\\:rounded{border-radius:.25rem}.u\\:border{border-style:var(--tw-border-style);border-width:1px}.u\\:border-blue-300{border-color:var(--u-color-blue-300)}.u\\:border-green-400{border-color:var(--u-color-green-400)}.u\\:border-red-300{border-color:var(--u-color-red-300)}.u\\:bg-blue-50{background-color:var(--u-color-blue-50)}.u\\:bg-green-50{background-color:var(--u-color-green-50)}.u\\:bg-red-50{background-color:var(--u-color-red-50)}.u\\:p-3{padding:calc(var(--u-spacing)*3)}.u\\:pt-1{padding-top:calc(var(--u-spacing)*1)}.u\\:leading-none{--tw-leading:1;line-height:1}.u\\:break-words{overflow-wrap:break-word}.u\\:text-blue-800{color:var(--u-color-blue-800)}.u\\:text-green-800{color:var(--u-color-green-800)}.u\\:text-red-800{color:var(--u-color-red-800)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-leading{syntax:\"*\";inherits:false}";
9
+ const flashMessageCss = "/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-border-style:solid;--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:host,:root{--u-font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--u-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--u-color-red-50:oklch(97.1% .013 17.38);--u-color-red-300:oklch(80.8% .114 19.571);--u-color-red-800:oklch(44.4% .177 26.899);--u-color-green-50:oklch(98.2% .018 155.826);--u-color-green-400:oklch(79.2% .209 151.711);--u-color-green-800:oklch(44.8% .119 151.328);--u-color-blue-50:oklch(97% .014 254.604);--u-color-blue-300:oklch(80.9% .105 251.813);--u-color-blue-800:oklch(42.4% .199 265.638);--u-spacing:.25rem;--u-container-xl:36rem;--u-default-font-family:var(--u-font-sans);--u-default-mono-font-family:var(--u-font-mono);--font-sans:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{font-family:var(--u-default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--u-default-font-feature-settings,normal);font-variation-settings:var(--u-default-font-variation-settings,normal);-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent;line-height:1.5}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--u-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--u-default-mono-font-feature-settings,normal);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--u-default-mono-font-variation-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:currentColor;color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex;padding-block:0}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.u\\:z-\\[500\\]{z-index:500}.u\\:mr-1{margin-right:calc(var(--u-spacing)*1)}.u\\:flex{display:flex}.u\\:max-w-xl{max-width:var(--u-container-xl)}.u\\:min-w-64{min-width:calc(var(--u-spacing)*64)}.u\\:cursor-pointer{cursor:pointer}.u\\:flex-col{flex-direction:column}.u\\:items-start{align-items:flex-start}.u\\:justify-between{justify-content:space-between}.u\\:gap-2{gap:calc(var(--u-spacing)*2)}.u\\:gap-3{gap:calc(var(--u-spacing)*3)}.u\\:rounded{border-radius:.25rem}.u\\:border{border-style:var(--tw-border-style);border-width:1px}.u\\:border-solid{--tw-border-style:solid;border-style:solid}.u\\:border-blue-300{border-color:var(--u-color-blue-300)}.u\\:border-green-400{border-color:var(--u-color-green-400)}.u\\:border-red-300{border-color:var(--u-color-red-300)}.u\\:bg-blue-50{background-color:var(--u-color-blue-50)}.u\\:bg-green-50{background-color:var(--u-color-green-50)}.u\\:bg-red-50{background-color:var(--u-color-red-50)}.u\\:p-3{padding:calc(var(--u-spacing)*3)}.u\\:pt-1{padding-top:calc(var(--u-spacing)*1)}.u\\:leading-none{--tw-leading:1;line-height:1}.u\\:break-words{overflow-wrap:break-word}.u\\:text-blue-800{color:var(--u-color-blue-800)}.u\\:text-green-800{color:var(--u-color-green-800)}.u\\:text-red-800{color:var(--u-color-red-800)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}} /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components; /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-leading{syntax:\"*\";inherits:false}";
10
10
 
11
11
  const variantClasses = {
12
12
  error: "u:bg-red-50 u:border-red-300 u:text-red-800",
@@ -28,7 +28,7 @@ const FlashMessage = class {
28
28
  if (flashStore.flashState.messages.length === 0) {
29
29
  return null;
30
30
  }
31
- return (index.h("div", { class: `u:flex u:flex-col u:gap-2 u:z-[500] u:min-w-64 u:max-w-lg ${this.componentClassName}` }, flashStore.flashState.messages.map((message) => (index.h("div", { key: message.id, class: `u:flex u:items-start u:justify-between u:gap-3 u:p-3 u:rounded u:border ${variantClasses[message.variant]}`, role: "alert", "aria-live": "polite" }, index.h("span", { class: "u:break-words" }, message.text), index.h("button", { type: "button", class: "u:cursor-pointer u:leading-none u:pt-1", onClick: () => flashStore.Flash.remove(message.id), "aria-label": "Close" }, index.h(CloseIcon, null)))))));
31
+ return (index.h("div", { class: `u:flex u:flex-col u:gap-2 u:z-[500] u:min-w-64 u:max-w-xl ${this.componentClassName}` }, flashStore.flashState.messages.map((message) => (index.h("div", { key: message.id, class: `u:flex u:items-start u:justify-between u:gap-3 u:p-3 u:rounded u:border u:border-solid ${variantClasses[message.variant]}`, role: "alert", "aria-live": "polite" }, index.h("span", { class: "u:break-words u:mr-1" }, message.text), index.h("button", { type: "button", class: "u:cursor-pointer u:leading-none u:pt-1", onClick: () => flashStore.Flash.remove(message.id), "aria-label": "Close" }, index.h(CloseIcon, null)))))));
32
32
  }
33
33
  };
34
34
  FlashMessage.style = flashMessageCss;
@@ -1 +1 @@
1
- {"version":3,"file":"u-flash-message.entry.cjs.js","sources":["src/shared/components/flash-message/close-icon.tsx","src/shared/components/flash-message/flash-message.css?tag=u-flash-message","src/shared/components/flash-message/flash-message.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <title>Close</title>\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n","","import { Component, Prop, h } from \"@stencil/core\";\nimport { flashState, Flash } from \"../../store/flash-store\";\nimport { CloseIcon } from \"./close-icon\";\n\nconst variantClasses = {\n error: \"u:bg-red-50 u:border-red-300 u:text-red-800\",\n success: \"u:bg-green-50 u:border-green-400 u:text-green-800\",\n info: \"u:bg-blue-50 u:border-blue-300 u:text-blue-800\",\n};\n\n@Component({\n tag: \"u-flash-message\",\n styleUrl: \"flash-message.css\",\n shadow: false,\n})\nexport class FlashMessage {\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() removeAfterSeconds: number | null = null;\n\n componentWillLoad() {\n if (this.removeAfterSeconds) {\n flashState.autoRemoveDelay = this.removeAfterSeconds * 1000;\n }\n }\n\n render() {\n if (flashState.messages.length === 0) {\n return null;\n }\n\n return (\n <div class={`u:flex u:flex-col u:gap-2 u:z-[500] u:min-w-64 u:max-w-lg ${this.componentClassName}`}>\n {flashState.messages.map((message) => (\n <div\n key={message.id}\n class={`u:flex u:items-start u:justify-between u:gap-3 u:p-3 u:rounded u:border ${variantClasses[message.variant]}`}\n role=\"alert\"\n aria-live=\"polite\"\n >\n <span class=\"u:break-words\">{message.text}</span>\n <button\n type=\"button\"\n class=\"u:cursor-pointer u:leading-none u:pt-1\"\n onClick={() => Flash.remove(message.id)}\n aria-label=\"Close\"\n >\n <CloseIcon />\n </button>\n </div>\n ))}\n </div>\n );\n }\n}\n"],"names":["h","flashState","Flash"],"mappings":";;;;;;AAEO,MAAM,SAAS,GAAG,OACvBA,OACE,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EAAA,cAAA,EACR,GAAG,EACD,gBAAA,EAAA,OAAO,qBACN,OAAO,EAAA,EAEvBA,OAAoB,CAAA,OAAA,EAAA,IAAA,EAAA,OAAA,CAAA,EACpBA,OAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAG,CAAA,EACtCA,OAAA,CAAA,MAAA,EAAA,EAAM,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAG,CA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x","src/shared/components/flash-message/flash-message.css?tag=u-flash-message","src/shared/components/flash-message/flash-message.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\n\nexport const CloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <title>Close</title>\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n);\n","","import { Component, h, Prop } from \"@stencil/core\";\nimport { Flash, flashState } from \"../../store/flash-store\";\nimport { CloseIcon } from \"./close-icon\";\n\nconst variantClasses = {\n error: \"u:bg-red-50 u:border-red-300 u:text-red-800\",\n success: \"u:bg-green-50 u:border-green-400 u:text-green-800\",\n info: \"u:bg-blue-50 u:border-blue-300 u:text-blue-800\",\n};\n\n@Component({\n tag: \"u-flash-message\",\n styleUrl: \"flash-message.css\",\n shadow: false,\n})\nexport class FlashMessage {\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() removeAfterSeconds: number | null = null;\n\n componentWillLoad() {\n if (this.removeAfterSeconds) {\n flashState.autoRemoveDelay = this.removeAfterSeconds * 1000;\n }\n }\n\n render() {\n if (flashState.messages.length === 0) {\n return null;\n }\n\n return (\n <div class={`u:flex u:flex-col u:gap-2 u:z-[500] u:min-w-64 u:max-w-xl ${this.componentClassName}`}>\n {flashState.messages.map((message) => (\n <div\n key={message.id}\n class={`u:flex u:items-start u:justify-between u:gap-3 u:p-3 u:rounded u:border u:border-solid ${variantClasses[message.variant]}`}\n role=\"alert\"\n aria-live=\"polite\"\n >\n <span class=\"u:break-words u:mr-1\">{message.text}</span>\n <button\n type=\"button\"\n class=\"u:cursor-pointer u:leading-none u:pt-1\"\n onClick={() => Flash.remove(message.id)}\n aria-label=\"Close\"\n >\n <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AI,CAAC,kBAAkB,CAAA,CAAE,EAAA,EAC/FC,qBAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,MAC/BD,iBACE,GAAG,EAAE,OAAO,CAAC,EAAE,EACf,KAAK,EAAE,CAAA,uFAAA,EAA0F,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA,CAAE,EAClI,IAAI,EAAC,OAAO,eACF,QAAQ,EAAA,EAElBA,OAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,sBAAsB,IAAE,OAAO,CAAC,IAAI,CAAQ,EACxDA,OACE,CAAA,QAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,wCAAwC,EAC9C,OAAO,EAAE,MAAME,gBAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,EAAA,YAAA,EAC5B,OAAO,EAAA,EAElBF,OAAC,CAAA,SAAS,OAAG,CACN,CACL,CACP,CAAC,CACE;;;;;;;"}
@@ -81,7 +81,12 @@ const PasswordField = class {
81
81
  shouldRender() {
82
82
  switch (this.for) {
83
83
  case "login":
84
- return (authStore.state.step === "verification" && authStore.state.availableLoginOptions?.password) || authStore.state.step === "single-login";
84
+ if (authStore.state.step === "single-login")
85
+ return true;
86
+ if (authStore.state.step === "verification" && authStore.state.availableLoginOptions?.password) {
87
+ return true;
88
+ }
89
+ return false;
85
90
  case "new-password":
86
91
  case "password-confirmation":
87
92
  return authStore.state.step === "reset-password";
@@ -91,9 +96,6 @@ const PasswordField = class {
91
96
  if (!this.shouldRender()) {
92
97
  return null;
93
98
  }
94
- if (authStore.state.availableLoginOptions && !authStore.state.availableLoginOptions.password && authStore.state.step !== "single-login") {
95
- return null;
96
- }
97
99
  const key = this.for === "password-confirmation" ? "auth.password.confirmation.placeholder" : "auth.password.placeholder";
98
100
  const placeholder = i18n.t(key, { defaultValue: "Enter your password" });
99
101
  return (index.h("form", { onSubmit: this.handleSubmit }, index.h("input", { name: this.getInputName(), type: "password", value: this.getValue(), autocomplete: this.getAutocomplete(), placeholder: placeholder, disabled: authStore.state.loading, class: this.componentClassName, onInput: this.handleInput, "aria-label": this.getAriaLabel() })));
@@ -1 +1 @@
1
- {"version":3,"file":"u-password-field.entry.cjs.js","sources":["src/auth/components/password-field/password-field.tsx"],"sourcesContent":["import { Component, Element, h, Prop } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { authState, authStore } from \"../../store/auth-store\";\nimport { getParentSigninStep } from \"../helpers\";\n\nexport type PasswordFieldFor = \"login\" | \"new-password\" | \"password-confirmation\";\n\n@Component({\n tag: \"u-password-field\",\n shadow: false,\n})\nexport class PasswordField {\n @Element() el!: HTMLElement;\n\n @Prop() for: PasswordFieldFor = \"login\";\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() ariaLabel = \"\";\n\n private getAriaLabel(): string {\n if (this.ariaLabel) return this.ariaLabel;\n\n switch (this.for) {\n case \"login\":\n return \"Password\";\n case \"new-password\":\n return \"New Password\";\n case \"password-confirmation\":\n return \"Password Confirmation\";\n }\n }\n\n private getValue(): string {\n switch (this.for) {\n case \"login\":\n return authState.password;\n case \"new-password\":\n return authState.resetPassword.newPassword;\n case \"password-confirmation\":\n return authState.resetPassword.passwordConfirmation;\n }\n }\n\n private getAutocomplete(): string {\n switch (this.for) {\n case \"login\":\n return \"current-password\";\n case \"new-password\":\n case \"password-confirmation\":\n return \"new-password\";\n }\n }\n\n private getInputName(): string {\n switch (this.for) {\n case \"login\":\n return \"password\";\n case \"new-password\":\n return \"new-password\";\n case \"password-confirmation\":\n return \"confirm-password\";\n }\n }\n\n private handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n\n switch (this.for) {\n case \"login\":\n authStore.setPassword(target.value);\n break;\n case \"new-password\":\n authStore.setNewPassword(target.value);\n authStore.clearFieldError(\"resetPassword\");\n authStore.clearFieldError(\"password\");\n break;\n case \"password-confirmation\":\n authStore.setConfirmPassword(target.value);\n authStore.clearFieldError(\"resetPassword\");\n authStore.clearFieldError(\"password\");\n break;\n }\n };\n\n private handleSubmit = async (event: Event) => {\n event.preventDefault();\n\n (await getParentSigninStep(this.el))?.submit();\n };\n\n private shouldRender(): boolean {\n switch (this.for) {\n case \"login\":\n return (authState.step === \"verification\" && authState.availableLoginOptions?.password) || authState.step === \"single-login\";\n case \"new-password\":\n case \"password-confirmation\":\n return authState.step === \"reset-password\";\n }\n }\n\n render() {\n if (!this.shouldRender()) {\n return null;\n }\n\n if (authState.availableLoginOptions && !authState.availableLoginOptions.password && authState.step !== \"single-login\") {\n return null;\n }\n\n const key = this.for === \"password-confirmation\" ? \"auth.password.confirmation.placeholder\" : \"auth.password.placeholder\";\n const placeholder = t(key, { defaultValue: \"Enter your password\" });\n\n return (\n <form onSubmit={this.handleSubmit}>\n <input\n name={this.getInputName()}\n type=\"password\"\n value={this.getValue()}\n autocomplete={this.getAutocomplete()}\n placeholder={placeholder}\n disabled={authState.loading}\n class={this.componentClassName}\n onInput={this.handleInput}\n aria-label={this.getAriaLabel()}\n />\n </form>\n );\n }\n}\n"],"names":["authState","authStore","getParentSigninStep","t","h"],"mappings":";;;;;;;;;MAWa,aAAa,GAAA,MAAA;;;;;IAGhB,GAAG,GAAqB,OAAO;IACJ,kBAAkB,GAAG,EAAE;IAClD,SAAS,GAAG,EAAE;IAEd,YAAY,GAAA;QAClB,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC,SAAS;AAEzC,QAAA,QAAQ,IAAI,CAAC,GAAG;AACd,YAAA,KAAK,OAAO;AACV,gBAAA,OAAO,UAAU;AACnB,YAAA,KAAK,cAAc;AACjB,gBAAA,OAAO,cAAc;AACvB,YAAA,KAAK,uBAAuB;AAC1B,gBAAA,OAAO,uBAAuB;;;IAI5B,QAAQ,GAAA;AACd,QAAA,QAAQ,IAAI,CAAC,GAAG;AACd,YAAA,KAAK,OAAO;gBACV,OAAOA,eAAS,CAAC,QAAQ;AAC3B,YAAA,KAAK,cAAc;AACjB,gBA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O,EAAE,IAAI,CAAC,WAAW,EACb,YAAA,EAAA,IAAI,CAAC,YAAY,EAAE,EAAA,CAC/B,CACG;;;;;;"}
1
+ {"version":3,"file":"u-password-field.entry.cjs.js","sources":["src/auth/components/password-field/password-field.tsx"],"sourcesContent":["import { Component, Element, h, Prop } from \"@stencil/core\";\nimport { t } from \"../../../i18n\";\nimport { authState, authStore } from \"../../store/auth-store\";\nimport { getParentSigninStep } from \"../helpers\";\n\nexport type PasswordFieldFor = \"login\" | \"new-password\" | \"password-confirmation\";\n\n@Component({\n tag: \"u-password-field\",\n shadow: false,\n})\nexport class PasswordField {\n @Element() el!: HTMLElement;\n\n @Prop() for: PasswordFieldFor = \"login\";\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n @Prop() ariaLabel = \"\";\n\n private getAriaLabel(): string {\n if (this.ariaLabel) return this.ariaLabel;\n\n switch (this.for) {\n case \"login\":\n return \"Password\";\n case \"new-password\":\n return \"New Password\";\n case \"password-confirmation\":\n return \"Password Confirmation\";\n }\n }\n\n private getValue(): string {\n switch (this.for) {\n case \"login\":\n return authState.password;\n case \"new-password\":\n return authState.resetPassword.newPassword;\n case \"password-confirmation\":\n return authState.resetPassword.passwordConfirmation;\n }\n }\n\n private getAutocomplete(): string {\n switch (this.for) {\n case \"login\":\n return \"current-password\";\n case \"new-password\":\n case \"password-confirmation\":\n return \"new-password\";\n }\n }\n\n private getInputName(): string {\n switch (this.for) {\n case \"login\":\n return \"password\";\n case \"new-password\":\n return \"new-password\";\n case \"password-confirmation\":\n return \"confirm-password\";\n }\n }\n\n private handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n\n switch (this.for) {\n case \"login\":\n authStore.setPassword(target.value);\n break;\n case \"new-password\":\n authStore.setNewPassword(target.value);\n authStore.clearFieldError(\"resetPassword\");\n authStore.clearFieldError(\"password\");\n break;\n case \"password-confirmation\":\n authStore.setConfirmPassword(target.value);\n authStore.clearFieldError(\"resetPassword\");\n authStore.clearFieldError(\"password\");\n break;\n }\n };\n\n private handleSubmit = async (event: Event) => {\n event.preventDefault();\n\n (await getParentSigninStep(this.el))?.submit();\n };\n\n private shouldRender(): boolean {\n switch (this.for) {\n case \"login\":\n if (authState.step === \"single-login\") return true;\n if (authState.step === \"verification\" && authState.availableLoginOptions?.password) {\n return true;\n }\n return false;\n case \"new-password\":\n case \"password-confirmation\":\n return authState.step === \"reset-password\";\n }\n }\n\n render() {\n if (!this.shouldRender()) {\n return null;\n }\n\n const key = this.for === \"password-confirmation\" ? \"auth.password.confirmation.placeholder\" : \"auth.password.placeholder\";\n const placeholder = t(key, { defaultValue: \"Enter your password\" });\n\n return (\n <form onSubmit={this.handleSubmit}>\n <input\n name={this.getInputName()}\n type=\"password\"\n value={this.getValue()}\n autocomplete={this.getAutocomplete()}\n placeholder={placeholder}\n disabled={authState.loading}\n class={this.componentClassName}\n onInput={this.handleInput}\n aria-label={this.getAriaLabel()}\n />\n </form>\n );\n }\n}\n"],"names":["authState","authStore","getParentSigninStep","t","h"],"mappings":";;;;;;;;;MAWa,aAAa,GAAA,MAAA;;;;;IAGhB,GAAG,GAAqB,OAAO;IACJ,kBAAkB,GAAG,EAAE;IAClD,SAAS,GAAG,EAAE;IAEd,YAAY,GAAA;QAClB,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC,SAAS;AAEzC,QAAA,QAAQ,IAAI,CAAC,GAAG;AACd,YAAA,KAAK,OAAO;AACV,gBAAA,OAAO,UAAU;AACnB,YAAA,KAAK,cAAc;AACjB,gBAAA,OAAO,cAAc;AACvB,YAAA,KAAK,uBAAuB;AAC1B,gBAAA,OAAO,uBAAuB;;;IAI5B,QAAQ,GAAA;AACd,QAAA,QAAQ,IAAI,CAAC,GAAG;AACd,YAAA,KAAK,OAAO;gBACV,OAAOA,eAAS,CAAC,QAAQ;AAC3B,YAAA,KAAK,cAAc;AACjB,gBAAA,OAAOA,eAAS,CAAC,aAAa,CAAC,WAAW;AAC5C,YAAA,KAAK,uBAAu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u-submit-button.entry.cjs.js","sources":["src/profile/components/profile/profile.tsx","src/auth/components/submit-button/auth-submit-button.ts","src/newsletter/components/submit-button/newsletter-submit-button.ts","src/profile/components/submit-button/profile-submit-button.ts","src/shared/components/submit-button/context.ts","src/shared/components/submit-button/submit-button.css?tag=u-submit-button","src/shared/components/submit-button/submit-button.tsx"],"sourcesContent":["import * as Sentry from \"@sentry/browser\";\nimport { Component, Event, type EventEmitter, Host, h, Method, Prop, State } from \"@stencil/core\";\nimport { getUnidyClient } from \"../../../api\";\nimport { Auth } from \"../../../auth\";\nimport { onChange as authOnChange, authStore } from \"../../../auth/store/auth-store\";\nimport { t } from \"../../../i18n\";\nimport { onChange as unidyOnChange, unidyState } from \"../../../shared/store/unidy-store\";\nimport { buildPayload, validateRequiredFieldsUnchanged } from \"../../profile-helpers\";\nimport type { ProfileRaw } from \"../../store/profile-store\";\nimport { onChange as profileOnChange, state as profileState } from \"../../store/profile-store\";\n\n@Component({\n tag: \"u-profile\",\n shadow: false,\n})\nexport class Profile {\n @Prop() profileId?: string;\n @Prop() initialData: string | Record<string, string> = \"\";\n\n @Event() uProfileSuccess!: EventEmitter<{ message: string; payload: ProfileRaw }>;\n @Event() uProfileError!: EventEmitter<{\n error: string;\n details: {\n fieldErrors?: Record<string, string>;\n flashErrors?: Record<string, string>;\n httpStatus?: number;\n responseData?: unknown;\n };\n }>;\n\n @State() fetchingProfileData = false;\n\n constructor() {\n unidyOnChange(\"locale\", async (_locale) => {\n if (authStore.state.authenticated) await this.getTokenAndFetchProfile();\n });\n }\n\n async componentWillLoad() {\n if (this.initialData !== \"\") {\n profileState.data = typeof this.initialData === \"string\" ? JSON.parse(this.initialData) : this.initialData;\n } else if (authStore.state.authenticated) {\n await this.getTokenAndFetchProfile();\n }\n\n profileState.loading = false;\n }\n\n async getTokenAndFetchProfile() {\n const authInstance = await Auth.getInstance();\n\n const idToken = await authInstance.getToken();\n\n if (idToken && typeof idToken === \"string\") {\n await this.fetchProfileData(idToken as string);\n }\n }\n\n async fetchProfileData(idToken: string) {\n // avoid multiple requests\n if (this.fetchingProfileData) return;\n\n this.fetchingProfileData = true;\n try {\n const resp = await getUnidyClient().profile.fetchProfile({ idToken, lang: unidyState.locale });\n\n if (resp.success) {\n profileState.configuration = JSON.parse(JSON.stringify(resp.data)) as ProfileRaw;\n profileState.configUpdateSource = \"fetch\";\n profileState.errors = {};\n profileState.flashErrors = {};\n\n profileState.data = JSON.parse(JSON.stringify(resp.data)) as ProfileRaw;\n } else {\n profileState.flashErrors = { [String(resp?.status)]: String(resp?.error) };\n }\n } catch (error) {\n Sentry.captureException(\"Failed to fetch profile data:\", error);\n profileState.flashErrors = { error: t(\"errors.failed_to_load_profile\") };\n }\n this.fetchingProfileData = false;\n }\n\n @Method()\n async submitProfile() {\n const authInstance = await Auth.getInstance();\n\n profileState.loading = true;\n\n const { configuration, ...stateWithoutConfig } = profileState;\n\n if (!validateRequiredFieldsUnchanged(stateWithoutConfig.data)) {\n profileState.loading = false;\n return;\n }\n\n const updatedProfileData = buildPayload(stateWithoutConfig.data);\n\n const resp = await getUnidyClient().profile.updateProfile({\n idToken: (await authInstance.getToken()) as string,\n data: updatedProfileData,\n lang: unidyState.locale,\n });\n\n if (resp?.success) {\n profileState.loading = false;\n profileState.configuration = JSON.parse(JSON.stringify(resp.data));\n profileState.configUpdateSource = \"submit\";\n profileState.errors = {};\n this.uProfileSuccess.emit({ message: \"profile_updated_successfully\", payload: resp.data as ProfileRaw });\n } else {\n if (resp?.data && \"flatErrors\" in resp.data) {\n profileState.errors = resp.data.flatErrors as Record<string, string>;\n this.uProfileError.emit({\n error: \"profile_update_field_errors\",\n details: { fieldErrors: profileState.errors, httpStatus: resp?.status, responseData: resp?.data },\n });\n } else {\n profileState.flashErrors = { [String(resp?.status)]: String(resp?.error) };\n this.uProfileError.emit({\n error: \"profile_update_failed\",\n details: { flashErrors: profileState.flashErrors, httpStatus: resp?.status, responseData: resp?.data },\n });\n }\n profileState.loading = false;\n }\n }\n\n componentDidLoad() {\n profileOnChange(\"configuration\", (cfg) => {\n profileState.data = cfg as ProfileRaw;\n });\n\n authOnChange(\"token\", (newToken: string | null) => {\n const token = newToken ?? \"\";\n\n if (token) {\n this.fetchProfileData(token);\n }\n });\n }\n\n render() {\n const hasFieldErrors = Object.values(profileState.errors).some(Boolean);\n const errorMsg = Object.values(profileState.flashErrors).filter(Boolean).join(\", \");\n const wasSubmit = profileState.configUpdateSource === \"submit\";\n\n if (authStore.state.authenticated) {\n return this.fetchingProfileData ? (\n <div>{t(\"loading\")}</div>\n ) : (\n <Host>\n <slot />\n {!hasFieldErrors && errorMsg && <flash-message variant=\"error\" message={errorMsg} />}\n {wasSubmit && !errorMsg && !hasFieldErrors && <flash-message variant=\"success\" message={t(\"profile.updated\")} />}\n </Host>\n );\n }\n\n return <h2>{t(\"profile.signInToView\")}</h2>;\n }\n}\n","import { t } from \"../../../i18n\";\nimport type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { authState } from \"../../store/auth-store\";\nimport { getParentSigninStep } from \"../helpers\";\n\nexport type AuthButtonFor = \"email\" | \"password\" | \"resetPassword\";\n\nexport const authContext: SubmitButtonContext<AuthButtonFor> = {\n handleClick: async (event: MouseEvent, el: HTMLElement, _forProp?: AuthButtonFor) => {\n event.preventDefault();\n await getParentSigninStep(el)?.submit();\n },\n\n isDisabled(forProp?: AuthButtonFor, disabled?: boolean): boolean {\n if (disabled || authState.loading) return true;\n\n if (authState.step === \"email\" && forProp === \"email\") {\n return authState.email === \"\";\n }\n\n if (authState.step === \"verification\" && forProp === \"password\") {\n return authState.password === \"\";\n }\n\n if (authState.step === \"reset-password\" && forProp === \"resetPassword\") {\n return !authState.resetPassword.newPassword || !authState.resetPassword.passwordConfirmation;\n }\n\n return false;\n },\n\n isLoading(): boolean {\n return authState.loading;\n },\n\n getButtonText(forProp?: AuthButtonFor, text?: string): string {\n if (text) return text;\n\n switch (authState.step) {\n case \"email\":\n return t(\"buttons.continue\");\n case \"verification\":\n if (forProp === \"password\") {\n return t(\"auth.password.button_text\", { defaultValue: \"Sign In with Password\" });\n }\n return t(\"buttons.submit\");\n case \"reset-password\":\n if (forProp === \"resetPassword\") {\n return t(\"auth.resetPassword.button_text_set\", { defaultValue: \"Set Password\" });\n }\n return t(\"buttons.submit\");\n default:\n return t(\"buttons.submit\");\n }\n },\n\n shouldRender(forProp?: AuthButtonFor): boolean {\n if (!authState.availableLoginOptions?.password && forProp === \"password\") {\n return false;\n }\n\n if (authState.step === \"email\") {\n return forProp === \"email\";\n }\n\n if (authState.step === \"verification\") {\n return forProp === \"password\" && authState.magicCodeStep !== \"sent\";\n }\n\n if (authState.step === \"reset-password\") {\n return forProp === \"resetPassword\";\n }\n\n return false;\n },\n};\n","import type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { newsletterStore } from \"../../store/newsletter-store\";\nimport { getParentNewsletterRoot } from \"../helpers\";\n\nexport type NewsletterButtonFor = \"login\" | \"create\";\n\nexport const newsletterContext: SubmitButtonContext<NewsletterButtonFor> = {\n handleClick: async (event: MouseEvent, el: HTMLElement, forProp?: NewsletterButtonFor) => {\n event.preventDefault();\n return await getParentNewsletterRoot(el)?.submit(forProp);\n },\n\n isDisabled(forProp, disabled?: boolean): boolean {\n if (forProp === \"login\") {\n return disabled || !newsletterStore.state.email;\n }\n\n return disabled || !newsletterStore.state.email || Object.keys(newsletterStore.state.checkedNewsletters).length === 0;\n },\n\n isLoading(): boolean {\n return false;\n },\n};\n","import type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { state as profileState } from \"../../store/profile-store\";\n\nfunction getParentProfile(el: HTMLElement) {\n return el.closest(\"u-profile\") as HTMLUProfileElement | null;\n}\n\nexport const profileContext: SubmitButtonContext = {\n async handleClick(event: MouseEvent, el: HTMLElement, _forProp?: string) {\n event.preventDefault();\n await getParentProfile(el)?.submitProfile();\n },\n\n isDisabled(_forProp, disabled?: boolean): boolean {\n return disabled || (profileState.errors && Object.keys(profileState.errors).length > 0) || profileState.phoneValid === false;\n },\n\n isLoading(): boolean {\n return profileState.loading;\n },\n};\n","export interface SubmitButtonContext<ForContext = string> {\n init?(): Promise<void>;\n handleClick(event: MouseEvent, el: HTMLElement, forProp?: ForContext): Promise<void>;\n isDisabled(forProp?: ForContext, disabled?: boolean): boolean;\n isLoading(): boolean;\n getButtonText?(forProp?: ForContext, text?: string): string;\n shouldRender?(forProp?: ForContext): boolean;\n}\n\nexport const defaultContext: SubmitButtonContext = {\n async handleClick() {},\n\n isDisabled(_forProp, disabled = false): boolean {\n return disabled || false;\n },\n\n isLoading(): boolean {\n return false;\n },\n};\n","","import { Component, Element, h, Prop } from \"@stencil/core\";\nimport { type AuthButtonFor, authContext } from \"../../../auth/components/submit-button/auth-submit-button\";\nimport { t } from \"../../../i18n\";\nimport { type NewsletterButtonFor, newsletterContext } from \"../../../newsletter/components/submit-button/newsletter-submit-button\";\nimport { profileContext } from \"../../../profile/components/submit-button/profile-submit-button\";\nimport { hasSlotContent } from \"../../component-utils\";\nimport { defaultContext, type SubmitButtonContext } from \"./context\";\n\n@Component({\n tag: \"u-submit-button\",\n styleUrl: \"submit-button.css\",\n shadow: false,\n})\nexport class SubmitButton {\n @Element() el!: HTMLElement;\n @Prop() for?: AuthButtonFor | NewsletterButtonFor;\n @Prop() text?: string;\n @Prop() disabled = false;\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n private context: \"auth\" | \"profile\" | \"newsletter\" = \"auth\";\n private contextModule: SubmitButtonContext = defaultContext;\n private hasSlot = false;\n\n async componentWillLoad() {\n this.hasSlot = hasSlotContent(this.el);\n this.context = this.detectContext();\n\n switch (this.context) {\n case \"auth\":\n this.contextModule = authContext;\n break;\n case \"profile\":\n this.contextModule = profileContext;\n break;\n case \"newsletter\":\n this.contextModule = newsletterContext;\n break;\n default:\n this.contextModule = defaultContext;\n }\n }\n\n private detectContext(): \"auth\" | \"profile\" | \"newsletter\" {\n if (this.el.closest(\"u-signin-root\") || this.el.closest(\"u-signin-step\")) return \"auth\";\n\n if (this.el.closest(\"u-profile\")) return \"profile\";\n\n if (this.el.closest(\"u-newsletter-root\")) return \"newsletter\";\n\n throw new Error(\n \"No context found for submit button. Make sure you are using the component within a u-signin-root, u-profile, or u-newsletter-root.\",\n );\n }\n\n private handleClick = async (event: MouseEvent) => {\n await this.contextModule.handleClick(event, this.el, this.for);\n };\n\n private isDisabled(): boolean {\n return this.contextModule.isDisabled(this.for, this.disabled);\n }\n\n private isLoading(): boolean {\n return this.contextModule.isLoading();\n }\n\n private getButtonText(): string {\n if (this.contextModule.getButtonText) {\n return this.contextModule.getButtonText(this.for, this.text);\n }\n if (this.text) {\n return this.text;\n }\n\n return t(\"buttons.submit\");\n }\n\n private getButtonContent() {\n const loading = this.isLoading();\n\n if (loading) {\n return <u-spinner />;\n }\n\n if (this.hasSlot) {\n return <slot />;\n }\n\n return this.getButtonText();\n }\n\n render() {\n if (this.contextModule.shouldRender && !this.contextModule.shouldRender(this.for)) {\n return null;\n }\n\n const buttonClasses = [\n this.componentClassName,\n this.context === \"auth\" ? \"u:flex u:justify-center\" : \"\",\n \"u:disabled:opacity-50 u:disabled:cursor-not-allowed\",\n ].join(\" \");\n\n const buttonProps: Record<string, unknown> = {\n type: \"submit\",\n part: `${this.context}-submit-button`,\n disabled: this.isDisabled() || this.isLoading(),\n class: buttonClasses,\n onClick: this.handleClick,\n \"aria-live\": \"polite\",\n };\n\n return <button {...buttonProps}>{this.getButtonContent()}</button>;\n }\n}\n"],"names":["unidyOnChange","authStore","profileState","Auth","getUnidyClient","unidyState","Sentry.captureException","t","validateRequiredFieldsUnchanged","buildPayload","profileOnChange","authOnChange","h","Host","getParentSigninStep","authState","getParentNewsletterRoot","newsletterStore","hasSlotContent"],"mappings":";;;;;;;;;;;;;;;;;MAea,OAAO,GAAA,MAAA;AACV,IAAA,SAAS;IACT,WAAW,GAAoC,EAAE;AAEhD,IAAA,eAAe;AACf,IAAA,aAAa;IAUb,mBAAmB,GAAG,KAAK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EAAA,EAAA,GAAY,WAAW,EAAG,EAAA,IAAI,CAAC,gBAAgB,EAAE,CAAU;;;;;;;;"}
1
+ {"version":3,"file":"u-profile.u-submit-button.entry.cjs.js","sources":["src/profile/components/profile/profile.tsx","src/auth/components/submit-button/auth-submit-button.ts","src/newsletter/components/submit-button/newsletter-submit-button.ts","src/profile/components/submit-button/profile-submit-button.ts","src/shared/components/submit-button/context.ts","src/shared/components/submit-button/submit-button.css?tag=u-submit-button","src/shared/components/submit-button/submit-button.tsx"],"sourcesContent":["import * as Sentry from \"@sentry/browser\";\nimport { Component, Event, type EventEmitter, Host, h, Method, Prop, State } from \"@stencil/core\";\nimport { getUnidyClient } from \"../../../api\";\nimport { Auth } from \"../../../auth\";\nimport { onChange as authOnChange, authStore } from \"../../../auth/store/auth-store\";\nimport { t } from \"../../../i18n\";\nimport { onChange as unidyOnChange, unidyState } from \"../../../shared/store/unidy-store\";\nimport { buildPayload, validateRequiredFieldsUnchanged } from \"../../profile-helpers\";\nimport type { ProfileRaw } from \"../../store/profile-store\";\nimport { onChange as profileOnChange, state as profileState } from \"../../store/profile-store\";\n\n@Component({\n tag: \"u-profile\",\n shadow: false,\n})\nexport class Profile {\n @Prop() profileId?: string;\n @Prop() initialData: string | Record<string, string> = \"\";\n\n @Event() uProfileSuccess!: EventEmitter<{ message: string; payload: ProfileRaw }>;\n @Event() uProfileError!: EventEmitter<{\n error: string;\n details: {\n fieldErrors?: Record<string, string>;\n flashErrors?: Record<string, string>;\n httpStatus?: number;\n responseData?: unknown;\n };\n }>;\n\n @State() fetchingProfileData = false;\n\n constructor() {\n unidyOnChange(\"locale\", async (_locale) => {\n if (authStore.state.authenticated) await this.getTokenAndFetchProfile();\n });\n }\n\n async componentWillLoad() {\n if (this.initialData !== \"\") {\n profileState.data = typeof this.initialData === \"string\" ? JSON.parse(this.initialData) : this.initialData;\n } else if (authStore.state.authenticated) {\n await this.getTokenAndFetchProfile();\n }\n\n profileState.loading = false;\n }\n\n async getTokenAndFetchProfile() {\n const authInstance = await Auth.getInstance();\n\n const idToken = await authInstance.getToken();\n\n if (idToken && typeof idToken === \"string\") {\n await this.fetchProfileData(idToken as string);\n }\n }\n\n async fetchProfileData(idToken: string) {\n // avoid multiple requests\n if (this.fetchingProfileData) return;\n\n this.fetchingProfileData = true;\n try {\n const resp = await getUnidyClient().profile.fetchProfile({ idToken, lang: unidyState.locale });\n\n if (resp.success) {\n profileState.configuration = JSON.parse(JSON.stringify(resp.data)) as ProfileRaw;\n profileState.configUpdateSource = \"fetch\";\n profileState.errors = {};\n profileState.flashErrors = {};\n\n profileState.data = JSON.parse(JSON.stringify(resp.data)) as ProfileRaw;\n } else {\n profileState.flashErrors = { [String(resp?.status)]: String(resp?.error) };\n }\n } catch (error) {\n Sentry.captureException(\"Failed to fetch profile data:\", error);\n profileState.flashErrors = { error: t(\"errors.failed_to_load_profile\") };\n }\n this.fetchingProfileData = false;\n }\n\n @Method()\n async submitProfile() {\n const authInstance = await Auth.getInstance();\n\n profileState.loading = true;\n\n const { configuration, ...stateWithoutConfig } = profileState;\n\n if (!validateRequiredFieldsUnchanged(stateWithoutConfig.data)) {\n profileState.loading = false;\n return;\n }\n\n const updatedProfileData = buildPayload(stateWithoutConfig.data);\n\n const resp = await getUnidyClient().profile.updateProfile({\n idToken: (await authInstance.getToken()) as string,\n data: updatedProfileData,\n lang: unidyState.locale,\n });\n\n if (resp?.success) {\n profileState.loading = false;\n profileState.configuration = JSON.parse(JSON.stringify(resp.data));\n profileState.configUpdateSource = \"submit\";\n profileState.errors = {};\n this.uProfileSuccess.emit({ message: \"profile_updated_successfully\", payload: resp.data as ProfileRaw });\n } else {\n if (resp?.data && \"flatErrors\" in resp.data) {\n profileState.errors = resp.data.flatErrors as Record<string, string>;\n this.uProfileError.emit({\n error: \"profile_update_field_errors\",\n details: { fieldErrors: profileState.errors, httpStatus: resp?.status, responseData: resp?.data },\n });\n } else {\n profileState.flashErrors = { [String(resp?.status)]: String(resp?.error) };\n this.uProfileError.emit({\n error: \"profile_update_failed\",\n details: { flashErrors: profileState.flashErrors, httpStatus: resp?.status, responseData: resp?.data },\n });\n }\n profileState.loading = false;\n }\n }\n\n componentDidLoad() {\n profileOnChange(\"configuration\", (cfg) => {\n profileState.data = cfg as ProfileRaw;\n });\n\n authOnChange(\"token\", (newToken: string | null) => {\n const token = newToken ?? \"\";\n\n if (token) {\n this.fetchProfileData(token);\n }\n });\n }\n\n render() {\n const hasFieldErrors = Object.values(profileState.errors).some(Boolean);\n const errorMsg = Object.values(profileState.flashErrors).filter(Boolean).join(\", \");\n const wasSubmit = profileState.configUpdateSource === \"submit\";\n\n if (authStore.state.authenticated) {\n return this.fetchingProfileData ? (\n <div>{t(\"loading\")}</div>\n ) : (\n <Host>\n <slot />\n {!hasFieldErrors && errorMsg && <flash-message variant=\"error\" message={errorMsg} />}\n {wasSubmit && !errorMsg && !hasFieldErrors && <flash-message variant=\"success\" message={t(\"profile.updated\")} />}\n </Host>\n );\n }\n\n return <h2>{t(\"profile.signInToView\")}</h2>;\n }\n}\n","import { t } from \"../../../i18n\";\nimport type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { authState } from \"../../store/auth-store\";\nimport { getParentSigninStep } from \"../helpers\";\n\nexport type AuthButtonFor = \"email\" | \"password\" | \"resetPassword\";\n\nexport const authContext: SubmitButtonContext<AuthButtonFor> = {\n handleClick: async (event: MouseEvent, el: HTMLElement, _forProp?: AuthButtonFor) => {\n event.preventDefault();\n await getParentSigninStep(el)?.submit();\n },\n\n isDisabled(forProp?: AuthButtonFor, disabled?: boolean): boolean {\n if (disabled || authState.loading) return true;\n\n if (authState.step === \"email\" && forProp === \"email\") {\n return authState.email === \"\";\n }\n\n if (authState.step === \"verification\" && forProp === \"password\") {\n return authState.password === \"\";\n }\n\n if (authState.step === \"reset-password\" && forProp === \"resetPassword\") {\n return !authState.resetPassword.newPassword || !authState.resetPassword.passwordConfirmation;\n }\n\n return false;\n },\n\n isLoading(): boolean {\n return authState.loading;\n },\n\n getButtonText(forProp?: AuthButtonFor, text?: string): string {\n if (text) return text;\n\n switch (authState.step) {\n case \"email\":\n return t(\"buttons.continue\");\n case \"verification\":\n if (forProp === \"password\") {\n return t(\"auth.password.button_text\", { defaultValue: \"Sign In with Password\" });\n }\n return t(\"buttons.submit\");\n case \"reset-password\":\n if (forProp === \"resetPassword\") {\n return t(\"auth.resetPassword.button_text_set\", { defaultValue: \"Set Password\" });\n }\n return t(\"buttons.submit\");\n default:\n return t(\"buttons.submit\");\n }\n },\n\n shouldRender(forProp?: AuthButtonFor): boolean {\n if (!authState.availableLoginOptions?.password && forProp === \"password\") {\n return false;\n }\n\n if (authState.step === \"email\") {\n return forProp === \"email\";\n }\n\n if (authState.step === \"verification\") {\n return forProp === \"password\" && authState.magicCodeStep !== \"sent\";\n }\n\n if (authState.step === \"reset-password\") {\n return forProp === \"resetPassword\";\n }\n\n return false;\n },\n};\n","import type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { newsletterStore } from \"../../store/newsletter-store\";\nimport { getParentNewsletterRoot } from \"../helpers\";\n\nexport type NewsletterButtonFor = \"login\" | \"create\";\n\nexport const newsletterContext: SubmitButtonContext<NewsletterButtonFor> = {\n handleClick: async (event: MouseEvent, el: HTMLElement, forProp?: NewsletterButtonFor) => {\n event.preventDefault();\n return await getParentNewsletterRoot(el)?.submit(forProp);\n },\n\n isDisabled(forProp, disabled?: boolean): boolean {\n if (forProp === \"login\") {\n return disabled || !newsletterStore.state.email;\n }\n\n return disabled || !newsletterStore.state.email || Object.keys(newsletterStore.state.checkedNewsletters).length === 0;\n },\n\n isLoading(): boolean {\n return false;\n },\n};\n","import type { SubmitButtonContext } from \"../../../shared/components/submit-button/context\";\nimport { state as profileState } from \"../../store/profile-store\";\n\nfunction getParentProfile(el: HTMLElement) {\n return el.closest(\"u-profile\") as HTMLUProfileElement | null;\n}\n\nexport const profileContext: SubmitButtonContext = {\n async handleClick(event: MouseEvent, el: HTMLElement, _forProp?: string) {\n event.preventDefault();\n await getParentProfile(el)?.submitProfile();\n },\n\n isDisabled(_forProp, disabled?: boolean): boolean {\n return disabled || (profileState.errors && Object.keys(profileState.errors).length > 0) || profileState.phoneValid === false;\n },\n\n isLoading(): boolean {\n return profileState.loading;\n },\n};\n","export interface SubmitButtonContext<ForContext = string> {\n init?(): Promise<void>;\n handleClick(event: MouseEvent, el: HTMLElement, forProp?: ForContext): Promise<void>;\n isDisabled(forProp?: ForContext, disabled?: boolean): boolean;\n isLoading(): boolean;\n getButtonText?(forProp?: ForContext, text?: string): string;\n shouldRender?(forProp?: ForContext): boolean;\n}\n\nexport const defaultContext: SubmitButtonContext = {\n async handleClick() {},\n\n isDisabled(_forProp, disabled = false): boolean {\n return disabled || false;\n },\n\n isLoading(): boolean {\n return false;\n },\n};\n","","import { Component, Element, h, Prop } from \"@stencil/core\";\nimport { type AuthButtonFor, authContext } from \"../../../auth/components/submit-button/auth-submit-button\";\nimport { t } from \"../../../i18n\";\nimport { type NewsletterButtonFor, newsletterContext } from \"../../../newsletter/components/submit-button/newsletter-submit-button\";\nimport { profileContext } from \"../../../profile/components/submit-button/profile-submit-button\";\nimport { hasSlotContent } from \"../../component-utils\";\nimport { defaultContext, type SubmitButtonContext } from \"./context\";\n\n@Component({\n tag: \"u-submit-button\",\n styleUrl: \"submit-button.css\",\n shadow: false,\n})\nexport class SubmitButton {\n @Element() el!: HTMLElement;\n @Prop() for?: AuthButtonFor | NewsletterButtonFor;\n @Prop() text?: string;\n @Prop() disabled = false;\n @Prop({ attribute: \"class-name\" }) componentClassName = \"\";\n\n private context: \"auth\" | \"profile\" | \"newsletter\" = \"auth\";\n private contextModule: SubmitButtonContext = defaultContext;\n private hasSlot = false;\n\n async componentWillLoad() {\n this.hasSlot = hasSlotContent(this.el);\n this.context = this.detectContext();\n\n switch (this.context) {\n case \"auth\":\n this.contextModule = authContext;\n break;\n case \"profile\":\n this.contextModule = profileContext;\n break;\n case \"newsletter\":\n this.contextModule = newsletterContext;\n break;\n default:\n this.contextModule = defaultContext;\n }\n }\n\n private detectContext(): \"auth\" | \"profile\" | \"newsletter\" {\n if (this.el.closest(\"u-signin-root\") || this.el.closest(\"u-signin-step\")) return \"auth\";\n\n if (this.el.closest(\"u-profile\")) return \"profile\";\n\n if (this.el.closest(\"u-newsletter-root\")) return \"newsletter\";\n\n throw new Error(\n \"No context found for submit button. Make sure you are using the component within a u-signin-root, u-profile, or u-newsletter-root.\",\n );\n }\n\n private handleClick = async (event: MouseEvent) => {\n await this.contextModule.handleClick(event, this.el, this.for);\n };\n\n private isDisabled(): boolean {\n return this.contextModule.isDisabled(this.for, this.disabled);\n }\n\n private isLoading(): boolean {\n return this.contextModule.isLoading();\n }\n\n private getButtonText(): string {\n if (this.contextModule.getButtonText) {\n return this.contextModule.getButtonText(this.for, this.text);\n }\n if (this.text) {\n return this.text;\n }\n\n return t(\"buttons.submit\");\n }\n\n private getButtonContent() {\n const loading = this.isLoading();\n\n if (loading) {\n return <u-spinner />;\n }\n\n if (this.hasSlot) {\n return <slot />;\n }\n\n return this.getButtonText();\n }\n\n render() {\n if (this.contextModule.shouldRender && !this.contextModule.shouldRender(this.for)) {\n return null;\n }\n\n const buttonClasses = [\n this.componentClassName,\n this.context === \"auth\" ? \"u:flex u:justify-center\" : \"\",\n \"u:disabled:opacity-50 u:disabled:cursor-not-allowed\",\n ].join(\" \");\n\n const buttonProps: Record<string, unknown> = {\n type: \"submit\",\n part: `${this.context}-submit-button`,\n disabled: this.isDisabled() || this.isLoading(),\n class: buttonClasses,\n onClick: this.handleClick,\n \"aria-live\": \"polite\",\n };\n\n return <button {...buttonProps}>{this.getButtonContent()}</button>;\n }\n}\n"],"names":["unidyOnChange","authStore","profileState","Auth","getUnidyClient","unidyState","Sentry.captureException","t","validateRequiredFieldsUnchanged","buildPayload","profileOnChange","authOnChange","h","Host","getParentSigninStep","authState","getParentNewsletterRoot","newsletterStore","hasSlotContent"],"mappings":";;;;;;;;;;;;;;;;;MAea,OAAO,GAAA,MAAA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