@wishket/design-system 0.7.2 → 0.7.3

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.
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";var e=require("react/jsx-runtime"),t=require("tailwind-merge"),r=require("react"),s=require("./hooks/usePreventScroll.js"),n=r.createContext({isOpen:!1,setOpen:function(){},hasBackground:!0,isPreventClose:!1,size:"md"}),i=function(){var s=r.useContext(n),i=s.isOpen,s=s.hasBackground;return e.jsx(e.Fragment,{children:i&&e.jsx("div",{"data-testid":"design-system-modal--background",className:t.twMerge("fixed left-0 top-0 z-30 h-[100vh] w-[100vw]",s?" bg-black bg-opacity-40":"bg-transparent")})})};exports.Content=function(o){var a=o.children,d=o.testId,c=o.role,o=o.className,l=r.useContext(n),u=l.isOpen,x=l.size,v=l.hasBackground,l=l.isPreventClose;return s(u),e.jsxs(e.Fragment,{children:[u&&l&&e.jsx(i,{}),u&&e.jsx("div",{role:c,"data-testid":d,className:t.twMerge("fixed left-[50%] top-[50%] z-40 box-border flex translate-x-[-50%] translate-y-[-50%] items-center justify-center overflow-auto rounded-[30px] bg-w-white px-[15px] py-[15px]",!v&&"shadow-lg","sm"===x&&"h-1/3 w-3/12","md"===x&&"h-1/2 w-1/3","lg"===x&&"h-2/3 w-5/12",o),children:a})]})},exports.Root=function(t){var s=t.children,i=t.hasBackground,i=void 0===i||i,o=t.isPreventClose,o=void 0!==o&&o,t=t.size,t=void 0===t?"md":t,a=r.useState(!1),d=a[0],c=a[1];return e.jsx(n.Provider,{value:{isOpen:d,setOpen:function(){c(function(e){return!e})},hasBackground:i,isPreventClose:o,size:t},children:s})},exports.Trigger=function(t){var s=t.children,t=t.testId,o=r.useContext(n),a=o.isOpen,d=o.setOpen,o=o.isPreventClose;return e.jsxs("div",{"data-testid":t,onClick:d,children:[s,a&&!o&&e.jsx(i,{})]})};
2
+ "use strict";var e=require("react/jsx-runtime"),t=require("tailwind-merge"),r=require("react"),s=require("./hooks/usePreventScroll.js"),n=r.createContext({isOpen:!1,setOpen:function(){},hasBackground:!0,isPreventClose:!1,size:"md"}),i=function(){var s=r.useContext(n),i=s.isOpen,s=s.hasBackground;return e.jsx(e.Fragment,{children:i&&e.jsx("div",{"data-testid":"design-system-modal--background",className:t.twMerge("fixed left-0 top-0 z-30 h-[100vh] w-[100vw]",s?" bg-black bg-opacity-40":"bg-transparent")})})};exports.Content=function(o){var a=o.children,d=o.testId,c=o.role,o=o.className,l=r.useContext(n),u=l.isOpen,x=l.size,v=l.hasBackground,l=l.isPreventClose;return s(u),e.jsxs(e.Fragment,{children:[u&&l&&e.jsx(i,{}),u&&e.jsx("div",{role:c,"data-testid":d,className:t.twMerge("fixed left-[50%] top-[50%] z-40 box-border flex translate-x-[-50%] translate-y-[-50%] items-center justify-center overflow-auto rounded-[30px] bg-w-white px-[15px] py-[15px]",!v&&"shadow-modal","sm"===x&&"h-1/3 w-3/12","md"===x&&"h-1/2 w-1/3","lg"===x&&"h-2/3 w-5/12",o),children:a})]})},exports.Root=function(t){var s=t.children,i=t.hasBackground,i=void 0===i||i,o=t.isPreventClose,o=void 0!==o&&o,t=t.size,t=void 0===t?"md":t,a=r.useState(!1),d=a[0],c=a[1];return e.jsx(n.Provider,{value:{isOpen:d,setOpen:function(){c(function(e){return!e})},hasBackground:i,isPreventClose:o,size:t},children:s})},exports.Trigger=function(t){var s=t.children,t=t.testId,o=r.useContext(n),a=o.isOpen,d=o.setOpen,o=o.isPreventClose;return e.jsxs("div",{"data-testid":t,onClick:d,children:[s,a&&!o&&e.jsx(i,{})]})};
@@ -132,6 +132,7 @@ module.exports = {
132
132
  'cyan': '0px 2px 8px 0px rgba(59, 163, 199, 0.32)',
133
133
  'indigo': '0px 2px 8px 0px rgba(46, 107, 170, 0.32)',
134
134
  'violet': '0px 2px 8px 0px rgba(107, 22, 238, 0.32)',
135
+ 'modal': '0px 12px 32px -12px rgba(0, 0, 0, 0.16)'
135
136
  },
136
137
  backgroundImage: {
137
138
  'gradient-cyan-0': 'linear-gradient(0deg, #5db6d4 0%, #369cc2 100%)',
@@ -174,8 +175,8 @@ module.exports = {
174
175
  'radio-list-item-container': 'min-content min-content',
175
176
  },
176
177
  gridTemplateColumns: {
177
- 'checkbox-list-item-container': '18px min-content',
178
- 'radio-list-item-container': '18px min-content',
178
+ 'checkbox-list-item-container': '18px max-content',
179
+ 'radio-list-item-container': '18px max-content',
179
180
  },
180
181
  },
181
182
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wishket/design-system",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Wishket Design System",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",