@ngrok/mantle 0.1.36 → 0.1.38
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/assets/mantle.css +10 -0
- package/dist/button.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/chunk-4V47D7RP.js +2 -0
- package/dist/chunk-4V47D7RP.js.map +1 -0
- package/dist/chunk-Q6UDWWVP.js +2 -0
- package/dist/chunk-Q6UDWWVP.js.map +1 -0
- package/dist/{chunk-R3JOSY7M.js → chunk-UPLGE3M6.js} +2 -2
- package/dist/chunk-UPLGE3M6.js.map +1 -0
- package/dist/dialog.js +1 -1
- package/dist/dialog.js.map +1 -1
- package/dist/dropdown-menu.d.ts +270 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/hooks.d.ts +13 -6
- package/dist/hooks.js +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/progress.d.ts +5 -2
- package/dist/progress.js +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/select.d.ts +270 -2
- package/dist/select.js +1 -1
- package/dist/separator.d.ts +4 -3
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +9 -1
- package/dist/sheet.js +1 -1
- package/dist/sheet.js.map +1 -1
- package/dist/tailwind-preset.cjs +1 -1
- package/dist/tailwind-preset.cjs.map +1 -1
- package/dist/tailwind-preset.d.cts +8 -0
- package/dist/tailwind-preset.d.ts +8 -0
- package/dist/tailwind-preset.js +1 -1
- package/dist/tailwind-preset.js.map +1 -1
- package/package.json +14 -14
- package/dist/chunk-OWOC2ZMA.js +0 -2
- package/dist/chunk-OWOC2ZMA.js.map +0 -1
- package/dist/chunk-R3JOSY7M.js.map +0 -1
package/assets/mantle.css
CHANGED
|
@@ -1508,6 +1508,16 @@
|
|
|
1508
1508
|
color-scheme: dark;
|
|
1509
1509
|
}
|
|
1510
1510
|
|
|
1511
|
+
/* .stop-current-color {
|
|
1512
|
+
stop-color: currentColor;
|
|
1513
|
+
}
|
|
1514
|
+
.stop-opacity-100 {
|
|
1515
|
+
stop-opacity: 1;
|
|
1516
|
+
}
|
|
1517
|
+
.stop-opacity-0 {
|
|
1518
|
+
stop-opacity: 0;
|
|
1519
|
+
} */
|
|
1520
|
+
|
|
1511
1521
|
.scrollbar::-webkit-scrollbar {
|
|
1512
1522
|
width: 0.5rem;
|
|
1513
1523
|
height: 0.5rem;
|
package/dist/button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-Q6UDWWVP.js";import{b as a}from"./chunk-VCISMRMX.js";import"./chunk-MODFDUXR.js";import"./chunk-YPS473FU.js";import"./chunk-GJVJTVHQ.js";import"./chunk-A5H52ODC.js";export{a as Button,b as IconButton};
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
package/dist/checkbox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-NREABJ6Y.js";import C from"clsx";import{forwardRef as w,useEffect as f,useRef as x,useState as y}from"react";import{jsx as R}from"react/jsx-runtime";var t=e=>e==="indeterminate",b=w(({"aria-invalid":e,className:o,checked:
|
|
1
|
+
import{a as u}from"./chunk-NREABJ6Y.js";import C from"clsx";import{forwardRef as w,useEffect as f,useRef as x,useState as y}from"react";import{jsx as R}from"react/jsx-runtime";var t=e=>e==="indeterminate",b=w(({"aria-invalid":e,className:o,checked:n,defaultChecked:p,defaultValue:m="on",onClick:g,readOnly:c,validation:d,...h},v)=>{let i=x(null),[a]=y(p),s=e!=null&&e!=="false"?"error":typeof d=="function"?d():d,k=e??s==="error";return f(()=>{i.current&&(i.current.indeterminate=t(n))},[n]),f(()=>{i.current&&(i.current.indeterminate=t(a))},[a]),R("input",{"aria-checked":t(n)?"mixed":n,"aria-invalid":k,className:C("shrink-0 cursor-pointer select-none appearance-none rounded border border-form bg-form disabled:cursor-default disabled:opacity-50","bg-center bg-no-repeat focus:outline-none","focus-visible:border-accent-600 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-focus-accent","checked:border-accent-500 checked:bg-accent-500 checked:bg-checked-icon","indeterminate:border-accent-500 indeterminate:bg-accent-500 indeterminate:bg-indeterminate-icon","data-validation-success:border-success-600 data-validation-success:checked:bg-success-500 data-validation-success:indeterminate:bg-success-500 focus-visible:data-validation-success:border-success-600 focus-visible:data-validation-success:ring-focus-success","data-validation-warning:border-warning-600 data-validation-warning:checked:bg-warning-500 data-validation-warning:indeterminate:bg-warning-500 focus-visible:data-validation-warning:border-warning-600 focus-visible:data-validation-warning:ring-focus-warning","data-validation-error:border-danger-600 data-validation-error:checked:bg-danger-500 data-validation-error:indeterminate:bg-danger-500 focus-visible:data-validation-error:border-danger-600 focus-visible:data-validation-error:ring-focus-danger","where:block where:size-4 where:p-0",o),checked:t(n)?void 0:n,"data-validation":s||void 0,defaultChecked:t(a)?void 0:a,defaultValue:m,onClick:l=>{if(c){l.preventDefault();return}g?.(l)},readOnly:c,ref:u(i,v),type:"checkbox",...h})});b.displayName="Checkbox";import{z as r}from"zod";function S(e){let{trueValue:o="on"}=e??{};return r.union([r.literal(o).transform(()=>!0),r.literal(!1).transform(()=>!1),r.literal(void 0).transform(()=>!1)])}export{b as Checkbox,S as zodCheckbox};
|
|
2
2
|
//# sourceMappingURL=checkbox.js.map
|
package/dist/checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../packages/checkbox/src/checkbox.tsx","../packages/checkbox/src/zod.ts"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, useEffect, useRef, useState } from \"react\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { composeRefs } from \"../../compose-refs\";\nimport type { WithValidation } from \"../../input\";\n\ntype CheckedState = boolean | \"indeterminate\";\n\nconst isIndeterminate = (checked: CheckedState | undefined): checked is \"indeterminate\" => checked === \"indeterminate\";\n\ntype Props = Omit<ComponentPropsWithoutRef<\"input\">, \"type\" | \"checked\" | \"defaultChecked\"> &\n\tWithValidation & {\n\t\t/**\n\t\t * The controlled checked state of the checkbox. Must be used in conjunction with onChange.\n\t\t */\n\t\tchecked?: CheckedState;\n\t\t/**\n\t\t * The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.\n\t\t */\n\t\tdefaultChecked?: CheckedState;\n\t};\n\n/**\n * A form control that allows the user to toggle between checked and not checked.\n */\nconst Checkbox = forwardRef<ElementRef<\"input\">, Props>(\n\t(\n\t\t{\n\t\t\t\"aria-invalid\": _ariaInvalid,\n\t\t\tclassName,\n\t\t\tchecked: _checked,\n\t\t\tdefaultChecked: _defaultChecked,\n\t\t\tdefaultValue = \"on\",\n\t\t\tonClick,\n\t\t\treadOnly,\n\t\t\tvalidation: _validation,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst innerRef = useRef<ElementRef<\"input\">>(null);\n\t\tconst [defaultChecked] = useState(_defaultChecked);\n\t\tconst isInvalid = _ariaInvalid != null && _ariaInvalid !== \"false\";\n\t\tconst validation = isInvalid ? \"error\" : typeof _validation === \"function\" ? _validation() : _validation;\n\t\tconst ariaInvalid = _ariaInvalid ?? validation === \"error\";\n\n\t\tuseEffect(() => {\n\t\t\tif (innerRef.current) {\n\t\t\t\tinnerRef.current.indeterminate = isIndeterminate(_checked);\n\t\t\t}\n\t\t}, [_checked]);\n\n\t\tuseEffect(() => {\n\t\t\tif (innerRef.current) {\n\t\t\t\tinnerRef.current.indeterminate = isIndeterminate(defaultChecked);\n\t\t\t}\n\t\t}, [defaultChecked]);\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\taria-checked={isIndeterminate(_checked) ? \"mixed\" : _checked}\n\t\t\t\taria-invalid={ariaInvalid}\n\t\t\t\tclassName={clsx(\n\t\t\t\t\t\"shrink-0 cursor-pointer select-none appearance-none rounded border border-form bg-form disabled:cursor-default disabled:opacity-50\",\n\t\t\t\t\t\"bg-center bg-no-repeat focus:outline-none\",\n\t\t\t\t\t\"focus-visible:border-accent-600 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-focus-accent\",\n\t\t\t\t\t\"checked:bg-accent-500 checked:bg-checked-icon\",\n\t\t\t\t\t\"indeterminate:bg-accent-500 indeterminate:bg-indeterminate-icon\",\n\t\t\t\t\t\"data-validation-success:border-success-600 data-validation-success:checked:bg-success-500 data-validation-success:indeterminate:bg-success-500 focus-visible:data-validation-success:border-success-600 focus-visible:data-validation-success:ring-focus-success\",\n\t\t\t\t\t\"data-validation-warning:border-warning-600 data-validation-warning:checked:bg-warning-500 data-validation-warning:indeterminate:bg-warning-500 focus-visible:data-validation-warning:border-warning-600 focus-visible:data-validation-warning:ring-focus-warning\",\n\t\t\t\t\t\"data-validation-error:border-danger-600 data-validation-error:checked:bg-danger-500 data-validation-error:indeterminate:bg-danger-500 focus-visible:data-validation-error:border-danger-600 focus-visible:data-validation-error:ring-focus-danger\",\n\t\t\t\t\t\"where:block where:size-4 where:p-0\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tchecked={isIndeterminate(_checked) ? undefined : _checked}\n\t\t\t\tdata-validation={validation || undefined} // eslint-disable-line @typescript-eslint/prefer-nullish-coalescing\n\t\t\t\tdefaultChecked={isIndeterminate(defaultChecked) ? undefined : defaultChecked}\n\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tif (readOnly) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonClick?.(event);\n\t\t\t\t}}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\tref={composeRefs(innerRef, ref)}\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nCheckbox.displayName = \"Checkbox\";\n\nexport {\n\t//,\n\tCheckbox,\n};\n","import { z } from \"zod\";\n\ntype Options = {\n\t/**\n\t * The value to use when the checkbox is checked.\n\t * @default \"on\"\n\t */\n\ttrueValue?: string;\n};\n\n/**\n * Turns the value from a checkbox field into a boolean,\n * but does not require the checkbox to be checked.\n * For checkboxes with a `value` attribute, you can pass that as the `trueValue` option.\n *\n * @example\n * ```ts\n * z.object({\n * defaultCheckbox: zodCheckbox(),\n * checkboxWithValue: zodCheckbox({ trueValue: \"true\" }),\n * mustBeChecked: zodCheckbox().refine((v) => v, \"Please check this box\"),\n * });\n * ```\n */\nfunction zodCheckbox(options?: Options) {\n\tconst { trueValue = \"on\" } = options ?? {};\n\n\treturn z.union([\n\t\tz.literal(trueValue).transform(() => true),\n\t\tz.literal(false).transform(() => false),\n\t\tz.literal(undefined).transform(() => false),\n\t]);\n}\n\nexport {\n\t//\n\tzodCheckbox,\n};\n"],"mappings":"wCAAA,OAAOA,MAAU,OACjB,OAAS,cAAAC,EAAY,aAAAC,EAAW,UAAAC,EAAQ,YAAAC,MAAgB,QA0DrD,cAAAC,MAAA,oBAnDH,IAAMC,EAAmBC,GAAkEA,IAAY,gBAiBjGC,EAAWC,EAChB,CACC,CACC,eAAgBC,EAChB,UAAAC,EACA,QAASC,EACT,eAAgBC,EAChB,aAAAC,EAAe,KACf,QAAAC,EACA,SAAAC,EACA,WAAYC,EACZ,GAAGC,CACJ,EACAC,IACI,CACJ,IAAMC,EAAWC,EAA4B,IAAI,EAC3C,CAACC,CAAc,EAAIC,EAASV,CAAe,EAE3CW,EADYd,GAAgB,MAAQA,IAAiB,QAC5B,QAAU,OAAOO,GAAgB,WAAaA,EAAY,EAAIA,EACvFQ,EAAcf,GAAgBc,IAAe,QAEnD,OAAAE,EAAU,IAAM,CACXN,EAAS,UACZA,EAAS,QAAQ,cAAgBd,EAAgBM,CAAQ,EAE3D,EAAG,CAACA,CAAQ,CAAC,EAEbc,EAAU,IAAM,CACXN,EAAS,UACZA,EAAS,QAAQ,cAAgBd,EAAgBgB,CAAc,EAEjE,EAAG,CAACA,CAAc,CAAC,EAGlBjB,EAAC,SACA,eAAcC,EAAgBM,CAAQ,EAAI,QAAUA,EACpD,eAAca,EACd,UAAWE,EACV,qIACA,4CACA,kHACA,
|
|
1
|
+
{"version":3,"sources":["../packages/checkbox/src/checkbox.tsx","../packages/checkbox/src/zod.ts"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, useEffect, useRef, useState } from \"react\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { composeRefs } from \"../../compose-refs\";\nimport type { WithValidation } from \"../../input\";\n\ntype CheckedState = boolean | \"indeterminate\";\n\nconst isIndeterminate = (checked: CheckedState | undefined): checked is \"indeterminate\" => checked === \"indeterminate\";\n\ntype Props = Omit<ComponentPropsWithoutRef<\"input\">, \"type\" | \"checked\" | \"defaultChecked\"> &\n\tWithValidation & {\n\t\t/**\n\t\t * The controlled checked state of the checkbox. Must be used in conjunction with onChange.\n\t\t */\n\t\tchecked?: CheckedState;\n\t\t/**\n\t\t * The checked state of the checkbox when it is initially rendered. Use when you do not need to control its checked state.\n\t\t */\n\t\tdefaultChecked?: CheckedState;\n\t};\n\n/**\n * A form control that allows the user to toggle between checked and not checked.\n */\nconst Checkbox = forwardRef<ElementRef<\"input\">, Props>(\n\t(\n\t\t{\n\t\t\t\"aria-invalid\": _ariaInvalid,\n\t\t\tclassName,\n\t\t\tchecked: _checked,\n\t\t\tdefaultChecked: _defaultChecked,\n\t\t\tdefaultValue = \"on\",\n\t\t\tonClick,\n\t\t\treadOnly,\n\t\t\tvalidation: _validation,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst innerRef = useRef<ElementRef<\"input\">>(null);\n\t\tconst [defaultChecked] = useState(_defaultChecked);\n\t\tconst isInvalid = _ariaInvalid != null && _ariaInvalid !== \"false\";\n\t\tconst validation = isInvalid ? \"error\" : typeof _validation === \"function\" ? _validation() : _validation;\n\t\tconst ariaInvalid = _ariaInvalid ?? validation === \"error\";\n\n\t\tuseEffect(() => {\n\t\t\tif (innerRef.current) {\n\t\t\t\tinnerRef.current.indeterminate = isIndeterminate(_checked);\n\t\t\t}\n\t\t}, [_checked]);\n\n\t\tuseEffect(() => {\n\t\t\tif (innerRef.current) {\n\t\t\t\tinnerRef.current.indeterminate = isIndeterminate(defaultChecked);\n\t\t\t}\n\t\t}, [defaultChecked]);\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\taria-checked={isIndeterminate(_checked) ? \"mixed\" : _checked}\n\t\t\t\taria-invalid={ariaInvalid}\n\t\t\t\tclassName={clsx(\n\t\t\t\t\t\"shrink-0 cursor-pointer select-none appearance-none rounded border border-form bg-form disabled:cursor-default disabled:opacity-50\",\n\t\t\t\t\t\"bg-center bg-no-repeat focus:outline-none\",\n\t\t\t\t\t\"focus-visible:border-accent-600 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-focus-accent\",\n\t\t\t\t\t\"checked:border-accent-500 checked:bg-accent-500 checked:bg-checked-icon\",\n\t\t\t\t\t\"indeterminate:border-accent-500 indeterminate:bg-accent-500 indeterminate:bg-indeterminate-icon\",\n\t\t\t\t\t\"data-validation-success:border-success-600 data-validation-success:checked:bg-success-500 data-validation-success:indeterminate:bg-success-500 focus-visible:data-validation-success:border-success-600 focus-visible:data-validation-success:ring-focus-success\",\n\t\t\t\t\t\"data-validation-warning:border-warning-600 data-validation-warning:checked:bg-warning-500 data-validation-warning:indeterminate:bg-warning-500 focus-visible:data-validation-warning:border-warning-600 focus-visible:data-validation-warning:ring-focus-warning\",\n\t\t\t\t\t\"data-validation-error:border-danger-600 data-validation-error:checked:bg-danger-500 data-validation-error:indeterminate:bg-danger-500 focus-visible:data-validation-error:border-danger-600 focus-visible:data-validation-error:ring-focus-danger\",\n\t\t\t\t\t\"where:block where:size-4 where:p-0\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tchecked={isIndeterminate(_checked) ? undefined : _checked}\n\t\t\t\tdata-validation={validation || undefined} // eslint-disable-line @typescript-eslint/prefer-nullish-coalescing\n\t\t\t\tdefaultChecked={isIndeterminate(defaultChecked) ? undefined : defaultChecked}\n\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tif (readOnly) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonClick?.(event);\n\t\t\t\t}}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\tref={composeRefs(innerRef, ref)}\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nCheckbox.displayName = \"Checkbox\";\n\nexport {\n\t//,\n\tCheckbox,\n};\n","import { z } from \"zod\";\n\ntype Options = {\n\t/**\n\t * The value to use when the checkbox is checked.\n\t * @default \"on\"\n\t */\n\ttrueValue?: string;\n};\n\n/**\n * Turns the value from a checkbox field into a boolean,\n * but does not require the checkbox to be checked.\n * For checkboxes with a `value` attribute, you can pass that as the `trueValue` option.\n *\n * @example\n * ```ts\n * z.object({\n * defaultCheckbox: zodCheckbox(),\n * checkboxWithValue: zodCheckbox({ trueValue: \"true\" }),\n * mustBeChecked: zodCheckbox().refine((v) => v, \"Please check this box\"),\n * });\n * ```\n */\nfunction zodCheckbox(options?: Options) {\n\tconst { trueValue = \"on\" } = options ?? {};\n\n\treturn z.union([\n\t\tz.literal(trueValue).transform(() => true),\n\t\tz.literal(false).transform(() => false),\n\t\tz.literal(undefined).transform(() => false),\n\t]);\n}\n\nexport {\n\t//\n\tzodCheckbox,\n};\n"],"mappings":"wCAAA,OAAOA,MAAU,OACjB,OAAS,cAAAC,EAAY,aAAAC,EAAW,UAAAC,EAAQ,YAAAC,MAAgB,QA0DrD,cAAAC,MAAA,oBAnDH,IAAMC,EAAmBC,GAAkEA,IAAY,gBAiBjGC,EAAWC,EAChB,CACC,CACC,eAAgBC,EAChB,UAAAC,EACA,QAASC,EACT,eAAgBC,EAChB,aAAAC,EAAe,KACf,QAAAC,EACA,SAAAC,EACA,WAAYC,EACZ,GAAGC,CACJ,EACAC,IACI,CACJ,IAAMC,EAAWC,EAA4B,IAAI,EAC3C,CAACC,CAAc,EAAIC,EAASV,CAAe,EAE3CW,EADYd,GAAgB,MAAQA,IAAiB,QAC5B,QAAU,OAAOO,GAAgB,WAAaA,EAAY,EAAIA,EACvFQ,EAAcf,GAAgBc,IAAe,QAEnD,OAAAE,EAAU,IAAM,CACXN,EAAS,UACZA,EAAS,QAAQ,cAAgBd,EAAgBM,CAAQ,EAE3D,EAAG,CAACA,CAAQ,CAAC,EAEbc,EAAU,IAAM,CACXN,EAAS,UACZA,EAAS,QAAQ,cAAgBd,EAAgBgB,CAAc,EAEjE,EAAG,CAACA,CAAc,CAAC,EAGlBjB,EAAC,SACA,eAAcC,EAAgBM,CAAQ,EAAI,QAAUA,EACpD,eAAca,EACd,UAAWE,EACV,qIACA,4CACA,kHACA,0EACA,kGACA,mQACA,mQACA,oPACA,qCACAhB,CACD,EACA,QAASL,EAAgBM,CAAQ,EAAI,OAAYA,EACjD,kBAAiBY,GAAc,OAC/B,eAAgBlB,EAAgBgB,CAAc,EAAI,OAAYA,EAC9D,aAAcR,EACd,QAAUc,GAAU,CACnB,GAAIZ,EAAU,CACbY,EAAM,eAAe,EACrB,MACD,CACAb,IAAUa,CAAK,CAChB,EACA,SAAUZ,EACV,IAAKa,EAAYT,EAAUD,CAAG,EAC9B,KAAK,WACJ,GAAGD,EACL,CAEF,CACD,EACAV,EAAS,YAAc,WC7FvB,OAAS,KAAAsB,MAAS,MAwBlB,SAASC,EAAYC,EAAmB,CACvC,GAAM,CAAE,UAAAC,EAAY,IAAK,EAAID,GAAW,CAAC,EAEzC,OAAOF,EAAE,MAAM,CACdA,EAAE,QAAQG,CAAS,EAAE,UAAU,IAAM,EAAI,EACzCH,EAAE,QAAQ,EAAK,EAAE,UAAU,IAAM,EAAK,EACtCA,EAAE,QAAQ,MAAS,EAAE,UAAU,IAAM,EAAK,CAC3C,CAAC,CACF","names":["clsx","forwardRef","useEffect","useRef","useState","jsx","isIndeterminate","checked","Checkbox","forwardRef","_ariaInvalid","className","_checked","_defaultChecked","defaultValue","onClick","readOnly","_validation","props","ref","innerRef","useRef","defaultChecked","useState","validation","ariaInvalid","useEffect","clsx","event","composeRefs","z","zodCheckbox","options","trueValue"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useEffect as s,useLayoutEffect as u}from"react";var i=typeof window<"u"?u:s;import{useEffect as f,useState as c}from"react";var d="(prefers-reduced-motion: no-preference)";function m(){let[e,t]=c(!0);return f(()=>{let o=window.matchMedia(d);t(!o.matches);function r(n){t(!n.matches)}return o.addEventListener("change",r),()=>{o.removeEventListener("change",r)}},[]),e}import{useMemo as a}from"react";var p=(e="mantle")=>a(()=>M(e),[e]);function M(e="mantle"){return[e.trim()||"mantle",h()].join("-")}function h(){return Math.random().toString(36).substring(2,9)}export{i as a,m as b,p as c};
|
|
2
|
+
//# sourceMappingURL=chunk-4V47D7RP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../packages/hooks/src/use-isomorphic-layout-effect.tsx","../packages/hooks/src/use-prefers-reduced-motion.tsx","../packages/hooks/src/use-random-stable-id.tsx"],"sourcesContent":["import { useEffect, useLayoutEffect } from \"react\";\n\n/**\n * useIsomorphicLayoutEffect is a hook that uses useLayoutEffect on the client and useEffect on the server.\n */\nexport const useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n","import { useEffect, useState } from \"react\";\n\n/**\n * no-preference is the default value for the prefers-reduced-motion media query.\n * Users who have never fiddled with their a11y settings will still see animations\n * (no explicit opt-in required from a user's perspective)\n */\nconst query = \"(prefers-reduced-motion: no-preference)\";\n\n/**\n * usePrefersReducedMotion returns true if the user has opted out of animations\n */\nexport function usePrefersReducedMotion() {\n\t// default to no animations, since we don't know what the user's preference is on the server\n\tconst [prefersReducedMotion, setPrefersReducedMotion] = useState(true);\n\n\tuseEffect(() => {\n\t\tconst mediaQueryList = window.matchMedia(query);\n\n\t\t// set the _real_ initial value now that we're on the client\n\t\tsetPrefersReducedMotion(!mediaQueryList.matches);\n\n\t\t// register for updates\n\t\tfunction listener(event: MediaQueryListEvent) {\n\t\t\tsetPrefersReducedMotion(!event.matches);\n\t\t}\n\n\t\tmediaQueryList.addEventListener(\"change\", listener);\n\n\t\treturn () => {\n\t\t\tmediaQueryList.removeEventListener(\"change\", listener);\n\t\t};\n\t}, []);\n\n\treturn prefersReducedMotion;\n}\n","import { useMemo } from \"react\";\n\n/**\n * Hook to generate a random, stable id.\n * This is similar to `useId`, but generates a stable id client side which can also\n * be used for css selectors and element ids.\n */\nconst useRandomStableId = (prefix: string = \"mantle\") => useMemo(() => randomStableId(prefix), [prefix]);\n\nexport {\n\t//,\n\tuseRandomStableId,\n};\n\nfunction randomStableId(prefix: string = \"mantle\") {\n\tconst _prefix = prefix.trim() || \"mantle\";\n\treturn [_prefix, randomPostfix()].join(\"-\");\n}\n\nfunction randomPostfix() {\n\treturn Math.random().toString(36).substring(2, 9);\n}\n"],"mappings":"AAAA,OAAS,aAAAA,EAAW,mBAAAC,MAAuB,QAKpC,IAAMC,EAA4B,OAAO,OAAW,IAAcD,EAAkBD,ECL3F,OAAS,aAAAG,EAAW,YAAAC,MAAgB,QAOpC,IAAMC,EAAQ,0CAKP,SAASC,GAA0B,CAEzC,GAAM,CAACC,EAAsBC,CAAuB,EAAIJ,EAAS,EAAI,EAErE,OAAAD,EAAU,IAAM,CACf,IAAMM,EAAiB,OAAO,WAAWJ,CAAK,EAG9CG,EAAwB,CAACC,EAAe,OAAO,EAG/C,SAASC,EAASC,EAA4B,CAC7CH,EAAwB,CAACG,EAAM,OAAO,CACvC,CAEA,OAAAF,EAAe,iBAAiB,SAAUC,CAAQ,EAE3C,IAAM,CACZD,EAAe,oBAAoB,SAAUC,CAAQ,CACtD,CACD,EAAG,CAAC,CAAC,EAEEH,CACR,CCnCA,OAAS,WAAAK,MAAe,QAOxB,IAAMC,EAAoB,CAACC,EAAiB,WAAaF,EAAQ,IAAMG,EAAeD,CAAM,EAAG,CAACA,CAAM,CAAC,EAOvG,SAASE,EAAeC,EAAiB,SAAU,CAElD,MAAO,CADSA,EAAO,KAAK,GAAK,SAChBC,EAAc,CAAC,EAAE,KAAK,GAAG,CAC3C,CAEA,SAASA,GAAgB,CACxB,OAAO,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,EAAG,CAAC,CACjD","names":["useEffect","useLayoutEffect","useIsomorphicLayoutEffect","useEffect","useState","query","usePrefersReducedMotion","prefersReducedMotion","setPrefersReducedMotion","mediaQueryList","listener","event","useMemo","useRandomStableId","prefix","randomStableId","randomStableId","prefix","randomPostfix"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as l}from"./chunk-MODFDUXR.js";import{a as e}from"./chunk-YPS473FU.js";import{a as d}from"./chunk-A5H52ODC.js";import{CircleNotch as V}from"@phosphor-icons/react/CircleNotch";import{Slot as z}from"@radix-ui/react-slot";import{cva as C}from"class-variance-authority";import{Children as H,cloneElement as M,forwardRef as P,isValidElement as T}from"react";import{jsx as t,jsxs as N}from"react/jsx-runtime";var E=C("inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md border focus-within:outline-none focus-visible:ring-4 disabled:cursor-default disabled:opacity-50",{variants:{appearance:{ghost:"border-transparent text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong not-disabled:active:bg-neutral-500/15 not-disabled:active:text-strong",outlined:"border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong not-disabled:active:border-neutral-400 not-disabled:active:bg-neutral-500/10 not-disabled:active:text-strong focus-visible:not-disabled:active:border-accent-600"},isLoading:{false:"",true:"opacity-50"},size:{xs:"size-7 sm:size-6",sm:"size-9 sm:size-7",md:"size-11 sm:size-9"}},defaultVariants:{appearance:"outlined",size:"md"}}),c=P(({"aria-disabled":u,appearance:p,asChild:b=!1,children:m,className:f,disabled:B,icon:v,isLoading:o=!1,label:h,size:n,type:y,...g},x)=>{let r=l(u??B??o),s=o?t(V,{className:"animate-spin"}):v,i={"aria-disabled":r,className:d("icon-button",E({appearance:p,isLoading:o,size:n}),f),"data-loading":o,"data-size":n,disabled:r,ref:x,...g};if(b){let a=H.only(m),I=T(a);return t(z,{...i,children:I&&M(a,{},t(e,{svg:s}))})}return N("button",{...i,type:y,children:[t("span",{className:"sr-only",children:h}),t(e,{svg:s})]})});c.displayName="IconButton";export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Q6UDWWVP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../packages/button/src/icon-button.tsx"],"sourcesContent":["import { CircleNotch } from \"@phosphor-icons/react/CircleNotch\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva } from \"class-variance-authority\";\nimport { Children, cloneElement, forwardRef, isValidElement } from \"react\";\nimport type { ButtonHTMLAttributes, ReactNode } from \"react\";\nimport { cx } from \"../../cx\";\nimport { Icon } from \"../../icon\";\nimport type { VariantProps, WithAsChild } from \"../../types\";\nimport { parseBooleanish } from \"../../types\";\n\nconst iconButtonVariants = cva(\n\t\"inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md border focus-within:outline-none focus-visible:ring-4 disabled:cursor-default disabled:opacity-50\",\n\t{\n\t\tvariants: {\n\t\t\t/**\n\t\t\t * Defines the visual style of the Button.\n\t\t\t */\n\t\t\tappearance: {\n\t\t\t\tghost:\n\t\t\t\t\t\"border-transparent text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong not-disabled:active:bg-neutral-500/15 not-disabled:active:text-strong\",\n\t\t\t\toutlined:\n\t\t\t\t\t\"border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong not-disabled:active:border-neutral-400 not-disabled:active:bg-neutral-500/10 not-disabled:active:text-strong focus-visible:not-disabled:active:border-accent-600\",\n\t\t\t},\n\t\t\t/**\n\t\t\t * Whether or not the button is in a loading state, default `false`. Setting `isLoading` will\n\t\t\t * replace the `icon` with a spinner.\n\t\t\t * It will also disable user interaction with the button and set `aria-disabled`.\n\t\t\t */\n\t\t\tisLoading: {\n\t\t\t\tfalse: \"\",\n\t\t\t\ttrue: \"opacity-50\",\n\t\t\t},\n\t\t\t/**\n\t\t\t * The size of the IconButton.\n\t\t\t */\n\t\t\tsize: {\n\t\t\t\txs: \"size-7 sm:size-6\",\n\t\t\t\tsm: \"size-9 sm:size-7\",\n\t\t\t\tmd: \"size-11 sm:size-9\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tappearance: \"outlined\",\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\ntype IconButtonVariants = VariantProps<typeof iconButtonVariants>;\n\n/**\n * The props for the `Button` component.\n */\ntype IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n\tWithAsChild &\n\tIconButtonVariants & {\n\t\t/**\n\t\t * The accessible label for the icon. This label will be visually hidden but announced to screen reader users, similar to alt text for img tags.\n\t\t */\n\t\tlabel: string;\n\t\t/**\n\t\t * An icon to render inside the button. If the `state` is `\"pending\"`, then\n\t\t * the icon will automatically be replaced with a spinner.\n\t\t */\n\t\ticon: ReactNode;\n\t} & (\n\t\t| {\n\t\t\t\t/**\n\t\t\t\t * Use the `asChild` prop to compose Radix's functionality onto alternative\n\t\t\t\t * element types or your own React components.\n\t\t\t\t *\n\t\t\t\t * When `asChild` is set to `true`, mantle will not render a default DOM\n\t\t\t\t * element, instead cloning the component's child and passing it the props and\n\t\t\t\t * behavior required to make it functional.\n\t\t\t\t *\n\t\t\t\t * asChild can be used as deeply as you need to. This means it is a great way\n\t\t\t\t * to compose multiple primitive's behavior together.\n\t\t\t\t *\n\t\t\t\t * @see https://www.radix-ui.com/docs/primitives/guides/composition#composition\n\t\t\t\t */\n\t\t\t\tasChild: true;\n\t\t\t\t/**\n\t\t\t\t * The default behavior of the button. Possible values are: `\"button\"`, `\"submit\"`, and `\"reset\"`.\n\t\t\t\t *\n\t\t\t\t * if `asChild` is NOT used: Unlike the native `<button>` element, this prop is required and has no default value.\n\t\t\t\t *\n\t\t\t\t * If `asChild` IS used: This prop HAS NO EFFECT, is REMOVED, and has no default value. This is because we do not want the `button` `type` to automatically merge with any child anchor `type` attribute because the `anchor` `type` is _strictly different_ than the `button` type, see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type\n\t\t\t\t *\n\t\t\t\t * @enum\n\t\t\t\t * - `\"button\"`: The button has no default behavior, and does nothing when pressed by default. It can have client-side scripts listen to the element's events, which are triggered when the events occur.\n\t\t\t\t * - `\"reset\"`: The button resets all the controls to their initial values.\n\t\t\t\t * - `\"submit\"`: The button submits the form data to the server.\n\t\t\t\t *\n\t\t\t\t * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type\n\t\t\t\t */\n\t\t\t\ttype?: ButtonHTMLAttributes<HTMLButtonElement>[\"type\"];\n\t\t }\n\t\t| {\n\t\t\t\tasChild?: false | undefined;\n\t\t\t\t/**\n\t\t\t\t * The default behavior of the button. Possible values are: `\"button\"`, `\"submit\"`, and `\"reset\"`.\n\t\t\t\t *\n\t\t\t\t * if `asChild` is NOT used: Unlike the native `<button>` element, this prop is required and has no default value.\n\t\t\t\t *\n\t\t\t\t * If `asChild` IS used: This prop HAS NO EFFECT, is REMOVED, and has no default value. This is because we do not want the `button` `type` to automatically merge with any child anchor `type` attribute because the `anchor` `type` is _strictly different_ than the `button` type, see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type\n\t\t\t\t *\n\t\t\t\t * @enum\n\t\t\t\t * - `\"button\"`: The button has no default behavior, and does nothing when pressed by default. It can have client-side scripts listen to the element's events, which are triggered when the events occur.\n\t\t\t\t * - `\"reset\"`: The button resets all the controls to their initial values.\n\t\t\t\t * - `\"submit\"`: The button submits the form data to the server.\n\t\t\t\t *\n\t\t\t\t * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type\n\t\t\t\t */\n\t\t\t\ttype: Exclude<ButtonHTMLAttributes<HTMLButtonElement>[\"type\"], undefined>;\n\t\t }\n\t);\n\n/**\n * Renders a button or a component that looks like a button, an interactive\n * element activated by a user with a mouse, keyboard, finger, voice command, or\n * other assistive technology. Once activated, it then performs an action, such\n * as submitting a form or opening a dialog.\n * Renders only a single icon as children with an accessible, screen-reader-only label.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button\n */\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n\t(\n\t\t{\n\t\t\t\"aria-disabled\": _ariaDisabled,\n\t\t\tappearance,\n\t\t\tasChild = false,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdisabled: _disabled,\n\t\t\ticon: propIcon,\n\t\t\tisLoading = false,\n\t\t\tlabel,\n\t\t\tsize,\n\t\t\ttype,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst disabled = parseBooleanish(_ariaDisabled ?? _disabled ?? isLoading);\n\t\tconst icon = isLoading ? <CircleNotch className=\"animate-spin\" /> : propIcon;\n\n\t\tconst buttonProps = {\n\t\t\t\"aria-disabled\": disabled,\n\t\t\tclassName: cx(\"icon-button\", iconButtonVariants({ appearance, isLoading, size }), className),\n\t\t\t\"data-loading\": isLoading,\n\t\t\t\"data-size\": size,\n\t\t\tdisabled,\n\t\t\tref,\n\t\t\t...props,\n\t\t};\n\n\t\tif (asChild) {\n\t\t\tconst singleChild = Children.only(children);\n\t\t\tconst isValidChild = isValidElement(singleChild);\n\n\t\t\treturn <Slot {...buttonProps}>{isValidChild && cloneElement(singleChild, {}, <Icon svg={icon} />)}</Slot>;\n\t\t}\n\n\t\treturn (\n\t\t\t<button {...buttonProps} type={type}>\n\t\t\t\t<span className=\"sr-only\">{label}</span>\n\t\t\t\t<Icon svg={icon} />\n\t\t\t</button>\n\t\t);\n\t},\n);\nIconButton.displayName = \"IconButton\";\n\nexport { IconButton, iconButtonVariants };\nexport type { IconButtonProps };\n"],"mappings":"wHAAA,OAAS,eAAAA,MAAmB,oCAC5B,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAAW,2BACpB,OAAS,YAAAC,EAAU,gBAAAC,EAAc,cAAAC,EAAY,kBAAAC,MAAsB,QA8IxC,cAAAC,EAoBxB,QAAAC,MApBwB,oBAvI3B,IAAMC,EAAqBC,EAC1B,+KACA,CACC,SAAU,CAIT,WAAY,CACX,MACC,2MACD,SACC,wWACF,EAMA,UAAW,CACV,MAAO,GACP,KAAM,YACP,EAIA,KAAM,CACL,GAAI,mBACJ,GAAI,mBACJ,GAAI,mBACL,CACD,EACA,gBAAiB,CAChB,WAAY,WACZ,KAAM,IACP,CACD,CACD,EAgFMC,EAAaC,EAClB,CACC,CACC,gBAAiBC,EACjB,WAAAC,EACA,QAAAC,EAAU,GACV,SAAAC,EACA,UAAAC,EACA,SAAUC,EACV,KAAMC,EACN,UAAAC,EAAY,GACZ,MAAAC,EACA,KAAAC,EACA,KAAAC,EACA,GAAGC,CACJ,EACAC,IACI,CACJ,IAAMC,EAAWC,EAAgBd,GAAiBK,GAAaE,CAAS,EAClEQ,EAAOR,EAAYb,EAACsB,EAAA,CAAY,UAAU,eAAe,EAAKV,EAE9DW,EAAc,CACnB,gBAAiBJ,EACjB,UAAWK,EAAG,cAAetB,EAAmB,CAAE,WAAAK,EAAY,UAAAM,EAAW,KAAAE,CAAK,CAAC,EAAGL,CAAS,EAC3F,eAAgBG,EAChB,YAAaE,EACb,SAAAI,EACA,IAAAD,EACA,GAAGD,CACJ,EAEA,GAAIT,EAAS,CACZ,IAAMiB,EAAcC,EAAS,KAAKjB,CAAQ,EACpCkB,EAAeC,EAAeH,CAAW,EAE/C,OAAOzB,EAAC6B,EAAA,CAAM,GAAGN,EAAc,SAAAI,GAAgBG,EAAaL,EAAa,CAAC,EAAGzB,EAAC+B,EAAA,CAAK,IAAKV,EAAM,CAAE,EAAE,CACnG,CAEA,OACCpB,EAAC,UAAQ,GAAGsB,EAAa,KAAMP,EAC9B,UAAAhB,EAAC,QAAK,UAAU,UAAW,SAAAc,EAAM,EACjCd,EAAC+B,EAAA,CAAK,IAAKV,EAAM,GAClB,CAEF,CACD,EACAjB,EAAW,YAAc","names":["CircleNotch","Slot","cva","Children","cloneElement","forwardRef","isValidElement","jsx","jsxs","iconButtonVariants","cva","IconButton","forwardRef","_ariaDisabled","appearance","asChild","children","className","_disabled","propIcon","isLoading","label","size","type","props","ref","disabled","parseBooleanish","icon","CircleNotch","buttonProps","cx","singleChild","Children","isValidChild","isValidElement","Slot","cloneElement","Icon"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-A5H52ODC.js";import*as p from"@radix-ui/react-separator";import{createContext as u,forwardRef as f,useContext as c}from"react";import{jsx as i}from"react/jsx-runtime";var n=u({}),h=({className:o,children:r,...t})=>i(n.Provider,{value:{orientation:"horizontal"},children:i("div",{"data-horizontal-separator-group":!0,className:e("group flex items-center gap-2 [&_*:not([data-separator])]:shrink-0",o),...t,children:r})}),
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-A5H52ODC.js";import*as p from"@radix-ui/react-separator";import{createContext as u,forwardRef as f,useContext as c}from"react";import{jsx as i}from"react/jsx-runtime";var n=u({}),h=({className:o,children:r,...t})=>i(n.Provider,{value:{orientation:"horizontal"},children:i("div",{"data-horizontal-separator-group":!0,className:e("group flex items-center gap-2 [&_*:not([data-separator])]:shrink-0",o),...t,children:r})}),l=f(({className:o,orientation:r,decorative:t=!0,...s},m)=>{let a=c(n).orientation??r??"horizontal";return i(p.Root,{ref:m,"data-separator":!0,"aria-orientation":t?void 0:a,decorative:t,orientation:a,className:e("bg-gray-500/20 dark-high-contrast:bg-black high-contrast:bg-black dark:bg-gray-600/20",a==="horizontal"?"h-px w-full group-data-[horizontal-separator-group]:flex-1":"h-full w-px",o),...s})});l.displayName="Separator";export{h as a,l as b};
|
|
2
|
+
//# sourceMappingURL=chunk-UPLGE3M6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../packages/separator/src/separator.tsx"],"sourcesContent":["import * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef, ElementRef, HTMLAttributes } from \"react\";\nimport { cx } from \"../../cx\";\n\ntype Orientation = \"horizontal\" | \"vertical\";\n\ntype SeparatorGroupContextShape = {\n\torientation?: Orientation;\n};\n\nconst SeparatorGroupContext = createContext<SeparatorGroupContextShape>({});\n\n/**\n * A container to layout a group of horizontal separators.\n */\nconst HorizontalSeparatorGroup = ({ className, children, ...props }: HTMLAttributes<HTMLDivElement>) => (\n\t<SeparatorGroupContext.Provider value={{ orientation: \"horizontal\" }}>\n\t\t<div\n\t\t\tdata-horizontal-separator-group\n\t\t\tclassName={cx(\"group flex items-center gap-2 [&_*:not([data-separator])]:shrink-0\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t</SeparatorGroupContext.Provider>\n);\n\ntype SeparatorProps = Omit<ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>, \"children\">;\n\n/**\n * Visually or semantically separates content.\n */\nconst Separator = forwardRef<ElementRef<typeof SeparatorPrimitive.Root>, SeparatorProps>(\n\t({ className, orientation: propOrientation, decorative = true, ...props }, ref) => {\n\t\tconst ctx = useContext(SeparatorGroupContext);\n\t\t// Prefer the orientation from the context if it's set, else fallback to the prop and then to \"horizontal\".\n\t\tconst orientation = ctx.orientation ?? propOrientation ?? \"horizontal\";\n\n\t\treturn (\n\t\t\t<SeparatorPrimitive.Root\n\t\t\t\tref={ref}\n\t\t\t\tdata-separator\n\t\t\t\taria-orientation={decorative ? undefined : orientation}\n\t\t\t\tdecorative={decorative}\n\t\t\t\torientation={orientation}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"bg-gray-500/20 dark-high-contrast:bg-black high-contrast:bg-black dark:bg-gray-600/20\",\n\t\t\t\t\torientation === \"horizontal\" ? \"h-px w-full group-data-[horizontal-separator-group]:flex-1\" : \"h-full w-px\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nSeparator.displayName = \"Separator\";\n\nexport { HorizontalSeparatorGroup, Separator };\n"],"mappings":"wCAAA,UAAYA,MAAwB,4BACpC,OAAS,iBAAAC,EAAe,cAAAC,EAAY,cAAAC,MAAkB,QAiBpD,cAAAC,MAAA,oBAPF,IAAMC,EAAwBC,EAA0C,CAAC,CAAC,EAKpEC,EAA2B,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAM,IACjEN,EAACC,EAAsB,SAAtB,CAA+B,MAAO,CAAE,YAAa,YAAa,EAClE,SAAAD,EAAC,OACA,kCAA+B,GAC/B,UAAWO,EAAG,qEAAsEH,CAAS,EAC5F,GAAGE,EAEH,SAAAD,EACF,EACD,EAQKG,EAAYC,EACjB,CAAC,CAAE,UAAAL,EAAW,YAAaM,EAAiB,WAAAC,EAAa,GAAM,GAAGL,CAAM,EAAGM,IAAQ,CAGlF,IAAMC,EAFMC,EAAWb,CAAqB,EAEpB,aAAeS,GAAmB,aAE1D,OACCV,EAAoB,OAAnB,CACA,IAAKY,EACL,iBAAc,GACd,mBAAkBD,EAAa,OAAYE,EAC3C,WAAYF,EACZ,YAAaE,EACb,UAAWN,EACV,wFACAM,IAAgB,aAAe,6DAA+D,cAC9FT,CACD,EACC,GAAGE,EACL,CAEF,CACD,EACAE,EAAU,YAAc","names":["SeparatorPrimitive","createContext","forwardRef","useContext","jsx","SeparatorGroupContext","createContext","HorizontalSeparatorGroup","className","children","props","cx","Separator","forwardRef","propOrientation","decorative","ref","orientation","useContext"]}
|
package/dist/dialog.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-Q6UDWWVP.js";import"./chunk-VCISMRMX.js";import"./chunk-MODFDUXR.js";import"./chunk-YPS473FU.js";import"./chunk-GJVJTVHQ.js";import{a as l}from"./chunk-A5H52ODC.js";import{X as P}from"@phosphor-icons/react/X";import*as e from"@radix-ui/react-dialog";import{forwardRef as r}from"react";import{jsx as i,jsxs as N}from"react/jsx-runtime";var u=e.Root,x=e.Trigger,g=e.Portal,C=e.Close,n=r(({className:o,...t},a)=>i(e.Overlay,{ref:a,className:l("fixed inset-0 z-50 bg-overlay backdrop-blur-sm data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0",o),...t}));n.displayName=e.Overlay.displayName;var d=r(({className:o,children:t,...a},s)=>N(g,{children:[i(n,{}),i("div",{className:"fixed inset-4 z-50 flex items-center justify-center",children:i(e.Content,{className:l("flex max-h-full w-full max-w-lg flex-1 flex-col","rounded-xl border border-dialog bg-dialog shadow-lg transition-transform duration-200","data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95",o),ref:s,...a,children:t})})]}));d.displayName=e.Content.displayName;var p=({className:o,children:t,...a})=>i("div",{className:l("relative flex shrink-0 items-center justify-between gap-2 border-b border-dialog-muted px-6 py-4 text-strong","has-[.icon-button]:pr-4",o),...a,children:t});p.displayName="DialogHeader";var b=({size:o="md",type:t="button",label:a="Close Dialog",appearance:s="ghost",...y})=>i(e.Close,{asChild:!0,children:i(m,{appearance:s,icon:i(P,{}),label:a,size:o,type:t,...y})}),D=({className:o,...t})=>i("div",{className:l("scrollbar flex-1 overflow-y-auto p-6 text-body",o),...t});D.displayName="DialogBody";var c=({className:o,...t})=>i("div",{className:l("flex shrink-0 flex-row-reverse gap-2 border-t border-dialog-muted px-6 py-4",o),...t});c.displayName="DialogFooter";var f=r(({className:o,...t},a)=>i(e.Title,{ref:a,className:l("truncate text-lg font-medium text-strong",o),...t}));f.displayName=e.Title.displayName;var v=r(({className:o,...t},a)=>i(e.Description,{ref:a,className:l("text-muted",o),...t}));v.displayName=e.Description.displayName;export{u as Dialog,D as DialogBody,C as DialogClose,b as DialogCloseIconButton,d as DialogContent,v as DialogDescription,c as DialogFooter,p as DialogHeader,n as DialogOverlay,g as DialogPortal,f as DialogTitle,x as DialogTrigger};
|
|
2
2
|
//# sourceMappingURL=dialog.js.map
|
package/dist/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../packages/dialog/src/dialog.tsx"],"sourcesContent":["import { X } from \"@phosphor-icons/react/X\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { IconButton, type IconButtonProps } from \"../../button\";\nimport { cx } from \"../../cx\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = forwardRef<\n\tElementRef<typeof DialogPrimitive.Overlay>,\n\tComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Overlay\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"fixed inset-0 z-50 bg-overlay backdrop-blur-sm data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = forwardRef<ElementRef<\"div\">, ComponentPropsWithoutRef<typeof DialogPrimitive.Content>>(\n\t({ className, children, ...props }, ref) => (\n\t\t<DialogPortal>\n\t\t\t<DialogOverlay />\n\t\t\t<div className=\"fixed inset-4 z-50 flex items-center justify-center\">\n\t\t\t\t<DialogPrimitive.Content\n\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\"flex max-h-full w-full max-w-lg flex-1 flex-col\",\n\t\t\t\t\t\t\"rounded-xl border border-dialog bg-dialog shadow-lg transition-transform duration-200\",\n\t\t\t\t\t\t\"data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</DialogPrimitive.Content>\n\t\t\t</div>\n\t\t</DialogPortal>\n\t),\n);\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div
|
|
1
|
+
{"version":3,"sources":["../packages/dialog/src/dialog.tsx"],"sourcesContent":["import { X } from \"@phosphor-icons/react/X\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { IconButton, type IconButtonProps } from \"../../button\";\nimport { cx } from \"../../cx\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = forwardRef<\n\tElementRef<typeof DialogPrimitive.Overlay>,\n\tComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Overlay\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"fixed inset-0 z-50 bg-overlay backdrop-blur-sm data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = forwardRef<ElementRef<\"div\">, ComponentPropsWithoutRef<typeof DialogPrimitive.Content>>(\n\t({ className, children, ...props }, ref) => (\n\t\t<DialogPortal>\n\t\t\t<DialogOverlay />\n\t\t\t<div className=\"fixed inset-4 z-50 flex items-center justify-center\">\n\t\t\t\t<DialogPrimitive.Content\n\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\"flex max-h-full w-full max-w-lg flex-1 flex-col\",\n\t\t\t\t\t\t\"rounded-xl border border-dialog bg-dialog shadow-lg transition-transform duration-200\",\n\t\t\t\t\t\t\"data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</DialogPrimitive.Content>\n\t\t\t</div>\n\t\t</DialogPortal>\n\t),\n);\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"relative flex shrink-0 items-center justify-between gap-2 border-b border-dialog-muted px-6 py-4 text-strong\",\n\t\t\t\"has-[.icon-button]:pr-4\", // when there are actions in the header, shorten the padding\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</div>\n);\nDialogHeader.displayName = \"DialogHeader\";\n\ntype DialogCloseIconButtonProps = Partial<Omit<IconButtonProps, \"icon\">>;\nconst DialogCloseIconButton = ({\n\tsize = \"md\",\n\ttype = \"button\",\n\tlabel = \"Close Dialog\",\n\tappearance = \"ghost\",\n\t...props\n}: DialogCloseIconButtonProps) => (\n\t<DialogPrimitive.Close asChild>\n\t\t<IconButton appearance={appearance} icon={<X />} label={label} size={size} type={type} {...props} />\n\t</DialogPrimitive.Close>\n);\n\nconst DialogBody = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div className={cx(\"scrollbar flex-1 overflow-y-auto p-6 text-body\", className)} {...props} />\n);\nDialogBody.displayName = \"DialogBody\";\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\"flex shrink-0 flex-row-reverse gap-2 border-t border-dialog-muted px-6 py-4\", className)}\n\t\t{...props}\n\t/>\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = forwardRef<\n\tElementRef<typeof DialogPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Title ref={ref} className={cx(\"truncate text-lg font-medium text-strong\", className)} {...props} />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = forwardRef<\n\tElementRef<typeof DialogPrimitive.Description>,\n\tComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Description ref={ref} className={cx(\"text-muted\", className)} {...props} />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n\tDialog,\n\tDialogBody,\n\tDialogClose,\n\tDialogCloseIconButton,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogOverlay,\n\tDialogPortal,\n\tDialogTitle,\n\tDialogTrigger,\n};\n"],"mappings":"gMAAA,OAAS,KAAAA,MAAS,0BAClB,UAAYC,MAAqB,yBACjC,OAAS,cAAAC,MAAkB,QAiB1B,cAAAC,EAaC,QAAAC,MAbD,oBAZD,IAAMC,EAAyB,OAEzBC,EAAgC,UAEhCC,EAA+B,SAE/BC,EAA8B,QAE9BC,EAAgBC,EAGpB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC3BV,EAAiB,UAAhB,CACA,IAAKU,EACL,UAAWC,EACV,iKACAH,CACD,EACC,GAAGC,EACL,CACA,EACDH,EAAc,YAA8B,UAAQ,YAEpD,IAAMM,EAAgBL,EACrB,CAAC,CAAE,UAAAC,EAAW,SAAAK,EAAU,GAAGJ,CAAM,EAAGC,IACnCT,EAACG,EAAA,CACA,UAAAJ,EAACM,EAAA,EAAc,EACfN,EAAC,OAAI,UAAU,sDACd,SAAAA,EAAiB,UAAhB,CACA,UAAWW,EACV,kDACA,wFACA,2KACAH,CACD,EACA,IAAKE,EACJ,GAAGD,EAEH,SAAAI,EACF,EACD,GACD,CAEF,EACAD,EAAc,YAA8B,UAAQ,YAEpD,IAAME,EAAe,CAAC,CAAE,UAAAN,EAAW,SAAAK,EAAU,GAAGJ,CAAM,IACrDT,EAAC,OACA,UAAWW,EACV,+GACA,0BACAH,CACD,EACC,GAAGC,EAEH,SAAAI,EACF,EAEDC,EAAa,YAAc,eAG3B,IAAMC,EAAwB,CAAC,CAC9B,KAAAC,EAAO,KACP,KAAAC,EAAO,SACP,MAAAC,EAAQ,eACR,WAAAC,EAAa,QACb,GAAGV,CACJ,IACCT,EAAiB,QAAhB,CAAsB,QAAO,GAC7B,SAAAA,EAACoB,EAAA,CAAW,WAAYD,EAAY,KAAMnB,EAACqB,EAAA,EAAE,EAAI,MAAOH,EAAO,KAAMF,EAAM,KAAMC,EAAO,GAAGR,EAAO,EACnG,EAGKa,EAAa,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,IACzCT,EAAC,OAAI,UAAWW,EAAG,iDAAkDH,CAAS,EAAI,GAAGC,EAAO,EAE7Fa,EAAW,YAAc,aAEzB,IAAMC,EAAe,CAAC,CAAE,UAAAf,EAAW,GAAGC,CAAM,IAC3CT,EAAC,OACA,UAAWW,EAAG,8EAA+EH,CAAS,EACrG,GAAGC,EACL,EAEDc,EAAa,YAAc,eAE3B,IAAMC,EAAcjB,EAGlB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC3BV,EAAiB,QAAhB,CAAsB,IAAKU,EAAK,UAAWC,EAAG,2CAA4CH,CAAS,EAAI,GAAGC,EAAO,CAClH,EACDe,EAAY,YAA8B,QAAM,YAEhD,IAAMC,EAAoBlB,EAGxB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC3BV,EAAiB,cAAhB,CAA4B,IAAKU,EAAK,UAAWC,EAAG,aAAcH,CAAS,EAAI,GAAGC,EAAO,CAC1F,EACDgB,EAAkB,YAA8B,cAAY","names":["X","DialogPrimitive","forwardRef","jsx","jsxs","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","forwardRef","className","props","ref","cx","DialogContent","children","DialogHeader","DialogCloseIconButton","size","type","label","appearance","IconButton","X","DialogBody","DialogFooter","DialogTitle","DialogDescription"]}
|
package/dist/dropdown-menu.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as _radix_ui_react_separator from '@radix-ui/react-separator';
|
|
3
2
|
import * as react from 'react';
|
|
4
3
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
5
4
|
|
|
@@ -30,7 +29,276 @@ declare const DropdownMenuRadioItem: react.ForwardRefExoticComponent<Omit<Dropdo
|
|
|
30
29
|
declare const DropdownMenuLabel: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
31
30
|
inset?: boolean;
|
|
32
31
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<Omit<
|
|
32
|
+
declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<Omit<{
|
|
33
|
+
className?: string | undefined;
|
|
34
|
+
defaultChecked?: boolean | undefined;
|
|
35
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
36
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
37
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
38
|
+
accessKey?: string | undefined;
|
|
39
|
+
autoFocus?: boolean | undefined;
|
|
40
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
41
|
+
contextMenu?: string | undefined;
|
|
42
|
+
dir?: string | undefined;
|
|
43
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
44
|
+
hidden?: boolean | undefined;
|
|
45
|
+
id?: string | undefined;
|
|
46
|
+
lang?: string | undefined;
|
|
47
|
+
nonce?: string | undefined;
|
|
48
|
+
slot?: string | undefined;
|
|
49
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
50
|
+
style?: react.CSSProperties | undefined;
|
|
51
|
+
tabIndex?: number | undefined;
|
|
52
|
+
title?: string | undefined;
|
|
53
|
+
translate?: "yes" | "no" | undefined;
|
|
54
|
+
radioGroup?: string | undefined;
|
|
55
|
+
role?: react.AriaRole | undefined;
|
|
56
|
+
about?: string | undefined;
|
|
57
|
+
content?: string | undefined;
|
|
58
|
+
datatype?: string | undefined;
|
|
59
|
+
inlist?: any;
|
|
60
|
+
prefix?: string | undefined;
|
|
61
|
+
property?: string | undefined;
|
|
62
|
+
rel?: string | undefined;
|
|
63
|
+
resource?: string | undefined;
|
|
64
|
+
rev?: string | undefined;
|
|
65
|
+
typeof?: string | undefined;
|
|
66
|
+
vocab?: string | undefined;
|
|
67
|
+
autoCapitalize?: string | undefined;
|
|
68
|
+
autoCorrect?: string | undefined;
|
|
69
|
+
autoSave?: string | undefined;
|
|
70
|
+
color?: string | undefined;
|
|
71
|
+
itemProp?: string | undefined;
|
|
72
|
+
itemScope?: boolean | undefined;
|
|
73
|
+
itemType?: string | undefined;
|
|
74
|
+
itemID?: string | undefined;
|
|
75
|
+
itemRef?: string | undefined;
|
|
76
|
+
results?: number | undefined;
|
|
77
|
+
security?: string | undefined;
|
|
78
|
+
unselectable?: "on" | "off" | undefined;
|
|
79
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
80
|
+
is?: string | undefined;
|
|
81
|
+
"aria-activedescendant"?: string | undefined;
|
|
82
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
83
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
84
|
+
"aria-braillelabel"?: string | undefined;
|
|
85
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
86
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
87
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
88
|
+
"aria-colcount"?: number | undefined;
|
|
89
|
+
"aria-colindex"?: number | undefined;
|
|
90
|
+
"aria-colindextext"?: string | undefined;
|
|
91
|
+
"aria-colspan"?: number | undefined;
|
|
92
|
+
"aria-controls"?: string | undefined;
|
|
93
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
94
|
+
"aria-describedby"?: string | undefined;
|
|
95
|
+
"aria-description"?: string | undefined;
|
|
96
|
+
"aria-details"?: string | undefined;
|
|
97
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
98
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
99
|
+
"aria-errormessage"?: string | undefined;
|
|
100
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
101
|
+
"aria-flowto"?: string | undefined;
|
|
102
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
103
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
104
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
105
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
106
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
107
|
+
"aria-label"?: string | undefined;
|
|
108
|
+
"aria-labelledby"?: string | undefined;
|
|
109
|
+
"aria-level"?: number | undefined;
|
|
110
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
111
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
112
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
113
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
114
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
115
|
+
"aria-owns"?: string | undefined;
|
|
116
|
+
"aria-placeholder"?: string | undefined;
|
|
117
|
+
"aria-posinset"?: number | undefined;
|
|
118
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
119
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
120
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
121
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
122
|
+
"aria-roledescription"?: string | undefined;
|
|
123
|
+
"aria-rowcount"?: number | undefined;
|
|
124
|
+
"aria-rowindex"?: number | undefined;
|
|
125
|
+
"aria-rowindextext"?: string | undefined;
|
|
126
|
+
"aria-rowspan"?: number | undefined;
|
|
127
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
128
|
+
"aria-setsize"?: number | undefined;
|
|
129
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
130
|
+
"aria-valuemax"?: number | undefined;
|
|
131
|
+
"aria-valuemin"?: number | undefined;
|
|
132
|
+
"aria-valuenow"?: number | undefined;
|
|
133
|
+
"aria-valuetext"?: string | undefined;
|
|
134
|
+
dangerouslySetInnerHTML?: {
|
|
135
|
+
__html: string | TrustedHTML;
|
|
136
|
+
} | undefined;
|
|
137
|
+
onCopy?: react.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
138
|
+
onCopyCapture?: react.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
139
|
+
onCut?: react.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
140
|
+
onCutCapture?: react.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
141
|
+
onPaste?: react.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
142
|
+
onPasteCapture?: react.ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
143
|
+
onCompositionEnd?: react.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
144
|
+
onCompositionEndCapture?: react.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
145
|
+
onCompositionStart?: react.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
146
|
+
onCompositionStartCapture?: react.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
147
|
+
onCompositionUpdate?: react.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
148
|
+
onCompositionUpdateCapture?: react.CompositionEventHandler<HTMLDivElement> | undefined;
|
|
149
|
+
onFocus?: react.FocusEventHandler<HTMLDivElement> | undefined;
|
|
150
|
+
onFocusCapture?: react.FocusEventHandler<HTMLDivElement> | undefined;
|
|
151
|
+
onBlur?: react.FocusEventHandler<HTMLDivElement> | undefined;
|
|
152
|
+
onBlurCapture?: react.FocusEventHandler<HTMLDivElement> | undefined;
|
|
153
|
+
onChange?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
154
|
+
onChangeCapture?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
155
|
+
onBeforeInput?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
156
|
+
onBeforeInputCapture?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
157
|
+
onInput?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
158
|
+
onInputCapture?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
159
|
+
onReset?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
160
|
+
onResetCapture?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
161
|
+
onSubmit?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
162
|
+
onSubmitCapture?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
163
|
+
onInvalid?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
164
|
+
onInvalidCapture?: react.FormEventHandler<HTMLDivElement> | undefined;
|
|
165
|
+
onLoad?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
166
|
+
onLoadCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
167
|
+
onError?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
168
|
+
onErrorCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
169
|
+
onKeyDown?: react.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
170
|
+
onKeyDownCapture?: react.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
171
|
+
onKeyPress?: react.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
172
|
+
onKeyPressCapture?: react.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
173
|
+
onKeyUp?: react.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
174
|
+
onKeyUpCapture?: react.KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
175
|
+
onAbort?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
176
|
+
onAbortCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
177
|
+
onCanPlay?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
178
|
+
onCanPlayCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
179
|
+
onCanPlayThrough?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
180
|
+
onCanPlayThroughCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
181
|
+
onDurationChange?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
182
|
+
onDurationChangeCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
183
|
+
onEmptied?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
184
|
+
onEmptiedCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
185
|
+
onEncrypted?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
186
|
+
onEncryptedCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
187
|
+
onEnded?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
188
|
+
onEndedCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
189
|
+
onLoadedData?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
190
|
+
onLoadedDataCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
191
|
+
onLoadedMetadata?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
192
|
+
onLoadedMetadataCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
193
|
+
onLoadStart?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
194
|
+
onLoadStartCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
195
|
+
onPause?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
196
|
+
onPauseCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
197
|
+
onPlay?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
198
|
+
onPlayCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
199
|
+
onPlaying?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
200
|
+
onPlayingCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
201
|
+
onProgress?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
202
|
+
onProgressCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
203
|
+
onRateChange?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
204
|
+
onRateChangeCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
205
|
+
onResize?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
206
|
+
onResizeCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
207
|
+
onSeeked?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
208
|
+
onSeekedCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
209
|
+
onSeeking?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
210
|
+
onSeekingCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
211
|
+
onStalled?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
212
|
+
onStalledCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
213
|
+
onSuspend?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
214
|
+
onSuspendCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
215
|
+
onTimeUpdate?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
216
|
+
onTimeUpdateCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
217
|
+
onVolumeChange?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
218
|
+
onVolumeChangeCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
219
|
+
onWaiting?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
220
|
+
onWaitingCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
221
|
+
onAuxClick?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
222
|
+
onAuxClickCapture?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
223
|
+
onClick?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
224
|
+
onClickCapture?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
225
|
+
onContextMenu?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
226
|
+
onContextMenuCapture?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
227
|
+
onDoubleClick?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
228
|
+
onDoubleClickCapture?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
229
|
+
onDrag?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
230
|
+
onDragCapture?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
231
|
+
onDragEnd?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
232
|
+
onDragEndCapture?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
233
|
+
onDragEnter?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
234
|
+
onDragEnterCapture?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
235
|
+
onDragExit?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
236
|
+
onDragExitCapture?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
237
|
+
onDragLeave?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
238
|
+
onDragLeaveCapture?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
239
|
+
onDragOver?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
240
|
+
onDragOverCapture?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
241
|
+
onDragStart?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
242
|
+
onDragStartCapture?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
243
|
+
onDrop?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
244
|
+
onDropCapture?: react.DragEventHandler<HTMLDivElement> | undefined;
|
|
245
|
+
onMouseDown?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
246
|
+
onMouseDownCapture?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
247
|
+
onMouseEnter?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
248
|
+
onMouseLeave?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
249
|
+
onMouseMove?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
250
|
+
onMouseMoveCapture?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
251
|
+
onMouseOut?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
252
|
+
onMouseOutCapture?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
253
|
+
onMouseOver?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
254
|
+
onMouseOverCapture?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
255
|
+
onMouseUp?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
256
|
+
onMouseUpCapture?: react.MouseEventHandler<HTMLDivElement> | undefined;
|
|
257
|
+
onSelect?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
258
|
+
onSelectCapture?: react.ReactEventHandler<HTMLDivElement> | undefined;
|
|
259
|
+
onTouchCancel?: react.TouchEventHandler<HTMLDivElement> | undefined;
|
|
260
|
+
onTouchCancelCapture?: react.TouchEventHandler<HTMLDivElement> | undefined;
|
|
261
|
+
onTouchEnd?: react.TouchEventHandler<HTMLDivElement> | undefined;
|
|
262
|
+
onTouchEndCapture?: react.TouchEventHandler<HTMLDivElement> | undefined;
|
|
263
|
+
onTouchMove?: react.TouchEventHandler<HTMLDivElement> | undefined;
|
|
264
|
+
onTouchMoveCapture?: react.TouchEventHandler<HTMLDivElement> | undefined;
|
|
265
|
+
onTouchStart?: react.TouchEventHandler<HTMLDivElement> | undefined;
|
|
266
|
+
onTouchStartCapture?: react.TouchEventHandler<HTMLDivElement> | undefined;
|
|
267
|
+
onPointerDown?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
268
|
+
onPointerDownCapture?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
269
|
+
onPointerMove?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
270
|
+
onPointerMoveCapture?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
271
|
+
onPointerUp?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
272
|
+
onPointerUpCapture?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
273
|
+
onPointerCancel?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
274
|
+
onPointerCancelCapture?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
275
|
+
onPointerEnter?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
276
|
+
onPointerLeave?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
277
|
+
onPointerOver?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
278
|
+
onPointerOverCapture?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
279
|
+
onPointerOut?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
280
|
+
onPointerOutCapture?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
281
|
+
onGotPointerCapture?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
282
|
+
onGotPointerCaptureCapture?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
283
|
+
onLostPointerCapture?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
284
|
+
onLostPointerCaptureCapture?: react.PointerEventHandler<HTMLDivElement> | undefined;
|
|
285
|
+
onScroll?: react.UIEventHandler<HTMLDivElement> | undefined;
|
|
286
|
+
onScrollCapture?: react.UIEventHandler<HTMLDivElement> | undefined;
|
|
287
|
+
onWheel?: react.WheelEventHandler<HTMLDivElement> | undefined;
|
|
288
|
+
onWheelCapture?: react.WheelEventHandler<HTMLDivElement> | undefined;
|
|
289
|
+
onAnimationStart?: react.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
290
|
+
onAnimationStartCapture?: react.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
291
|
+
onAnimationEnd?: react.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
292
|
+
onAnimationEndCapture?: react.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
293
|
+
onAnimationIteration?: react.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
294
|
+
onAnimationIterationCapture?: react.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
295
|
+
onTransitionEnd?: react.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
296
|
+
onTransitionEndCapture?: react.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
297
|
+
key?: react.Key | null | undefined;
|
|
298
|
+
asChild?: boolean;
|
|
299
|
+
orientation?: "horizontal" | "vertical";
|
|
300
|
+
decorative?: boolean;
|
|
301
|
+
} & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
34
302
|
declare const DropdownMenuShortcut: {
|
|
35
303
|
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
36
304
|
displayName: string;
|
package/dist/dropdown-menu.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as u}from"./chunk-
|
|
1
|
+
import{b as u}from"./chunk-UPLGE3M6.js";import{a}from"./chunk-A5H52ODC.js";import{CaretRight as P}from"@phosphor-icons/react/CaretRight";import{Check as l}from"@phosphor-icons/react/Check";import*as e from"@radix-ui/react-dropdown-menu";import{forwardRef as d}from"react";import{jsx as n,jsxs as m}from"react/jsx-runtime";var x=e.Root,y=e.Trigger,R=e.Group,s=e.Portal,C=e.Sub,I=e.RadioGroup,c=d(({className:o,inset:t,children:r,...i},p)=>m(e.SubTrigger,{className:a("focus:bg-accent data-state-open:bg-accent relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-9 text-base outline-none sm:text-sm","data-highlighted:bg-popover-hover data-state-open:bg-popover-hover","[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0",t&&"pl-8",o),ref:p,...i,children:[r,n("span",{className:"absolute right-2 flex items-center",children:n(P,{className:"size-5 shrink-0 sm:size-4",weight:"bold"})})]}));c.displayName="DropdownMenuSubTrigger";var w=d(({className:o,loop:t=!0,...r},i)=>n(s,{children:n(e.SubContent,{className:a("scrollbar","text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded border border-popover bg-popover p-1.25 shadow-xl data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto",o),loop:t,ref:i,...r})}));w.displayName="DropdownMenuSubContent";var f=d(({className:o,loop:t=!0,width:r,...i},p)=>n(s,{children:n(e.Content,{ref:p,className:a("scrollbar","text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded border border-popover bg-popover p-1.25 shadow-xl outline-none","data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95","my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto",r==="trigger"&&"w-[var(--radix-dropdown-menu-trigger-width)]",o),loop:t,...i})}));f.displayName="DropdownMenuContent";var g=d(({className:o,inset:t,...r},i)=>n(e.Item,{ref:i,className:a("focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 text-base font-normal outline-none transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-popover-hover data-active-item:dark:bg-popover-hover sm:text-sm","[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0",t&&"pl-8",o),...r}));g.displayName="DropdownMenuItem";var v=d(({className:o,children:t,checked:r,...i},p)=>m(e.CheckboxItem,{ref:p,className:a("relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-base font-normal text-strong outline-none data-disabled:pointer-events-none data-disabled:opacity-50 sm:text-sm","data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover","aria-checked:!bg-filled-accent aria-checked:font-medium aria-checked:text-on-filled","[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0",o),checked:r,...i,children:[n("span",{className:"absolute right-2 flex items-center",children:n(e.ItemIndicator,{children:n(l,{className:"size-5 shrink-0 sm:size-4",weight:"bold"})})}),t]}));v.displayName="DropdownMenuCheckboxItem";var h=d(({className:o,children:t,...r},i)=>m(e.RadioItem,{className:a("relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-base font-normal text-strong outline-none data-disabled:pointer-events-none data-disabled:opacity-50 sm:text-sm","data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover","aria-checked:!bg-filled-accent aria-checked:font-medium aria-checked:text-on-filled","[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0",o),ref:i,...r,children:[n("span",{className:"absolute right-2 flex items-center",children:n(e.ItemIndicator,{children:n(l,{className:"size-5 shrink-0 sm:size-4",weight:"bold"})})}),t]}));h.displayName="DropdownMenuRadioItem";var M=d(({className:o,inset:t,...r},i)=>n(e.Label,{ref:i,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...r}));M.displayName="DropdownMenuLabel";var D=d(({className:o,...t},r)=>n(u,{ref:r,className:a("-mx-1.25 my-1 w-auto",o),...t}));D.displayName="DropdownMenuSeparator";var b=({className:o,...t})=>n("span",{className:a("ml-auto text-xs tracking-widest opacity-60",o),...t});b.displayName="DropdownMenuShortcut";export{x as DropdownMenu,v as DropdownMenuCheckboxItem,f as DropdownMenuContent,R as DropdownMenuGroup,g as DropdownMenuItem,M as DropdownMenuLabel,s as DropdownMenuPortal,I as DropdownMenuRadioGroup,h as DropdownMenuRadioItem,D as DropdownMenuSeparator,b as DropdownMenuShortcut,C as DropdownMenuSub,w as DropdownMenuSubContent,c as DropdownMenuSubTrigger,y as DropdownMenuTrigger};
|
|
2
2
|
//# sourceMappingURL=dropdown-menu.js.map
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useLayoutEffect } from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* useIsomorphicLayoutEffect is a hook that uses useLayoutEffect on the client and useEffect on the server.
|
|
5
5
|
*/
|
|
6
|
-
declare
|
|
6
|
+
declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
7
7
|
|
|
8
8
|
declare function useMatchesMediaQuery(query: string): boolean;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* usePrefersReducedMotion returns true if the user has opted out of animations
|
|
12
|
+
*/
|
|
13
|
+
declare function usePrefersReducedMotion(): boolean;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Hook to generate a random, stable id.
|
|
17
|
+
* This is similar to `useId`, but generates a stable id client side which can also
|
|
18
|
+
* be used for css selectors and element ids.
|
|
12
19
|
*/
|
|
13
|
-
declare const
|
|
20
|
+
declare const useRandomStableId: (prefix?: string) => string;
|
|
14
21
|
|
|
15
|
-
export { useIsomorphicLayoutEffect, useMatchesMediaQuery, usePrefersReducedMotion };
|
|
22
|
+
export { useIsomorphicLayoutEffect, useMatchesMediaQuery, usePrefersReducedMotion, useRandomStableId };
|
package/dist/hooks.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a,b as c,c as d}from"./chunk-4V47D7RP.js";import{a as b}from"./chunk-IGCOSMVM.js";export{a as useIsomorphicLayoutEffect,b as useMatchesMediaQuery,c as usePrefersReducedMotion,d as useRandomStableId};
|
|
2
2
|
//# sourceMappingURL=hooks.js.map
|
package/dist/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/progress.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { W as WithStyleProps } from './with-style-props-VnLWm0Yd.js';
|
|
|
4
4
|
|
|
5
5
|
type RemValue = `${number}rem`;
|
|
6
6
|
type StrokeWidth = number | RemValue;
|
|
7
|
+
type ValueType = number | "indeterminate";
|
|
7
8
|
type SvgAttributes = Omit<HTMLAttributes<SVGElement>, "viewBox" | "role" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow">;
|
|
8
9
|
type Props = SvgAttributes & {
|
|
9
10
|
/**
|
|
@@ -26,18 +27,20 @@ type Props = SvgAttributes & {
|
|
|
26
27
|
* The current value of the progress bar.
|
|
27
28
|
* This attribute specifies how much of the task that has been completed.
|
|
28
29
|
* It must be a valid floating point number between 0 and max, or between 0 and 100 if max is omitted.
|
|
30
|
+
* If set to `"indeterminate"`, the progress bar is considered indeterminate.
|
|
29
31
|
*
|
|
30
32
|
* @default 0
|
|
31
33
|
*/
|
|
32
|
-
value?:
|
|
34
|
+
value?: ValueType | undefined;
|
|
33
35
|
};
|
|
34
36
|
/**
|
|
35
37
|
* A simple circular progress bar.
|
|
36
38
|
*/
|
|
37
39
|
declare const ProgressDonut: ({ children, className, max: _max, strokeWidth: _strokeWidth, style, value: _value, ...props }: Props) => react_jsx_runtime.JSX.Element;
|
|
40
|
+
type ProgressDonutIndicatorProps = WithStyleProps;
|
|
38
41
|
/**
|
|
39
42
|
* The indicator for the circular progress bar.
|
|
40
43
|
*/
|
|
41
|
-
declare const ProgressDonutIndicator: ({ className, style }:
|
|
44
|
+
declare const ProgressDonutIndicator: ({ className, style }: ProgressDonutIndicatorProps) => react_jsx_runtime.JSX.Element;
|
|
42
45
|
|
|
43
46
|
export { ProgressDonut, ProgressDonutIndicator };
|