@01.software/ui 0.0.0-stage → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/LICENSE +21 -0
  3. package/README.md +154 -2
  4. package/THIRD_PARTY_NOTICES.md +89 -0
  5. package/dist/accordion.d.ts +7 -0
  6. package/dist/accordion.js +16 -0
  7. package/dist/alert.d.ts +9 -0
  8. package/dist/alert.js +22 -0
  9. package/dist/badge.d.ts +9 -0
  10. package/dist/badge.js +21 -0
  11. package/dist/button.d.ts +8 -0
  12. package/dist/button.js +24 -0
  13. package/dist/checkbox.d.ts +4 -0
  14. package/dist/checkbox.js +9 -0
  15. package/dist/command-menu.d.ts +28 -0
  16. package/dist/command-menu.js +69 -0
  17. package/dist/dialog.d.ts +16 -0
  18. package/dist/dialog.js +28 -0
  19. package/dist/field.d.ts +24 -0
  20. package/dist/field.js +68 -0
  21. package/dist/input.d.ts +3 -0
  22. package/dist/input.js +6 -0
  23. package/dist/internal/cn.d.ts +2 -0
  24. package/dist/internal/cn.js +5 -0
  25. package/dist/internal/label.d.ts +1 -0
  26. package/dist/internal/label.js +2 -0
  27. package/dist/internal/menu-styles.d.ts +3 -0
  28. package/dist/internal/menu-styles.js +3 -0
  29. package/dist/label.d.ts +4 -0
  30. package/dist/label.js +8 -0
  31. package/dist/menubar.d.ts +29 -0
  32. package/dist/menubar.js +85 -0
  33. package/dist/popover.d.ts +11 -0
  34. package/dist/popover.js +21 -0
  35. package/dist/progress.d.ts +4 -0
  36. package/dist/progress.js +14 -0
  37. package/dist/radio-group.d.ts +5 -0
  38. package/dist/radio-group.js +11 -0
  39. package/dist/select.d.ts +15 -0
  40. package/dist/select.js +36 -0
  41. package/dist/separator.d.ts +4 -0
  42. package/dist/separator.js +8 -0
  43. package/dist/skeleton.d.ts +3 -0
  44. package/dist/skeleton.js +6 -0
  45. package/dist/slider.d.ts +6 -0
  46. package/dist/slider.js +17 -0
  47. package/dist/styles.css +2 -0
  48. package/dist/switch.d.ts +4 -0
  49. package/dist/switch.js +8 -0
  50. package/dist/tabs.d.ts +13 -0
  51. package/dist/tabs.js +31 -0
  52. package/dist/textarea.d.ts +3 -0
  53. package/dist/textarea.js +6 -0
  54. package/dist/tooltip.d.ts +7 -0
  55. package/dist/tooltip.js +13 -0
  56. package/package.json +192 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,24 @@
