@eloisallena/web_components 1.0.13 → 1.0.14

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 (56) hide show
  1. package/dist/index.cjs +275 -0
  2. package/dist/index.d.ts +26 -2
  3. package/package.json +3 -2
  4. package/dist/.storybook/main.d.ts +0 -3
  5. package/dist/.storybook/preview.d.ts +0 -4
  6. package/dist/next.config.d.ts +0 -3
  7. package/dist/src/app/layout.d.ts +0 -5
  8. package/dist/src/app/page.d.ts +0 -1
  9. package/dist/src/index.d.ts +0 -26
  10. package/dist/vite.config.d.ts +0 -2
  11. package/dist/vitest.config.d.ts +0 -2
  12. /package/dist/{src/component → component}/breadcrumbs/Breadcrumbs.d.ts +0 -0
  13. /package/dist/{src/component → component}/breadcrumbs/index.d.ts +0 -0
  14. /package/dist/{src/component → component}/button/Button.d.ts +0 -0
  15. /package/dist/{src/component → component}/button/index.d.ts +0 -0
  16. /package/dist/{src/component → component}/card/Card.d.ts +0 -0
  17. /package/dist/{src/component → component}/card/CardContent.d.ts +0 -0
  18. /package/dist/{src/component → component}/card/CardFooter.d.ts +0 -0
  19. /package/dist/{src/component → component}/card/CardImage.d.ts +0 -0
  20. /package/dist/{src/component → component}/card/index.d.ts +0 -0
  21. /package/dist/{src/component → component}/footer/Cfooter.d.ts +0 -0
  22. /package/dist/{src/component → component}/footer/FooterBottom.d.ts +0 -0
  23. /package/dist/{src/component → component}/footer/FooterContact.d.ts +0 -0
  24. /package/dist/{src/component → component}/footer/FooterIcon.d.ts +0 -0
  25. /package/dist/{src/component → component}/footer/QuickLink.d.ts +0 -0
  26. /package/dist/{src/component → component}/footer/index.d.ts +0 -0
  27. /package/dist/{src/component → component}/footer/types.d.ts +0 -0
  28. /package/dist/{src/component → component}/form/Cform.d.ts +0 -0
  29. /package/dist/{src/component → component}/form/index.d.ts +0 -0
  30. /package/dist/{src/component → component}/header/Cheader.d.ts +0 -0
  31. /package/dist/{src/component → component}/header/Drawer.d.ts +0 -0
  32. /package/dist/{src/component → component}/header/Icon.d.ts +0 -0
  33. /package/dist/{src/component → component}/header/NavBar.d.ts +0 -0
  34. /package/dist/{src/component → component}/header/SearchBar.d.ts +0 -0
  35. /package/dist/{src/component → component}/header/index.d.ts +0 -0
  36. /package/dist/{src/component → component}/header/types.d.ts +0 -0
  37. /package/dist/{src/component → component}/input/CheckBox.d.ts +0 -0
  38. /package/dist/{src/component → component}/input/Select.d.ts +0 -0
  39. /package/dist/{src/component → component}/input/TextField.d.ts +0 -0
  40. /package/dist/{src/component → component}/input/index.d.ts +0 -0
  41. /package/dist/{src/component → component}/modal/Modal.d.ts +0 -0
  42. /package/dist/{src/component → component}/modal/index.d.ts +0 -0
  43. /package/dist/{src/component → component}/section/Section.d.ts +0 -0
  44. /package/dist/{src/component → component}/section/index.d.ts +0 -0
  45. /package/dist/{src/component → component}/spinner/Loader.d.ts +0 -0
  46. /package/dist/{src/component → component}/spinner/index.d.ts +0 -0
  47. /package/dist/{src/component → component}/stories/LandingLayout.d.ts +0 -0
  48. /package/dist/{src/component → component}/stories/index.d.ts +0 -0
  49. /package/dist/{src/component → component}/table/Ctable.d.ts +0 -0
  50. /package/dist/{src/component → component}/table/TableBody.d.ts +0 -0
  51. /package/dist/{src/component → component}/table/TableCell.d.ts +0 -0
  52. /package/dist/{src/component → component}/table/TableHead.d.ts +0 -0
  53. /package/dist/{src/component → component}/table/TableRow.d.ts +0 -0
  54. /package/dist/{src/component → component}/table/alignment.d.ts +0 -0
  55. /package/dist/{src/component → component}/table/index.d.ts +0 -0
  56. /package/dist/{src/component → component}/table/types.d.ts +0 -0
