@synergy-design-system/components 1.0.0-main.11 → 1.0.0-main.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/chunks/chunk.2XZKXVMR.js +44 -0
  2. package/dist/chunks/chunk.2XZKXVMR.js.map +7 -0
  3. package/dist/chunks/{chunk.HLUOHJUC.js → chunk.7QGGFKPO.js} +11 -9
  4. package/dist/chunks/{chunk.HLUOHJUC.js.map → chunk.7QGGFKPO.js.map} +1 -1
  5. package/dist/chunks/{chunk.3XRGNU3R.js → chunk.FKB4BI2F.js} +2 -2
  6. package/dist/chunks/chunk.FLF2E2W4.js +360 -0
  7. package/dist/chunks/chunk.FLF2E2W4.js.map +7 -0
  8. package/dist/chunks/{chunk.IFBY43YE.js → chunk.FVSP4LXX.js} +3 -3
  9. package/dist/chunks/chunk.FVSP4LXX.js.map +7 -0
  10. package/dist/chunks/chunk.HOGDOKQS.js +224 -0
  11. package/dist/chunks/chunk.HOGDOKQS.js.map +7 -0
  12. package/dist/chunks/chunk.J44T4LO6.js +189 -0
  13. package/dist/chunks/chunk.J44T4LO6.js.map +7 -0
  14. package/dist/chunks/{chunk.C4FLGZ7E.js → chunk.KALIQJUH.js} +5 -5
  15. package/dist/chunks/{chunk.KXCGB2XT.js → chunk.LJVC6UEV.js} +9 -36
  16. package/dist/chunks/{chunk.KXCGB2XT.js.map → chunk.LJVC6UEV.js.map} +4 -4
  17. package/dist/chunks/chunk.MFFJYORB.js +137 -0
  18. package/dist/chunks/chunk.MFFJYORB.js.map +7 -0
  19. package/dist/chunks/chunk.MMNWMRST.js +12 -0
  20. package/dist/chunks/chunk.MMNWMRST.js.map +7 -0
  21. package/dist/chunks/chunk.NXKZDAMQ.js +12 -0
  22. package/dist/chunks/chunk.NXKZDAMQ.js.map +7 -0
  23. package/dist/chunks/{chunk.EFGGZW6Y.js → chunk.SQTGI355.js} +12 -30
  24. package/dist/chunks/{chunk.EFGGZW6Y.js.map → chunk.SQTGI355.js.map} +3 -3
  25. package/dist/chunks/chunk.T5JJNDG6.js +12 -0
  26. package/dist/chunks/chunk.T5JJNDG6.js.map +7 -0
  27. package/dist/chunks/{chunk.4OMRXGQ5.js → chunk.TKXG7VM3.js} +2 -2
  28. package/dist/chunks/{chunk.MRBFJWMS.js → chunk.UFEBKPYW.js} +2 -2
  29. package/dist/chunks/{chunk.MRBFJWMS.js.map → chunk.UFEBKPYW.js.map} +1 -1
  30. package/dist/chunks/chunk.VNC7HKGP.js +123 -0
  31. package/dist/chunks/chunk.VNC7HKGP.js.map +7 -0
  32. package/dist/chunks/chunk.VZ7S7YYN.js +34 -0
  33. package/dist/chunks/chunk.VZ7S7YYN.js.map +7 -0
  34. package/dist/chunks/{chunk.Y7DVVKVJ.js → chunk.WANL6A7U.js} +5 -123
  35. package/dist/chunks/{chunk.Y7DVVKVJ.js.map → chunk.WANL6A7U.js.map} +4 -4
  36. package/dist/chunks/chunk.WFAJR3FN.js +25 -0
  37. package/dist/chunks/chunk.WFAJR3FN.js.map +7 -0
  38. package/dist/chunks/chunk.YBIBWRKC.js +19 -0
  39. package/dist/chunks/chunk.YBIBWRKC.js.map +7 -0
  40. package/dist/chunks/{chunk.2NHBIE4V.js → chunk.YTS5TRJZ.js} +2 -2
  41. package/dist/components/button/button.component.js +10 -9
  42. package/dist/components/button/button.custom.styles.js +1 -1
  43. package/dist/components/button/button.js +11 -10
  44. package/dist/components/button/button.styles.js +2 -2
  45. package/dist/components/checkbox/checkbox.component.d.ts +93 -0
  46. package/dist/components/checkbox/checkbox.component.js +21 -0
  47. package/dist/components/checkbox/checkbox.component.js.map +7 -0
  48. package/dist/components/checkbox/checkbox.custom.styles.js +3 -6
  49. package/dist/components/checkbox/checkbox.custom.styles.js.map +3 -3
  50. package/dist/components/checkbox/checkbox.d.ts +8 -0
  51. package/dist/components/checkbox/checkbox.js +22 -0
  52. package/dist/components/checkbox/checkbox.js.map +7 -0
  53. package/dist/components/checkbox/checkbox.styles.d.ts +2 -0
  54. package/dist/components/checkbox/checkbox.styles.js +10 -0
  55. package/dist/components/checkbox/checkbox.styles.js.map +7 -0
  56. package/dist/components/icon/icon.component.js +4 -3
  57. package/dist/components/icon/icon.js +6 -8
  58. package/dist/components/icon/icon.js.map +3 -3
  59. package/dist/components/input/input.component.js +9 -6
  60. package/dist/components/input/input.js +10 -7
  61. package/dist/components/input/input.styles.js +2 -1
  62. package/dist/components/spinner/spinner.component.js +3 -3
  63. package/dist/components/textarea/textarea.component.d.ts +131 -0
  64. package/dist/components/textarea/textarea.component.js +17 -0
  65. package/dist/components/textarea/textarea.component.js.map +7 -0
  66. package/dist/components/textarea/textarea.custom.styles.js +3 -6
  67. package/dist/components/textarea/textarea.custom.styles.js.map +3 -3
  68. package/dist/components/textarea/textarea.d.ts +8 -0
  69. package/dist/components/textarea/textarea.js +18 -0
  70. package/dist/components/textarea/textarea.js.map +7 -0
  71. package/dist/components/textarea/textarea.styles.d.ts +2 -0
  72. package/dist/components/textarea/textarea.styles.js +11 -0
  73. package/dist/components/textarea/textarea.styles.js.map +7 -0
  74. package/dist/custom-elements.json +1577 -390
  75. package/dist/internal/test.d.ts +28 -0
  76. package/dist/synergy.d.ts +4 -1
  77. package/dist/synergy.js +35 -14
  78. package/dist/vscode.html-custom-data.json +207 -0
  79. package/dist/web-types.json +437 -1
  80. package/package.json +3 -3
  81. package/dist/chunks/chunk.IFBY43YE.js.map +0 -7
  82. /package/dist/chunks/{chunk.3XRGNU3R.js.map → chunk.FKB4BI2F.js.map} +0 -0
  83. /package/dist/chunks/{chunk.C4FLGZ7E.js.map → chunk.KALIQJUH.js.map} +0 -0
  84. /package/dist/chunks/{chunk.4OMRXGQ5.js.map → chunk.TKXG7VM3.js.map} +0 -0
  85. /package/dist/chunks/{chunk.2NHBIE4V.js.map → chunk.YTS5TRJZ.js.map} +0 -0
