@synergy-design-system/components 0.1.0 → 1.0.0-main.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/README.md +150 -1
- package/dist/chunks/{chunk.Y5USHY74.js → chunk.5FQRRIZP.js} +4 -3
- package/dist/chunks/chunk.5FQRRIZP.js.map +7 -0
- package/dist/chunks/{chunk.2DA7CIOQ.js → chunk.5OIEI73E.js} +3 -2
- package/dist/chunks/chunk.5OIEI73E.js.map +7 -0
- package/dist/chunks/{chunk.7XI5LKCC.js → chunk.6C4JXZZN.js} +2 -1
- package/dist/chunks/chunk.6C4JXZZN.js.map +7 -0
- package/dist/chunks/{chunk.MAS2SHYD.js → chunk.A3SKDWCT.js} +1 -0
- package/dist/chunks/chunk.A3SKDWCT.js.map +7 -0
- package/dist/chunks/{chunk.SVIWEI6P.js → chunk.BREU4ILT.js} +2 -1
- package/dist/chunks/chunk.BREU4ILT.js.map +7 -0
- package/dist/chunks/{chunk.2CFEYJLE.js → chunk.C7624ITA.js} +1 -0
- package/dist/chunks/chunk.C7624ITA.js.map +7 -0
- package/dist/chunks/{chunk.PM7NIY3M.js → chunk.DJOAQ4JU.js} +1 -0
- package/dist/chunks/chunk.DJOAQ4JU.js.map +7 -0
- package/dist/chunks/{chunk.Q5SD5LHE.js → chunk.GHPQ7ZMD.js} +11 -242
- package/dist/chunks/chunk.GHPQ7ZMD.js.map +7 -0
- package/dist/chunks/chunk.IFBY43YE.js +138 -0
- package/dist/chunks/chunk.IFBY43YE.js.map +7 -0
- package/dist/chunks/{chunk.HQUF2ZAX.js → chunk.LE4ARJTE.js} +3 -2
- package/dist/chunks/chunk.LE4ARJTE.js.map +7 -0
- package/dist/chunks/{chunk.QPNUJNT5.js → chunk.N2I6HVX3.js} +2 -1
- package/dist/chunks/chunk.N2I6HVX3.js.map +7 -0
- package/dist/chunks/{chunk.KHU4AFPL.js → chunk.N7UUNTQC.js} +2 -1
- package/dist/chunks/chunk.N7UUNTQC.js.map +7 -0
- package/dist/chunks/{chunk.4NMNW5OM.js → chunk.O7USYXBT.js} +1 -0
- package/dist/chunks/chunk.O7USYXBT.js.map +7 -0
- package/dist/chunks/{chunk.NBKDLFEY.js → chunk.OEWBEV4Z.js} +7 -6
- package/dist/chunks/chunk.OEWBEV4Z.js.map +7 -0
- package/dist/chunks/{chunk.HSF5YXAS.js → chunk.OLZ3GIFL.js} +19 -35
- package/dist/chunks/chunk.OLZ3GIFL.js.map +7 -0
- package/dist/chunks/chunk.R55DOPNK.js +12 -0
- package/dist/chunks/chunk.R55DOPNK.js.map +7 -0
- package/dist/chunks/{chunk.2A3352EO.js → chunk.R6VNLE6N.js} +1 -0
- package/dist/chunks/chunk.R6VNLE6N.js.map +7 -0
- package/dist/chunks/{chunk.XVEDHRRP.js → chunk.RLGMLXIP.js} +20 -22
- package/dist/chunks/chunk.RLGMLXIP.js.map +7 -0
- package/dist/chunks/{chunk.VRTJZYIC.js → chunk.U7ZJ22QM.js} +1 -0
- package/dist/chunks/chunk.U7ZJ22QM.js.map +7 -0
- package/dist/chunks/chunk.W46CFM2R.js +90 -0
- package/dist/chunks/chunk.W46CFM2R.js.map +7 -0
- package/dist/chunks/{chunk.Z6AW3P62.js → chunk.WDCAHRYG.js} +4 -48
- package/dist/chunks/chunk.WDCAHRYG.js.map +7 -0
- package/dist/chunks/chunk.WTCUSH7V.js +42 -0
- package/dist/chunks/chunk.WTCUSH7V.js.map +7 -0
- package/dist/chunks/chunk.XGXFE6IF.js +49 -0
- package/dist/chunks/chunk.XGXFE6IF.js.map +7 -0
- package/dist/chunks/{chunk.O3LUPMYG.js → chunk.Y7DVVKVJ.js} +82 -18
- package/dist/chunks/chunk.Y7DVVKVJ.js.map +7 -0
- package/dist/components/button/button.component.d.ts +1 -10
- package/dist/components/button/button.component.js +19 -16
- package/dist/components/button/button.component.js.map +7 -0
- package/dist/components/button/button.custom.styles.d.ts +2 -0
- package/dist/components/button/button.custom.styles.js +8 -0
- package/dist/components/button/button.custom.styles.js.map +7 -0
- package/dist/components/button/button.js +21 -21
- package/dist/components/button/button.js.map +7 -0
- package/dist/components/button/button.styles.js +5 -3
- package/dist/components/button/button.styles.js.map +7 -0
- package/dist/components/checkbox/checkbox.custom.styles.d.ts +2 -0
- package/dist/components/checkbox/checkbox.custom.styles.js +11 -0
- package/dist/components/checkbox/checkbox.custom.styles.js.map +7 -0
- package/dist/components/icon/icon.component.js +10 -9
- package/dist/components/icon/icon.component.js.map +7 -0
- package/dist/components/icon/icon.js +10 -9
- package/dist/components/icon/icon.js.map +7 -0
- package/dist/components/icon/icon.styles.js +4 -3
- package/dist/components/icon/icon.styles.js.map +7 -0
- package/dist/components/icon/library.default.js +4 -3
- package/dist/components/icon/library.default.js.map +7 -0
- package/dist/components/icon/library.js +6 -5
- package/dist/components/icon/library.js.map +7 -0
- package/dist/components/icon/library.system.js +3 -2
- package/dist/components/icon/library.system.js.map +7 -0
- package/dist/components/input/input.component.d.ts +0 -4
- package/dist/components/input/input.component.js +17 -14
- package/dist/components/input/input.component.js.map +7 -0
- package/dist/components/input/input.custom.styles.d.ts +2 -0
- package/dist/components/input/input.custom.styles.js +8 -0
- package/dist/components/input/input.custom.styles.js.map +7 -0
- package/dist/components/input/input.js +18 -15
- package/dist/components/input/input.js.map +7 -0
- package/dist/components/input/input.styles.js +5 -3
- package/dist/components/input/input.styles.js.map +7 -0
- package/dist/components/spinner/spinner.component.js +8 -7
- package/dist/components/spinner/spinner.component.js.map +7 -0
- package/dist/components/spinner/spinner.styles.js +4 -3
- package/dist/components/spinner/spinner.styles.js.map +7 -0
- package/dist/components/textarea/textarea.custom.styles.d.ts +2 -0
- package/dist/components/textarea/textarea.custom.styles.js +11 -0
- package/dist/components/textarea/textarea.custom.styles.js.map +7 -0
- package/dist/custom-elements.json +11 -108
- package/dist/events/events.d.ts +8 -8
- package/dist/styles/form-control.custom.styles.d.ts +2 -0
- package/dist/synergy-autoloader.js +3 -2
- package/dist/synergy-autoloader.js.map +7 -0
- package/dist/synergy.d.ts +2 -0
- package/dist/synergy.js +34 -16
- package/dist/synergy.js.map +7 -0
- package/dist/translations/de.js +4 -3
- package/dist/translations/de.js.map +7 -0
- package/dist/translations/en.js +3 -2
- package/dist/translations/en.js.map +7 -0
- package/dist/utilities/base-path.js +3 -2
- package/dist/utilities/base-path.js.map +7 -0
- package/dist/utilities/form.d.ts +11 -0
- package/dist/utilities/form.js +11 -0
- package/dist/utilities/form.js.map +7 -0
- package/dist/utilities/localize.js +4 -3
- package/dist/utilities/localize.js.map +7 -0
- package/dist/vscode.html-custom-data.json +2 -31
- package/dist/web-types.json +4 -56
- package/package.json +73 -34
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
input_styles_default
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.Y7DVVKVJ.js";
|
|
4
4
|
import {
|
|
5
|
-
FormControlController,
|
|
6
5
|
HasSlotController
|
|
7
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.XGXFE6IF.js";
|
|
7
|
+
import {
|
|
8
|
+
LocalizeController
|
|
9
|
+
} from "./chunk.R6VNLE6N.js";
|
|
10
|
+
import {
|
|
11
|
+
FormControlController
|
|
12
|
+
} from "./chunk.WDCAHRYG.js";
|
|
8
13
|
import {
|
|
9
14
|
SynIcon,
|
|
10
15
|
watch
|
|
11
|
-
} from "./chunk.
|
|
12
|
-
import {
|
|
13
|
-
LocalizeController
|
|
14
|
-
} from "./chunk.2A3352EO.js";
|
|
16
|
+
} from "./chunk.OEWBEV4Z.js";
|
|
15
17
|
import {
|
|
16
18
|
SynergyElement
|
|
17
|
-
} from "./chunk.
|
|
19
|
+
} from "./chunk.LE4ARJTE.js";
|
|
18
20
|
import {
|
|
19
21
|
__decorateClass
|
|
20
|
-
} from "./chunk.
|
|
22
|
+
} from "./chunk.DJOAQ4JU.js";
|
|
21
23
|
|
|
22
24
|
// src/components/input/input.component.ts
|
|
23
25
|
import { classMap } from "lit/directives/class-map.js";
|
|
@@ -54,7 +56,7 @@ var SynInput = class extends SynergyElement {
|
|
|
54
56
|
this.formControlController = new FormControlController(this, {
|
|
55
57
|
assumeInteractionOn: ["syn-blur", "syn-input"]
|
|
56
58
|
});
|
|
57
|
-
this.hasSlotController = new HasSlotController(this, "help-text", "label");
|
|
59
|
+
this.hasSlotController = new HasSlotController(this, "help-text", "label", "prefix", "suffix");
|
|
58
60
|
this.localize = new LocalizeController(this);
|
|
59
61
|
this.hasFocus = false;
|
|
60
62
|
this.title = "";
|
|
@@ -66,8 +68,6 @@ var SynInput = class extends SynergyElement {
|
|
|
66
68
|
this.value = "";
|
|
67
69
|
this.defaultValue = "";
|
|
68
70
|
this.size = "medium";
|
|
69
|
-
this.filled = false;
|
|
70
|
-
this.pill = false;
|
|
71
71
|
this.label = "";
|
|
72
72
|
this.helpText = "";
|
|
73
73
|
this.clearable = false;
|
|
@@ -236,6 +236,8 @@ var SynInput = class extends SynergyElement {
|
|
|
236
236
|
render() {
|
|
237
237
|
const hasLabelSlot = this.hasSlotController.test("label");
|
|
238
238
|
const hasHelpTextSlot = this.hasSlotController.test("help-text");
|
|
239
|
+
const hasPrefixSlot = this.hasSlotController.test("prefix");
|
|
240
|
+
const hasSuffixSlot = this.hasSlotController.test("suffix");
|
|
239
241
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
240
242
|
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
241
243
|
const hasClearIcon = this.clearable && !this.disabled && !this.readonly;
|
|
@@ -249,7 +251,9 @@ var SynInput = class extends SynergyElement {
|
|
|
249
251
|
"form-control--medium": this.size === "medium",
|
|
250
252
|
"form-control--large": this.size === "large",
|
|
251
253
|
"form-control--has-label": hasLabel,
|
|
252
|
-
"form-control--has-help-text": hasHelpText
|
|
254
|
+
"form-control--has-help-text": hasHelpText,
|
|
255
|
+
"form-control--has-prefix": hasPrefixSlot,
|
|
256
|
+
"form-control--has-suffix": hasSuffixSlot
|
|
253
257
|
})}
|
|
254
258
|
>
|
|
255
259
|
<label
|
|
@@ -271,9 +275,8 @@ var SynInput = class extends SynergyElement {
|
|
|
271
275
|
"input--medium": this.size === "medium",
|
|
272
276
|
"input--large": this.size === "large",
|
|
273
277
|
// States
|
|
274
|
-
"input--
|
|
275
|
-
"input--
|
|
276
|
-
"input--filled": this.filled,
|
|
278
|
+
"input--standard": !this.readonly,
|
|
279
|
+
"input--readonly": this.readonly,
|
|
277
280
|
"input--disabled": this.disabled,
|
|
278
281
|
"input--focused": this.hasFocus,
|
|
279
282
|
"input--empty": !this.value,
|
|
@@ -400,12 +403,6 @@ __decorateClass([
|
|
|
400
403
|
__decorateClass([
|
|
401
404
|
property({ reflect: true })
|
|
402
405
|
], SynInput.prototype, "size", 2);
|
|
403
|
-
__decorateClass([
|
|
404
|
-
property({ type: Boolean, reflect: true })
|
|
405
|
-
], SynInput.prototype, "filled", 2);
|
|
406
|
-
__decorateClass([
|
|
407
|
-
property({ type: Boolean, reflect: true })
|
|
408
|
-
], SynInput.prototype, "pill", 2);
|
|
409
406
|
__decorateClass([
|
|
410
407
|
property()
|
|
411
408
|
], SynInput.prototype, "label", 2);
|
|
@@ -498,3 +495,4 @@ __decorateClass([
|
|
|
498
495
|
export {
|
|
499
496
|
SynInput
|
|
500
497
|
};
|
|
498
|
+
//# sourceMappingURL=chunk.RLGMLXIP.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/input/input.component.ts", "../../src/internal/default-value.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { classMap } from 'lit/directives/class-map.js';\nimport { defaultValue } from '../../internal/default-value.js';\nimport { FormControlController } from '../../internal/form.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIcon from '../icon/icon.component.js';\nimport styles from './input.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\n\n/**\n * @summary Inputs collect data from the user.\n * @documentation https://synergy.style/components/input\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n *\n * @slot label - The input's label. Alternatively, you can use the `label` attribute.\n * @slot prefix - Used to prepend a presentational icon or similar element to the input.\n * @slot suffix - Used to append a presentational icon or similar element to the input.\n * @slot clear-icon - An icon to use in lieu of the default clear icon.\n * @slot show-password-icon - An icon to use in lieu of the default show password icon.\n * @slot hide-password-icon - An icon to use in lieu of the default hide password icon.\n * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n *\n * @event syn-blur - Emitted when the control loses focus.\n * @event syn-change - Emitted when an alteration to the control's value is committed by the user.\n * @event syn-clear - Emitted when the clear button is activated.\n * @event syn-focus - Emitted when the control gains focus.\n * @event syn-input - Emitted when the control receives input.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart base - The component's base wrapper.\n * @csspart input - The internal `<input>` control.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart clear-button - The clear button.\n * @csspart password-toggle-button - The password toggle button.\n * @csspart suffix - The container that wraps the suffix.\n */\nexport default class SynInput extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = styles;\n static dependencies = { 'syn-icon': SynIcon };\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['syn-blur', 'syn-input']\n });\n private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label', 'prefix', 'suffix');\n private readonly localize = new LocalizeController(this);\n\n @query('.input__control') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n private __numberInput = Object.assign(document.createElement('input'), { type: 'number' });\n private __dateInput = Object.assign(document.createElement('input'), { type: 'date' });\n\n /**\n * The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\n * to `text`.\n */\n @property({ reflect: true }) type:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url' = 'text';\n\n /** The name of the input, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the input, submitted as a name/value pair with form data. */\n @property() value = '';\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The input's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** The input's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Adds a button to toggle the password's visibility. Only applies to password types. */\n @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle = false;\n\n /** Determines whether or not the password is currently visible. Only applies to password input types. */\n @property({ attribute: 'password-visible', type: Boolean }) passwordVisible = false;\n\n /** Hides the browser's built-in increment/decrement spin buttons for number inputs. */\n @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons = false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** A regular expression pattern to validate input against. */\n @property() pattern: string;\n\n /** The minimum length of input that will be considered valid. */\n @property({ type: Number }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @property({ type: Number }) maxlength: number;\n\n /** The input's minimum value. Only applies to date and number input types. */\n @property() min: number | string;\n\n /** The input's maximum value. Only applies to date and number input types. */\n @property() max: number | string;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to date and number input types.\n */\n @property() step: number | 'any';\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: 'off' | 'on';\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string;\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /** Enables spell checking on the input. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false')\n }\n })\n spellcheck = true;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n //\n // NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties\n // can be set before the component is rendered.\n //\n\n /**\n * Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. This will use the native `<input type=\"{{type}}\">` implementation and may result in an error.\n */\n get valueAsDate() {\n this.__dateInput.type = this.type;\n this.__dateInput.value = this.value;\n return this.input?.valueAsDate || this.__dateInput.valueAsDate;\n }\n\n set valueAsDate(newValue: Date | null) {\n this.__dateInput.type = this.type;\n this.__dateInput.valueAsDate = newValue;\n this.value = this.__dateInput.value;\n }\n\n /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */\n get valueAsNumber() {\n this.__numberInput.value = this.value;\n return this.input?.valueAsNumber || this.__numberInput.valueAsNumber;\n }\n\n set valueAsNumber(newValue: number) {\n this.__numberInput.valueAsNumber = newValue;\n this.value = this.__numberInput.value;\n }\n\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.emit('syn-change');\n }\n\n private handleClearClick(event: MouseEvent) {\n this.value = '';\n this.emit('syn-clear');\n this.emit('syn-input');\n this.emit('syn-change');\n this.input.focus();\n\n event.stopPropagation();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.formControlController.updateValidity();\n this.emit('syn-input');\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n //\n // When using an Input Method Editor (IME), pressing enter will cause the form to submit unexpectedly. One way\n // to check for this is to look at event.isComposing, which will be true when the IME is open.\n //\n // See https://github.com/synergy-design-system/synergy/pull/988\n //\n if (!event.defaultPrevented && !event.isComposing) {\n this.formControlController.submit();\n }\n });\n }\n }\n\n private handlePasswordToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n\n @watch('step', { waitUntilFirstUpdate: true })\n handleStepChange() {\n // If step changes, the value may become invalid so we need to recheck after the update. We set the new step\n // imperatively so we don't have to wait for the next render to report the updated validity.\n this.input.step = String(this.step);\n this.formControlController.updateValidity();\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n this.formControlController.updateValidity();\n }\n\n /** Sets focus on the input. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the input. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n select() {\n this.input.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: 'select' | 'start' | 'end' | 'preserve'\n ) {\n // @ts-expect-error - start, end, and selectMode are optional\n this.input.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Displays the browser picker for an input element (only works if the browser supports it for the input type). */\n showPicker() {\n if ('showPicker' in HTMLInputElement.prototype) {\n this.input.showPicker();\n }\n }\n\n /** Increments the value of a numeric input type by the value of the step attribute. */\n stepUp() {\n this.input.stepUp();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Decrements the value of a numeric input type by the value of the step attribute. */\n stepDown() {\n this.input.stepDown();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasPrefixSlot = this.hasSlotController.test('prefix');\n const hasSuffixSlot = this.hasSlotController.test('suffix');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;\n const hasClearIcon = this.clearable && !this.disabled && !this.readonly;\n const isClearIconVisible = hasClearIcon && (typeof this.value === 'number' || this.value.length > 0);\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'form-control--has-prefix': hasPrefixSlot,\n 'form-control--has-suffix': hasSuffixSlot\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <div\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--standard': !this.readonly,\n 'input--readonly': this.readonly,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons\n })}\n >\n <span part=\"prefix\" class=\"input__prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control\"\n type=${this.type === 'password' && this.passwordVisible ? 'text' : this.type}\n title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=${classMap({\n input__clear: true,\n 'input__clear--visible': isClearIconVisible\n })}\n type=\"button\"\n aria-label=${this.localize.term('clearEntry')}\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <syn-icon name=\"x-circle-fill\" library=\"system\"></syn-icon>\n </slot>\n </button>\n `\n : ''}\n ${this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.localize.term(this.passwordVisible ? 'hidePassword' : 'showPassword')}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <syn-icon name=\"eye-slash\" library=\"system\"></syn-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <syn-icon name=\"eye\" library=\"system\"></syn-icon>\n </slot>\n `}\n </button>\n `\n : ''}\n\n <span part=\"suffix\" class=\"input__suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n </div>\n\n <div\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n <slot name=\"help-text\">${this.helpText}</slot>\n </div>\n </div>\n `;\n }\n}\n", "// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\n// @defaultValue decorator\n//\n// Runs when the corresponding attribute of the observed property changes, e.g. after calling Element.setAttribute or after updating\n// the observed property.\n//\n// The decorator checks whether the value of the attribute is different from the value of the property and in that case\n// it saves the new value.\n//\n//\n// Usage:\n//\n// @property({ type: Boolean, reflect: true }) checked = false;\n//\n// @defaultValue('checked') defaultChecked = false;\n//\n\nimport { defaultConverter } from 'lit';\nimport type { ReactiveElement } from 'lit';\n\nexport const defaultValue =\n (propertyName = 'value') =>\n (proto: ReactiveElement, key: string) => {\n const ctor = proto.constructor as typeof ReactiveElement;\n\n const attributeChangedCallback = ctor.prototype.attributeChangedCallback;\n ctor.prototype.attributeChangedCallback = function (\n this: ReactiveElement & { [name: string]: unknown },\n name,\n old,\n value\n ) {\n const options = ctor.getPropertyOptions(propertyName);\n const attributeName = typeof options.attribute === 'string' ? options.attribute : propertyName;\n\n if (name === attributeName) {\n const converter = options.converter || defaultConverter;\n const fromAttribute =\n typeof converter === 'function' ? converter : converter?.fromAttribute ?? defaultConverter.fromAttribute;\n\n const newValue: unknown = fromAttribute!(value, options.type);\n\n if (this[propertyName] !== newValue) {\n this[key] = newValue;\n }\n }\n\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;AAAA,EADL,MAAM,SAAS,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAlQ3B,SAmQb;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/icon/library.system.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport type { IconLibrary } from './library.js';\n\n//\n// System icons are a separate library to ensure they're always available, regardless of how the default icon library is\n// configured or if its icons resolve properly.\n//\n// All Synergy components must use the system library instead of the default library. For visual consistency, system\n// icons are a subset of Bootstrap Icons.\n//\nconst icons = {\n caret: `\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"6 9 12 15 18 9\"></polyline>\n </svg>\n `,\n check: `\n <svg part=\"checked-icon\" class=\"checkbox__icon\" viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\">\n <g transform=\"translate(3.428571, 3.428571)\">\n <path d=\"M0,5.71428571 L3.42857143,9.14285714\"></path>\n <path d=\"M9.14285714,0 L3.42857143,9.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n `,\n 'chevron-down': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-chevron-down\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z\"/>\n </svg>\n `,\n 'chevron-left': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-chevron-left\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z\"/>\n </svg>\n `,\n 'chevron-right': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-chevron-right\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\"/>\n </svg>\n `,\n copy: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-files\" viewBox=\"0 0 16 16\" part=\"svg\">\n <path d=\"M13 0H6a2 2 0 0 0-2 2 2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2 2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm0 13V4a2 2 0 0 0-2-2H5a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1zM3 4a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4z\"></path>\n </svg>\n `,\n eye: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-eye\" viewBox=\"0 0 16 16\">\n <path d=\"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z\"/>\n <path d=\"M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z\"/>\n </svg>\n `,\n 'eye-slash': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-eye-slash\" viewBox=\"0 0 16 16\">\n <path d=\"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z\"/>\n <path d=\"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z\"/>\n <path d=\"M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z\"/>\n </svg>\n `,\n eyedropper: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-eyedropper\" viewBox=\"0 0 16 16\">\n <path d=\"M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z\"></path>\n </svg>\n `,\n 'grip-vertical': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-grip-vertical\" viewBox=\"0 0 16 16\">\n <path d=\"M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z\"></path>\n </svg>\n `,\n indeterminate: `\n <svg part=\"indeterminate-icon\" class=\"checkbox__icon\" viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\">\n <g stroke=\"currentColor\" stroke-width=\"2\">\n <g transform=\"translate(2.285714, 6.857143)\">\n <path d=\"M10.2857143,1.14285714 L1.14285714,1.14285714\"></path>\n </g>\n </g>\n </g>\n </svg>\n `,\n 'person-fill': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-person-fill\" viewBox=\"0 0 16 16\">\n <path d=\"M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z\"/>\n </svg>\n `,\n 'play-fill': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-play-fill\" viewBox=\"0 0 16 16\">\n <path d=\"m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z\"></path>\n </svg>\n `,\n 'pause-fill': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-pause-fill\" viewBox=\"0 0 16 16\">\n <path d=\"M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z\"></path>\n </svg>\n `,\n radio: `\n <svg part=\"checked-icon\" class=\"radio__icon\" viewBox=\"0 0 16 16\">\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill=\"currentColor\">\n <circle cx=\"8\" cy=\"8\" r=\"3.42857143\"></circle>\n </g>\n </g>\n </svg>\n `,\n 'star-fill': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-star-fill\" viewBox=\"0 0 16 16\">\n <path d=\"M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z\"/>\n </svg>\n `,\n 'x-lg': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-x-lg\" viewBox=\"0 0 16 16\">\n <path d=\"M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z\"/>\n </svg>\n `,\n 'x-circle-fill': `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-x-circle-fill\" viewBox=\"0 0 16 16\">\n <path d=\"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z\"></path>\n </svg>\n `\n};\n\nconst systemLibrary: IconLibrary = {\n name: 'system',\n resolver: (name: keyof typeof icons) => {\n if (name in icons) {\n return `data:image/svg+xml,${encodeURIComponent(icons[name])}`;\n }\n return '';\n }\n};\n\nexport default systemLibrary;\n"],
|
|
5
|
+
"mappings": ";AAeA,IAAM,QAAQ;AAAA,EACZ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKP,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYP,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKjB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAML,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOb,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,EAKZ,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKjB,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWf,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA,EAKf,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,EAKb,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA,EAKd,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASP,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,EAKb,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAKR,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAKnB;AAEA,IAAM,gBAA6B;AAAA,EACjC,MAAM;AAAA,EACN,UAAU,CAAC,SAA6B;AACtC,QAAI,QAAQ,OAAO;AACjB,aAAO,sBAAsB,mBAAmB,MAAM,IAAI,CAAC,CAAC;AAAA,IAC9D;AACA,WAAO;AAAA,EACT;AACF;AAEA,IAAO,yBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// src/components/input/input.custom.styles.ts
|
|
2
|
+
import { css } from "lit";
|
|
3
|
+
var input_custom_styles_default = css`
|
|
4
|
+
/* PADDINGS */
|
|
5
|
+
.input--medium .input__control {
|
|
6
|
+
padding: var(--syn-spacing-x-small) var(--syn-input-spacing-medium);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.input--small .input__control {
|
|
10
|
+
padding: var(--syn-spacing-3x-small) var(--syn-input-spacing-small);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.input--large .input__control {
|
|
14
|
+
padding: var(--syn-input-spacing-small) var(--syn-input-spacing-large);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.input--small .input__prefix ::slotted(*) {
|
|
18
|
+
margin-inline-end: var(--syn-spacing-x-small);
|
|
19
|
+
margin-inline-start: var(--syn-input-spacing-small);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.input--medium .input__prefix ::slotted(*) {
|
|
23
|
+
margin-inline-end: var(--syn-input-spacing-small);
|
|
24
|
+
margin-inline-start: var(--syn-input-spacing-medium);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.input--large .input__prefix ::slotted(*) {
|
|
28
|
+
margin-inline-end: var(--syn-input-spacing-medium);
|
|
29
|
+
margin-inline-start: var(--syn-input-spacing-large);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.input--small .input__suffix ::slotted(*) {
|
|
33
|
+
margin-inline-end: var(--syn-input-spacing-small);
|
|
34
|
+
margin-inline-start: var(--syn-spacing-x-small);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.input--medium .input__suffix ::slotted(*) {
|
|
38
|
+
margin-inline-end: var(--syn-input-spacing-medium);
|
|
39
|
+
margin-inline-start: var(--syn-input-spacing-small);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.input--large .input__suffix ::slotted(*) {
|
|
43
|
+
margin-inline-end: var(--syn-input-spacing-large);
|
|
44
|
+
margin-inline-start: var(--syn-input-spacing-medium);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ICONS SIZE */
|
|
48
|
+
.input--small .input__prefix ::slotted(syn-icon) {
|
|
49
|
+
font-size: var(--syn-input-spacing-medium);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.input--medium .input__prefix ::slotted(syn-icon) {
|
|
53
|
+
font-size: var(--syn-input-spacing-large);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.input--large .input__prefix ::slotted(syn-icon) {
|
|
57
|
+
font-size: var(--syn-font-size-2x-large);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.input--small .input__suffix ::slotted(syn-icon) {
|
|
61
|
+
font-size: var(--syn-input-spacing-medium);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.input--medium .input__suffix ::slotted(syn-icon) {
|
|
65
|
+
font-size: var(--syn-input-spacing-large);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.input--large .input__suffix ::slotted(syn-icon) {
|
|
69
|
+
font-size: var(--syn-font-size-2x-large);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host([data-user-invalid]) .input--standard {
|
|
73
|
+
border-color: var(--syn-input-border-color-focus-error);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([data-user-invalid]) .input--standard.input--focused:not(.input--disabled) {
|
|
77
|
+
border-color: var(--syn-input-border-color-focus-error);
|
|
78
|
+
box-shadow: 0 0 0 var(--syn-focus-ring-width) var(--syn-input-focus-ring-error);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.input--standard.input--disabled .input__suffix,
|
|
82
|
+
.input--standard.input--disabled .input__prefix {
|
|
83
|
+
cursor: not-allowed;
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
input_custom_styles_default
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=chunk.W46CFM2R.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/input/input.custom.styles.ts"],
|
|
4
|
+
"sourcesContent": ["import { css } from 'lit';\n\nexport default css`\n /* PADDINGS */\n .input--medium .input__control {\n padding: var(--syn-spacing-x-small) var(--syn-input-spacing-medium);\n }\n\n .input--small .input__control {\n padding: var(--syn-spacing-3x-small) var(--syn-input-spacing-small);\n }\n\n .input--large .input__control {\n padding: var(--syn-input-spacing-small) var(--syn-input-spacing-large);\n }\n\n .input--small .input__prefix ::slotted(*) {\n margin-inline-end: var(--syn-spacing-x-small);\n margin-inline-start: var(--syn-input-spacing-small);\n }\n\n .input--medium .input__prefix ::slotted(*) {\n margin-inline-end: var(--syn-input-spacing-small);\n margin-inline-start: var(--syn-input-spacing-medium);\n }\n\n .input--large .input__prefix ::slotted(*) {\n margin-inline-end: var(--syn-input-spacing-medium);\n margin-inline-start: var(--syn-input-spacing-large);\n }\n\n .input--small .input__suffix ::slotted(*) {\n margin-inline-end: var(--syn-input-spacing-small);\n margin-inline-start: var(--syn-spacing-x-small);\n }\n\n .input--medium .input__suffix ::slotted(*) {\n margin-inline-end: var(--syn-input-spacing-medium);\n margin-inline-start: var(--syn-input-spacing-small);\n }\n\n .input--large .input__suffix ::slotted(*) {\n margin-inline-end: var(--syn-input-spacing-large);\n margin-inline-start: var(--syn-input-spacing-medium);\n }\n\n /* ICONS SIZE */\n .input--small .input__prefix ::slotted(syn-icon) {\n font-size: var(--syn-input-spacing-medium);\n }\n\n .input--medium .input__prefix ::slotted(syn-icon) {\n font-size: var(--syn-input-spacing-large);\n }\n\n .input--large .input__prefix ::slotted(syn-icon) {\n font-size: var(--syn-font-size-2x-large);\n }\n\n .input--small .input__suffix ::slotted(syn-icon) {\n font-size: var(--syn-input-spacing-medium);\n }\n\n .input--medium .input__suffix ::slotted(syn-icon) {\n font-size: var(--syn-input-spacing-large);\n }\n\n .input--large .input__suffix ::slotted(syn-icon) {\n font-size: var(--syn-font-size-2x-large);\n }\n \n :host([data-user-invalid]) .input--standard {\n border-color: var(--syn-input-border-color-focus-error);\n }\n\n :host([data-user-invalid]) .input--standard.input--focused:not(.input--disabled) {\n border-color: var(--syn-input-border-color-focus-error);\n box-shadow: 0 0 0 var(--syn-focus-ring-width) var(--syn-input-focus-ring-error);\n }\n\n .input--standard.input--disabled .input__suffix, \n .input--standard.input--disabled .input__prefix {\n cursor: not-allowed;\n } \n`;\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW;AAEpB,IAAO,8BAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadProps,
|
|
3
3
|
__spreadValues
|
|
4
|
-
} from "./chunk.
|
|
4
|
+
} from "./chunk.DJOAQ4JU.js";
|
|
5
5
|
|
|
6
6
|
// src/internal/form.ts
|
|
7
7
|
var formCollections = /* @__PURE__ */ new WeakMap();
|
|
@@ -265,53 +265,9 @@ var customErrorValidityState = Object.freeze(__spreadProps(__spreadValues({}, va
|
|
|
265
265
|
customError: true
|
|
266
266
|
}));
|
|
267
267
|
|
|
268
|
-
// src/internal/slot.ts
|
|
269
|
-
var HasSlotController = class {
|
|
270
|
-
constructor(host, ...slotNames) {
|
|
271
|
-
this.slotNames = [];
|
|
272
|
-
this.handleSlotChange = (event) => {
|
|
273
|
-
const slot = event.target;
|
|
274
|
-
if (this.slotNames.includes("[default]") && !slot.name || slot.name && this.slotNames.includes(slot.name)) {
|
|
275
|
-
this.host.requestUpdate();
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
(this.host = host).addController(this);
|
|
279
|
-
this.slotNames = slotNames;
|
|
280
|
-
}
|
|
281
|
-
hasDefaultSlot() {
|
|
282
|
-
return [...this.host.childNodes].some((node) => {
|
|
283
|
-
if (node.nodeType === node.TEXT_NODE && node.textContent.trim() !== "") {
|
|
284
|
-
return true;
|
|
285
|
-
}
|
|
286
|
-
if (node.nodeType === node.ELEMENT_NODE) {
|
|
287
|
-
const el = node;
|
|
288
|
-
const tagName = el.tagName.toLowerCase();
|
|
289
|
-
if (tagName === "syn-visually-hidden") {
|
|
290
|
-
return false;
|
|
291
|
-
}
|
|
292
|
-
if (!el.hasAttribute("slot")) {
|
|
293
|
-
return true;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
return false;
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
hasNamedSlot(name) {
|
|
300
|
-
return this.host.querySelector(`:scope > [slot="${name}"]`) !== null;
|
|
301
|
-
}
|
|
302
|
-
test(slotName) {
|
|
303
|
-
return slotName === "[default]" ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);
|
|
304
|
-
}
|
|
305
|
-
hostConnected() {
|
|
306
|
-
this.host.shadowRoot.addEventListener("slotchange", this.handleSlotChange);
|
|
307
|
-
}
|
|
308
|
-
hostDisconnected() {
|
|
309
|
-
this.host.shadowRoot.removeEventListener("slotchange", this.handleSlotChange);
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
|
|
313
268
|
export {
|
|
269
|
+
formCollections,
|
|
314
270
|
FormControlController,
|
|
315
|
-
validValidityState
|
|
316
|
-
HasSlotController
|
|
271
|
+
validValidityState
|
|
317
272
|
};
|
|
273
|
+
//# sourceMappingURL=chunk.WDCAHRYG.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/internal/form.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type { SynergyFormControl } from '../internal/synergy-element.js';\nimport type SynButton from '../components/button/button.js';\n\n//\n// We store a WeakMap of forms + controls so we can keep references to all Synergy controls within a given form. As\n// elements connect and disconnect to/from the DOM, their containing form is used as the key and the form control is\n// added and removed from the form's set, respectively.\n//\nexport const formCollections: WeakMap<HTMLFormElement, Set<SynergyFormControl>> = new WeakMap();\n\n//\n// We store a WeakMap of reportValidity() overloads so we can override it when form controls connect to the DOM and\n// restore the original behavior when they disconnect.\n//\nconst reportValidityOverloads: WeakMap<HTMLFormElement, () => boolean> = new WeakMap();\n\n//\n// We store a Set of controls that users have interacted with. This allows us to determine the interaction state\n// without littering the DOM with additional data attributes.\n//\nconst userInteractedControls: WeakSet<SynergyFormControl> = new WeakSet();\n\n//\n// We store a WeakMap of interactions for each form control so we can track when all conditions are met for validation.\n//\nconst interactions = new WeakMap<SynergyFormControl, string[]>();\n\nexport interface FormControlControllerOptions {\n /** A function that returns the form containing the form control. */\n form: (input: SynergyFormControl) => HTMLFormElement | null;\n /** A function that returns the form control's name, which will be submitted with the form data. */\n name: (input: SynergyFormControl) => string;\n /** A function that returns the form control's current value. */\n value: (input: SynergyFormControl) => unknown | unknown[];\n /** A function that returns the form control's default value. */\n defaultValue: (input: SynergyFormControl) => unknown | unknown[];\n /** A function that returns the form control's current disabled state. If disabled, the value won't be submitted. */\n disabled: (input: SynergyFormControl) => boolean;\n /**\n * A function that maps to the form control's reportValidity() function. When the control is invalid, this will\n * prevent submission and trigger the browser's constraint violation warning.\n */\n reportValidity: (input: SynergyFormControl) => boolean;\n /** A function that sets the form control's value */\n setValue: (input: SynergyFormControl, value: unknown) => void;\n /**\n * An array of event names to listen to. When all events in the list are emitted, the control will receive validity\n * states such as user-valid and user-invalid.user interacted validity states. */\n assumeInteractionOn: string[];\n}\n\n/** A reactive controller to allow form controls to participate in form submission, validation, etc. */\nexport class FormControlController implements ReactiveController {\n host: SynergyFormControl & ReactiveControllerHost;\n form?: HTMLFormElement | null;\n options: FormControlControllerOptions;\n\n constructor(host: ReactiveControllerHost & SynergyFormControl, options?: Partial<FormControlControllerOptions>) {\n (this.host = host).addController(this);\n this.options = {\n form: input => {\n // If there's a form attribute, use it to find the target form by id\n if (input.hasAttribute('form') && input.getAttribute('form') !== '') {\n const root = input.getRootNode() as Document | ShadowRoot;\n const formId = input.getAttribute('form');\n\n if (formId) {\n return root.getElementById(formId) as HTMLFormElement;\n }\n }\n\n return input.closest('form');\n },\n name: input => input.name,\n value: input => input.value,\n defaultValue: input => input.defaultValue,\n disabled: input => input.disabled ?? false,\n reportValidity: input => (typeof input.reportValidity === 'function' ? input.reportValidity() : true),\n setValue: (input, value: string) => (input.value = value),\n assumeInteractionOn: ['syn-input'],\n ...options\n };\n }\n\n hostConnected() {\n const form = this.options.form(this.host);\n\n if (form) {\n this.attachForm(form);\n }\n\n // Listen for interactions\n interactions.set(this.host, []);\n this.options.assumeInteractionOn.forEach(event => {\n this.host.addEventListener(event, this.handleInteraction);\n });\n }\n\n hostDisconnected() {\n this.detachForm();\n\n // Clean up interactions\n interactions.delete(this.host);\n this.options.assumeInteractionOn.forEach(event => {\n this.host.removeEventListener(event, this.handleInteraction);\n });\n }\n\n hostUpdated() {\n const form = this.options.form(this.host);\n\n // Detach if the form no longer exists\n if (!form) {\n this.detachForm();\n }\n\n // If the form has changed, reattach it\n if (form && this.form !== form) {\n this.detachForm();\n this.attachForm(form);\n }\n\n if (this.host.hasUpdated) {\n this.setValidity(this.host.validity.valid);\n }\n }\n\n private attachForm(form?: HTMLFormElement) {\n if (form) {\n this.form = form;\n\n // Add this element to the form's collection\n if (formCollections.has(this.form)) {\n formCollections.get(this.form)!.add(this.host);\n } else {\n formCollections.set(this.form, new Set<SynergyFormControl>([this.host]));\n }\n\n this.form.addEventListener('formdata', this.handleFormData);\n this.form.addEventListener('submit', this.handleFormSubmit);\n this.form.addEventListener('reset', this.handleFormReset);\n\n // Overload the form's reportValidity() method so it looks at Synergy form controls\n if (!reportValidityOverloads.has(this.form)) {\n reportValidityOverloads.set(this.form, this.form.reportValidity);\n this.form.reportValidity = () => this.reportFormValidity();\n }\n } else {\n this.form = undefined;\n }\n }\n\n private detachForm() {\n if (this.form) {\n // Remove this element from the form's collection\n formCollections.get(this.form)?.delete(this.host);\n\n this.form.removeEventListener('formdata', this.handleFormData);\n this.form.removeEventListener('submit', this.handleFormSubmit);\n this.form.removeEventListener('reset', this.handleFormReset);\n\n // Remove the overload and restore the original method\n if (reportValidityOverloads.has(this.form)) {\n this.form.reportValidity = reportValidityOverloads.get(this.form)!;\n reportValidityOverloads.delete(this.form);\n }\n }\n\n this.form = undefined;\n }\n\n private handleFormData = (event: FormDataEvent) => {\n const disabled = this.options.disabled(this.host);\n const name = this.options.name(this.host);\n const value = this.options.value(this.host);\n\n // For buttons, we only submit the value if they were the submitter. This is currently done in doAction() by\n // injecting the name/value on a temporary button, so we can just skip them here.\n const isButton = this.host.tagName.toLowerCase() === 'syn-button';\n\n if (!disabled && !isButton && typeof name === 'string' && name.length > 0 && typeof value !== 'undefined') {\n if (Array.isArray(value)) {\n (value as unknown[]).forEach(val => {\n event.formData.append(name, (val as string | number | boolean).toString());\n });\n } else {\n event.formData.append(name, (value as string | number | boolean).toString());\n }\n }\n };\n\n private handleFormSubmit = (event: Event) => {\n const disabled = this.options.disabled(this.host);\n const reportValidity = this.options.reportValidity;\n\n // Update the interacted state for all controls when the form is submitted\n if (this.form && !this.form.noValidate) {\n formCollections.get(this.form)?.forEach(control => {\n this.setUserInteracted(control, true);\n });\n }\n\n if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n\n private handleFormReset = () => {\n this.options.setValue(this.host, this.options.defaultValue(this.host));\n this.setUserInteracted(this.host, false);\n interactions.set(this.host, []);\n };\n\n private handleInteraction = (event: Event) => {\n const emittedEvents = interactions.get(this.host)!;\n\n if (!emittedEvents.includes(event.type)) {\n emittedEvents.push(event.type);\n }\n\n // Mark it as user-interacted as soon as all associated events have been emitted\n if (emittedEvents.length === this.options.assumeInteractionOn.length) {\n this.setUserInteracted(this.host, true);\n }\n };\n\n private reportFormValidity = () => {\n //\n // Synergy form controls work hard to act like regular form controls. They support the Constraint Validation API\n // and its associated methods such as setCustomValidity() and reportValidity(). However, the HTMLFormElement also\n // has a reportValidity() method that will trigger validation on all child controls. Since we're not yet using\n // ElementInternals, we need to overload this method so it looks for any element with the reportValidity() method.\n //\n // We preserve the original method in a WeakMap, but we don't call it from the overload because that would trigger\n // validations in an unexpected order. When the element disconnects, we revert to the original behavior. This won't\n // be necessary once we can use ElementInternals.\n //\n // Note that we're also honoring the form's novalidate attribute.\n //\n if (this.form && !this.form.noValidate) {\n // This seems sloppy, but checking all elements will cover native inputs, Synergy inputs, and other custom\n // elements that support the constraint validation API.\n const elements = this.form.querySelectorAll<HTMLInputElement>('*');\n\n for (const element of elements) {\n if (typeof element.reportValidity === 'function') {\n if (!element.reportValidity()) {\n return false;\n }\n }\n }\n }\n\n return true;\n };\n\n private setUserInteracted(el: SynergyFormControl, hasInteracted: boolean) {\n if (hasInteracted) {\n userInteractedControls.add(el);\n } else {\n userInteractedControls.delete(el);\n }\n\n el.requestUpdate();\n }\n\n private doAction(type: 'submit' | 'reset', submitter?: HTMLInputElement | SynButton) {\n if (this.form) {\n const button = document.createElement('button');\n button.type = type;\n button.style.position = 'absolute';\n button.style.width = '0';\n button.style.height = '0';\n button.style.clipPath = 'inset(50%)';\n button.style.overflow = 'hidden';\n button.style.whiteSpace = 'nowrap';\n\n // Pass name, value, and form attributes through to the temporary button\n if (submitter) {\n button.name = submitter.name;\n button.value = submitter.value;\n\n ['formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget'].forEach(attr => {\n if (submitter.hasAttribute(attr)) {\n button.setAttribute(attr, submitter.getAttribute(attr)!);\n }\n });\n }\n\n this.form.append(button);\n button.click();\n button.remove();\n }\n }\n\n /** Returns the associated `<form>` element, if one exists. */\n getForm() {\n return this.form ?? null;\n }\n\n /** Resets the form, restoring all the control to their default value */\n reset(submitter?: HTMLInputElement | SynButton) {\n this.doAction('reset', submitter);\n }\n\n /** Submits the form, triggering validation and form data injection. */\n submit(submitter?: HTMLInputElement | SynButton) {\n // Calling form.submit() bypasses the submit event and constraint validation. To prevent this, we can inject a\n // native submit button into the form, \"click\" it, then remove it to simulate a standard form submission.\n this.doAction('submit', submitter);\n }\n\n /**\n * Synchronously sets the form control's validity. Call this when you know the future validity but need to update\n * the host element immediately, i.e. before Lit updates the component in the next update.\n */\n setValidity(isValid: boolean) {\n const host = this.host;\n const hasInteracted = Boolean(userInteractedControls.has(host));\n const required = Boolean(host.required);\n\n //\n // We're mapping the following \"states\" to data attributes. In the future, we can use ElementInternals.states to\n // create a similar mapping, but instead of [data-invalid] it will look like :--invalid.\n //\n // See this RFC for more details: https://github.com/synergy-design-system/synergy/issues/1011\n //\n host.toggleAttribute('data-required', required);\n host.toggleAttribute('data-optional', !required);\n host.toggleAttribute('data-invalid', !isValid);\n host.toggleAttribute('data-valid', isValid);\n host.toggleAttribute('data-user-invalid', !isValid && hasInteracted);\n host.toggleAttribute('data-user-valid', isValid && hasInteracted);\n }\n\n /**\n * Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything\n * that affects constraint validation changes so the component receives the correct validity states.\n */\n updateValidity() {\n const host = this.host;\n this.setValidity(host.validity.valid);\n }\n\n /**\n * Dispatches a non-bubbling, cancelable custom event of type `syn-invalid`.\n * If the `syn-invalid` event will be cancelled then the original `invalid`\n * event (which may have been passed as argument) will also be cancelled.\n * If no original `invalid` event has been passed then the `syn-invalid`\n * event will be cancelled before being dispatched.\n */\n emitInvalidEvent(originalInvalidEvent?: Event) {\n const slInvalidEvent = new CustomEvent<Record<PropertyKey, never>>('syn-invalid', {\n bubbles: false,\n composed: false,\n cancelable: true,\n detail: {}\n });\n\n if (!originalInvalidEvent) {\n slInvalidEvent.preventDefault();\n }\n\n if (!this.host.dispatchEvent(slInvalidEvent)) {\n originalInvalidEvent?.preventDefault();\n }\n }\n}\n\n/*\n * Predefined common validity states.\n * All of them are read-only.\n */\n\n// A validity state object that represents `valid`\nexport const validValidityState: ValidityState = Object.freeze({\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: true,\n valueMissing: false\n});\n\n// A validity state object that represents `value missing`\nexport const valueMissingValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n valueMissing: true\n});\n\n// A validity state object that represents a custom error\nexport const customErrorValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n customError: true\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;AAeO,IAAM,kBAAqE,oBAAI,QAAQ;AAM9F,IAAM,0BAAmE,oBAAI,QAAQ;AAMrF,IAAM,yBAAsD,oBAAI,QAAQ;AAKxE,IAAM,eAAe,oBAAI,QAAsC;AA2BxD,IAAM,wBAAN,MAA0D;AAAA,EAK/D,YAAY,MAAmD,SAAiD;AAkHhH,SAAQ,iBAAiB,CAAC,UAAyB;AACjD,YAAM,WAAW,KAAK,QAAQ,SAAS,KAAK,IAAI;AAChD,YAAM,OAAO,KAAK,QAAQ,KAAK,KAAK,IAAI;AACxC,YAAM,QAAQ,KAAK,QAAQ,MAAM,KAAK,IAAI;AAI1C,YAAM,WAAW,KAAK,KAAK,QAAQ,YAAY,MAAM;AAErD,UAAI,CAAC,YAAY,CAAC,YAAY,OAAO,SAAS,YAAY,KAAK,SAAS,KAAK,OAAO,UAAU,aAAa;AACzG,YAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,UAAC,MAAoB,QAAQ,SAAO;AAClC,kBAAM,SAAS,OAAO,MAAO,IAAkC,SAAS,CAAC;AAAA,UAC3E,CAAC;AAAA,QACH,OAAO;AACL,gBAAM,SAAS,OAAO,MAAO,MAAoC,SAAS,CAAC;AAAA,QAC7E;AAAA,MACF;AAAA,IACF;AAEA,SAAQ,mBAAmB,CAAC,UAAiB;AAtM/C;AAuMI,YAAM,WAAW,KAAK,QAAQ,SAAS,KAAK,IAAI;AAChD,YAAM,iBAAiB,KAAK,QAAQ;AAGpC,UAAI,KAAK,QAAQ,CAAC,KAAK,KAAK,YA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gBAAgB,qBAAqB,CAAC,WAAW,aAAa;AACnE,SAAK,gBAAgB,mBAAmB,WAAW,aAAa;AAAA,EAClE;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,iBAAiB;AACf,UAAM,OAAO,KAAK;AAClB,SAAK,YAAY,KAAK,SAAS,KAAK;AAAA,EACtC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,iBAAiB,sBAA8B;AAC7C,UAAM,iBAAiB,IAAI,YAAwC,eAAe;AAAA,MAChF,SAAS;AAAA,MACT,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,QAAQ,CAAC;AAAA,IACX,CAAC;AAED,QAAI,CAAC,sBAAsB;AACzB,qBAAe,eAAe;AAAA,IAChC;AAEA,QAAI,CAAC,KAAK,KAAK,cAAc,cAAc,GAAG;AAC5C,mEAAsB;AAAA,IACxB;AAAA,EACF;AACF;AAQO,IAAM,qBAAoC,OAAO,OAAO;AAAA,EAC7D,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AAAA,EACV,cAAc;AAAA,EACd,OAAO;AAAA,EACP,cAAc;AAChB,CAAC;AAGM,IAAM,4BAA2C,OAAO,OAAO,iCACjE,qBADiE;AAAA,EAEpE,OAAO;AAAA,EACP,cAAc;AAChB,EAAC;AAGM,IAAM,2BAA0C,OAAO,OAAO,iCAChE,qBADgE;AAAA,EAEnE,OAAO;AAAA,EACP,aAAa;AACf,EAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formCollections
|
|
3
|
+
} from "./chunk.WDCAHRYG.js";
|
|
4
|
+
|
|
5
|
+
// src/utilities/form.ts
|
|
6
|
+
function serialize(form) {
|
|
7
|
+
const formData = new FormData(form);
|
|
8
|
+
const object = {};
|
|
9
|
+
formData.forEach((value, key) => {
|
|
10
|
+
if (Reflect.has(object, key)) {
|
|
11
|
+
const entry = object[key];
|
|
12
|
+
if (Array.isArray(entry)) {
|
|
13
|
+
entry.push(value);
|
|
14
|
+
} else {
|
|
15
|
+
object[key] = [object[key], value];
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
object[key] = value;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return object;
|
|
22
|
+
}
|
|
23
|
+
function getFormControls(form) {
|
|
24
|
+
const rootNode = form.getRootNode();
|
|
25
|
+
const allNodes = [...rootNode.querySelectorAll("*")];
|
|
26
|
+
const formControls = [...form.elements];
|
|
27
|
+
const collection = formCollections.get(form);
|
|
28
|
+
const synergyFormControls = collection ? Array.from(collection) : [];
|
|
29
|
+
return [...formControls, ...synergyFormControls].sort((a, b) => {
|
|
30
|
+
if (allNodes.indexOf(a) < allNodes.indexOf(b))
|
|
31
|
+
return -1;
|
|
32
|
+
if (allNodes.indexOf(a) > allNodes.indexOf(b))
|
|
33
|
+
return 1;
|
|
34
|
+
return 0;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
serialize,
|
|
40
|
+
getFormControls
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=chunk.WTCUSH7V.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utilities/form.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { formCollections } from '../internal/form.js';\n\n/**\n * Serializes a form and returns a plain object. If a form control with the same name appears more than once, the\n * property will be converted to an array.\n */\nexport function serialize(form: HTMLFormElement) {\n const formData = new FormData(form);\n const object: Record<string, unknown> = {};\n\n formData.forEach((value, key) => {\n if (Reflect.has(object, key)) {\n const entry = object[key];\n if (Array.isArray(entry)) {\n entry.push(value);\n } else {\n object[key] = [object[key], value];\n }\n } else {\n object[key] = value;\n }\n });\n\n return object;\n}\n\n/**\n * Returns all form controls that are associated with the specified form. Includes both native and Synergy form\n * controls. Use this function in lieu of the `HTMLFormElement.elements` property, which doesn't recognize Synergy\n * form controls.\n */\nexport function getFormControls(form: HTMLFormElement) {\n const rootNode = form.getRootNode() as Document | ShadowRoot;\n const allNodes = [...rootNode.querySelectorAll('*')];\n const formControls = [...form.elements];\n const collection = formCollections.get(form);\n const synergyFormControls = collection ? Array.from(collection) : [];\n\n // To return form controls in the right order, we sort by DOM index\n return [...formControls, ...synergyFormControls].sort((a: Element, b: Element) => {\n if (allNodes.indexOf(a) < allNodes.indexOf(b)) return -1;\n if (allNodes.indexOf(a) > allNodes.indexOf(b)) return 1;\n return 0;\n });\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAYO,SAAS,UAAU,MAAuB;AAC/C,QAAM,WAAW,IAAI,SAAS,IAAI;AAClC,QAAM,SAAkC,CAAC;AAEzC,WAAS,QAAQ,CAAC,OAAO,QAAQ;AAC/B,QAAI,QAAQ,IAAI,QAAQ,GAAG,GAAG;AAC5B,YAAM,QAAQ,OAAO,GAAG;AACxB,UAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,cAAM,KAAK,KAAK;AAAA,MAClB,OAAO;AACL,eAAO,GAAG,IAAI,CAAC,OAAO,GAAG,GAAG,KAAK;AAAA,MACnC;AAAA,IACF,OAAO;AACL,aAAO,GAAG,IAAI;AAAA,IAChB;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAOO,SAAS,gBAAgB,MAAuB;AACrD,QAAM,WAAW,KAAK,YAAY;AAClC,QAAM,WAAW,CAAC,GAAG,SAAS,iBAAiB,GAAG,CAAC;AACnD,QAAM,eAAe,CAAC,GAAG,KAAK,QAAQ;AACtC,QAAM,aAAa,gBAAgB,IAAI,IAAI;AAC3C,QAAM,sBAAsB,aAAa,MAAM,KAAK,UAAU,IAAI,CAAC;AAGnE,SAAO,CAAC,GAAG,cAAc,GAAG,mBAAmB,EAAE,KAAK,CAAC,GAAY,MAAe;AAChF,QAAI,SAAS,QAAQ,CAAC,IAAI,SAAS,QAAQ,CAAC;AAAG,aAAO;AACtD,QAAI,SAAS,QAAQ,CAAC,IAAI,SAAS,QAAQ,CAAC;AAAG,aAAO;AACtD,WAAO;AAAA,EACT,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// src/internal/slot.ts
|
|
2
|
+
var HasSlotController = class {
|
|
3
|
+
constructor(host, ...slotNames) {
|
|
4
|
+
this.slotNames = [];
|
|
5
|
+
this.handleSlotChange = (event) => {
|
|
6
|
+
const slot = event.target;
|
|
7
|
+
if (this.slotNames.includes("[default]") && !slot.name || slot.name && this.slotNames.includes(slot.name)) {
|
|
8
|
+
this.host.requestUpdate();
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
(this.host = host).addController(this);
|
|
12
|
+
this.slotNames = slotNames;
|
|
13
|
+
}
|
|
14
|
+
hasDefaultSlot() {
|
|
15
|
+
return [...this.host.childNodes].some((node) => {
|
|
16
|
+
if (node.nodeType === node.TEXT_NODE && node.textContent.trim() !== "") {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
if (node.nodeType === node.ELEMENT_NODE) {
|
|
20
|
+
const el = node;
|
|
21
|
+
const tagName = el.tagName.toLowerCase();
|
|
22
|
+
if (tagName === "syn-visually-hidden") {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if (!el.hasAttribute("slot")) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
hasNamedSlot(name) {
|
|
33
|
+
return this.host.querySelector(`:scope > [slot="${name}"]`) !== null;
|
|
34
|
+
}
|
|
35
|
+
test(slotName) {
|
|
36
|
+
return slotName === "[default]" ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);
|
|
37
|
+
}
|
|
38
|
+
hostConnected() {
|
|
39
|
+
this.host.shadowRoot.addEventListener("slotchange", this.handleSlotChange);
|
|
40
|
+
}
|
|
41
|
+
hostDisconnected() {
|
|
42
|
+
this.host.shadowRoot.removeEventListener("slotchange", this.handleSlotChange);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
HasSlotController
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=chunk.XGXFE6IF.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/internal/slot.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\n\n/** A reactive controller that determines when slots exist. */\nexport class HasSlotController implements ReactiveController {\n host: ReactiveControllerHost & Element;\n slotNames: string[] = [];\n\n constructor(host: ReactiveControllerHost & Element, ...slotNames: string[]) {\n (this.host = host).addController(this);\n this.slotNames = slotNames;\n }\n\n private hasDefaultSlot() {\n return [...this.host.childNodes].some(node => {\n if (node.nodeType === node.TEXT_NODE && node.textContent!.trim() !== '') {\n return true;\n }\n\n if (node.nodeType === node.ELEMENT_NODE) {\n const el = node as HTMLElement;\n const tagName = el.tagName.toLowerCase();\n\n // Ignore visually hidden elements since they aren't rendered\n if (tagName === 'syn-visually-hidden') {\n return false;\n }\n\n // If it doesn't have a slot attribute, it's part of the default slot\n if (!el.hasAttribute('slot')) {\n return true;\n }\n }\n\n return false;\n });\n }\n\n private hasNamedSlot(name: string) {\n return this.host.querySelector(`:scope > [slot=\"${name}\"]`) !== null;\n }\n\n test(slotName: string) {\n return slotName === '[default]' ? this.hasDefaultSlot() : this.hasNamedSlot(slotName);\n }\n\n hostConnected() {\n this.host.shadowRoot!.addEventListener('slotchange', this.handleSlotChange);\n }\n\n hostDisconnected() {\n this.host.shadowRoot!.removeEventListener('slotchange', this.handleSlotChange);\n }\n\n private handleSlotChange = (event: Event) => {\n const slot = event.target as HTMLSlotElement;\n\n if ((this.slotNames.includes('[default]') && !slot.name) || (slot.name && this.slotNames.includes(slot.name))) {\n this.host.requestUpdate();\n }\n };\n}\n\n/**\n * Given a slot, this function iterates over all of its assigned element and text nodes and returns the concatenated\n * HTML as a string. This is useful because we can't use slot.innerHTML as an alternative.\n */\nexport function getInnerHTML(slot: HTMLSlotElement): string {\n const nodes = slot.assignedNodes({ flatten: true });\n let html = '';\n\n [...nodes].forEach(node => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n html += (node as HTMLElement).outerHTML;\n }\n\n if (node.nodeType === Node.TEXT_NODE) {\n html += node.textContent;\n }\n });\n\n return html;\n}\n\n/**\n * Given a slot, this function iterates over all of its assigned text nodes and returns the concatenated text as a\n * string. This is useful because we can't use slot.textContent as an alternative.\n */\nexport function getTextContent(slot: HTMLSlotElement | undefined | null): string {\n if (!slot) {\n return '';\n }\n const nodes = slot.assignedNodes({ flatten: true });\n let text = '';\n\n [...nodes].forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n text += node.textContent;\n }\n });\n\n return text;\n}\n"],
|
|
5
|
+
"mappings": ";AASO,IAAM,oBAAN,MAAsD;AAAA,EAI3D,YAAY,SAA2C,WAAqB;AAF5E,qBAAsB,CAAC;AAgDvB,SAAQ,mBAAmB,CAAC,UAAiB;AAC3C,YAAM,OAAO,MAAM;AAEnB,UAAK,KAAK,UAAU,SAAS,WAAW,KAAK,CAAC,KAAK,QAAU,KAAK,QAAQ,KAAK,UAAU,SAAS,KAAK,IAAI,GAAI;AAC7G,aAAK,KAAK,cAAc;AAAA,MAC1B;AAAA,IACF;AAnDE,KAAC,K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