@kushagradhawan/kookie-ui 0.1.32 → 0.1.34
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.
- package/components.css +937 -458
- package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.js +1 -1
- package/dist/cjs/components/_internal/base-button.js.map +3 -3
- package/dist/cjs/components/chatbar.d.ts +202 -0
- package/dist/cjs/components/chatbar.d.ts.map +1 -0
- package/dist/cjs/components/chatbar.js +2 -0
- package/dist/cjs/components/chatbar.js.map +7 -0
- package/dist/cjs/components/icon-button.d.ts.map +1 -1
- package/dist/cjs/components/icon-button.js +2 -2
- package/dist/cjs/components/icon-button.js.map +3 -3
- package/dist/cjs/components/icons.d.ts +6 -1
- package/dist/cjs/components/icons.d.ts.map +1 -1
- package/dist/cjs/components/icons.js +1 -1
- package/dist/cjs/components/icons.js.map +3 -3
- package/dist/cjs/components/index.d.ts +3 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/popover.d.ts +13 -1
- package/dist/cjs/components/popover.d.ts.map +1 -1
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +3 -3
- package/dist/cjs/components/sheet.d.ts +82 -0
- package/dist/cjs/components/sheet.d.ts.map +1 -0
- package/dist/cjs/components/sheet.js +2 -0
- package/dist/cjs/components/sheet.js.map +7 -0
- package/dist/cjs/components/shell.d.ts +180 -0
- package/dist/cjs/components/shell.d.ts.map +1 -0
- package/dist/cjs/components/shell.js +2 -0
- package/dist/cjs/components/shell.js.map +7 -0
- package/dist/cjs/components/sidebar.d.ts +4 -33
- package/dist/cjs/components/sidebar.d.ts.map +1 -1
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/components/skeleton.d.ts.map +1 -1
- package/dist/cjs/components/skeleton.js +1 -1
- package/dist/cjs/components/skeleton.js.map +2 -2
- package/dist/cjs/helpers/inert.d.ts +1 -1
- package/dist/cjs/helpers/inert.d.ts.map +1 -1
- package/dist/cjs/helpers/inert.js +1 -1
- package/dist/cjs/helpers/inert.js.map +2 -2
- package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-button.js.map +3 -3
- package/dist/esm/components/chatbar.d.ts +202 -0
- package/dist/esm/components/chatbar.d.ts.map +1 -0
- package/dist/esm/components/chatbar.js +2 -0
- package/dist/esm/components/chatbar.js.map +7 -0
- package/dist/esm/components/icon-button.d.ts.map +1 -1
- package/dist/esm/components/icon-button.js +2 -2
- package/dist/esm/components/icon-button.js.map +3 -3
- package/dist/esm/components/icons.d.ts +6 -1
- package/dist/esm/components/icons.d.ts.map +1 -1
- package/dist/esm/components/icons.js +1 -1
- package/dist/esm/components/icons.js.map +3 -3
- package/dist/esm/components/index.d.ts +3 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +3 -3
- package/dist/esm/components/popover.d.ts +13 -1
- package/dist/esm/components/popover.d.ts.map +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/popover.js.map +3 -3
- package/dist/esm/components/sheet.d.ts +82 -0
- package/dist/esm/components/sheet.d.ts.map +1 -0
- package/dist/esm/components/sheet.js +2 -0
- package/dist/esm/components/sheet.js.map +7 -0
- package/dist/esm/components/shell.d.ts +180 -0
- package/dist/esm/components/shell.d.ts.map +1 -0
- package/dist/esm/components/shell.js +2 -0
- package/dist/esm/components/shell.js.map +7 -0
- package/dist/esm/components/sidebar.d.ts +4 -33
- package/dist/esm/components/sidebar.d.ts.map +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/sidebar.js.map +3 -3
- package/dist/esm/components/skeleton.d.ts.map +1 -1
- package/dist/esm/components/skeleton.js.map +2 -2
- package/dist/esm/helpers/inert.d.ts +1 -1
- package/dist/esm/helpers/inert.d.ts.map +1 -1
- package/dist/esm/helpers/inert.js +1 -1
- package/dist/esm/helpers/inert.js.map +2 -2
- package/package.json +2 -1
- package/src/components/_internal/base-button.tsx +8 -0
- package/src/components/_internal/base-card.css +18 -18
- package/src/components/_internal/base-dialog.css +11 -49
- package/src/components/_internal/base-menu.css +2 -2
- package/src/components/_internal/base-sidebar-menu.css +3 -3
- package/src/components/accordion.css +6 -6
- package/src/components/animations.css +65 -81
- package/src/components/callout.css +3 -3
- package/src/components/chatbar.css +214 -0
- package/src/components/chatbar.tsx +1181 -0
- package/src/components/icon-button.tsx +11 -0
- package/src/components/icons.tsx +97 -2
- package/src/components/image.css +3 -3
- package/src/components/index.css +3 -0
- package/src/components/index.tsx +3 -0
- package/src/components/popover.css +53 -8
- package/src/components/popover.tsx +180 -2
- package/src/components/scroll-area.css +3 -3
- package/src/components/segmented-control.css +3 -3
- package/src/components/sheet.css +90 -0
- package/src/components/sheet.tsx +247 -0
- package/src/components/shell.css +137 -0
- package/src/components/shell.tsx +1032 -0
- package/src/components/sidebar.css +55 -268
- package/src/components/sidebar.tsx +40 -262
- package/src/components/skeleton.tsx +1 -2
- package/src/components/text-area.css +6 -5
- package/src/components/tooltip.css +2 -2
- package/src/helpers/inert.ts +3 -3
- package/src/styles/tokens/constants.css +6 -3
- package/src/styles/tokens/index.css +1 -0
- package/src/styles/tokens/radius.css +7 -2
- package/src/styles/tokens/space.css +6 -0
- package/src/styles/tokens/transition.css +91 -46
- package/styles.css +998 -496
- package/tokens/base.css +57 -35
- package/tokens.css +61 -38
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGzF,UAAU,SAAU,SAAQ,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,CAAC;CAAG;AAEtF,QAAA,MAAM,0BAA0B,iFAoB/B,CAAC;AAIF,QAAA,MAAM,cAAc,iFAkBlB,CAAC;AAGH,QAAA,MAAM,eAAe,iFAcnB,CAAC;AAGH,QAAA,MAAM,qBAAqB,iFAkBzB,CAAC;AAGH,QAAA,MAAM,YAAY,iFAchB,CAAC;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGzF,UAAU,SAAU,SAAQ,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,CAAC;CAAG;AAEtF,QAAA,MAAM,0BAA0B,iFAoB/B,CAAC;AAIF,QAAA,MAAM,cAAc,iFAkBlB,CAAC;AAGH,QAAA,MAAM,eAAe,iFAcnB,CAAC;AAGH,QAAA,MAAM,qBAAqB,iFAkBzB,CAAC;AAGH,QAAA,MAAM,YAAY,iFAchB,CAAC;AAGH,OAAO,EACL,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,GACb,CAAC;AACF,YAAY,EAAE,SAAS,EAAE,CAAC;AAG1B,QAAA,MAAM,SAAS,iFAmBb,CAAC;AAGH,QAAA,MAAM,aAAa,iFAkBjB,CAAC;AAGH,QAAA,MAAM,QAAQ,iFAiBZ,CAAC;AAGH,QAAA,MAAM,YAAY,iFAoBhB,CAAC;AAGH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var m=Object.create;var i=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var x=(e,r)=>{for(var n in r)i(e,n,{get:r[n],enumerable:!0})},a=(e,r,n,f)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of u(r))!k.call(e,t)&&t!==n&&i(e,t,{get:()=>r[t],enumerable:!(f=I(r,t))||f.enumerable});return e};var L=(e,r,n)=>(n=e!=null?m(C(e)):{},a(r||!e||!e.__esModule?i(n,"default",{value:e,enumerable:!0}):n,e)),P=e=>a(i({},"__esModule",{value:!0}),e);var y={};x(y,{ChevronDownIcon:()=>h,CloseIcon:()=>w,FileIcon:()=>v,FileTextIcon:()=>g,PaperclipIcon:()=>c,ThickCheckIcon:()=>l,ThickChevronRightIcon:()=>p,ThickDividerHorizontalIcon:()=>s,ThickDotIcon:()=>d});module.exports=P(y);var o=L(require("react"));const s=o.default.forwardRef((e,r)=>o.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));s.displayName="ThickDividerHorizontalIcon";const l=o.default.forwardRef((e,r)=>o.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));l.displayName="ThickCheckIcon";const h=o.default.forwardRef((e,r)=>o.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.default.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));h.displayName="ChevronDownIcon";const p=o.default.forwardRef((e,r)=>o.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));p.displayName="ThickChevronRightIcon";const d=o.default.forwardRef((e,r)=>o.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.default.createElement("circle",{cx:"4.5",cy:"4.5",r:"2"})));d.displayName="ThickDotIcon";const w=o.default.forwardRef((e,r)=>o.default.createElement("svg",{...e,ref:r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.default.createElement("path",{d:"M18 6 6 18"}),o.default.createElement("path",{d:"m6 6 12 12"})));w.displayName="CloseIcon";const c=o.default.forwardRef((e,r)=>o.default.createElement("svg",{...e,ref:r,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.default.createElement("path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"})));c.displayName="PaperclipIcon";const v=o.default.forwardRef((e,r)=>o.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),o.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})));v.displayName="FileIcon";const g=o.default.forwardRef((e,r)=>o.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),o.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),o.default.createElement("path",{d:"M10 9H8"}),o.default.createElement("path",{d:"M16 13H8"}),o.default.createElement("path",{d:"M16 17H8"})));g.displayName="FileTextIcon";
|
|
2
2
|
//# sourceMappingURL=icons.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/icons.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>(\n (props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n }
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,EAAA,mBAAAC,EAAA,0BAAAC,EAAA,+BAAAC,EAAA,iBAAAC,IAAA,eAAAC,
|
|
6
|
-
"names": ["icons_exports", "__export", "ChevronDownIcon", "ThickCheckIcon", "ThickChevronRightIcon", "ThickDividerHorizontalIcon", "ThickDotIcon", "__toCommonJS", "import_react", "React", "props", "forwardedRef"]
|
|
4
|
+
"sourcesContent": ["import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>(\n (props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n },\n);\n\nThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';\n\nconst ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z\"\n />\n </svg>\n );\n});\nThickCheckIcon.displayName = 'ThickCheckIcon';\n\nconst ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path d=\"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z\" />\n </svg>\n );\n});\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nconst ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronRightIcon.displayName = 'ThickChevronRightIcon';\n\nconst ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <circle cx=\"4.5\" cy=\"4.5\" r=\"2\" />\n </svg>\n );\n});\nThickDotIcon.displayName = 'ThickDotIcon';\n\nexport {\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n ThickDotIcon,\n};\nexport type { IconProps };\n\n// Additional minimal icons\nconst CloseIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n {..._props}\n ref={_forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n});\nCloseIcon.displayName = 'CloseIcon';\n\nconst PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n {...props}\n ref={forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n});\nPaperclipIcon.displayName = 'PaperclipIcon';\n\nconst FileIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n});\nFileIcon.displayName = 'FileIcon';\n\nconst FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n});\nFileTextIcon.displayName = 'FileTextIcon';\n\nexport { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon };\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,EAAA,cAAAC,EAAA,aAAAC,EAAA,iBAAAC,EAAA,kBAAAC,EAAA,mBAAAC,EAAA,0BAAAC,EAAA,+BAAAC,EAAA,iBAAAC,IAAA,eAAAC,EAAAX,GAAA,IAAAY,EAAkB,oBAOlB,MAAMH,EAA6B,EAAAI,QAAM,WACvC,CAACC,EAAOC,IAEJ,EAAAF,QAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGC,EACJ,IAAKC,GAEL,EAAAF,QAAA,cAAC,QACC,SAAS,UACT,SAAS,UACT,EAAE,iKACJ,CACF,CAGN,EAEAJ,EAA2B,YAAc,6BAEzC,MAAMF,EAAiB,EAAAM,QAAM,WAAmC,CAACC,EAAOC,IAEpE,EAAAF,QAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGC,EACJ,IAAKC,GAEL,EAAAF,QAAA,cAAC,QACC,SAAS,UACT,SAAS,UACT,EAAE,sXACJ,CACF,CAEH,EACDN,EAAe,YAAc,iBAE7B,MAAML,EAAkB,EAAAW,QAAM,WAAmC,CAACC,EAAOC,IAErE,EAAAF,QAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGC,EACJ,IAAKC,GAEL,EAAAF,QAAA,cAAC,QAAK,EAAE,+TAA+T,CACzU,CAEH,EACDX,EAAgB,YAAc,kBAE9B,MAAMM,EAAwB,EAAAK,QAAM,WAAmC,CAACC,EAAOC,IAE3E,EAAAF,QAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,U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AA6D,EACrE,EAAAA,QAAA,cAAC,QAAK,EAAE,0BAA0B,CACpC,CAEH,EACDT,EAAS,YAAc,WAEvB,MAAMC,EAAe,EAAAQ,QAAM,WAAmC,CAACG,EAAQC,IAEnE,EAAAJ,QAAA,cAAC,OACC,MAAM,6BACN,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,OAAO,eACP,YAAY,IACZ,cAAc,QACd,eAAe,SAEf,EAAAA,QAAA,cAAC,QAAK,EAAE,6DAA6D,EACrE,EAAAA,QAAA,cAAC,QAAK,EAAE,0BAA0B,EAClC,EAAAA,QAAA,cAAC,QAAK,EAAE,UAAU,EAClB,EAAAA,QAAA,cAAC,QAAK,EAAE,WAAW,EACnB,EAAAA,QAAA,cAAC,QAAK,EAAE,WAAW,CACrB,CAEH,EACDR,EAAa,YAAc",
|
|
6
|
+
"names": ["icons_exports", "__export", "ChevronDownIcon", "CloseIcon", "FileIcon", "FileTextIcon", "PaperclipIcon", "ThickCheckIcon", "ThickChevronRightIcon", "ThickDividerHorizontalIcon", "ThickDotIcon", "__toCommonJS", "import_react", "React", "props", "forwardedRef", "_props", "_forwardedRef"]
|
|
7
7
|
}
|
|
@@ -62,4 +62,7 @@ export { Tooltip, type TooltipProps } from './tooltip.js';
|
|
|
62
62
|
export { UserCard, type UserCardProps } from './user-card.js';
|
|
63
63
|
export { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';
|
|
64
64
|
export * as Sidebar from './sidebar.js';
|
|
65
|
+
export * as Shell from './shell.js';
|
|
66
|
+
export * as Sheet from './sheet.js';
|
|
67
|
+
export * as Chatbar from './chatbar.js';
|
|
65
68
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KA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KAAK,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var _=Object.create;var m=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var oo=Object.getOwnPropertyNames;var ro=Object.getPrototypeOf,eo=Object.prototype.hasOwnProperty;var to=(r,e)=>{for(var t in e)m(r,t,{get:e[t],enumerable:!0})},n=(r,e,t,f)=>{if(e&&typeof e=="object"||typeof e=="function")for(let x of oo(e))!eo.call(r,x)&&x!==t&&m(r,x,{get:()=>e[x],enumerable:!(f=$(e,x))||f.enumerable});return r};var o=(r,e,t)=>(t=r!=null?_(ro(r)):{},n(e||!r||!r.__esModule?m(t,"default",{value:r,enumerable:!0}):t,r)),po=r=>n(m({},"__esModule",{value:!0}),r);var so={};to(so,{AccessibleIcon:()=>P.AccessibleIcon,Accordion:()=>xo,AlertDialog:()=>mo,AspectRatio:()=>y.AspectRatio,Avatar:()=>i.Avatar,Badge:()=>l.Badge,Blockquote:()=>c.Blockquote,Box:()=>d.Box,Button:()=>C.Button,Callout:()=>ao,Card:()=>
|
|
1
|
+
"use strict";var _=Object.create;var m=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var oo=Object.getOwnPropertyNames;var ro=Object.getPrototypeOf,eo=Object.prototype.hasOwnProperty;var to=(r,e)=>{for(var t in e)m(r,t,{get:e[t],enumerable:!0})},n=(r,e,t,f)=>{if(e&&typeof e=="object"||typeof e=="function")for(let x of oo(e))!eo.call(r,x)&&x!==t&&m(r,x,{get:()=>e[x],enumerable:!(f=$(e,x))||f.enumerable});return r};var o=(r,e,t)=>(t=r!=null?_(ro(r)):{},n(e||!r||!r.__esModule?m(t,"default",{value:r,enumerable:!0}):t,r)),po=r=>n(m({},"__esModule",{value:!0}),r);var so={};to(so,{AccessibleIcon:()=>P.AccessibleIcon,Accordion:()=>xo,AlertDialog:()=>mo,AspectRatio:()=>y.AspectRatio,Avatar:()=>i.Avatar,Badge:()=>l.Badge,Blockquote:()=>c.Blockquote,Box:()=>d.Box,Button:()=>C.Button,Callout:()=>ao,Card:()=>S.Card,Chatbar:()=>vo,Checkbox:()=>T.Checkbox,CheckboxCards:()=>fo,CheckboxGroup:()=>no,ChevronDownIcon:()=>p.ChevronDownIcon,Code:()=>g.Code,Container:()=>h.Container,ContextMenu:()=>Po,DataList:()=>yo,Dialog:()=>io,DropdownMenu:()=>lo,Em:()=>u.Em,Flex:()=>I.Flex,Grid:()=>b.Grid,Heading:()=>k.Heading,HoverCard:()=>co,IconButton:()=>B.IconButton,Image:()=>A.Image,Inset:()=>R.Inset,Kbd:()=>v.Kbd,Link:()=>D.Link,Popover:()=>Co,Portal:()=>H.Portal,Progress:()=>w.Progress,Quote:()=>G.Quote,Radio:()=>F.Radio,RadioCards:()=>So,RadioGroup:()=>To,Reset:()=>L.Reset,ScrollArea:()=>q.ScrollArea,Section:()=>E.Section,SegmentedControl:()=>go,Select:()=>ho,Separator:()=>K.Separator,Sheet:()=>Ro,Shell:()=>Ao,Sidebar:()=>Bo,Skeleton:()=>M.Skeleton,Slider:()=>Q.Slider,Slot:()=>a.Slot,Slottable:()=>a.Slottable,Spinner:()=>U.Spinner,Strong:()=>V.Strong,Switch:()=>z.Switch,TabNav:()=>uo,Table:()=>Io,Tabs:()=>bo,Text:()=>j.Text,TextArea:()=>N.TextArea,TextField:()=>ko,Theme:()=>s.Theme,ThemeContext:()=>s.ThemeContext,ThemePanel:()=>J.ThemePanel,ThickCheckIcon:()=>p.ThickCheckIcon,ThickChevronRightIcon:()=>p.ThickChevronRightIcon,ThickDividerHorizontalIcon:()=>p.ThickDividerHorizontalIcon,ToggleButton:()=>O.ToggleButton,ToggleIconButton:()=>W.ToggleIconButton,Tooltip:()=>X.Tooltip,UserCard:()=>Y.UserCard,VisuallyHidden:()=>Z.VisuallyHidden,useThemeContext:()=>s.useThemeContext});module.exports=po(so);var P=require("./accessible-icon.js"),xo=o(require("./accordion.js")),mo=o(require("./alert-dialog.js")),y=require("./aspect-ratio.js"),i=require("./avatar.js"),l=require("./badge.js"),c=require("./blockquote.js"),d=require("./box.js"),C=require("./button.js"),ao=o(require("./callout.js")),S=require("./card.js"),fo=o(require("./checkbox-cards.js")),no=o(require("./checkbox-group.js")),T=require("./checkbox.js"),g=require("./code.js"),h=require("./container.js"),Po=o(require("./context-menu.js")),yo=o(require("./data-list.js")),io=o(require("./dialog.js")),lo=o(require("./dropdown-menu.js")),u=require("./em.js"),I=require("./flex.js"),b=require("./grid.js"),k=require("./heading.js"),co=o(require("./hover-card.js")),B=require("./icon-button.js"),p=require("./icons.js"),A=require("./image.js"),R=require("./inset.js"),v=require("./kbd.js"),D=require("./link.js"),Co=o(require("./popover.js")),H=require("./portal.js"),w=require("./progress.js"),G=require("./quote.js"),So=o(require("./radio-cards.js")),To=o(require("./radio-group.js")),F=require("./radio.js"),L=require("./reset.js"),q=require("./scroll-area.js"),go=o(require("./segmented-control.js")),E=require("./section.js"),ho=o(require("./select.js")),K=require("./separator.js"),M=require("./skeleton.js"),Q=require("./slider.js"),a=require("./slot.js"),U=require("./spinner.js"),V=require("./strong.js"),z=require("./switch.js"),uo=o(require("./tab-nav.js")),Io=o(require("./table.js")),bo=o(require("./tabs.js")),N=require("./text-area.js"),ko=o(require("./text-field.js")),j=require("./text.js"),J=require("./theme-panel.js"),s=require("./theme.js"),O=require("./toggle-button.js"),W=require("./toggle-icon-button.js"),X=require("./tooltip.js"),Y=require("./user-card.js"),Z=require("./visually-hidden.js"),Bo=o(require("./sidebar.js")),Ao=o(require("./shell.js")),Ro=o(require("./sheet.js")),vo=o(require("./chatbar.js"));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/index.tsx"],
|
|
4
|
-
"sourcesContent": ["export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';\nexport * as Accordion from './accordion.js';\nexport * as AlertDialog from './alert-dialog.js';\nexport { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';\nexport { Avatar, type AvatarProps } from './avatar.js';\nexport { Badge, type BadgeProps } from './badge.js';\nexport { Blockquote, type BlockquoteProps } from './blockquote.js';\nexport { Box, type BoxProps } from './box.js';\nexport { Button, type ButtonProps } from './button.js';\nexport * as Callout from './callout.js';\nexport { Card, type CardProps } from './card.js';\nexport * as CheckboxCards from './checkbox-cards.js';\nexport * as CheckboxGroup from './checkbox-group.js';\nexport { Checkbox, type CheckboxProps } from './checkbox.js';\nexport { Code, type CodeProps } from './code.js';\nexport { Container, type ContainerProps } from './container.js';\nexport * as ContextMenu from './context-menu.js';\nexport * as DataList from './data-list.js';\nexport * as Dialog from './dialog.js';\nexport * as DropdownMenu from './dropdown-menu.js';\nexport { Em, type EmProps } from './em.js';\nexport { Flex, type FlexProps } from './flex.js';\nexport { Grid, type GridProps } from './grid.js';\nexport { Heading, type HeadingProps } from './heading.js';\nexport * as HoverCard from './hover-card.js';\nexport { IconButton, type IconButtonProps } from './icon-button.js';\nexport {\n type IconProps,\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n} from './icons.js';\nexport { Image, type ImageProps } from './image.js';\nexport { Inset, type InsetProps } from './inset.js';\nexport { Kbd, type KbdProps } from './kbd.js';\nexport { Link, type LinkProps } from './link.js';\nexport * as Popover from './popover.js';\nexport { Portal, type PortalProps } from './portal.js';\nexport { Progress, type ProgressProps } from './progress.js';\nexport { Quote, type QuoteProps } from './quote.js';\nexport * as RadioCards from './radio-cards.js';\nexport * as RadioGroup from './radio-group.js';\nexport { Radio, type RadioProps } from './radio.js';\nexport { Reset, type ResetProps } from './reset.js';\nexport { ScrollArea, type ScrollAreaProps } from './scroll-area.js';\nexport * as SegmentedControl from './segmented-control.js';\nexport { Section, type SectionProps } from './section.js';\nexport * as Select from './select.js';\nexport { Separator, type SeparatorProps } from './separator.js';\nexport { Skeleton, type SkeletonProps } from './skeleton.js';\nexport { Slider, type SliderProps } from './slider.js';\nexport { Slot, Slottable } from './slot.js';\nexport { Spinner, type SpinnerProps } from './spinner.js';\nexport { Strong, type StrongProps } from './strong.js';\nexport { Switch, type SwitchProps } from './switch.js';\nexport * as TabNav from './tab-nav.js';\nexport * as Table from './table.js';\nexport * as Tabs from './tabs.js';\nexport { TextArea, type TextAreaProps } from './text-area.js';\nexport * as TextField from './text-field.js';\nexport { Text, type TextProps } from './text.js';\nexport { ThemePanel, type ThemePanelProps } from './theme-panel.js';\nexport { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';\nexport { ToggleButton, type ToggleButtonProps } from './toggle-button.js';\nexport { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';\nexport { Tooltip, type TooltipProps } from './tooltip.js';\nexport { UserCard, type UserCardProps } from './user-card.js';\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';\nexport * as Sidebar from './sidebar.js';\n"],
|
|
5
|
-
"mappings": "kkBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,mDAAAE,GAAA,gBAAAC,GAAA,8IAAAC,GAAA,
|
|
6
|
-
"names": ["components_exports", "__export", "Accordion", "AlertDialog", "Callout", "CheckboxCards", "CheckboxGroup", "ContextMenu", "DataList", "Dialog", "DropdownMenu", "HoverCard", "Popover", "RadioCards", "RadioGroup", "SegmentedControl", "Select", "Sidebar", "TabNav", "Table", "Tabs", "TextField", "__toCommonJS", "import_accessible_icon", "import_aspect_ratio", "import_avatar", "import_badge", "import_blockquote", "import_box", "import_button", "import_card", "import_checkbox", "import_code", "import_container", "import_em", "import_flex", "import_grid", "import_heading", "import_icon_button", "import_icons", "import_image", "import_inset", "import_kbd", "import_link", "import_portal", "import_progress", "import_quote", "import_radio", "import_reset", "import_scroll_area", "import_section", "import_separator", "import_skeleton", "import_slider", "import_slot", "import_spinner", "import_strong", "import_switch", "import_text_area", "import_text", "import_theme_panel", "import_theme", "import_toggle_button", "import_toggle_icon_button", "import_tooltip", "import_user_card", "import_visually_hidden"]
|
|
4
|
+
"sourcesContent": ["export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';\nexport * as Accordion from './accordion.js';\nexport * as AlertDialog from './alert-dialog.js';\nexport { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';\nexport { Avatar, type AvatarProps } from './avatar.js';\nexport { Badge, type BadgeProps } from './badge.js';\nexport { Blockquote, type BlockquoteProps } from './blockquote.js';\nexport { Box, type BoxProps } from './box.js';\nexport { Button, type ButtonProps } from './button.js';\nexport * as Callout from './callout.js';\nexport { Card, type CardProps } from './card.js';\nexport * as CheckboxCards from './checkbox-cards.js';\nexport * as CheckboxGroup from './checkbox-group.js';\nexport { Checkbox, type CheckboxProps } from './checkbox.js';\nexport { Code, type CodeProps } from './code.js';\nexport { Container, type ContainerProps } from './container.js';\nexport * as ContextMenu from './context-menu.js';\nexport * as DataList from './data-list.js';\nexport * as Dialog from './dialog.js';\nexport * as DropdownMenu from './dropdown-menu.js';\nexport { Em, type EmProps } from './em.js';\nexport { Flex, type FlexProps } from './flex.js';\nexport { Grid, type GridProps } from './grid.js';\nexport { Heading, type HeadingProps } from './heading.js';\nexport * as HoverCard from './hover-card.js';\nexport { IconButton, type IconButtonProps } from './icon-button.js';\nexport {\n type IconProps,\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n} from './icons.js';\nexport { Image, type ImageProps } from './image.js';\nexport { Inset, type InsetProps } from './inset.js';\nexport { Kbd, type KbdProps } from './kbd.js';\nexport { Link, type LinkProps } from './link.js';\nexport * as Popover from './popover.js';\nexport { Portal, type PortalProps } from './portal.js';\nexport { Progress, type ProgressProps } from './progress.js';\nexport { Quote, type QuoteProps } from './quote.js';\nexport * as RadioCards from './radio-cards.js';\nexport * as RadioGroup from './radio-group.js';\nexport { Radio, type RadioProps } from './radio.js';\nexport { Reset, type ResetProps } from './reset.js';\nexport { ScrollArea, type ScrollAreaProps } from './scroll-area.js';\nexport * as SegmentedControl from './segmented-control.js';\nexport { Section, type SectionProps } from './section.js';\nexport * as Select from './select.js';\nexport { Separator, type SeparatorProps } from './separator.js';\nexport { Skeleton, type SkeletonProps } from './skeleton.js';\nexport { Slider, type SliderProps } from './slider.js';\nexport { Slot, Slottable } from './slot.js';\nexport { Spinner, type SpinnerProps } from './spinner.js';\nexport { Strong, type StrongProps } from './strong.js';\nexport { Switch, type SwitchProps } from './switch.js';\nexport * as TabNav from './tab-nav.js';\nexport * as Table from './table.js';\nexport * as Tabs from './tabs.js';\nexport { TextArea, type TextAreaProps } from './text-area.js';\nexport * as TextField from './text-field.js';\nexport { Text, type TextProps } from './text.js';\nexport { ThemePanel, type ThemePanelProps } from './theme-panel.js';\nexport { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';\nexport { ToggleButton, type ToggleButtonProps } from './toggle-button.js';\nexport { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';\nexport { Tooltip, type TooltipProps } from './tooltip.js';\nexport { UserCard, type UserCardProps } from './user-card.js';\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';\nexport * as Sidebar from './sidebar.js';\nexport * as Shell from './shell.js';\nexport * as Sheet from './sheet.js';\nexport * as Chatbar from './chatbar.js';\n"],
|
|
5
|
+
"mappings": "kkBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,mDAAAE,GAAA,gBAAAC,GAAA,8IAAAC,GAAA,4BAAAC,GAAA,0CAAAC,GAAA,kBAAAC,GAAA,gGAAAC,GAAA,aAAAC,GAAA,WAAAC,GAAA,iBAAAC,GAAA,gFAAAC,GAAA,0GAAAC,GAAA,+FAAAC,GAAA,eAAAC,GAAA,yFAAAC,GAAA,WAAAC,GAAA,oCAAAC,GAAA,UAAAC,GAAA,YAAAC,GAAA,+JAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,sDAAAC,GAAA,ibAAAC,GAAAzB,IAAA,IAAA0B,EAAyD,gCACzDxB,GAA2B,6BAC3BC,GAA6B,gCAC7BwB,EAAmD,6BACnDC,EAAyC,uBACzCC,EAAuC,sBACvCC,EAAiD,2BACjDC,EAAmC,oBACnCC,EAAyC,uBACzC5B,GAAyB,2BACzB6B,EAAqC,qBACrC3B,GAA+B,kCAC/BC,GAA+B,kCAC/B2B,EAA6C,yBAC7CC,EAAqC,qBACrCC,EAA+C,0BAC/C5B,GAA6B,gCAC7BC,GAA0B,6BAC1BC,GAAwB,0BACxBC,GAA8B,iCAC9B0B,EAAiC,mBACjCC,EAAqC,qBACrCC,EAAqC,qBACrCC,EAA2C,wBAC3C5B,GAA2B,8BAC3B6B,EAAiD,4BACjDC,EAMO,sBACPC,EAAuC,sBACvCC,EAAuC,sBACvCC,EAAmC,oBACnCC,EAAqC,qBACrCjC,GAAyB,2BACzBkC,EAAyC,uBACzCC,EAA6C,yBAC7CC,EAAuC,sBACvCnC,GAA4B,+BAC5BC,GAA4B,+BAC5BmC,EAAuC,sBACvCC,EAAuC,sBACvCC,EAAiD,4BACjDpC,GAAkC,qCAClCqC,EAA2C,wBAC3CpC,GAAwB,0BACxBqC,EAA+C,0BAC/CC,EAA6C,yBAC7CC,EAAyC,uBACzCC,EAAgC,qBAChCC,EAA2C,wBAC3CC,EAAyC,uBACzCC,EAAyC,uBACzCvC,GAAwB,2BACxBC,GAAuB,yBACvBC,GAAsB,wBACtBsC,EAA6C,0BAC7CrC,GAA2B,8BAC3BsC,EAAqC,qBACrCC,EAAiD,4BACjDC,EAAsE,sBACtEC,EAAqD,8BACrDC,EAA6D,mCAC7DC,EAA2C,wBAC3CC,EAA6C,0BAC7CC,EAAyD,gCACzDjD,GAAyB,2BACzBD,GAAuB,yBACvBD,GAAuB,yBACvBb,GAAyB",
|
|
6
|
+
"names": ["components_exports", "__export", "Accordion", "AlertDialog", "Callout", "Chatbar", "CheckboxCards", "CheckboxGroup", "ContextMenu", "DataList", "Dialog", "DropdownMenu", "HoverCard", "Popover", "RadioCards", "RadioGroup", "SegmentedControl", "Select", "Sheet", "Shell", "Sidebar", "TabNav", "Table", "Tabs", "TextField", "__toCommonJS", "import_accessible_icon", "import_aspect_ratio", "import_avatar", "import_badge", "import_blockquote", "import_box", "import_button", "import_card", "import_checkbox", "import_code", "import_container", "import_em", "import_flex", "import_grid", "import_heading", "import_icon_button", "import_icons", "import_image", "import_inset", "import_kbd", "import_link", "import_portal", "import_progress", "import_quote", "import_radio", "import_reset", "import_scroll_area", "import_section", "import_separator", "import_skeleton", "import_slider", "import_slot", "import_spinner", "import_strong", "import_switch", "import_text_area", "import_text", "import_theme_panel", "import_theme", "import_toggle_button", "import_toggle_icon_button", "import_tooltip", "import_user_card", "import_visually_hidden"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,18 @@ declare const PopoverClose: React.ForwardRefExoticComponent<PopoverCloseProps &
|
|
|
18
18
|
interface PopoverAnchorProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {
|
|
19
19
|
}
|
|
20
20
|
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
-
|
|
21
|
+
type PopoverToolbarProps = React.ComponentPropsWithoutRef<'div'>;
|
|
22
|
+
declare const PopoverToolbarLeft: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const PopoverToolbarCenter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const PopoverToolbarRight: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const PopoverToolbarTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
26
|
+
type PopoverToolbarComponent = React.ForwardRefExoticComponent<React.PropsWithoutRef<PopoverToolbarProps> & React.RefAttributes<HTMLDivElement>> & {
|
|
27
|
+
Left: typeof PopoverToolbarLeft;
|
|
28
|
+
Center: typeof PopoverToolbarCenter;
|
|
29
|
+
Right: typeof PopoverToolbarRight;
|
|
30
|
+
Title: typeof PopoverToolbarTitle;
|
|
31
|
+
};
|
|
32
|
+
declare const PopoverToolbar: PopoverToolbarComponent;
|
|
33
|
+
export { PopoverRoot as Root, PopoverContent as Content, PopoverTrigger as Trigger, PopoverClose as Close, PopoverAnchor as Anchor, PopoverToolbar as Toolbar, };
|
|
22
34
|
export type { PopoverRootProps as RootProps, PopoverContentProps as ContentProps, PopoverTriggerProps as TriggerProps, PopoverCloseProps as CloseProps, PopoverAnchorProps as AnchorProps, };
|
|
23
35
|
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/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,MAAM,YAAY,6FAMjB,CAAC;AAIF,UAAU,kBACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC;CAAG;AAC3E,QAAA,MAAM,aAAa,2FAIlB,CAAC;AASF,KAAK,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AA4CjE,QAAA,MAAM,kBAAkB,mKAQvB,CAAC;AAGF,QAAA,MAAM,oBAAoB,mKAQzB,CAAC;AAGF,QAAA,MAAM,mBAAmB,mKAQxB,CAAC;AAIF,QAAA,MAAM,mBAAmB,sKAkBxB,CAAC;AAGF,KAAK,uBAAuB,GAAG,KAAK,CAAC,yBAAyB,CAC5D,KAAK,CAAC,eAAe,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CACjF,GAAG;IACF,IAAI,EAAE,OAAO,kBAAkB,CAAC;IAChC,MAAM,EAAE,OAAO,oBAAoB,CAAC;IACpC,KAAK,EAAE,OAAO,mBAAmB,CAAC;IAClC,KAAK,EAAE,OAAO,mBAAmB,CAAC;CACnC,CAAC;AAEF,QAAA,MAAM,cAAc,EAKd,uBAAuB,CAAC;AAE9B,OAAO,EACL,WAAW,IAAI,IAAI,EACnB,cAAc,IAAI,OAAO,EACzB,cAAc,IAAI,OAAO,EACzB,YAAY,IAAI,KAAK,EACrB,aAAa,IAAI,MAAM,EACvB,cAAc,IAAI,OAAO,GAC1B,CAAC;AACF,YAAY,EACV,gBAAgB,IAAI,SAAS,EAC7B,mBAAmB,IAAI,YAAY,EACnC,mBAAmB,IAAI,YAAY,EACnC,iBAAiB,IAAI,UAAU,EAC/B,kBAAkB,IAAI,WAAW,GAClC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var V=Object.create;var u=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var z=(o,e)=>{for(var r in e)u(o,r,{get:e[r],enumerable:!0})},y=(o,e,r,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of F(e))!q.call(o,n)&&n!==r&&u(o,n,{get:()=>e[n],enumerable:!(p=$(e,n))||p.enumerable});return o};var E=(o,e,r)=>(r=o!=null?V(_(o)):{},y(e||!o||!o.__esModule?u(r,"default",{value:o,enumerable:!0}):r,o)),G=o=>y(u({},"__esModule",{value:!0}),o);var J={};z(J,{Anchor:()=>h,Close:()=>g,Content:()=>R,Root:()=>b,Toolbar:()=>w,Trigger:()=>d});module.exports=G(J);var t=E(require("react")),a=E(require("classnames")),P=require("radix-ui"),O=require("../helpers/extract-props.js"),C=require("../helpers/require-react-element.js"),W=require("./popover.props.js"),S=require("./theme.js"),k=require("./theme.js");const L=t.createContext(null),x=o=>{const e=t.useContext(L);return e},b=o=>t.createElement(P.Popover.Root,{...o});b.displayName="Popover.Root";const d=t.forwardRef(({children:o,...e},r)=>t.createElement(P.Popover.Trigger,{...e,ref:r,asChild:!0},(0,C.requireReactElement)(o)));d.displayName="Popover.Trigger";const R=t.forwardRef((o,e)=>{const r=(0,k.useThemeContext)(),p=o.panelBackground??r.panelBackground,{className:n,forceMount:s,container:i,panelBackground:l,...f}=(0,O.extractProps)(o,W.popoverContentPropDefs),v=t.useRef(null),T=t.useCallback(c=>{v.current=c,typeof e=="function"?e(c):e&&(e.current=c)},[e]),[I,j]=t.useState(void 0),B=t.useCallback(c=>{const m=v.current;m&&(c>0?(m.style.setProperty("--popover-toolbar-offset",`${c}px`),m.setAttribute("data-has-toolbar","true")):(m.style.removeProperty("--popover-toolbar-offset"),m.removeAttribute("data-has-toolbar")))},[]);return t.createElement(P.Popover.Portal,{container:i,forceMount:s},t.createElement(S.Theme,{asChild:!0},t.createElement(P.Popover.Content,{align:"start",sideOffset:8,collisionPadding:10,...f,ref:T,"aria-labelledby":I,"data-panel-background":p,className:(0,a.default)("rt-PopperContent","rt-PopoverContent",n)},t.createElement(L.Provider,{value:{contentRef:v,setToolbarOffset:B,setLabelId:j}},o.children))))});R.displayName="Popover.Content";const g=t.forwardRef(({children:o,...e},r)=>t.createElement(P.Popover.Close,{...e,ref:r,asChild:!0},(0,C.requireReactElement)(o)));g.displayName="Popover.Close";const h=t.forwardRef(({children:o,...e},r)=>t.createElement(P.Popover.Anchor,{...e,ref:r}));h.displayName="Popover.Anchor";const N=t.forwardRef(({className:o,children:e,...r},p)=>{const n=x("Popover.Toolbar"),s=t.useRef(null),i=t.useCallback(l=>{s.current=l,typeof p=="function"?p(l):p&&(p.current=l)},[p]);return t.useEffect(()=>{if(!n||!s.current)return;const l=s.current,f=()=>{const T=l.getBoundingClientRect().height;n.setToolbarOffset(T)};f();const v=new ResizeObserver(f);return v.observe(l),()=>{v.disconnect(),n.setToolbarOffset(0)}},[n]),t.createElement("div",{...r,ref:i,className:(0,a.default)("rt-PopoverToolbar",o)},e)});N.displayName="Popover.Toolbar";const M=t.forwardRef(({className:o,...e},r)=>t.createElement("div",{...e,ref:r,className:(0,a.default)("rt-PopoverToolbarSection","rt-PopoverToolbarLeft",o)}));M.displayName="Popover.Toolbar.Left";const A=t.forwardRef(({className:o,...e},r)=>t.createElement("div",{...e,ref:r,className:(0,a.default)("rt-PopoverToolbarSection","rt-PopoverToolbarCenter",o)}));A.displayName="Popover.Toolbar.Center";const D=t.forwardRef(({className:o,...e},r)=>t.createElement("div",{...e,ref:r,className:(0,a.default)("rt-PopoverToolbarSection","rt-PopoverToolbarRight",o)}));D.displayName="Popover.Toolbar.Right";const H=t.forwardRef(({className:o,id:e,...r},p)=>{const n=x("Popover.Toolbar.Title"),s=t.useId(),i=e??`rt-popover-toolbar-title-${s}`;return t.useEffect(()=>(n?.setLabelId(i),()=>n?.setLabelId(void 0)),[n,i]),t.createElement("span",{...r,id:i,ref:p,className:(0,a.default)("rt-PopoverToolbarTitle",o)})});H.displayName="Popover.Toolbar.Title";const w=Object.assign(N,{Left:M,Center:A,Right:D,Title:H});
|
|
2
2
|
//# sourceMappingURL=popover.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/popover.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\nimport { useThemeContext } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={forwardedRef}\n data-panel-background={panelBackground}\n className={classNames('rt-PopperContent', 'rt-PopoverContent', className)}\n />\n </Theme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />\n ),\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n};\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,UAAAC,EAAA,YAAAC,EAAA,SAAAC,EAAA,YAAAC,IAAA,eAAAC,
|
|
6
|
-
"names": ["popover_exports", "__export", "PopoverAnchor", "PopoverClose", "PopoverContent", "PopoverRoot", "PopoverTrigger", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "import_extract_props", "import_require_react_element", "import_popover_props", "import_theme", "props", "PopoverPrimitive", "children", "forwardedRef", "themeContext", "panelBackground", "className", "forceMount", "container", "_", "contentProps", "classNames"]
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\nimport { useThemeContext } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// ---------------------------------------------\n// Popover Content Context\n// ---------------------------------------------\ntype PopoverContentContextValue = {\n /** Ref to the Popover.Content DOM node */\n contentRef: React.MutableRefObject<HTMLDivElement | null>;\n /** Update content's toolbar offset variable and presence flag */\n setToolbarOffset: (offsetPx: number) => void;\n /** Wire up aria-labelledby for toolbar title */\n setLabelId: (id: string | undefined) => void;\n};\n\nconst PopoverContentContext = React.createContext<PopoverContentContextValue | null>(null);\nconst usePopoverContentContext = (caller: string) => {\n const ctx = React.useContext(PopoverContentContext);\n if (!ctx) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`${caller} must be used within Popover.Content`);\n }\n }\n return ctx;\n};\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n\n // Manage refs (we need the DOM node to apply CSS variables)\n const contentRef = React.useRef<HTMLDivElement>(null);\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n contentRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [forwardedRef],\n );\n\n const [labelId, setLabelId] = React.useState<string | undefined>(undefined);\n\n const setToolbarOffset = React.useCallback((offsetPx: number) => {\n const el = contentRef.current;\n if (!el) return;\n if (offsetPx > 0) {\n el.style.setProperty('--popover-toolbar-offset', `${offsetPx}px`);\n el.setAttribute('data-has-toolbar', 'true');\n } else {\n el.style.removeProperty('--popover-toolbar-offset');\n el.removeAttribute('data-has-toolbar');\n }\n }, []);\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={combinedRef}\n aria-labelledby={labelId}\n data-panel-background={panelBackground}\n className={classNames('rt-PopperContent', 'rt-PopoverContent', className)}\n >\n <PopoverContentContext.Provider value={{ contentRef, setToolbarOffset, setLabelId }}>\n {props.children}\n </PopoverContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />\n ),\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\n// ---------------------------------------------\n// Toolbar (Popover-only)\n// ---------------------------------------------\n\ntype PopoverToolbarElement = HTMLDivElement;\ntype PopoverToolbarProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarBase = React.forwardRef<PopoverToolbarElement, PopoverToolbarProps>(\n ({ className, children, ...props }, forwardedRef) => {\n const ctx = usePopoverContentContext('Popover.Toolbar');\n\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRefs = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef)\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [forwardedRef],\n );\n\n React.useEffect(() => {\n if (!ctx || !localRef.current) return;\n const el = localRef.current;\n const update = () => {\n const height = el.getBoundingClientRect().height;\n ctx.setToolbarOffset(height);\n };\n update();\n const ro = new ResizeObserver(update);\n ro.observe(el);\n return () => {\n ro.disconnect();\n ctx.setToolbarOffset(0);\n };\n }, [ctx]);\n\n return (\n <div {...props} ref={setRefs} className={classNames('rt-PopoverToolbar', className)}>\n {children}\n </div>\n );\n },\n);\n(PopoverToolbarBase as any).displayName = 'Popover.Toolbar';\n\ntype SectionProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarLeft = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarLeft', className)}\n />\n ),\n);\nPopoverToolbarLeft.displayName = 'Popover.Toolbar.Left';\n\nconst PopoverToolbarCenter = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarCenter', className)}\n />\n ),\n);\nPopoverToolbarCenter.displayName = 'Popover.Toolbar.Center';\n\nconst PopoverToolbarRight = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarRight', className)}\n />\n ),\n);\nPopoverToolbarRight.displayName = 'Popover.Toolbar.Right';\n\ntype TitleProps = React.ComponentPropsWithoutRef<'span'>;\nconst PopoverToolbarTitle = React.forwardRef<HTMLSpanElement, TitleProps>(\n ({ className, id: idProp, ...props }, ref) => {\n const ctx = usePopoverContentContext('Popover.Toolbar.Title');\n const reactId = React.useId();\n const id = idProp ?? `rt-popover-toolbar-title-${reactId}`;\n React.useEffect(() => {\n ctx?.setLabelId(id);\n return () => ctx?.setLabelId(undefined);\n }, [ctx, id]);\n return (\n <span\n {...props}\n id={id}\n ref={ref}\n className={classNames('rt-PopoverToolbarTitle', className)}\n />\n );\n },\n);\nPopoverToolbarTitle.displayName = 'Popover.Toolbar.Title';\n\ntype PopoverToolbarComponent = React.ForwardRefExoticComponent<\n React.PropsWithoutRef<PopoverToolbarProps> & React.RefAttributes<HTMLDivElement>\n> & {\n Left: typeof PopoverToolbarLeft;\n Center: typeof PopoverToolbarCenter;\n Right: typeof PopoverToolbarRight;\n Title: typeof PopoverToolbarTitle;\n};\n\nconst PopoverToolbar = Object.assign(PopoverToolbarBase, {\n Left: PopoverToolbarLeft,\n Center: PopoverToolbarCenter,\n Right: PopoverToolbarRight,\n Title: PopoverToolbarTitle,\n}) as PopoverToolbarComponent;\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n PopoverToolbar as Toolbar,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n};\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,UAAAC,EAAA,YAAAC,EAAA,SAAAC,EAAA,YAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAR,GAAA,IAAAS,EAAuB,oBACvBC,EAAuB,yBACvBC,EAA4C,oBAE5CC,EAA6B,uCAC7BC,EAAoC,+CACpCC,EAAuC,8BACvCC,EAAsB,sBACtBA,EAAgC,sBAiBhC,MAAMC,EAAwBP,EAAM,cAAiD,IAAI,EACnFQ,EAA4BC,GAAmB,CACnD,MAAMC,EAAMV,EAAM,WAAWO,CAAqB,EAMlD,OAAOG,CACT,EAGMd,EAA2Ce,GAC/CX,EAAA,cAAC,EAAAY,QAAiB,KAAjB,CAAuB,GAAGD,EAAO,EAEpCf,EAAY,YAAc,eAK1B,MAAME,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AR,SAAW,yBAA0Bb,CAAS,EAC3D,CAEJ,CACF,EACAwB,EAAoB,YAAc,wBAWlC,MAAM5C,EAAiB,OAAO,OAAOkC,EAAoB,CACvD,KAAMM,EACN,OAAQE,EACR,MAAOC,EACP,MAAOC,CACT,CAAC",
|
|
6
|
+
"names": ["popover_exports", "__export", "PopoverAnchor", "PopoverClose", "PopoverContent", "PopoverRoot", "PopoverToolbar", "PopoverTrigger", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "import_extract_props", "import_require_react_element", "import_popover_props", "import_theme", "PopoverContentContext", "usePopoverContentContext", "caller", "ctx", "props", "PopoverPrimitive", "children", "forwardedRef", "themeContext", "panelBackground", "className", "forceMount", "container", "_", "contentProps", "contentRef", "combinedRef", "node", "labelId", "setLabelId", "setToolbarOffset", "offsetPx", "el", "classNames", "PopoverToolbarBase", "localRef", "setRefs", "update", "height", "ro", "PopoverToolbarLeft", "ref", "PopoverToolbarCenter", "PopoverToolbarRight", "PopoverToolbarTitle", "idProp", "reactId", "id"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sheet
|
|
3
|
+
*
|
|
4
|
+
* A side-placed overlay built on top of Radix Dialog. It inherits accessibility,
|
|
5
|
+
* focus management, overlay behavior, and sizing scales from the base dialog, and
|
|
6
|
+
* adds side placement and slide motion suited for navigation panels and drawers.
|
|
7
|
+
*
|
|
8
|
+
* Structure mirrors Dialog:
|
|
9
|
+
* - Root, Trigger, Content, Title, Description, Close
|
|
10
|
+
*
|
|
11
|
+
* Notes
|
|
12
|
+
* - Side: set with `side` on `Sheet.Content`. Aliases: `left` → `start`, `right` → `end`.
|
|
13
|
+
* - Sizing: reuses Dialog content prop defs (width/min/max/height/size). Default Dialog
|
|
14
|
+
* maxWidth clamping is removed for Sheets.
|
|
15
|
+
* - Material: use `material` (solid | translucent). Deprecated `panelBackground` falls back
|
|
16
|
+
* in dev with a warning.
|
|
17
|
+
* - A11y: provide an accessible name via `Sheet.Title` or `aria-label` on `Sheet.Content`.
|
|
18
|
+
*
|
|
19
|
+
* Example
|
|
20
|
+
* <Sheet.Root>
|
|
21
|
+
* <Sheet.Trigger>
|
|
22
|
+
* <Button>Open</Button>
|
|
23
|
+
* </Sheet.Trigger>
|
|
24
|
+
* <Sheet.Content side="end" width={{ initial: '280px', md: '360px' }}>
|
|
25
|
+
* <Sheet.Title>Details</Sheet.Title>
|
|
26
|
+
* ...
|
|
27
|
+
* <Sheet.Close>
|
|
28
|
+
* <Button>Close</Button>
|
|
29
|
+
* </Sheet.Close>
|
|
30
|
+
* </Sheet.Content>
|
|
31
|
+
* </Sheet.Root>
|
|
32
|
+
*/
|
|
33
|
+
import * as React from 'react';
|
|
34
|
+
import { Dialog as DialogPrimitive } from 'radix-ui';
|
|
35
|
+
import type { DialogContentOwnProps } from './dialog.props.js';
|
|
36
|
+
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
37
|
+
/**
|
|
38
|
+
* Supported sides for the Sheet.
|
|
39
|
+
* Aliases are normalized RTL-aware: `left` → `start`, `right` → `end`.
|
|
40
|
+
*/
|
|
41
|
+
type SheetSide = 'start' | 'end' | 'top' | 'bottom' | 'left' | 'right';
|
|
42
|
+
/**
|
|
43
|
+
* Sheet is a side-placed overlay built on the Dialog primitive.
|
|
44
|
+
* It reuses Dialog's accessibility, focus, overlay, and size scales, while adding side placement and slide motion.
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* Props for `Sheet.Root` (Radix Dialog root with `modal` forced on).
|
|
48
|
+
*/
|
|
49
|
+
interface SheetRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {
|
|
50
|
+
}
|
|
51
|
+
declare const Root: React.FC<SheetRootProps>;
|
|
52
|
+
/** Props for `Sheet.Trigger` (expects a single element child). */
|
|
53
|
+
interface SheetTriggerProps extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {
|
|
54
|
+
}
|
|
55
|
+
declare const Trigger: React.ForwardRefExoticComponent<SheetTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
56
|
+
interface SheetContentProps extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>, DialogContentOwnProps {
|
|
57
|
+
/** Side where the Sheet should appear. `left`/`right` alias to `start`/`end`. */
|
|
58
|
+
side?: SheetSide;
|
|
59
|
+
/** Optional DOM container to portal into. Defaults to `document.body`. */
|
|
60
|
+
container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Renders the Sheet panel. Normalizes left/right to logical start/end and
|
|
64
|
+
* forwards dialog sizing props. Provide an accessible name via `Sheet.Title`
|
|
65
|
+
* or `aria-label`.
|
|
66
|
+
*/
|
|
67
|
+
declare const Content: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
68
|
+
interface SheetTitleProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> {
|
|
69
|
+
}
|
|
70
|
+
/** Accessible title for the Sheet. Required for non-decorative content. */
|
|
71
|
+
declare const Title: React.ForwardRefExoticComponent<SheetTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
72
|
+
interface SheetDescriptionProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description> {
|
|
73
|
+
}
|
|
74
|
+
/** Supplementary description text for Sheet content. */
|
|
75
|
+
declare const Description: React.ForwardRefExoticComponent<SheetDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
76
|
+
interface SheetCloseProps extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {
|
|
77
|
+
}
|
|
78
|
+
/** Close button for the Sheet. Expects a single element child rendered via `asChild`. */
|
|
79
|
+
declare const Close: React.ForwardRefExoticComponent<SheetCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
80
|
+
export { Root, Trigger, Content, Title, Description, Close };
|
|
81
|
+
export type { SheetRootProps as RootProps, SheetTriggerProps as TriggerProps, SheetContentProps as ContentProps, };
|
|
82
|
+
//# sourceMappingURL=sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAGrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAK/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAEzF;;;GAGG;AACH,KAAK,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEvE;;;GAGG;AAGH;;GAEG;AACH,UAAU,cAAe,SAAQ,qBAAqB,CAAC,OAAO,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC;CAAG;AAC/F,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAAwD,CAAC;AAM5F,kEAAkE;AAClE,UAAU,iBACR,SAAQ,qBAAqB,CAAC,OAAO,eAAe,CAAC,OAAO,EAAE,YAAY,CAAC;CAAG;AAChF,QAAA,MAAM,OAAO,6FAMZ,CAAC;AAMF,UAAU,iBACR,SAAQ,qBAAqB,CAAC,OAAO,eAAe,CAAC,OAAO,EAAE,YAAY,CAAC,EACzE,qBAAqB;IACvB,iFAAiF;IACjF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC;CACxF;AAED;;;;GAIG;AACH,QAAA,MAAM,OAAO,0FAqGZ,CAAC;AAKF,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC;CAAG;AACjG,2EAA2E;AAC3E,QAAA,MAAM,KAAK,4FAMV,CAAC;AAIF,UAAU,qBACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC;CAAG;AAC/E,wDAAwD;AACxD,QAAA,MAAM,WAAW,oGAMhB,CAAC;AAIF,UAAU,eACR,SAAQ,qBAAqB,CAAC,OAAO,eAAe,CAAC,KAAK,EAAE,YAAY,CAAC;CAAG;AAC9E,yFAAyF;AACzF,QAAA,MAAM,KAAK,2FAMV,CAAC;AAGF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;AAC7D,YAAY,EACV,cAAc,IAAI,SAAS,EAC3B,iBAAiB,IAAI,YAAY,EACjC,iBAAiB,IAAI,YAAY,GAClC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";"use client";var _=Object.create;var s=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var q=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},y=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of A(t))!L.call(e,a)&&a!==o&&s(e,a,{get:()=>t[a],enumerable:!(n=z(t,a))||n.enumerable});return e};var u=(e,t,o)=>(o=e!=null?_(j(e)):{},y(t||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e)),F=e=>y(s({},"__esModule",{value:!0}),e);var I={};q(I,{Close:()=>P,Content:()=>f,Description:()=>g,Root:()=>d,Title:()=>h,Trigger:()=>c});module.exports=F(I);var i=u(require("react")),v=u(require("classnames")),r=require("radix-ui"),R=require("./dialog.props.js"),T=require("./theme.js"),p=require("../helpers/extract-props.js"),m=require("../helpers/require-react-element.js");const d=e=>i.createElement(r.Dialog.Root,{...e,modal:!0});d.displayName="Sheet.Root";const c=i.forwardRef(({children:e,...t},o)=>i.createElement(r.Dialog.Trigger,{...t,ref:o,asChild:!0},(0,m.requireReactElement)(e)));c.displayName="Sheet.Trigger";const f=i.forwardRef((e,t)=>{const{side:o="start",forceMount:n,container:a,className:E,panelBackground:N,material:x,...W}=e,b={left:"start",right:"end",start:"start",end:"end",top:"top",bottom:"bottom"}[o],{align:G,panelBackground:k,material:w,...D}=R.dialogContentPropDefs,{panelBackground:S,material:l}=(0,p.extractProps)({panelBackground:N,material:x},{panelBackground:k,material:w}),C=i.useMemo(()=>l??S,[l,S]),{default:H,...B}=D.maxWidth,O={...D,maxWidth:B},{className:M,...V}=(0,p.extractProps)(W,O);return i.createElement(r.Dialog.Portal,{container:a,forceMount:n},i.createElement(T.Theme,{asChild:!0},i.createElement(r.Dialog.Overlay,{className:"rt-BaseDialogOverlay rt-DialogOverlay rt-SheetOverlay"},i.createElement(r.Dialog.Content,{...V,ref:t,className:(0,v.default)("rt-BaseDialogContent","rt-SheetContent",E,M),"data-side":b,"data-material":C,"data-panel-background":C}))))});f.displayName="Sheet.Content";const h=i.forwardRef(({children:e,...t},o)=>i.createElement(r.Dialog.Title,{...t,ref:o,asChild:!1},e));h.displayName="Sheet.Title";const g=i.forwardRef(({children:e,...t},o)=>i.createElement(r.Dialog.Description,{...t,ref:o,asChild:!1},e));g.displayName="Sheet.Description";const P=i.forwardRef(({children:e,...t},o)=>i.createElement(r.Dialog.Close,{...t,ref:o,asChild:!0},(0,m.requireReactElement)(e)));P.displayName="Sheet.Close";
|
|
2
|
+
//# sourceMappingURL=sheet.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/sheet.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\n/**\n * Sheet\n *\n * A side-placed overlay built on top of Radix Dialog. It inherits accessibility,\n * focus management, overlay behavior, and sizing scales from the base dialog, and\n * adds side placement and slide motion suited for navigation panels and drawers.\n *\n * Structure mirrors Dialog:\n * - Root, Trigger, Content, Title, Description, Close\n *\n * Notes\n * - Side: set with `side` on `Sheet.Content`. Aliases: `left` \u2192 `start`, `right` \u2192 `end`.\n * - Sizing: reuses Dialog content prop defs (width/min/max/height/size). Default Dialog\n * maxWidth clamping is removed for Sheets.\n * - Material: use `material` (solid | translucent). Deprecated `panelBackground` falls back\n * in dev with a warning.\n * - A11y: provide an accessible name via `Sheet.Title` or `aria-label` on `Sheet.Content`.\n *\n * Example\n * <Sheet.Root>\n * <Sheet.Trigger>\n * <Button>Open</Button>\n * </Sheet.Trigger>\n * <Sheet.Content side=\"end\" width={{ initial: '280px', md: '360px' }}>\n * <Sheet.Title>Details</Sheet.Title>\n * ...\n * <Sheet.Close>\n * <Button>Close</Button>\n * </Sheet.Close>\n * </Sheet.Content>\n * </Sheet.Root>\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n/**\n * Supported sides for the Sheet.\n * Aliases are normalized RTL-aware: `left` \u2192 `start`, `right` \u2192 `end`.\n */\ntype SheetSide = 'start' | 'end' | 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Sheet is a side-placed overlay built on the Dialog primitive.\n * It reuses Dialog's accessibility, focus, overlay, and size scales, while adding side placement and slide motion.\n */\n\n// Root\n/**\n * Props for `Sheet.Root` (Radix Dialog root with `modal` forced on).\n */\ninterface SheetRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst Root: React.FC<SheetRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nRoot.displayName = 'Sheet.Root';\n\n// Trigger\n/** Element type for `Sheet.Trigger`. */\ntype SheetTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\n/** Props for `Sheet.Trigger` (expects a single element child). */\ninterface SheetTriggerProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst Trigger = React.forwardRef<SheetTriggerElement, SheetTriggerProps>(\n ({ children, ...props }, ref) => (\n <DialogPrimitive.Trigger {...props} ref={ref} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n ),\n);\nTrigger.displayName = 'Sheet.Trigger';\n\n// Content\n/** Element type for `Sheet.Content`. */\ntype SheetContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface SheetContentProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>,\n DialogContentOwnProps {\n /** Side where the Sheet should appear. `left`/`right` alias to `start`/`end`. */\n side?: SheetSide;\n /** Optional DOM container to portal into. Defaults to `document.body`. */\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\n\n/**\n * Renders the Sheet panel. Normalizes left/right to logical start/end and\n * forwards dialog sizing props. Provide an accessible name via `Sheet.Title`\n * or `aria-label`.\n */\nconst Content = React.forwardRef<SheetContentElement, SheetContentProps>(\n (allProps, forwardedRef) => {\n const {\n side = 'start',\n forceMount,\n container,\n className,\n panelBackground: panelBackgroundProp,\n material: materialProp,\n ...restProps\n } = allProps;\n const normalizedSideMap: Record<SheetSide, 'start' | 'end' | 'top' | 'bottom'> = {\n left: 'start',\n right: 'end',\n start: 'start',\n end: 'end',\n top: 'top',\n bottom: 'bottom',\n };\n const normalizedSide = normalizedSideMap[side];\n // Reuse dialog content prop defs for size/width/height tokens, but handle\n // material/panelBackground explicitly to avoid forwarding unknown DOM props.\n const {\n align: _alignPropDef,\n panelBackground: panelBackgroundPropDef,\n material: materialPropDef,\n ...propDefs\n } = dialogContentPropDefs;\n\n // Extract panelBackground and material together (remove from DOM props)\n const { panelBackground: resolvedPanelBackground, material: resolvedMaterial } = extractProps(\n { panelBackground: panelBackgroundProp, material: materialProp },\n { panelBackground: panelBackgroundPropDef, material: materialPropDef },\n );\n\n const materialValue = React.useMemo(() => {\n if (resolvedMaterial !== undefined) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.',\n );\n }\n }\n return resolvedMaterial ?? resolvedPanelBackground;\n }, [resolvedMaterial, resolvedPanelBackground]);\n\n // Now extract remaining props using dialog defs so size/width/height classnames are applied\n // Override dialog's default maxWidth (600px) to avoid clamping Sheet by default\n // Match dialog.tsx: extract once and avoid leaking panel/material\n const { default: _mwDefault, ...maxWidthWithoutDefault } = propDefs.maxWidth;\n const sheetPropDefs = {\n ...propDefs,\n maxWidth: maxWidthWithoutDefault,\n } as typeof propDefs;\n const { className: extractedClassName, ...contentProps } = extractProps(\n restProps,\n sheetPropDefs,\n );\n\n // Dev-only a11y guard: ensure label is provided via Title or aria-label\n if (process.env.NODE_ENV !== 'production') {\n const children = (contentProps as any).children as React.ReactNode;\n const hasAriaLabel = typeof (contentProps as any)['aria-label'] === 'string';\n let hasTitle = false;\n if (children) {\n for (const child of React.Children.toArray(children)) {\n if (React.isValidElement(child) && child.type === Title) {\n hasTitle = true;\n break;\n }\n }\n }\n if (!hasTitle && !hasAriaLabel) {\n console.warn(\n 'Sheet.Content: Missing accessible name. Include Sheet.Title as a child or provide aria-label.',\n );\n }\n }\n\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DialogPrimitive.Overlay className=\"rt-BaseDialogOverlay rt-DialogOverlay rt-SheetOverlay\">\n <DialogPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames(\n 'rt-BaseDialogContent',\n 'rt-SheetContent',\n className,\n extractedClassName,\n )}\n data-side={normalizedSide}\n data-material={materialValue}\n data-panel-background={materialValue}\n />\n </DialogPrimitive.Overlay>\n </Theme>\n </DialogPrimitive.Portal>\n );\n },\n);\nContent.displayName = 'Sheet.Content';\n\n// Title/Description/Close re-export\ntype SheetTitleElement = React.ElementRef<typeof DialogPrimitive.Title>;\ninterface SheetTitleProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> {}\n/** Accessible title for the Sheet. Required for non-decorative content. */\nconst Title = React.forwardRef<SheetTitleElement, SheetTitleProps>(\n ({ children, ...props }, ref) => (\n <DialogPrimitive.Title {...props} ref={ref} asChild={false}>\n {children}\n </DialogPrimitive.Title>\n ),\n);\nTitle.displayName = 'Sheet.Title';\n\ntype SheetDescriptionElement = React.ElementRef<typeof DialogPrimitive.Description>;\ninterface SheetDescriptionProps\n extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description> {}\n/** Supplementary description text for Sheet content. */\nconst Description = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ children, ...props }, ref) => (\n <DialogPrimitive.Description {...props} ref={ref} asChild={false}>\n {children}\n </DialogPrimitive.Description>\n ),\n);\nDescription.displayName = 'Sheet.Description';\n\ntype SheetCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface SheetCloseProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\n/** Close button for the Sheet. Expects a single element child rendered via `asChild`. */\nconst Close = React.forwardRef<SheetCloseElement, SheetCloseProps>(\n ({ children, ...props }, ref) => (\n <DialogPrimitive.Close {...props} ref={ref} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n ),\n);\nClose.displayName = 'Sheet.Close';\n\nexport { Root, Trigger, Content, Title, Description, Close };\nexport type {\n SheetRootProps as RootProps,\n SheetTriggerProps as TriggerProps,\n SheetContentProps as ContentProps,\n};\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,YAAAC,EAAA,gB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CAAa,KAAI,gBACzDb,EACAW,CACF,EAsBA,OACE9B,EAAA,cAAC,EAAAQ,OAAgB,OAAhB,CAAuB,UAAWO,EAAW,WAAYD,GACxDd,EAAA,cAAC,SAAM,QAAO,IACZA,EAAA,cAAC,EAAAQ,OAAgB,QAAhB,CAAwB,UAAU,yDACjCR,EAAA,cAAC,EAAAQ,OAAgB,QAAhB,CACE,GAAGwB,EACJ,IAAKpB,EACL,aAAW,EAAAqB,SACT,uBACA,kBACAjB,EACAe,CACF,EACA,YAAWX,EACX,gBAAeO,EACf,wBAAuBA,EACzB,CACF,CACF,CACF,CAEJ,CACF,EACAjC,EAAQ,YAAc,gBAMtB,MAAMG,EAAQG,EAAM,WAClB,CAAC,CAAE,SAAAS,EAAU,GAAGF,CAAM,EAAGG,IACvBV,EAAA,cAAC,EAAAQ,OAAgB,MAAhB,CAAuB,GAAGD,EAAO,IAAKG,EAAK,QAAS,IAClDD,CACH,CAEJ,EACAZ,EAAM,YAAc,cAMpB,MAAMF,EAAcK,EAAM,WACxB,CAAC,CAAE,SAAAS,EAAU,GAAGF,CAAM,EAAGG,IACvBV,EAAA,cAAC,EAAAQ,OAAgB,YAAhB,CAA6B,GAAGD,EAAO,IAAKG,EAAK,QAAS,IACxDD,CACH,CAEJ,EACAd,EAAY,YAAc,oBAM1B,MAAMF,EAAQO,EAAM,WAClB,CAAC,CAAE,SAAAS,EAAU,GAAGF,CAAM,EAAGG,IACvBV,EAAA,cAAC,EAAAQ,OAAgB,MAAhB,CAAuB,GAAGD,EAAO,IAAKG,EAAK,QAAO,OAChD,uBAAoBD,CAAQ,CAC/B,CAEJ,EACAhB,EAAM,YAAc",
|
|
6
|
+
"names": ["sheet_exports", "__export", "Close", "Content", "Description", "Root", "Title", "Trigger", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "import_dialog_props", "import_theme", "import_extract_props", "import_require_react_element", "props", "DialogPrimitive", "children", "ref", "allProps", "forwardedRef", "side", "forceMount", "container", "className", "panelBackgroundProp", "materialProp", "restProps", "normalizedSide", "_alignPropDef", "panelBackgroundPropDef", "materialPropDef", "propDefs", "resolvedPanelBackground", "resolvedMaterial", "materialValue", "_mwDefault", "maxWidthWithoutDefault", "sheetPropDefs", "extractedClassName", "contentProps", "classNames"]
|
|
7
|
+
}
|