@vaadin/checkbox-group 24.8.0-alpha8 → 25.0.0-alpha1

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/README.md CHANGED
@@ -29,29 +29,6 @@ Once installed, import the component in your application:
29
29
  import '@vaadin/checkbox-group';
30
30
  ```
31
31
 
32
- ## Themes
33
-
34
- Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
35
- The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/checkbox-group/vaadin-checkbox-group.js) of the package uses the Lumo theme.
36
-
37
- To use the Material theme, import the component from the `theme/material` folder:
38
-
39
- ```js
40
- import '@vaadin/checkbox-group/theme/material/vaadin-checkbox-group.js';
41
- ```
42
-
43
- You can also import the Lumo version of the component explicitly:
44
-
45
- ```js
46
- import '@vaadin/checkbox-group/theme/lumo/vaadin-checkbox-group.js';
47
- ```
48
-
49
- Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
50
-
51
- ```js
52
- import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js';
53
- ```
54
-
55
32
  ## Contributing
56
33
 
57
34
  Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/checkbox-group",
3
- "version": "24.8.0-alpha8",
3
+ "version": "25.0.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,24 +31,21 @@
31
31
  "Vaadin",
32
32
  "checkbox",
33
33
  "web-components",
34
- "web-component",
35
- "polymer"
34
+ "web-component"
36
35
  ],
37
36
  "dependencies": {
38
37
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@polymer/polymer": "^3.0.0",
40
- "@vaadin/a11y-base": "24.8.0-alpha8",
41
- "@vaadin/checkbox": "24.8.0-alpha8",
42
- "@vaadin/component-base": "24.8.0-alpha8",
43
- "@vaadin/field-base": "24.8.0-alpha8",
44
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha8",
45
- "@vaadin/vaadin-material-styles": "24.8.0-alpha8",
46
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha8",
38
+ "@vaadin/a11y-base": "25.0.0-alpha1",
39
+ "@vaadin/checkbox": "25.0.0-alpha1",
40
+ "@vaadin/component-base": "25.0.0-alpha1",
41
+ "@vaadin/field-base": "25.0.0-alpha1",
42
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
43
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
47
44
  "lit": "^3.0.0"
48
45
  },
49
46
  "devDependencies": {
50
- "@vaadin/chai-plugins": "24.8.0-alpha8",
51
- "@vaadin/test-runner-commands": "24.8.0-alpha8",
47
+ "@vaadin/chai-plugins": "25.0.0-alpha1",
48
+ "@vaadin/test-runner-commands": "25.0.0-alpha1",
52
49
  "@vaadin/testing-helpers": "^1.1.0",
53
50
  "sinon": "^18.0.0"
54
51
  },
@@ -56,5 +53,5 @@
56
53
  "web-types.json",
57
54
  "web-types.lit.json"
58
55
  ],
59
- "gitHead": "d914bb8f669d7e3d1981feb8eac05688ab9870b4"
56
+ "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
60
57
  }
@@ -6,7 +6,6 @@
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
7
7
  import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
8
8
  import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
9
- import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
10
9
  import type { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';
11
10
  import type { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
12
11
  import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
@@ -17,7 +16,6 @@ import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.j
17
16
  export declare function CheckboxGroupMixin<T extends Constructor<HTMLElement>>(
18
17
  base: T,
19
18
  ): Constructor<CheckboxGroupMixinClass> &
20
- Constructor<ControllerMixinClass> &
21
19
  Constructor<DisabledMixinClass> &
22
20
  Constructor<FieldMixinClass> &
23
21
  Constructor<FocusMixinClass> &
@@ -4,15 +4,14 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/checkbox/src/vaadin-checkbox.js';
7
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
+ import { html, LitElement } from 'lit';
8
8
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
9
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
12
  import { CheckboxGroupMixin } from './vaadin-checkbox-group-mixin.js';
12
13
  import { checkboxGroupStyles } from './vaadin-checkbox-group-styles.js';
13
14
 
14
- registerStyles('vaadin-checkbox-group', checkboxGroupStyles, { moduleId: 'vaadin-checkbox-group-styles' });
15
-
16
15
  /**
17
16
  * `<vaadin-checkbox-group>` is a web component that allows the user to choose several items from a group of binary choices.
18
17
  *
@@ -62,12 +61,17 @@ registerStyles('vaadin-checkbox-group', checkboxGroupStyles, { moduleId: 'vaadin
62
61
  * @mixes ElementMixin
63
62
  * @mixes CheckboxGroupMixin
64
63
  */
65
- class CheckboxGroup extends CheckboxGroupMixin(ElementMixin(ThemableMixin(PolymerElement))) {
64
+ class CheckboxGroup extends CheckboxGroupMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
66
65
  static get is() {
67
66
  return 'vaadin-checkbox-group';
68
67
  }
69
68
 
70
- static get template() {
69
+ static get styles() {
70
+ return checkboxGroupStyles;
71
+ }
72
+
73
+ /** @protected */
74
+ render() {
71
75
  return html`
72
76
  <div class="vaadin-group-field-container">
