@wishket/design-system 1.0.0 → 1.0.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.
@@ -1,3 +1,3 @@
1
1
  import { LoadingIndicatorProps } from './LoadingIndicator.types';
2
- declare const LoadingIndicator: ({ isFixed, size, }: LoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const LoadingIndicator: ({ isFixed, size, className, }: LoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default LoadingIndicator;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("tailwind-merge"),i=require("../Box/Box.js"),a=require("./LoadingIndicator.parts.js");module.exports=function(t){var n=t.isFixed,t=t.size,t=void 0===t?"md":t;return e.jsx(i,{role:"loading-indicator",className:r.twMerge("left-1/2 top-1/2 aspect-square -translate-x-1/2 -translate-y-1/2",void 0!==n&&n?"fixed":"absolute",a.generateBoxSize(t)),children:e.jsx(i,{role:"loading-indicator--spinner",className:r.twMerge("h-full w-full animate-spin rounded-full border-primary-500/30 border-t-primary-500",a.generateSpinnerBorderSize(t))})})};
1
+ "use strict";var e=require("react/jsx-runtime"),i=require("tailwind-merge"),r=require("../Box/Box.js"),t=require("./LoadingIndicator.parts.js");module.exports=function(a){var s=a.isFixed,n=a.size,n=void 0===n?"md":n,a=a.className,l=t.SIZES[n],c=l.width,o=l.height,d=l.viewBox,u=l.circle,l=l.r;return e.jsx(r,{role:"loading-indicator",className:i.twMerge("left-1/2 top-1/2 aspect-square -translate-x-1/2 -translate-y-1/2",void 0!==s&&s?"fixed":"absolute",t.generateBoxSize(n)),children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",role:"loading-indicator--dots",width:c,height:o,viewBox:d,fill:"none",className:i.twMerge("text-primary",a),children:[e.jsx("circle",{cx:u[0],cy:u[1],r:l,fill:"currentColor",children:e.jsx("animate",{attributeName:"opacity",values:"1; 1; 0.5; 0.25; 0.25;",dur:"0.9s",repeatCount:"indefinite",begin:"0s"})}),e.jsx("circle",{cx:u[1],cy:u[1],r:l,fill:"currentColor",children:e.jsx("animate",{attributeName:"opacity",values:"1; 1; 0.5; 0.25; 0.25;",dur:"0.9s",repeatCount:"indefinite",begin:"0.3s"})}),e.jsx("circle",{cx:u[2],cy:u[1],r:l,fill:"currentColor",children:e.jsx("animate",{attributeName:"opacity",values:"1; 1; 0.5; 0.25; 0.25;",dur:"0.9s",repeatCount:"indefinite",begin:"0.6s"})})]})})};
@@ -1,3 +1,3 @@
1
- import { LoadingIndicatorSize } from './LoadingIndicator.types';
2
- export declare const generateBoxSize: (size: LoadingIndicatorSize) => "w-4" | "w-6" | "w-8" | "w-12" | "w-16" | "w-20" | "w-24" | "w-32";
3
- export declare const generateSpinnerBorderSize: (size: LoadingIndicatorSize) => "border-[3px]" | "border-[4px]" | "border-[6px]" | "border-[8px]" | "border-[10px]" | "border-[12px]" | "border-[14px]" | "border-[16px]";
1
+ import { LoadingIndicatorSize, LoadingIndicatorSizeVariantType } from './LoadingIndicator.types';
2
+ export declare const generateBoxSize: (size: LoadingIndicatorSize) => "size-6" | "size-8" | "size-[60px]";
3
+ export declare const SIZES: LoadingIndicatorSizeVariantType;
@@ -1 +1 @@
1
- "use strict";exports.generateBoxSize=function(r){switch(r){case"xs":return"w-4";case"sm":return"w-6";case"md":default:return"w-8";case"lg":return"w-12";case"xl":return"w-16";case"2xl":return"w-20";case"3xl":return"w-24";case"4xl":return"w-32"}},exports.generateSpinnerBorderSize=function(r){switch(r){case"xs":return"border-[3px]";case"sm":return"border-[4px]";case"md":default:return"border-[6px]";case"lg":return"border-[8px]";case"xl":return"border-[10px]";case"2xl":return"border-[12px]";case"3xl":return"border-[14px]";case"4xl":return"border-[16px]"}};
1
+ "use strict";exports.SIZES={sm:{width:"24",height:"24",viewBox:"0 0 24 24",circle:["4","12","20"],r:"2"},md:{width:"32",height:"32",viewBox:"0 0 32 32",circle:["4","16","28"],r:"3"},lg:{width:"60",height:"60",viewBox:"0 0 60 60",circle:["12","30","48"],r:"5"}},exports.generateBoxSize=function(e){switch(e){case"sm":return"size-6";case"md":default:return"size-8";case"lg":return"size-[60px]"}};
@@ -1,5 +1,15 @@
1
- export type LoadingIndicatorSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
1
+ export type LoadingIndicatorSize = 'sm' | 'md' | 'lg';
2
2
  export interface LoadingIndicatorProps {
3
3
  isFixed?: boolean;
4
4
  size?: LoadingIndicatorSize;
5
+ className?: string;
5
6
  }
7
+ export type LoadingIndicatorSizeVariantType = {
8
+ [key: string]: {
9
+ width: string;
10
+ height: string;
11
+ viewBox: string;
12
+ circle: string[];
13
+ r: string;
14
+ };
15
+ };
@@ -1 +1 @@
1
- "use strict";var e=require("../../../_virtual/_tslib.js"),a=require("react/jsx-runtime"),t=require("tailwind-merge"),s=[{name:"title1",class:"text-5xl font-bold leading-[64px]"},{name:"title2",class:"text-[32px] leading-[48px]"},{name:"title3",class:"text-2xl leading-9"},{name:"subTitle1",class:"text-xl leading-[30px]"},{name:"subTitle2",class:"text-lg"},{name:"contents1",class:"text-lg leading-8 tracking-[0.48px]"},{name:"contents2",class:"text-base leading-[30px] tracking-[0.48px]"},{name:"body1",class:"text-base leading-[26px]"},{name:"body2",class:"text-sm leading-6"},{name:"body3",class:"text-[13px] leading-5"},{name:"caption1",class:"text-xs leading-[18px]"},{name:"caption2",class:"text-[11px] leading-[14px]"}];module.exports=function(n){var l=n.children,i=n.variant,x=n.className,n=e.__rest(n,["children","variant","className"]),c=(null==(c=s.find(function(e){return e.name===i}))?void 0:c.class)||"";return a.jsx("span",e.__assign({className:t.twMerge(c,x)},n,{children:l}))};
1
+ "use strict";var t=require("../../../_virtual/_tslib.js"),e=require("react/jsx-runtime"),s=require("tailwind-merge"),a=[{name:"title1",class:"text-title1"},{name:"title2",class:"text-title2"},{name:"title3",class:"text-title3"},{name:"subTitle1",class:"text-subTitle1"},{name:"subTitle2",class:"text-subTitle2"},{name:"contents1",class:"text-contents1"},{name:"contents2",class:"text-contents2"},{name:"body1",class:"text-body1"},{name:"body2",class:"text-body2"},{name:"body3",class:"text-body3"},{name:"caption1",class:"text-caption1"},{name:"caption2",class:"text-caption2"}];module.exports=function(n){var l=n.children,i=n.variant,c=n.className,n=t.__rest(n,["children","variant","className"]),r=(null==(r=a.find(function(t){return t.name===i}))?void 0:r.class)||"";return e.jsx("span",t.__assign({className:s.twJoin(r,c)},n,{children:l}))};
@@ -18,47 +18,6 @@ export const customizedPlugin = plugin(function ({ addUtilities, addBase }) {
18
18
  },
19
19
  });
20
20
  addBase({
21
- '@keyframes ripple': {
22
- '0%': {
23
- height: '30%',
24
- width: '30%',
25
- borderRadius: 9999,
26
- opacity: 100
27
- },
28
- '100%': {
29
- height: '100%',
30
- width: '100%',
31
- opacity: 0
32
- }
33
- },
34
- '@keyframes rippleOutline': {
35
- '0%': {
36
- height: '30%',
37
- width: '30%',
38
- borderRadius: 11,
39
- opacity: 100
40
- },
41
- '100%': {
42
- height: '100%',
43
- width: '100%',
44
- borderRadius: 11,
45
- opacity: 0
46
- }
47
- },
48
- '@keyframes rippleOutlineSmall': {
49
- '0%': {
50
- height: '30%',
51
- width: '30%',
52
- borderRadius: 7,
53
- opacity: 100
54
- },
55
- '100%': {
56
- height: '100%',
57
- width: '100%',
58
- borderRadius: 7,
59
- opacity: 0
60
- }
61
- },
62
21
  '::-webkit-resizer': {
63
22
  display: 'none',
64
23
  },
@@ -17,6 +17,44 @@ module.exports = {
17
17
  desktop: '960px',
18
18
  },
19
19
  extend: {
20
+ fontSize: {
21
+ title1: ['48px', {
22
+ lineHeight: '64px',
23
+ }],
24
+ title2: ['32px', {
25
+ lineHeight: '48px',
26
+ }],
27
+ title3: ['24px', {
28
+ lineHeight: '36px',
29
+ }],
30
+ subTitle1: ['20px', {
31
+ lineHeight: '30px',
32
+ }],
33
+ subTitle2: ['18px', {
34
+ lineHeight: '28px',
35
+ }],
36
+ contents1: ['18px', {
37
+ lineHeight: '32px',
38
+ }],
39
+ contents2: ['16px', {
40
+ lineHeight: '30px',
41
+ }],
42
+ body1: ['16px', {
43
+ lineHeight: '26px',
44
+ }],
45
+ body2: ['14px', {
46
+ lineHeight: '24px',
47
+ }],
48
+ body3: ['13px', {
49
+ lineHeight: '20px',
50
+ }],
51
+ caption1: ['12px', {
52
+ lineHeight: '18px',
53
+ }],
54
+ caption2: ['11px', {
55
+ lineHeight: '14px',
56
+ }],
57
+ },
20
58
  gridAutoColumns: {
21
59
  '1fr': '1fr',
22
60
  },
@@ -200,6 +238,49 @@ module.exports = {
200
238
  'checkbox-list-item-container': '18px max-content',
201
239
  'radio-list-item-container': '18px max-content',
202
240
  },
241
+ keyframes: {
242
+ rippleOutlineSmall: {
243
+ '0%': {
244
+ height: '30%',
245
+ width: '30%',
246
+ borderRadius: 7,
247
+ opacity: 100
248
+ },
249
+ '100%': {
250
+ height: '100%',
251
+ width: '100%',
252
+ borderRadius: 7,
253
+ opacity: 0
254
+ }
255
+ },
256
+ rippleOutline: {
257
+ '0%': {
258
+ height: '30%',
259
+ width: '30%',
260
+ borderRadius: 11,
261
+ opacity: 100
262
+ },
263
+ '100%': {
264
+ height: '100%',
265
+ width: '100%',
266
+ borderRadius: 11,
267
+ opacity: 0
268
+ }
269
+ },
270
+ ripple: {
271
+ '0%': {
272
+ height: '30%',
273
+ width: '30%',
274
+ borderRadius: 9999,
275
+ opacity: 100
276
+ },
277
+ '100%': {
278
+ height: '100%',
279
+ width: '100%',
280
+ opacity: 0
281
+ }
282
+ }
283
+ }
203
284
  },
204
285
  },
205
286
  plugins: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wishket/design-system",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Wishket Design System",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",