@anker-in/headless-ui 1.0.9-temp-box → 1.0.9-temp-11

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 (154) hide show
  1. package/dist/cjs/apps/playground/utils/classnames.d.ts +1 -0
  2. package/dist/cjs/biz-components/AccordionCards/useDebounce.d.ts +6 -0
  3. package/dist/cjs/biz-components/CreativeModule/index.d.ts +20 -0
  4. package/dist/cjs/biz-components/CreativeModule/index.js +2 -0
  5. package/dist/cjs/biz-components/CreativeModule/index.js.map +7 -0
  6. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  7. package/dist/cjs/biz-components/Graphic/index.js.map +2 -2
  8. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  9. package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +2 -2
  10. package/dist/cjs/biz-components/MediaPlayerMulti/YouTubePlayer.d.ts +3 -0
  11. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  12. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +1 -1
  13. package/dist/cjs/biz-components/SectionHeading/SectionHeading.d.ts +4 -0
  14. package/dist/cjs/biz-components/SectionHeading/types.d.ts +6 -0
  15. package/dist/cjs/biz-components/Shelf/Shelf.d.ts +8 -0
  16. package/dist/cjs/biz-components/Shelf/index.d.ts +1 -0
  17. package/dist/cjs/biz-components/Shelf/types.d.ts +6 -0
  18. package/dist/cjs/biz-components/ShelfDisplay/tab.d.ts +7 -0
  19. package/dist/cjs/biz-components/Title/index.js +1 -1
  20. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  21. package/dist/cjs/biz-components/Title/types.d.ts +4 -0
  22. package/dist/cjs/biz-components/Title/types.js +1 -1
  23. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  24. package/dist/cjs/components/col.d.ts +29 -0
  25. package/dist/cjs/components/dropdown.d.ts +27 -0
  26. package/dist/cjs/components/row.d.ts +18 -0
  27. package/dist/cjs/helpers/get-subtree.d.ts +12 -0
  28. package/dist/cjs/packages/ui/src/components/avatar.d.ts +26 -0
  29. package/dist/cjs/packages/ui/src/components/index.d.ts +20 -0
  30. package/dist/cjs/packages/ui/src/index.d.ts +1 -0
  31. package/dist/cjs/packages/ui/src/stories/avatar.stories.d.ts +40 -0
  32. package/dist/cjs/packages/ui/src/stories/badge.stories.d.ts +26 -0
  33. package/dist/cjs/packages/ui/src/stories/button.stories.d.ts +48 -0
  34. package/dist/cjs/packages/ui/src/stories/checkbox.stories.d.ts +46 -0
  35. package/dist/cjs/packages/ui/src/stories/container.stories.d.ts +36 -0
  36. package/dist/cjs/packages/ui/src/stories/dialog.stories.d.ts +20 -0
  37. package/dist/cjs/packages/ui/src/stories/grid.stories.d.ts +42 -0
  38. package/dist/cjs/packages/ui/src/stories/heading.stories.d.ts +82 -0
  39. package/dist/cjs/packages/ui/src/stories/input.stories.d.ts +35 -0
  40. package/dist/cjs/packages/ui/src/stories/picture.stories.d.ts +18 -0
  41. package/dist/cjs/packages/ui/src/stories/popover.stories.d.ts +17 -0
  42. package/dist/cjs/packages/ui/src/stories/radio.stories.d.ts +39 -0
  43. package/dist/cjs/packages/ui/src/stories/skeleton.stories.d.ts +20 -0
  44. package/dist/cjs/packages/ui/src/stories/text.stories.d.ts +94 -0
  45. package/dist/cjs/shared/Styles.js +1 -1
  46. package/dist/cjs/shared/Styles.js.map +2 -2
  47. package/dist/cjs/src/components/index.d.ts +21 -0
  48. package/dist/cjs/src/components/input-number.d.ts +47 -0
  49. package/dist/cjs/src/index.d.ts +1 -0
  50. package/dist/cjs/src/stories/avatar.stories.d.ts +40 -0
  51. package/dist/cjs/src/stories/badge.stories.d.ts +26 -0
  52. package/dist/cjs/src/stories/button.stories.d.ts +48 -0
  53. package/dist/cjs/src/stories/checkbox.stories.d.ts +46 -0
  54. package/dist/cjs/src/stories/container.stories.d.ts +36 -0
  55. package/dist/cjs/src/stories/dialog.stories.d.ts +20 -0
  56. package/dist/cjs/src/stories/grid.stories.d.ts +42 -0
  57. package/dist/cjs/src/stories/heading.stories.d.ts +82 -0
  58. package/dist/cjs/src/stories/input-number.stories.d.ts +51 -0
  59. package/dist/cjs/src/stories/input.stories.d.ts +35 -0
  60. package/dist/cjs/src/stories/picture.stories.d.ts +18 -0
  61. package/dist/cjs/src/stories/popover.stories.d.ts +17 -0
  62. package/dist/cjs/src/stories/radio.stories.d.ts +39 -0
  63. package/dist/cjs/src/stories/skeleton.stories.d.ts +20 -0
  64. package/dist/cjs/src/stories/text.stories.d.ts +94 -0
  65. package/dist/cjs/stories/creativeModule.stories.d.ts +18 -0
  66. package/dist/cjs/stories/creativeModule.stories.js +2 -0
  67. package/dist/cjs/stories/creativeModule.stories.js.map +7 -0
  68. package/dist/cjs/stories/shelf.stories.d.ts +17 -0
  69. package/dist/cjs/tailwind.config.d.ts +253 -0
  70. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  71. package/dist/esm/apps/playground/utils/classnames.d.ts +1 -0
  72. package/dist/esm/biz-components/AccordionCards/useDebounce.d.ts +6 -0
  73. package/dist/esm/biz-components/CreativeModule/index.d.ts +20 -0
  74. package/dist/esm/biz-components/CreativeModule/index.js +2 -0
  75. package/dist/esm/biz-components/CreativeModule/index.js.map +7 -0
  76. package/dist/esm/biz-components/Graphic/index.js +1 -1
  77. package/dist/esm/biz-components/Graphic/index.js.map +2 -2
  78. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  79. package/dist/esm/biz-components/MediaPlayerBase/index.js.map +2 -2
  80. package/dist/esm/biz-components/MediaPlayerMulti/YouTubePlayer.d.ts +3 -0
  81. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  82. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +1 -1
  83. package/dist/esm/biz-components/SectionHeading/SectionHeading.d.ts +4 -0
  84. package/dist/esm/biz-components/SectionHeading/types.d.ts +6 -0
  85. package/dist/esm/biz-components/Shelf/Shelf.d.ts +8 -0
  86. package/dist/esm/biz-components/Shelf/index.d.ts +1 -0
  87. package/dist/esm/biz-components/Shelf/types.d.ts +6 -0
  88. package/dist/esm/biz-components/ShelfDisplay/tab.d.ts +7 -0
  89. package/dist/esm/biz-components/Title/index.js +1 -1
  90. package/dist/esm/biz-components/Title/index.js.map +3 -3
  91. package/dist/esm/biz-components/Title/types.d.ts +4 -0
  92. package/dist/esm/components/col.d.ts +29 -0
  93. package/dist/esm/components/dropdown.d.ts +27 -0
  94. package/dist/esm/components/row.d.ts +18 -0
  95. package/dist/esm/helpers/get-subtree.d.ts +12 -0
  96. package/dist/esm/packages/ui/src/components/avatar.d.ts +26 -0
  97. package/dist/esm/packages/ui/src/components/index.d.ts +20 -0
  98. package/dist/esm/packages/ui/src/index.d.ts +1 -0
  99. package/dist/esm/packages/ui/src/stories/avatar.stories.d.ts +40 -0
  100. package/dist/esm/packages/ui/src/stories/badge.stories.d.ts +26 -0
  101. package/dist/esm/packages/ui/src/stories/button.stories.d.ts +48 -0
  102. package/dist/esm/packages/ui/src/stories/checkbox.stories.d.ts +46 -0
  103. package/dist/esm/packages/ui/src/stories/container.stories.d.ts +36 -0
  104. package/dist/esm/packages/ui/src/stories/dialog.stories.d.ts +20 -0
  105. package/dist/esm/packages/ui/src/stories/grid.stories.d.ts +42 -0
  106. package/dist/esm/packages/ui/src/stories/heading.stories.d.ts +82 -0
  107. package/dist/esm/packages/ui/src/stories/input.stories.d.ts +35 -0
  108. package/dist/esm/packages/ui/src/stories/picture.stories.d.ts +18 -0
  109. package/dist/esm/packages/ui/src/stories/popover.stories.d.ts +17 -0
  110. package/dist/esm/packages/ui/src/stories/radio.stories.d.ts +39 -0
  111. package/dist/esm/packages/ui/src/stories/skeleton.stories.d.ts +20 -0
  112. package/dist/esm/packages/ui/src/stories/text.stories.d.ts +94 -0
  113. package/dist/esm/shared/Styles.js +1 -1
  114. package/dist/esm/shared/Styles.js.map +2 -2
  115. package/dist/esm/src/components/index.d.ts +21 -0
  116. package/dist/esm/src/components/input-number.d.ts +47 -0
  117. package/dist/esm/src/index.d.ts +1 -0
  118. package/dist/esm/src/stories/avatar.stories.d.ts +40 -0
  119. package/dist/esm/src/stories/badge.stories.d.ts +26 -0
  120. package/dist/esm/src/stories/button.stories.d.ts +48 -0
  121. package/dist/esm/src/stories/checkbox.stories.d.ts +46 -0
  122. package/dist/esm/src/stories/container.stories.d.ts +36 -0
  123. package/dist/esm/src/stories/dialog.stories.d.ts +20 -0
  124. package/dist/esm/src/stories/grid.stories.d.ts +42 -0
  125. package/dist/esm/src/stories/heading.stories.d.ts +82 -0
  126. package/dist/esm/src/stories/input-number.stories.d.ts +51 -0
  127. package/dist/esm/src/stories/input.stories.d.ts +35 -0
  128. package/dist/esm/src/stories/picture.stories.d.ts +18 -0
  129. package/dist/esm/src/stories/popover.stories.d.ts +17 -0
  130. package/dist/esm/src/stories/radio.stories.d.ts +39 -0
  131. package/dist/esm/src/stories/skeleton.stories.d.ts +20 -0
  132. package/dist/esm/src/stories/text.stories.d.ts +94 -0
  133. package/dist/esm/stories/creativeModule.stories.d.ts +18 -0
  134. package/dist/esm/stories/creativeModule.stories.js +2 -0
  135. package/dist/esm/stories/creativeModule.stories.js.map +7 -0
  136. package/dist/esm/stories/shelf.stories.d.ts +17 -0
  137. package/dist/esm/stories/tabs.stories.d.ts +1 -1
  138. package/dist/esm/tailwind.config.d.ts +253 -0
  139. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  140. package/package.json +1 -1
  141. package/dist/cjs/biz-components/WhyChooses/WhyChoose.d.ts +0 -14
  142. package/dist/cjs/biz-components/WhyChooses/index.d.ts +0 -2
  143. package/dist/cjs/biz-components/WhyChooses/types.d.ts +0 -11
  144. package/dist/esm/biz-components/WhyChooses/WhyChoose.d.ts +0 -14
  145. package/dist/esm/biz-components/WhyChooses/index.d.ts +0 -2
  146. package/dist/esm/biz-components/WhyChooses/types.d.ts +0 -11
  147. /package/dist/cjs/biz-components/{Faq/type.d.ts → SectionHeading/index.d.ts} +0 -0
  148. /package/dist/cjs/{biz-components/WhyChoose/type.d.ts → components/inputnumber.d.ts} +0 -0
  149. /package/dist/cjs/hooks/{useExposure.d.ts → useEXposure.d.ts} +0 -0
  150. /package/dist/cjs/stories/{WhyChoose.stories.d.ts → whychoose.stories.d.ts} +0 -0
  151. /package/dist/esm/biz-components/{Faq/type.d.ts → SectionHeading/index.d.ts} +0 -0
  152. /package/dist/esm/{biz-components/WhyChoose/type.d.ts → components/inputnumber.d.ts} +0 -0
  153. /package/dist/esm/hooks/{useExposure.d.ts → useEXposure.d.ts} +0 -0
  154. /package/dist/esm/stories/{WhyChoose.stories.d.ts → whychoose.stories.d.ts} +0 -0
