@stackshift-ui/swiper-button 7.0.0-beta.0 → 7.0.0-beta.2

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.
@@ -0,0 +1 @@
1
+ import{Button as d}from"@stackshift-ui/button";import{useStackShiftUIComponents as u}from"@stackshift-ui/system";import g from"classnames";import{jsx as t}from"react/jsx-runtime";var n="SwiperButton",h=({variant:e="variant_a",type:s="left",onClick:i,ariaLabel:l,children:o,className:p,as:f,...m})=>{let{[n]:c=d}=u(),w={variant_a:a,variant_b:C}[e]||a,r="inline-block p-2 text-primary rounded-full shadow focus:outline-none",v={variant_a:r,variant_b:r}[e];return t(c,{variant:"unstyled",onClick:i,className:g(v,p),"data-testid":n.toLowerCase(),"aria-label":l,...m,children:o||t(w,{type:s})})};h.displayName=n;var a=({type:e})=>e==="right"?t("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})}):t("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),C=({type:e})=>e==="left"?t("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:t("path",{d:"M9 16.0185C9.268 16.2905 9.268 16.7275 9 16.9975C8.732 17.2675 8.299 17.2685 8.031 16.9975L0.201 9.0895C-0.067 8.8195 -0.067 8.3825 0.201 8.1105L8.031 0.2025C8.299 -0.0675 8.732 -0.0675 9 0.2025C9.268 0.4735 9.268 0.9115 9 1.1815L1.859 8.6005L9 16.0185Z",fill:"#0045d8"})}):t("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:t("path",{d:"M0.19922 1.1817C-0.0687795 0.909696 -0.0687794 0.472695 0.19922 0.202695C0.46722 -0.0673054 0.90022 -0.0683048 1.16822 0.202695L8.99822 8.11069C9.26622 8.3807 9.26622 8.81769 8.99822 9.08969L1.16822 16.9977C0.900219 17.2677 0.467218 17.2677 0.199219 16.9977C-0.0687809 16.7267 -0.0687808 16.2887 0.199219 16.0187L7.34022 8.5997L0.19922 1.1817Z",fill:"#0045d8"})});export{h as a};
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";var L=Object.create;var s=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var N=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of y(e))!B.call(t,r)&&r!==o&&s(t,r,{get:()=>e[r],enumerable:!(a=k(e,r))||a.enumerable});return t};var b=(t,e,o)=>(o=t!=null?L(x(t)):{},p(e||!t||!t.__esModule?s(o,"default",{value:t,enumerable:!0}):o,t)),M=t=>p(s({},"__esModule",{value:!0}),t);var S={};N(S,{SwiperButton:()=>d});module.exports=M(S);var c=require("@stackshift-ui/button"),w=require("@stackshift-ui/system"),v=b(require("classnames")),n=require("react/jsx-runtime"),i="SwiperButton",d=({variant:t="variant_a",type:e="left",onClick:o,ariaLabel:a,children:r,className:u,as:V,...g})=>{let{[i]:h=c.Button}=(0,w.useStackShiftUIComponents)(),C={variant_a:m,variant_b:P}[t]||m,l="inline-block p-2 text-primary rounded-full shadow focus:outline-none",f={variant_a:l,variant_b:l}[t];return(0,n.jsx)(h,{as:"button",variant:"unstyled",onClick:o,className:(0,v.default)(f,u),"data-testid":i.toLowerCase(),ariaLabel:a,...g,children:r||(0,n.jsx)(C,{type:e})})};d.displayName=i;var m=({type:t})=>t==="right"?(0,n.jsx)("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})}):(0,n.jsx)("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),P=({type:t})=>t==="left"?(0,n.jsx)("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:(0,n.jsx)("path",{d:"M9 16.0185C9.268 16.2905 9.268 16.7275 9 16.9975C8.732 17.2675 8.299 17.2685 8.031 16.9975L0.201 9.0895C-0.067 8.8195 -0.067 8.3825 0.201 8.1105L8.031 0.2025C8.299 -0.0675 8.732 -0.0675 9 0.2025C9.268 0.4735 9.268 0.9115 9 1.1815L1.859 8.6005L9 16.0185Z",fill:"#0045d8"})}):(0,n.jsx)("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:(0,n.jsx)("path",{d:"M0.19922 1.1817C-0.0687795 0.909696 -0.0687794 0.472695 0.19922 0.202695C0.46722 -0.0673054 0.90022 -0.0683048 1.16822 0.202695L8.99822 8.11069C9.26622 8.3807 9.26622 8.81769 8.99822 9.08969L1.16822 16.9977C0.900219 17.2677 0.467218 17.2677 0.199219 16.9977C-0.0687809 16.7267 -0.0687808 16.2887 0.199219 16.0187L7.34022 8.5997L0.19922 1.1817Z",fill:"#0045d8"})});0&&(module.exports={SwiperButton});
2
+ "use strict";var L=Object.create;var s=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var N=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of y(e))!B.call(t,r)&&r!==o&&s(t,r,{get:()=>e[r],enumerable:!(a=k(e,r))||a.enumerable});return t};var M=(t,e,o)=>(o=t!=null?L(x(t)):{},p(e||!t||!t.__esModule?s(o,"default",{value:t,enumerable:!0}):o,t)),P=t=>p(s({},"__esModule",{value:!0}),t);var V={};N(V,{SwiperButton:()=>d});module.exports=P(V);var c=require("@stackshift-ui/button"),w=require("@stackshift-ui/system"),v=M(require("classnames")),n=require("react/jsx-runtime"),i="SwiperButton",d=({variant:t="variant_a",type:e="left",onClick:o,ariaLabel:a,children:r,className:u,as:_,...g})=>{let{[i]:h=c.Button}=(0,w.useStackShiftUIComponents)(),C={variant_a:m,variant_b:S}[t]||m,l="inline-block p-2 text-primary rounded-full shadow focus:outline-none",f={variant_a:l,variant_b:l}[t];return(0,n.jsx)(h,{variant:"unstyled",onClick:o,className:(0,v.default)(f,u),"data-testid":i.toLowerCase(),"aria-label":a,...g,children:r||(0,n.jsx)(C,{type:e})})};d.displayName=i;var m=({type:t})=>t==="right"?(0,n.jsx)("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})}):(0,n.jsx)("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),S=({type:t})=>t==="left"?(0,n.jsx)("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:(0,n.jsx)("path",{d:"M9 16.0185C9.268 16.2905 9.268 16.7275 9 16.9975C8.732 17.2675 8.299 17.2685 8.031 16.9975L0.201 9.0895C-0.067 8.8195 -0.067 8.3825 0.201 8.1105L8.031 0.2025C8.299 -0.0675 8.732 -0.0675 9 0.2025C9.268 0.4735 9.268 0.9115 9 1.1815L1.859 8.6005L9 16.0185Z",fill:"#0045d8"})}):(0,n.jsx)("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:(0,n.jsx)("path",{d:"M0.19922 1.1817C-0.0687795 0.909696 -0.0687794 0.472695 0.19922 0.202695C0.46722 -0.0673054 0.90022 -0.0683048 1.16822 0.202695L8.99822 8.11069C9.26622 8.3807 9.26622 8.81769 8.99822 9.08969L1.16822 16.9977C0.900219 17.2677 0.467218 17.2677 0.199219 16.9977C-0.0687809 16.7267 -0.0687808 16.2887 0.199219 16.0187L7.34022 8.5997L0.19922 1.1817Z",fill:"#0045d8"})});0&&(module.exports={SwiperButton});
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a as e}from"./chunk-KX77LR4U.mjs";export{e as SwiperButton};
2
+ "use strict";import{a as e}from"./chunk-SZBAUWVO.mjs";export{e as SwiperButton};
@@ -1,6 +1,6 @@
1
1
  import type { ElementType, HTMLProps, ReactNode } from "react";
