@descope-ui/descope-autocomplete-field 0.0.2 → 0.0.4

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/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.0.4](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-autocomplete-field-0.0.3...@descope-ui/descope-autocomplete-field-0.0.4) (2025-03-03)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `@descope-ui/common` updated to version `0.0.6`
10
+ * `@descope-ui/theme-globals` updated to version `0.0.6`
11
+ * `@descope-ui/theme-input-wrapper` updated to version `0.0.6`
12
+ * `@descope-ui/descope-combo-box` updated to version `0.0.6`
13
+ ## [0.0.3](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-autocomplete-field-0.0.2...@descope-ui/descope-autocomplete-field-0.0.3) (2025-02-26)
14
+
15
+ ### Dependency Updates
16
+
17
+ * `@descope-ui/theme-globals` updated to version `0.0.5`
18
+ * `@descope-ui/theme-input-wrapper` updated to version `0.0.5`
19
+ * `@descope-ui/descope-combo-box` updated to version `0.0.5`
20
+ * `@descope-ui/common` updated to version `0.0.5`
5
21
  ## [0.0.2](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-autocomplete-field-0.0.1...@descope-ui/descope-autocomplete-field-0.0.2) (2025-02-17)
6
22
 
7
23
  ### Dependency Updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope-ui/descope-autocomplete-field",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./src/component/index.js"
@@ -19,10 +19,10 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@vaadin/custom-field": "24.3.4",
22
- "@descope-ui/common": "0.0.4",
23
- "@descope-ui/theme-globals": "0.0.4",
24
- "@descope-ui/theme-input-wrapper": "0.0.4",
25
- "@descope-ui/descope-combo-box": "0.0.4"
22
+ "@descope-ui/common": "0.0.6",
23
+ "@descope-ui/theme-globals": "0.0.6",
24
+ "@descope-ui/theme-input-wrapper": "0.0.6",
25
+ "@descope-ui/descope-combo-box": "0.0.6"
26
26
  },
27
27
  "publishConfig": {
28
28
  "link-workspace-packages": false
@@ -148,6 +148,17 @@ export const AutocompleteFieldClass = compose(
148
148
  line-height: unset;
149
149
  width: 100%;
150
150
  }
151
+
152
+ descope-autocomplete-field-internal {
153
+ display: inline-block;
154
+ box-sizing: border-box;
155
+ user-select: none;
156
+ max-width: 100%;
157
+ }
158
+
159
+ descope-autocomplete-field-internal ::slotted {
160
+ padding: 0;
161
+ }
151
162
  `,
152
163
  excludeAttrsSync: ['tabindex', 'error-message', 'label'],
153
164
  componentName,
@@ -45,18 +45,6 @@ class AutocompleteFieldInternal extends BaseInputClass {
45
45
  super();
46
46
 
47
47
  this.innerHTML = `
48
- <style>
49
- :host {
50
- display: inline-block;
51
- box-sizing: border-box;
52
- user-select: none;
53
- max-width: 100%;
54
- }
55
-
56
- :host ::slotted {
57
- padding: 0;
58
- }
59
- </style>
60
48
  <div class="autocomplete-field">
61
49
  <descope-combo-box clear-button-visible="true" auto-open-disabled="true" has-dynamic-data="true" item-label-path="data-name" item-value-path="data-id" hide-toggle-button="true"></descope-combo-box>
62
50
  </div>
@@ -84,12 +84,7 @@ const Template = ({
84
84
  'min-search-length': minSearchLength,
85
85
  errorMsgIcon,
86
86
  }) => {
87
- const overrideFetchResultsScript = `
88
- <script>
89
- document.querySelector("descope-autocomplete-field").fetchResults = ${mockFetchResults}
90
- </script>`;
91
-
92
- return withForm(`
87
+ return `
93
88
  <descope-autocomplete-field
94
89
  size="${size}"
95
90
  bordered="${bordered}"
@@ -107,13 +102,21 @@ const Template = ({
107
102
  min-search-length="${minSearchLength || ''}"
108
103
  ${errorMsgIcon ? errorMessageIconAttrs : ''}
109
104
  ></descope-autocomplete-field>
110
- ${overrideFetchResultsScript}
111
- `);
105
+ `;
112
106
  };
113
107
 
114
108
  export default {
115
109
  component: componentName,
116
110
  title: 'descope-autocomplete-field',
111
+ decorators: [(story, { args }) => {
112
+ setTimeout(() => {
113
+ document.querySelector("descope-autocomplete-field").fetchResults = mockFetchResults
114
+ })
115
+
116
+ return story();
117
+ },
118
+ withForm,
119
+ ],
117
120
  argTypes: {
118
121
  ...labelControl,
119
122
  ...placeholderControl,