@@ -0,0 +1,94 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<import("../components/text.js").TextProps & React.RefAttributes<HTMLSpanElement>>;
6
+ parameters: {
7
+ layout: string;
8
+ docs: {
9
+ description: {
10
+ component: string;
11
+ };
12
+ };
13
+ };
14
+ tags: string[];
15
+ argTypes: {
16
+ size: {
17
+ control: {
18
+ type: "select";
19
+ };
20
+ description: string;
21
+ options: (string | number)[];
22
+ table: {
23
+ defaultValue: {
24
+ summary: string;
25
+ };
26
+ };
27
+ };
28
+ weight: {
29
+ control: {
30
+ type: "select";
31
+ };
32
+ options: string[];
33
+ table: {
34
+ defaultValue: {
35
+ summary: string;
36
+ };
37
+ };
38
+ };
39
+ align: {
40
+ control: {
41
+ type: "select";
42
+ };
43
+ options: string[];
44
+ table: {
45
+ defaultValue: {
46
+ summary: undefined;
47
+ };
48
+ };
49
+ };
50
+ color: {
51
+ control: {
52
+ type: "color";
53
+ };
54
+ };
55
+ as: {
56
+ control: {
57
+ type: "select";
58
+ };
59
+ description: string;
60
+ options: string[];
61
+ table: {
62
+ defaultValue: {
63
+ summary: string;
64
+ };
65
+ };
66
+ };
67
+ lineHeights: {
68
+ control: {
69
+ type: "select";
70
+ };
71
+ description: string;
72
+ options: string[];
73
+ };
74
+ html: {
75
+ type: "string";
76
+ description: string;
77
+ };
78
+ };
79
+ args: {
80
+ size: "none";
81
+ weight: "normal";
82
+ align: "left";
83
+ lineHeights: "normal";
84
+ html: string;
85
+ as: "p";
86
+ };
87
+ };
88
+ export default meta;
89
+ type Story = StoryObj<typeof meta>;
90
+ export declare const Default: Story;
91
+ export declare const Sizes: Story;
92
+ export declare const weight: Story;
93
+ export declare const LineHeights: Story;
94
+ export declare const Html: Story;
@@ -1,2 +1,2 @@
1
- "use strict";var R=Object.create;var l=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty;var I=(t,n)=>{for(var e in n)l(t,e,{get:n[e],enumerable:!0})},m=(t,n,e,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of x(n))!G.call(t,r)&&r!==e&&l(t,r,{get:()=>n[r],enumerable:!(s=w(n,r))||s.enumerable});return t};var d=(t,n,e)=>(e=t!=null?R(h(t)):{},m(n||!t||!t.__esModule?l(e,"default",{value:t,enumerable:!0}):e,t)),T=t=>m(l({},"__esModule",{value:!0}),t);var _={};I(_,{getStylesProps:()=>f,useStyles:()=>C,withLayout:()=>W});module.exports=T(_);var a=require("react/jsx-runtime"),i=d(require("react")),P=require("./simpleHash.js"),S=d(require("./getKeyPropsString.js")),c=require("../components/gird.js"),g=require("../components/container.js");const u={12:"col-start-1 col-end-13",10:"col-start-2 col-end-12",8:"col-start-3 col-end-11",6:"col-start-4 col-end-10",4:"col-start-5 col-end-9"},p=t=>{const n=(0,S.default)(t);return`style_${(0,P.simpleHash)(n)}`},f=t=>{const{style:n,uid:e,disabled:s}=t;return{style:n,uid:e,disabled:s}},H=({style:t,uid:n=p({}),disabled:e=!1})=>!t||e?null:(0,a.jsx)("style",{suppressHydrationWarning:!0,"data-style-id":n,children:`.block-${n} { ${t} }`}),C=(t,n)=>{const e=(0,i.useMemo)(()=>t?.uid||p({...t,data:n}),[n,t]),s=(0,i.useMemo)(()=>(0,a.jsx)(H,{...t,uid:e}),[t,e]);return{className:`block-${e} `,StyleComponent:s,uid:e}},L=t=>{const{desktopSpan:n,mobileSpan:e}=t?.container||{};return`${e?`${u[e]}`:""} ${n?`${u[n].split(" ").map(s=>`tablet:${s}`).join(" ")}`:""}`};function W(t,n){const e=i.default.forwardRef((s,r)=>{const $={...n,...f(s)},{className:y,StyleComponent:b}=C($,s?.data),N=o=>(0,a.jsx)(g.Container,{className:`${y} ${o?.className}`,children:(0,a.jsx)(c.Grid,{className:"container_grid",children:(0,a.jsx)(c.GridItem,{className:L(o),children:(0,a.jsx)(t,{...o,ref:r})})})}),k=o=>(0,a.jsx)(t,{...o,className:`${y} ${o?.className}`,ref:r});return(0,a.jsxs)(a.Fragment,{children:[b,s?.container?N(s):k(s)]})});return e.displayName=t.displayName||t.name||"Component",e}
1
+ "use strict";var k=Object.create;var l=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty;var I=(t,n)=>{for(var e in n)l(t,e,{get:n[e],enumerable:!0})},m=(t,n,e,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of h(n))!G.call(t,r)&&r!==e&&l(t,r,{get:()=>n[r],enumerable:!(s=w(n,r))||s.enumerable});return t};var d=(t,n,e)=>(e=t!=null?k(x(t)):{},m(n||!t||!t.__esModule?l(e,"default",{value:t,enumerable:!0}):e,t)),T=t=>m(l({},"__esModule",{value:!0}),t);var W={};I(W,{getStylesProps:()=>f,useStyles:()=>C,withLayout:()=>L});module.exports=T(W);var a=require("react/jsx-runtime"),i=d(require("react")),P=require("./simpleHash.js"),S=d(require("./getKeyPropsString.js")),c=require("../components/gird.js"),g=require("../components/container.js");const u={12:"col-start-1 col-end-13",10:"col-start-2 col-end-12",8:"col-start-3 col-end-11",6:"col-start-4 col-end-10",4:"col-start-5 col-end-9"},p=t=>{const n=(0,S.default)(t);return`style_${(0,P.simpleHash)(n)}`},f=t=>{const{style:n,uid:e,disabled:s}=t;return{style:n,uid:e,disabled:s}},H=({style:t,uid:n=p({}),disabled:e=!1})=>!t||e?null:(0,a.jsx)("style",{suppressHydrationWarning:!0,"data-style-id":n,children:`.block-${n} { ${t} }`}),C=(t,n)=>{const e=(0,i.useMemo)(()=>t?.uid||p({...t,data:n}),[n,t]),s=(0,i.useMemo)(()=>(0,a.jsx)(H,{...t,uid:e}),[t,e]);return{className:`block-${e} `,StyleComponent:s,uid:e}},K=t=>{const{desktopSpan:n,mobileSpan:e}=t?.container||{};return`${e?`${u[e]}`:""} ${n?`${u[n].split(" ").map(s=>`tablet:${s}`).join(" ")}`:""}`};function L(t,n){const e=i.default.forwardRef((s,r)=>{const $={...n,...f(s)},{className:y,StyleComponent:b}=C($,s?.data),N=o=>(0,a.jsx)(g.Container,{className:`${y} ${o?.className}`,children:(0,a.jsx)(c.Grid,{className:"container_grid",children:(0,a.jsx)(c.GridItem,{className:K(o),children:(0,a.jsx)(t,{...o,ref:r})})})}),R=o=>(0,a.jsx)(t,{...o,className:`${y} ${o?.className}`,ref:r});return(0,a.jsxs)(a.Fragment,{children:[b,Reflect.ownKeys(s?.container).length>0?N(s):R(s)]})});return e.displayName=t.displayName||t.name||"Component",e}
2
2
  //# sourceMappingURL=Styles.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/shared/Styles.tsx"],
