@cupra/ui-kit 2.0.0-canary.77 → 2.0.0-canary.79
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/dist/cjs/components/ds-checkbox/ds-checkbox.cjs +8 -8
- package/dist/cjs/components/ds-checkbox/styles/common.styles.cjs +0 -1
- package/dist/cjs/components/ds-checkbox-group/ds-checkbox-group.cjs +15 -0
- package/dist/cjs/components/ds-checkbox-group/styles/common.styles.cjs +18 -0
- package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/utils/IconsManager.cjs +1 -1
- package/dist/cjs/utils/PubSub.cjs +1 -1
- package/dist/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
- package/dist/cjs/utils/cssWithTokens.cjs +1 -1
- package/dist/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist/esm/components/ds-checkbox/ds-checkbox.js +103 -45
- package/dist/esm/components/ds-checkbox/styles/common.styles.js +0 -1
- package/dist/esm/components/ds-checkbox-group/ds-checkbox-group.js +83 -0
- package/dist/esm/components/ds-checkbox-group/styles/common.styles.js +25 -0
- package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/utils/IconsManager.js +1 -1
- package/dist/esm/utils/PubSub.js +1 -1
- package/dist/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
- package/dist/esm/utils/cssWithTokens.js +1 -1
- package/dist/esm/utils/htmlWithTokens.js +1 -1
- package/dist/types/components/ds-checkbox/ds-checkbox.d.ts +16 -3
- package/dist/types/components/ds-checkbox/ds-checkbox.types.d.ts +1 -1
- package/dist/types/components/ds-checkbox-group/ds-checkbox-group.d.ts +28 -0
- package/dist/types/components/ds-checkbox-group/ds-checkbox-group.test.d.ts +8 -0
- package/dist/types/components/ds-checkbox-group/ds-checkbox-group.types.d.ts +10 -0
- package/dist/types/components/ds-checkbox-group/styles/common.styles.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist-react/cjs/components/ds-checkbox/ds-checkbox.cjs +8 -8
- package/dist-react/cjs/components/ds-checkbox/styles/common.styles.cjs +0 -1
- package/dist-react/cjs/components/ds-checkbox-group/ds-checkbox-group.cjs +15 -0
- package/dist-react/cjs/components/ds-checkbox-group/styles/common.styles.cjs +18 -0
- package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist-react/cjs/index.cjs +1 -1
- package/dist-react/cjs/utils/IconsManager.cjs +1 -1
- package/dist-react/cjs/utils/PubSub.cjs +1 -1
- package/dist-react/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
- package/dist-react/cjs/utils/cssWithTokens.cjs +1 -1
- package/dist-react/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist-react/esm/components/ds-checkbox/ds-checkbox.js +103 -45
- package/dist-react/esm/components/ds-checkbox/styles/common.styles.js +0 -1
- package/dist-react/esm/components/ds-checkbox-group/ds-checkbox-group.js +83 -0
- package/dist-react/esm/components/ds-checkbox-group/styles/common.styles.js +25 -0
- package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/esm/index.js +3 -2
- package/dist-react/esm/utils/IconsManager.js +1 -1
- package/dist-react/esm/utils/PubSub.js +1 -1
- package/dist-react/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
- package/dist-react/esm/utils/cssWithTokens.js +1 -1
- package/dist-react/esm/utils/htmlWithTokens.js +1 -1
- package/dist-react/types/components/ds-checkbox/ds-checkbox.d.ts +16 -3
- package/dist-react/types/components/ds-checkbox/ds-checkbox.types.d.ts +1 -1
- package/dist-react/types/components/ds-checkbox-group/ds-checkbox-group.d.ts +28 -0
- package/dist-react/types/components/ds-checkbox-group/ds-checkbox-group.test.d.ts +8 -0
- package/dist-react/types/components/ds-checkbox-group/ds-checkbox-group.types.d.ts +10 -0
- package/dist-react/types/components/ds-checkbox-group/styles/common.styles.d.ts +1 -0
- package/dist-react/types/components/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const s = o`
|
|
6
|
+
:host {
|
|
7
|
+
display: contents;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.container {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container.vertical ::slotted(ds-checkbox) {
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.container.horizontal ::slotted(ds-checkbox) {
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
vertical-align: top;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
export {
|
|
24
|
+
s as commonStyles
|
|
25
|
+
};
|
|
@@ -54,7 +54,7 @@ let m = class extends v {
|
|
|
54
54
|
}
|
|
55
55
|
loadThemeStyles() {
|
|
56
56
|
return this.loadStyles ? new Promise((t, o) => {
|
|
57
|
-
const s = "/2.0.0-canary.
|
|
57
|
+
const s = "/2.0.0-canary.79", r = `https://ds-assets.cupra.com${s}/styles/${this.theme}/theme.css`;
|
|
58
58
|
if (document.head.querySelector(`link[href="${r}"]`)) t();
|
|
59
59
|
else {
|
|
60
60
|
const e = `ui-kit-theme-${s}`, a = document.getElementById(e), n = document.createElement("link");
|
package/dist-react/esm/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import "./components/ds-bullets/ds-bullets.js";
|
|
|
11
11
|
import "./components/ds-button/ds-button.js";
|
|
12
12
|
import "./components/ds-carousel-indicator/ds-carousel-indicator.js";
|
|
13
13
|
import "./components/ds-checkbox/ds-checkbox.js";
|
|
14
|
+
import "./components/ds-checkbox-group/ds-checkbox-group.js";
|
|
14
15
|
import "./components/ds-chip/ds-chip.js";
|
|
15
16
|
import "./components/ds-chips/ds-chips.js";
|
|
16
17
|
import "./components/ds-currency/ds-currency.js";
|
|
@@ -76,7 +77,7 @@ import "./components/ds-navigation-controls/ds-navigation-controls.js";
|
|
|
76
77
|
import "./components/ds-table/ds-table.js";
|
|
77
78
|
import "./components/ds-table-row/ds-table-row.js";
|
|
78
79
|
import "./components/ds-table-cell/ds-table-cell.js";
|
|
79
|
-
import { iconNames as
|
|
80
|
+
import { iconNames as Bo } from "./components/ds-icon/iconNames.js";
|
|
80
81
|
export {
|
|
81
|
-
|
|
82
|
+
Bo as iconNames
|
|
82
83
|
};
|
|
@@ -25,7 +25,7 @@ class l {
|
|
|
25
25
|
}), f.subscribe("theme", this.handleChangeTheme);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
const c = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
28
|
+
const c = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.79"), h = globalThis;
|
|
29
29
|
let i = h[c];
|
|
30
30
|
i || (i = new l(), Object.defineProperty(h, c, {
|
|
31
31
|
value: i,
|
|
@@ -18,7 +18,7 @@ class e {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
const u = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
21
|
+
const u = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.79"), t = globalThis;
|
|
22
22
|
let b = t[u];
|
|
23
23
|
b || (b = new e(), Object.defineProperty(t, u, {
|
|
24
24
|
value: b,
|
|
@@ -7,7 +7,7 @@ class s {
|
|
|
7
7
|
theme: t
|
|
8
8
|
}) => {
|
|
9
9
|
if (!t || !e) return;
|
|
10
|
-
const c = `https://ds-assets.cupra.com/2.0.0-canary.
|
|
10
|
+
const c = `https://ds-assets.cupra.com/2.0.0-canary.79/styles/${t}/components/${e}.css`, r = this.getCachedStyleSheetPromise({ url: c });
|
|
11
11
|
if (r) return r;
|
|
12
12
|
const i = h(() => this.fetchStyle({ url: c })).then((n) => (n || this.stylePromises.delete(c), n));
|
|
13
13
|
return this.stylePromises.set(c, i), this.stylePromises.get(c);
|
|
@@ -3,7 +3,7 @@ import "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
|
3
3
|
import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
4
|
import { unsafeCSS as n, css as o } from "../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
5
|
function x(t, ...r) {
|
|
6
|
-
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-
|
|
6
|
+
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-79"), i = n(e);
|
|
7
7
|
return o`${i}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -3,7 +3,7 @@ import { html as n } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit
|
|
|
3
3
|
import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
4
|
import { unsafeHTML as i } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
|
|
5
5
|
function x(t, ...r) {
|
|
6
|
-
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-
|
|
6
|
+
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-79"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
import type { DsCheckboxGroupAttrs } from '../ds-checkbox-group/ds-checkbox-group.types.ts';
|
|
2
3
|
import type { DsCheckboxAttrs } from './ds-checkbox.types';
|
|
3
4
|
declare const DsCheckbox_base: typeof UiKitElement;
|
|
4
5
|
export declare class DsCheckbox extends DsCheckbox_base {
|
|
@@ -7,15 +8,27 @@ export declare class DsCheckbox extends DsCheckbox_base {
|
|
|
7
8
|
inputPlacement: DsCheckboxAttrs['input-placement'];
|
|
8
9
|
checked: DsCheckboxAttrs['checked'];
|
|
9
10
|
required: DsCheckboxAttrs['required'];
|
|
10
|
-
|
|
11
|
+
_disabled: DsCheckboxAttrs['disabled'];
|
|
11
12
|
mode: DsCheckboxAttrs['mode'];
|
|
12
|
-
|
|
13
|
+
_size: DsCheckboxAttrs['size'];
|
|
13
14
|
helperText: DsCheckboxAttrs['helper-text'];
|
|
14
15
|
infoText: DsCheckboxAttrs['info-text'];
|
|
15
|
-
|
|
16
|
+
_forcedError: DsCheckboxAttrs['forced-error'];
|
|
16
17
|
invalidError: DsCheckboxAttrs['invalid-error'];
|
|
17
18
|
indeterminate: DsCheckboxAttrs['indeterminate'];
|
|
19
|
+
protected disabledGroup?: DsCheckboxGroupAttrs['disabled'];
|
|
20
|
+
protected errorGroup?: DsCheckboxGroupAttrs['error'];
|
|
21
|
+
protected sizeGroup?: DsCheckboxGroupAttrs['size'];
|
|
18
22
|
static styles: import("lit").CSSResult[];
|
|
23
|
+
connectedCallback(): void;
|
|
24
|
+
protected createContextConsumers(contexts: Array<{
|
|
25
|
+
context: any;
|
|
26
|
+
callback: any;
|
|
27
|
+
}>): void;
|
|
28
|
+
get disabled(): boolean;
|
|
29
|
+
get size(): DsCheckboxAttrs['size'];
|
|
30
|
+
protected get forcedError(): DsCheckboxAttrs['forced-error'];
|
|
31
|
+
protected get error(): boolean;
|
|
19
32
|
private handleChange;
|
|
20
33
|
protected get classes(): {
|
|
21
34
|
[x: string]: boolean;
|
|
@@ -6,7 +6,7 @@ export interface DsCheckboxAttrs extends CommonAttrs {
|
|
|
6
6
|
required?: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
mode?: 'dark' | 'light';
|
|
9
|
-
size?: '
|
|
9
|
+
size?: 'large' | 'medium' | string;
|
|
10
10
|
'helper-text'?: string;
|
|
11
11
|
'info-text'?: string;
|
|
12
12
|
'forced-error'?: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
import type { DsCheckboxGroupAttrs, Orientation } from './ds-checkbox-group.types.ts';
|
|
3
|
+
export declare const checkboxGroupDisabledContext: {
|
|
4
|
+
__context__: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const checkboxGroupErrorContext: {
|
|
7
|
+
__context__: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const checkboxGroupErrorTextContext: {
|
|
10
|
+
__context__: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const checkboxGroupHelperTextContext: {
|
|
13
|
+
__context__: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const checkboxGroupSizeContext: {
|
|
16
|
+
__context__: string;
|
|
17
|
+
};
|
|
18
|
+
export declare class DsCheckboxGroup extends UiKitElement {
|
|
19
|
+
static styles: import("lit").CSSResult[];
|
|
20
|
+
error: DsCheckboxGroupAttrs['error'];
|
|
21
|
+
errorText: DsCheckboxGroupAttrs['error-text'];
|
|
22
|
+
helperText: DsCheckboxGroupAttrs['helper-text'];
|
|
23
|
+
disabled: DsCheckboxGroupAttrs['disabled'];
|
|
24
|
+
size: DsCheckboxGroupAttrs['size'];
|
|
25
|
+
orientation: Orientation;
|
|
26
|
+
private get classes();
|
|
27
|
+
render(): import("lit").TemplateResult<1>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommonAttrs } from '../../types/types';
|
|
2
|
+
export type Orientation = 'horizontal' | 'vertical';
|
|
3
|
+
export type DsCheckboxGroupAttrs = {
|
|
4
|
+
error?: boolean;
|
|
5
|
+
'error-text'?: string;
|
|
6
|
+
'helper-text'?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
orientation?: Orientation;
|
|
9
|
+
size?: 'medium' | 'large' | (string & {});
|
|
10
|
+
} & CommonAttrs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commonStyles: import("lit").CSSResult;
|
|
@@ -11,6 +11,7 @@ import './ds-bullets/ds-bullets.ts';
|
|
|
11
11
|
import './ds-button/ds-button.ts';
|
|
12
12
|
import './ds-carousel-indicator/ds-carousel-indicator.ts';
|
|
13
13
|
import './ds-checkbox/ds-checkbox.ts';
|
|
14
|
+
import './ds-checkbox-group/ds-checkbox-group.ts';
|
|
14
15
|
import './ds-chip/ds-chip.ts';
|
|
15
16
|
import './ds-chips/ds-chips.ts';
|
|
16
17
|
import './ds-currency/ds-currency.ts';
|