package/dist/index.cjs ADDED
@@ -0,0 +1,275 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`react`);l=c(l,1);var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),d=o((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case E:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===_)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===E)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=k.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(A.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){N||(N=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,`key`,{get:n,configurable:!0})}function l(){var e=t(this.type);return P[e]||(P[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:h,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,`ref`,{enumerable:!1,value:null}):Object.defineProperty(e,`ref`,{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,`validated`,{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,`_debugInfo`,{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,`_debugStack`,{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,`_debugTask`,{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0)if(o)if(j(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`);else f(p);if(A.call(n,`key`)){p=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,L[p+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require(`react`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),f=o(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=u():t.exports=d()}))(),p=()=>(0,f.jsx)(`span`,{className:`animate-spin rounded-full h-4 w-4 border-b-2 border-white`}),m=({variant:e=`primary`,label:t,isLoading:n=!1,disabled:r=!1,onClick:i,style:a})=>{let o={primary:`bg-primary-button text-primary`,secondary:`bg-secondary-button text-primary`,restore:`bg-restore-button text-primary`,delete:`bg-delete-button text-primary`,disabled:`bg-disabled-button text-primary`},s=n?(0,f.jsx)(p,{}):null,c=r||n;return(0,f.jsx)(`div`,{children:(0,f.jsxs)(`button`,{className:`${o[e]} flex items-center gap-3 px-4 py-2 rounded-2xl text-sm font-medium w-full justify-center md:w-70 lg:w-25
7
+ ${c?`cursor-not-allowed opacity-50`:`hover:cursor-pointer`} ${a||``}`,disabled:c,onClick:i,children:[s,t]})})},h=({children:e})=>(0,f.jsx)(`div`,{className:`bg-primary w-full max-w-sm rounded-lg shadow-md overflow-hidden`,children:e}),g=({children:e})=>(0,f.jsx)(`footer`,{className:`\r
8
+ w-full\r
9
+ bg-gray\r
10
+ text-white\r
11
+ `,children:(0,f.jsx)(`div`,{className:`\r
12
+ mx-auto\r
13
+ max-w-7xl\r
14
+ grid\r
15
+ grid-cols-1\r
16
+ gap-8\r
17
+ px-6\r
18
+ py-10\r
19
+ md:grid-cols-3\r
20
+ `,children:e})}),_=({copyright:e})=>(0,f.jsx)(`div`,{className:`\r
21
+ bg-gray\r
22
+ text-light-gray\r
23
+ \r
24
+ border-t\r
25
+ border-gray\r
26
+ \r
27
+ py-4\r
28
+ \r
29
+ text-center\r
30
+ text-sm\r
31
+ `,children:e}),v=({email:e,phone:t,socials:n})=>(0,f.jsxs)(`div`,{className:`text-white`,children:[(0,f.jsx)(`h3`,{className:`\r
32
+ mb-3\r
33
+ text-lg\r
34
+ font-semibold\r
35
+ `,children:`Contact`}),(0,f.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,f.jsx)(`p`,{children:e}),(0,f.jsx)(`p`,{children:t})]}),(0,f.jsx)(`h4`,{className:`\r
36
+ mt-5\r
37
+ mb-2\r
38
+ font-medium\r
39
+ `,children:`Follow Us`}),(0,f.jsx)(`div`,{className:`flex flex-wrap gap-3`,children:n.map(e=>(0,f.jsx)(`a`,{href:e.href,className:`hover:underline`,children:e.label},e.id))})]}),y=({children:e,description:t})=>(0,f.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[e,(0,f.jsx)(`p`,{className:`\r
40
+ max-w-sm\r
41
+ text-sm\r
42
+ text-white\r
43
+ `,children:t})]}),b=({title:e,links:t,onItemClick:n})=>(0,f.jsxs)(`div`,{className:`text-white`,children:[(0,f.jsx)(`h3`,{className:`\r
44
+ mb-3\r
45
+ text-lg\r
46
+ font-semibold\r
47
+ `,children:e}),(0,f.jsx)(`div`,{className:`flex flex-col gap-2`,children:t.map(e=>(0,f.jsx)(`a`,{href:e.href,onClick:()=>n?.(e.label),className:`hover:underline`,children:e.label},e.id))})]}),x=({children:e,onSubmit:t,className:n=``,...r})=>(0,f.jsx)(`form`,{onSubmit:t,className:`w-full max-w-sm ${n}`,...r,children:(0,f.jsx)(`div`,{className:`flex flex-col gap-1`,children:e})}),S=({children:e,style:t})=>(0,f.jsx)(`header`,{className:`w-full bg-white border-b border-light-gray shadow-sm ${t}`,children:(0,f.jsx)(`div`,{className:`flex items-center justify-between px-6 py-4`,children:e})}),C=({navDrawer:e=[],style:t,onItemClick:n})=>{let[r,i]=(0,l.useState)(!1);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`button`,{onClick:()=>i(!0),className:` flex md:hidden items-center justify-center h-10 w-10 rounded-md hover:bg-gray-100`,children:(0,f.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,className:`\r
48
+ h-6\r
49
+ w-6\r
50
+ text-gray-700\r
51
+ `,children:(0,f.jsx)(`path`,{fillRule:`evenodd`,d:`M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z`,clipRule:`evenodd`})})}),r&&(0,f.jsx)(`div`,{onClick:()=>i(!1),className:`fixed inset-0 z-40 bg-black/40 md:hidden`}),(0,f.jsxs)(`aside`,{className:`
52
+ fixed top-0
53
+ left-0 z-50
54
+ h-screen w-65
55
+ bg-white
56
+ shadow-lg
57
+ transition-transform duration-300
58
+
59
+ ${r?`translate-x-0`:`-translate-x-full`}
60
+
61
+ md:hidden
62
+
63
+ ${t||``}
64
+ `,children:[(0,f.jsxs)(`div`,{className:`\r
65
+ flex\r
66
+ items-center\r
67
+ justify-between\r
68
+ \r
69
+ border-b\r
70
+ border-light-gray\r
71
+ \r
72
+ px-5\r
73
+ py-4\r
74
+ `,children:[(0,f.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Menu`}),(0,f.jsx)(`button`,{onClick:()=>i(!1),className:`\r
75
+ flex\r
76
+ items-center\r
77
+ justify-center\r
78
+ \r
79
+ h-10\r
80
+ w-10\r
81
+ \r
82
+ rounded-md\r
83
+ \r
84
+ hover:bg-gray-100\r
85
+ `,children:(0,f.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,className:`\r
86
+ h-6\r
87
+ w-6\r
88
+ \r
89
+ text-gray-700\r
90
+ `,children:(0,f.jsx)(`path`,{fillRule:`evenodd`,d:`M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 01-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06Z`,clipRule:`evenodd`})})})]}),(0,f.jsx)(`div`,{className:`flex flex-col p-4`,children:e.map(e=>(0,f.jsx)(`a`,{href:e.href||`#`,onClick:()=>{n?.(e.label),i(!1)},className:`\r
91
+ rounded-md\r
92
+ px-4\r
93
+ py-3\r
94
+ hover:bg-gray-100\r
95
+ `,children:e.label},e.id))})]})]})},w=({logo:e=`/logo.svg`,title:t=`my Company`,style:n,alt:r=``})=>(0,f.jsxs)(`div`,{className:`
96
+ flex
97
+ items-center
98
+ gap-2
99
+ sm:gap-3
100
+ shrink-0
101
+ ${n||``}
102
+ `,children:[(0,f.jsx)(`img`,{src:e,alt:r,className:`\r
103
+ h-8\r
104
+ w-8\r
105
+ sm:h-10\r
106
+ sm:w-10\r
107
+ object-contain`}),(0,f.jsx)(`h1`,{className:`text-sm sm:text-lg font-bold text-blue`,children:t})]}),T=({navBar:e=[],style:t,onItemClick:n})=>(0,f.jsx)(`nav`,{className:`
108
+ hidden
109
+ md:flex
110
+ gap-12
111
+ justify-center
112
+ items-center
113
+ absolute
114
+ left-1/2
115
+ -translate-x-1/2
116
+ ${t||``}
117
+ `,children:e.map(e=>(0,f.jsx)(`a`,{href:e.href||`#`,onClick:()=>n?.(e.label),className:`\r
118
+ text-lg\r
119
+ font-bold\r
120
+ text-black\r
121
+ hover:text-green\r
122
+ cursor-pointer\r
123
+ `,children:e.label},e.id))}),E=({isOpen:e,onClose:t,title:n,children:r})=>e?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`fixed inset-0 z-40 bg-black/40`,onClick:t}),(0,f.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,children:(0,f.jsxs)(`div`,{className:`w-full max-w-md bg-white shadow-lg`,role:`dialog`,"aria-modal":`true`,children:[(0,f.jsxs)(`div`,{className:`flex items-center justify-between border-b border-gray-200 px-5 py-4`,children:[(0,f.jsx)(`h2`,{className:`text-lg font-semibold`,children:n}),(0,f.jsx)(`button`,{onClick:t,className:`flex h-10 w-10 items-center justify-center hover:bg-gray-100 rounded-md`,"aria-label":`Close modal`,children:(0,f.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,className:`h-5 w-5`,children:(0,f.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 18L18 6M6 6l12 12`})})})]}),(0,f.jsx)(`div`,{className:`p-5`,children:r})]})})]}):null,D=({placeholder:e=`Search...`,style:t,children:n})=>{let[r,i]=(0,l.useState)(!1);return(0,f.jsxs)(`div`,{className:`relative ${t||``}`,children:[(0,f.jsxs)(`div`,{className:`hidden md:block relative`,children:[(0,f.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,className:`\r
124
+ absolute\r
125
+ left-3\r
126
+ top-1/2\r
127
+ h-4\r
128
+ w-4\r
129
+ -translate-y-1/2\r
130
+ text-gray-400\r
131
+ `,children:(0,f.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M21 21l-4.35-4.35m1.85-5.15a7 7 0 11-14 0 7 7 0 0114 0z`})}),(0,f.jsx)(`input`,{type:`text`,placeholder:e,className:`\r
132
+ w-27.5\r
133
+ sm:w-40\r
134
+ md:w-50\r
135
+ lg:w-60\r
136
+ rounded-md\r
137
+ border\r
138
+ border-light-gray\r
139
+ bg-white\r
140
+ px-3\r
141
+ py-2\r
142
+ pl-9\r
143
+ text-xs\r
144
+ sm:text-sm\r
145
+ focus:outline-none\r
146
+ focus:ring-2\r
147
+ focus:ring-blue\r
148
+ `})]}),(0,f.jsx)(`button`,{onClick:()=>i(!0),className:`\r
149
+ flex\r
150
+ md:hidden\r
151
+ items-center\r
152
+ justify-center\r
153
+ h-10\r
154
+ w-10\r
155
+ rounded-md\r
156
+ hover:bg-gray-100\r
157
+ `,children:(0,f.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,className:`\r
158
+ h-6\r
159
+ w-6\r
160
+ text-gray-700\r
161
+ `,children:(0,f.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M21 21l-4.35-4.35m1.85-5.15a7 7 0 11-14 0 7 7 0 0114 0z`})})}),(0,f.jsx)(E,{isOpen:r,title:`Search`,onClose:()=>i(!1),children:n||(0,f.jsxs)(`div`,{className:`relative`,children:[(0,f.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,className:`\r
162
+ absolute\r
163
+ left-3\r
164
+ top-1/2\r
165
+ h-4\r
166
+ w-4\r
167
+ -translate-y-1/2\r
168
+ text-gray-400\r
169
+ `,children:(0,f.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M21 21l-4.35-4.35m1.85-5.15a7 7 0 11-14 0 7 7 0 0114 0z`})}),(0,f.jsx)(`input`,{autoFocus:!0,type:`text`,placeholder:e,className:`\r
170
+ w-full\r
171
+ rounded-md\r
172
+ border\r
173
+ border-light-gray\r
174
+ bg-white\r
175
+ px-3\r
176
+ py-2\r
177
+ pl-9\r
178
+ text-sm\r
179
+ focus:outline-none\r
180
+ focus:ring-2\r
181
+ focus:ring-blue\r
182
+ `})]})})]})},O=({id:e,label:t,required:n,disabled:r,defaultChecked:i,error:a,helperText:o,onChange:s})=>{let[c,u]=(0,l.useState)(i||!1);return(0,f.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,f.jsx)(`input`,{id:e,type:`checkbox`,checked:c,onChange:e=>{let t=e.target.checked;u(t),s?.(t)},disabled:r,className:`w-4 h-4 border rounded-xs bg-neutral-secondary-medium focus:ring-2 focus:ring-brand-soft ${r?`border-light cursor-not-allowed`:`border-default-medium hover:cursor-pointer`}`}),(0,f.jsxs)(`label`,{htmlFor:e,className:`select-none ms-2 text-sm font-medium ${r?`text-light-gray`:`text-heading`}`,children:[t,` `,n&&(0,f.jsx)(`span`,{className:`text-red`,children:`*`})]})]}),o&&(0,f.jsx)(`div`,{className:`text-sm font-medium ${a?`text-red`:`text-gray`}`,children:o})]})},k=({label:e,options:t,required:n,disabled:r,helperText:i,error:a,value:o,onChange:s})=>(0,f.jsxs)(`div`,{className:`w-full flex flex-col gap-1`,children:[(0,f.jsxs)(`label`,{className:`text-sm font-medium text-gray`,children:[e,` `,n&&`*`]}),(0,f.jsx)(`select`,{className:`h-10 px-4 w-full bg-neutral-secondary-medium border border-default-medium text-heading text-sm rounded-base shadow-xs focus:ring-brand focus:border-brand ${r?`cursor-not-allowed`:`hover:cursor-pointer`}`,disabled:r,value:o,onChange:e=>s?.(e.target.value),children:t.map(e=>(0,f.jsx)(`option`,{value:e.name,children:e.value},e.key))}),i&&a&&(0,f.jsx)(`div`,{className:`text-red text-sm font-normal`,children:i})]}),A=`border-red`,j=`text-red`,M=`border-gray`,N=({id:e,labelText:t,placeholder:n,type:r,error:i,helperText:a})=>(0,f.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,f.jsx)(`label`,{htmlFor:e,className:`text-sm font-medium text-gray`,children:t}),(0,f.jsx)(`input`,{id:e,placeholder:n,type:r,className:`block w-full px-3 py-2.5 bg-neutral-secondary-medium border ${i?A:M} text-heading text-sm rounded-base shadow-xs placeholder:text-body focus:ring-brand focus:border-brand`}),a&&(0,f.jsx)(`p`,{className:`${i?j:`text-light-gray`} text-xs`,children:a})]}),P=({id:e,title:t,children:n,style:r})=>(0,f.jsx)(`section`,{id:e,className:`
183
+ min-h-screen
184
+ w-full
185
+ px-6
186
+ py-6
187
+ scroll-mt-32
188
+ md:px-10
189
+ lg:px-16
190
+
191
+ ${r||``}
192
+ `,children:(0,f.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-10`,children:[t&&(0,f.jsx)(`h2`,{className:`\r
193
+ text-3xl\r
194
+ font-bold\r
195
+ md:text-4xl\r
196
+ `,children:t}),n]})}),F=({items:e})=>(0,f.jsx)(`nav`,{"aria-label":`Breadcrumb`,children:(0,f.jsx)(`ol`,{className:`\r
197
+ flex\r
198
+ flex-wrap\r
199
+ items-center\r
200
+ gap-2\r
201
+ text-sm\r
202
+ `,children:e.map((t,n)=>{let r=n===e.length-1;return(0,f.jsxs)(`li`,{className:`\r
203
+ flex\r
204
+ items-center\r
205
+ gap-2\r
206
+ `,children:[r?(0,f.jsx)(`span`,{className:`\r
207
+ font-semibold\r
208
+ text-gray-900\r
209
+ `,children:t.label}):(0,f.jsx)(`a`,{href:t.href,className:`\r
210
+ text-gray-600\r
211
+ transition-colors\r
212
+ hover:text-blue-600\r
213
+ hover:underline\r
214
+ `,children:t.label}),!r&&(0,f.jsx)(`span`,{className:`text-gray-400`,children:`>`})]},t.id)})})}),I=({children:e,navItems:t,logo:n,companyTitle:r,description:i=``,email:a=``,phone:o=``})=>{let[s,c]=l.default.useState(t[0]?.label||`Home`);return(0,f.jsxs)(`div`,{className:`w-full scroll-smooth`,children:[(0,f.jsx)(`div`,{className:`sticky top-0 z-50 bg-white`,children:(0,f.jsxs)(S,{children:[(0,f.jsxs)(`div`,{className:`flex items-center gap-4 lg:gap-10`,children:[(0,f.jsx)(w,{logo:n||``,title:r||`Company Name`}),(0,f.jsx)(T,{navBar:t,onItemClick:c})]}),(0,f.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 sm:gap-3`,children:[(0,f.jsx)(D,{}),(0,f.jsx)(C,{navDrawer:t,onItemClick:c})]})]})}),(0,f.jsx)(`div`,{className:` \r
215
+ mx-auto\r
216
+ max-w-full\r
217
+ px-6\r
218
+ py-4\r
219
+ sticky\r
220
+ z-40\r
221
+ top-16\r
222
+ bg-light-gray`,children:(0,f.jsx)(F,{items:[{id:1,label:s,href:`#`}]})}),e,(0,f.jsxs)(g,{children:[(0,f.jsx)(y,{description:i,children:(0,f.jsx)(`div`,{className:`scale-150 origin-left`,children:(0,f.jsx)(w,{logo:n||``,title:r||`Company Name`})})}),(0,f.jsx)(b,{title:`Quick Links`,links:t,onItemClick:c}),(0,f.jsx)(v,{email:a,phone:o,socials:[{id:1,label:`Facebook`,href:`#`},{id:2,label:`LinkedIn`,href:`#`},{id:3,label:`GitHub`,href:`#`}]}),(0,f.jsx)(_,{copyright:`© 2026 QTEK. All rights reserved.`})]})]})},L=({children:e,style:t,maxRows:n=5})=>(0,f.jsx)(`div`,{className:`
223
+ w-full
224
+ overflow-hidden
225
+ rounded-md
226
+ bg-white
227
+ shadow-lg
228
+ ${t||``}
229
+ `,children:(0,f.jsx)(`div`,{className:`overflow-auto`,style:{maxHeight:`${n*56}px`},children:(0,f.jsx)(`table`,{className:`w-full border-separate border-spacing-0`,children:e})})}),R=({children:e,style:t})=>(0,f.jsx)(`tbody`,{className:t,children:e}),z=({children:e,align:t=`left`,style:n})=>(0,f.jsx)(`td`,{className:`
230
+ px-4
231
+ py-3
232
+ text-sm
233
+ ${t===`center`?`text-center`:``}
234
+ ${t===`right`?`text-right`:``}
235
+ ${t===`left`?`text-left`:``}
236
+ ${n||``}
237
+ `,children:e}),B={left:`text-left`,center:`text-center`,right:`text-right`},V=({rowData:e})=>(0,f.jsx)(`thead`,{children:(0,f.jsx)(`tr`,{className:`\r
238
+ sticky\r
239
+ top-0\r
240
+ z-10\r
241
+ bg-white\r
242
+ `,children:e.map(e=>(0,f.jsx)(`th`,{className:`
243
+ px-3 sm:px-4 md:px-6
244
+ py-2 md:py-4
245
+ text-xs sm:text-sm
246
+ text-gray
247
+ font-semibold
248
+
249
+ border-b
250
+ border-light-gray
251
+ ${B[e.align||`left`]}
252
+ ${e.style||``}
253
+ `,children:e.value},e.key))})}),H=({rowData:e,style:t})=>(0,f.jsx)(`tr`,{className:`
254
+
255
+ transition-colors
256
+ hover:bg-gray-50
257
+ [&:last-child_td]:border-b-0
258
+
259
+
260
+ ${t||``}
261
+ `,children:e.map(e=>(0,f.jsx)(`td`,{className:`
262
+ px-3 sm:px-4 md:px-6
263
+ py-2 md:py-4
264
+ text-xs sm:text-sm
265
+ text-gray
266
+ whitespace-nowrap
267
+
268
+ border-b
269
+ border-light-gray
270
+
271
+
272
+
273
+ ${B[e.align||`left`]}
274
+ ${e.style||``}
275
+ `,children:e.value},e.key))});exports.Breadcrumbs=F,exports.Button=m,exports.Card=h,exports.Cfooter=g,exports.Cform=x,exports.Cheader=S,exports.CheckBox=O,exports.Ctable=L,exports.Drawer=C,exports.FooterBottom=_,exports.FooterContact=v,exports.FooterIcon=y,exports.Icon=w,exports.LandingLayout=I,exports.Loader=p,exports.Modal=E,exports.NavBar=T,exports.QuickLink=b,exports.SearchBar=D,exports.Section=P,exports.Select=k,exports.TableBody=R,exports.TableCell=z,exports.TableHead=V,exports.TableRow=H,exports.TextField=N;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,26 @@
1
- export * from './src/index.js'
2
- export {}
1
+ export { Button } from './component/button';
2
+ export { Card } from './component/card';
3
+ export { Cfooter } from './component/footer';
4
+ export { FooterIcon } from './component/footer';
5
+ export { FooterBottom } from './component/footer';
6
+ export { FooterContact } from './component/footer';
7
+ export { QuickLink } from './component/footer';
8
+ export { Cform } from './component/form';
9
+ export { Cheader } from './component/header';
10
+ export { Icon } from './component/header';
11
+ export { Drawer } from './component/header';
12
+ export { SearchBar } from './component/header';
13
+ export { NavBar } from './component/header';
14
+ export { Modal } from './component/modal';
15
+ export { TextField } from './component/input';
16
+ export { CheckBox } from './component/input';
17
+ export { Select } from './component/input';
18
+ export { Section } from './component/section';
19
+ export { Loader } from './component/spinner';
20
+ export { LandingLayout } from './component/stories';
21
+ export { Ctable } from './component/table';
22
+ export { TableBody } from './component/table';
23
+ export { TableCell } from './component/table';
24
+ export { TableHead } from './component/table';
25
+ export { TableRow } from './component/table';
26
+ export { Breadcrumbs } from './component/breadcrumbs';
package/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "@eloisallena/web_components",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
-
9
+ "main": "./dist/index.cjs",
10
10
  "module": "./dist/index.js",
