@shipfox/react-ui 0.1.0 → 0.3.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.
Files changed (98) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/.turbo/turbo-check.log +3 -3
  3. package/.turbo/turbo-type.log +1 -1
  4. package/CHANGELOG.md +12 -0
  5. package/dist/components/alert/alert.d.ts +18 -0
  6. package/dist/components/alert/alert.d.ts.map +1 -0
  7. package/dist/components/alert/alert.js +123 -0
  8. package/dist/components/alert/alert.js.map +1 -0
  9. package/dist/components/alert/alert.stories.js +112 -0
  10. package/dist/components/alert/alert.stories.js.map +1 -0
  11. package/dist/components/alert/index.d.ts +2 -0
  12. package/dist/components/alert/index.d.ts.map +1 -0
  13. package/dist/components/alert/index.js +3 -0
  14. package/dist/components/alert/index.js.map +1 -0
  15. package/dist/components/avatar/avatar-group.d.ts +18 -0
  16. package/dist/components/avatar/avatar-group.d.ts.map +1 -0
  17. package/dist/components/avatar/avatar-group.js +132 -0
  18. package/dist/components/avatar/avatar-group.js.map +1 -0
  19. package/dist/components/avatar/avatar.d.ts +21 -0
  20. package/dist/components/avatar/avatar.d.ts.map +1 -0
  21. package/dist/components/avatar/avatar.js +166 -0
  22. package/dist/components/avatar/avatar.js.map +1 -0
  23. package/dist/components/avatar/avatar.stories.js +255 -0
  24. package/dist/components/avatar/avatar.stories.js.map +1 -0
  25. package/dist/components/avatar/index.d.ts +3 -0
  26. package/dist/components/avatar/index.d.ts.map +1 -0
  27. package/dist/components/avatar/index.js +4 -0
  28. package/dist/components/avatar/index.js.map +1 -0
  29. package/dist/components/icon/custom/index.d.ts +1 -0
  30. package/dist/components/icon/custom/index.d.ts.map +1 -1
  31. package/dist/components/icon/custom/index.js +1 -0
  32. package/dist/components/icon/custom/index.js.map +1 -1
  33. package/dist/components/icon/custom/shipfox-logo.d.ts +8 -0
  34. package/dist/components/icon/custom/shipfox-logo.d.ts.map +1 -0
  35. package/dist/components/icon/custom/shipfox-logo.js +22 -0
  36. package/dist/components/icon/custom/shipfox-logo.js.map +1 -0
  37. package/dist/components/icon/icon.d.ts +4 -1
  38. package/dist/components/icon/icon.d.ts.map +1 -1
  39. package/dist/components/icon/icon.js +6 -3
  40. package/dist/components/icon/icon.js.map +1 -1
  41. package/dist/components/index.d.ts +4 -0
  42. package/dist/components/index.d.ts.map +1 -1
  43. package/dist/components/index.js +4 -0
  44. package/dist/components/index.js.map +1 -1
  45. package/dist/components/inline-tips/index.d.ts +2 -0
  46. package/dist/components/inline-tips/index.d.ts.map +1 -0
  47. package/dist/components/inline-tips/index.js +3 -0
  48. package/dist/components/inline-tips/index.js.map +1 -0
  49. package/dist/components/inline-tips/inline-tips.d.ts +19 -0
  50. package/dist/components/inline-tips/inline-tips.d.ts.map +1 -0
  51. package/dist/components/inline-tips/inline-tips.js +98 -0
  52. package/dist/components/inline-tips/inline-tips.js.map +1 -0
  53. package/dist/components/inline-tips/inline-tips.stories.js +214 -0
  54. package/dist/components/inline-tips/inline-tips.stories.js.map +1 -0
  55. package/dist/components/textarea/index.d.ts +2 -0
  56. package/dist/components/textarea/index.d.ts.map +1 -0
  57. package/dist/components/textarea/index.js +3 -0
  58. package/dist/components/textarea/index.js.map +1 -0
  59. package/dist/components/textarea/textarea.d.ts +10 -0
  60. package/dist/components/textarea/textarea.d.ts.map +1 -0
  61. package/dist/components/textarea/textarea.js +31 -0
  62. package/dist/components/textarea/textarea.js.map +1 -0
  63. package/dist/components/textarea/textarea.stories.js +333 -0
  64. package/dist/components/textarea/textarea.stories.js.map +1 -0
  65. package/dist/components/tooltip/tooltip.d.ts +7 -0
  66. package/dist/components/tooltip/tooltip.d.ts.map +1 -0
  67. package/dist/components/tooltip/tooltip.js +38 -0
  68. package/dist/components/tooltip/tooltip.js.map +1 -0
  69. package/dist/utils/avatar.d.ts +3 -0
  70. package/dist/utils/avatar.d.ts.map +1 -0
  71. package/dist/utils/avatar.js +32 -0
  72. package/dist/utils/avatar.js.map +1 -0
  73. package/dist/utils/index.d.ts +1 -0
  74. package/dist/utils/index.d.ts.map +1 -1
  75. package/dist/utils/index.js +1 -0
  76. package/dist/utils/index.js.map +1 -1
  77. package/index.css +32 -1
  78. package/package.json +5 -5
  79. package/src/components/alert/alert.stories.tsx +77 -0
  80. package/src/components/alert/alert.tsx +144 -0
  81. package/src/components/alert/index.ts +1 -0
  82. package/src/components/avatar/avatar-group.tsx +186 -0
  83. package/src/components/avatar/avatar.stories.tsx +172 -0
  84. package/src/components/avatar/avatar.tsx +215 -0
  85. package/src/components/avatar/index.ts +2 -0
  86. package/src/components/icon/custom/index.ts +1 -0
  87. package/src/components/icon/custom/shipfox-logo.tsx +20 -0
  88. package/src/components/icon/icon.tsx +11 -1
  89. package/src/components/index.ts +4 -0
  90. package/src/components/inline-tips/index.ts +1 -0
  91. package/src/components/inline-tips/inline-tips.stories.tsx +126 -0
  92. package/src/components/inline-tips/inline-tips.tsx +132 -0
  93. package/src/components/textarea/index.ts +1 -0
  94. package/src/components/textarea/textarea.stories.tsx +190 -0
  95. package/src/components/textarea/textarea.tsx +42 -0
  96. package/src/components/tooltip/tooltip.tsx +52 -0
  97. package/src/utils/avatar.ts +27 -0
  98. package/src/utils/index.ts +1 -0
