@synergy-design-system/react 1.0.0-main.16 → 1.0.0-main.18
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/chunks/chunk.TOR523VV.js +24 -0
- package/dist/chunks/chunk.TOR523VV.js.map +7 -0
- package/dist/components/switch.d.ts +38 -0
- package/dist/components/switch.js +7 -0
- package/dist/components/switch.js.map +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// ../react/src/components/switch.ts
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { createComponent } from "@lit/react";
|
|
4
|
+
import Component from "@synergy-design-system/components/components/switch/switch.component.js";
|
|
5
|
+
var tagName = "syn-switch";
|
|
6
|
+
Component.define("syn-switch");
|
|
7
|
+
var SynSwitch = createComponent({
|
|
8
|
+
displayName: "SynSwitch",
|
|
9
|
+
elementClass: Component,
|
|
10
|
+
events: {
|
|
11
|
+
onSynBlur: "syn-blur",
|
|
12
|
+
onSynChange: "syn-change",
|
|
13
|
+
onSynInput: "syn-input",
|
|
14
|
+
onSynFocus: "syn-focus",
|
|
15
|
+
onSynInvalid: "syn-invalid"
|
|
16
|
+
},
|
|
17
|
+
react: React,
|
|
18
|
+
tagName
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
SynSwitch
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk.TOR523VV.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/switch.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED @synergy-design-system/react wrappers for @synergy-design-system/components\n// Please do not edit this file directly!\n// It will get recreated when running pnpm build.\n// ---------------------------------------------------------------------\nimport * as React from 'react';\nimport { createComponent } from '@lit/react';\nimport Component from '@synergy-design-system/components/components/switch/switch.component.js';\n\nimport { type EventName } from '@lit/react';\nimport type {\n SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInvalidEvent,\n} from '@synergy-design-system/components';\n\nconst tagName = 'syn-switch';\nComponent.define('syn-switch');\n\n/**\n * @summary Switches allow the user to toggle an option on or off.\n * @documentation https://synergy.style/components/switch\n * @status stable\n * @since 2.0\n *\n * @slot - The switch's label.\n *\n * @event syn-blur - Emitted when the control loses focus.\n * @event syn-change - Emitted when the control's checked state changes.\n * @event syn-input - Emitted when the control receives input.\n * @event syn-focus - Emitted when the control gains focus.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The control that houses the switch's thumb.\n * @csspart thumb - The switch's thumb.\n * @csspart label - The switch's label.\n *\n * @cssproperty --width - The width of the switch.\n * @cssproperty --height - The height of the switch.\n * @cssproperty --thumb-size - The size of the thumb.\n */\nexport const SynSwitch = createComponent({\n displayName: 'SynSwitch',\n elementClass: Component,\n events: {\n onSynBlur: 'syn-blur' as EventName<SynBlurEvent>,\n onSynChange: 'syn-change' as EventName<SynChangeEvent>,\n onSynInput: 'syn-input' as EventName<SynInputEvent>,\n onSynFocus: 'syn-focus' as EventName<SynFocusEvent>,\n onSynInvalid: 'syn-invalid' as EventName<SynInvalidEvent>,\n },\n react: React,\n tagName,\n});\n\nexport type { SynBlurEvent } from '@synergy-design-system/components';\nexport type { SynChangeEvent } from '@synergy-design-system/components';\nexport type { SynInputEvent } from '@synergy-design-system/components';\nexport type { SynFocusEvent } from '@synergy-design-system/components';\nexport type { SynInvalidEvent } from '@synergy-design-system/components';\n"],
|
|
5
|
+
"mappings": ";AAKA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,OAAO,eAAe;AAOtB,IAAM,UAAU;AAChB,UAAU,OAAO,YAAY;AAyBtB,IAAM,YAAY,gBAAgB;AAAA,EACvC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,QAAQ;AAAA,IACN,WAAW;AAAA,IACX,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,OAAO;AAAA,EACP;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Component from '@synergy-design-system/components/components/switch/switch.component.js';
|
|
2
|
+
import { type EventName } from '@lit/react';
|
|
3
|
+
import type { SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInvalidEvent } from '@synergy-design-system/components';
|
|
4
|
+
/**
|
|
5
|
+
* @summary Switches allow the user to toggle an option on or off.
|
|
6
|
+
* @documentation https://synergy.style/components/switch
|
|
7
|
+
* @status stable
|
|
8
|
+
* @since 2.0
|
|
9
|
+
*
|
|
10
|
+
* @slot - The switch's label.
|
|
11
|
+
*
|
|
12
|
+
* @event syn-blur - Emitted when the control loses focus.
|
|
13
|
+
* @event syn-change - Emitted when the control's checked state changes.
|
|
14
|
+
* @event syn-input - Emitted when the control receives input.
|
|
15
|
+
* @event syn-focus - Emitted when the control gains focus.
|
|
16
|
+
* @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.
|
|
17
|
+
*
|
|
18
|
+
* @csspart base - The component's base wrapper.
|
|
19
|
+
* @csspart control - The control that houses the switch's thumb.
|
|
20
|
+
* @csspart thumb - The switch's thumb.
|
|
21
|
+
* @csspart label - The switch's label.
|
|
22
|
+
*
|
|
23
|
+
* @cssproperty --width - The width of the switch.
|
|
24
|
+
* @cssproperty --height - The height of the switch.
|
|
25
|
+
* @cssproperty --thumb-size - The size of the thumb.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SynSwitch: import("@lit/react").ReactWebComponent<Component, {
|
|
28
|
+
onSynBlur: EventName<SynBlurEvent>;
|
|
29
|
+
onSynChange: EventName<SynChangeEvent>;
|
|
30
|
+
onSynInput: EventName<SynInputEvent>;
|
|
31
|
+
onSynFocus: EventName<SynFocusEvent>;
|
|
32
|
+
onSynInvalid: EventName<SynInvalidEvent>;
|
|
33
|
+
}>;
|
|
34
|
+
export type { SynBlurEvent } from '@synergy-design-system/components';
|
|
35
|
+
export type { SynChangeEvent } from '@synergy-design-system/components';
|
|
36
|
+
export type { SynInputEvent } from '@synergy-design-system/components';
|
|
37
|
+
export type { SynFocusEvent } from '@synergy-design-system/components';
|
|
38
|
+
export type { SynInvalidEvent } from '@synergy-design-system/components';
|
package/dist/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export { SynInput } from './components/input.js';
|
|
|
6
6
|
export { SynRadio } from './components/radio.js';
|
|
7
7
|
export { SynRadioButton } from './components/radio-button.js';
|
|
8
8
|
export { SynRadioGroup } from './components/radio-group.js';
|
|
9
|
+
export { SynSwitch } from './components/switch.js';
|
|
9
10
|
export { SynTextarea } from './components/textarea.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SynRadio
|
|
3
3
|
} from "./chunks/chunk.AFCMSVBY.js";
|
|
4
|
+
import {
|
|
5
|
+
SynSwitch
|
|
6
|
+
} from "./chunks/chunk.TOR523VV.js";
|
|
4
7
|
import {
|
|
5
8
|
SynTextarea
|
|
6
9
|
} from "./chunks/chunk.4YY6TGIA.js";
|
|
@@ -34,6 +37,7 @@ export {
|
|
|
34
37
|
SynRadio,
|
|
35
38
|
SynRadioButton,
|
|
36
39
|
SynRadioGroup,
|
|
40
|
+
SynSwitch,
|
|
37
41
|
SynTextarea
|
|
38
42
|
};
|
|
39
43
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@lit/react": "^1.0.0",
|
|
8
|
-
"@synergy-design-system/components": "^1.0.0-main.
|
|
8
|
+
"@synergy-design-system/components": "^1.0.0-main.18"
|
|
9
9
|
},
|
|
10
10
|
"description": "React wrappers for the Synergy Design System",
|
|
11
11
|
"exports": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"directory": "packages/react"
|
|
41
41
|
},
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "1.0.0-main.
|
|
43
|
+
"version": "1.0.0-main.18",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/react": "^18.2.31",
|
|
46
46
|
"react": "^18.2.0"
|