11
11
  "types": "./dist/index.d.ts",
12
12
  "exports": {
13
13
  ".": {
14
+ "require": "./dist/index.cjs",
14
15
  "import": "./dist/index.js",
15
16
  "types": "./dist/index.d.ts"
16
17
  }
@@ -1,3 +0,0 @@
1
- import { StorybookConfig } from '@storybook/nextjs-vite';
2
- declare const config: StorybookConfig;
3
- export default config;
@@ -1,4 +0,0 @@
1
- import { Preview } from '@storybook/nextjs-vite';
2
- export declare const decorators: import('storybook/internal/csf').DecoratorFunction<any>[];
3
- declare const preview: Preview;
4
- export default preview;
@@ -1,3 +0,0 @@
1
- import { NextConfig } from 'next';
2
- declare const nextConfig: NextConfig;
3
- export default nextConfig;
@@ -1,5 +0,0 @@
1
- import { Metadata } from 'next';
2
- export declare const metadata: Metadata;
3
- export default function RootLayout({ children, }: Readonly<{
4
- children: React.ReactNode;
5
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export default function Home(): import("react/jsx-runtime").JSX.Element;
@@ -1,26 +0,0 @@
1
- export { Button } from './component/button';
2
- export { Card } from './component/card';
3
- export { Cfooter } from './component/footer';
4
- export { FooterIcon } from './component/footer';
5
- export { FooterBottom } from './component/footer';
6
- export { FooterContact } from './component/footer';
7
- export { QuickLink } from './component/footer';
8
- export { Cform } from './component/form';
9
- export { Cheader } from './component/header';
10
- export { Icon } from './component/header';
11
- export { Drawer } from './component/header';
12
- export { SearchBar } from './component/header';
13
- export { NavBar } from './component/header';
14
- export { Modal } from './component/modal';
15
- export { TextField } from './component/input';
16
- export { CheckBox } from './component/input';
17
- export { Select } from './component/input';
18
- export { Section } from './component/section';
19
- export { Loader } from './component/spinner';
20
- export { LandingLayout } from './component/stories';
21
- export { Ctable } from './component/table';
22
- export { TableBody } from './component/table';
23
- export { TableCell } from './component/table';
24
- export { TableHead } from './component/table';
25
- export { TableRow } from './component/table';
26
- export { Breadcrumbs } from './component/breadcrumbs';
@@ -1,2 +0,0 @@
1
- declare const _default: import('vite').UserConfig;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import('vite').UserConfig;
2
- export default _default;