@@ -0,0 +1,44 @@
1
+ // src/components/checkbox/checkbox.custom.styles.ts
2
+ import { css } from "lit";
3
+ var checkbox_custom_styles_default = css`
4
+ .checkbox__control {
5
+ border-radius: var(--syn-input-border-radius-small);
6
+ }
7
+
8
+ :host([data-user-invalid]) .checkbox__control {
9
+ border-color: var(--syn-input-border-color-focus-error);
10
+ }
11
+
12
+ /**
13
+ * Hover
14
+ * Applies the hover state to the whole component
15
+ */
16
+ .checkbox:not(.checkbox--checked):not(.checkbox--disabled):hover .checkbox__control {
17
+ background-color: var(--syn-input-background-color-hover);
18
+ border-color: var(--syn-input-border-color-hover);
19
+ }
20
+
21
+ /**
22
+ * Checked/indeterminate + hover
23
+ * Applies the hover state to the whole component
24
+ */
25
+ .checkbox.checkbox--checked:not(.checkbox--disabled):hover .checkbox__control,
26
+ .checkbox.checkbox--indeterminate:not(.checkbox--disabled):hover .checkbox__control {
27
+ background-color: var(--syn-color-primary-900);
28
+ border-color: var(--syn-color-primary-900);
29
+ }
30
+
31
+ .checkbox__label {
32
+ margin-inline-start: var(--syn-spacing-x-small);
33
+ }
34
+
35
+ /* Disabled */
36
+ .checkbox--disabled .checkbox__label {
37
+ color: var(--syn-color-neutral-700);
38
+ }
39
+ `;
40
+
41
+ export {
42
+ checkbox_custom_styles_default
43
+ };
44
+ //# sourceMappingURL=chunk.2XZKXVMR.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/checkbox/checkbox.custom.styles.ts"],
4
+ "sourcesContent": ["import { css } from 'lit';\n\nexport default css`\n .checkbox__control {\n border-radius: var(--syn-input-border-radius-small);\n }\n\n :host([data-user-invalid]) .checkbox__control {\n border-color: var(--syn-input-border-color-focus-error);\n }\n\n /**\n * Hover\n * Applies the hover state to the whole component\n */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled):hover .checkbox__control {\n background-color: var(--syn-input-background-color-hover);\n border-color: var(--syn-input-border-color-hover);\n }\n\n /**\n * Checked/indeterminate + hover\n * Applies the hover state to the whole component\n */\n .checkbox.checkbox--checked:not(.checkbox--disabled):hover .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled):hover .checkbox__control {\n background-color: var(--syn-color-primary-900);\n border-color: var(--syn-color-primary-900);\n }\n\n .checkbox__label {\n margin-inline-start: var(--syn-spacing-x-small);\n }\n\n /* Disabled */\n .checkbox--disabled .checkbox__label {\n color: var(--syn-color-neutral-700);\n }\n`;\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW;AAEpB,IAAO,iCAAQ;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,26 +1,28 @@
1
1
  import {
2
2
  SynSpinner
3
- } from "./chunk.C4FLGZ7E.js";
3
+ } from "./chunk.KALIQJUH.js";
4
+ import {
5
+ LocalizeController
6
+ } from "./chunk.R6VNLE6N.js";
4
7
  import {
5
8
  HasSlotController
6
9
  } from "./chunk.XGXFE6IF.js";
7
10
  import {
8
- LocalizeController
9
- } from "./chunk.R6VNLE6N.js";
11
+ button_styles_default
12
+ } from "./chunk.YTS5TRJZ.js";
10
13
  import {
11
14
  FormControlController,
12
15
  validValidityState
13
16
  } from "./chunk.WDCAHRYG.js";