1
+ # @01.software/ui
2
+
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f27ede2: Keep the newly opened `Menubar` menu open when the pointer moves between open menus while the previous menu plays its exit motion.
8
+
9
+ ## 0.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - ecd1cae: Expose the existing basic controls and menus through component subpaths with precompiled theme and motion styles, and improve radio spacing, field layouts and tab variants.
14
+
15
+ Refine compact macOS control geometry, segmented tabs, raised dark popup surfaces, and visible keyboard focus.
16
+
17
+ - 3175bfd: Allow applications to customize the built-in Dialog close button label with
18
+ `closeLabel`, preserving the existing Korean default and dismissal behavior.
19
+
20
+ ## 0.1.0
21
+
22
+ ### Minor Changes
23
+
24
+ - ae2631d: Register the six existing React 19 component subpaths and precompiled stylesheet for trusted public distribution. The unprefixed theme tokens are a pre-1.0 compatibility surface; no root barrel, reset, font loader, or additional component is introduced.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 01 SOFTWARE contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,155 @@
1
- # Temporary Holding Version
1
+ # @01.software/ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Compact React 19 controls, built from the existing Web shadcn/Radix primitives.
4
+ Web and the package catalogue use the same implementation. Import individual
5
+ component subpaths and one precompiled stylesheet; there is no root barrel or
6
+ framework adapter.
7
+
8
+ ```tsx
9
+ import { Button } from '@01.software/ui/button'
10
+ import { Checkbox } from '@01.software/ui/checkbox'
11
+ import { Label } from '@01.software/ui/label'
12
+ import {
13
+ Dialog,
14
+ DialogTrigger,
15
+ DialogContent,
16
+ DialogHeader,
17
+ DialogTitle,
18
+ DialogDescription,
19
+ } from '@01.software/ui/dialog'
20
+ import '@01.software/ui/styles.css'
21
+ ```
22
+
23
+ ## Components
24
+
25
+ | Subpath | Public components and helpers |
26
+ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
27
+ | `button` | Button, buttonVariants |
28
+ | `input` | Input |
29
+ | `field` | Field, FieldSet, FieldLegend, FieldGroup, FieldContent, FieldLabel, FieldTitle, FieldDescription, FieldSeparator, FieldError |
30
+ | `select` | Select, SelectTrigger, SelectValue, SelectContent, SelectItem, SelectGroup, SelectLabel, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton |
31
+ | `radio-group` | RadioGroup, RadioGroupItem |
32
+ | `tabs` | Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants |
33
+ | `accordion` | Accordion, AccordionItem, AccordionTrigger, AccordionContent |
34
+ | `alert` | Alert, AlertTitle, AlertDescription |
35
+ | `badge` | Badge, badgeVariants |
36
+ | `checkbox` | Checkbox |
37
+ | `dialog` | Dialog, DialogTrigger, DialogClose, DialogPortal, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription |
38
+ | `label` | Label |
39
+ | `popover` | Popover, PopoverTrigger, PopoverAnchor, PopoverClose, PopoverContent, PopoverHeader, PopoverTitle, PopoverDescription |
40
+ | `progress` | Progress |
41
+ | `separator` | Separator |
42
+ | `skeleton` | Skeleton |
43
+ | `slider` | Slider |
44
+ | `switch` | Switch |
45
+ | `textarea` | Textarea |
46
+ | `tooltip` | TooltipProvider, Tooltip, TooltipTrigger, TooltipContent |
47
+ | `command-menu` | CommandMenuRoot, CommandMenuTrigger, CommandMenuContent, CommandMenuItem, CommandMenuCheckboxItem, CommandMenuRadioItem, CommandMenuRadioGroup, CommandMenuGroup, CommandMenuLabel, CommandMenuSeparator, CommandMenuSub, CommandMenuSubTrigger, CommandMenuSubContent |
48
+ | `menubar` | Menubar, MenubarMenu, MenubarGroup, MenubarLabel, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, MenubarShortcut, MenubarTrigger, MenubarContent, MenubarItem, MenubarCheckboxItem, MenubarSeparator |
49
+
50
+ React and React DOM are peers restricted to major 19. File-by-file TypeScript
51
+ emit preserves client boundaries. Button, Input, Alert, Badge, Skeleton and
52
+ Textarea can render in a server page; interactive families are client
53
+ boundaries. Modules do not import Next, Payload, SDK, private contracts or Web
54
+ aliases. React is not bundled.
55
+
56
+ The components supply presentation and Radix interaction, not form state,
57
+ validation or authentication. Associate labels with `htmlFor`, and supporting
58
+ copy/errors with `aria-describedby` and `aria-invalid`. FieldError deduplicates
59
+ messages and announces them with `role="alert"`; it does not wire those IDs.
60
+ Field supports vertical, horizontal and responsive composition. Tabs supports
61
+ horizontal/vertical orientation, the default segmented tray, the line variant
62
+ and the existing `visual="compact"` trigger style.
63
+
64
+ Checkbox supports checked, unchecked and indeterminate states. Slider accepts
65
+ `thumbLabels` for distinct range-thumb names; shared labels remain associated
66
+ with each thumb. Progress clamps finite values and treats absent/non-finite
67
+ values as indeterminate. Skeleton is decorative. Select is a Radix single
68
+ select, and CommandMenu exposes dropdown/context menus rather than a searchable
69
+ command palette. Dialog/Popover/Tooltip retain Radix focus and dismissal
70
+ behavior. Use their triggers with an accessible name; icon-only controls need
71
+ an explicit label. `DialogContent` accepts `closeLabel` for the built-in close
72
+ button (default `닫기`); `showCloseButton={false}` omits that button while
73
+ preserving Escape dismissal. Button has no `asChild` or built-in loading state.
74
+
75
+ ## Dashboard and SaaS composition
76
+
77
+ Start with `Getting started` and `Recipes` in the package catalogue on port 6008. Copy the desired AppShell, DataList or SettingsForm source and
78
+ `recipes.css` from [`apps/design-system/recipes`](../../../apps/design-system/recipes/README.md)
79
+ into your application. These are copyable compositions, not additional package
80
+ exports. They use React, public UI subpaths and explicit CSS, without Next,
81
+ Web aliases, Tailwind generation, authentication or a data-provider framework.
82
+ The application supplies navigation, data and async persistence.
83
+
84
+ Web's `Pages` / `Proposals` folders on port 6007 retain the broader local
85
+ settings, list/detail, account and plan explorations. They are Web examples;
86
+ use the 6008 recipes as the portable starting point.
87
+
88
+ Keep visible labels and connect descriptions/errors with `htmlFor`,
89
+ `aria-describedby` and `aria-invalid`. `Field` supplies layout, not form state
90
+ or validation. Supporting text has no automatic relationship to a control.
91
+ The copyable recipe stylesheet explicitly adds field/content spacing; the
92
+ catalogue's private presentation helper is not part of the package. Use `RadioGroup` for a single choice, `Checkbox` for independent
93
+ choices, and `Switch` for an immediate on/off setting. Default Input, Select
94
+ and Button heights align at 32px; compact Button/Select sizes are 28px. Let
95
+ long labels wrap and use responsive Field layout where labels need more room.
96
+
97
+ Tabs use a compact segmented tray by default; `variant="line"` and vertical
98
+ orientation support denser settings/navigation. All interactive primitives keep
99
+ visible keyboard focus. Typography remains inherited from the consumer.
100
+
101
+ ## Styles, themes and overrides
102
+
103
+ Import `@01.software/ui/styles.css` once from your application stylesheet or
104
+ layout. No Tailwind setup, package-source scan, global reset or font download
105
+ is required. The application owns document typography and root size. Set
106
+ `data-theme="dark"` on the document root for dark mode so portalled surfaces
107
+ inherit it. A theme only on a subtree does not reach body portals.
108
+
109
+ The stylesheet supplies the implementations' utility classes, scoped control
110
+ and heading defaults, and Radix enter/exit motion. Reduced motion removes
111
+ scale/height travel while preserving opacity feedback. The `--ui-surface` token gives portalled menus and dialogs a raised neutral
112
+ surface in dark mode; consumers can override it alongside the existing palette.
113
+ Public theme tokens are
114
+ `--foreground`, `--background`, `--muted-foreground`, `--border`,
115
+ `--destructive`, `--paper`, `--ink` and `--ink-muted`. Token names and default
116
+ states are subject to semver.
117
+
118
+ This is a global stylesheet with unprefixed utility/token names; coexistence
119
+ with another system defining the same names is outside the support boundary.
120
+ Its layer order is `theme`, `base`, `components`, `utilities` (Tailwind may also
121
+ emit a `properties` initialization layer). Web loads the distribution CSS
122
+ before its own utilities and excludes package source from its Tailwind scan.
123
+
124
+ `className` uses clsx and tailwind-merge. Classes absent from the implementations
125
+ need consumer-owned CSS; an arbitrary new Tailwind class string does not
126
+ produce a utility. State-selector conflicts are governed by the CSS cascade.
127
+ Load overrides later in the same layer, in a later declared layer, or use
128
+ unlayered CSS targeting the component data-slot/state. The catalogue builds
129
+ its example-only layout utilities separately from the shipped stylesheet.
130
+
131
+ ## Verification and publication
132
+
133
+ `corepack pnpm --filter @01.software/ui test` builds JS, declarations and CSS,
134
+ checks all subpaths and import closure, client boundaries, SSR semantics and
135
+ the reset/font/layer boundary. The catalogue at loopback port 6008 adds state,
136
+ responsive, theme and keyboard examples. These checks do not establish full
137
+ accessibility, authenticated workflows or publication.
138
+
139
+ A packed external Next consumer without Tailwind/global reset verifies the
140
+ actual distribution, including portal styles and interaction. Evidence is
141
+ bound to its tarball and source inputs; supported peers do not claim a broader
142
+ framework/browser matrix.
143
+
144
+ Consult `package.json` for the repository package version and `.changeset/` for
145
+ pending release intent. Prepare production versions through the ordinary
146
+ Changesets process. Registration, preparation and registry availability are
147
+ separate states; repository metadata alone does not establish npm publication. The
148
+ final trusted Actions artifact needs its own fresh consumer check before
149
+ publication, as required by the [release guide](../../../docs/packages/release.md).
150
+ Historical `0.0.0` extraction evidence does not replace that gate.
151
+
152
+ LICENSE and THIRD_PARTY_NOTICES.md contain the existing MIT distribution and
153
+ shadcn/Tailwind attribution. Consumer-installed peers/dependencies retain their
154
+ licenses. Web fonts are not distributed. Source/tag evidence is not an npm
155
+ provenance attestation for this private repository.
@@ -0,0 +1,89 @@
1
+ # Third-party notices
2
+
3
+ The six primitives were extracted without source/API/CSS changes from the Web
4
+ implementation in #4419. The Field family and Radix wrapper/data-slot patterns
5
+ retain adaptations of shadcn/ui; its upstream notice is preserved below.
6
+ Web-specific classes and behavior are retained. This attribution does not
7
+ claim the current upstream main revision was the original imported revision.
8
+
9
+ The precompiled stylesheet includes selected Tailwind CSS utilities and
10
+ custom-property initialization. Tailwind's MIT notice is preserved below.
11
+ No Web fonts, reset or page layout is distributed.
12
+
13
+ ## Source and compiled CSS notices
14
+
15
+ ### shadcn-ui
16
+
17
+ Official license: https://raw.githubusercontent.com/shadcn-ui/ui/main/LICENSE.md
18
+
19
+ ```text
20
+ MIT License
21
+
22
+ Copyright (c) 2023 shadcn
23
+
24
+ Permission is hereby granted, free of charge, to any person obtaining a copy
25
+ of this software and associated documentation files (the "Software"), to deal
26
+ in the Software without restriction, including without limitation the rights
27
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28
+ copies of the Software, and to permit persons to whom the Software is
29
+ furnished to do so, subject to the following conditions:
30
+
31
+ The above copyright notice and this permission notice shall be included in all
32
+ copies or substantial portions of the Software.
33
+
34
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
40
+ SOFTWARE.
41
+ ```
42
+
43
+ ### tailwindcss
44
+
45
+ Official license: https://raw.githubusercontent.com/tailwindlabs/tailwindcss/v4.3.0/LICENSE
46
+
47
+ ```text
48
+ MIT License
49
+
50
+ Copyright (c) Tailwind Labs, Inc.
51
+
52
+ Permission is hereby granted, free of charge, to any person obtaining a copy
53
+ of this software and associated documentation files (the "Software"), to deal
54
+ in the Software without restriction, including without limitation the rights
55
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
56
+ copies of the Software, and to permit persons to whom the Software is
57
+ furnished to do so, subject to the following conditions:
58
+
59
+ The above copyright notice and this permission notice shall be included in all
60
+ copies or substantial portions of the Software.
61
+
62
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
63
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
64
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
66
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
67
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
68
+ SOFTWARE.
69
+ ```
70
+
71
+ ## External runtime dependencies
72
+
73
+ These packages are imported, not bundled into the UI emitted modules. Their
74
+ installed distributions retain their own license files and notices. Versions
75
+ below are the lockfile-backed verification inputs, not a promise to pin
76
+ consumer resolution beyond the public dependency ranges.
77
+
78
+ | Dependency | Verified version | License | Official source |
79
+ | ------------------------ | ---------------- | ---------- | -------------------------------------------------------------- |
80
+ | class-variance-authority | 0.7.1 | Apache-2.0 | https://github.com/joe-bell/cva/blob/main/LICENSE |
81
+ | clsx | 2.1.1 | MIT | https://github.com/lukeed/clsx/blob/v2.1.1/license |
82
+ | lucide-react | 1.14.0 | ISC | https://github.com/lucide-icons/lucide/blob/main/LICENSE |
83
+ | radix-ui | 1.4.3 | MIT | https://github.com/radix-ui/primitives/blob/main/LICENSE |
84
+ | tailwind-merge | 3.5.0 | MIT | https://github.com/dcastil/tailwind-merge/blob/main/LICENSE.md |
85
+
86
+ Lucide's distribution also preserves the Feather-derived icon notices
87
+ (MIT, Copyright (c) 2013-present Cole Bemis) alongside its ISC license.
88
+ The used icons remain imports from lucide-react, with no copied SVG artwork.
89
+ React and React DOM are external peers, not bundled UI code.
@@ -0,0 +1,7 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { Accordion as AccordionPrimitive } from 'radix-ui';
3
+ declare const Accordion: import("react").ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & import("react").RefAttributes<HTMLDivElement>>;
4
+ declare function AccordionItem({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AccordionTrigger({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function AccordionContent({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,16 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Accordion as AccordionPrimitive } from 'radix-ui';
4
+ import { ChevronDown } from 'lucide-react';
5
+ import { cn } from './internal/cn.js';
6
+ const Accordion = AccordionPrimitive.Root;
7
+ function AccordionItem({ className, ...props }) {
8
+ return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn('rounded-sm', className), ...props }));
9
+ }
10
+ function AccordionTrigger({ className, children, ...props }) {
11
+ return (_jsx(AccordionPrimitive.Header, { "data-slot": "accordion-header", className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn('group hover:bg-foreground/5 flex min-h-8 flex-1 items-center justify-between gap-3 rounded-sm px-2 py-2 text-left text-xs font-medium hover:no-underline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-[var(--ink)] focus-visible:outline-solid disabled:pointer-events-none disabled:opacity-50', className), ...props, children: [children, _jsx(ChevronDown, { "aria-hidden": "true", className: "text-muted-foreground size-3 shrink-0 transition-transform group-data-[state=open]:rotate-180 motion-reduce:transition-none" })] }) }));
12
+ }
13
+ function AccordionContent({ className, children, ...props }) {
14
+ return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: "motion-collapse", ...props, children: _jsx("div", { className: cn('text-muted-foreground px-2 pt-1 pb-3 text-xs leading-relaxed', className), children: children }) }));
15
+ }
16
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,9 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const alertVariants: (props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function Alert({ className, variant, role, ...props }: ComponentProps<'div'> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
7
+ declare function AlertTitle({ className, ...props }: ComponentProps<'h3'>): import("react/jsx-runtime").JSX.Element;
8
+ declare function AlertDescription({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
9
+ export { Alert, AlertTitle, AlertDescription };
package/dist/alert.js ADDED
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from 'class-variance-authority';
3
+ import { cn } from './internal/cn.js';
4
+ const alertVariants = cva('relative grid gap-1 rounded-md p-3 text-xs [&>svg]:absolute [&>svg]:top-3 [&>svg]:left-3 [&>svg]:size-4 [&:has(>svg)]:pl-10', {
5
+ variants: {
6
+ variant: {
7
+ default: 'bg-foreground/5 text-foreground',
8
+ destructive: 'bg-destructive/10 text-destructive',
9
+ },
10
+ },
11
+ defaultVariants: { variant: 'default' },
12
+ });
13
+ function Alert({ className, variant = 'default', role, ...props }) {
14
+ return (_jsx("div", { "data-slot": "alert", role: role ?? (variant === 'destructive' ? 'alert' : 'status'), className: cn(alertVariants({ variant }), className), ...props }));
15
+ }
16
+ function AlertTitle({ className, ...props }) {
17
+ return (_jsx("h3", { "data-slot": "alert-title", className: cn('leading-relaxed font-medium', className), ...props }));
18
+ }
19
+ function AlertDescription({ className, ...props }) {
20
+ return (_jsx("div", { "data-slot": "alert-description", className: cn('leading-relaxed [&_p]:not-last:mb-2', className), ...props }));
21
+ }
22
+ export { Alert, AlertTitle, AlertDescription };
@@ -0,0 +1,9 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function Badge({ className, variant, asChild, ...props }: ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
7
+ asChild?: boolean;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export { Badge, badgeVariants };
package/dist/badge.js ADDED
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Slot } from 'radix-ui';
3
+ import { cva } from 'class-variance-authority';
4
+ import { cn } from './internal/cn.js';
5
+ const badgeVariants = cva('inline-flex min-h-5 w-fit shrink-0 items-center justify-center gap-1 rounded-sm px-1.5 py-0.5 text-[0.6875rem] leading-none font-medium whitespace-nowrap [&_svg]:size-3 [&_svg]:shrink-0 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 focus-visible:outline-[var(--ink)]', {
6
+ variants: {
7
+ variant: {
8
+ default: 'bg-foreground/10 text-foreground',
9
+ secondary: 'bg-foreground/5 text-muted-foreground',
10
+ outline: 'border border-foreground/10 text-foreground',
11
+ ghost: 'text-muted-foreground',
12
+ destructive: 'bg-destructive/10 text-destructive',
13
+ },
14
+ },
15
+ defaultVariants: { variant: 'default' },
16
+ });
17
+ function Badge({ className, variant, asChild = false, ...props }) {
18
+ const Comp = asChild ? Slot.Root : 'span';
19
+ return (_jsx(Comp, { "data-slot": "badge", "data-variant": variant ?? 'default', className: cn(badgeVariants({ variant }), className), ...props }));
20
+ }
21
+ export { Badge, badgeVariants };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, type, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants>): import("react/jsx-runtime").JSX.Element;
8
+ export { Button, buttonVariants };
package/dist/button.js ADDED
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from 'class-variance-authority';
3
+ import { cn } from './internal/cn.js';
4
+ const buttonVariants = cva("no-underline hover:no-underline inline-flex items-center justify-center gap-1 rounded-sm text-xs leading-none whitespace-nowrap transition-colors active:opacity-100 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 focus-visible:outline-[var(--ink)] disabled:pointer-events-none disabled:opacity-50", {
5
+ variants: {
6
+ variant: {
7
+ default: 'bg-[color-mix(in_oklab,var(--ink)_14%,transparent)] font-medium text-[var(--ink)] hover:bg-[color-mix(in_oklab,var(--ink)_18%,transparent)]',
8
+ secondary: 'bg-[color-mix(in_oklab,var(--ink)_8%,transparent)] text-muted-foreground hover:bg-[color-mix(in_oklab,var(--ink)_11%,transparent)] hover:text-foreground',
9
+ ghost: 'text-muted-foreground hover:bg-[color-mix(in_oklab,var(--ink)_8%,transparent)] hover:text-foreground',
10
+ },
11
+ size: {
12
+ default: 'h-8 px-3',
13
+ sm: 'h-7 px-2.5',
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ variant: 'default',
18
+ size: 'default',
19
+ },
20
+ });
21
+ function Button({ className, variant, size, type = 'button', ...props }) {
22
+ return (_jsx("button", { type: type, "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size, className })), ...props }));
23
+ }
24
+ export { Button, buttonVariants };
@@ -0,0 +1,4 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { Checkbox as CheckboxPrimitive } from 'radix-ui';
3
+ declare function Checkbox({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Checkbox };
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Checkbox as CheckboxPrimitive } from 'radix-ui';
4
+ import { Check, Minus } from 'lucide-react';
5
+ import { cn } from './internal/cn.js';
6
+ function Checkbox({ className, ...props }) {
7
+ return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer border-foreground/50 text-background aria-invalid:border-destructive aria-invalid:data-[state=checked]:border-destructive aria-invalid:data-[state=indeterminate]:border-destructive data-[state=checked]:border-foreground data-[state=checked]:bg-foreground data-[state=indeterminate]:border-foreground data-[state=indeterminate]:bg-foreground relative grid size-4 shrink-0 place-items-center rounded-sm border bg-[var(--paper)] shadow-xs transition-colors outline-none before:absolute before:-inset-1 before:content-[''] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--ink)] focus-visible:outline-solid disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:focus-visible:outline-[var(--destructive)] motion-reduce:transition-none", className), ...props, children: _jsxs(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "group/indicator grid place-items-center", children: [_jsx(Check, { "aria-hidden": "true", className: "size-3 group-data-[state=indeterminate]/indicator:hidden" }), _jsx(Minus, { "aria-hidden": "true", className: "size-3 group-data-[state=checked]/indicator:hidden" })] }) }));
8
+ }
9
+ export { Checkbox };
@@ -0,0 +1,28 @@
1
+ import { type ComponentProps, type ReactNode } from 'react';
2
+ import { DropdownMenu, ContextMenu } from 'radix-ui';
3
+ type Mode = 'dropdown' | 'context';
4
+ /** One style/selection contract, two native Radix interaction models. */
5
+ export declare function CommandMenuRoot({ mode, children, }: {
6
+ mode?: Mode;
7
+ children: ReactNode;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function CommandMenuTrigger(props: ComponentProps<typeof DropdownMenu.Trigger>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function CommandMenuContent({ className, children, ...props }: ComponentProps<typeof ContextMenu.Content>): import("react/jsx-runtime").JSX.Element;
11
+ export declare function CommandMenuItem({ className, inset, variant, ...props }: ComponentProps<typeof DropdownMenu.Item> & {
12
+ inset?: boolean;
13
+ variant?: 'default' | 'destructive';
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ export declare function CommandMenuCheckboxItem({ className, children, ...props }: ComponentProps<typeof DropdownMenu.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
16
+ export declare function CommandMenuRadioItem({ className, children, ...props }: ComponentProps<typeof DropdownMenu.RadioItem>): import("react/jsx-runtime").JSX.Element;
17
+ export declare function CommandMenuRadioGroup(props: ComponentProps<typeof DropdownMenu.RadioGroup>): import("react/jsx-runtime").JSX.Element;
18
+ export declare function CommandMenuGroup(props: ComponentProps<typeof DropdownMenu.Group>): import("react/jsx-runtime").JSX.Element;
19
+ export declare function CommandMenuLabel({ className, inset, ...props }: ComponentProps<typeof DropdownMenu.Label> & {
20
+ inset?: boolean;
21
+ }): import("react/jsx-runtime").JSX.Element;
22
+ export declare function CommandMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenu.Separator>): import("react/jsx-runtime").JSX.Element;
23
+ export declare function CommandMenuSub(props: ComponentProps<typeof DropdownMenu.Sub>): import("react/jsx-runtime").JSX.Element;
24
+ export declare function CommandMenuSubTrigger({ children, className, inset, ...props }: ComponentProps<typeof DropdownMenu.SubTrigger> & {
25
+ inset?: boolean;
26
+ }): import("react/jsx-runtime").JSX.Element;
27
+ export declare function CommandMenuSubContent({ className, ...props }: ComponentProps<typeof DropdownMenu.SubContent>): import("react/jsx-runtime").JSX.Element;
28
+ export {};
@@ -0,0 +1,69 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { createContext, useContext, } from 'react';
4
+ import { DropdownMenu, ContextMenu } from 'radix-ui';
5
+ import { Check, ChevronRight } from 'lucide-react';
6
+ import { cn } from './internal/cn.js';
7
+ import { menuItemClassName, menuContentClassName, } from './internal/menu-styles.js';
8
+ const ModeContext = createContext('dropdown');
9
+ const useParts = () => useContext(ModeContext) === 'context' ? ContextMenu : DropdownMenu;
10
+ /** One style/selection contract, two native Radix interaction models. */
11
+ export function CommandMenuRoot({ mode = 'dropdown', children, }) {
12
+ const Root = mode === 'context' ? ContextMenu.Root : DropdownMenu.Root;
13
+ return (_jsx(ModeContext.Provider, { value: mode, children: _jsx(Root, { children: children }) }));
14
+ }
15
+ export function CommandMenuTrigger(props) {
16
+ const P = useParts();
17
+ return _jsx(P.Trigger, { "data-slot": "command-menu-trigger", ...props });
18
+ }
19
+ export function CommandMenuContent({ className, children, ...props }) {
20
+ const mode = useContext(ModeContext);
21
+ const P = useParts();
22
+ const contentClass = cn(menuContentClassName, mode === 'context'
23
+ ? 'max-h-(--radix-context-menu-content-available-height)'
24
+ : 'max-h-(--radix-dropdown-menu-content-available-height)', className);
25
+ return (_jsx(P.Portal, { children: mode === 'dropdown' ? (_jsx(DropdownMenu.Content, { "data-slot": "dropdown-menu-content", align: "end", sideOffset: 4, collisionPadding: 16, className: contentClass, ...props, children: children })) : (_jsx(ContextMenu.Content, { "data-slot": "context-menu-content", collisionPadding: 16, className: contentClass, ...props, children: children })) }));
26
+ }
27
+ export function CommandMenuItem({ className, inset = false, variant = 'default', ...props }) {
28
+ const P = useParts();
29
+ return (_jsx(P.Item, { "data-slot": "command-menu-item", className: cn(menuItemClassName, inset && 'pl-7', variant === 'destructive' && 'text-destructive', className), ...props }));
30
+ }
31
+ export function CommandMenuCheckboxItem({ className, children, ...props }) {
32
+ const P = useParts();
33
+ return (_jsxs(P.CheckboxItem, { "data-slot": "command-menu-checkbox-item", className: cn(menuItemClassName, 'pl-7', className), ...props, children: [_jsx("span", { className: "absolute left-2 grid size-3.5 place-items-center", children: _jsx(P.ItemIndicator, { children: _jsx(Check, { "aria-hidden": "true", className: "size-3" }) }) }), children] }));
34
+ }
35
+ export function CommandMenuRadioItem({ className, children, ...props }) {
36
+ const P = useParts();
37
+ return (_jsxs(P.RadioItem, { "data-slot": "command-menu-radio-item", className: cn(menuItemClassName, 'pl-7', className), ...props, children: [_jsx("span", { className: "absolute left-2 grid size-3.5 place-items-center", children: _jsx(P.ItemIndicator, { children: _jsx(Check, { "aria-hidden": "true", className: "size-3" }) }) }), children] }));
38
+ }
39
+ export function CommandMenuRadioGroup(props) {
40
+ const P = useParts();
41
+ return _jsx(P.RadioGroup, { ...props });
42
+ }
43
+ export function CommandMenuGroup(props) {
44
+ const P = useParts();
45
+ return _jsx(P.Group, { ...props });
46
+ }
47
+ export function CommandMenuLabel({ className, inset, ...props }) {
48
+ const P = useParts();
49
+ return (_jsx(P.Label, { "data-slot": "command-menu-label", className: cn('text-muted-foreground px-2 py-1 text-xs', inset && 'pl-7', className), ...props }));
50
+ }
51
+ export function CommandMenuSeparator({ className, ...props }) {
52
+ const P = useParts();
53
+ return (_jsx(P.Separator, { "data-slot": "command-menu-separator", className: cn('bg-foreground/[0.06] mx-1 my-1 h-px', className), ...props }));
54
+ }
55
+ export function CommandMenuSub(props) {
56
+ const P = useParts();
57
+ return _jsx(P.Sub, { ...props });
58
+ }
59
+ export function CommandMenuSubTrigger({ children, className, inset, ...props }) {
60
+ const P = useParts();
61
+ return (_jsxs(P.SubTrigger, { "data-slot": "command-menu-sub-trigger", className: cn(menuItemClassName, 'data-[state=open]:bg-foreground/[0.08]', inset && 'pl-7', className), ...props, children: [children, _jsx(ChevronRight, { "aria-hidden": "true", className: "ml-auto size-3 shrink-0" })] }));
62
+ }
63
+ export function CommandMenuSubContent({ className, ...props }) {
64
+ const mode = useContext(ModeContext);
65
+ const P = useParts();
66
+ return (_jsx(P.Portal, { children: _jsx(P.SubContent, { "data-slot": "command-menu-sub-content", collisionPadding: 16, sideOffset: 4, className: cn(menuContentClassName, mode === 'context'
67
+ ? 'max-h-(--radix-context-menu-content-available-height)'
68
+ : 'max-h-(--radix-dropdown-menu-content-available-height)', className), ...props }) }));
69
+ }
@@ -0,0 +1,16 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { Dialog as DialogPrimitive } from 'radix-ui';
3
+ declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
6
+ declare const DialogPortal: import("react").FC<DialogPrimitive.DialogPortalProps>;
7
+ declare function DialogOverlay({ className, ...props }: ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, closeLabel, ...props }: ComponentProps<typeof DialogPrimitive.Content> & {
9
+ showCloseButton?: boolean;
10
+ closeLabel?: string;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function DialogHeader({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
13
+ declare function DialogFooter({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
14
+ declare function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
15
+ declare function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
16
+ export { Dialog, DialogTrigger, DialogClose, DialogPortal, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
package/dist/dialog.js ADDED
@@ -0,0 +1,28 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Dialog as DialogPrimitive } from 'radix-ui';
4
+ import { X } from 'lucide-react';
5
+ import { cn } from './internal/cn.js';
6
+ const Dialog = DialogPrimitive.Root;
7
+ const DialogTrigger = DialogPrimitive.Trigger;
8
+ const DialogClose = DialogPrimitive.Close;
9
+ const DialogPortal = DialogPrimitive.Portal;
10
+ function DialogOverlay({ className, ...props }) {
11
+ return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn('motion-fade fixed inset-0 z-50 bg-black/40', className), ...props }));
12
+ }
13
+ function DialogContent({ className, children, showCloseButton = true, closeLabel = '닫기', ...props }) {
14
+ return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn('motion-modal border-foreground/10 fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-lg border bg-[var(--ui-surface,var(--paper))] p-5 text-xs [overflow-wrap:anywhere] shadow-xl outline-none', className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", type: "button", "aria-label": closeLabel, className: "text-muted-foreground hover:bg-foreground/5 hover:text-foreground absolute top-3 right-3 grid size-7 place-items-center rounded-sm hover:no-underline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-[var(--ink)] focus-visible:outline-solid", children: _jsx(X, { "aria-hidden": "true", className: "size-3.5" }) }))] })] }));
15
+ }
16
+ function DialogHeader({ className, ...props }) {
17
+ return (_jsx("div", { "data-slot": "dialog-header", className: cn('grid gap-1.5 pr-6', className), ...props }));
18
+ }
19
+ function DialogFooter({ className, ...props }) {
20
+ return (_jsx("div", { "data-slot": "dialog-footer", className: cn('flex flex-wrap justify-end gap-2', className), ...props }));
21
+ }
22
+ function DialogTitle({ className, ...props }) {
23
+ return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn('text-sm font-semibold', className), ...props }));
24
+ }
25
+ function DialogDescription({ className, ...props }) {
26
+ return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn('text-muted-foreground leading-relaxed', className), ...props }));
27
+ }
28
+ export { Dialog, DialogTrigger, DialogClose, DialogPortal, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -0,0 +1,24 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import { Label } from './internal/label.js';
3
+ declare function FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>): import("react/jsx-runtime").JSX.Element;
4
+ declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<'legend'> & {
5
+ variant?: 'legend' | 'label';
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
8
+ declare const fieldVariants: (props?: ({
9
+ orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
+ declare function Field({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
12
+ declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
13
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
14
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
15
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
16
+ declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<'div'> & {
17
+ children?: React.ReactNode;
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<'div'> & {
20
+ errors?: Array<{
21
+ message?: string;
22
+ } | undefined>;
23
+ }): import("react/jsx-runtime").JSX.Element | null;
24
+ export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };