@xplortech/apollo-core 2.7.1 → 2.8.0
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/.typings/apollo-components.html-data.json +8 -4
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/p-689f1dae.entry.js +1 -0
- package/dist/apollo-core/p-cd56a3d5.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/xpl-avatar_54.cjs.entry.js +1071 -40
- package/dist/cjs/xpl-toggle.cjs.entry.js +8 -3
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +7 -12
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +7 -6
- package/dist/collection/components/xpl-input/xpl-input.js +28 -24
- package/dist/collection/components/xpl-radio/radio.stories.js +10 -1
- package/dist/collection/components/xpl-radio/xpl-radio.js +30 -5
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +26 -4
- package/dist/components/xpl-checkbox2.js +1 -1
- package/dist/components/xpl-choicelist.js +1 -1
- package/dist/components/xpl-icon2.js +1 -1
- package/dist/components/xpl-input2.js +1 -1
- package/dist/components/xpl-radio2.js +1 -1
- package/dist/components/xpl-toggle.js +1 -1
- package/dist/docs/xpl-checkbox/readme.md +5 -3
- package/dist/docs/xpl-radio/readme.md +10 -9
- package/dist/docs/xpl-toggle/readme.md +16 -9
- package/dist/esm/apollo-core.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/xpl-avatar_54.entry.js +1071 -40
- package/dist/esm/xpl-toggle.entry.js +9 -4
- package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +1 -1
- package/dist/types/components/xpl-input/xpl-input.d.ts +3 -2
- package/dist/types/components/xpl-radio/radio.stories.d.ts +10 -1
- package/dist/types/components/xpl-radio/xpl-radio.d.ts +2 -0
- package/dist/types/components/xpl-toggle/xpl-toggle.d.ts +3 -0
- package/dist/types/components.d.ts +39 -11
- package/package.json +29 -4
- package/dist/apollo-core/p-d1c9c233.entry.js +0 -1
- package/dist/apollo-core/p-e2a5d41c.entry.js +0 -1
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-C7bgJs6C.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-C7bgJs6C.js';
|
|
2
2
|
import { v as v4 } from './v4-Cqlsd6nf.js';
|
|
3
3
|
|
|
4
4
|
const Toggle = class {
|
|
5
5
|
constructor(hostRef) {
|
|
6
6
|
registerInstance(this, hostRef);
|
|
7
|
+
this.toggleChange = createEvent(this, "toggleChange", 7);
|
|
7
8
|
this.variant = 'default';
|
|
8
9
|
this.id = v4();
|
|
10
|
+
this.onChange = (event) => {
|
|
11
|
+
const target = event.target;
|
|
12
|
+
this.toggleChange.emit(target.checked);
|
|
13
|
+
};
|
|
9
14
|
}
|
|
10
15
|
render() {
|
|
11
16
|
let containerClassName = 'xpl-toggle-container';
|
|
@@ -14,13 +19,13 @@ const Toggle = class {
|
|
|
14
19
|
let className = 'xpl-toggle';
|
|
15
20
|
if (this.variant === 'small')
|
|
16
21
|
className += ' xpl-toggle--small';
|
|
17
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '2665ccecd2df94b7ed7443e2ecb6265fca7f235f', class: containerClassName }, (this.heading || this.description) && (h("label", { key: '75292b431419e1d34c127a82d61baa1ee024a2bb', class: {
|
|
18
23
|
'xpl-label': true,
|
|
19
24
|
'xpl-label--disabled': this.disabled,
|
|
20
|
-
}, htmlFor: this.id }, this.heading, this.description && (h("small", { key: '
|
|
25
|
+
}, htmlFor: this.id }, this.heading, this.description && (h("small", { key: '772e34c7d553faee5b1dfc448ecb95706dc3e8df', class: {
|
|
21
26
|
'xpl-description': true,
|
|
22
27
|
'xpl-description--disabled': this.disabled,
|
|
23
|
-
} }, this.description)))), h("input", { key: '
|
|
28
|
+
} }, this.description)))), h("input", { key: 'afec8fff16aadca330c804832dbd41c4b10f5caa', class: className, type: "checkbox", checked: this.checked, disabled: this.disabled, id: this.id, name: this.name, onChange: this.onChange }), this.label && h("label", { key: '1b25d01805915cb2dacf03ad9340beec61565bcc', htmlFor: this.id }, this.label)));
|
|
24
29
|
}
|
|
25
30
|
};
|
|
26
31
|
|
|
@@ -38,11 +38,12 @@ export declare class Input {
|
|
|
38
38
|
ariaLabel: string;
|
|
39
39
|
shape?: 'rounded' | 'box';
|
|
40
40
|
type?: 'date' | 'time' | 'text' | 'number' | 'password' | 'file' | 'color' | 'phone' | 'search';
|
|
41
|
-
focusEvent: EventEmitter<FocusEvent>;
|
|
42
41
|
blurEvent: EventEmitter<FocusEvent>;
|
|
43
|
-
|
|
42
|
+
focusEvent: EventEmitter<FocusEvent>;
|
|
44
43
|
inputEvent: EventEmitter<string>;
|
|
45
44
|
search: EventEmitter<string>;
|
|
45
|
+
valueChange: EventEmitter<string>;
|
|
46
|
+
private handleChildValueChange;
|
|
46
47
|
private valueChanged;
|
|
47
48
|
characterCount: number;
|
|
48
49
|
passwordVisible: boolean;
|
|
@@ -40,6 +40,13 @@ declare const _default: {
|
|
|
40
40
|
required: false;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
+
selectedValue: {
|
|
44
|
+
type: {
|
|
45
|
+
name: "string";
|
|
46
|
+
required: false;
|
|
47
|
+
};
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
43
50
|
};
|
|
44
51
|
parameters: {
|
|
45
52
|
actions: {
|
|
@@ -49,7 +56,7 @@ declare const _default: {
|
|
|
49
56
|
};
|
|
50
57
|
export default _default;
|
|
51
58
|
export declare const Radio: {
|
|
52
|
-
({ label, description, checked, disabled, styled, value, name }: {
|
|
59
|
+
({ label, description, checked, disabled, styled, value, name, selectedValue, }: {
|
|
53
60
|
label: any;
|
|
54
61
|
description: any;
|
|
55
62
|
checked: any;
|
|
@@ -57,6 +64,7 @@ export declare const Radio: {
|
|
|
57
64
|
styled: any;
|
|
58
65
|
value: any;
|
|
59
66
|
name: any;
|
|
67
|
+
selectedValue: any;
|
|
60
68
|
}): string;
|
|
61
69
|
args: {
|
|
62
70
|
label: string;
|
|
@@ -66,6 +74,7 @@ export declare const Radio: {
|
|
|
66
74
|
styled: boolean;
|
|
67
75
|
value: string;
|
|
68
76
|
name: string;
|
|
77
|
+
selectedValue: string;
|
|
69
78
|
};
|
|
70
79
|
parameters: {
|
|
71
80
|
layout: string;
|
|
@@ -6,9 +6,11 @@ export declare class Radio {
|
|
|
6
6
|
name?: string;
|
|
7
7
|
value?: string;
|
|
8
8
|
required?: boolean;
|
|
9
|
+
selectedValue?: string;
|
|
9
10
|
styled?: boolean;
|
|
10
11
|
id: string;
|
|
11
12
|
radioChange: EventEmitter<string | boolean>;
|
|
12
13
|
private onChange;
|
|
14
|
+
private get isChecked();
|
|
13
15
|
render(): any;
|
|
14
16
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
1
2
|
export declare class Toggle {
|
|
2
3
|
checked?: boolean;
|
|
3
4
|
description?: string;
|
|
@@ -7,5 +8,7 @@ export declare class Toggle {
|
|
|
7
8
|
name?: string;
|
|
8
9
|
variant?: 'default' | 'small';
|
|
9
10
|
id: string;
|
|
11
|
+
toggleChange: EventEmitter<boolean>;
|
|
12
|
+
private onChange;
|
|
10
13
|
render(): any;
|
|
11
14
|
}
|
|
@@ -1430,19 +1430,23 @@ export namespace Components {
|
|
|
1430
1430
|
*/
|
|
1431
1431
|
"disabled"?: boolean;
|
|
1432
1432
|
/**
|
|
1433
|
-
* The name attribute for the html input. (
|
|
1433
|
+
* The name attribute for the html input. (submitted in form as name/value pair)
|
|
1434
1434
|
*/
|
|
1435
1435
|
"name"?: string;
|
|
1436
1436
|
/**
|
|
1437
1437
|
* Whether the input is required
|
|
1438
1438
|
*/
|
|
1439
1439
|
"required"?: boolean;
|
|
1440
|
+
/**
|
|
1441
|
+
* The currently selected value for the radio group this radio belongs to. When set, the radio renders as checked when `selectedValue` equals its own `value` prop. Use this to drive radio-group selection from a single source of truth — e.g. Vue `v-model` on a shared `selectedValue` across every radio in a group, where each radio still declares its own `value`. Falls back to the boolean `checked` prop when not set.
|
|
1442
|
+
*/
|
|
1443
|
+
"selectedValue"?: string;
|
|
1440
1444
|
/**
|
|
1441
1445
|
* Whether the input is contained in a box with a border and, in disabled state, a background
|
|
1442
1446
|
*/
|
|
1443
1447
|
"styled"?: boolean;
|
|
1444
1448
|
/**
|
|
1445
|
-
* The value attribute for the radio input. (
|
|
1449
|
+
* The value attribute for the radio input. (submitted in form as name/value pair)
|
|
1446
1450
|
*/
|
|
1447
1451
|
"value"?: string;
|
|
1448
1452
|
}
|
|
@@ -1921,7 +1925,7 @@ export namespace Components {
|
|
|
1921
1925
|
*/
|
|
1922
1926
|
"label"?: string;
|
|
1923
1927
|
/**
|
|
1924
|
-
* The name attribute for the html input. (
|
|
1928
|
+
* The name attribute for the html input. (submitted in form as name/value pair)
|
|
1925
1929
|
*/
|
|
1926
1930
|
"name"?: string;
|
|
1927
1931
|
/**
|
|
@@ -2188,6 +2192,10 @@ export interface XplTagCustomEvent<T> extends CustomEvent<T> {
|
|
|
2188
2192
|
detail: T;
|
|
2189
2193
|
target: HTMLXplTagElement;
|
|
2190
2194
|
}
|
|
2195
|
+
export interface XplToggleCustomEvent<T> extends CustomEvent<T> {
|
|
2196
|
+
detail: T;
|
|
2197
|
+
target: HTMLXplToggleElement;
|
|
2198
|
+
}
|
|
2191
2199
|
export interface XplTopNavCustomEvent<T> extends CustomEvent<T> {
|
|
2192
2200
|
detail: T;
|
|
2193
2201
|
target: HTMLXplTopNavElement;
|
|
@@ -2305,7 +2313,7 @@ declare global {
|
|
|
2305
2313
|
new (): HTMLXplCalendarElement;
|
|
2306
2314
|
};
|
|
2307
2315
|
interface HTMLXplCheckboxElementEventMap {
|
|
2308
|
-
"checkboxChange":
|
|
2316
|
+
"checkboxChange": boolean;
|
|
2309
2317
|
}
|
|
2310
2318
|
interface HTMLXplCheckboxElement extends Components.XplCheckbox, HTMLStencilElement {
|
|
2311
2319
|
addEventListener<K extends keyof HTMLXplCheckboxElementEventMap>(type: K, listener: (this: HTMLXplCheckboxElement, ev: XplCheckboxCustomEvent<HTMLXplCheckboxElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -2452,11 +2460,11 @@ declare global {
|
|
|
2452
2460
|
new (): HTMLXplIconElement;
|
|
2453
2461
|
};
|
|
2454
2462
|
interface HTMLXplInputElementEventMap {
|
|
2455
|
-
"focusEvent": FocusEvent;
|
|
2456
2463
|
"blurEvent": FocusEvent;
|
|
2457
|
-
"
|
|
2464
|
+
"focusEvent": FocusEvent;
|
|
2458
2465
|
"inputEvent": string;
|
|
2459
2466
|
"search": string;
|
|
2467
|
+
"valueChange": string;
|
|
2460
2468
|
}
|
|
2461
2469
|
interface HTMLXplInputElement extends Components.XplInput, HTMLStencilElement {
|
|
2462
2470
|
addEventListener<K extends keyof HTMLXplInputElementEventMap>(type: K, listener: (this: HTMLXplInputElement, ev: XplInputCustomEvent<HTMLXplInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -2989,7 +2997,18 @@ declare global {
|
|
|
2989
2997
|
prototype: HTMLXplToastElement;
|
|
2990
2998
|
new (): HTMLXplToastElement;
|
|
2991
2999
|
};
|
|
3000
|
+
interface HTMLXplToggleElementEventMap {
|
|
3001
|
+
"toggleChange": boolean;
|
|
3002
|
+
}
|
|
2992
3003
|
interface HTMLXplToggleElement extends Components.XplToggle, HTMLStencilElement {
|
|
3004
|
+
addEventListener<K extends keyof HTMLXplToggleElementEventMap>(type: K, listener: (this: HTMLXplToggleElement, ev: XplToggleCustomEvent<HTMLXplToggleElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3005
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3006
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3007
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
3008
|
+
removeEventListener<K extends keyof HTMLXplToggleElementEventMap>(type: K, listener: (this: HTMLXplToggleElement, ev: XplToggleCustomEvent<HTMLXplToggleElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
3009
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3010
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3011
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2993
3012
|
}
|
|
2994
3013
|
var HTMLXplToggleElement: {
|
|
2995
3014
|
prototype: HTMLXplToggleElement;
|
|
@@ -3539,9 +3558,9 @@ declare namespace LocalJSX {
|
|
|
3539
3558
|
*/
|
|
3540
3559
|
"name"?: string;
|
|
3541
3560
|
/**
|
|
3542
|
-
*
|
|
3561
|
+
* Emits the new checked state of the checkbox after a user interaction. Always emits a boolean so the event payload reliably represents whether the checkbox is now on or off. This is what Vue `v-model` binds to via the `checked` attribute — emitting the `value` string here would coerce any non-empty string to `true` and make it impossible to uncheck a checkbox that has a `value` prop set. Consumers that need the `value` can read it from the host element (`event.target.value`) or rely on native form submission (`name`/`value` pair).
|
|
3543
3562
|
*/
|
|
3544
|
-
"onCheckboxChange"?: (event: XplCheckboxCustomEvent<
|
|
3563
|
+
"onCheckboxChange"?: (event: XplCheckboxCustomEvent<boolean>) => void;
|
|
3545
3564
|
/**
|
|
3546
3565
|
* Whether the input is required
|
|
3547
3566
|
*/
|
|
@@ -4725,7 +4744,7 @@ declare namespace LocalJSX {
|
|
|
4725
4744
|
*/
|
|
4726
4745
|
"disabled"?: boolean;
|
|
4727
4746
|
/**
|
|
4728
|
-
* The name attribute for the html input. (
|
|
4747
|
+
* The name attribute for the html input. (submitted in form as name/value pair)
|
|
4729
4748
|
*/
|
|
4730
4749
|
"name"?: string;
|
|
4731
4750
|
/**
|
|
@@ -4736,12 +4755,16 @@ declare namespace LocalJSX {
|
|
|
4736
4755
|
* Whether the input is required
|
|
4737
4756
|
*/
|
|
4738
4757
|
"required"?: boolean;
|
|
4758
|
+
/**
|
|
4759
|
+
* The currently selected value for the radio group this radio belongs to. When set, the radio renders as checked when `selectedValue` equals its own `value` prop. Use this to drive radio-group selection from a single source of truth — e.g. Vue `v-model` on a shared `selectedValue` across every radio in a group, where each radio still declares its own `value`. Falls back to the boolean `checked` prop when not set.
|
|
4760
|
+
*/
|
|
4761
|
+
"selectedValue"?: string;
|
|
4739
4762
|
/**
|
|
4740
4763
|
* Whether the input is contained in a box with a border and, in disabled state, a background
|
|
4741
4764
|
*/
|
|
4742
4765
|
"styled"?: boolean;
|
|
4743
4766
|
/**
|
|
4744
|
-
* The value attribute for the radio input. (
|
|
4767
|
+
* The value attribute for the radio input. (submitted in form as name/value pair)
|
|
4745
4768
|
*/
|
|
4746
4769
|
"value"?: string;
|
|
4747
4770
|
}
|
|
@@ -5282,9 +5305,13 @@ declare namespace LocalJSX {
|
|
|
5282
5305
|
*/
|
|
5283
5306
|
"label"?: string;
|
|
5284
5307
|
/**
|
|
5285
|
-
* The name attribute for the html input. (
|
|
5308
|
+
* The name attribute for the html input. (submitted in form as name/value pair)
|
|
5286
5309
|
*/
|
|
5287
5310
|
"name"?: string;
|
|
5311
|
+
/**
|
|
5312
|
+
* Emitted when the toggle checked state changes. Detail is the new `checked` value.
|
|
5313
|
+
*/
|
|
5314
|
+
"onToggleChange"?: (event: XplToggleCustomEvent<boolean>) => void;
|
|
5288
5315
|
/**
|
|
5289
5316
|
* The size of the toggle -- `default` or `small`
|
|
5290
5317
|
* @default 'default'
|
|
@@ -5803,6 +5830,7 @@ declare namespace LocalJSX {
|
|
|
5803
5830
|
"name": string;
|
|
5804
5831
|
"value": string;
|
|
5805
5832
|
"required": boolean;
|
|
5833
|
+
"selectedValue": string;
|
|
5806
5834
|
"styled": boolean;
|
|
5807
5835
|
}
|
|
5808
5836
|
interface XplSelectAttributes {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xplortech/apollo-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/types/components.d.ts",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"build:css": "cross-env NODE_ENV=production postcss src/style.css -o build/style.css && npm-run-all build-partial:css.*",
|
|
67
67
|
"build-partial:css.react": "cp build/style.css ../apollo-react/css/apollo.css",
|
|
68
68
|
"build-partial:css.storybook": "cp -r build/ .storybook/build",
|
|
69
|
+
"build-partial:css.vue": "cp build/style.css ../apollo-vue/css/apollo.css",
|
|
69
70
|
"build:stencil": "node ../../scripts/generate-icon-docs.mjs && stencil build --docs --prod && cp -r dist .storybook && cp -r loader .storybook && node .storybook/patch-stencil-sourcemaps.mjs",
|
|
70
71
|
"postbuild": "node ../../scripts/copy-readmes-to-dist.mjs",
|
|
71
72
|
"clean": "rm -rf dist/ loader/ storybook-static/ www/ build/ src/components/components.d.ts",
|
|
@@ -103,6 +104,7 @@
|
|
|
103
104
|
"@mdx-js/react": "^3.1.1",
|
|
104
105
|
"@stencil/core": "^4.31.0",
|
|
105
106
|
"@stencil/react-output-target": "0.5.3",
|
|
107
|
+
"@stencil/vue-output-target": "^0.13.1",
|
|
106
108
|
"@storybook/addon-a11y": "^10.1.3",
|
|
107
109
|
"@storybook/addon-designs": "^11.1.1",
|
|
108
110
|
"@storybook/addon-docs": "^10.1.3",
|
|
@@ -115,8 +117,8 @@
|
|
|
115
117
|
"@vitest/browser-playwright": "^4.0.13",
|
|
116
118
|
"@vitest/coverage-v8": "^4.0.13",
|
|
117
119
|
"@vueless/storybook-dark-mode": "^10.0.3",
|
|
118
|
-
"@xplortech/apollo-foundation": "
|
|
119
|
-
"@xplortech/apollo-icons": "
|
|
120
|
+
"@xplortech/apollo-foundation": "1.0.1",
|
|
121
|
+
"@xplortech/apollo-icons": "0.4.0",
|
|
120
122
|
"auto-changelog": "^2.3.0",
|
|
121
123
|
"autoprefixer": "^10.4.16",
|
|
122
124
|
"cross-env": "^7.0.3",
|
|
@@ -165,6 +167,29 @@
|
|
|
165
167
|
"scope:core",
|
|
166
168
|
"type:lib",
|
|
167
169
|
"platform:web"
|
|
168
|
-
]
|
|
170
|
+
],
|
|
171
|
+
"implicitDependencies": [
|
|
172
|
+
"@xplortech/apollo-icons",
|
|
173
|
+
"@xplortech/apollo-foundation"
|
|
174
|
+
],
|
|
175
|
+
"targets": {
|
|
176
|
+
"build": {
|
|
177
|
+
"outputs": [
|
|
178
|
+
"{projectRoot}/build",
|
|
179
|
+
"{projectRoot}/dist",
|
|
180
|
+
"{projectRoot}/loader",
|
|
181
|
+
"{projectRoot}/www",
|
|
182
|
+
"{projectRoot}/.typings/apollo-components.html-data.json",
|
|
183
|
+
"{projectRoot}/.storybook/build",
|
|
184
|
+
"{projectRoot}/.storybook/dist",
|
|
185
|
+
"{projectRoot}/.storybook/loader",
|
|
186
|
+
"{projectRoot}/src/components/components.d.ts",
|
|
187
|
+
"{workspaceRoot}/packages/apollo-react/src/components.ts",
|
|
188
|
+
"{workspaceRoot}/packages/apollo-react/css/apollo.css",
|
|
189
|
+
"{workspaceRoot}/packages/apollo-vue/src/components.ts",
|
|
190
|
+
"{workspaceRoot}/packages/apollo-vue/css/apollo.css"
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
}
|
|
169
194
|
}
|
|
170
195
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as e,H as l}from"./p-C7bgJs6C.js";import{v as t}from"./p-Cqlsd6nf.js";const a=class{constructor(e){s(this,e),this.variant="default",this.id=t()}render(){let s="xpl-toggle-container";this.disabled&&(s+=" xpl-toggle-container--disabled");let t="xpl-toggle";return"small"===this.variant&&(t+=" xpl-toggle--small"),e(l,{key:"0cf2e99934bbe447559fbe88cc61989bbfabbdea",class:s},(this.heading||this.description)&&e("label",{key:"7ab6e5535b8d88a5aabb5ced76faca68b2a8abcd",class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},this.heading,this.description&&e("small",{key:"0b8157e097f3890d6c521c399cf1f9c25514e341",class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)),e("input",{key:"3bcfe674974e16e50a38d17836da0aa1c49fd6dc",class:t,type:"checkbox",checked:this.checked,disabled:this.disabled,id:this.id,name:this.name}),this.label&&e("label",{key:"cc91cdb86fb6bb4c7bfbabb6d47edf03adb53857",htmlFor:this.id},this.label))}};export{a as xpl_toggle}
|