14
17
  import {
15
- button_styles_default
16
- } from "./chunk.2NHBIE4V.js";
18
+ SynIcon
19
+ } from "./chunk.LJVC6UEV.js";
17
20
  import {
18
- SynIcon,
19
21
  watch
20
- } from "./chunk.KXCGB2XT.js";
22
+ } from "./chunk.VZ7S7YYN.js";
21
23
  import {
22
24
  SynergyElement
23
- } from "./chunk.MRBFJWMS.js";
25
+ } from "./chunk.UFEBKPYW.js";
24
26
  import {
25
27
  __decorateClass
26
28
  } from "./chunk.DJOAQ4JU.js";
@@ -275,4 +277,4 @@ __decorateClass([
275
277
  export {
276
278
  SynButton
277
279
  };
278
- //# sourceMappingURL=chunk.HLUOHJUC.js.map
280
+ //# sourceMappingURL=chunk.7QGGFKPO.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/button/button.component.ts"],
4
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 { FormControlController, validValidityState } from '../../internal/form.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html, literal } from 'lit/static-html.js';\nimport { ifDefined } from 'lit/directives/if-defined.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 SynSpinner from '../spinner/spinner.component.js';\nimport styles from './button.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\n\n/**\n * @summary Buttons represent actions that are available to the user.\n * @documentation https://synergy.style/components/button\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n * @dependency syn-spinner\n *\n * @event syn-blur - Emitted when the button loses focus.\n * @event syn-focus - Emitted when the button gains focus.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @slot - The button's label.\n * @slot prefix - A presentational prefix icon or similar element.\n * @slot suffix - A presentational suffix icon or similar element.\n *\n * @csspart base - The component's base wrapper.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart label - The button's label.\n * @csspart suffix - The container that wraps the suffix.\n * @csspart caret - The button's caret icon, an `<syn-icon>` element.\n * @csspart spinner - The spinner that shows when the button is in the loading state.\n */\nexport default class SynButton extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = styles;\n static dependencies = {\n 'syn-icon': SynIcon,\n 'syn-spinner': SynSpinner\n };\n\n private readonly formControlController = new FormControlController(this, {\n form: input => {\n // Buttons support a form attribute that points to an arbitrary form, so if this attribute is set we need to query\n // the form from the same root using its id\n if (input.hasAttribute('form')) {\n const doc = input.getRootNode() as Document | ShadowRoot;\n const formId = input.getAttribute('form')!;\n return doc.getElementById(formId) as HTMLFormElement;\n }\n\n // Fall back to the closest containing form\n return input.closest('form');\n },\n assumeInteractionOn: ['click']\n });\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix');\n private readonly localize = new LocalizeController(this);\n\n @query('.button') button: HTMLButtonElement | HTMLLinkElement;\n\n @state() private hasFocus = false;\n @state() invalid = false;\n @property() title = ''; // make reactive to pass through\n\n /** The button's theme variant. */\n @property({ reflect: true }) variant: 'filled' | 'outline' | 'text' = 'outline';\n\n /** The button's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior. */\n @property({ type: Boolean, reflect: true }) caret = false;\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Draws the button in a loading state. */\n @property({ type: Boolean, reflect: true }) loading = false;\n\n /**\n * The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n * `<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.\n */\n @property() type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\n * This attribute is ignored when `href` is present.\n */\n @property() name = '';\n\n /**\n * The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\n * button is the submitter. This attribute is ignored when `href` is present.\n */\n @property() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @property() href = '';\n\n /** Tells the browser where to open the link. Only used when `href` is present. */\n @property() target: '_blank' | '_parent' | '_self' | '_top';\n\n /**\n * When using `href`, this attribute will map to the underlying link's `rel` attribute. Unlike regular links, the\n * default is `noreferrer noopener` to prevent security exploits. However, if you're using `target` to point to a\n * specific tab/window, this will prevent that from working correctly. You can remove or change the default value by\n * setting the attribute to an empty string or a value of your choice, respectively.\n */\n @property() rel = 'noreferrer noopener';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is present. */\n @property() download?: string;\n\n /**\n * The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\n * value of this attribute must be an id of a form in the same document or shadow root as the button.\n */\n @property() form: string;\n\n /** Used to override the form owner's `action` attribute. */\n @property({ attribute: 'formaction' }) formAction: string;\n\n /** Used to override the form owner's `enctype` attribute. */\n @property({ attribute: 'formenctype' })\n formEnctype: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';\n\n /** Used to override the form owner's `method` attribute. */\n @property({ attribute: 'formmethod' }) formMethod: 'post' | 'get';\n\n /** Used to override the form owner's `novalidate` attribute. */\n @property({ attribute: 'formnovalidate', type: Boolean }) formNoValidate: boolean;\n\n /** Used to override the form owner's `target` attribute. */\n @property({ attribute: 'formtarget' }) formTarget: '_self' | '_blank' | '_parent' | '_top' | string;\n\n /** Gets the validity state object */\n get validity() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).validity;\n }\n\n return validValidityState;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).validationMessage;\n }\n\n return '';\n }\n\n firstUpdated() {\n if (this.isButton()) {\n this.formControlController.updateValidity();\n }\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n private handleClick() {\n if (this.type === 'submit') {\n this.formControlController.submit(this);\n }\n\n if (this.type === 'reset') {\n this.formControlController.reset(this);\n }\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private isButton() {\n return this.href ? false : true;\n }\n\n private isLink() {\n return this.href ? true : false;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n if (this.isButton()) {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n }\n\n /** Simulates a click on the button. */\n click() {\n this.button.click();\n }\n\n /** Sets focus on the button. */\n focus(options?: FocusOptions) {\n this.button.focus(options);\n }\n\n /** Removes focus from the button. */\n blur() {\n this.button.blur();\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).checkValidity();\n }\n\n return true;\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 if (this.isButton()) {\n return (this.button as HTMLButtonElement).reportValidity();\n }\n\n return true;\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n if (this.isButton()) {\n (this.button as HTMLButtonElement).setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n }\n\n render() {\n const isLink = this.isLink();\n const tag = isLink ? literal`a` : literal`button`;\n\n /* eslint-disable lit/no-invalid-html */\n /* eslint-disable lit/binding-positions */\n return html`\n <${tag}\n part=\"base\"\n class=${classMap({\n button: true,\n 'button--primary': true,\n 'button--text': this.variant === 'text',\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n 'button--caret': this.caret,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--filled': this.variant === 'filled',\n 'button--outline': this.variant === 'outline',\n 'button--rtl': this.localize.dir() === 'rtl',\n 'button--has-label': this.hasSlotController.test('[default]'),\n 'button--has-prefix': this.hasSlotController.test('prefix'),\n 'button--has-suffix': this.hasSlotController.test('suffix')\n })}\n ?disabled=${ifDefined(isLink ? undefined : this.disabled)}\n type=${ifDefined(isLink ? undefined : this.type)}\n title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}\n name=${ifDefined(isLink ? undefined : this.name)}\n value=${ifDefined(isLink ? undefined : this.value)}\n href=${ifDefined(isLink ? this.href : undefined)}\n target=${ifDefined(isLink ? this.target : undefined)}\n download=${ifDefined(isLink ? this.download : undefined)}\n rel=${ifDefined(isLink ? this.rel : undefined)}\n role=${ifDefined(isLink ? undefined : 'button')}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @invalid=${this.isButton() ? this.handleInvalid : null}\n @click=${this.handleClick}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"button__prefix\"></slot>\n <slot part=\"label\" class=\"button__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"button__suffix\"></slot>\n ${\n this.caret ? html` <syn-icon part=\"caret\" class=\"button__caret\" library=\"system\" name=\"caret\"></syn-icon> ` : ''\n }\n ${this.loading ? html`<syn-spinner part=\"spinner\"></syn-spinner>` : ''}\n </${tag}>\n `;\n /* eslint-enable lit/no-invalid-html */\n /* eslint-enable lit/binding-positions */\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,SAAS,gBAAgB;AAGzB,SAAS,MAAM,eAAe;AAC9B,SAAS,iBAAiB;AAE1B,SAAS,UAAU,OAAO,aAAa;AAiCvC,IAAqB,YAArB,cAAuC,eAA6C;AAAA,EAApF;AAAA;AAOE,SAAiB,wBAAwB,IAAI,sBAAsB,MAAM;AAAA,MACvE,MAAM,WAAS;AAGb,YAAI,MAAM,aAAa,MAAM,GAAG;AAC9B,gBAAM,MAAM,MAAM,YAAY;AAC9B,gBAAM,SAAS,MAAM,aAAa,MAAM;AACxC,iBAAO,IAAI,eAAe,MAAM;AAAA,QAClC;AAGA,eAAO,MAAM,QAAQ,MAAM;AAAA,MAC7B;AAAA,MACA,qBAAqB,CAAC,OAAO;AAAA,IAC/B,CAAC;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,GA5ES,UA4EP;AAGA;AAAA,EAAX,SAAS;AAAA,GA/ES,UA+EP;AAMA;AAAA,EAAX,SAAS;AAAA,GArFS,UAqFP;AAG2B;AAAA,EAAtC,SAAS,EAAE,WAAW,aAAa,CAAC;AAAA,GAxFlB,UAwFoB;AAIvC;AAAA,EADC,SAAS,EAAE,WAAW,cAAc,CAAC;AAAA,GA3FnB,UA4FnB;AAGuC;AAAA,EAAtC,SAAS,EAAE,WAAW,aAAa,CAAC;AAAA,GA/FlB,UA+FoB;AAGmB;AAAA,EAAzD,SAAS,EAAE,WAAW,kBAAkB,MAAM,QAAQ,CAAC;AAAA,GAlGrC,UAkGuC;AAGnB;AAAA,EAAtC,SAAS,EAAE,WAAW,aAAa,CAAC;AAAA,GArGlB,UAqGoB;AA4DvC;AAAA,EADC,MAAM,YAAY,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAhK9B,UAiKnB;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SynInput
3
- } from "./chunk.EFGGZW6Y.js";
3
+ } from "./chunk.SQTGI355.js";
4
4
 
