@swc-react/switch 1.5.0 → 1.7.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/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 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;",
4
+ "sourcesContent": ["/*\nCopyright 2025 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*/\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": ";AAWA,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.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 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",
4
+ "sourcesContent": ["/*\nCopyright 2025 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*/\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": "aAWA,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,3 +1,3 @@
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" | "selfManageFocusElement" | "renderOptions" | "isLTR" | "hasVisibleFocusInTree" | "handleChange"> & {
1
+ export declare const Switch: import("react").ComponentType<Omit<import("react").HTMLAttributes<import("switch/src/Switch.js").Switch>, "size" | "change" | "disabled" | "checked" | "name" | "readonly" | "inputElement" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "connectedCallback" | "disconnectedCallback" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "emphasized" | "focusElement" | "selfManageFocusElement" | "renderOptions" | "isLTR" | "hasVisibleFocusInTree" | "handleChange"> & {
2
2
  change?: ((e: Event) => void) | undefined;
3
- } & Partial<Omit<import("switch/src").Switch, keyof HTMLElement>> & import("react").RefAttributes<import("switch/src").Switch>>;
3
+ } & Partial<Omit<import("switch/src/Switch.js").Switch, keyof HTMLElement>> & import("react").RefAttributes<import("switch/src/Switch.js").Switch>>;
package/next.dev.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  import dynamic from "next/dynamic";
3
- export const Switch = dynamic(() => import(".").then(({ Switch: Switch2 }) => Switch2), { ssr: false });
3
+ export const Switch = dynamic(() => import("./index.dev.js").then(({ Switch: Switch2 }) => Switch2), { ssr: false });
4
4
  //# sourceMappingURL=next.dev.js.map
package/next.dev.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["next.ts"],
4
- "sourcesContent": ["/*\nCopyright 2023 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 { ComponentProps } from 'react';\nimport dynamic from 'next/dynamic';\n\nimport { Switch as SpSwitch } from '.';\n\nexport const Switch = dynamic<\n JSX.LibraryManagedAttributes<\n typeof SpSwitch,\n ComponentProps<typeof SpSwitch>\n >\n>(() => import('.').then(({ Switch }) => Switch), { ssr: false });\n"],
5
- "mappings": ";AAaA,OAAO,aAAa;AAIb,aAAM,SAAS,QAKpB,MAAM,OAAO,GAAG,EAAE,KAAK,CAAC,EAAE,QAAAA,QAAO,MAAMA,OAAM,GAAG,EAAE,KAAK,MAAM,CAAC;",
4
+ "sourcesContent": ["/*\nCopyright 2025 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*/\nimport { ComponentProps } from 'react';\nimport dynamic from 'next/dynamic';\n\nimport { Switch as SpSwitch } from './index.dev.js'\n\nexport const Switch = dynamic<\n JSX.LibraryManagedAttributes<\n typeof SpSwitch,\n ComponentProps<typeof SpSwitch>\n >\n>(() => import('./index.dev.js').then(({ Switch }) => Switch), { ssr: false });\n"],
5
+ "mappings": ";AAYA,OAAO,aAAa;AAIb,aAAM,SAAS,QAKpB,MAAM,OAAO,gBAAgB,EAAE,KAAK,CAAC,EAAE,QAAAA,QAAO,MAAMA,OAAM,GAAG,EAAE,KAAK,MAAM,CAAC;",
6
6
  "names": ["Switch"]
7
7
  }
package/next.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";import o from"next/dynamic";export const Switch=o(()=>import(".").then(({Switch:t})=>t),{ssr:!1});
1
+ "use strict";import o from"next/dynamic";export const Switch=o(()=>import("./index.js").then(({Switch:t})=>t),{ssr:!1});
2
2
  //# sourceMappingURL=next.js.map
package/next.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["next.ts"],
4
- "sourcesContent": ["/*\nCopyright 2023 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 { ComponentProps } from 'react';\nimport dynamic from 'next/dynamic';\n\nimport { Switch as SpSwitch } from '.';\n\nexport const Switch = dynamic<\n JSX.LibraryManagedAttributes<\n typeof SpSwitch,\n ComponentProps<typeof SpSwitch>\n >\n>(() => import('.').then(({ Switch }) => Switch), { ssr: false });\n"],
5
- "mappings": "aAaA,OAAOA,MAAa,eAIb,aAAM,OAASA,EAKpB,IAAM,OAAO,GAAG,EAAE,KAAK,CAAC,CAAE,OAAAC,CAAO,IAAMA,CAAM,EAAG,CAAE,IAAK,EAAM,CAAC",
4
+ "sourcesContent": ["/*\nCopyright 2025 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*/\nimport { ComponentProps } from 'react';\nimport dynamic from 'next/dynamic';\n\nimport { Switch as SpSwitch } from './index.js';\n\nexport const Switch = dynamic<\n JSX.LibraryManagedAttributes<\n typeof SpSwitch,\n ComponentProps<typeof SpSwitch>\n >\n>(() => import('./index.js').then(({ Switch }) => Switch), { ssr: false });\n"],
5
+ "mappings": "aAYA,OAAOA,MAAa,eAIb,aAAM,OAASA,EAKpB,IAAM,OAAO,YAAY,EAAE,KAAK,CAAC,CAAE,OAAAC,CAAO,IAAMA,CAAM,EAAG,CAAE,IAAK,EAAM,CAAC",
6
6
  "names": ["dynamic", "Switch"]
7
7
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@swc-react/switch",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "description": "React and Next.js wrapper of the @spectrum-web-components/switch component",
8
8
  "license": "Apache-2.0",
9
- "author": "",
9
+ "author": "Adobe",
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@lit/react": "^1.0.2",
29
- "@spectrum-web-components/switch": "^1.5.0"
29
+ "@spectrum-web-components/switch": "^1.7.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "next": "~13.4 || ~14"