2
2
  type Variant = "variant_a" | "variant_b";
3
- export interface SwiperButtonProps extends Omit<HTMLProps<HTMLElement>, "as" | "size"> {
3
+ export interface SwiperButtonProps extends Omit<HTMLProps<HTMLButtonElement>, "as" | "size"> {
4
4
  variant?: Variant;
5
5
  type?: "left" | "right";
6
6
  onClick?: () => void;
@@ -1 +1 @@
1
- "use strict";var L=Object.create;var s=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var N=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of y(e))!B.call(t,r)&&r!==o&&s(t,r,{get:()=>e[r],enumerable:!(a=k(e,r))||a.enumerable});return t};var b=(t,e,o)=>(o=t!=null?L(x(t)):{},p(e||!t||!t.__esModule?s(o,"default",{value:t,enumerable:!0}):o,t)),M=t=>p(s({},"__esModule",{value:!0}),t);var S={};N(S,{SwiperButton:()=>d});module.exports=M(S);var c=require("@stackshift-ui/button"),w=require("@stackshift-ui/system"),v=b(require("classnames")),n=require("react/jsx-runtime"),i="SwiperButton",d=({variant:t="variant_a",type:e="left",onClick:o,ariaLabel:a,children:r,className:u,as:V,...g})=>{let{[i]:h=c.Button}=(0,w.useStackShiftUIComponents)(),C={variant_a:m,variant_b:P}[t]||m,l="inline-block p-2 text-primary rounded-full shadow focus:outline-none",f={variant_a:l,variant_b:l}[t];return(0,n.jsx)(h,{as:"button",variant:"unstyled",onClick:o,className:(0,v.default)(f,u),"data-testid":i.toLowerCase(),ariaLabel:a,...g,children:r||(0,n.jsx)(C,{type:e})})};d.displayName=i;var m=({type:t})=>t==="right"?(0,n.jsx)("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})}):(0,n.jsx)("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),P=({type:t})=>t==="left"?(0,n.jsx)("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:(0,n.jsx)("path",{d:"M9 16.0185C9.268 16.2905 9.268 16.7275 9 16.9975C8.732 17.2675 8.299 17.2685 8.031 16.9975L0.201 9.0895C-0.067 8.8195 -0.067 8.3825 0.201 8.1105L8.031 0.2025C8.299 -0.0675 8.732 -0.0675 9 0.2025C9.268 0.4735 9.268 0.9115 9 1.1815L1.859 8.6005L9 16.0185Z",fill:"#0045d8"})}):(0,n.jsx)("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:(0,n.jsx)("path",{d:"M0.19922 1.1817C-0.0687795 0.909696 -0.0687794 0.472695 0.19922 0.202695C0.46722 -0.0673054 0.90022 -0.0683048 1.16822 0.202695L8.99822 8.11069C9.26622 8.3807 9.26622 8.81769 8.99822 9.08969L1.16822 16.9977C0.900219 17.2677 0.467218 17.2677 0.199219 16.9977C-0.0687809 16.7267 -0.0687808 16.2887 0.199219 16.0187L7.34022 8.5997L0.19922 1.1817Z",fill:"#0045d8"})});0&&(module.exports={SwiperButton});
1
+ "use strict";var L=Object.create;var s=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var N=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of y(e))!B.call(t,r)&&r!==o&&s(t,r,{get:()=>e[r],enumerable:!(a=k(e,r))||a.enumerable});return t};var M=(t,e,o)=>(o=t!=null?L(x(t)):{},p(e||!t||!t.__esModule?s(o,"default",{value:t,enumerable:!0}):o,t)),P=t=>p(s({},"__esModule",{value:!0}),t);var V={};N(V,{SwiperButton:()=>d});module.exports=P(V);var c=require("@stackshift-ui/button"),w=require("@stackshift-ui/system"),v=M(require("classnames")),n=require("react/jsx-runtime"),i="SwiperButton",d=({variant:t="variant_a",type:e="left",onClick:o,ariaLabel:a,children:r,className:u,as:_,...g})=>{let{[i]:h=c.Button}=(0,w.useStackShiftUIComponents)(),C={variant_a:m,variant_b:S}[t]||m,l="inline-block p-2 text-primary rounded-full shadow focus:outline-none",f={variant_a:l,variant_b:l}[t];return(0,n.jsx)(h,{variant:"unstyled",onClick:o,className:(0,v.default)(f,u),"data-testid":i.toLowerCase(),"aria-label":a,...g,children:r||(0,n.jsx)(C,{type:e})})};d.displayName=i;var m=({type:t})=>t==="right"?(0,n.jsx)("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})}):(0,n.jsx)("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),S=({type:t})=>t==="left"?(0,n.jsx)("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:(0,n.jsx)("path",{d:"M9 16.0185C9.268 16.2905 9.268 16.7275 9 16.9975C8.732 17.2675 8.299 17.2685 8.031 16.9975L0.201 9.0895C-0.067 8.8195 -0.067 8.3825 0.201 8.1105L8.031 0.2025C8.299 -0.0675 8.732 -0.0675 9 0.2025C9.268 0.4735 9.268 0.9115 9 1.1815L1.859 8.6005L9 16.0185Z",fill:"#0045d8"})}):(0,n.jsx)("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:(0,n.jsx)("path",{d:"M0.19922 1.1817C-0.0687795 0.909696 -0.0687794 0.472695 0.19922 0.202695C0.46722 -0.0673054 0.90022 -0.0683048 1.16822 0.202695L8.99822 8.11069C9.26622 8.3807 9.26622 8.81769 8.99822 9.08969L1.16822 16.9977C0.900219 17.2677 0.467218 17.2677 0.199219 16.9977C-0.0687809 16.7267 -0.0687808 16.2887 0.199219 16.0187L7.34022 8.5997L0.19922 1.1817Z",fill:"#0045d8"})});0&&(module.exports={SwiperButton});
@@ -1 +1 @@
1
- import{a}from"./chunk-KX77LR4U.mjs";export{a as SwiperButton};
1
+ import{a}from"./chunk-SZBAUWVO.mjs";export{a as SwiperButton};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stackshift-ui/swiper-button",
3
3
  "description": "",
4
- "version": "7.0.0-beta.0",
4
+ "version": "7.0.0-beta.2",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -35,15 +35,15 @@
35
35
  "dependencies": {
36
36
  "classnames": "^2.5.1",
37
37
  "@stackshift-ui/scripts": "6.1.0-beta.0",
38
- "@stackshift-ui/system": "6.1.0-beta.0",
39
- "@stackshift-ui/button": "6.1.0-beta.0"
38
+ "@stackshift-ui/system": "6.1.0-beta.1",
39
+ "@stackshift-ui/button": "6.1.0-beta.2"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@types/react": "16.8 - 19",
43
43
  "next": "10 - 14",
44
44
  "react": "16.8 - 19",
45
45
  "react-dom": "16.8 - 19",
46
- "@stackshift-ui/system": ">=6.1.0-beta.0"
46
+ "@stackshift-ui/system": ">=6.1.0-beta.1"
47
47
  },
48
48
  "peerDependenciesMeta": {
49
49
  "next": {
@@ -1 +0,0 @@
1
- import{Button as d}from"@stackshift-ui/button";import{useStackShiftUIComponents as u}from"@stackshift-ui/system";import g from"classnames";import{jsx as t}from"react/jsx-runtime";var n="SwiperButton",h=({variant:e="variant_a",type:s="left",onClick:i,ariaLabel:l,children:o,className:p,as:f,...m})=>{let{[n]:c=d}=u(),w={variant_a:a,variant_b:C}[e]||a,r="inline-block p-2 text-primary rounded-full shadow focus:outline-none",v={variant_a:r,variant_b:r}[e];return t(c,{as:"button",variant:"unstyled",onClick:i,className:g(v,p),"data-testid":n.toLowerCase(),ariaLabel:l,...m,children:o||t(w,{type:s})})};h.displayName=n;var a=({type:e})=>e==="right"?t("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})}):t("svg",{className:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),C=({type:e})=>e==="left"?t("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:t("path",{d:"M9 16.0185C9.268 16.2905 9.268 16.7275 9 16.9975C8.732 17.2675 8.299 17.2685 8.031 16.9975L0.201 9.0895C-0.067 8.8195 -0.067 8.3825 0.201 8.1105L8.031 0.2025C8.299 -0.0675 8.732 -0.0675 9 0.2025C9.268 0.4735 9.268 0.9115 9 1.1815L1.859 8.6005L9 16.0185Z",fill:"#0045d8"})}):t("svg",{width:36,height:36,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:t("path",{d:"M0.19922 1.1817C-0.0687795 0.909696 -0.0687794 0.472695 0.19922 0.202695C0.46722 -0.0673054 0.90022 -0.0683048 1.16822 0.202695L8.99822 8.11069C9.26622 8.3807 9.26622 8.81769 8.99822 9.08969L1.16822 16.9977C0.900219 17.2677 0.467218 17.2677 0.199219 16.9977C-0.0687809 16.7267 -0.0687808 16.2887 0.199219 16.0187L7.34022 8.5997L0.19922 1.1817Z",fill:"#0045d8"})});export{h as a};