5
5
  // src/components/input/input.ts
6
6
  var input_default = SynInput;
@@ -9,4 +9,4 @@ SynInput.define("syn-input");
9
9
  export {
10
10
  input_default
11
11
  };
12
- //# sourceMappingURL=chunk.3XRGNU3R.js.map
12
+ //# sourceMappingURL=chunk.FKB4BI2F.js.map
@@ -0,0 +1,360 @@
1
+ import {
2
+ textarea_styles_default
3
+ } from "./chunk.J44T4LO6.js";
4
+ import {
5
+ HasSlotController
6
+ } from "./chunk.XGXFE6IF.js";
7
+ import {
8
+ defaultValue
9
+ } from "./chunk.WFAJR3FN.js";
10
+ import {
11
+ FormControlController
12
+ } from "./chunk.WDCAHRYG.js";
13
+ import {
14
+ watch
15
+ } from "./chunk.VZ7S7YYN.js";
16
+ import {
17
+ SynergyElement
18
+ } from "./chunk.UFEBKPYW.js";
19
+ import {
20
+ __decorateClass
21
+ } from "./chunk.DJOAQ4JU.js";
22
+
23
+ // src/components/textarea/textarea.component.ts
24
+ import { classMap } from "lit/directives/class-map.js";
25
+ import { html } from "lit";
26
+ import { ifDefined } from "lit/directives/if-defined.js";
27
+ import { live } from "lit/directives/live.js";
28
+ import { property, query, state } from "lit/decorators.js";
29
+ var SynTextarea = class extends SynergyElement {
30
+ constructor() {
31
+ super(...arguments);
32
+ this.formControlController = new FormControlController(this, {
33
+ assumeInteractionOn: ["syn-blur", "syn-input"]
34
+ });
35
+ this.hasSlotController = new HasSlotController(this, "help-text", "label", "prefix", "suffix");
36
+ this.hasFocus = false;
37
+ this.title = "";
38
+ this.name = "";
39
+ this.value = "";
40
+ this.size = "medium";
41
+ this.label = "";
42
+ this.helpText = "";
43
+ this.placeholder = "";
44
+ this.rows = 4;
45
+ this.resize = "vertical";
46
+ this.disabled = false;
47
+ this.readonly = false;
48
+ this.form = "";
49
+ this.required = false;
50
+ this.spellcheck = true;
51
+ this.defaultValue = "";
52
+ }
53
+ /** Gets the validity state object */
54
+ get validity() {
55
+ return this.input.validity;
56
+ }
57
+ /** Gets the validation message */
58
+ get validationMessage() {
59
+ return this.input.validationMessage;
60
+ }
61
+ connectedCallback() {
62
+ super.connectedCallback();
63
+ this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());
64
+ this.updateComplete.then(() => {
65
+ this.setTextareaHeight();
66
+ this.resizeObserver.observe(this.input);
67
+ });
68
+ }
69
+ firstUpdated() {
70
+ this.formControlController.updateValidity();
71
+ }
72
+ disconnectedCallback() {
73
+ super.disconnectedCallback();
74
+ this.resizeObserver.unobserve(this.input);
75
+ }
76
+ handleBlur() {
77
+ this.hasFocus = false;
78
+ this.emit("syn-blur");
79
+ }
80
+ handleChange() {
81
+ this.value = this.input.value;
82
+ this.setTextareaHeight();
83
+ this.emit("syn-change");
84
+ }
85
+ handleFocus() {
86
+ this.hasFocus = true;
87
+ this.emit("syn-focus");
88
+ }
89
+ handleInput() {
90
+ this.value = this.input.value;
91
+ this.emit("syn-input");
92
+ }
93
+ handleInvalid(event) {
94
+ this.formControlController.setValidity(false);
95
+ this.formControlController.emitInvalidEvent(event);
96
+ }
97
+ setTextareaHeight() {
98
+ if (this.resize === "auto") {
99
+ this.input.style.height = "auto";
100
+ this.input.style.height = `${this.input.scrollHeight}px`;
101
+ } else {
102
+ this.input.style.height = void 0;
103
+ }
104
+ }
105
+ handleDisabledChange() {
106
+ this.formControlController.setValidity(this.disabled);
107
+ }
108
+ handleRowsChange() {
109
+ this.setTextareaHeight();
110
+ }
111
+ async handleValueChange() {
112
+ await this.updateComplete;
113
+ this.formControlController.updateValidity();
114
+ this.setTextareaHeight();
115
+ }
116
+ /** Sets focus on the textarea. */
117
+ focus(options) {
118
+ this.input.focus(options);
119
+ }
120
+ /** Removes focus from the textarea. */
121
+ blur() {
122
+ this.input.blur();
123
+ }
124
+ /** Selects all the text in the textarea. */
125
+ select() {
126
+ this.input.select();
127
+ }
128
+ /** Gets or sets the textarea's scroll position. */
129
+ scrollPosition(position) {
130
+ if (position) {
131
+ if (typeof position.top === "number")
132
+ this.input.scrollTop = position.top;
133
+ if (typeof position.left === "number")
134
+ this.input.scrollLeft = position.left;
135
+ return void 0;
136
+ }
137
+ return {
138
+ top: this.input.scrollTop,
139
+ left: this.input.scrollTop
140
+ };
141
+ }
142
+ /** Sets the start and end positions of the text selection (0-based). */
143
+ setSelectionRange(selectionStart, selectionEnd, selectionDirection = "none") {
144
+ this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
145
+ }
146
+ /** Replaces a range of text with a new string. */
147
+ setRangeText(replacement, start, end, selectMode) {
148
+ this.input.setRangeText(replacement, start, end, selectMode);
149
+ if (this.value !== this.input.value) {
150
+ this.value = this.input.value;
151
+ }
152
+ if (this.value !== this.input.value) {
153
+ this.value = this.input.value;
154
+ this.setTextareaHeight();
155
+ }
156
+ }
157
+ /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
158
+ checkValidity() {
159
+ return this.input.checkValidity();
160
+ }
161
+ /** Gets the associated form, if one exists. */
162
+ getForm() {
163
+ return this.formControlController.getForm();
164
+ }
165
+ /** Checks for validity and shows the browser's validation message if the control is invalid. */
166
+ reportValidity() {
167
+ return this.input.reportValidity();
168
+ }
169
+ /** Sets a custom validation message. Pass an empty string to restore validity. */
170
+ setCustomValidity(message) {
171
+ this.input.setCustomValidity(message);
172
+ this.formControlController.updateValidity();
173
+ }
174
+ render() {
175
+ const hasLabelSlot = this.hasSlotController.test("label");
176
+ const hasHelpTextSlot = this.hasSlotController.test("help-text");
177
+ const hasPrefixSlot = this.hasSlotController.test("prefix");
178
+ const hasSuffixSlot = this.hasSlotController.test("suffix");
179
+ const hasLabel = this.label ? true : !!hasLabelSlot;
180
+ const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
181
+ return html`
182
+ <div
183
+ part="form-control"
184
+ class=${classMap({
185
+ "form-control": true,
186
+ "form-control--small": this.size === "small",
187
+ "form-control--medium": this.size === "medium",
188
+ "form-control--large": this.size === "large",
189
+ "form-control--has-label": hasLabel,
190
+ "form-control--has-help-text": hasHelpText,
191
+ "form-control--has-prefix": hasPrefixSlot,
192
+ "form-control--has-suffix": hasSuffixSlot
193
+ })}
194
+ >
195
+ <label
196
+ part="form-control-label"
197
+ class="form-control__label"
198
+ for="input"
199
+ aria-hidden=${hasLabel ? "false" : "true"}
200
+ >
201
+ <slot name="label">${this.label}</slot>
202
+ </label>
203
+
204
+ <div part="form-control-input" class="form-control-input">
205
+ <div
206
+ part="base"
207
+ class=${classMap({
208
+ textarea: true,
209
+ "textarea--small": this.size === "small",
210
+ "textarea--medium": this.size === "medium",
211
+ "textarea--large": this.size === "large",
212
+ "textarea--standard": !this.readonly,
213
+ "textarea--readonly": this.readonly,
214
+ "textarea--disabled": this.disabled,
215
+ "textarea--focused": this.hasFocus,
216
+ "textarea--empty": !this.value,
217
+ "textarea--resize-none": this.resize === "none",
218
+ "textarea--resize-vertical": this.resize === "vertical",
219
+ "textarea--resize-auto": this.resize === "auto"
220
+ })}
221
+ >
222
+ <textarea
223
+ part="textarea"
224
+ id="input"
225
+ class="textarea__control"
226
+ title=${this.title}
227
+ name=${ifDefined(this.name)}
228
+ .value=${live(this.value)}
229
+ ?disabled=${this.disabled}
230
+ ?readonly=${this.readonly}
231
+ ?required=${this.required}
232
+ placeholder=${ifDefined(this.placeholder)}
233
+ rows=${ifDefined(this.rows)}
234
+ minlength=${ifDefined(this.minlength)}
235
+ maxlength=${ifDefined(this.maxlength)}
236
+ autocapitalize=${ifDefined(this.autocapitalize)}
237
+ autocorrect=${ifDefined(this.autocorrect)}
238
+ ?autofocus=${this.autofocus}
239
+ spellcheck=${ifDefined(this.spellcheck)}
240
+ enterkeyhint=${ifDefined(this.enterkeyhint)}
241
+ inputmode=${ifDefined(this.inputmode)}
242
+ aria-describedby="help-text"
243
+ @change=${this.handleChange}
244
+ @input=${this.handleInput}
245
+ @invalid=${this.handleInvalid}
246
+ @focus=${this.handleFocus}
247
+ @blur=${this.handleBlur}
248
+ ></textarea>
249
+ </div>
250
+ </div>
251
+
252
+ <div
253
+ part="form-control-help-text"
254
+ id="help-text"
255
+ class="form-control__help-text"
256
+ aria-hidden=${hasHelpText ? "false" : "true"}
257
+ >
258
+ <slot name="help-text">${this.helpText}</slot>
259
+ </div>
260
+ </div>
261
+ `;
262
+ }
263
+ };
264
+ SynTextarea.styles = textarea_styles_default;
265
+ __decorateClass([
266
+ query(".textarea__control")
267
+ ], SynTextarea.prototype, "input", 2);
268
+ __decorateClass([
269
+ state()
270
+ ], SynTextarea.prototype, "hasFocus", 2);
271
+ __decorateClass([
272
+ property()
273
+ ], SynTextarea.prototype, "title", 2);
274
+ __decorateClass([
275
+ property()
276
+ ], SynTextarea.prototype, "name", 2);
277
+ __decorateClass([
278
+ property()
279
+ ], SynTextarea.prototype, "value", 2);
280
+ __decorateClass([
281
+ property({ reflect: true })
282
+ ], SynTextarea.prototype, "size", 2);
283
+ __decorateClass([
284
+ property()
285
+ ], SynTextarea.prototype, "label", 2);
286
+ __decorateClass([
287
+ property({ attribute: "help-text" })
288
+ ], SynTextarea.prototype, "helpText", 2);
289
+ __decorateClass([
290
+ property()
291
+ ], SynTextarea.prototype, "placeholder", 2);
292
+ __decorateClass([
293
+ property({ type: Number })
294
+ ], SynTextarea.prototype, "rows", 2);
295
+ __decorateClass([
296
+ property()
297
+ ], SynTextarea.prototype, "resize", 2);
298
+ __decorateClass([
299
+ property({ type: Boolean, reflect: true })
300
+ ], SynTextarea.prototype, "disabled", 2);
301
+ __decorateClass([
302
+ property({ type: Boolean, reflect: true })
303
+ ], SynTextarea.prototype, "readonly", 2);
304
+ __decorateClass([
305
+ property({ reflect: true })
306
+ ], SynTextarea.prototype, "form", 2);
307
+ __decorateClass([
308
+ property({ type: Boolean, reflect: true })
309
+ ], SynTextarea.prototype, "required", 2);
310
+ __decorateClass([
311
+ property({ type: Number })
312
+ ], SynTextarea.prototype, "minlength", 2);
313
+ __decorateClass([
314
+ property({ type: Number })
315
+ ], SynTextarea.prototype, "maxlength", 2);
316
+ __decorateClass([
317
+ property()
318
+ ], SynTextarea.prototype, "autocapitalize", 2);
319
+ __decorateClass([
320
+ property()
321
+ ], SynTextarea.prototype, "autocorrect", 2);
322
+ __decorateClass([
323
+ property()
324
+ ], SynTextarea.prototype, "autocomplete", 2);
325
+ __decorateClass([
326
+ property({ type: Boolean })
327
+ ], SynTextarea.prototype, "autofocus", 2);
328
+ __decorateClass([
329
+ property()
330
+ ], SynTextarea.prototype, "enterkeyhint", 2);
331
+ __decorateClass([
332
+ property({
333
+ type: Boolean,
334
+ converter: {
335
+ // Allow "true|false" attribute values but keep the property boolean
336
+ fromAttribute: (value) => !value || value === "false" ? false : true,
337
+ toAttribute: (value) => value ? "true" : "false"
338
+ }
339
+ })
340
+ ], SynTextarea.prototype, "spellcheck", 2);
341
+ __decorateClass([
342
+ property()
343
+ ], SynTextarea.prototype, "inputmode", 2);
344
+ __decorateClass([
345
+ defaultValue()
346
+ ], SynTextarea.prototype, "defaultValue", 2);
347
+ __decorateClass([
348
+ watch("disabled", { waitUntilFirstUpdate: true })
349
+ ], SynTextarea.prototype, "handleDisabledChange", 1);
350
+ __decorateClass([
351
+ watch("rows", { waitUntilFirstUpdate: true })
352
+ ], SynTextarea.prototype, "handleRowsChange", 1);
353
+ __decorateClass([
354
+ watch("value", { waitUntilFirstUpdate: true })
355
+ ], SynTextarea.prototype, "handleValueChange", 1);
356
+
357
+ export {
358
+ SynTextarea
359
+ };
360
+ //# sourceMappingURL=chunk.FLF2E2W4.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/textarea/textarea.component.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 { property, query, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport styles from './textarea.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\n\n/**\n * @summary Textareas collect data from the user and allow multiple lines of text.\n * @documentation https://synergy.style/components/textarea\n * @status stable\n * @since 2.0\n *\n * @slot label - The textarea's label. Alternatively, you can use the `label` attribute.\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-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 textarea - The internal `<textarea>` control.\n */\nexport default class SynTextarea extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = styles;\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 resizeObserver: ResizeObserver;\n\n @query('.textarea__control') input: HTMLTextAreaElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n /** The name of the textarea, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the textarea, submitted as a name/value pair with form data. */\n @property() value = '';\n\n /** The textarea's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The textarea's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** The textarea's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** The number of rows to display by default. */\n @property({ type: Number }) rows = 4;\n\n /** Controls how the textarea can be resized. */\n @property() resize: 'none' | 'vertical' | 'auto' = 'vertical';\n\n /** Disables the textarea. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Makes the textarea readonly. */\n @property({ type: Boolean, reflect: true }) readonly = 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 textarea a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\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 /** 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: string;\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 textarea. */\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 /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\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 connectedCallback() {\n super.connectedCallback();\n this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());\n\n this.updateComplete.then(() => {\n this.setTextareaHeight();\n this.resizeObserver.observe(this.input);\n });\n }\n\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.resizeObserver.unobserve(this.input);\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.setTextareaHeight();\n this.emit('syn-change');\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.emit('syn-input');\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private setTextareaHeight() {\n if (this.resize === 'auto') {\n this.input.style.height = 'auto';\n this.input.style.height = `${this.input.scrollHeight}px`;\n } else {\n (this.input.style.height as string | undefined) = undefined;\n }\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('rows', { waitUntilFirstUpdate: true })\n handleRowsChange() {\n this.setTextareaHeight();\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n this.formControlController.updateValidity();\n this.setTextareaHeight();\n }\n\n /** Sets focus on the textarea. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the textarea. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the textarea. */\n select() {\n this.input.select();\n }\n\n /** Gets or sets the textarea's scroll position. */\n scrollPosition(position?: { top?: number; left?: number }): { top: number; left: number } | undefined {\n if (position) {\n if (typeof position.top === 'number') this.input.scrollTop = position.top;\n if (typeof position.left === 'number') this.input.scrollLeft = position.left;\n return undefined;\n }\n\n return {\n top: this.input.scrollTop,\n left: this.input.scrollTop\n };\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 if (this.value !== this.input.value) {\n this.value = this.input.value;\n this.setTextareaHeight();\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\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 textarea: true,\n 'textarea--small': this.size === 'small',\n 'textarea--medium': this.size === 'medium',\n 'textarea--large': this.size === 'large',\n 'textarea--standard': !this.readonly,\n 'textarea--readonly': this.readonly,\n 'textarea--disabled': this.disabled,\n 'textarea--focused': this.hasFocus,\n 'textarea--empty': !this.value,\n 'textarea--resize-none': this.resize === 'none',\n 'textarea--resize-vertical': this.resize === 'vertical',\n 'textarea--resize-auto': this.resize === 'auto'\n })}\n >\n <textarea\n part=\"textarea\"\n id=\"input\"\n class=\"textarea__control\"\n title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}\n name=${ifDefined(this.name)}\n .value=${live(this.value)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n rows=${ifDefined(this.rows)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${ifDefined(this.spellcheck)}\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 @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n ></textarea>\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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAMA,SAAS,gBAAgB;AAIzB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,UAAU,OAAO,aAAa;AA6BvC,IAAqB,cAArB,cAAyC,eAA6C;AAAA,EAAtF;AAAA;AAGE,SAAiB,wBAAwB,IAAI,sBAAsB,MAAM;AAAA,MACvE,qBAAqB,CAAC,YAAY,WAAW;AAAA,IAC/C,CAAC;AACD,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,SAAS,UAAU,QAAQ;AAKhG,SAAQ,WAAW;AAChB,iBAAQ;AAGR,gBAAO;AAGP,iBAAQ;AAGS,gBAAqC;AAGtD,iBAAQ;AAGkB,oBAAW;AAGrC,uB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AAC;AAAA,GAtFkB,YAuFnB;AAMY;AAAA,EAAX,SAAS;AAAA,GA7FS,YA6FP;AAGI;AAAA,EAAf,aAAa;AAAA,GAhGK,YAgGH;AAmEhB;AAAA,EADC,MAAM,YAAY,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAlK9B,YAmKnB;AAMA;AAAA,EADC,MAAM,QAAQ,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAxK1B,YAyKnB;AAKM;AAAA,EADL,MAAM,SAAS,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA7K3B,YA8Kb;",
6
+ "names": []
7
+ }
@@ -2,8 +2,8 @@
2
2
  import { css } from "lit";
