@atom63/ui-react 0.2.0-beta.14 → 0.2.0-beta.16
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/dist/chart/index.d.ts +48 -0
- package/dist/chart/index.js +309 -0
- package/dist/chart/index.js.map +1 -0
- package/dist/chunk-3LGXD3HE.js +450 -0
- package/dist/chunk-3LGXD3HE.js.map +1 -0
- package/dist/{chunk-ASV4A4YB.js → chunk-4HE5IB6K.js} +4 -12
- package/dist/chunk-4HE5IB6K.js.map +1 -0
- package/dist/chunk-6HKGC3HE.js +3 -0
- package/dist/chunk-6HKGC3HE.js.map +1 -0
- package/dist/chunk-6VV4EBOO.js +25 -0
- package/dist/chunk-6VV4EBOO.js.map +1 -0
- package/dist/{chunk-GRRWPMZI.js → chunk-77CBRRVT.js} +47 -7
- package/dist/chunk-77CBRRVT.js.map +1 -0
- package/dist/{chunk-IXWOWQBP.js → chunk-ALARPBUL.js} +5 -22
- package/dist/chunk-ALARPBUL.js.map +1 -0
- package/dist/{chunk-L5KFLZUC.js → chunk-BQONJKNA.js} +4 -4
- package/dist/{chunk-L5KFLZUC.js.map → chunk-BQONJKNA.js.map} +1 -1
- package/dist/{chunk-CFFGYLY3.js → chunk-CO6KHYO5.js} +26 -4
- package/dist/chunk-CO6KHYO5.js.map +1 -0
- package/dist/chunk-FHL2NLXP.js +101 -0
- package/dist/chunk-FHL2NLXP.js.map +1 -0
- package/dist/chunk-HPUHI2YJ.js +69 -0
- package/dist/chunk-HPUHI2YJ.js.map +1 -0
- package/dist/{chunk-BSDSLG3L.js → chunk-IEHYTNLS.js} +7 -4
- package/dist/chunk-IEHYTNLS.js.map +1 -0
- package/dist/{chunk-TAXYD4I4.js → chunk-IPUBANIB.js} +3 -2
- package/dist/chunk-IPUBANIB.js.map +1 -0
- package/dist/chunk-QU33S646.js +118 -0
- package/dist/chunk-QU33S646.js.map +1 -0
- package/dist/{chunk-WLLPGOQ7.js → chunk-SL6J2Y6I.js} +18 -6
- package/dist/chunk-SL6J2Y6I.js.map +1 -0
- package/dist/{chunk-3R74FOXV.js → chunk-VUUSD5AG.js} +3 -3
- package/dist/{chunk-3R74FOXV.js.map → chunk-VUUSD5AG.js.map} +1 -1
- package/dist/{chunk-CJAWGKA5.js → chunk-Y52BV635.js} +16 -4
- package/dist/chunk-Y52BV635.js.map +1 -0
- package/dist/components/art-plate/index.js +7 -0
- package/dist/components/art-plate/index.js.map +1 -0
- package/dist/components/command/index.js +1 -1
- package/dist/components/drawer/index.js +1 -1
- package/dist/components/feedback-state/index.js +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/layered-scene/index.js +7 -0
- package/dist/components/layered-scene/index.js.map +1 -0
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/segmented-control/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +3 -3
- package/dist/components/sidebar-nav-tree/index.js +4 -4
- package/dist/components/table/index.js +2 -1
- package/dist/{index-DlcaeyJS.d.ts → index-B0PHovoW.d.ts} +10 -3
- package/dist/index.d.ts +123 -11
- package/dist/index.js +35 -30
- package/dist/media/index.d.ts +24 -3
- package/dist/media/index.js +9 -361
- package/dist/media/index.js.map +1 -1
- package/dist/media/media-lightbox/parts/index.js +2 -1
- package/dist/preview/index.d.ts +1 -1
- package/dist/preview/index.js +7 -7
- package/dist/theme/index.d.ts +6 -2
- package/dist/theme/index.js +10 -1
- package/dist/theme/index.js.map +1 -1
- package/package.json +11 -3
- package/src/components/alert-dialog/alert-dialog.css +1 -1
- package/src/components/art-plate/art-plate.css +172 -0
- package/src/components/autocomplete/autocomplete.css +21 -11
- package/src/components/chart/chart.css +316 -0
- package/src/components/checkbox/checkbox.css +1 -1
- package/src/components/command/command.css +13 -0
- package/src/components/feedback-state/feedback-state.css +2 -1
- package/src/components/field/field.css +1 -1
- package/src/components/form/form.css +1 -1
- package/src/components/input/input.css +3 -3
- package/src/components/input-otp/input-otp.css +3 -3
- package/src/components/layered-scene/layered-scene.css +117 -0
- package/src/components/load-more-trigger/load-more-trigger.css +4 -2
- package/src/components/radio/radio.css +1 -1
- package/src/components/rating/rating.css +18 -17
- package/src/components/segmented-control/segmented-control.css +11 -11
- package/src/components/select/select.css +3 -3
- package/src/components/table/table.css +5 -0
- package/src/components/textarea/textarea.css +3 -3
- package/src/styles/recipes.css +3 -0
- package/dist/chunk-ASV4A4YB.js.map +0 -1
- package/dist/chunk-BSDSLG3L.js.map +0 -1
- package/dist/chunk-CFFGYLY3.js.map +0 -1
- package/dist/chunk-CJAWGKA5.js.map +0 -1
- package/dist/chunk-GRRWPMZI.js.map +0 -1
- package/dist/chunk-IXWOWQBP.js.map +0 -1
- package/dist/chunk-T7FUZUZO.js +0 -70
- package/dist/chunk-T7FUZUZO.js.map +0 -1
- package/dist/chunk-TAXYD4I4.js.map +0 -1
- package/dist/chunk-WLLPGOQ7.js.map +0 -1
package/dist/chunk-T7FUZUZO.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-AJLHJRK6.js';
|
|
2
|
-
import { segmentedControlContract } from '@atom63/ui-foundation';
|
|
3
|
-
import { Tabs } from '@base-ui/react/tabs';
|
|
4
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
function SegmentedControl({
|
|
7
|
-
animateBackplate = true,
|
|
8
|
-
className,
|
|
9
|
-
defaultValue,
|
|
10
|
-
fullWidth,
|
|
11
|
-
items,
|
|
12
|
-
onValueChange,
|
|
13
|
-
size = segmentedControlContract.defaultSize,
|
|
14
|
-
tabClassName,
|
|
15
|
-
tone = segmentedControlContract.defaultTone,
|
|
16
|
-
value,
|
|
17
|
-
variant = segmentedControlContract.defaultVariant,
|
|
18
|
-
...props
|
|
19
|
-
}) {
|
|
20
|
-
return /* @__PURE__ */ jsx(
|
|
21
|
-
Tabs.Root,
|
|
22
|
-
{
|
|
23
|
-
...props,
|
|
24
|
-
className: cn("a63-SegmentedControl", className),
|
|
25
|
-
"data-backplate-animation": animateBackplate ? "on" : "off",
|
|
26
|
-
"data-full": fullWidth || void 0,
|
|
27
|
-
"data-size": size,
|
|
28
|
-
"data-slot": "segmented-control",
|
|
29
|
-
"data-tone": tone,
|
|
30
|
-
"data-variant": variant,
|
|
31
|
-
defaultValue,
|
|
32
|
-
onValueChange: (next) => {
|
|
33
|
-
if (typeof next === "string" && next !== value) {
|
|
34
|
-
onValueChange?.(next);
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
value,
|
|
38
|
-
children: /* @__PURE__ */ jsxs(Tabs.List, { className: "a63-SegmentedControl-track", "data-slot": "segmented-control-track", children: [
|
|
39
|
-
items.map((item) => /* @__PURE__ */ jsx(
|
|
40
|
-
Tabs.Tab,
|
|
41
|
-
{
|
|
42
|
-
"aria-label": item.label,
|
|
43
|
-
className: cn("a63-SegmentedControl-item", tabClassName),
|
|
44
|
-
"data-slot": "segmented-control-item",
|
|
45
|
-
disabled: item.disabled,
|
|
46
|
-
title: item.label,
|
|
47
|
-
value: item.value,
|
|
48
|
-
children: variant === "icon" ? /* @__PURE__ */ jsx("span", { className: "a63-SegmentedControl-icon", "data-slot": "segmented-control-icon", children: item.icon ?? item.label }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
49
|
-
item.icon ? /* @__PURE__ */ jsx("span", { className: "a63-SegmentedControl-icon", "data-slot": "segmented-control-icon", children: item.icon }) : null,
|
|
50
|
-
/* @__PURE__ */ jsx("span", { className: "a63-SegmentedControl-label", "data-slot": "segmented-control-label", children: item.label })
|
|
51
|
-
] })
|
|
52
|
-
},
|
|
53
|
-
item.value
|
|
54
|
-
)),
|
|
55
|
-
/* @__PURE__ */ jsx(
|
|
56
|
-
Tabs.Indicator,
|
|
57
|
-
{
|
|
58
|
-
className: "a63-SegmentedControl-indicator",
|
|
59
|
-
"data-backplate-animation": animateBackplate ? "on" : "off",
|
|
60
|
-
"data-slot": "segmented-control-indicator"
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
] })
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export { SegmentedControl };
|
|
69
|
-
//# sourceMappingURL=chunk-T7FUZUZO.js.map
|
|
70
|
-
//# sourceMappingURL=chunk-T7FUZUZO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/segmented-control/segmented-control.tsx"],"names":[],"mappings":";;;;;AAkDO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,gBAAA,GAAmB,IAAA;AAAA,EACnB,SAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAO,wBAAA,CAAyB,WAAA;AAAA,EAChC,YAAA;AAAA,EACA,OAAO,wBAAA,CAAyB,WAAA;AAAA,EAChC,KAAA;AAAA,EACA,UAAU,wBAAA,CAAyB,cAAA;AAAA,EACnC,GAAG;AACL,CAAA,EAA8C;AAC5C,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,IAAA;AAAA,IAAL;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAS,CAAA;AAAA,MAC/C,0BAAA,EAA0B,mBAAmB,IAAA,GAAO,KAAA;AAAA,MACpD,aAAW,SAAA,IAAa,MAAA;AAAA,MACxB,WAAA,EAAW,IAAA;AAAA,MACX,WAAA,EAAU,mBAAA;AAAA,MACV,WAAA,EAAW,IAAA;AAAA,MACX,cAAA,EAAc,OAAA;AAAA,MACd,YAAA;AAAA,MACA,eAAe,CAAA,IAAA,KAAQ;AACrB,QAAA,IAAI,OAAO,IAAA,KAAS,QAAA,IAAY,IAAA,KAAS,KAAA,EAAO;AAC9C,UAAA,aAAA,GAAgB,IAAI,CAAA;AAAA,QACtB;AAAA,MACF,CAAA;AAAA,MACA,KAAA;AAAA,MAEA,+BAAC,IAAA,CAAK,IAAA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edControlSize,\n type SegmentedControlTone,\n type SegmentedControlVariant,\n segmentedControlContract,\n} from '@atom63/ui-foundation'\nimport { Tabs } from '@base-ui/react/tabs'\nimport type * as React from 'react'\n\nimport { cn } from '../../lib/cn'\n\nexport interface SegmentedControlItem {\n disabled?: boolean\n icon?: React.ReactNode\n label: string\n value: string\n}\n\nexport interface SegmentedControlProps extends Omit<\n Tabs.Root.Props,\n 'children' | 'className' | 'defaultValue' | 'onValueChange' | 'orientation' | 'value'\n> {\n /** Animate the sliding indicator between segments (default true). */\n animateBackplate?: boolean\n className?: string\n /** The initially selected segment when the control is uncontrolled. */\n defaultValue?: string\n /** Stretch the track to fill its container with equal-width segments. */\n fullWidth?: boolean\n items: SegmentedControlItem[]\n onValueChange?: (value: string) => void\n ref?: React.Ref<HTMLDivElement>\n size?: SegmentedControlSize\n /** Per-segment class escape hatch merged onto every tab. */\n tabClassName?: string\n tone?: SegmentedControlTone\n /** The selected segment. Leave it out, with `defaultValue`, for an\n * uncontrolled control. */\n value?: string\n variant?: SegmentedControlVariant\n}\n\n/*\n * SegmentedControl — a single-select segmented track with a sliding indicator\n * (Base UI Tabs). Track/pill/text read the segment contract (--a63-segment-*)\n * with muted-track / overlay-pill fallbacks so light mode keeps contrast. `tone`\n * mirrors the Toggle axis (neutral | accent).\n */\nexport function SegmentedControl({\n animateBackplate = true,\n className,\n defaultValue,\n fullWidth,\n items,\n onValueChange,\n size = segmentedControlContract.defaultSize,\n tabClassName,\n tone = segmentedControlContract.defaultTone,\n value,\n variant = segmentedControlContract.defaultVariant,\n ...props\n}: SegmentedControlProps): React.ReactElement {\n return (\n <Tabs.Root\n {...props}\n className={cn('a63-SegmentedControl', className)}\n data-backplate-animation={animateBackplate ? 'on' : 'off'}\n data-full={fullWidth || undefined}\n data-size={size}\n data-slot=\"segmented-control\"\n data-tone={tone}\n data-variant={variant}\n defaultValue={defaultValue}\n onValueChange={next => {\n if (typeof next === 'string' && next !== value) {\n onValueChange?.(next)\n }\n }}\n value={value}\n >\n <Tabs.List className=\"a63-SegmentedControl-track\" data-slot=\"segmented-control-track\">\n {items.map(item => (\n <Tabs.Tab\n aria-label={item.label}\n className={cn('a63-SegmentedControl-item', tabClassName)}\n data-slot=\"segmented-control-item\"\n disabled={item.disabled}\n key={item.value}\n title={item.label}\n value={item.value}\n >\n {variant === 'icon' ? (\n <span className=\"a63-SegmentedControl-icon\" data-slot=\"segmented-control-icon\">\n {item.icon ?? item.label}\n </span>\n ) : (\n <>\n {item.icon ? (\n <span className=\"a63-SegmentedControl-icon\" data-slot=\"segmented-control-icon\">\n {item.icon}\n </span>\n ) : null}\n <span className=\"a63-SegmentedControl-label\" data-slot=\"segmented-control-label\">\n {item.label}\n </span>\n </>\n )}\n </Tabs.Tab>\n ))}\n <Tabs.Indicator\n className=\"a63-SegmentedControl-indicator\"\n data-backplate-animation={animateBackplate ? 'on' : 'off'}\n data-slot=\"segmented-control-indicator\"\n />\n </Tabs.List>\n </Tabs.Root>\n )\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/drawer/drawer.tsx"],"names":["DrawerPrimitive"],"mappings":";;;;;;;AA2CA,IAAM,gBAAsB,KAAA,CAAA,aAAA,CAAkC;AAAA,EAC5D,SAAA,EAAW,QAAA;AAAA,EACX,KAAA,EAAO;AACT,CAAC,CAAA;AAGD,SAAS,iBAAA,CAAkB,QAAkC,QAAA,EAAqB;AAChF,EAAA,IAAI,MAAA,IAAU,QAAA,IAAY,cAAA,CAAyC,MAAM,CAAA,EAAG;AAC1E,IAAA,OAAO,YAAA,CAAa,MAAA,EAAQ,MAAA,EAAW,QAAQ,CAAA;AAAA,EACjD;AACA,EAAA,OAAO,MAAA,IAAU,QAAA;AACnB;AAEA,SAAS,oBAAA,CACP,OAAA,EACA,MAAA,EACA,QAAA,EACiD;AACjD,EAAA,IAAI,MAAA,EAAQ;AACV,IAAA,MAAM,cAAA,GAAiB,iBAAA,CAAkB,MAAA,EAAQ,QAAQ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kBAAA,EAAoB,SAAS,CAAA;AAAA,MAC3C,WAAA,EAAU,cAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ;AAEO,SAAS,iBAAA,CAAkB;AAAA,EAChC,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA0D;AACxD,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,WAAA;AAAA,IAAhB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,wBAAA,EAA0B,SAAS,CAAA;AAAA,MACjD,WAAA,EAAU,oBAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ","file":"chunk-TAXYD4I4.js","sourcesContent":["'use client'\n\nimport { Drawer as DrawerPrimitive } from '@base-ui/react/drawer'\nimport type { DrawerDirection, DrawerFooterVariant } from '@atom63/ui-foundation'\nimport * as React from 'react'\nimport { cloneElement, isValidElement, type ReactElement, type ReactNode } from 'react'\n\nimport { cn } from '../../lib/cn'\nimport { usePortalContainer } from '../portal-container'\n\n/*\n * Drawer — a Base UI-backed bottom/side drawer (swipe-to-dismiss, scrim, a11y).\n * The public Atom63 compound API stays stable while the implementation is now\n * rooted in the same Base UI primitive family as Dialog/Popover/Sheet.\n */\n\nexport type DrawerAsChildProps = {\n /** Merges trigger props onto the single child element (Radix-compatible). */\n asChild?: boolean\n render?: ReactElement\n children?: ReactNode\n}\n\nexport type DrawerRootProps = Omit<DrawerPrimitive.Root.Props, 'swipeDirection'> & {\n /** Visual edge the drawer is anchored to. */\n direction?: DrawerDirection\n /** Override the inferred dismiss direction when needed. */\n swipeDirection?: DrawerPrimitive.Root.Props['swipeDirection']\n}\n\ntype DrawerContextValue = {\n direction: DrawerDirection\n /** False for a persistent sheet: no backdrop, and the page behind stays usable. */\n modal: boolean\n}\n\nexport type DrawerContentProps = Omit<DrawerPrimitive.Popup.Props, 'children'> & {\n children?: React.ReactNode\n contentProps?: DrawerPrimitive.Content.Props\n portalProps?: DrawerPrimitive.Portal.Props\n viewportProps?: DrawerPrimitive.Viewport.Props\n}\n\nconst DrawerContext = React.createContext<DrawerContextValue>({\n direction: 'bottom',\n modal: true,\n})\n\n/** Compose a `render` element with children. */\nfunction composeDrawerSlot(render: ReactElement | undefined, children: ReactNode) {\n if (render && children && isValidElement<{ children?: ReactNode }>(render)) {\n return cloneElement(render, undefined, children)\n }\n return render ?? children\n}\n\nfunction resolveTriggerRender(\n asChild: boolean | undefined,\n render: ReactElement | undefined,\n children: ReactNode\n): { render?: ReactElement; children?: ReactNode } {\n if (render) {\n const composedRender = composeDrawerSlot(render, children)\n return {\n render: isValidElement(composedRender) ? composedRender : render,\n children: undefined,\n }\n }\n if (asChild && isValidElement(children)) {\n return { render: children as ReactElement, children: undefined }\n }\n return { render: undefined, children }\n}\n\nfunction swipeDirectionForDirection(\n direction: DrawerDirection\n): DrawerPrimitive.Root.Props['swipeDirection'] {\n switch (direction) {\n case 'top':\n return 'up'\n case 'bottom':\n return 'down'\n case 'left':\n return 'left'\n case 'right':\n return 'right'\n }\n}\n\nexport function Drawer({\n direction = 'bottom',\n swipeDirection,\n children,\n ...props\n}: DrawerRootProps): React.ReactElement {\n return (\n <DrawerContext.Provider value={{ direction, modal: props.modal !== false }}>\n <DrawerPrimitive.Root\n data-slot=\"drawer\"\n swipeDirection={swipeDirection ?? swipeDirectionForDirection(direction)}\n {...props}\n >\n {children}\n </DrawerPrimitive.Root>\n </DrawerContext.Provider>\n )\n}\n\nexport type DrawerTriggerProps = DrawerPrimitive.Trigger.Props & DrawerAsChildProps\n\nexport function DrawerTrigger({\n asChild,\n render,\n children,\n ...props\n}: DrawerTriggerProps): React.ReactElement {\n const slot = resolveTriggerRender(asChild, render, children)\n return (\n <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" render={slot.render} {...props}>\n {slot.children}\n </DrawerPrimitive.Trigger>\n )\n}\n\nexport function DrawerPortal(props: DrawerPrimitive.Portal.Props): React.ReactElement | null {\n const { container, ...portalProps } = props\n const contextPortalContainer = usePortalContainer()\n return (\n <DrawerPrimitive.Portal\n container={container ?? contextPortalContainer}\n data-slot=\"drawer-portal\"\n {...portalProps}\n />\n )\n}\n\nexport type DrawerCloseProps = DrawerPrimitive.Close.Props & DrawerAsChildProps\n\nexport function DrawerClose({\n asChild,\n render,\n children,\n ...props\n}: DrawerCloseProps): React.ReactElement {\n const slot = resolveTriggerRender(asChild, render, children)\n return (\n <DrawerPrimitive.Close data-slot=\"drawer-close\" render={slot.render} {...props}>\n {slot.children}\n </DrawerPrimitive.Close>\n )\n}\n\nexport function DrawerOverlay({\n className,\n ...props\n}: DrawerPrimitive.Backdrop.Props): React.ReactElement {\n return (\n <DrawerPrimitive.Backdrop\n className={cn('a63-Drawer-overlay', className)}\n data-slot=\"drawer-overlay\"\n {...props}\n />\n )\n}\n\nexport function DrawerContent({\n className,\n children,\n contentProps,\n portalProps,\n viewportProps,\n ...props\n}: DrawerContentProps): React.ReactElement {\n const { direction, modal } = React.useContext(DrawerContext)\n\n return (\n <DrawerPortal {...portalProps}>\n {modal ? <DrawerOverlay /> : null}\n <DrawerPrimitive.Viewport\n {...viewportProps}\n className={cn('a63-Drawer-viewport', viewportProps?.className)}\n data-modal={modal ? undefined : 'false'}\n data-side={direction}\n data-slot=\"drawer-viewport\"\n >\n <DrawerPrimitive.Popup\n className={cn('a63-Drawer-content', className)}\n data-side={direction}\n data-slot=\"drawer-content\"\n {...props}\n >\n <DrawerPrimitive.Content\n {...contentProps}\n className={cn('a63-Drawer-contentInner', contentProps?.className)}\n data-slot=\"drawer-content-inner\"\n >\n {/* Grab handle — only shown for the bottom direction (see drawer.css). */}\n <DrawerHandle />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPortal>\n )\n}\n\nexport function DrawerHandle({\n className,\n ...props\n}: React.ComponentProps<'div'>): React.ReactElement {\n return <div className={cn('a63-Drawer-handle', className)} data-slot=\"drawer-handle\" {...props} />\n}\n\nexport function DrawerHeader({\n className,\n ...props\n}: React.ComponentProps<'div'>): React.ReactElement {\n return <div className={cn('a63-Drawer-header', className)} data-slot=\"drawer-header\" {...props} />\n}\n\nexport function DrawerFooter({\n className,\n variant = 'default',\n ...props\n}: React.ComponentProps<'div'> & { variant?: DrawerFooterVariant }): React.ReactElement {\n return (\n <div\n className={cn('a63-Drawer-footer', className)}\n data-slot=\"drawer-footer\"\n data-variant={variant}\n {...props}\n />\n )\n}\n\nexport function DrawerBody({\n className,\n ...props\n}: React.ComponentProps<'div'>): React.ReactElement {\n return <div className={cn('a63-Drawer-body', className)} data-slot=\"drawer-body\" {...props} />\n}\n\nexport function DrawerTitle({\n className,\n ...props\n}: DrawerPrimitive.Title.Props): React.ReactElement {\n return (\n <DrawerPrimitive.Title\n className={cn('a63-Drawer-title', className)}\n data-slot=\"drawer-title\"\n {...props}\n />\n )\n}\n\nexport function DrawerDescription({\n className,\n ...props\n}: DrawerPrimitive.Description.Props): React.ReactElement {\n return (\n <DrawerPrimitive.Description\n className={cn('a63-Drawer-description', className)}\n data-slot=\"drawer-description\"\n {...props}\n />\n )\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/form.tsx"],"names":[],"mappings":";;;;;;;AAsBA,IAAM,IAAA,GAAO;AASb,IAAM,gBAAA,GAAyB,oBAA4C,IAAI,CAAA;AAE/E,IAAM,YAAY,CAGhB;AAAA,EACA,GAAG;AACL,CAAA,KAA4C;AAC1C,EAAA,uBACE,GAAA,CAAC,gBAAA,CAAiB,QAAA,EAAjB,EAA0B,OAAO,EAAE,IAAA,EAAM,KAAA,CAAM,IAAA,EAAK,EACnD,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAY,GAAG,OAAO,CAAA,EACzB,CAAA;AAEJ;AAEA,IAAM,eAAe,MAAM;AACzB,EAAA,MAAM,YAAA,GAAqB,iBAAW,gBAAgB,CAAA;AACtD,EAAA,MAAM,WAAA,GAAoB,iBAAW,eAAe,CAAA;AAEpD,EAAA,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,aAAA,EAAc,GAAI,YAAA,EAAa;AAC9C,EAAA,MAAM,OAAO,KAAA,GAAQ,MAAA,CAAO,OAAO,OAAA,IAAW,EAAE,IAAI,KAAA,CAAM,QAAA;AAE1D,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,GAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,QAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,iBAAA,EAAmB,SAAS,CAAA;AAAA,MAC1C,WAAA,EAAU,cAAA;AAAA,MACV,EAAA,EAAI,aAAA;AAAA,MACJ,IAAA,EAAK,OAAA;AAAA,MACJ,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-WLLPGOQ7.js","sourcesContent":["'use client'\n\nimport { useRender } from '@base-ui/react/use-render'\nimport * as React from 'react'\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form'\n\nimport { cn } from '../../lib/cn'\nimport { Label } from '../label'\n\n/* Form — react-hook-form wrappers. Faithful port of prod @atom63/ui form.tsx:\n * the Controller integration, useFormField id-wiring hook, and Base UI\n * `use-render` FormControl slot are kept exactly. Only the presentational\n * classes are recomposed into `.a63-Form*` recipes reading --a63-* tokens. */\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>')\n }\n if (!itemContext) {\n throw new Error('useFormField should be used within <FormItem>')\n }\n\n const { getFieldState } = useFormContext()\n const formState = useFormState({ name: fieldContext.name })\n const fieldState = getFieldState(fieldContext.name, formState)\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null)\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div className={cn('a63-FormItem', className)} data-slot=\"form-item\" {...props} />\n </FormItemContext.Provider>\n )\n}\n\nfunction FormLabel({ className, ...props }: React.ComponentProps<typeof Label>) {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n className={cn('a63-FormLabel', className)}\n data-error={!!error}\n data-slot=\"form-label\"\n htmlFor={formItemId}\n {...props}\n />\n )\n}\n\nfunction FormControl({\n children,\n ...props\n}: React.ComponentProps<'div'> & { children: React.ReactElement }) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return useRender({\n defaultTagName: 'div',\n props: {\n 'aria-describedby': !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,\n 'aria-invalid': !!error,\n 'data-slot': 'form-control',\n id: formItemId,\n ...props,\n },\n render: children,\n })\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n className={cn('a63-FormDescription', className)}\n data-slot=\"form-description\"\n id={formDescriptionId}\n {...props}\n />\n )\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? '') : props.children\n\n if (!body) {\n return null\n }\n\n return (\n <p\n aria-live=\"polite\"\n className={cn('a63-FormMessage', className)}\n data-slot=\"form-message\"\n id={formMessageId}\n role=\"alert\"\n {...props}\n >\n {body}\n </p>\n )\n}\n\nexport {\n Form,\n FormControl,\n FormDescription,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n useFormField,\n}\n"]}
|