@usememos/ui 26.11.2 → 26.11.4
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/README.md +1 -1
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/dialog/parts.js +1 -1
- package/dist/components/dialog/parts.js.map +3 -3
- package/dist/components/drawer/index.js +1 -1
- package/dist/components/drawer/index.js.map +2 -2
- package/dist/components/form/index.js +3 -0
- package/dist/components/form/index.js.map +7 -0
- package/dist/components/list/index.js +1 -1
- package/dist/components/list/index.js.map +3 -3
- package/dist/components/table/index.js +1 -1
- package/dist/components/table/index.js.map +3 -3
- package/dist/components/toggle-group/index.js +1 -1
- package/dist/components/toggle-group/index.js.map +3 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/types/components/badge/index.d.ts +2 -2
- package/dist/types/components/dialog/parts.d.ts +5 -0
- package/dist/types/components/drawer/index.d.ts +4 -2
- package/dist/types/components/form/index.d.ts +28 -0
- package/dist/types/components/list/index.d.ts +11 -1
- package/dist/types/components/table/index.d.ts +8 -0
- package/dist/types/components/toggle-group/index.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/llms-full.txt +240 -47
- package/llms.txt +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ The Memos UI design system: tokens, foundation styles and React components for m
|
|
|
6
6
|
- Light and Dark themes, all from CSS custom properties. Apps can add their own.
|
|
7
7
|
- One package, `@usememos/ui`. ESM only, for React 18 or later, with behavior from [Base UI](https://base-ui.com).
|
|
8
8
|
|
|
9
|
-
The package ships the tokens, the foundation styles and
|
|
9
|
+
The package ships the tokens, the foundation styles and 31 components, each with a page in [docs/components](docs/components/README.md). Versions follow memos' CalVer (`26.10.0`, `26.10.1`) and do not signal breaking changes, so pin an exact version. [docs/](docs/README.md) is the design system and the source of truth for the package.
|
|
10
10
|
|
|
11
11
|
## Use it
|
|
12
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/badge/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { forwardRef } from 'react';\nimport { cx } from '../../internal/class-name';\nimport type { IconElement, Tone } from '../../types';\n\nexport interface BadgeProps extends useRender.ComponentProps<'span'> {\n /** A status tone,
|
|
4
|
+
"sourcesContent": ["import { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { forwardRef } from 'react';\nimport { cx } from '../../internal/class-name';\nimport type { IconElement, Tone } from '../../types';\n\nexport interface BadgeProps extends useRender.ComponentProps<'span'> {\n /** A status tone, `outline` for a quiet label such as visibility, or `primary` (ink) for the one label that should stand out, such as New. */\n tone?: Tone | 'outline' | 'primary';\n /** A Lucide element before the text, drawn at 12px. */\n icon?: IconElement;\n}\n\nexport interface BadgeClassesOptions {\n tone?: BadgeProps['tone'];\n}\n\n/**\n * The classes that make an element look like a Badge. Use them on an app's\n * own label, such as a tag that is also a link:\n * `<a className={badgeClasses()} href=\"/tags/work\">work</a>`.\n */\nexport function badgeClasses({ tone = 'neutral' }: BadgeClassesOptions = {}) {\n return cx('mu-badge', `mu-badge-${tone}`, 'mu-base', 'mu-s-xs');\n}\n\n/** A tag or status label: one or two words. */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge({ tone = 'neutral', icon, render, children, ...props }, ref) {\n return useRender({\n defaultTagName: 'span',\n render,\n ref,\n props: mergeProps<'span'>({ className: badgeClasses({ tone }), children: (\n <>\n {icon}\n {children}\n </>\n ) }, props),\n });\n});\n"],
|
|
5
5
|
"mappings": ";AAAA,OAAS,cAAAA,MAAkB,6BAC3B,OAAS,aAAAC,MAAiB,4BAC1B,OAAS,cAAAC,MAAkB,QAC3B,OAAS,MAAAC,MAAU,+BA8BT,mBAAAC,EAAA,QAAAC,MAAA,oBAXH,SAASC,EAAa,CAAE,KAAAC,EAAO,SAAU,EAAyB,CAAC,EAAG,CAC3E,OAAOJ,EAAG,WAAY,YAAYI,CAAI,GAAI,UAAW,SAAS,CAChE,CAGO,IAAMC,EAAQN,EAAwC,SAAe,CAAE,KAAAK,EAAO,UAAW,KAAAE,EAAM,OAAAC,EAAQ,SAAAC,EAAU,GAAGC,CAAM,EAAGC,EAAK,CACvI,OAAOZ,EAAU,CACf,eAAgB,OAChB,OAAAS,EACA,IAAAG,EACA,MAAOb,EAAmB,CAAE,UAAWM,EAAa,CAAE,KAAAC,CAAK,CAAC,EAAG,SACzDF,EAAAD,EAAA,CACG,UAAAK,EACAE,GACH,CACA,EAAGC,CAAK,CAChB,CAAC,CACH,CAAC",
|
|
6
6
|
"names": ["mergeProps", "useRender", "forwardRef", "cx", "Fragment", "jsxs", "badgeClasses", "tone", "Badge", "icon", "render", "children", "props", "ref"]
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{X as
|
|
2
|
+
import{X as M}from"lucide-react";import{forwardRef as a}from"react";import{cx as p,withClass as l}from"../../internal/class-name.js";import{SizeContext as N}from"../../internal/size.js";import{Button as B}from"../button/index.js";import{jsx as t,jsxs as c}from"react/jsx-runtime";function F(i,n,g){let m=a(function({className:o,...e},r){return t(i.Trigger,{ref:r,...e,className:l(`mu-${n}-trigger`,o)})}),P=a(function({container:o,sheet:e=!0,variant:r="panel",fullScreen:x=!1,closeLabel:b="Close",className:C,children:v,...H},L){let u=r==="bare";return c(i.Portal,{container:o,children:[t(i.Backdrop,{className:"mu-dialog-backdrop"}),t(i.Viewport,{className:p("mu-dialog-viewport",x?"mu-dialog-full":e&&"mu-dialog-sheet"),children:c(i.Popup,{ref:L,...H,className:l(p(`mu-dialog-popup mu-${n}-popup`,u&&"mu-dialog-bare","mu-popup mu-base mu-s-md"),C),children:[t(N.Provider,{value:"md",children:v}),g&&!u?t(i.Close,{className:"mu-dialog-x",render:t(B,{variant:"ghost",size:"sm",icon:t(M,{}),"aria-label":b})}):null]})})]})}),f=a(function({className:o,...e},r){return t(i.Title,{ref:r,...e,className:l("mu-dialog-title mu-title",o)})}),d=a(function({className:o,...e},r){return t(i.Description,{ref:r,...e,className:l("mu-dialog-description mu-body",o)})}),D=a(function({className:o,...e},r){return t(i.Close,{ref:r,...e,className:l(`mu-${n}-close`,o)})}),T=a(function({className:o,...e},r){return t("div",{ref:r,...e,className:p("mu-dialog-footer",o)})});return{Root:i.Root,Trigger:m,Popup:P,Title:f,Description:d,Close:D,Footer:T}}export{F as createDialogParts};
|
|
3
3
|
//# sourceMappingURL=parts.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/dialog/parts.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport { X } from 'lucide-react';\nimport { forwardRef, type HTMLAttributes } from 'react';\nimport { cx, withClass } from '../../internal/class-name';\nimport { SizeContext } from '../../internal/size';\nimport { Button } from '../button';\n\nexport type RootProps = BaseDialog.Root.Props;\nexport interface TriggerProps extends BaseDialog.Trigger.Props {}\nexport interface PopupProps extends BaseDialog.Popup.Props {\n /** Where the dialog is portaled to. Default `document.body`. */\n container?: BaseDialog.Portal.Props['container'];\n /** Below `breakpoint-sm` the dialog becomes a sheet from the bottom. `false` keeps it centered. Default true. */\n sheet?: boolean;\n}\n\nexport interface VariantProps {\n /**\n * `panel` (default) pads the content `space-5`, stacks it `space-4` apart and\n * adds the X. `bare` keeps the surface, radius and shadow but has no padding,\n * gap or X: the content runs edge to edge, for a search palette or an image.\n */\n variant?: 'panel' | 'bare';\n}\nexport interface TitleProps extends BaseDialog.Title.Props {}\nexport interface DescriptionProps extends BaseDialog.Description.Props {}\nexport interface CloseProps extends BaseDialog.Close.Props {}\nexport interface FooterProps extends HTMLAttributes<HTMLDivElement> {}\n\n/**\n * Builds the styled parts on Base UI's Dialog or AlertDialog, which share\n * their anatomy. `closeButton` adds the X at the top right of the popup.\n */\nexport function createDialogParts(Base: typeof BaseDialog, name: 'dialog' | 'alert-dialog', closeButton: boolean) {\n const Trigger = forwardRef<HTMLButtonElement, TriggerProps>(function DialogTrigger({ className, ...props }, ref) {\n return <Base.Trigger ref={ref} {...props} className={withClass(`mu-${name}-trigger`, className)} />;\n });\n\n const Popup = forwardRef<HTMLDivElement, PopupProps & VariantProps & { closeLabel?: string }>(function DialogPopup(\n { container, sheet = true, variant = 'panel', closeLabel = 'Close', className, children, ...props },\n ref,\n ) {\n const bare = variant === 'bare';\n return (\n <Base.Portal container={container}>\n <Base.Backdrop className=\"mu-dialog-backdrop\" />\n <Base.Viewport className={cx('mu-dialog-viewport', sheet && 'mu-dialog-sheet')}>\n <Base.Popup\n ref={ref}\n {...props}\n className={withClass(cx(`mu-dialog-popup mu-${name}-popup`, bare && 'mu-dialog-bare', 'mu-popup mu-base mu-s-md'), className)}\n >\n {/* A dialog is md wherever it is declared: React context crosses the portal, so a size set by a parent Root (a sm Table) would leak in. */}\n <SizeContext.Provider value=\"md\">{children}</SizeContext.Provider>\n {closeButton && !bare ? (\n <Base.Close className=\"mu-dialog-x\" render={<Button variant=\"ghost\" size=\"sm\" icon={<X />} aria-label={closeLabel} />} />\n ) : null}\n </Base.Popup>\n </Base.Viewport>\n </Base.Portal>\n );\n });\n\n const Title = forwardRef<HTMLHeadingElement, TitleProps>(function DialogTitle({ className, ...props }, ref) {\n return <Base.Title ref={ref} {...props} className={withClass('mu-dialog-title mu-title', className)} />;\n });\n\n const Description = forwardRef<HTMLParagraphElement, DescriptionProps>(function DialogDescription({ className, ...props }, ref) {\n return <Base.Description ref={ref} {...props} className={withClass('mu-dialog-description mu-body', className)} />;\n });\n\n const Close = forwardRef<HTMLButtonElement, CloseProps>(function DialogClose({ className, ...props }, ref) {\n return <Base.Close ref={ref} {...props} className={withClass(`mu-${name}-close`, className)} />;\n });\n\n const Footer = forwardRef<HTMLDivElement, FooterProps>(function DialogFooter({ className, ...props }, ref) {\n return <div ref={ref} {...props} className={cx('mu-dialog-footer', className)} />;\n });\n\n return { Root: Base.Root, Trigger, Popup, Title, Description, Close, Footer };\n}\n"],
|
|
5
|
-
"mappings": ";AACA,OAAS,KAAAA,MAAS,eAClB,OAAS,cAAAC,MAAuC,QAChD,OAAS,MAAAC,EAAI,aAAAC,MAAiB,+BAC9B,OAAS,eAAAC,MAAmB,yBAC5B,OAAS,UAAAC,MAAc,
|
|
6
|
-
"names": ["X", "forwardRef", "cx", "withClass", "SizeContext", "Button", "jsx", "jsxs", "createDialogParts", "Base", "name", "closeButton", "Trigger", "className", "props", "ref", "Popup", "container", "sheet", "variant", "closeLabel", "children", "bare", "Title", "Description", "Close", "Footer"]
|
|
4
|
+
"sourcesContent": ["import { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport { X } from 'lucide-react';\nimport { forwardRef, type HTMLAttributes } from 'react';\nimport { cx, withClass } from '../../internal/class-name';\nimport { SizeContext } from '../../internal/size';\nimport { Button } from '../button';\n\nexport type RootProps = BaseDialog.Root.Props;\nexport interface TriggerProps extends BaseDialog.Trigger.Props {}\nexport interface PopupProps extends BaseDialog.Popup.Props {\n /** Where the dialog is portaled to. Default `document.body`. */\n container?: BaseDialog.Portal.Props['container'];\n /** Below `breakpoint-sm` the dialog becomes a sheet from the bottom. `false` keeps it centered. Default true. */\n sheet?: boolean;\n}\n\nexport interface VariantProps {\n /**\n * `panel` (default) pads the content `space-5`, stacks it `space-4` apart and\n * adds the X. `bare` keeps the surface, radius and shadow but has no padding,\n * gap or X: the content runs edge to edge, for a search palette or an image.\n */\n variant?: 'panel' | 'bare';\n /**\n * Covers the whole screen with square corners, at every width, instead of\n * a centered panel or a sheet. With `bare`, for an image viewer.\n */\n fullScreen?: boolean;\n}\nexport interface TitleProps extends BaseDialog.Title.Props {}\nexport interface DescriptionProps extends BaseDialog.Description.Props {}\nexport interface CloseProps extends BaseDialog.Close.Props {}\nexport interface FooterProps extends HTMLAttributes<HTMLDivElement> {}\n\n/**\n * Builds the styled parts on Base UI's Dialog or AlertDialog, which share\n * their anatomy. `closeButton` adds the X at the top right of the popup.\n */\nexport function createDialogParts(Base: typeof BaseDialog, name: 'dialog' | 'alert-dialog', closeButton: boolean) {\n const Trigger = forwardRef<HTMLButtonElement, TriggerProps>(function DialogTrigger({ className, ...props }, ref) {\n return <Base.Trigger ref={ref} {...props} className={withClass(`mu-${name}-trigger`, className)} />;\n });\n\n const Popup = forwardRef<HTMLDivElement, PopupProps & VariantProps & { closeLabel?: string }>(function DialogPopup(\n { container, sheet = true, variant = 'panel', fullScreen = false, closeLabel = 'Close', className, children, ...props },\n ref,\n ) {\n const bare = variant === 'bare';\n return (\n <Base.Portal container={container}>\n <Base.Backdrop className=\"mu-dialog-backdrop\" />\n <Base.Viewport className={cx('mu-dialog-viewport', fullScreen ? 'mu-dialog-full' : sheet && 'mu-dialog-sheet')}>\n <Base.Popup\n ref={ref}\n {...props}\n className={withClass(cx(`mu-dialog-popup mu-${name}-popup`, bare && 'mu-dialog-bare', 'mu-popup mu-base mu-s-md'), className)}\n >\n {/* A dialog is md wherever it is declared: React context crosses the portal, so a size set by a parent Root (a sm Table) would leak in. */}\n <SizeContext.Provider value=\"md\">{children}</SizeContext.Provider>\n {closeButton && !bare ? (\n <Base.Close className=\"mu-dialog-x\" render={<Button variant=\"ghost\" size=\"sm\" icon={<X />} aria-label={closeLabel} />} />\n ) : null}\n </Base.Popup>\n </Base.Viewport>\n </Base.Portal>\n );\n });\n\n const Title = forwardRef<HTMLHeadingElement, TitleProps>(function DialogTitle({ className, ...props }, ref) {\n return <Base.Title ref={ref} {...props} className={withClass('mu-dialog-title mu-title', className)} />;\n });\n\n const Description = forwardRef<HTMLParagraphElement, DescriptionProps>(function DialogDescription({ className, ...props }, ref) {\n return <Base.Description ref={ref} {...props} className={withClass('mu-dialog-description mu-body', className)} />;\n });\n\n const Close = forwardRef<HTMLButtonElement, CloseProps>(function DialogClose({ className, ...props }, ref) {\n return <Base.Close ref={ref} {...props} className={withClass(`mu-${name}-close`, className)} />;\n });\n\n const Footer = forwardRef<HTMLDivElement, FooterProps>(function DialogFooter({ className, ...props }, ref) {\n return <div ref={ref} {...props} className={cx('mu-dialog-footer', className)} />;\n });\n\n return { Root: Base.Root, Trigger, Popup, Title, Description, Close, Footer };\n}\n"],
|
|
5
|
+
"mappings": ";AACA,OAAS,KAAAA,MAAS,eAClB,OAAS,cAAAC,MAAuC,QAChD,OAAS,MAAAC,EAAI,aAAAC,MAAiB,+BAC9B,OAAS,eAAAC,MAAmB,yBAC5B,OAAS,UAAAC,MAAc,qBAmCZ,cAAAC,EAYD,QAAAC,MAZC,oBAFJ,SAASC,EAAkBC,EAAyBC,EAAiCC,EAAsB,CAChH,IAAMC,EAAUX,EAA4C,SAAuB,CAAE,UAAAY,EAAW,GAAGC,CAAM,EAAGC,EAAK,CAC/G,OAAOT,EAACG,EAAK,QAAL,CAAa,IAAKM,EAAM,GAAGD,EAAO,UAAWX,EAAU,MAAMO,CAAI,WAAYG,CAAS,EAAG,CACnG,CAAC,EAEKG,EAAQf,EAAgF,SAC5F,CAAE,UAAAgB,EAAW,MAAAC,EAAQ,GAAM,QAAAC,EAAU,QAAS,WAAAC,EAAa,GAAO,WAAAC,EAAa,QAAS,UAAAR,EAAW,SAAAS,EAAU,GAAGR,CAAM,EACtHC,EACA,CACA,IAAMQ,EAAOJ,IAAY,OACzB,OACEZ,EAACE,EAAK,OAAL,CAAY,UAAWQ,EACtB,UAAAX,EAACG,EAAK,SAAL,CAAc,UAAU,qBAAqB,EAC9CH,EAACG,EAAK,SAAL,CAAc,UAAWP,EAAG,qBAAsBkB,EAAa,iBAAmBF,GAAS,iBAAiB,EAC3G,SAAAX,EAACE,EAAK,MAAL,CACC,IAAKM,EACJ,GAAGD,EACJ,UAAWX,EAAUD,EAAG,sBAAsBQ,CAAI,SA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Context", "Button", "jsx", "jsxs", "createDialogParts", "Base", "name", "closeButton", "Trigger", "className", "props", "ref", "Popup", "container", "sheet", "variant", "fullScreen", "closeLabel", "children", "bare", "Title", "Description", "Close", "Footer"]
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{useDirection as D}from"@base-ui/react/direction-provider";import{Drawer as
|
|
2
|
+
import{useDirection as D}from"@base-ui/react/direction-provider";import{Drawer as t}from"@base-ui/react/drawer";import{X as f}from"lucide-react";import{createContext as g,forwardRef as n,useContext as x}from"react";import{cx as C,withClass as i}from"../../internal/class-name.js";import{SizeContext as T}from"../../internal/size.js";import{Button as B}from"../button/index.js";import{jsx as r,jsxs as m}from"react/jsx-runtime";var l=g("right");function R({side:s="end",...o}){let a=D(),e=s==="bottom"?"bottom":s==="start"==(a==="rtl")?"right":"left",p=e==="bottom"?"down":e;return r(l.Provider,{value:e,children:r(t.Root,{...o,swipeDirection:p})})}var L=n(function({className:o,...a},e){return r(t.Trigger,{ref:e,...a,className:i("mu-drawer-trigger",o)})}),M=n(function({container:o,variant:a="panel",closeLabel:e="Close",className:p,children:d,...u},w){let P=x(l),c=a==="bare";return m(t.Portal,{container:o,children:[r(t.Backdrop,{className:"mu-drawer-backdrop"}),r(t.Viewport,{className:`mu-drawer-viewport mu-drawer-${P}`,children:m(t.Popup,{ref:w,...u,className:i(C("mu-drawer-popup",c&&"mu-drawer-bare","mu-base mu-s-md"),p),children:[r(t.Content,{className:"mu-drawer-content",children:r(T.Provider,{value:"md",children:d})}),c?r(t.Close,{className:"mu-drawer-sr-close mu-visually-hidden",tabIndex:-1,children:e}):r(t.Close,{className:"mu-drawer-x",render:r(B,{variant:"ghost",size:"sm",icon:r(f,{}),"aria-label":e})})]})})]})}),y=n(function({className:o,...a},e){return r(t.Title,{ref:e,...a,className:i("mu-drawer-title mu-title",o)})}),z=n(function({className:o,...a},e){return r(t.Description,{ref:e,...a,className:i("mu-drawer-description mu-body",o)})}),k=n(function({className:o,...a},e){return r(t.Close,{ref:e,...a,className:i("mu-drawer-close",o)})});export{k as Close,z as Description,M as Popup,R as Root,y as Title,L as Trigger};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/drawer/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useDirection } from '@base-ui/react/direction-provider';\nimport { Drawer as BaseDrawer } from '@base-ui/react/drawer';\nimport { X } from 'lucide-react';\nimport { createContext, forwardRef, useContext } from 'react';\nimport { cx, withClass } from '../../internal/class-name';\nimport { SizeContext } from '../../internal/size';\nimport { Button } from '../button';\n\n/** The edge a drawer slides from. `start` and `end` follow the text direction. */\nexport type DrawerSide = 'start' | 'end' | 'bottom';\n\ntype Edge = 'left' | 'right' | 'bottom';\n\nconst EdgeContext = createContext<Edge>('right');\n\nexport interface RootProps extends Omit<BaseDrawer.Root.Props, 'swipeDirection' | 'snapPoints' | 'defaultSnapPoint' | 'snapPoint' | 'onSnapPointChange' | 'snapToSequentialPoints'> {\n /** The edge it slides from, and swipes back to. `start` is the left edge in a left-to-right page. Default `end`. */\n side?: DrawerSide;\n}\n\n/** Groups a trigger and its drawer. Controlled with `open` and `onOpenChange`. */\nexport function Root({ side = 'end', ...props }: RootProps) {\n const direction = useDirection();\n const edge: Edge = side === 'bottom' ? 'bottom' : (side === 'start') === (direction === 'rtl') ? 'right' : 'left';\n const swipeDirection = edge === 'bottom' ? 'down' : edge;\n return (\n <EdgeContext.Provider value={edge}>\n <BaseDrawer.Root {...props} swipeDirection={swipeDirection} />\n </EdgeContext.Provider>\n );\n}\n\nexport interface TriggerProps extends BaseDrawer.Trigger.Props {}\n\n/** Opens the drawer. Usually `render={<Button />}`. */\nexport const Trigger = forwardRef<HTMLButtonElement, TriggerProps>(function DrawerTrigger({ className, ...props }, ref) {\n return <BaseDrawer.Trigger ref={ref} {...props} className={withClass('mu-drawer-trigger', className)} />;\n});\n\nexport interface PopupProps extends BaseDrawer.Popup.Props {\n /** Where the drawer is portaled to. Default `document.body`. */\n container?: BaseDrawer.Portal.Props['container'];\n /**\n * `panel` (default) pads the content `space-5`, stacks it `space-4` apart\n * and adds the X. `bare` has no padding, gap or X, for content that lays\n * itself out, such as an app's navigation sidebar.\n */\n variant?: 'panel' | 'bare';\n /** The accessible name of the X
|
|
5
|
-
"mappings": ";AAAA,OAAS,gBAAAA,MAAoB,oCAC7B,OAAS,UAAUC,MAAkB,wBACrC,OAAS,KAAAC,MAAS,eAClB,OAAS,iBAAAC,EAAe,cAAAC,EAAY,cAAAC,MAAkB,QACtD,OAAS,MAAAC,EAAI,aAAAC,MAAiB,+BAC9B,OAAS,eAAAC,MAAmB,yBAC5B,OAAS,UAAAC,MAAc,qBAqBjB,cAAAC,
|
|
4
|
+
"sourcesContent": ["import { useDirection } from '@base-ui/react/direction-provider';\nimport { Drawer as BaseDrawer } from '@base-ui/react/drawer';\nimport { X } from 'lucide-react';\nimport { createContext, forwardRef, useContext } from 'react';\nimport { cx, withClass } from '../../internal/class-name';\nimport { SizeContext } from '../../internal/size';\nimport { Button } from '../button';\n\n/** The edge a drawer slides from. `start` and `end` follow the text direction. */\nexport type DrawerSide = 'start' | 'end' | 'bottom';\n\ntype Edge = 'left' | 'right' | 'bottom';\n\nconst EdgeContext = createContext<Edge>('right');\n\nexport interface RootProps extends Omit<BaseDrawer.Root.Props, 'swipeDirection' | 'snapPoints' | 'defaultSnapPoint' | 'snapPoint' | 'onSnapPointChange' | 'snapToSequentialPoints'> {\n /** The edge it slides from, and swipes back to. `start` is the left edge in a left-to-right page. Default `end`. */\n side?: DrawerSide;\n}\n\n/** Groups a trigger and its drawer. Controlled with `open` and `onOpenChange`. */\nexport function Root({ side = 'end', ...props }: RootProps) {\n const direction = useDirection();\n const edge: Edge = side === 'bottom' ? 'bottom' : (side === 'start') === (direction === 'rtl') ? 'right' : 'left';\n const swipeDirection = edge === 'bottom' ? 'down' : edge;\n return (\n <EdgeContext.Provider value={edge}>\n <BaseDrawer.Root {...props} swipeDirection={swipeDirection} />\n </EdgeContext.Provider>\n );\n}\n\nexport interface TriggerProps extends BaseDrawer.Trigger.Props {}\n\n/** Opens the drawer. Usually `render={<Button />}`. */\nexport const Trigger = forwardRef<HTMLButtonElement, TriggerProps>(function DrawerTrigger({ className, ...props }, ref) {\n return <BaseDrawer.Trigger ref={ref} {...props} className={withClass('mu-drawer-trigger', className)} />;\n});\n\nexport interface PopupProps extends BaseDrawer.Popup.Props {\n /** Where the drawer is portaled to. Default `document.body`. */\n container?: BaseDrawer.Portal.Props['container'];\n /**\n * `panel` (default) pads the content `space-5`, stacks it `space-4` apart\n * and adds the X. `bare` has no padding, gap or X, for content that lays\n * itself out, such as an app's navigation sidebar: its content is exactly\n * the drawer's height, so the app's own region scrolls, and its Close is\n * for screen readers only.\n */\n variant?: 'panel' | 'bare';\n /** The accessible name of the X, or of the screen-reader Close in `bare`. Default \"Close\". */\n closeLabel?: string;\n}\n\n/**\n * The panel against one edge of the screen, over a dimmed backdrop, full\n * height (or full width from the bottom). Swipe it back to its edge to close.\n */\nexport const Popup = forwardRef<HTMLDivElement, PopupProps>(function DrawerPopup(\n { container, variant = 'panel', closeLabel = 'Close', className, children, ...props },\n ref,\n) {\n const edge = useContext(EdgeContext);\n const bare = variant === 'bare';\n return (\n <BaseDrawer.Portal container={container}>\n <BaseDrawer.Backdrop className=\"mu-drawer-backdrop\" />\n <BaseDrawer.Viewport className={`mu-drawer-viewport mu-drawer-${edge}`}>\n <BaseDrawer.Popup ref={ref} {...props} className={withClass(cx('mu-drawer-popup', bare && 'mu-drawer-bare', 'mu-base mu-s-md'), className)}>\n {/* Content keeps text selectable with a mouse instead of starting a swipe. */}\n <BaseDrawer.Content className=\"mu-drawer-content\">\n {/* A drawer is md wherever it is declared, as a Dialog is. */}\n <SizeContext.Provider value=\"md\">{children}</SizeContext.Provider>\n </BaseDrawer.Content>\n {bare ? (\n /* No X on screen, but screen reader users on touch screens, who can't press Escape or swipe, still find a Close. Out of the tab order: keyboards have Escape. */\n <BaseDrawer.Close className=\"mu-drawer-sr-close mu-visually-hidden\" tabIndex={-1}>\n {closeLabel}\n </BaseDrawer.Close>\n ) : (\n <BaseDrawer.Close className=\"mu-drawer-x\" render={<Button variant=\"ghost\" size=\"sm\" icon={<X />} aria-label={closeLabel} />} />\n )}\n </BaseDrawer.Popup>\n </BaseDrawer.Viewport>\n </BaseDrawer.Portal>\n );\n});\n\nexport interface TitleProps extends BaseDrawer.Title.Props {}\n\n/** The drawer's heading, an `<h2>`. Names it for screen readers; hide it with `mu-visually-hidden` when the content names itself. */\nexport const Title = forwardRef<HTMLHeadingElement, TitleProps>(function DrawerTitle({ className, ...props }, ref) {\n return <BaseDrawer.Title ref={ref} {...props} className={withClass('mu-drawer-title mu-title', className)} />;\n});\n\nexport interface DescriptionProps extends BaseDrawer.Description.Props {}\n\n/** A `<p>` under the title. */\nexport const Description = forwardRef<HTMLParagraphElement, DescriptionProps>(function DrawerDescription({ className, ...props }, ref) {\n return <BaseDrawer.Description ref={ref} {...props} className={withClass('mu-drawer-description mu-body', className)} />;\n});\n\nexport interface CloseProps extends BaseDrawer.Close.Props {}\n\n/** Closes the drawer, such as a link in a navigation drawer. Usually `render={<Button />}`. */\nexport const Close = forwardRef<HTMLButtonElement, CloseProps>(function DrawerClose({ className, ...props }, ref) {\n return <BaseDrawer.Close ref={ref} {...props} className={withClass('mu-drawer-close', className)} />;\n});\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,gBAAAA,MAAoB,oCAC7B,OAAS,UAAUC,MAAkB,wBACrC,OAAS,KAAAC,MAAS,eAClB,OAAS,iBAAAC,EAAe,cAAAC,EAAY,cAAAC,MAAkB,QACtD,OAAS,MAAAC,EAAI,aAAAC,MAAiB,+BAC9B,OAAS,eAAAC,MAAmB,yBAC5B,OAAS,UAAAC,MAAc,qBAqBjB,cAAAC,EAyCE,QAAAC,MAzC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AAwB,EACH,EAEAf,EAACT,EAAW,MAAX,CAAiB,UAAU,cAAc,OAAQS,EAACD,EAAA,CAAO,QAAQ,QAAQ,KAAK,KAAK,KAAMC,EAACR,EAAA,EAAE,EAAI,aAAYuB,EAAY,EAAI,GAEjI,EACF,GACF,CAEJ,CAAC,EAKYG,EAAQxB,EAA2C,SAAqB,CAAE,UAAAgB,EAAW,GAAGL,CAAM,EAAGM,EAAK,CACjH,OAAOX,EAACT,EAAW,MAAX,CAAiB,IAAKoB,EAAM,GAAGN,EAAO,UAAWR,EAAU,2BAA4Ba,CAAS,EAAG,CAC7G,CAAC,EAKYS,EAAczB,EAAmD,SAA2B,CAAE,UAAAgB,EAAW,GAAGL,CAAM,EAAGM,EAAK,CACrI,OAAOX,EAACT,EAAW,YAAX,CAAuB,IAAKoB,EAAM,GAAGN,EAAO,UAAWR,EAAU,gCAAiCa,CAAS,EAAG,CACxH,CAAC,EAKYU,EAAQ1B,EAA0C,SAAqB,CAAE,UAAAgB,EAAW,GAAGL,CAAM,EAAGM,EAAK,CAChH,OAAOX,EAACT,EAAW,MAAX,CAAiB,IAAKoB,EAAM,GAAGN,EAAO,UAAWR,EAAU,kBAAmBa,CAAS,EAAG,CACpG,CAAC",
|
|
6
6
|
"names": ["useDirection", "BaseDrawer", "X", "createContext", "forwardRef", "useContext", "cx", "withClass", "SizeContext", "Button", "jsx", "jsxs", "EdgeContext", "Root", "side", "props", "direction", "edge", "swipeDirection", "Trigger", "className", "ref", "Popup", "container", "variant", "closeLabel", "children", "bare", "Title", "Description", "Close"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{Form as f}from"@base-ui/react/form";import{mergeProps as l}from"@base-ui/react/merge-props";import{useRender as c}from"@base-ui/react/use-render";import{createContext as P,forwardRef as i,useContext as x,useId as F,useLayoutEffect as T,useState as C}from"react";import{cx as a,withClass as v}from"../../internal/class-name.js";import{SizeContext as R}from"../../internal/size.js";import{jsx as n}from"react/jsx-runtime";var u=P(null),I=i(function({bordered:o=!1,className:t,...e},m){let[d,r]=C(void 0);return n(u.Provider,{value:r,children:n(R.Provider,{value:"md",children:n(f,{ref:m,"aria-labelledby":e["aria-label"]?void 0:d,...e,className:v(a("mu-form mu-base mu-body mu-s-md",o&&"mu-form-bordered"),t)})})})}),L=i(function({render:o,id:t,...e},m){let d=F(),r=t??d,p=x(u);return T(()=>(p?.(r),()=>p?.(void 0)),[p,r]),c({defaultTagName:"h2",render:o,ref:m,props:l({id:r,className:"mu-form-title mu-label"},e)})}),N=i(function({className:o,...t},e){return n("p",{ref:e,...t,className:a("mu-form-description mu-caption",o)})}),y=i(function({className:o,...t},e){return n("div",{ref:e,...t,className:a("mu-form-footer",o)})});export{N as Description,y as Footer,I as Root,L as Title};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/form/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Form as BaseForm } from '@base-ui/react/form';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { createContext, forwardRef, useContext, useId, useLayoutEffect, useState, type ComponentPropsWithoutRef } from 'react';\nimport { cx, withClass } from '../../internal/class-name';\nimport { SizeContext } from '../../internal/size';\n\n/** The id of the form's Title, so the Root can be named by it. */\nconst TitleIdContext = createContext<((id: string | undefined) => void) | null>(null);\n\nexport interface RootProps extends BaseForm.Props {\n /**\n * Draws the form in a box, as a List: a `line` edge, `radius-lg` corners and\n * a `surface` fill, with the Footer as a `canvas` bar under a `line`. For a\n * small form among Lists on a settings page.\n */\n bordered?: boolean;\n}\n\n/**\n * A `<form>` on Base UI's Form, which shows each Field's errors. Its children\n * stack `space-4` apart. A Title inside names it.\n */\nexport const Root = forwardRef<HTMLFormElement, RootProps>(function FormRoot({ bordered = false, className, ...props }, ref) {\n const [titleId, setTitleId] = useState<string | undefined>(undefined);\n return (\n <TitleIdContext.Provider value={setTitleId}>\n {/* A form is md wherever it is declared, as a Dialog is. */}\n <SizeContext.Provider value=\"md\">\n <BaseForm\n ref={ref}\n aria-labelledby={props['aria-label'] ? undefined : titleId}\n {...props}\n className={withClass(cx('mu-form mu-base mu-body mu-s-md', bordered && 'mu-form-bordered'), className)}\n />\n </SizeContext.Provider>\n </TitleIdContext.Provider>\n );\n});\n\nexport interface TitleProps extends useRender.ComponentProps<'h2'> {}\n\n/** The form's heading, an `<h2>` in `label` style that names the form. Use `render` for another level. */\nexport const Title = forwardRef<HTMLHeadingElement, TitleProps>(function FormTitle({ render, id: ownId, ...props }, ref) {\n const generated = useId();\n const id = ownId ?? generated;\n const register = useContext(TitleIdContext);\n useLayoutEffect(() => {\n register?.(id);\n return () => register?.(undefined);\n }, [register, id]);\n return useRender({\n defaultTagName: 'h2',\n render,\n ref,\n props: mergeProps<'h2'>({ id, className: 'mu-form-title mu-label' }, props),\n });\n});\n\nexport interface DescriptionProps extends ComponentPropsWithoutRef<'p'> {}\n\n/** One line under the title, in `caption` and `ink-muted`. */\nexport const Description = forwardRef<HTMLParagraphElement, DescriptionProps>(function FormDescription({ className, ...props }, ref) {\n return <p ref={ref} {...props} className={cx('mu-form-description mu-caption', className)} />;\n});\n\nexport interface FooterProps extends ComponentPropsWithoutRef<'div'> {}\n\n/** The form's buttons, right-aligned: a ghost Cancel, then the primary. In a bordered form, a `canvas` bar along the bottom. */\nexport const Footer = forwardRef<HTMLDivElement, FooterProps>(function FormFooter({ className, ...props }, ref) {\n return <div ref={ref} {...props} className={cx('mu-form-footer', className)} />;\n});\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,QAAQA,MAAgB,sBACjC,OAAS,cAAAC,MAAkB,6BAC3B,OAAS,aAAAC,MAAiB,4BAC1B,OAAS,iBAAAC,EAAe,cAAAC,EAAY,cAAAC,EAAY,SAAAC,EAAO,mBAAAC,EAAiB,YAAAC,MAA+C,QACvH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I,IAAKM,EAAM,GAAGD,EAAO,UAAWR,EAAG,iBAAkBO,CAAS,EAAG,CAC/E,CAAC",
|
|
6
|
+
"names": ["BaseForm", "mergeProps", "useRender", "createContext", "forwardRef", "useContext", "useId", "useLayoutEffect", "useState", "cx", "withClass", "SizeContext", "jsx", "TitleIdContext", "Root", "bordered", "className", "props", "ref", "titleId", "setTitleId", "Title", "render", "ownId", "generated", "id", "register", "Description", "Footer"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{forwardRef as
|
|
2
|
+
import{mergeProps as p}from"@base-ui/react/merge-props";import{useRender as f}from"@base-ui/react/use-render";import{forwardRef as s}from"react";import{cx as m}from"../../internal/class-name.js";import{SizeContext as l,useRowSize as c}from"../../internal/size.js";import{jsx as n}from"react/jsx-runtime";var I=s(function({size:t,className:e,...o},r){let u=c(t);return n(l.Provider,{value:u,children:n("ul",{ref:r,...o,className:m("mu-list mu-base mu-body",`mu-s-${u}`,e)})})}),L=s(function({className:t,...e},o){return n("li",{ref:o,...e,className:m("mu-list-item",t)})}),b=s(function({render:t,className:e,...o},r){return f({defaultTagName:"button",render:t,ref:r,props:p({type:t?void 0:"button",className:m("mu-list-item-button mu-focus",e)},o)})});export{L as Item,b as ItemButton,I as Root};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/list/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cx } from '../../internal/class-name';\nimport { SizeContext, useRowSize } from '../../internal/size';\nimport type { Size } from '../../types';\n\nexport interface RootProps extends ComponentPropsWithoutRef<'ul'> {\n /** `sm` for dense lists. Sets the rows' padding and the size of the controls inside. */\n size?: Exclude<Size, 'xs'>;\n}\n\n/**\n * A boxed list of records or settings rows: a `<ul>` with a `line` edge and\n * `radius-lg`, its rows divided by `line`. Name it with `aria-label` or\n * `aria-labelledby` when a heading above doesn't.\n */\nexport const Root = forwardRef<HTMLUListElement, RootProps>(function ListRoot({ size, className, ...props }, ref) {\n const resolved = useRowSize(size);\n return (\n <SizeContext.Provider value={resolved}>\n <ul ref={ref} {...props} className={cx('mu-list mu-base mu-body', `mu-s-${resolved}`, className)} />\n </SizeContext.Provider>\n );\n});\n\nexport interface ItemProps extends ComponentPropsWithoutRef<'li'> {}\n\n/** One row, an `<li>`: a horizontal Field,
|
|
5
|
-
"mappings": ";AAAA,OAAS,cAAAA,MAAiD,QAC1D,OAAS,MAAAC,MAAU,+BACnB,OAAS,eAAAC,EAAa,cAAAC,MAAkB,yBAiBlC,cAAAC,MAAA,oBAJC,IAAMC,EAAOL,EAAwC,SAAkB,CAAE,KAAAM,EAAM,UAAAC,EAAW,GAAGC,CAAM,EAAGC,EAAK,CAChH,IAAMC,EAAWP,EAAWG,CAAI,EAChC,OACEF,EAACF,EAAY,SAAZ,CAAqB,MAAOQ,EAC3B,SAAAN,EAAC,MAAG,IAAKK,EAAM,GAAGD,EAAO,UAAWP,EAAG,0BAA2B,QAAQS,CAAQ,GAAIH,CAAS,EAAG,EACpG,CAEJ,CAAC,EAKYI,EAAOX,EAAqC,SAAkB,CAAE,UAAAO,EAAW,GAAGC,CAAM,EAAGC,EAAK,CACvG,OAAOL,EAAC,MAAG,IAAKK,EAAM,GAAGD,EAAO,UAAWP,EAAG,eAAgBM,CAAS,EAAG,CAC5E,CAAC",
|
|
6
|
-
"names": ["forwardRef", "cx", "SizeContext", "useRowSize", "jsx", "Root", "size", "className", "props", "ref", "resolved", "Item"]
|
|
4
|
+
"sourcesContent": ["import { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cx } from '../../internal/class-name';\nimport { SizeContext, useRowSize } from '../../internal/size';\nimport type { Size } from '../../types';\n\nexport interface RootProps extends ComponentPropsWithoutRef<'ul'> {\n /** `sm` for dense lists. Sets the rows' padding and the size of the controls inside. */\n size?: Exclude<Size, 'xs'>;\n}\n\n/**\n * A boxed list of records or settings rows: a `<ul>` with a `line` edge and\n * `radius-lg`, its rows divided by `line`. Name it with `aria-label` or\n * `aria-labelledby` when a heading above doesn't.\n */\nexport const Root = forwardRef<HTMLUListElement, RootProps>(function ListRoot({ size, className, ...props }, ref) {\n const resolved = useRowSize(size);\n return (\n <SizeContext.Provider value={resolved}>\n <ul ref={ref} {...props} className={cx('mu-list mu-base mu-body', `mu-s-${resolved}`, className)} />\n </SizeContext.Provider>\n );\n});\n\nexport interface ItemProps extends ComponentPropsWithoutRef<'li'> {}\n\n/** One row, an `<li>`: a horizontal Field, a record's text with its actions at the end, or one ItemButton. */\nexport const Item = forwardRef<HTMLLIElement, ItemProps>(function ListItem({ className, ...props }, ref) {\n return <li ref={ref} {...props} className={cx('mu-list-item', className)} />;\n});\n\nexport interface ItemButtonProps extends useRender.ComponentProps<'button'> {}\n\n/**\n * Makes a whole row one control: a `<button type=\"button\">` that fills its\n * Item, edge to edge, and highlights with `hover`. Put it alone in a\n * `List.Item`. For a row that opens a page, render a link:\n * `render={<a href=\"/spaces/work\" />}`.\n */\nexport const ItemButton = forwardRef<HTMLElement, ItemButtonProps>(function ListItemButton({ render, className, ...props }, ref) {\n return useRender({\n defaultTagName: 'button',\n render,\n ref,\n props: mergeProps<'button'>({ type: render ? undefined : 'button', className: cx('mu-list-item-button mu-focus', className) }, props),\n });\n});\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,cAAAA,MAAkB,6BAC3B,OAAS,aAAAC,MAAiB,4BAC1B,OAAS,cAAAC,MAAiD,QAC1D,OAAS,MAAAC,MAAU,+BACnB,OAAS,eAAAC,EAAa,cAAAC,MAAkB,yBAiBlC,cAAAC,MAAA,oBAJC,IAAMC,EAAOL,EAAwC,SAAkB,CAAE,KAAAM,EAAM,UAAAC,EAAW,GAAGC,CAAM,EAAGC,EAAK,CAChH,IAAMC,EAAWP,EAAWG,CAAI,EAChC,OACEF,EAACF,EAAY,SAAZ,CAAqB,MAAOQ,EAC3B,SAAAN,EAAC,MAAG,IAAKK,EAAM,GAAGD,EAAO,UAAWP,EAAG,0BAA2B,QAAQS,CAAQ,GAAIH,CAAS,EAAG,EACpG,CAEJ,CAAC,EAKYI,EAAOX,EAAqC,SAAkB,CAAE,UAAAO,EAAW,GAAGC,CAAM,EAAGC,EAAK,CACvG,OAAOL,EAAC,MAAG,IAAKK,EAAM,GAAGD,EAAO,UAAWP,EAAG,eAAgBM,CAAS,EAAG,CAC5E,CAAC,EAUYK,EAAaZ,EAAyC,SAAwB,CAAE,OAAAa,EAAQ,UAAAN,EAAW,GAAGC,CAAM,EAAGC,EAAK,CAC/H,OAAOV,EAAU,CACf,eAAgB,SAChB,OAAAc,EACA,IAAAJ,EACA,MAAOX,EAAqB,CAAE,KAAMe,EAAS,OAAY,SAAU,UAAWZ,EAAG,+BAAgCM,CAAS,CAAE,EAAGC,CAAK,CACtI,CAAC,CACH,CAAC",
|
|
6
|
+
"names": ["mergeProps", "useRender", "forwardRef", "cx", "SizeContext", "useRowSize", "jsx", "Root", "size", "className", "props", "ref", "resolved", "Item", "ItemButton", "render"]
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{forwardRef as
|
|
2
|
+
import{forwardRef as r}from"react";import{cx as a}from"../../internal/class-name.js";import{SizeContext as i,useRowSize as c}from"../../internal/size.js";import{jsx as n}from"react/jsx-runtime";var u={sm:"mu-caption",md:"mu-body"},x=r(function({size:e,bordered:o=!1,className:t,...l},p){let m=c(e);return n(i.Provider,{value:m,children:n("div",{className:o?"mu-table-scroll mu-table-bordered":"mu-table-scroll",children:n("table",{ref:p,...l,className:a("mu-table mu-base",`mu-s-${m}`,u[m],t)})})})}),P=r(function({className:e,...o},t){return n("thead",{ref:t,...o,className:a("mu-table-header",e)})}),T=r(function({className:e,...o},t){return n("tbody",{ref:t,...o,className:a("mu-table-body",e)})}),C=r(function({className:e,...o},t){return n("tr",{ref:t,...o,className:a("mu-table-row",e)})}),R=r(function({num:e=!1,scope:o="col",className:t,...l},p){return n("th",{ref:p,scope:o,...l,className:a("mu-table-head mu-label-sm",e&&"mu-table-num",t)})}),H=r(function({num:e=!1,muted:o=!1,className:t,...l},p){return n("td",{ref:p,...l,className:a("mu-table-cell",e&&"mu-table-num",o&&"mu-table-muted",t)})}),h=r(function({className:e,...o},t){return n("div",{ref:t,...o,className:a("mu-table-actions",e)})}),y=r(function({className:e,...o},t){return n("caption",{ref:t,...o,className:a("mu-table-caption mu-caption",e)})});export{h as Actions,T as Body,y as Caption,H as Cell,R as Head,P as Header,x as Root,C as Row};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/table/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cx } from '../../internal/class-name';\nimport { SizeContext, useRowSize } from '../../internal/size';\nimport type { Size } from '../../types';\n\nconst bodyText: Record<Exclude<Size, 'xs'>, string> = { sm: 'mu-caption', md: 'mu-body' };\n\nexport interface RootProps extends ComponentPropsWithoutRef<'table'> {\n /** `sm` for dense admin lists. Sets row height and cell text. */\n size?: Exclude<Size, 'xs'>;\n /** Draws the table in a box: a `line` edge, `radius-lg` corners and a `surface` fill, as a List. */\n bordered?: boolean;\n}\n\n/**\n * A `<table>` with rows separated by `line`. It sits in a box that scrolls\n * sideways when the table is wider than the screen; the ref and every prop go\n * to the `<table>`.\n */\nexport const Root = forwardRef<HTMLTableElement, RootProps>(function TableRoot({ size, bordered = false, className, ...props }, ref) {\n const resolved = useRowSize(size);\n return (\n <SizeContext.Provider value={resolved}>\n <div className={bordered ? 'mu-table-scroll mu-table-bordered' : 'mu-table-scroll'}>\n <table ref={ref} {...props} className={cx('mu-table mu-base', `mu-s-${resolved}`, bodyText[resolved], className)} />\n </div>\n </SizeContext.Provider>\n );\n});\n\nexport interface HeaderProps extends ComponentPropsWithoutRef<'thead'> {}\n\n/** The `<thead>`, holding one Row of Head cells. */\nexport const Header = forwardRef<HTMLTableSectionElement, HeaderProps>(function TableHeader({ className, ...props }, ref) {\n return <thead ref={ref} {...props} className={cx('mu-table-header', className)} />;\n});\n\nexport interface BodyProps extends ComponentPropsWithoutRef<'tbody'> {}\n\n/** The `<tbody>`, holding the data Rows. */\nexport const Body = forwardRef<HTMLTableSectionElement, BodyProps>(function TableBody({ className, ...props }, ref) {\n return <tbody ref={ref} {...props} className={cx('mu-table-body', className)} />;\n});\n\nexport interface RowProps extends ComponentPropsWithoutRef<'tr'> {}\n\n/** A `<tr>`. Body rows highlight with `hover`. */\nexport const Row = forwardRef<HTMLTableRowElement, RowProps>(function TableRow({ className, ...props }, ref) {\n return <tr ref={ref} {...props} className={cx('mu-table-row', className)} />;\n});\n\nexport interface HeadProps extends ComponentPropsWithoutRef<'th'> {\n /** Right-aligns a column of numbers. Set it on the column's Cells too. */\n num?: boolean;\n}\n\n/** A column header, `<th scope=\"col\">` in 12px `ink-muted`. */\nexport const Head = forwardRef<HTMLTableCellElement, HeadProps>(function TableHead({ num = false, scope = 'col', className, ...props }, ref) {\n return <th ref={ref} scope={scope} {...props} className={cx('mu-table-head mu-label-sm', num && 'mu-table-num', className)} />;\n});\n\nexport interface CellProps extends ComponentPropsWithoutRef<'td'> {\n /** Right-aligns a number. */\n num?: boolean;\n /** Secondary text, such as a date, in `ink-muted`. */\n muted?: boolean;\n}\n\n/** A data cell, `<td>`. */\nexport const Cell = forwardRef<HTMLTableCellElement, CellProps>(function TableCell({ num = false, muted = false, className, ...props }, ref) {\n return <td ref={ref} {...props} className={cx('mu-table-cell', num && 'mu-table-num', muted && 'mu-table-muted', className)} />;\n});\n\nexport interface CaptionProps extends ComponentPropsWithoutRef<'caption'> {}\n\n/** Names the table, under it in `caption` style. Screen readers read it as the table's name. */\nexport const Caption = forwardRef<HTMLTableCaptionElement, CaptionProps>(function TableCaption({ className, ...props }, ref) {\n return <caption ref={ref} {...props} className={cx('mu-table-caption mu-caption', className)} />;\n});\n"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,cAAAA,MAAiD,QAC1D,OAAS,MAAAC,MAAU,+BACnB,OAAS,eAAAC,EAAa,cAAAC,MAAkB,yBAsBhC,cAAAC,MAAA,oBAnBR,IAAMC,EAAgD,CAAE,GAAI,aAAc,GAAI,SAAU,EAc3EC,EAAON,EAAwC,SAAmB,CAAE,KAAAO,EAAM,SAAAC,EAAW,GAAO,UAAAC,EAAW,GAAGC,CAAM,EAAGC,EAAK,CACnI,IAAMC,EAAWT,EAAWI,CAAI,EAChC,OACEH,EAACF,EAAY,SAAZ,CAAqB,MAAOU,EAC3B,SAAAR,EAAC,OAAI,UAAWI,EAAW,oCAAsC,kBAC/D,SAAAJ,EAAC,SAAM,IAAKO,EAAM,GAAGD,EAAO,UAAWT,EAAG,mBAAoB,QAAQW,CAAQ,GAAIP,EAASO,CAAQ,EAAGH,CAAS,EAAG,EACpH,EACF,CAEJ,CAAC,EAKYI,EAASb,EAAiD,SAAqB,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,EAAK,CACxH,OAAOP,EAAC,SAAM,IAAKO,EAAM,GAAGD,EAAO,UAAWT,EAAG,kBAAmBQ,CAAS,EAAG,CAClF,CAAC,EAKYK,EAAOd,EAA+C,SAAmB,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,EAAK,CAClH,OAAOP,EAAC,SAAM,IAAKO,EAAM,GAAGD,EAAO,UAAWT,EAAG,gBAAiBQ,CAAS,EAAG,CAChF,CAAC,EAKYM,EAAMf,EAA0C,SAAkB,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,EAAK,CAC3G,OAAOP,EAAC,MAAG,IAAKO,EAAM,GAAGD,EAAO,UAAWT,EAAG,eAAgBQ,CAAS,EAAG,CAC5E,CAAC,EAQYO,EAAOhB,EAA4C,SAAmB,CAAE,IAAAiB,EAAM,GAAO,MAAAC,EAAQ,MAAO,UAAAT,EAAW,GAAGC,CAAM,EAAGC,EAAK,CAC3I,OAAOP,EAAC,MAAG,IAAKO,EAAK,MAAOO,EAAQ,GAAGR,EAAO,UAAWT,EAAG,4BAA6BgB,GAAO,eAAgBR,CAAS,EAAG,CAC9H,CAAC,EAUYU,EAAOnB,EAA4C,SAAmB,CAAE,IAAAiB,EAAM,GAAO,MAAAG,EAAQ,GAAO,UAAAX,EAAW,GAAGC,CAAM,EAAGC,EAAK,CAC3I,OAAOP,EAAC,MAAG,IAAKO,EAAM,GAAGD,EAAO,UAAWT,EAAG,gBAAiBgB,GAAO,eAAgBG,GAAS,iBAAkBX,CAAS,EAAG,CAC/H,CAAC,
|
|
6
|
-
"names": ["forwardRef", "cx", "SizeContext", "useRowSize", "jsx", "bodyText", "Root", "size", "bordered", "className", "props", "ref", "resolved", "Header", "Body", "Row", "Head", "num", "scope", "Cell", "muted", "Caption"]
|
|
4
|
+
"sourcesContent": ["import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cx } from '../../internal/class-name';\nimport { SizeContext, useRowSize } from '../../internal/size';\nimport type { Size } from '../../types';\n\nconst bodyText: Record<Exclude<Size, 'xs'>, string> = { sm: 'mu-caption', md: 'mu-body' };\n\nexport interface RootProps extends ComponentPropsWithoutRef<'table'> {\n /** `sm` for dense admin lists. Sets row height and cell text. */\n size?: Exclude<Size, 'xs'>;\n /** Draws the table in a box: a `line` edge, `radius-lg` corners and a `surface` fill, as a List. */\n bordered?: boolean;\n}\n\n/**\n * A `<table>` with rows separated by `line`. It sits in a box that scrolls\n * sideways when the table is wider than the screen; the ref and every prop go\n * to the `<table>`.\n */\nexport const Root = forwardRef<HTMLTableElement, RootProps>(function TableRoot({ size, bordered = false, className, ...props }, ref) {\n const resolved = useRowSize(size);\n return (\n <SizeContext.Provider value={resolved}>\n <div className={bordered ? 'mu-table-scroll mu-table-bordered' : 'mu-table-scroll'}>\n <table ref={ref} {...props} className={cx('mu-table mu-base', `mu-s-${resolved}`, bodyText[resolved], className)} />\n </div>\n </SizeContext.Provider>\n );\n});\n\nexport interface HeaderProps extends ComponentPropsWithoutRef<'thead'> {}\n\n/** The `<thead>`, holding one Row of Head cells. */\nexport const Header = forwardRef<HTMLTableSectionElement, HeaderProps>(function TableHeader({ className, ...props }, ref) {\n return <thead ref={ref} {...props} className={cx('mu-table-header', className)} />;\n});\n\nexport interface BodyProps extends ComponentPropsWithoutRef<'tbody'> {}\n\n/** The `<tbody>`, holding the data Rows. */\nexport const Body = forwardRef<HTMLTableSectionElement, BodyProps>(function TableBody({ className, ...props }, ref) {\n return <tbody ref={ref} {...props} className={cx('mu-table-body', className)} />;\n});\n\nexport interface RowProps extends ComponentPropsWithoutRef<'tr'> {}\n\n/** A `<tr>`. Body rows highlight with `hover`. */\nexport const Row = forwardRef<HTMLTableRowElement, RowProps>(function TableRow({ className, ...props }, ref) {\n return <tr ref={ref} {...props} className={cx('mu-table-row', className)} />;\n});\n\nexport interface HeadProps extends ComponentPropsWithoutRef<'th'> {\n /** Right-aligns a column of numbers. Set it on the column's Cells too. */\n num?: boolean;\n}\n\n/** A column header, `<th scope=\"col\">` in 12px `ink-muted`. */\nexport const Head = forwardRef<HTMLTableCellElement, HeadProps>(function TableHead({ num = false, scope = 'col', className, ...props }, ref) {\n return <th ref={ref} scope={scope} {...props} className={cx('mu-table-head mu-label-sm', num && 'mu-table-num', className)} />;\n});\n\nexport interface CellProps extends ComponentPropsWithoutRef<'td'> {\n /** Right-aligns a number. */\n num?: boolean;\n /** Secondary text, such as a date, in `ink-muted`. */\n muted?: boolean;\n}\n\n/** A data cell, `<td>`. */\nexport const Cell = forwardRef<HTMLTableCellElement, CellProps>(function TableCell({ num = false, muted = false, className, ...props }, ref) {\n return <td ref={ref} {...props} className={cx('mu-table-cell', num && 'mu-table-num', muted && 'mu-table-muted', className)} />;\n});\n\nexport interface ActionsProps extends ComponentPropsWithoutRef<'div'> {}\n\n/**\n * Two or more row actions side by side in one Cell, such as Edit and Delete\n * Buttons. Like a single Button in a Cell, the group overlaps the cell's\n * padding, so the row keeps its height.\n */\nexport const Actions = forwardRef<HTMLDivElement, ActionsProps>(function TableActions({ className, ...props }, ref) {\n return <div ref={ref} {...props} className={cx('mu-table-actions', className)} />;\n});\n\nexport interface CaptionProps extends ComponentPropsWithoutRef<'caption'> {}\n\n/** Names the table, under it in `caption` style. Screen readers read it as the table's name. */\nexport const Caption = forwardRef<HTMLTableCaptionElement, CaptionProps>(function TableCaption({ className, ...props }, ref) {\n return <caption ref={ref} {...props} className={cx('mu-table-caption mu-caption', className)} />;\n});\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,cAAAA,MAAiD,QAC1D,OAAS,MAAAC,MAAU,+BACnB,OAAS,eAAAC,EAAa,cAAAC,MAAkB,yBAsBhC,cAAAC,MAAA,oBAnBR,IAAMC,EAAgD,CAAE,GAAI,aAAc,GAAI,SAAU,EAc3EC,EAAON,EAAwC,SAAmB,CAAE,KAAAO,EAAM,SAAAC,EAAW,GAAO,UAAAC,EAAW,GAAGC,CAAM,EAAGC,EAAK,CACnI,IAAMC,EAAWT,EAAWI,CAAI,EAChC,OACEH,EAACF,EAAY,SAAZ,CAAqB,MAAOU,EAC3B,SAAAR,EAAC,OAAI,UAAWI,EAAW,oCAAsC,kBAC/D,SAAAJ,EAAC,SAAM,IAAKO,EAAM,GAAGD,EAAO,UAAWT,EAAG,mBAAoB,QAAQW,CAAQ,GAAIP,EAASO,CAAQ,EAAGH,CAAS,EAAG,EACpH,EACF,CAEJ,CAAC,EAKYI,EAASb,EAAiD,SAAqB,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,EAAK,CACxH,OAAOP,EAAC,SAAM,IAAKO,EAAM,GAAGD,EAAO,UAAWT,EAAG,kBAAmBQ,CAAS,EAAG,CAClF,CAAC,EAKYK,EAAOd,EAA+C,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"bodyText", "Root", "size", "bordered", "className", "props", "ref", "resolved", "Header", "Body", "Row", "Head", "num", "scope", "Cell", "muted", "Actions", "Caption"]
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{ToggleGroup as
|
|
2
|
+
import{ToggleGroup as m}from"@base-ui/react/toggle-group";import{forwardRef as f,useCallback as d,useLayoutEffect as y,useRef as v}from"react";import{cx as T,withClass as b}from"../../internal/class-name.js";import{SizeContext as h,useSize as z}from"../../internal/size.js";import{jsx as a,jsxs as L}from"react/jsx-runtime";var E=f(function({size:l,multiple:e=!1,fullWidth:o=!1,className:n,children:s,...t},r){let i=z(l),p=v(null),g=d(c=>{p.current=c,typeof r=="function"?r(c):r&&(r.current=c)},[r]);return G(p,!e),a(h.Provider,{value:i,children:L(m,{ref:g,multiple:e,...t,className:b(T(e?`mu-toggle-group mu-s-${i}`:`mu-toggle-group mu-segmented mu-base mu-s-${i}`,o&&"mu-toggle-group-full"),n),children:[e?null:a("span",{className:"mu-segmented-key","aria-hidden":!0}),s]})})});function G(u,l){y(()=>{let e=u.current;if(!l||!e)return;let o=()=>{let t=e.querySelector(":scope > .mu-toggle[data-pressed]");t?(e.style.setProperty("--key-left",`${t.offsetLeft}px`),e.style.setProperty("--key-width",`${t.offsetWidth}px`),e.dataset.keyed=""):delete e.dataset.keyed};o();let n=new MutationObserver(o);n.observe(e,{subtree:!0,attributes:!0,attributeFilter:["data-pressed"],childList:!0});let s=new ResizeObserver(o);s.observe(e);for(let t of e.children)s.observe(t);return()=>{n.disconnect(),s.disconnect()}},[u,l])}export{E as ToggleGroup};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/toggle-group/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { ToggleGroup as BaseToggleGroup } from '@base-ui/react/toggle-group';\nimport { forwardRef, useCallback, useLayoutEffect, useRef, type ReactNode } from 'react';\nimport { withClass } from '../../internal/class-name';\nimport { SizeContext, useSize } from '../../internal/size';\nimport type { Size } from '../../types';\n\nexport interface ToggleGroupProps extends BaseToggleGroup.Props {\n size?: Size;\n children?: ReactNode;\n}\n\n/**\n * A row of Toggles. With `multiple` it is a toolbar of independent on/off\n * toggles. Without it, one choice among peers: a well with one sliding key,\n * the same control as Tabs.\n */\nexport const ToggleGroup = forwardRef<HTMLDivElement, ToggleGroupProps>(function ToggleGroup({ size, multiple = false, className, children, ...props }, forwardedRef) {\n const resolved = useSize(size);\n const root = useRef<HTMLDivElement | null>(null);\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n root.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef) forwardedRef.current = node;\n },\n [forwardedRef],\n );\n useSlidingKey(root, !multiple);\n return (\n <SizeContext.Provider value={resolved}>\n <BaseToggleGroup\n ref={setRef}\n multiple={multiple}\n {...props}\n className={withClass(multiple ? `mu-toggle-group mu-s-${resolved}` : `mu-toggle-group mu-segmented mu-base mu-s-${resolved}`, className)}\n >\n {multiple ? null : <span className=\"mu-segmented-key\" aria-hidden />}\n {children}\n </BaseToggleGroup>\n </SizeContext.Provider>\n );\n});\n\n/** Measures the pressed toggle and moves the key under it, as Base UI's Tabs.Indicator does for tabs. */\nfunction useSlidingKey(root: { current: HTMLDivElement | null }, enabled: boolean) {\n useLayoutEffect(() => {\n const element = root.current;\n if (!enabled || !element) return;\n const place = () => {\n const pressed = element.querySelector<HTMLElement>(':scope > .mu-toggle[data-pressed]');\n if (pressed) {\n element.style.setProperty('--key-left', `${pressed.offsetLeft}px`);\n element.style.setProperty('--key-width', `${pressed.offsetWidth}px`);\n element.dataset.keyed = '';\n } else {\n delete element.dataset.keyed;\n }\n };\n place();\n const mutations = new MutationObserver(place);\n mutations.observe(element, { subtree: true, attributes: true, attributeFilter: ['data-pressed'], childList: true });\n const resizes = new ResizeObserver(place);\n resizes.observe(element);\n for (const child of element.children) resizes.observe(child);\n return () => {\n mutations.disconnect();\n resizes.disconnect();\n };\n }, [root, enabled]);\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,eAAeA,MAAuB,8BAC/C,OAAS,cAAAC,EAAY,eAAAC,EAAa,mBAAAC,EAAiB,UAAAC,MAA8B,QACjF,OAAS,aAAAC,MAAiB,+
|
|
6
|
-
"names": ["BaseToggleGroup", "forwardRef", "useCallback", "useLayoutEffect", "useRef", "withClass", "SizeContext", "useSize", "jsx", "jsxs", "ToggleGroup", "size", "multiple", "className", "children", "props", "forwardedRef", "resolved", "root", "setRef", "node", "useSlidingKey", "enabled", "element", "place", "pressed", "mutations", "resizes", "child"]
|
|
4
|
+
"sourcesContent": ["import { ToggleGroup as BaseToggleGroup } from '@base-ui/react/toggle-group';\nimport { forwardRef, useCallback, useLayoutEffect, useRef, type ReactNode } from 'react';\nimport { cx, withClass } from '../../internal/class-name';\nimport { SizeContext, useSize } from '../../internal/size';\nimport type { Size } from '../../types';\n\nexport interface ToggleGroupProps extends BaseToggleGroup.Props {\n size?: Size;\n /** Fills its container's width and gives every Toggle an equal share. Icon-only Toggles keep their size. */\n fullWidth?: boolean;\n children?: ReactNode;\n}\n\n/**\n * A row of Toggles. With `multiple` it is a toolbar of independent on/off\n * toggles. Without it, one choice among peers: a well with one sliding key,\n * the same control as Tabs.\n */\nexport const ToggleGroup = forwardRef<HTMLDivElement, ToggleGroupProps>(function ToggleGroup({ size, multiple = false, fullWidth = false, className, children, ...props }, forwardedRef) {\n const resolved = useSize(size);\n const root = useRef<HTMLDivElement | null>(null);\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n root.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef) forwardedRef.current = node;\n },\n [forwardedRef],\n );\n useSlidingKey(root, !multiple);\n return (\n <SizeContext.Provider value={resolved}>\n <BaseToggleGroup\n ref={setRef}\n multiple={multiple}\n {...props}\n className={withClass(\n cx(multiple ? `mu-toggle-group mu-s-${resolved}` : `mu-toggle-group mu-segmented mu-base mu-s-${resolved}`, fullWidth && 'mu-toggle-group-full'),\n className,\n )}\n >\n {multiple ? null : <span className=\"mu-segmented-key\" aria-hidden />}\n {children}\n </BaseToggleGroup>\n </SizeContext.Provider>\n );\n});\n\n/** Measures the pressed toggle and moves the key under it, as Base UI's Tabs.Indicator does for tabs. */\nfunction useSlidingKey(root: { current: HTMLDivElement | null }, enabled: boolean) {\n useLayoutEffect(() => {\n const element = root.current;\n if (!enabled || !element) return;\n const place = () => {\n const pressed = element.querySelector<HTMLElement>(':scope > .mu-toggle[data-pressed]');\n if (pressed) {\n element.style.setProperty('--key-left', `${pressed.offsetLeft}px`);\n element.style.setProperty('--key-width', `${pressed.offsetWidth}px`);\n element.dataset.keyed = '';\n } else {\n delete element.dataset.keyed;\n }\n };\n place();\n const mutations = new MutationObserver(place);\n mutations.observe(element, { subtree: true, attributes: true, attributeFilter: ['data-pressed'], childList: true });\n const resizes = new ResizeObserver(place);\n resizes.observe(element);\n for (const child of element.children) resizes.observe(child);\n return () => {\n mutations.disconnect();\n resizes.disconnect();\n };\n }, [root, enabled]);\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,eAAeA,MAAuB,8BAC/C,OAAS,cAAAC,EAAY,eAAAC,EAAa,mBAAAC,EAAiB,UAAAC,MAA8B,QACjF,OAAS,MAAAC,EAAI,aAAAC,MAAiB,+BAC9B,OAAS,eAAAC,EAAa,WAAAC,MAAe,yBA6B/B,OASqB,OAAAC,EATrB,QAAAC,MAAA,oBAdC,IAAMC,EAAcV,EAA6C,SAAqB,CAAE,KAAAW,EAAM,SAAAC,EAAW,GAAO,UAAAC,EAAY,GAAO,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,EAAc,CACvL,IAAMC,EAAWX,EAAQI,CAAI,EACvBQ,EAAOhB,EAA8B,IAAI,EACzCiB,EAASnB,EACZoB,GAAgC,CAC/BF,EAAK,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["BaseToggleGroup", "forwardRef", "useCallback", "useLayoutEffect", "useRef", "cx", "withClass", "SizeContext", "useSize", "jsx", "jsxs", "ToggleGroup", "size", "multiple", "fullWidth", "className", "children", "props", "forwardedRef", "resolved", "root", "setRef", "node", "useSlidingKey", "enabled", "element", "place", "pressed", "mutations", "resizes", "child"]
|
|
7
7
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{themeTokens as r}from"./theme-tokens.js";import*as p from"./components/dialog/alert-dialog.js";import*as t from"./components/avatar/index.js";import{Badge as a,badgeClasses as x}from"./components/badge/index.js";import{Button as f,buttonClasses as n}from"./components/button/index.js";import{Checkbox as y}from"./components/checkbox/index.js";import*as i from"./components/collapsible/index.js";import*as P from"./components/combobox/index.js";import*as C from"./components/dialog/index.js";import*as u from"./components/drawer/index.js";import*as d from"./components/field/index.js";import*as g from"./components/field/fieldset.js";import{Input as b,inputClasses as S}from"./components/input/index.js";import{Kbd as k}from"./components/kbd/index.js";import{Link as v}from"./components/link/index.js";import*as O from"./components/list/index.js";import*as h from"./components/menu/index.js";import{menuClasses as
|
|
2
|
+
import{themeTokens as r}from"./theme-tokens.js";import*as p from"./components/dialog/alert-dialog.js";import*as t from"./components/avatar/index.js";import{Badge as a,badgeClasses as x}from"./components/badge/index.js";import{Button as f,buttonClasses as n}from"./components/button/index.js";import{Checkbox as y}from"./components/checkbox/index.js";import*as i from"./components/collapsible/index.js";import*as P from"./components/combobox/index.js";import*as C from"./components/dialog/index.js";import*as u from"./components/drawer/index.js";import*as d from"./components/field/index.js";import*as g from"./components/field/fieldset.js";import{Input as b,inputClasses as S}from"./components/input/index.js";import{Kbd as k}from"./components/kbd/index.js";import{Link as v}from"./components/link/index.js";import*as O from"./components/list/index.js";import*as h from"./components/form/index.js";import*as w from"./components/menu/index.js";import{menuClasses as G}from"./components/menu/classes.js";import*as I from"./components/popover/index.js";import{popoverClasses as F}from"./components/popover/classes.js";import{Prose as M}from"./components/prose/index.js";import{Radio as K,RadioGroup as V}from"./components/radio-group/index.js";import*as z from"./components/select/index.js";import{Separator as j}from"./components/separator/index.js";import{Skeleton as H}from"./components/skeleton/index.js";import{Spinner as N}from"./components/spinner/index.js";import{Switch as U}from"./components/switch/index.js";import*as W from"./components/table/index.js";import*as X from"./components/tabs/index.js";import{Textarea as Z,textareaClasses as _}from"./components/textarea/index.js";import*as $ from"./components/toast/index.js";import{Toggle as eo}from"./components/toggle/index.js";import{ToggleGroup as po}from"./components/toggle-group/index.js";import*as to from"./components/tooltip/index.js";export{p as AlertDialog,t as Avatar,a as Badge,f as Button,y as Checkbox,i as Collapsible,P as Combobox,C as Dialog,u as Drawer,d as Field,g as Fieldset,h as Form,b as Input,k as Kbd,v as Link,O as List,w as Menu,I as Popover,M as Prose,K as Radio,V as RadioGroup,z as Select,j as Separator,H as Skeleton,N as Spinner,U as Switch,W as Table,X as Tabs,Z as Textarea,$ as Toast,eo as Toggle,po as ToggleGroup,to as Tooltip,x as badgeClasses,n as buttonClasses,S as inputClasses,G as menuClasses,F as popoverClasses,_ as textareaClasses,r as themeTokens};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export type { IconElement, Size, Tone } from './types';\nexport { themeTokens } from './theme-tokens';\n\nexport * as AlertDialog from './components/dialog/alert-dialog';\nexport * as Avatar from './components/avatar';\nexport { Badge, badgeClasses, type BadgeClassesOptions, type BadgeProps } from './components/badge';\nexport { Button, buttonClasses, type ButtonClassesOptions, type ButtonProps, type ButtonVariant } from './components/button';\nexport { Checkbox, type CheckboxProps } from './components/checkbox';\nexport * as Collapsible from './components/collapsible';\nexport * as Combobox from './components/combobox';\nexport * as Dialog from './components/dialog';\nexport * as Drawer from './components/drawer';\nexport type { DrawerSide } from './components/drawer';\nexport * as Field from './components/field';\nexport * as Fieldset from './components/field/fieldset';\nexport { Input, inputClasses, type InputClassesOptions, type InputProps } from './components/input';\nexport { Kbd, type KbdProps } from './components/kbd';\nexport { Link, type LinkProps } from './components/link';\nexport * as List from './components/list';\nexport * as Menu from './components/menu';\nexport { menuClasses, type MenuClasses, type MenuClassesOptions } from './components/menu/classes';\nexport * as Popover from './components/popover';\nexport { popoverClasses, type PopoverClasses, type PopoverClassesOptions, type PopoverVariant } from './components/popover/classes';\nexport { Prose, type ProseProps } from './components/prose';\nexport { Radio, RadioGroup, type RadioGroupProps, type RadioProps } from './components/radio-group';\nexport * as Select from './components/select';\nexport { Separator, type SeparatorProps } from './components/separator';\nexport { Skeleton, type SkeletonProps } from './components/skeleton';\nexport { Spinner, type SpinnerProps } from './components/spinner';\nexport { Switch, type SwitchProps } from './components/switch';\nexport * as Table from './components/table';\nexport * as Tabs from './components/tabs';\nexport { Textarea, textareaClasses, type TextareaClassesOptions, type TextareaProps } from './components/textarea';\nexport * as Toast from './components/toast';\nexport { Toggle, type ToggleProps } from './components/toggle';\nexport { ToggleGroup, type ToggleGroupProps } from './components/toggle-group';\nexport * as Tooltip from './components/tooltip';\n"],
|
|
5
|
-
"mappings": ";AACA,OAAS,eAAAA,MAAmB,oBAE5B,UAAYC,MAAiB,sCAC7B,UAAYC,MAAY,+BACxB,OAAS,SAAAC,EAAO,gBAAAC,MAA+D,8BAC/E,OAAS,UAAAC,EAAQ,iBAAAC,MAAsF,+BACvG,OAAS,YAAAC,MAAoC,iCAC7C,UAAYC,MAAiB,oCAC7B,UAAYC,MAAc,iCAC1B,UAAYC,MAAY,+BACxB,UAAYC,MAAY,+BAExB,UAAYC,MAAW,8BACvB,UAAYC,MAAc,iCAC1B,OAAS,SAAAC,EAAO,gBAAAC,MAA+D,8BAC/E,OAAS,OAAAC,MAA0B,4BACnC,OAAS,QAAAC,MAA4B,6BACrC,UAAYC,MAAU,6BACtB,UAAYC,MAAU,6BACtB,OAAS,eAAAC,MAA8D,+BACvE,UAAYC,MAAa,gCACzB,OAAS,kBAAAC,MAA4F,kCACrG,OAAS,SAAAC,MAA8B,8BACvC,OAAS,SAAAC,EAAO,cAAAC,MAAyD,oCACzE,UAAYC,MAAY,+BACxB,OAAS,aAAAC,MAAsC,kCAC/C,OAAS,YAAAC,MAAoC,iCAC7C,OAAS,WAAAC,MAAkC,gCAC3C,OAAS,UAAAC,MAAgC,+BACzC,UAAYC,MAAW,8BACvB,UAAYC,MAAU,6BACtB,OAAS,YAAAC,EAAU,mBAAAC,MAAwE,iCAC3F,UAAYC,MAAW,8BACvB,OAAS,UAAAC,OAAgC,+BACzC,OAAS,eAAAC,OAA0C,qCACnD,UAAYC,OAAa",
|
|
6
|
-
"names": ["themeTokens", "AlertDialog", "Avatar", "Badge", "badgeClasses", "Button", "buttonClasses", "Checkbox", "Collapsible", "Combobox", "Dialog", "Drawer", "Field", "Fieldset", "Input", "inputClasses", "Kbd", "Link", "List", "Menu", "menuClasses", "Popover", "popoverClasses", "Prose", "Radio", "RadioGroup", "Select", "Separator", "Skeleton", "Spinner", "Switch", "Table", "Tabs", "Textarea", "textareaClasses", "Toast", "Toggle", "ToggleGroup", "Tooltip"]
|
|
4
|
+
"sourcesContent": ["export type { IconElement, Size, Tone } from './types';\nexport { themeTokens } from './theme-tokens';\n\nexport * as AlertDialog from './components/dialog/alert-dialog';\nexport * as Avatar from './components/avatar';\nexport { Badge, badgeClasses, type BadgeClassesOptions, type BadgeProps } from './components/badge';\nexport { Button, buttonClasses, type ButtonClassesOptions, type ButtonProps, type ButtonVariant } from './components/button';\nexport { Checkbox, type CheckboxProps } from './components/checkbox';\nexport * as Collapsible from './components/collapsible';\nexport * as Combobox from './components/combobox';\nexport * as Dialog from './components/dialog';\nexport * as Drawer from './components/drawer';\nexport type { DrawerSide } from './components/drawer';\nexport * as Field from './components/field';\nexport * as Fieldset from './components/field/fieldset';\nexport { Input, inputClasses, type InputClassesOptions, type InputProps } from './components/input';\nexport { Kbd, type KbdProps } from './components/kbd';\nexport { Link, type LinkProps } from './components/link';\nexport * as List from './components/list';\nexport * as Form from './components/form';\nexport * as Menu from './components/menu';\nexport { menuClasses, type MenuClasses, type MenuClassesOptions } from './components/menu/classes';\nexport * as Popover from './components/popover';\nexport { popoverClasses, type PopoverClasses, type PopoverClassesOptions, type PopoverVariant } from './components/popover/classes';\nexport { Prose, type ProseProps } from './components/prose';\nexport { Radio, RadioGroup, type RadioGroupProps, type RadioProps } from './components/radio-group';\nexport * as Select from './components/select';\nexport { Separator, type SeparatorProps } from './components/separator';\nexport { Skeleton, type SkeletonProps } from './components/skeleton';\nexport { Spinner, type SpinnerProps } from './components/spinner';\nexport { Switch, type SwitchProps } from './components/switch';\nexport * as Table from './components/table';\nexport * as Tabs from './components/tabs';\nexport { Textarea, textareaClasses, type TextareaClassesOptions, type TextareaProps } from './components/textarea';\nexport * as Toast from './components/toast';\nexport { Toggle, type ToggleProps } from './components/toggle';\nexport { ToggleGroup, type ToggleGroupProps } from './components/toggle-group';\nexport * as Tooltip from './components/tooltip';\n"],
|
|
5
|
+
"mappings": ";AACA,OAAS,eAAAA,MAAmB,oBAE5B,UAAYC,MAAiB,sCAC7B,UAAYC,MAAY,+BACxB,OAAS,SAAAC,EAAO,gBAAAC,MAA+D,8BAC/E,OAAS,UAAAC,EAAQ,iBAAAC,MAAsF,+BACvG,OAAS,YAAAC,MAAoC,iCAC7C,UAAYC,MAAiB,oCAC7B,UAAYC,MAAc,iCAC1B,UAAYC,MAAY,+BACxB,UAAYC,MAAY,+BAExB,UAAYC,MAAW,8BACvB,UAAYC,MAAc,iCAC1B,OAAS,SAAAC,EAAO,gBAAAC,MAA+D,8BAC/E,OAAS,OAAAC,MAA0B,4BACnC,OAAS,QAAAC,MAA4B,6BACrC,UAAYC,MAAU,6BACtB,UAAYC,MAAU,6BACtB,UAAYC,MAAU,6BACtB,OAAS,eAAAC,MAA8D,+BACvE,UAAYC,MAAa,gCACzB,OAAS,kBAAAC,MAA4F,kCACrG,OAAS,SAAAC,MAA8B,8BACvC,OAAS,SAAAC,EAAO,cAAAC,MAAyD,oCACzE,UAAYC,MAAY,+BACxB,OAAS,aAAAC,MAAsC,kCAC/C,OAAS,YAAAC,MAAoC,iCAC7C,OAAS,WAAAC,MAAkC,gCAC3C,OAAS,UAAAC,MAAgC,+BACzC,UAAYC,MAAW,8BACvB,UAAYC,MAAU,6BACtB,OAAS,YAAAC,EAAU,mBAAAC,MAAwE,iCAC3F,UAAYC,MAAW,8BACvB,OAAS,UAAAC,OAAgC,+BACzC,OAAS,eAAAC,OAA0C,qCACnD,UAAYC,OAAa",
|
|
6
|
+
"names": ["themeTokens", "AlertDialog", "Avatar", "Badge", "badgeClasses", "Button", "buttonClasses", "Checkbox", "Collapsible", "Combobox", "Dialog", "Drawer", "Field", "Fieldset", "Input", "inputClasses", "Kbd", "Link", "List", "Form", "Menu", "menuClasses", "Popover", "popoverClasses", "Prose", "Radio", "RadioGroup", "Select", "Separator", "Skeleton", "Spinner", "Switch", "Table", "Tabs", "Textarea", "textareaClasses", "Toast", "Toggle", "ToggleGroup", "Tooltip"]
|
|
7
7
|
}
|