3
3
  var button_custom_styles_default = css`
4
4
  .button:focus-visible {
5
- outline: var(--syn-focus-ring-color) solid 2px;
6
- outline-offset: 2px;
5
+ outline: var(--syn-focus-ring-color) solid var(--syn-focus-ring-width);
6
+ outline-offset: var(--syn-focus-ring-width);
7
7
  }
8
8
 
9
9
  /*
@@ -135,4 +135,4 @@ var button_custom_styles_default = css`
135
135
  export {
136
136
  button_custom_styles_default
137
137
  };
138
- //# sourceMappingURL=chunk.IFBY43YE.js.map
138
+ //# sourceMappingURL=chunk.FVSP4LXX.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/button/button.custom.styles.ts"],
4
+ "sourcesContent": ["import { css } from 'lit';\n\nexport default css`\n.button:focus-visible {\n outline: var(--syn-focus-ring-color) solid var(--syn-focus-ring-width);\n outline-offset: var(--syn-focus-ring-width);\n }\n\n /*\n * Size modifiers\n */\n\n .button.button--medium.button--has-label .button__label {\n font-size: var(--syn-font-size-medium);\n } \n\n .button.button--large.button--has-label .button__label {\n font-size: var(--syn-font-size-large);\n }\n\n /*\n * Standard buttons\n */\n\n .button--filled.button--primary.button--disabled {\n background-color: var(--syn-color-neutral-400);\n border-color: var(--syn-color-neutral-400);\n color: var(--syn-color-neutral-600);\n }\n\n .button--filled.button--primary:hover:not(.button--disabled) {\n background-color: var(--syn-color-primary-900);\n border-color: var(--syn-color-primary-900);\n color: var(--syn-color-neutral-0);\n }\n\n .button--filled.button--primary:active:not(.button--disabled) {\n background-color: var(--syn-color-primary-950);\n border-color: var(--syn-color-primary-950);\n color: var(--syn-color-neutral-0);\n }\n\n /*\n * Outline buttons\n */\n\n .button--outline.button--primary.button--disabled {\n background: none;\n border-color: var(--syn-color-neutral-400);\n color: var(--syn-color-neutral-400);\n }\n\n .button--outline.button--primary:hover:not(.button--disabled),\n .button--outline.button--primary.button--checked:not(.button--disabled) {\n background: none;\n border-color: var(--syn-color-primary-900);\n color: var(--syn-color-primary-900);\n }\n\n .button--outline.button--primary:active:not(.button--disabled) {\n background: inherit;\n border-color: var(--syn-color-primary-950);\n color: var(--syn-color-primary-950);\n }\n\n /*\n * Text buttons\n */\n \n .button--text:hover:not(.button--disabled) {\n color: var(--syn-color-primary-900);\n }\n\n .button--text.button--primary:active:not(.button--disabled) {\n background: inherit;\n border-color: none;\n color: var(--syn-color-primary-950);\n }\n\n .button--text.button--primary.button--disabled {\n color: var(--syn-color-neutral-400);\n }\n\n /*\n* PADDING\n */\n .button.button--small.button--has-label.button--has-prefix {\n padding-inline-start: var(--syn-spacing-small);\n }\n\n .button.button--small.button--has-label.button--has-suffix {\n padding-inline-end: var(--syn-spacing-small);\n }\n\n .button.button--small.button--has-prefix .button__prefix, \n .button.button--small.button--has-suffix .button__suffix {\n font-size: var(--syn-spacing-medium);\n }\n\n .button.button--medium.button--has-label.button--has-prefix {\n padding-inline-start: var(--syn-spacing-medium);\n } \n\n .button.button--medium.button--has-label.button--has-suffix {\n padding-inline-end: var(--syn-spacing-medium);\n }\n\n .button.button--medium.button--has-prefix .button__prefix, \n .button.button--medium.button--has-suffix .button__suffix {\n font-size: var(--syn-spacing-large);\n }\n\n .button.button--large.button--has-label.button--has-prefix {\n padding-inline-start: var(--syn-spacing-large);\n }\n\n .button.button--large.button--has-label.button--has-prefix .button__label {\n padding-inline-start: var(--syn-spacing-medium);\n }\n\n .button.button--large.button--has-label.button--has-suffix {\n padding-inline-end: var(--syn-spacing-large);\n }\n\n .button.button--large.button--has-label.button--has-suffix .button__label {\n padding-inline-end: var(--syn-spacing-medium);\n }\n\n .button.button--large.button--has-prefix .button__prefix, \n .button.button--large.button--has-suffix .button__suffix {\n font-size: var(--syn-font-size-2x-large);\n }\n `;\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW;AAEpB,IAAO,+BAAQ;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;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
+ }