4
- "sourcesContent": ["import React, { useMemo } from 'react'\nimport { simpleHash } from './simpleHash.js'\nimport getKeyPropsString from './getKeyPropsString.js'\nimport { Grid, GridItem } from '../components/gird.js'\nimport { Container } from '../components/container.js'\n\nconst colContentClasses: Record<number, string> = {\n 12: 'col-start-1 col-end-13',\n 10: 'col-start-2 col-end-12',\n 8: 'col-start-3 col-end-11',\n 6: 'col-start-4 col-end-10',\n 4: 'col-start-5 col-end-9',\n} as const\n\nexport interface ContainerProps {\n container?: {\n /** \u684C\u9762\u7AEF\u5217\u5185\u5BB9\u5BBD\u5EA6 */\n desktopSpan: number\n /** \u79FB\u52A8\u7AEF\u5217\u5185\u5BB9\u5BBD\u5EA6 */\n mobileSpan: number\n }\n}\n\nexport interface StylesProps {\n /** \u81EA\u5B9A\u4E49\u6837\u5F0F\u5B57\u7B26\u4E32 */\n style?: string\n /** \u552F\u4E00\u6807\u8BC6\u7B26 */\n uid?: string\n /** \u662F\u5426\u7981\u7528 */\n disabled?: boolean\n}\n\n/**\n * \u6839\u636E props \u751F\u6210\u786E\u5B9A\u6027 uid\n */\nconst generateUID = (props: Record<string, any>) => {\n const keyString = getKeyPropsString(props)\n return `style_${simpleHash(keyString)}`\n}\n\n/**\n * \u4ECE\u7EC4\u4EF6 props \u4E2D\u63D0\u53D6\u6837\u5F0F\u76F8\u5173\u5C5E\u6027\n */\nexport const getStylesProps = <T extends Record<string, unknown>>(props: T & StylesProps): StylesProps => {\n const { style, uid, disabled } = props\n return { style, uid, disabled }\n}\n\n/**\n * \u6837\u5F0F\u6CE8\u5165\u7EC4\u4EF6\n */\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID({}), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return <style suppressHydrationWarning data-style-id={uid}>{`.block-${uid} { ${style} }`}</style>\n}\n\n/**\n * \u6837\u5F0F Hook\uFF0C\u8FD4\u56DE\u6837\u5F0F\u7C7B\u540D\u548C\u6837\u5F0F\u7EC4\u4EF6\n * @param styleProps - \u6837\u5F0F\u5C5E\u6027\n */\nexport const useStyles = (styleProps: Partial<StylesProps>, data?: Record<string, any>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID({ ...styleProps, data }), [data, styleProps])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n } as const\n}\n\nconst getContainerClassName = (props?: Partial<StylesProps & ContainerProps>) => {\n const { desktopSpan, mobileSpan } = props?.container || {}\n return `${mobileSpan ? `${colContentClasses[mobileSpan]}` : ''} ${\n desktopSpan\n ? `${colContentClasses[desktopSpan]\n .split(' ')\n .map(item => `tablet:${item}`)\n .join(' ')}`\n : ''\n }`\n}\n\n/**\n * \u9AD8\u9636\u7EC4\u4EF6\uFF0C \u7528\u4E8E\u7ED9\u7EC4\u4EF6\u7528style \u6807\u7B7E\u7684\u5F62\u5F0F\u8FFD\u52A0\u6837\u5F0F\n * @param WrappedComponent - \u9700\u8981\u5305\u88C5\u7684\u7EC4\u4EF6\n * @param defaultLayoutProps - \u9ED8\u8BA4\u6837\u5F0F\u5C5E\u6027\n */\nexport function withLayout<P extends object>(\n WrappedComponent: React.ComponentType<P>,\n defaultLayoutProps?: Partial<StylesProps & ContainerProps>\n) {\n const withLayout = React.forwardRef<\n any,\n Omit<P, keyof StylesProps> &\n Partial<StylesProps & ContainerProps> & { className?: string; data?: Record<string, any> }\n >((props, ref) => {\n const finalStyleProps = {\n ...defaultLayoutProps,\n ...getStylesProps(props),\n }\n\n const { className, StyleComponent } = useStyles(finalStyleProps, (props as any)?.data)\n\n const WithContainerWrapper = (props: any) => {\n return (\n <Container className={`${className} ${(props as any)?.className}`}>\n <Grid className=\"container_grid\">\n <GridItem className={getContainerClassName(props)}>\n <WrappedComponent {...(props as unknown as P)} ref={ref} />\n </GridItem>\n </Grid>\n </Container>\n )\n }\n\n const WithoutContainerWrapper = (props: any) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n className={`${className} ${(props as any)?.className}`}\n ref={ref}\n />\n )\n }\n\n return (\n <>\n {StyleComponent}\n {(props as any)?.container ? WithContainerWrapper(props) : WithoutContainerWrapper(props)}\n </>\n )\n })\n\n // \u76F4\u63A5\u4F7F\u7528\u539F\u59CB\u7EC4\u4EF6\u7684\u540D\u79F0\n withLayout.displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'\n return withLayout\n}\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,cAAAC,EAAA,eAAAC,IAAA,eAAAC,EAAAL,GAwDS,IAAAM,EAAA,6BAxDTC,EAA+B,oBAC/BC,EAA2B,2BAC3BC,EAA8B,qCAC9BC,EAA+B,iCAC/BC,EAA0B,sCAE1B,MAAMC,EAA4C,CAChD,GAAI,yBACJ,GAAI,yBACJ,EAAG,yBACH,EAAG,yBACH,EAAG,uBACL,EAuBMC,EAAeC,GAA+B,CAClD,MAAMC,KAAY,EAAAC,SAAkBF,CAAK,EACzC,MAAO,YAAS,cAAWC,CAAS,CAAC,EACvC,EAKab,EAAqDY,GAAwC,CACxG,KAAM,CAAE,MAAAG,EAAO,IAAAC,EAAK,SAAAC,CAAS,EAAIL,EACjC,MAAO,CAAE,MAAAG,EAAO,IAAAC,EAAK,SAAAC,CAAS,CAChC,EAKMC,EAAgC,CAAC,CAAE,MAAAH,EAAO,IAAAC,EAAML,EAAY,CAAC,CAAC,EAAG,SAAAM,EAAW,EAAM,IAClF,CAACF,GAASE,EACL,QAGF,OAAC,SAAM,yBAAwB,GAAC,gBAAeD,EAAM,mBAAUA,CAAG,MAAMD,CAAK,KAAK,EAO9Ed,EAAY,CAACkB,EAAkCC,IAA+B,CACzF,MAAMJ,KAAM,WAAQ,IAAMG,GAAY,KAAOR,EAAY,CAAE,GAAGQ,EAAY,KAAAC,CAAK,CAAC,EAAG,CAACA,EAAMD,CAAU,CAAC,EAE/FE,KAAiB,WAAQ,OAAM,OAACH,EAAA,CAAQ,GAAGC,EAAY,IAAKH,EAAK,EAAI,CAACG,EAAYH,CAAG,CAAC,EAE5F,MAAO,CACL,UAAW,SAASA,CAAG,IACvB,eAAAK,EACA,IAAAL,CACF,CACF,EAEMM,EAAyBV,GAAkD,CAC/E,KAAM,CAAE,YAAAW,EAAa,WAAAC,CAAW,EAAIZ,GAAO,WAAa,CAAC,EACzD,MAAO,GAAGY,EAAa,GAAGd,EAAkBc,CAAU,CAAC,GAAK,EAAE,IAC5DD,EACI,GAAGb,EAAkBa,CAAW,EAC7B,MAAM,GAAG,EACT,IAAIE,GAAQ,UAAUA,CAAI,EAAE,EAC5B,KAAK,GAAG,CAAC,GACZ,EACN,EACF,EAOO,SAASvB,EACdwB,EACAC,EACA,CACA,MAAMzB,EAAa,EAAA0B,QAAM,WAIvB,CAAChB,EAAOiB,IAAQ,CAChB,MAAMC,EAAkB,CACtB,GAAGH,EACH,GAAG3B,EAAeY,CAAK,CACzB,EAEM,CAAE,UAAAmB,EAAW,eAAAV,CAAe,EAAIpB,EAAU6B,EAAkBlB,GAAe,IAAI,EAE/EoB,EAAwBpB,MAE1B,OAAC,aAAU,UAAW,GAAGmB,CAAS,IAAKnB,GAAe,SAAS,GAC7D,mBAAC,QAAK,UAAU,iBACd,mBAAC,YAAS,UAAWU,EAAsBV,CAAK,EAC9C,mBAACc,EAAA,CAAkB,GAAId,EAAwB,IAAKiB,EAAK,EAC3D,EACF,EACF,EAIEI,EAA2BrB,MAE7B,OAACc,EAAA,CACE,GAAId,EACL,UAAW,GAAGmB,CAAS,IAAKnB,GAAe,SAAS,GACpD,IAAKiB,EACP,EAIJ,SACE,oBACG,UAAAR,EACCT,GAAe,UAAYoB,EAAqBpB,CAAK,EAAIqB,EAAwBrB,CAAK,GAC1F,CAEJ,CAAC,EAGD,OAAAV,EAAW,YAAcwB,EAAiB,aAAeA,EAAiB,MAAQ,YAC3ExB,CACT",
4
+ "sourcesContent": ["import React, { useMemo } from 'react'\nimport { simpleHash } from './simpleHash.js'\nimport getKeyPropsString from './getKeyPropsString.js'\nimport { Grid, GridItem } from '../components/gird.js'\nimport { Container } from '../components/container.js'\n\nconst colContentClasses: Record<number, string> = {\n 12: 'col-start-1 col-end-13',\n 10: 'col-start-2 col-end-12',\n 8: 'col-start-3 col-end-11',\n 6: 'col-start-4 col-end-10',\n 4: 'col-start-5 col-end-9',\n} as const\n\nexport interface ContainerProps {\n container?: {\n /** \u684C\u9762\u7AEF\u5217\u5185\u5BB9\u5BBD\u5EA6 */\n desktopSpan: number\n /** \u79FB\u52A8\u7AEF\u5217\u5185\u5BB9\u5BBD\u5EA6 */\n mobileSpan: number\n }\n}\n\nexport interface StylesProps {\n /** \u81EA\u5B9A\u4E49\u6837\u5F0F\u5B57\u7B26\u4E32 */\n style?: string\n /** \u552F\u4E00\u6807\u8BC6\u7B26 */\n uid?: string\n /** \u662F\u5426\u7981\u7528 */\n disabled?: boolean\n}\n\n/**\n * \u6839\u636E props \u751F\u6210\u786E\u5B9A\u6027 uid\n */\nconst generateUID = (props: Record<string, any>) => {\n const keyString = getKeyPropsString(props)\n return `style_${simpleHash(keyString)}`\n}\n\n/**\n * \u4ECE\u7EC4\u4EF6 props \u4E2D\u63D0\u53D6\u6837\u5F0F\u76F8\u5173\u5C5E\u6027\n */\nexport const getStylesProps = <T extends Record<string, unknown>>(props: T & StylesProps): StylesProps => {\n const { style, uid, disabled } = props\n return { style, uid, disabled }\n}\n\n/**\n * \u6837\u5F0F\u6CE8\u5165\u7EC4\u4EF6\n */\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID({}), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return <style suppressHydrationWarning data-style-id={uid}>{`.block-${uid} { ${style} }`}</style>\n}\n\n/**\n * \u6837\u5F0F Hook\uFF0C\u8FD4\u56DE\u6837\u5F0F\u7C7B\u540D\u548C\u6837\u5F0F\u7EC4\u4EF6\n * @param styleProps - \u6837\u5F0F\u5C5E\u6027\n */\nexport const useStyles = (styleProps: Partial<StylesProps>, data?: Record<string, any>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID({ ...styleProps, data }), [data, styleProps])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n } as const\n}\n\nconst getContainerClassName = (props?: Partial<StylesProps & ContainerProps>) => {\n const { desktopSpan, mobileSpan } = props?.container || {}\n return `${mobileSpan ? `${colContentClasses[mobileSpan]}` : ''} ${\n desktopSpan\n ? `${colContentClasses[desktopSpan]\n .split(' ')\n .map(item => `tablet:${item}`)\n .join(' ')}`\n : ''\n }`\n}\n\n/**\n * \u9AD8\u9636\u7EC4\u4EF6\uFF0C \u7528\u4E8E\u7ED9\u7EC4\u4EF6\u7528style \u6807\u7B7E\u7684\u5F62\u5F0F\u8FFD\u52A0\u6837\u5F0F\n * @param WrappedComponent - \u9700\u8981\u5305\u88C5\u7684\u7EC4\u4EF6\n * @param defaultLayoutProps - \u9ED8\u8BA4\u6837\u5F0F\u5C5E\u6027\n */\nexport function withLayout<P extends object>(\n WrappedComponent: React.ComponentType<P>,\n defaultLayoutProps?: Partial<StylesProps & ContainerProps>\n) {\n const withLayout = React.forwardRef<\n any,\n Omit<P, keyof StylesProps> &\n Partial<StylesProps & ContainerProps> & { className?: string; data?: Record<string, any> }\n >((props, ref) => {\n const finalStyleProps = {\n ...defaultLayoutProps,\n ...getStylesProps(props),\n }\n\n const { className, StyleComponent } = useStyles(finalStyleProps, (props as any)?.data)\n\n const WithContainerWrapper = (props: any) => {\n return (\n <Container className={`${className} ${(props as any)?.className}`}>\n <Grid className=\"container_grid\">\n <GridItem className={getContainerClassName(props)}>\n <WrappedComponent {...(props as unknown as P)} ref={ref} />\n </GridItem>\n </Grid>\n </Container>\n )\n }\n\n const WithoutContainerWrapper = (props: any) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n className={`${className} ${(props as any)?.className}`}\n ref={ref}\n />\n )\n }\n\n return (\n <>\n {StyleComponent}\n {Reflect.ownKeys((props as any)?.container).length > 0\n ? WithContainerWrapper(props)\n : WithoutContainerWrapper(props)}\n </>\n )\n })\n\n // \u76F4\u63A5\u4F7F\u7528\u539F\u59CB\u7EC4\u4EF6\u7684\u540D\u79F0\n withLayout.displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'\n return withLayout\n}\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,cAAAC,EAAA,eAAAC,IAAA,eAAAC,EAAAL,GAwDS,IAAAM,EAAA,6BAxDTC,EAA+B,oBAC/BC,EAA2B,2BAC3BC,EAA8B,qCAC9BC,EAA+B,iCAC/BC,EAA0B,sCAE1B,MAAMC,EAA4C,CAChD,GAAI,yBACJ,GAAI,yBACJ,EAAG,yBACH,EAAG,yBACH,EAAG,uBACL,EAuBMC,EAAeC,GAA+B,CAClD,MAAMC,KAAY,EAAAC,SAAkBF,CAAK,EACzC,MAAO,YAAS,cAAWC,CAAS,CAAC,EACvC,EAKab,EAAqDY,GAAwC,CACxG,KAAM,CAAE,MAAAG,EAAO,IAAAC,EAAK,SAAAC,CAAS,EAAIL,EACjC,MAAO,CAAE,MAAAG,EAAO,IAAAC,EAAK,SAAAC,CAAS,CAChC,EAKMC,EAAgC,CAAC,CAAE,MAAAH,EAAO,IAAAC,EAAML,EAAY,CAAC,CAAC,EAAG,SAAAM,EAAW,EAAM,IAClF,CAACF,GAASE,EACL,QAGF,OAAC,SAAM,yBAAwB,GAAC,gBAAeD,EAAM,mBAAUA,CAAG,MAAMD,CAAK,KAAK,EAO9Ed,EAAY,CAACkB,EAAkCC,IAA+B,CACzF,MAAMJ,KAAM,WAAQ,IAAMG,GAAY,KAAOR,EAAY,CAAE,GAAGQ,EAAY,KAAAC,CAAK,CAAC,EAAG,CAACA,EAAMD,CAAU,CAAC,EAE/FE,KAAiB,WAAQ,OAAM,OAACH,EAAA,CAAQ,GAAGC,EAAY,IAAKH,EAAK,EAAI,CAACG,EAAYH,CAAG,CAAC,EAE5F,MAAO,CACL,UAAW,SAASA,CAAG,IACvB,eAAAK,EACA,IAAAL,CACF,CACF,EAEMM,EAAyBV,GAAkD,CAC/E,KAAM,CAAE,YAAAW,EAAa,WAAAC,CAAW,EAAIZ,GAAO,WAAa,CAAC,EACzD,MAAO,GAAGY,EAAa,GAAGd,EAAkBc,CAAU,CAAC,GAAK,EAAE,IAC5DD,EACI,GAAGb,EAAkBa,CAAW,EAC7B,MAAM,GAAG,EACT,IAAIE,GAAQ,UAAUA,CAAI,EAAE,EAC5B,KAAK,GAAG,CAAC,GACZ,EACN,EACF,EAOO,SAASvB,EACdwB,EACAC,EACA,CACA,MAAMzB,EAAa,EAAA0B,QAAM,WAIvB,CAAChB,EAAOiB,IAAQ,CAChB,MAAMC,EAAkB,CACtB,GAAGH,EACH,GAAG3B,EAAeY,CAAK,CACzB,EAEM,CAAE,UAAAmB,EAAW,eAAAV,CAAe,EAAIpB,EAAU6B,EAAkBlB,GAAe,IAAI,EAE/EoB,EAAwBpB,MAE1B,OAAC,aAAU,UAAW,GAAGmB,CAAS,IAAKnB,GAAe,SAAS,GAC7D,mBAAC,QAAK,UAAU,iBACd,mBAAC,YAAS,UAAWU,EAAsBV,CAAK,EAC9C,mBAACc,EAAA,CAAkB,GAAId,EAAwB,IAAKiB,EAAK,EAC3D,EACF,EACF,EAIEI,EAA2BrB,MAE7B,OAACc,EAAA,CACE,GAAId,EACL,UAAW,GAAGmB,CAAS,IAAKnB,GAAe,SAAS,GACpD,IAAKiB,EACP,EAIJ,SACE,oBACG,UAAAR,EACA,QAAQ,QAAST,GAAe,SAAS,EAAE,OAAS,EACjDoB,EAAqBpB,CAAK,EAC1BqB,EAAwBrB,CAAK,GACnC,CAEJ,CAAC,EAGD,OAAAV,EAAW,YAAcwB,EAAiB,aAAeA,EAAiB,MAAQ,YAC3ExB,CACT",
6
6
  "names": ["Styles_exports", "__export", "getStylesProps", "useStyles", "withLayout", "__toCommonJS", "import_jsx_runtime", "import_react", "import_simpleHash", "import_getKeyPropsString", "import_gird", "import_container", "colContentClasses", "generateUID", "props", "keyString", "getKeyPropsString", "style", "uid", "disabled", "Styles", "styleProps", "data", "StyleComponent", "getContainerClassName", "desktopSpan", "mobileSpan", "item", "WrappedComponent", "defaultLayoutProps", "React", "ref", "finalStyleProps", "className", "WithContainerWrapper", "WithoutContainerWrapper"]
7
7
  }
@@ -0,0 +1,21 @@
1
+ export { default as Button } from './button.js';
2
+ export { default as Badge } from './badge.js';
3
+ export * from './input.js';
4
+ export { default as Checkbox } from './checkbox.js';
5
+ export { default as Skeleton } from './skeleton.js';
6
+ export * from './dialog.js';
7
+ export * from './popover.js';
8
+ export * from './radio.js';
9
+ export * from './dialog.js';
10
+ export * from './text.js';
11
+ export * from './gird.js';
12
+ export * from './col.js';
13
+ export * from './row.js';
14
+ export * from './heading.js';
15
+ export * from './container.js';
16
+ export * from './color.js';
17
+ export * from './link.js';
18
+ export * from './avatar.js';
19
+ export * from './input-number.js';
20
+ export { default as Picture } from './picture.js';
21
+ export { default as Theme } from './theme.js';
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ import type { KeyboardEvent, FocusEvent } from 'react';
3
+ import { type VariantProps } from 'class-variance-authority';
4
+ import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
5
+ type ColorType = 'default' | 'success' | 'warning' | 'error' | null;
6
+ declare const InputNumber: React.ForwardRefExoticComponent<{
7
+ /** 类名*/
8
+ className?: string;
9
+ /** 输入框下方提示文本,会根据不同的 status 呈现不同的样式*/
10
+ tips?: string;
11
+ /** 文本框状态*/
12
+ status?: ColorType;
13
+ /** 数字输入框的值 */
14
+ value?: number;
15
+ /** 数字输入框的初始值 */
16
+ defaultValue?: number;
17
+ /** 数值改变步数 */
18
+ step?: number;
19
+ /** 最小值 */
20
+ min?: number;
21
+ /** 最大值 */
22
+ max?: number;
23
+ /** 是否禁用*/
24
+ disabled?: boolean;
25
+ /** 是否只读*/
26
+ readonly?: boolean;
27
+ /** 样式*/
28
+ style?: React.CSSProperties;
29
+ /** 值变化时触发*/
30
+ onChange?: (value: number) => void;
31
+ /** 失去焦点时触发*/
32
+ onBlur?: (value: number, e: FocusEvent) => void;
33
+ /** 按下回车键时触发*/
34
+ onEnter?: (value: number, e: KeyboardEvent) => void;
35
+ } & VariantProps<(props?: ({
36
+ status?: "default" | "success" | "warning" | "error" | null | undefined;
37
+ disabled?: boolean | null | undefined;
38
+ } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string> & ComponentPropsWithout<"div", RemovedProps> & React.RefAttributes<HTMLDivElement>>;
39
+ declare const InputNumberWrap: React.ForwardRefExoticComponent<{
40
+ /** 定义子组件作为父组件的类型,详细使用方式请参考radix-ui */
41
+ asChild?: boolean;
42
+ } & VariantProps<(props?: ({
43
+ status?: "default" | "success" | "warning" | "error" | null | undefined;
44
+ disabled?: boolean | null | undefined;
45
+ } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string> & ComponentPropsWithout<"div", RemovedProps> & React.RefAttributes<HTMLDivElement>>;
46
+ export default InputNumber;
47
+ export { InputNumberWrap };
@@ -0,0 +1 @@
1
+ export * from './components/index.js';
@@ -0,0 +1,40 @@
1
+ declare const meta: {
2
+ title: string;
3
+ component: import("react").ForwardRefExoticComponent<{
4
+ asChild?: boolean;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ onClick?: Function;
8
+ isAdaptation?: boolean;
9
+ minSize?: number;
10
+ maxSize?: number;
11
+ textClassName?: string;
12
+ } & import("class-variance-authority").VariantProps<(props?: ({
13
+ size?: "small" | "medium" | "large" | null | undefined;
14
+ } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string> & Omit<import("@radix-ui/react-avatar").AvatarProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
15
+ tags: string[];
16
+ subcomponents: any;
17
+ parameters: {
18
+ layout: string;
19
+ docs: {
20
+ description: {
21
+ component: string;
22
+ };
23
+ };
24
+ };
25
+ argTypes: {
26
+ size: {
27
+ description: string;
28
+ table: {
29
+ defaultValue: {
30
+ summary: string;
31
+ };
32
+ };
33
+ };
34
+ };
35
+ };
36
+ export default meta;
37
+ export declare const Default: () => import("react/jsx-runtime").JSX.Element;
38
+ export declare const AvatarType: () => import("react/jsx-runtime").JSX.Element;
39
+ export declare const AvatarTextAdaptation: () => import("react/jsx-runtime").JSX.Element;
40
+ export declare const AvatarSize: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { Badge } from '../components/index.js';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Badge;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ argTypes: {
11
+ variant: {
12
+ control: {
13
+ type: "select";
14
+ };
15
+ options: string[];
16
+ };
17
+ };
18
+ args: {
19
+ variant: "default";
20
+ children: string;
21
+ };
22
+ };
23
+ export default meta;
24
+ type Story = StoryObj<typeof meta>;
25
+ export declare const Default: Story;
26
+ export declare const Examples: Story;
@@ -0,0 +1,48 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<import("../components/button.js").ButtonProps & React.RefAttributes<HTMLButtonElement>>;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ argTypes: {
11
+ variant: {
12
+ control: {
13
+ type: "select";
14
+ };
15
+ options: string[];
16
+ };
17
+ size: {
18
+ control: {
19
+ type: "select";
20
+ };
21
+ options: string[];
22
+ };
23
+ hoverEffect: {
24
+ description: string;
25
+ control: {
26
+ type: "select";
27
+ };
28
+ options: string[];
29
+ };
30
+ };
31
+ args: {
32
+ variant: "primary";
33
+ size: "base";
34
+ children: string;
35
+ asChild: false;
36
+ disabled: false;
37
+ loading: false;
38
+ hoverEffect: "none";
39
+ };
40
+ };
41
+ export default meta;
42
+ type Story = StoryObj<typeof meta>;
43
+ export declare const Primary: Story;
44
+ export declare const Secondary: Story;
45
+ export declare const Link: Story;
46
+ export declare const WithIcon: Story;
47
+ export declare const Aschild: Story;
48
+ export declare const Spinner: Story;
@@ -0,0 +1,46 @@
1
+ import type { StoryObj } from '@storybook/react/*';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<import("../components/checkbox.js").CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
6
+ parameters: {
7
+ layout: string;
8
+ docs: {
9
+ description: {
10
+ component: string;
11
+ };
12
+ };
13
+ };
14
+ tags: string[];
15
+ argTypes: {
16
+ size: {
17
+ control: {
18
+ type: "select";
19
+ };
20
+ options: string[];
21
+ description: string;
22
+ table: {
23
+ defaultValue: {
24
+ summary: string;
25
+ };
26
+ };
27
+ };
28
+ };
29
+ args: {
30
+ size: "base";
31
+ };
32
+ };
33
+ export default meta;
34
+ type Story = StoryObj<typeof meta>;
35
+ export declare const Default: Story;
36
+ export declare const Sizes: {
37
+ (): import("react/jsx-runtime").JSX.Element;
38
+ parameters: {
39
+ docs: {
40
+ description: {
41
+ story: string;
42
+ };
43
+ };
44
+ };
45
+ };
46
+ export declare const Disabled: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { Container } from '../components/index.js';
3
+ import type { StoryObj } from '@storybook/react';
4
+ declare const meta: {
5
+ title: string;
6
+ component: React.ForwardRefExoticComponent<{
7
+ asChild?: boolean;
8
+ children?: React.ReactNode;
9
+ className?: string;
10
+ type?: "default" | "home" | "none";
11
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ parameters: {
13
+ layout: string;
14
+ docs: {
15
+ description: {
16
+ component: string;
17
+ };
18
+ };
19
+ };
20
+ tags: string[];
21
+ argTypes: {
22
+ type: {
23
+ description: string;
24
+ control: {
25
+ type: "select";
26
+ };
27
+ options: string[];
28
+ };
29
+ };
30
+ args: {
31
+ type: "default";
32
+ };
33
+ };
34
+ export default meta;
35
+ type Story = StoryObj<typeof Container>;
36
+ export declare const Default: Story;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { Dialog } from '../components/index.js';
3
+ import type { StoryObj } from '@storybook/react/*';
4
+ declare const meta: {
5
+ title: string;
6
+ component: React.FC<import("@radix-ui/react-dialog").DialogProps>;
7
+ subcomponents: any;
8
+ parameters: {
9
+ layout: string;
10
+ docs: {
11
+ description: {
12
+ component: string;
13
+ };
14
+ };
15
+ };
16
+ tags: string[];
17
+ };
18
+ export default meta;
19
+ type Story = StoryObj<typeof Dialog>;
20
+ export declare const Default: Story;
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { Container } from '../components/index.js';
3
+ import type { StoryObj } from '@storybook/react';
4
+ declare const meta: {
5
+ title: string;
6
+ component: React.ForwardRefExoticComponent<{
7
+ asChild?: boolean;
8
+ children?: React.ReactNode;
9
+ className?: string;
10
+ type?: "default" | "home" | "none";
11
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ subcomponents: any;
13
+ parameters: {
14
+ layout: string;
15
+ docs: {
16
+ description: {
17
+ component: string;
18
+ };
19
+ };
20
+ };
21
+ tags: string[];
22
+ argTypes: {
23
+ type: {
24
+ control: {
25
+ type: "select";
26
+ };
27
+ options: string[];
28
+ description: string;
29
+ table: {
30
+ defaultValue: {
31
+ summary: string;
32
+ };
33
+ };
34
+ };
35
+ };
36
+ args: {
37
+ type: "default";
38
+ };
39
+ };
40
+ export default meta;
41
+ type Story = StoryObj<typeof Container>;
42
+ export declare const Default: Story;
@@ -0,0 +1,82 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<import("../components/heading.js").HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
6
+ parameters: {
7
+ layout: string;
8
+ docs: {
9
+ description: {
10
+ component: string;
11
+ };
12
+ };
13
+ };
14
+ tags: string[];
15
+ argTypes: {
16
+ size: {
17
+ control: {
18
+ type: "select";
19
+ };
20
+ options: (string | number)[];
21
+ description: string;
22
+ table: {
23
+ defaultValue: {
24
+ summary: string;
25
+ };
26
+ };
27
+ };
28
+ weight: {
29
+ control: {
30
+ type: "select";
31
+ };
32
+ options: string[];
33
+ table: {
34
+ defaultValue: {
35
+ summary: string;
36
+ };
37
+ };
38
+ };
39
+ align: {
40
+ control: {
41
+ type: "select";
42
+ };
43
+ options: string[];
44
+ table: {
45
+ defaultValue: {
46
+ summary: undefined;
47
+ };
48
+ };
49
+ };
50
+ color: {
51
+ control: {
52
+ type: "color";
53
+ };
54
+ };
55
+ as: {
56
+ control: {
57
+ type: "select";
58
+ };
59
+ options: string[];
60
+ description: string;
61
+ table: {
62
+ defaultValue: {
63
+ summary: string;
64
+ };
65
+ };
66
+ };
67
+ html: {
68
+ type: "string";
69
+ description: string;
70
+ };
71
+ };
72
+ args: {
73
+ as: "h1";
74
+ size: "none";
75
+ weight: "normal";
76
+ align: "left";
77
+ };
78
+ };
79
+ export default meta;
80
+ type Story = StoryObj<typeof meta>;
81
+ export declare const Default: Story;
82
+ export declare const All: Story;
@@ -0,0 +1,51 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import("react").ForwardRefExoticComponent<{
5
+ className?: string;
6
+ tips?: string;
7
+ status?: "default" | "success" | "warning" | "error" | null;
8
+ value?: number;
9
+ defaultValue?: number;
10
+ step?: number;
11
+ min?: number;
12
+ max?: number;
13
+ disabled?: boolean;
14
+ readonly?: boolean;
15
+ style?: React.CSSProperties;
16
+ onChange?: (value: number) => void;
17
+ onBlur?: (value: number, e: import("react").FocusEvent) => void;
18
+ onEnter?: (value: number, e: import("react").KeyboardEvent) => void;
19
+ } & import("class-variance-authority").VariantProps<(props?: ({
20
+ status?: "default" | "success" | "warning" | "error" | null | undefined;
21
+ disabled?: boolean | null | undefined;
22
+ } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string> & import("../helpers/component-props.js").ComponentPropsWithout<"div", import("../helpers/component-props.js").RemovedProps> & import("react").RefAttributes<HTMLDivElement>>;
23
+ parameters: {
24
+ layout: string;
25
+ };
26
+ tags: string[];
27
+ argTypes: {
28
+ status: {
29
+ control: {
30
+ type: "select";
31
+ };
32
+ options: string[];
33
+ table: {
34
+ defaultValue: {
35
+ summary: string;
36
+ };
37
+ };
38
+ };
39
+ className: {
40
+ control: false;
41
+ };
42
+ };
43
+ args: {
44
+ onBlur: undefined;
45
+ onEnter: undefined;
46
+ onChange: undefined;
47
+ };
48
+ };
49
+ export default meta;
50
+ type Story = StoryObj<typeof meta>;
51
+ export declare const Default: Story;
@@ -0,0 +1,35 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import type { ComponentType } from 'react';
3
+ import React from 'react';
4
+ declare const meta: {
5
+ title: string;
6
+ component: React.ForwardRefExoticComponent<import("../components/input.js").InputProps & React.RefAttributes<HTMLInputElement>>;
7
+ subcomponents: {
8
+ InputSlot: ComponentType<unknown>;
9
+ };
10
+ parameters: {
11
+ layout: string;
12
+ docs: {
13
+ description: {
14
+ component: string;
15
+ };
16
+ };
17
+ };
18
+ tags: string[];
19
+ argTypes: {
20
+ size: {
21
+ control: {
22
+ type: "select";
23
+ };
24
+ options: string[];
25
+ };
26
+ };
27
+ args: {
28
+ size: "base";
29
+ };
30
+ };
31
+ export default meta;
32
+ type Story = StoryObj<typeof meta>;
33
+ export declare const Default: Story;
34
+ export declare const WithButton: Story;
35
+ export declare const WithIcon: Story;