@descope-ui/descope-combo-box 0.1.2 → 0.1.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.1.3](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-combo-box-0.1.2...@descope-ui/descope-combo-box-0.1.3) (2025-06-26)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `@descope-ui/common` updated to version `0.0.14`
10
+ * `@descope-ui/theme-globals` updated to version `0.0.14`
11
+ * `@descope-ui/theme-input-wrapper` updated to version `0.1.3`
5
12
  ## [0.1.2](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-combo-box-0.1.1...@descope-ui/descope-combo-box-0.1.2) (2025-06-09)
6
13
 
7
14
  ### Dependency Updates
@@ -463,3 +463,18 @@ test.describe('override renderer', () => {
463
463
  ).toMatchSnapshot();
464
464
  });
465
465
  });
466
+
467
+ test.describe('custom error message', () => {
468
+ loopPresets({
469
+ 'value missing: default': { required: 'true', defaultErrorMessageValueMissing: 'true' },
470
+ 'value missing: custom': { required: 'true', 'data-errormessage-value-missing': 'custom message' },
471
+ 'value missing: empty': { required: 'true', 'data-errormessage-value-missing': '' },
472
+ }, (preset, name) => {
473
+ test(name, async({ page }) => {
474
+ await page.goto(getStoryUrl(storyName, preset));
475
+ const component = createComboBoxTestDriver(page.locator(componentName));
476
+ await page.getByRole('button').getByText('Submit').click();
477
+ expect(await component.screenshot({ animations: 'disabled', timeout: 6000 })).toMatchSnapshot();
478
+ });
479
+ });
480
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope-ui/descope-combo-box",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./src/component/index.js"
@@ -19,9 +19,9 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@vaadin/combo-box": "24.3.4",
22
- "@descope-ui/common": "0.0.13",
23
- "@descope-ui/theme-globals": "0.0.13",
24
- "@descope-ui/theme-input-wrapper": "0.1.2"
22
+ "@descope-ui/common": "0.0.14",
23
+ "@descope-ui/theme-globals": "0.0.14",
24
+ "@descope-ui/theme-input-wrapper": "0.1.3"
25
25
  },
26
26
  "publishConfig": {
27
27
  "link-workspace-packages": false
@@ -1,7 +1,10 @@
1
1
  /* eslint no-param-reassign: 0 */
2
2
 
3
3
  import { componentName } from '../src/component';
4
- import { withForm } from '@descope-ui/common/sb-helpers';
4
+ import {
5
+ toggleDefaultErrorMessageValueMissingDecorator,
6
+ withForm,
7
+ } from '@descope-ui/common/sb-helpers';
5
8
  import {
6
9
  labelControl,
7
10
  placeholderControl,
@@ -20,6 +23,7 @@ import {
20
23
  errorMessageIconControl,
21
24
  errorMessageIconAttrs,
22
25
  overrideRendererControl,
26
+ defaultValueMissingControl,
23
27
  } from '@descope-ui/common/sb-controls';
24
28
 
25
29
  const Template = ({
@@ -122,6 +126,7 @@ export default {
122
126
 
123
127
  return story();
124
128
  },
129
+ toggleDefaultErrorMessageValueMissingDecorator,
125
130
  withForm,
126
131
  ],
127
132
  argTypes: {
@@ -141,6 +146,7 @@ export default {
141
146
  ...directionControl,
142
147
  ...loadingControl,
143
148
  ...errorMessageIconControl,
149
+ ...defaultValueMissingControl,
144
150
  'default-value': {
145
151
  name: 'Default Value',
146
152
  control: { type: 'text' },
@@ -173,4 +179,5 @@ Default.args = {
173
179
  { displayName: 'Item4', value: '4', label: 'data item 4' },
174
180
  ],
175
181
  itemsSource: 'children',
182
+ 'data-errormessage-value-missing': 'Please fill out this field.',
176
183
  };