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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react';
3
3
  import { TextField } from './react';
4
4
  declare const _default: {
5
5
  title: string;
6
- render(args: Omit<React.HTMLAttributes<import(".").WarpTextField>, "label" | "onblur" | "onchange" | "onfocus" | "oninput" | "onFocus" | "onBlur" | "onChange" | "onInput" | "render" | "renderOptions" | "connectedCallback" | "disconnectedCallback" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "form" | "mask" | "pattern" | "disabled" | "type" | "name" | "value" | "updated" | "firstUpdated" | "resetFormControl" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "invalid" | "step" | "helpText" | "readOnly" | "readonly" | "size" | "max" | "min" | "minLength" | "maxLength" | "placeholder" | "required" | "formatter" | "_hasPrefix" | "_hasSuffix" | "_inputstyles" | "_helptextstyles" | "_label" | "_helpId" | "_id" | "_error" | "handler" | "prefixSlotChange" | "suffixSlotChange"> & {
6
+ render(args: Omit<React.HTMLAttributes<import(".").WarpTextField>, "label" | "onblur" | "onchange" | "onfocus" | "oninput" | "onFocus" | "onBlur" | "onChange" | "onInput" | "render" | "renderOptions" | "connectedCallback" | "disconnectedCallback" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "form" | "mask" | "pattern" | "disabled" | "type" | "name" | "value" | "updated" | "firstUpdated" | "resetFormControl" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate" | "invalid" | "step" | "helpText" | "readOnly" | "readonly" | "size" | "max" | "min" | "minLength" | "maxLength" | "placeholder" | "required" | "autocomplete" | "formatter" | "_hasPrefix" | "_hasSuffix" | "_inputstyles" | "_helptextstyles" | "_label" | "_helpId" | "_id" | "_error" | "handler" | "prefixSlotChange" | "suffixSlotChange"> & {
7
7
  onBlur?: (e: Event) => void;
8
8
  onblur?: (e: Event) => void;
9
9
  onChange?: (e: Event) => void;
@@ -66,3 +66,12 @@ test('renders affix component in the suffix slot', async () => {
66
66
  const page = render(component);
67
67
  await expect.element(page.getByText('kr')).toBeVisible();
68
68
  });
69
+ test('renders with no autocomplete attribute when none provided', async () => {
70
+ const component = html `<w-textfield data-testid="textfield"></w-textfield>`;
71
+ const page = render(component);
72
+ const locator = page.getByTestId('textfield');
73
+ await expect.element(locator).toBeVisible();
74
+ const el = (await locator.element());
75
+ expect(el.hasAttribute('autocomplete')).toBe(false);
76
+ expect(el.shadowRoot.querySelector('input').hasAttribute('autocomplete')).toBe(false);
77
+ });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@warp-ds/elements",
4
- "version": "2.4.0-next.1",
4
+ "version": "2.4.0-next.2",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -603,7 +603,11 @@
603
603
  },
604
604
  { "name": "value", "value": { "type": "string" } },
605
605
  { "name": "name", "value": { "type": "string" } },
606
- { "name": "step", "value": { "type": "number" } }
606
+ { "name": "step", "value": { "type": "number" } },
607
+ {
608
+ "name": "autocomplete",
609
+ "value": { "type": "string | undefined" }
610
+ }
607
611
  ],
608
612
  "events": [],
609
613
  "js": {
@@ -627,6 +631,7 @@
627
631
  { "name": "value", "type": "string" },
628
632
  { "name": "name", "type": "string" },
629
633
  { "name": "step", "type": "number" },
634
+ { "name": "autocomplete", "type": "string | undefined" },
630
635
  {
631
636
  "name": "formatter",
632
637
  "description": "Function to format value when the input field.\n\nOnly active when the input field does not have focus,\nsimilar to the accessible input masking example from Filament Group\n\nhttps://css-tricks.com/input-masking/\nhttps://filamentgroup.github.io/politespace/demo/demo.html",
@@ -873,20 +878,15 @@
873
878
  "description": "Whether to show optional text",
874
879
  "value": { "type": "boolean", "default": "false" }
875
880
  },
876
- {
877
- "name": "class-name",
878
- "description": "Additional container styling",
879
- "value": { "type": "string | undefined" }
880
- },
881
- {
882
- "name": "list-class-name",
883
- "description": "Additional list styling",
884
- "value": { "type": "string | undefined" }
885
- },
886
881
  {
887
882
  "name": "name",
888
883
  "description": "Name attribute for form submission",
889
884
  "value": { "type": "string | undefined" }
885
+ },
886
+ {
887
+ "name": "autocomplete",
888
+ "description": "Autocomplete attribute for the input field",
889
+ "value": { "type": "string | undefined", "default": "'off'" }
890
890
  }
891
891
  ],
892
892
  "events": [],
@@ -958,18 +958,13 @@
958
958
  "type": "boolean"
959
959
  },
960
960
  {
961
- "name": "containerClassName",
962
- "description": "Additional container styling",
963
- "type": "string | undefined"
964
- },
965
- {
966
- "name": "listClassName",
967
- "description": "Additional list styling",
961
+ "name": "name",
962
+ "description": "Name attribute for form submission",
968
963
  "type": "string | undefined"
969
964
  },
970
965
  {
971
- "name": "name",
972
- "description": "Name attribute for form submission",
966
+ "name": "autocomplete",
967
+ "description": "Autocomplete attribute for the input field",
973
968
  "type": "string | undefined"
974
969
  }
975
970
  ],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@warp-ds/elements",
3
3
  "type": "module",
4
- "version": "2.4.0-next.2",
4
+ "version": "2.4.0-next.3",
5
5
  "packageManager": "pnpm@10.20.0",
6
6
  "description": "Custom elements for Warp",
7
7
  "exports": {