@swc-react/switch 0.40.3 → 0.40.5

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/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
+ import type { EventName } from '@lit/react';
1
2
  import { Switch as SpSwitch } from '@spectrum-web-components/switch';
2
3
  import '@spectrum-web-components/switch/sp-switch.js';
3
- export declare const Switch: import("@lit/react").ReactWebComponent<SpSwitch, {}>;
4
+ export declare const Switch: import("@lit/react").ReactWebComponent<SpSwitch, {
5
+ change: EventName<Event>;
6
+ }>;
4
7
  export declare type SwitchType = EventTarget & SpSwitch;
package/index.dev.js CHANGED
@@ -8,6 +8,9 @@ export const Switch = createComponent({
8
8
  elementClass: SpSwitch,
9
9
  react: React,
10
10
  tagName: "sp-switch",
11
- events: {}
11
+ events: {
12
+ change: "change"
13
+ // Announces a change in the `checked` property of a Switch
14
+ }
12
15
  });
13
16
  //# sourceMappingURL=index.dev.js.map
package/index.dev.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["index.ts"],
4
- "sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport * as React from 'react';\nimport { createComponent } from '@lit/react';\nimport { Switch as SpSwitch } from '@spectrum-web-components/switch';\n\nimport '@spectrum-web-components/switch/sp-switch.js';\n\nexport const Switch = createComponent({\n displayName: 'Switch',\n elementClass: SpSwitch,\n react: React,\n tagName: 'sp-switch',\n events: {},\n});\n\nexport type SwitchType = EventTarget & SpSwitch;\n"],
5
- "mappings": ";AAYA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAChC,SAAS,UAAU,gBAAgB;AAEnC,OAAO;AAEA,aAAM,SAAS,gBAAgB;AAAA,EAClC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ,CAAC;AACb,CAAC;",
4
+ "sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport * as React from 'react';\nimport { createComponent } from '@lit/react';\nimport type { EventName } from '@lit/react';\nimport { Switch as SpSwitch } from '@spectrum-web-components/switch';\n\nimport '@spectrum-web-components/switch/sp-switch.js';\n\nexport const Switch = createComponent({\n displayName: 'Switch',\n elementClass: SpSwitch,\n react: React,\n tagName: 'sp-switch',\n events: {\n change: 'change' as EventName<Event>, // Announces a change in the `checked` property of a Switch\n },\n});\n\nexport type SwitchType = EventTarget & SpSwitch;\n"],
5
+ "mappings": ";AAYA,YAAY,WAAW;AACvB,SAAS,uBAAuB;AAEhC,SAAS,UAAU,gBAAgB;AAEnC,OAAO;AAEA,aAAM,SAAS,gBAAgB;AAAA,EAClC,aAAa;AAAA,EACb,cAAc;AAAA,EACd,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,IACJ,QAAQ;AAAA;AAAA,EACZ;AACJ,CAAC;",
6
6
  "names": []
7
7
  }
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";import*as t from"react";import{createComponent as e}from"@lit/react";import{Switch as p}from"@spectrum-web-components/switch";import"@spectrum-web-components/switch/sp-switch.js";export const Switch=e({displayName:"Switch",elementClass:p,react:t,tagName:"sp-switch",events:{}});
1
+ "use strict";import*as t from"react";import{createComponent as e}from"@lit/react";import{Switch as a}from"@spectrum-web-components/switch";import"@spectrum-web-components/switch/sp-switch.js";export const Switch=e({displayName:"Switch",elementClass:a,react:t,tagName:"sp-switch",events:{change:"change"}});
2
2
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["index.ts"],
4
- "sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport * as React from 'react';\nimport { createComponent } from '@lit/react';\nimport { Switch as SpSwitch } from '@spectrum-web-components/switch';\n\nimport '@spectrum-web-components/switch/sp-switch.js';\n\nexport const Switch = createComponent({\n displayName: 'Switch',\n elementClass: SpSwitch,\n react: React,\n tagName: 'sp-switch',\n events: {},\n});\n\nexport type SwitchType = EventTarget & SpSwitch;\n"],
5
- "mappings": "aAYA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,MAAuB,aAChC,OAAS,UAAUC,MAAgB,kCAEnC,MAAO,+CAEA,aAAM,OAASD,EAAgB,CAClC,YAAa,SACb,aAAcC,EACd,MAAOF,EACP,QAAS,YACT,OAAQ,CAAC,CACb,CAAC",
4
+ "sourcesContent": ["/*\nCopyright 2022 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport * as React from 'react';\nimport { createComponent } from '@lit/react';\nimport type { EventName } from '@lit/react';\nimport { Switch as SpSwitch } from '@spectrum-web-components/switch';\n\nimport '@spectrum-web-components/switch/sp-switch.js';\n\nexport const Switch = createComponent({\n displayName: 'Switch',\n elementClass: SpSwitch,\n react: React,\n tagName: 'sp-switch',\n events: {\n change: 'change' as EventName<Event>, // Announces a change in the `checked` property of a Switch\n },\n});\n\nexport type SwitchType = EventTarget & SpSwitch;\n"],
5
+ "mappings": "aAYA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,MAAuB,aAEhC,OAAS,UAAUC,MAAgB,kCAEnC,MAAO,+CAEA,aAAM,OAASD,EAAgB,CAClC,YAAa,SACb,aAAcC,EACd,MAAOF,EACP,QAAS,YACT,OAAQ,CACJ,OAAQ,QACZ,CACJ,CAAC",
6
6
  "names": ["React", "createComponent", "SpSwitch"]
7
7
  }
package/next.d.ts CHANGED
@@ -1 +1,3 @@
1
- export declare const Switch: import("react").ComponentType<Omit<import("react").HTMLAttributes<import("switch/src").Switch>, "size" | "disabled" | "checked" | "name" | "readonly" | "inputElement" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "emphasized" | "focusElement" | "renderOptions" | "isLTR" | "hasVisibleFocusInTree" | "handleChange"> & {} & Partial<Omit<import("switch/src").Switch, keyof HTMLElement>> & import("react").RefAttributes<import("switch/src").Switch>>;
1
+ export declare const Switch: import("react").ComponentType<Omit<import("react").HTMLAttributes<import("switch/src").Switch>, "size" | "change" | "disabled" | "checked" | "name" | "readonly" | "inputElement" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "emphasized" | "focusElement" | "renderOptions" | "isLTR" | "hasVisibleFocusInTree" | "handleChange"> & {
2
+ change?: ((e: Event) => void) | undefined;
3
+ } & Partial<Omit<import("switch/src").Switch, keyof HTMLElement>> & import("react").RefAttributes<import("switch/src").Switch>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc-react/switch",
3
- "version": "0.40.3",
3
+ "version": "0.40.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,7 +30,7 @@
30
30
  ],
31
31
  "dependencies": {
32
32
  "@lit/react": "^1.0.2",
33
- "@spectrum-web-components/switch": "^0.40.3"
33
+ "@spectrum-web-components/switch": "^0.40.5"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "next": "~13.4 || ~14.0"
@@ -40,5 +40,5 @@
40
40
  "optional": true
41
41
  }
42
42
  },
43
- "gitHead": "76467a3470aeafa4beefce1e4fc76341f1d6733f"
43
+ "gitHead": "2e0006478841b07af63c19a0167a136bf724d064"
44
44
  }