@plumeria/headlessui 14.1.2 → 14.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.
package/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # @plumeria/headlessui
2
+
3
+ ![License](https://img.shields.io/badge/License-MIT-10B981)
4
+ ![npm](https://img.shields.io/npm/v/@plumeria/headlessui?&color=10B981)
5
+
6
+ Accessible UI component wrappers built on [Radix UI](https://www.radix-ui.com/) primitives, designed to work seamlessly with Plumeria's `styleName` abstraction layer.
7
+
8
+ Each component is a pure passthrough — it forwards refs and spreads props onto the underlying Radix primitive. `styleName` is compiled to `className`/`style` at the call site before the component runs, so no Plumeria-specific logic is needed inside the components.
9
+
10
+ ## Documentation
11
+
12
+ Read the [documentation](https://plumeria.dev/docs/api-reference/components/headlessui) for more details.
13
+
14
+ ## Installation
15
+
16
+ ```sh
17
+ pnpm i @plumeria/headlessui
18
+ ```
19
+
20
+ > **Note:** `@plumeria/core` and a bundler plugin are required. See the [Installation guide](https://plumeria.dev/docs/getting-started/installation).
21
+
22
+ ## Example
23
+
24
+ ```tsx
25
+ import * as css from '@plumeria/core';
26
+ import {
27
+ Accordion,
28
+ AccordionItem,
29
+ AccordionHeader,
30
+ AccordionTrigger,
31
+ AccordionContent,
32
+ } from '@plumeria/headlessui';
33
+
34
+ const styles = css.create({
35
+ root: {
36
+ width: '100%',
37
+ overflow: 'hidden',
38
+ border: '1px solid #e4e4e7',
39
+ borderRadius: '8px',
40
+ },
41
+ trigger: {
42
+ display: 'flex',
43
+ flex: 1,
44
+ alignItems: 'center',
45
+ justifyContent: 'space-between',
46
+ padding: '14px 18px',
47
+ fontSize: '14px',
48
+ fontWeight: '600',
49
+ cursor: 'pointer',
50
+ backgroundColor: 'transparent',
51
+ border: 'none',
52
+ },
53
+ content: {
54
+ padding: '14px 18px',
55
+ fontSize: '13.5px',
56
+ borderTop: '1px solid #e4e4e7',
57
+ },
58
+ });
59
+
60
+ export const FAQ = () => (
61
+ <Accordion type="single" collapsible styleName={styles.root}>
62
+ <AccordionItem value="item-1">
63
+ <AccordionHeader>
64
+ <AccordionTrigger styleName={styles.trigger}>
65
+ Is it accessible?
66
+ </AccordionTrigger>
67
+ </AccordionHeader>
68
+ <AccordionContent styleName={styles.content}>
69
+ Yes. It adheres to the WAI-ARIA design pattern.
70
+ </AccordionContent>
71
+ </AccordionItem>
72
+ </Accordion>
73
+ );
74
+ ```
75
+
76
+ ## Components
77
+
78
+ | Component group | Primitives |
79
+ |---|---|
80
+ | **Dialog** | Dialog, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose |
81
+ | **Popover** | Popover, PopoverTrigger, PopoverPortal, PopoverContent, PopoverClose, PopoverArrow, PopoverAnchor |
82
+ | **Tooltip** | TooltipProvider, Tooltip, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow |
83
+ | **Accordion** | Accordion, AccordionItem, AccordionHeader, AccordionTrigger, AccordionContent |
84
+ | **Tabs** | Tabs, TabsList, TabsTrigger, TabsContent |
85
+ | **Collapsible** | Collapsible, CollapsibleTrigger, CollapsibleContent |
86
+
87
+ ## License
88
+
89
+ Plumeria is MIT licensed.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export * from './Dialog';
2
- export * from './Popover';
3
- export * from './Tooltip';
4
- export * from './Accordion';
5
- export * from './Tabs';
6
- export * from './Collapsible';
1
+ export { Dialog, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, } from './Dialog';
2
+ export { Popover, PopoverTrigger, PopoverPortal, PopoverContent, PopoverClose, PopoverArrow, PopoverAnchor, } from './Popover';
3
+ export { TooltipProvider, Tooltip, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, } from './Tooltip';
4
+ export { Accordion, AccordionItem, AccordionHeader, AccordionTrigger, AccordionContent, } from './Accordion';
5
+ export { Tabs, TabsList, TabsTrigger, TabsContent } from './Tabs';
6
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent, } from './Collapsible';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export * from './Dialog';
2
- export * from './Popover';
3
- export * from './Tooltip';
4
- export * from './Accordion';
5
- export * from './Tabs';
6
- export * from './Collapsible';
1
+ export { Dialog, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, } from './Dialog';
2
+ export { Popover, PopoverTrigger, PopoverPortal, PopoverContent, PopoverClose, PopoverArrow, PopoverAnchor, } from './Popover';
3
+ export { TooltipProvider, Tooltip, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, } from './Tooltip';
4
+ export { Accordion, AccordionItem, AccordionHeader, AccordionTrigger, AccordionContent, } from './Accordion';
5
+ export { Tabs, TabsList, TabsTrigger, TabsContent } from './Tabs';
6
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent, } from './Collapsible';
package/package.json CHANGED
@@ -1,24 +1,32 @@
1
1
  {
2
2
  "name": "@plumeria/headlessui",
3
- "version": "14.1.2",
3
+ "version": "14.2.1",
4
4
  "description": "Headless UI components wrapper for Plumeria based on Radix UI",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",
7
- "type": "module",
8
- "main": "./dist/index.js",
9
- "types": "./dist/index.d.ts",
7
+ "funding": "https://github.com/sponsors/refirst11",
8
+ "homepage": "https://plumeria.dev",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/zss-in-js/plumeria.git",
12
+ "directory": "packages/headlessui"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/zss-in-js/plumeria/issues"
16
+ },
17
+ "sideEffects": false,
10
18
  "exports": {
11
19
  ".": {
12
20
  "types": "./dist/index.d.ts",
13
21
  "import": "./dist/index.js"
14
22
  }
15
23
  },
24
+ "type": "module",
25
+ "main": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
16
27
  "files": [
17
28
  "dist/"
18
29
  ],
19
- "scripts": {
20
- "build": "rimraf dist && tsc"
21
- },
22
30
  "dependencies": {
23
31
  "@radix-ui/react-accordion": "^1.2.3",
24
32
  "@radix-ui/react-collapsible": "^1.1.3",
@@ -28,11 +36,15 @@
28
36
  "@radix-ui/react-tooltip": "^1.1.8"
29
37
  },
30
38
  "devDependencies": {
31
- "@plumeria/core": "^14.1.2",
32
39
  "@types/react": "^19.2.14",
33
- "@types/react-dom": "^19.2.3"
40
+ "@types/react-dom": "^19.2.3",
41
+ "@plumeria/core": "^14.2.1"
34
42
  },
35
43
  "publishConfig": {
36
- "access": "public"
44
+ "access": "public",
45
+ "provenance": true
46
+ },
47
+ "scripts": {
48
+ "build": "rimraf dist && tsc"
37
49
  }
38
- }
50
+ }