@@ -1,5 +1,9 @@
1
+ export * from './alert/index.js';
2
+ export * from './avatar/index.js';
1
3
  export * from './button.js';
2
4
  export * from './icon/index.js';
5
+ export * from './inline-tips/index.js';
6
+ export * from './textarea/index.js';
3
7
  export * from './theme-provider.js';
4
8
  export * from './typography/index.js';
5
9
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './button';\nexport * from './icon';\nexport * from './theme-provider';\nexport * from './typography';\n"],"names":[],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,mBAAmB;AACjC,cAAc,eAAe"}
1
+ {"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './alert';\nexport * from './avatar';\nexport * from './button';\nexport * from './icon';\nexport * from './inline-tips';\nexport * from './textarea';\nexport * from './theme-provider';\nexport * from './typography';\n"],"names":[],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,eAAe"}
@@ -0,0 +1,2 @@
1
+ export * from './inline-tips';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/inline-tips/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './inline-tips.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/inline-tips/index.ts"],"sourcesContent":["export * from './inline-tips';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB"}
@@ -0,0 +1,19 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import type { ComponentProps } from 'react';
3
+ declare const inlineTipsBaseVariants: (props?: ({
4
+ variant?: "primary" | "secondary" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ type InlineTipsProps = ComponentProps<'div'> & VariantProps<typeof inlineTipsBaseVariants> & {
7
+ type?: 'default' | 'info' | 'success' | 'destructive';
8
+ };
9
+ declare function InlineTips({ className, variant, type, children, ...props }: InlineTipsProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function InlineTipsContent({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
11
+ declare function InlineTipsTitle({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
12
+ declare function InlineTipsDescription({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
13
+ declare function InlineTipsActions({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
14
+ declare const inlineTipsActionVariants: (props?: ({
15
+ variant?: "primary" | "secondary" | null | undefined;
16
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
17
+ declare function InlineTipsAction({ className, variant, ...props }: ComponentProps<'button'> & VariantProps<typeof inlineTipsActionVariants>): import("react/jsx-runtime").JSX.Element;
18
+ export { InlineTips, InlineTipsContent, InlineTipsTitle, InlineTipsDescription, InlineTipsActions, InlineTipsAction, };
19
+ //# sourceMappingURL=inline-tips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-tips.d.ts","sourceRoot":"","sources":["../../../src/components/inline-tips/inline-tips.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;AAG1C,QAAA,MAAM,sBAAsB;;8EAW1B,CAAC;AAgBH,KAAK,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,GAC1C,YAAY,CAAC,OAAO,sBAAsB,CAAC,GAAG;IAC5C,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,CAAC;CACvD,CAAC;AAEJ,iBAAS,UAAU,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,IAAgB,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAC,EAAE,eAAe,2CAe9F;AAED,iBAAS,iBAAiB,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,cAAc,CAAC,KAAK,CAAC,2CAItE;AAED,iBAAS,eAAe,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,cAAc,CAAC,KAAK,CAAC,2CAQpE;AAED,iBAAS,qBAAqB,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,cAAc,CAAC,KAAK,CAAC,2CAW1E;AAED,iBAAS,iBAAiB,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,cAAc,CAAC,KAAK,CAAC,2CAQtE;AAED,QAAA,MAAM,wBAAwB;;8EAe7B,CAAC;AAEF,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC,OAAO,wBAAwB,CAAC,2CAS1E;AAED,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GACjB,CAAC"}
@@ -0,0 +1,98 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cva } from 'class-variance-authority';
3
+ import { cn } from '../../utils/cn.js';
4
+ const inlineTipsBaseVariants = cva('w-full text-sm flex gap-12 items-center', {
5
+ variants: {
6
+ variant: {
7
+ primary: 'bg-background-components-base text-foreground-neutral-base border border-border-neutral-base shadow-button-neutral rounded-8 px-12 py-8',
8
+ secondary: 'bg-transparent text-foreground-neutral-base'
9
+ }
10
+ },
11
+ defaultVariants: {
12
+ variant: 'primary'
13
+ }
14
+ });
15
+ const inlineTipsLineVariants = cva('w-4 self-stretch my-4 rounded-full', {
16
+ variants: {
17
+ type: {
18
+ default: 'bg-tag-neutral-icon',
19
+ info: 'bg-tag-warning-icon',
20
+ success: 'bg-tag-success-icon',
21
+ destructive: 'bg-tag-error-icon'
22
+ }
23
+ },
24
+ defaultVariants: {
25
+ type: 'default'
26
+ }
27
+ });
28
+ function InlineTips({ className, variant, type = 'default', children, ...props }) {
29
+ return /*#__PURE__*/ _jsxs("div", {
30
+ "data-slot": "inline-tips",
31
+ className: cn(inlineTipsBaseVariants({
32
+ variant
33
+ }), className),
34
+ ...props,
35
+ children: [
36
+ /*#__PURE__*/ _jsx("div", {
37
+ "data-slot": "inline-tips-line",
38
+ className: cn(inlineTipsLineVariants({
39
+ type
40
+ })),
41
+ "aria-hidden": "true"
42
+ }),
43
+ children
44
+ ]
45
+ });
46
+ }
47
+ function InlineTipsContent({ className, ...props }) {
48
+ return /*#__PURE__*/ _jsx("div", {
49
+ "data-slot": "inline-tips-content",
50
+ className: cn('flex-1 min-w-0', className),
51
+ ...props
52
+ });
53
+ }
54
+ function InlineTipsTitle({ className, ...props }) {
55
+ return /*#__PURE__*/ _jsx("div", {
56
+ "data-slot": "inline-tips-title",
57
+ className: cn('font-medium text-sm leading-20 text-foreground-neutral-base mb-4', className),
58
+ ...props
59
+ });
60
+ }
61
+ function InlineTipsDescription({ className, ...props }) {
62
+ return /*#__PURE__*/ _jsx("div", {
63
+ "data-slot": "inline-tips-description",
64
+ className: cn('text-xs leading-20 text-foreground-neutral-muted [&_p]:leading-relaxed', className),
65
+ ...props
66
+ });
67
+ }
68
+ function InlineTipsActions({ className, ...props }) {
69
+ return /*#__PURE__*/ _jsx("div", {
70
+ "data-slot": "inline-tips-actions",
71
+ className: cn('flex items-center gap-8 shrink-0', className),
72
+ ...props
73
+ });
74
+ }
75
+ const inlineTipsActionVariants = cva('rounded-6 px-10 py-6 text-xs font-medium leading-20 transition-colors duration-150 outline-none focus-visible:ring-2 focus-visible:ring-background-accent-blue-base focus-visible:ring-offset-2', {
76
+ variants: {
77
+ variant: {
78
+ primary: 'bg-background-button-inverted-default text-foreground-contrast-primary shadow-button-inverted hover:bg-background-button-inverted-hover active:bg-background-button-inverted-pressed focus-visible:shadow-button-inverted-focus disabled:bg-background-neutral-disabled disabled:text-foreground-neutral-disabled disabled:shadow-none ',
79
+ secondary: 'bg-background-button-neutral-default text-foreground-neutral-base shadow-button-neutral hover:bg-background-button-neutral-hover active:bg-background-button-neutral-pressed disabled:bg-background-neutral-disabled focus-visible:shadow-button-neutral-focus disabled:text-foreground-neutral-disabled disabled:shadow-none'
80
+ }
81
+ },
82
+ defaultVariants: {
83
+ variant: 'primary'
84
+ }
85
+ });
86
+ function InlineTipsAction({ className, variant, ...props }) {
87
+ return /*#__PURE__*/ _jsx("button", {
88
+ "data-slot": "inline-tips-action",
89
+ type: "button",
90
+ className: cn(inlineTipsActionVariants({
91
+ variant
92
+ }), className),
93
+ ...props
94
+ });
95
+ }
96
+ export { InlineTips, InlineTipsContent, InlineTipsTitle, InlineTipsDescription, InlineTipsActions, InlineTipsAction };
97
+
98
+ //# sourceMappingURL=inline-tips.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/inline-tips/inline-tips.tsx"],"sourcesContent":["import {cva, type VariantProps} from 'class-variance-authority';\nimport type {ComponentProps} from 'react';\nimport {cn} from 'utils/cn';\n\nconst inlineTipsBaseVariants = cva('w-full text-sm flex gap-12 items-center', {\n variants: {\n variant: {\n primary:\n 'bg-background-components-base text-foreground-neutral-base border border-border-neutral-base shadow-button-neutral rounded-8 px-12 py-8',\n secondary: 'bg-transparent text-foreground-neutral-base',\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n});\n\nconst inlineTipsLineVariants = cva('w-4 self-stretch my-4 rounded-full', {\n variants: {\n type: {\n default: 'bg-tag-neutral-icon',\n info: 'bg-tag-warning-icon',\n success: 'bg-tag-success-icon',\n destructive: 'bg-tag-error-icon',\n },\n },\n defaultVariants: {\n type: 'default',\n },\n});\n\ntype InlineTipsProps = ComponentProps<'div'> &\n VariantProps<typeof inlineTipsBaseVariants> & {\n type?: 'default' | 'info' | 'success' | 'destructive';\n };\n\nfunction InlineTips({className, variant, type = 'default', children, ...props}: InlineTipsProps) {\n return (\n <div\n data-slot=\"inline-tips\"\n className={cn(inlineTipsBaseVariants({variant}), className)}\n {...props}\n >\n <div\n data-slot=\"inline-tips-line\"\n className={cn(inlineTipsLineVariants({type}))}\n aria-hidden=\"true\"\n />\n {children}\n </div>\n );\n}\n\nfunction InlineTipsContent({className, ...props}: ComponentProps<'div'>) {\n return (\n <div data-slot=\"inline-tips-content\" className={cn('flex-1 min-w-0', className)} {...props} />\n );\n}\n\nfunction InlineTipsTitle({className, ...props}: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"inline-tips-title\"\n className={cn('font-medium text-sm leading-20 text-foreground-neutral-base mb-4', className)}\n {...props}\n />\n );\n}\n\nfunction InlineTipsDescription({className, ...props}: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"inline-tips-description\"\n className={cn(\n 'text-xs leading-20 text-foreground-neutral-muted [&_p]:leading-relaxed',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction InlineTipsActions({className, ...props}: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"inline-tips-actions\"\n className={cn('flex items-center gap-8 shrink-0', className)}\n {...props}\n />\n );\n}\n\nconst inlineTipsActionVariants = cva(\n 'rounded-6 px-10 py-6 text-xs font-medium leading-20 transition-colors duration-150 outline-none focus-visible:ring-2 focus-visible:ring-background-accent-blue-base focus-visible:ring-offset-2',\n {\n variants: {\n variant: {\n primary:\n 'bg-background-button-inverted-default text-foreground-contrast-primary shadow-button-inverted hover:bg-background-button-inverted-hover active:bg-background-button-inverted-pressed focus-visible:shadow-button-inverted-focus disabled:bg-background-neutral-disabled disabled:text-foreground-neutral-disabled disabled:shadow-none ',\n secondary:\n 'bg-background-button-neutral-default text-foreground-neutral-base shadow-button-neutral hover:bg-background-button-neutral-hover active:bg-background-button-neutral-pressed disabled:bg-background-neutral-disabled focus-visible:shadow-button-neutral-focus disabled:text-foreground-neutral-disabled disabled:shadow-none',\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n },\n);\n\nfunction InlineTipsAction({\n className,\n variant,\n ...props\n}: ComponentProps<'button'> & VariantProps<typeof inlineTipsActionVariants>) {\n return (\n <button\n data-slot=\"inline-tips-action\"\n type=\"button\"\n className={cn(inlineTipsActionVariants({variant}), className)}\n {...props}\n />\n );\n}\n\nexport {\n InlineTips,\n InlineTipsContent,\n InlineTipsTitle,\n InlineTipsDescription,\n InlineTipsActions,\n InlineTipsAction,\n};\n"],"names":["cva","cn","inlineTipsBaseVariants","variants","variant","primary","secondary","defaultVariants","inlineTipsLineVariants","type","default","info","success","destructive","InlineTips","className","children","props","div","data-slot","aria-hidden","InlineTipsContent","InlineTipsTitle","InlineTipsDescription","InlineTipsActions","inlineTipsActionVariants","InlineTipsAction","button"],"mappings":";AAAA,SAAQA,GAAG,QAA0B,2BAA2B;AAEhE,SAAQC,EAAE,QAAO,WAAW;AAE5B,MAAMC,yBAAyBF,IAAI,2CAA2C;IAC5EG,UAAU;QACRC,SAAS;YACPC,SACE;YACFC,WAAW;QACb;IACF;IACAC,iBAAiB;QACfH,SAAS;IACX;AACF;AAEA,MAAMI,yBAAyBR,IAAI,sCAAsC;IACvEG,UAAU;QACRM,MAAM;YACJC,SAAS;YACTC,MAAM;YACNC,SAAS;YACTC,aAAa;QACf;IACF;IACAN,iBAAiB;QACfE,MAAM;IACR;AACF;AAOA,SAASK,WAAW,EAACC,SAAS,EAAEX,OAAO,EAAEK,OAAO,SAAS,EAAEO,QAAQ,EAAE,GAAGC,OAAuB;IAC7F,qBACE,MAACC;QACCC,aAAU;QACVJ,WAAWd,GAAGC,uBAAuB;YAACE;QAAO,IAAIW;QAChD,GAAGE,KAAK;;0BAET,KAACC;gBACCC,aAAU;gBACVJ,WAAWd,GAAGO,uBAAuB;oBAACC;gBAAI;gBAC1CW,eAAY;;YAEbJ;;;AAGP;AAEA,SAASK,kBAAkB,EAACN,SAAS,EAAE,GAAGE,OAA6B;IACrE,qBACE,KAACC;QAAIC,aAAU;QAAsBJ,WAAWd,GAAG,kBAAkBc;QAAa,GAAGE,KAAK;;AAE9F;AAEA,SAASK,gBAAgB,EAACP,SAAS,EAAE,GAAGE,OAA6B;IACnE,qBACE,KAACC;QACCC,aAAU;QACVJ,WAAWd,GAAG,oEAAoEc;QACjF,GAAGE,KAAK;;AAGf;AAEA,SAASM,sBAAsB,EAACR,SAAS,EAAE,GAAGE,OAA6B;IACzE,qBACE,KAACC;QACCC,aAAU;QACVJ,WAAWd,GACT,0EACAc;QAED,GAAGE,KAAK;;AAGf;AAEA,SAASO,kBAAkB,EAACT,SAAS,EAAE,GAAGE,OAA6B;IACrE,qBACE,KAACC;QACCC,aAAU;QACVJ,WAAWd,GAAG,oCAAoCc;QACjD,GAAGE,KAAK;;AAGf;AAEA,MAAMQ,2BAA2BzB,IAC/B,mMACA;IACEG,UAAU;QACRC,SAAS;YACPC,SACE;YACFC,WACE;QACJ;IACF;IACAC,iBAAiB;QACfH,SAAS;IACX;AACF;AAGF,SAASsB,iBAAiB,EACxBX,SAAS,EACTX,OAAO,EACP,GAAGa,OACsE;IACzE,qBACE,KAACU;QACCR,aAAU;QACVV,MAAK;QACLM,WAAWd,GAAGwB,yBAAyB;YAACrB;QAAO,IAAIW;QAClD,GAAGE,KAAK;;AAGf;AAEA,SACEH,UAAU,EACVO,iBAAiB,EACjBC,eAAe,EACfC,qBAAqB,EACrBC,iBAAiB,EACjBE,gBAAgB,GAChB"}
@@ -0,0 +1,214 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Code, Header } from '../../components/typography/index.js';
3
+ import { InlineTips, InlineTipsAction, InlineTipsActions, InlineTipsContent, InlineTipsDescription, InlineTipsTitle } from './inline-tips.js';
4
+ const meta = {
5
+ title: 'Components/InlineTips',
6
+ component: InlineTips,
7
+ tags: [
8
+ 'autodocs'
9
+ ],
10
+ argTypes: {
11
+ type: {
12
+ control: 'select',
13
+ options: [
14
+ 'default',
15
+ 'info',
16
+ 'success',
17
+ 'destructive'
18
+ ]
19
+ },
20
+ variant: {
21
+ control: 'select',
22
+ options: [
23
+ 'primary',
24
+ 'secondary'
25
+ ]
26
+ }
27
+ },
28
+ args: {
29
+ type: 'default',
30
+ variant: 'primary'
31
+ }
32
+ };
33
+ export default meta;
34
+ const types = [
35
+ 'default',
36
+ 'info',
37
+ 'success',
38
+ 'destructive'
39
+ ];
40
+ const variants = [
41
+ 'primary',
42
+ 'secondary'
43
+ ];
44
+ export const Default = {
45
+ render: (args)=>{
46
+ return /*#__PURE__*/ _jsxs(InlineTips, {
47
+ ...args,
48
+ children: [
49
+ /*#__PURE__*/ _jsxs(InlineTipsContent, {
50
+ children: [
51
+ /*#__PURE__*/ _jsx(InlineTipsTitle, {
52
+ children: "Title"
53
+ }),
54
+ /*#__PURE__*/ _jsx(InlineTipsDescription, {
55
+ children: "Description"
56
+ })
57
+ ]
58
+ }),
59
+ /*#__PURE__*/ _jsxs(InlineTipsActions, {
60
+ children: [
61
+ /*#__PURE__*/ _jsx(InlineTipsAction, {
62
+ variant: args.variant,
63
+ children: "Label"
64
+ }),
65
+ /*#__PURE__*/ _jsx(InlineTipsAction, {
66
+ variant: args.variant,
67
+ children: "Label"
68
+ })
69
+ ]
70
+ })
71
+ ]
72
+ });
73
+ }
74
+ };
75
+ export const Variants = {
76
+ render: ()=>{
77
+ return /*#__PURE__*/ _jsx("div", {
78
+ className: "flex flex-col gap-16",
79
+ children: variants.map((variant)=>/*#__PURE__*/ _jsxs(InlineTips, {
80
+ type: "default",
81
+ variant: variant,
82
+ children: [
83
+ /*#__PURE__*/ _jsxs(InlineTipsContent, {
84
+ children: [
85
+ /*#__PURE__*/ _jsx(InlineTipsTitle, {
86
+ children: "Title"
87
+ }),
88
+ /*#__PURE__*/ _jsx(InlineTipsDescription, {
89
+ children: "Description"
90
+ })
91
+ ]
92
+ }),
93
+ /*#__PURE__*/ _jsxs(InlineTipsActions, {
94
+ children: [
95
+ /*#__PURE__*/ _jsx(InlineTipsAction, {
96
+ variant: "primary",
97
+ children: "Label"
98
+ }),
99
+ /*#__PURE__*/ _jsx(InlineTipsAction, {
100
+ variant: "secondary",
101
+ children: "Label"
102
+ })
103
+ ]
104
+ })
105
+ ]
106
+ }, variant))
107
+ });
108
+ }
109
+ };
110
+ export const DesignMock = {
111
+ render: ()=>{
112
+ const content = {
113
+ default: {
114
+ title: 'Title',
115
+ description: 'Description'
116
+ },
117
+ info: {
118
+ title: 'Title',
119
+ description: 'Description'
120
+ },
121
+ success: {
122
+ title: 'Title',
123
+ description: 'Description'
124
+ },
125
+ destructive: {
126
+ title: "Don't's",
127
+ description: 'Title'
128
+ }
129
+ };
130
+ return /*#__PURE__*/ _jsxs("div", {
131
+ className: "flex flex-col gap-32 pb-64 pt-32 px-32 bg-background-neutral-base",
132
+ children: [
133
+ /*#__PURE__*/ _jsx(Header, {
134
+ variant: "h3",
135
+ className: "text-foreground-neutral-subtle",
136
+ children: "INLINE TIPS"
137
+ }),
138
+ /*#__PURE__*/ _jsxs("div", {
139
+ className: "flex flex-col gap-16",
140
+ children: [
141
+ /*#__PURE__*/ _jsx(Code, {
142
+ variant: "label",
143
+ className: "text-foreground-neutral-subtle",
144
+ children: "Primary"
145
+ }),
146
+ types.map((type)=>/*#__PURE__*/ _jsxs(InlineTips, {
147
+ type: type,
148
+ variant: "primary",
149
+ children: [
150
+ /*#__PURE__*/ _jsxs(InlineTipsContent, {
151
+ children: [
152
+ /*#__PURE__*/ _jsx(InlineTipsTitle, {
153
+ children: content[type].title
154
+ }),
155
+ /*#__PURE__*/ _jsx(InlineTipsDescription, {
156
+ children: content[type].description
157
+ })
158
+ ]
159
+ }),
160
+ /*#__PURE__*/ _jsxs(InlineTipsActions, {
161
+ children: [
162
+ /*#__PURE__*/ _jsx(InlineTipsAction, {
163
+ variant: "primary",
164
+ children: "Label"
165
+ }),
166
+ /*#__PURE__*/ _jsx(InlineTipsAction, {
167
+ variant: "secondary",
168
+ children: "Label"
169
+ })
170
+ ]
171
+ })
172
+ ]
173
+ }, type)),
174
+ /*#__PURE__*/ _jsx(Code, {
175
+ variant: "label",
176
+ className: "text-foreground-neutral-subtle",
177
+ children: "Secondary"
178
+ }),
179
+ types.map((type)=>/*#__PURE__*/ _jsxs(InlineTips, {
180
+ type: type,
181
+ variant: "secondary",
182
+ children: [
183
+ /*#__PURE__*/ _jsxs(InlineTipsContent, {
184
+ children: [
185
+ /*#__PURE__*/ _jsx(InlineTipsTitle, {
186
+ children: content[type].title
187
+ }),
188
+ /*#__PURE__*/ _jsx(InlineTipsDescription, {
189
+ children: content[type].description
190
+ })
191
+ ]
192
+ }),
193
+ /*#__PURE__*/ _jsxs(InlineTipsActions, {
194
+ children: [
195
+ /*#__PURE__*/ _jsx(InlineTipsAction, {
196
+ variant: "primary",
197
+ children: "Label"
198
+ }),
199
+ /*#__PURE__*/ _jsx(InlineTipsAction, {
200
+ variant: "secondary",
201
+ children: "Label"
202
+ })
203
+ ]
204
+ })
205
+ ]
206
+ }, type))
207
+ ]
208
+ })
209
+ ]
210
+ });
211
+ }
212
+ };
213
+
214
+ //# sourceMappingURL=inline-tips.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/inline-tips/inline-tips.stories.tsx"],"sourcesContent":["import type {Meta, StoryObj} from '@storybook/react';\nimport {Code, Header} from 'components/typography';\nimport {\n InlineTips,\n InlineTipsAction,\n InlineTipsActions,\n InlineTipsContent,\n InlineTipsDescription,\n InlineTipsTitle,\n} from './inline-tips';\n\nconst meta = {\n title: 'Components/InlineTips',\n component: InlineTips,\n tags: ['autodocs'],\n argTypes: {\n type: {\n control: 'select',\n options: ['default', 'info', 'success', 'destructive'],\n },\n variant: {\n control: 'select',\n options: ['primary', 'secondary'],\n },\n },\n args: {\n type: 'default',\n variant: 'primary',\n },\n} satisfies Meta<typeof InlineTips>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nconst types = ['default', 'info', 'success', 'destructive'] as const;\nconst variants = ['primary', 'secondary'] as const;\n\nexport const Default: Story = {\n render: (args) => {\n return (\n <InlineTips {...args}>\n <InlineTipsContent>\n <InlineTipsTitle>Title</InlineTipsTitle>\n <InlineTipsDescription>Description</InlineTipsDescription>\n </InlineTipsContent>\n <InlineTipsActions>\n <InlineTipsAction variant={args.variant}>Label</InlineTipsAction>\n <InlineTipsAction variant={args.variant}>Label</InlineTipsAction>\n </InlineTipsActions>\n </InlineTips>\n );\n },\n};\n\nexport const Variants: Story = {\n render: () => {\n return (\n <div className=\"flex flex-col gap-16\">\n {variants.map((variant) => (\n <InlineTips key={variant} type=\"default\" variant={variant}>\n <InlineTipsContent>\n <InlineTipsTitle>Title</InlineTipsTitle>\n <InlineTipsDescription>Description</InlineTipsDescription>\n </InlineTipsContent>\n <InlineTipsActions>\n <InlineTipsAction variant=\"primary\">Label</InlineTipsAction>\n <InlineTipsAction variant=\"secondary\">Label</InlineTipsAction>\n </InlineTipsActions>\n </InlineTips>\n ))}\n </div>\n );\n },\n};\n\nexport const DesignMock: Story = {\n render: () => {\n const content = {\n default: {title: 'Title', description: 'Description'},\n info: {title: 'Title', description: 'Description'},\n success: {title: 'Title', description: 'Description'},\n destructive: {title: \"Don't's\", description: 'Title'},\n };\n\n return (\n <div className=\"flex flex-col gap-32 pb-64 pt-32 px-32 bg-background-neutral-base\">\n <Header variant=\"h3\" className=\"text-foreground-neutral-subtle\">\n INLINE TIPS\n </Header>\n <div className=\"flex flex-col gap-16\">\n <Code variant=\"label\" className=\"text-foreground-neutral-subtle\">\n Primary\n </Code>\n {types.map((type) => (\n <InlineTips key={type} type={type} variant=\"primary\">\n <InlineTipsContent>\n <InlineTipsTitle>{content[type].title}</InlineTipsTitle>\n <InlineTipsDescription>{content[type].description}</InlineTipsDescription>\n </InlineTipsContent>\n <InlineTipsActions>\n <InlineTipsAction variant=\"primary\">Label</InlineTipsAction>\n <InlineTipsAction variant=\"secondary\">Label</InlineTipsAction>\n </InlineTipsActions>\n </InlineTips>\n ))}\n <Code variant=\"label\" className=\"text-foreground-neutral-subtle\">\n Secondary\n </Code>\n {types.map((type) => (\n <InlineTips key={type} type={type} variant=\"secondary\">\n <InlineTipsContent>\n <InlineTipsTitle>{content[type].title}</InlineTipsTitle>\n <InlineTipsDescription>{content[type].description}</InlineTipsDescription>\n </InlineTipsContent>\n <InlineTipsActions>\n <InlineTipsAction variant=\"primary\">Label</InlineTipsAction>\n <InlineTipsAction variant=\"secondary\">Label</InlineTipsAction>\n </InlineTipsActions>\n </InlineTips>\n ))}\n </div>\n </div>\n );\n },\n};\n"],"names":["Code","Header","InlineTips","InlineTipsAction","InlineTipsActions","InlineTipsContent","InlineTipsDescription","InlineTipsTitle","meta","title","component","tags","argTypes","type","control","options","variant","args","types","variants","Default","render","Variants","div","className","map","DesignMock","content","default","description","info","success","destructive"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export * from './textarea';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './textarea.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/textarea/index.ts"],"sourcesContent":["export * from './textarea';\n"],"names":[],"mappings":"AAAA,cAAc,aAAa"}
@@ -0,0 +1,10 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import type { ComponentProps } from 'react';
3
+ export declare const textareaVariants: (props?: ({
4
+ variant?: "base" | "component" | null | undefined;
5
+ size?: "base" | "small" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> & VariantProps<typeof textareaVariants>;
8
+ export declare function Textarea({ className, variant, size, ...props }: TextareaProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,OAAO,CAAC;AAG1C,eAAO,MAAM,gBAAgB;;;8EAe3B,CAAC;AAEH,KAAK,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,GAC3D,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAExC,wBAAgB,QAAQ,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,EAAC,EAAE,aAAa,2CAiB3E"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from 'class-variance-authority';
3
+ import { cn } from '../../utils/cn.js';
4
+ export const textareaVariants = cva('', {
5
+ variants: {
6
+ variant: {
7
+ base: 'bg-background-field-base',
8
+ component: 'bg-background-field-component'
9
+ },
10
+ size: {
11
+ base: 'py-6',
12
+ small: 'py-4'
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ variant: 'base',
17
+ size: 'base'
18
+ }
19
+ });
20
+ export function Textarea({ className, variant, size, ...props }) {
21
+ return /*#__PURE__*/ _jsx("textarea", {
22
+ "data-slot": "textarea",
23
+ className: cn('textarea-resize-custom placeholder:text-foreground-neutral-muted w-full min-w-0 rounded-6 px-8 pr-24 text-sm leading-20 text-foreground-neutral-base shadow-border-base transition-[color,box-shadow] outline-none', 'hover:bg-background-field-hover', 'selection:bg-background-accent-neutral-soft selection:text-foreground-neutral-on-inverted', 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-background-neutral-disabled disabled:shadow-none disabled:text-foreground-neutral-disabled', 'focus-visible:shadow-border-interactive-with-active', 'aria-invalid:shadow-border-error', textareaVariants({
24
+ variant,
25
+ size
26
+ }), className),
27
+ ...props
28
+ });
29
+ }
30
+
31
+ //# sourceMappingURL=textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/textarea/textarea.tsx"],"sourcesContent":["import {cva, type VariantProps} from 'class-variance-authority';\nimport type {ComponentProps} from 'react';\nimport {cn} from 'utils/cn';\n\nexport const textareaVariants = cva('', {\n variants: {\n variant: {\n base: 'bg-background-field-base',\n component: 'bg-background-field-component',\n },\n size: {\n base: 'py-6',\n small: 'py-4',\n },\n },\n defaultVariants: {\n variant: 'base',\n size: 'base',\n },\n});\n\ntype TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> &\n VariantProps<typeof textareaVariants>;\n\nexport function Textarea({className, variant, size, ...props}: TextareaProps) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'textarea-resize-custom placeholder:text-foreground-neutral-muted w-full min-w-0 rounded-6 px-8 pr-24 text-sm leading-20 text-foreground-neutral-base shadow-border-base transition-[color,box-shadow] outline-none',\n 'hover:bg-background-field-hover',\n 'selection:bg-background-accent-neutral-soft selection:text-foreground-neutral-on-inverted',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-background-neutral-disabled disabled:shadow-none disabled:text-foreground-neutral-disabled',\n 'focus-visible:shadow-border-interactive-with-active',\n 'aria-invalid:shadow-border-error',\n textareaVariants({variant, size}),\n className,\n )}\n {...props}\n />\n );\n}\n"],"names":["cva","cn","textareaVariants","variants","variant","base","component","size","small","defaultVariants","Textarea","className","props","textarea","data-slot"],"mappings":";AAAA,SAAQA,GAAG,QAA0B,2BAA2B;AAEhE,SAAQC,EAAE,QAAO,WAAW;AAE5B,OAAO,MAAMC,mBAAmBF,IAAI,IAAI;IACtCG,UAAU;QACRC,SAAS;YACPC,MAAM;YACNC,WAAW;QACb;QACAC,MAAM;YACJF,MAAM;YACNG,OAAO;QACT;IACF;IACAC,iBAAiB;QACfL,SAAS;QACTG,MAAM;IACR;AACF,GAAG;AAKH,OAAO,SAASG,SAAS,EAACC,SAAS,EAAEP,OAAO,EAAEG,IAAI,EAAE,GAAGK,OAAqB;IAC1E,qBACE,KAACC;QACCC,aAAU;QACVH,WAAWV,GACT,sNACA,mCACA,6FACA,mKACA,uDACA,oCACAC,iBAAiB;YAACE;YAASG;QAAI,IAC/BI;QAED,GAAGC,KAAK;;AAGf"}