73
77
  <div part="label">
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/checkbox-group",
4
- "version": "24.8.0-alpha8",
4
+ "version": "25.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/checkbox-group",
4
- "version": "24.8.0-alpha8",
4
+ "version": "25.0.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -1,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- export * from './vaadin-checkbox-group.js';
@@ -1,62 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2018 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import '@vaadin/checkbox/src/vaadin-lit-checkbox.js';
7
- import { html, LitElement } from 'lit';
8
- import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
- import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
- import { CheckboxGroupMixin } from './vaadin-checkbox-group-mixin.js';
13
- import { checkboxGroupStyles } from './vaadin-checkbox-group-styles.js';
14
-
15
- /**
16
- * LitElement based version of `<vaadin-checkbox-group>` web component.
17
- *
18
- * ## Disclaimer
19
- *
20
- * This component is an experiment and not yet a part of Vaadin platform.
21
- * There is no ETA regarding specific Vaadin version where it'll land.
22
- * Feel free to try this code in your apps as per Apache 2.0 license.
23
- */
24
- class CheckboxGroup extends CheckboxGroupMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
25
- static get is() {
26
- return 'vaadin-checkbox-group';
27
- }
28
-
29
- static get styles() {
30
- return checkboxGroupStyles;
31
- }
32
-
33
- /** @protected */
34
- render() {
35
- return html`
36
- <div class="vaadin-group-field-container">
37
- <div part="label">
38
- <slot name="label"></slot>
39
- <span part="required-indicator" aria-hidden="true"></span>
40
- </div>
41
-
42
- <div part="group-field">
43
- <slot></slot>
44
- </div>
45
-
46
- <div part="helper-text">
47
- <slot name="helper"></slot>
48
- </div>
49
-
50
- <div part="error-message">
51
- <slot name="error-message"></slot>
52
- </div>
53
- </div>
54
-
55
- <slot name="tooltip"></slot>
56
- `;
57
- }
58
- }
59
-
60
- defineCustomElement(CheckboxGroup);
61
-
62
- export { CheckboxGroup };
@@ -1,3 +0,0 @@
1
- import '@vaadin/checkbox/theme/lumo/vaadin-lit-checkbox.js';
2
- import './vaadin-checkbox-group-styles.js';
3
- import '../../src/vaadin-lit-checkbox-group.js';
@@ -1,3 +0,0 @@
1
- import '@vaadin/checkbox/theme/lumo/vaadin-lit-checkbox.js';
2
- import './vaadin-checkbox-group-styles.js';
3
- import '../../src/vaadin-lit-checkbox-group.js';
@@ -1 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
@@ -1,45 +0,0 @@
1
- import '@vaadin/vaadin-material-styles/color.js';
2
- import { helper } from '@vaadin/vaadin-material-styles/mixins/helper.js';
3
- import { requiredField } from '@vaadin/vaadin-material-styles/mixins/required-field.js';
4
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
5
-
6
- const checkboxGroup = css`
7
- :host {
8
- display: inline-flex;
9
- position: relative;
10
- padding-top: 8px;
11
- margin-bottom: 8px;
12
- outline: none;
13
- color: var(--material-body-text-color);
14
- font-size: var(--material-body-font-size);
15
- line-height: 24px;
16
- font-family: var(--material-font-family);
17
- -webkit-font-smoothing: antialiased;
18
- -moz-osx-font-smoothing: grayscale;
19
- }
20
-
21
- :host::before {
22
- line-height: 32px;
23
- }
24
-
25
- :host([has-label]) {
26
- padding-top: 24px;
27
- }
28
-
29
- :host([theme~='vertical']) [part='group-field'] {
30
- flex-direction: column;
31
- }
32
-
33
- :host([disabled]) [part='label'] {
34
- color: var(--material-disabled-text-color);
35
- -webkit-text-fill-color: var(--material-disabled-text-color);
36
- }
37
-
38
- :host([focused]:not([invalid])) [part='label'] {
39
- color: var(--material-primary-text-color);
40
- }
41
- `;
42
-
43
- registerStyles('vaadin-checkbox-group', [requiredField, helper, checkboxGroup], {
44
- moduleId: 'material-checkbox-group',
45
- });
@@ -1,3 +0,0 @@
1
- import '@vaadin/checkbox/theme/material/vaadin-checkbox.js';
2
- import './vaadin-checkbox-group-styles.js';
3
- import '../../src/vaadin-checkbox-group.js';
@@ -1,3 +0,0 @@
1
- import '@vaadin/checkbox/theme/material/vaadin-checkbox.js';
2
- import './vaadin-checkbox-group-styles.js';
3
- import '../../src/vaadin-checkbox-group.js';
@@ -1,3 +0,0 @@
1
- import '@vaadin/checkbox/theme/material/vaadin-lit-checkbox.js';
2
- import './vaadin-checkbox-group-styles.js';
3
- import '../../src/vaadin-lit-checkbox-group.js';
@@ -1,3 +0,0 @@
1
- import '@vaadin/checkbox/theme/material/vaadin-lit-checkbox.js';
2
- import './vaadin-checkbox-group-styles.js';
3
- import '../../src/vaadin-lit-checkbox-group.js';
@@ -1 +0,0 @@
1
- export * from './src/vaadin-checkbox-group.js';
@@ -1,2 +0,0 @@
1
- import './theme/lumo/vaadin-lit-checkbox-group.js';
2
- export * from './src/vaadin-lit-checkbox-group.js';