@moloodev/ui 0.0.0-stage → 0.1.0

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 (93) hide show
  1. package/package.json +139 -3
  2. package/registry/components.ts +135 -0
  3. package/registry/fonts.css +81 -0
  4. package/registry/suit-OFL.txt +94 -0
  5. package/registry/wanted-sans-OFL.txt +93 -0
  6. package/src/components/ui/accordion.tsx +74 -0
  7. package/src/components/ui/alert-dialog.tsx +187 -0
  8. package/src/components/ui/alert.tsx +83 -0
  9. package/src/components/ui/aspect-ratio.tsx +22 -0
  10. package/src/components/ui/attachment.tsx +207 -0
  11. package/src/components/ui/avatar.tsx +109 -0
  12. package/src/components/ui/badge.tsx +54 -0
  13. package/src/components/ui/breadcrumb.tsx +126 -0
  14. package/src/components/ui/bubble.tsx +128 -0
  15. package/src/components/ui/button-group.tsx +103 -0
  16. package/src/components/ui/button.tsx +68 -0
  17. package/src/components/ui/calendar.tsx +222 -0
  18. package/src/components/ui/card.tsx +103 -0
  19. package/src/components/ui/carousel.tsx +242 -0
  20. package/src/components/ui/chart.tsx +398 -0
  21. package/src/components/ui/checkbox.tsx +28 -0
  22. package/src/components/ui/collapsible.tsx +40 -0
  23. package/src/components/ui/combobox.tsx +299 -0
  24. package/src/components/ui/command.tsx +218 -0
  25. package/src/components/ui/context-menu.tsx +271 -0
  26. package/src/components/ui/data-table.tsx +919 -0
  27. package/src/components/ui/date-picker.tsx +65 -0
  28. package/src/components/ui/dialog.tsx +224 -0
  29. package/src/components/ui/drawer.tsx +231 -0
  30. package/src/components/ui/dropdown-menu.tsx +268 -0
  31. package/src/components/ui/dropzone.tsx +186 -0
  32. package/src/components/ui/empty.tsx +101 -0
  33. package/src/components/ui/field.tsx +238 -0
  34. package/src/components/ui/form.tsx +83 -0
  35. package/src/components/ui/highlighted-source.tsx +200 -0
  36. package/src/components/ui/hover-card.tsx +51 -0
  37. package/src/components/ui/image-field.tsx +796 -0
  38. package/src/components/ui/input-group.tsx +149 -0
  39. package/src/components/ui/input-otp.tsx +86 -0
  40. package/src/components/ui/input-step.ts +19 -0
  41. package/src/components/ui/input.tsx +100 -0
  42. package/src/components/ui/item.tsx +201 -0
  43. package/src/components/ui/kbd.tsx +91 -0
  44. package/src/components/ui/kind-icon-glob.ts +24 -0
  45. package/src/components/ui/kind-icon-load.ts +52 -0
  46. package/src/components/ui/kind-icon-static.ts +46 -0
  47. package/src/components/ui/kind-icon.tsx +84 -0
  48. package/src/components/ui/kind-mark.tsx +65 -0
  49. package/src/components/ui/label.tsx +29 -0
  50. package/src/components/ui/marker.tsx +71 -0
  51. package/src/components/ui/menubar.tsx +277 -0
  52. package/src/components/ui/message-scroller.tsx +137 -0
  53. package/src/components/ui/message.tsx +92 -0
  54. package/src/components/ui/moloo-logo.tsx +45 -0
  55. package/src/components/ui/native-select.tsx +61 -0
  56. package/src/components/ui/navigation-menu.tsx +168 -0
  57. package/src/components/ui/outline-list.tsx +73 -0
  58. package/src/components/ui/pagination.tsx +130 -0
  59. package/src/components/ui/panel.tsx +108 -0
  60. package/src/components/ui/popover.tsx +90 -0
  61. package/src/components/ui/progress.tsx +117 -0
  62. package/src/components/ui/radio-group.tsx +38 -0
  63. package/src/components/ui/resizable.tsx +52 -0
  64. package/src/components/ui/scroll-area.tsx +54 -0
  65. package/src/components/ui/select.tsx +205 -0
  66. package/src/components/ui/separator.tsx +25 -0
  67. package/src/components/ui/sheet.tsx +140 -0
  68. package/src/components/ui/sidebar.tsx +746 -0
  69. package/src/components/ui/skeleton.tsx +13 -0
  70. package/src/components/ui/slider.tsx +52 -0
  71. package/src/components/ui/spinner.tsx +18 -0
  72. package/src/components/ui/switch.tsx +32 -0
  73. package/src/components/ui/table.tsx +116 -0
  74. package/src/components/ui/tabs.tsx +83 -0
  75. package/src/components/ui/tag-list-input.tsx +194 -0
  76. package/src/components/ui/textarea.tsx +18 -0
  77. package/src/components/ui/timeline.tsx +265 -0
  78. package/src/components/ui/toast.tsx +237 -0
  79. package/src/components/ui/toggle-group.tsx +90 -0
  80. package/src/components/ui/toggle.tsx +45 -0
  81. package/src/components/ui/tooltip.tsx +66 -0
  82. package/src/css.d.ts +1 -0
  83. package/src/hooks/use-clipboard.ts +82 -0
  84. package/src/hooks/use-mobile.ts +21 -0
  85. package/src/index.ts +106 -0
  86. package/src/kind-icon.ts +4 -0
  87. package/src/lib/format-relative-time.ts +41 -0
  88. package/src/lib/list-selection.ts +61 -0
  89. package/src/lib/utils.ts +6 -0
  90. package/src/moloo.css +360 -0
  91. package/src/styles.css +36 -0
  92. package/src/typeset.css +518 -0
  93. package/README.md +0 -3
package/package.json CHANGED
@@ -1,6 +1,142 @@
1
1
  {
2
2
  "name": "@moloodev/ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "sideEffects": [
6
+ "**/*.css"
7
+ ],
8
+ "exports": {
9
+ ".": "./src/index.ts",
10
+ "./styles.css": "./src/styles.css",
11
+ "./moloo.css": "./src/moloo.css",
12
+ "./typeset.css": "./src/typeset.css",
13
+ "./fonts.css": "./registry/fonts.css",
14
+ "./use-clipboard": "./src/hooks/use-clipboard.ts",
15
+ "./use-mobile": "./src/hooks/use-mobile.ts",
16
+ "./format-relative-time": "./src/lib/format-relative-time.ts",
17
+ "./registry": "./registry/components.ts",
18
+ "./accordion": "./src/components/ui/accordion.tsx",
19
+ "./alert": "./src/components/ui/alert.tsx",
20
+ "./alert-dialog": "./src/components/ui/alert-dialog.tsx",
21
+ "./aspect-ratio": "./src/components/ui/aspect-ratio.tsx",
22
+ "./attachment": "./src/components/ui/attachment.tsx",
23
+ "./avatar": "./src/components/ui/avatar.tsx",
24
+ "./badge": "./src/components/ui/badge.tsx",
25
+ "./breadcrumb": "./src/components/ui/breadcrumb.tsx",
26
+ "./bubble": "./src/components/ui/bubble.tsx",
27
+ "./button": "./src/components/ui/button.tsx",
28
+ "./button-group": "./src/components/ui/button-group.tsx",
29
+ "./calendar": "./src/components/ui/calendar.tsx",
30
+ "./card": "./src/components/ui/card.tsx",
31
+ "./carousel": "./src/components/ui/carousel.tsx",
32
+ "./chart": "./src/components/ui/chart.tsx",
33
+ "./checkbox": "./src/components/ui/checkbox.tsx",
34
+ "./collapsible": "./src/components/ui/collapsible.tsx",
35
+ "./combobox": "./src/components/ui/combobox.tsx",
36
+ "./command": "./src/components/ui/command.tsx",
37
+ "./context-menu": "./src/components/ui/context-menu.tsx",
38
+ "./data-table": "./src/components/ui/data-table.tsx",
39
+ "./date-picker": "./src/components/ui/date-picker.tsx",
40
+ "./dialog": "./src/components/ui/dialog.tsx",
41
+ "./drawer": "./src/components/ui/drawer.tsx",
42
+ "./dropdown-menu": "./src/components/ui/dropdown-menu.tsx",
43
+ "./dropzone": "./src/components/ui/dropzone.tsx",
44
+ "./empty": "./src/components/ui/empty.tsx",
45
+ "./field": "./src/components/ui/field.tsx",
46
+ "./form": "./src/components/ui/form.tsx",
47
+ "./highlighted-source": "./src/components/ui/highlighted-source.tsx",
48
+ "./hover-card": "./src/components/ui/hover-card.tsx",
49
+ "./image-field": "./src/components/ui/image-field.tsx",
50
+ "./input": "./src/components/ui/input.tsx",
51
+ "./input-group": "./src/components/ui/input-group.tsx",
52
+ "./input-otp": "./src/components/ui/input-otp.tsx",
53
+ "./item": "./src/components/ui/item.tsx",
54
+ "./kbd": "./src/components/ui/kbd.tsx",
55
+ "./kind-icon": "./src/kind-icon.ts",
56
+ "./label": "./src/components/ui/label.tsx",
57
+ "./marker": "./src/components/ui/marker.tsx",
58
+ "./menubar": "./src/components/ui/menubar.tsx",
59
+ "./message": "./src/components/ui/message.tsx",
60
+ "./message-scroller": "./src/components/ui/message-scroller.tsx",
61
+ "./moloo-logo": "./src/components/ui/moloo-logo.tsx",
62
+ "./native-select": "./src/components/ui/native-select.tsx",
63
+ "./navigation-menu": "./src/components/ui/navigation-menu.tsx",
64
+ "./outline-list": "./src/components/ui/outline-list.tsx",
65
+ "./pagination": "./src/components/ui/pagination.tsx",
66
+ "./panel": "./src/components/ui/panel.tsx",
67
+ "./popover": "./src/components/ui/popover.tsx",
68
+ "./progress": "./src/components/ui/progress.tsx",
69
+ "./radio-group": "./src/components/ui/radio-group.tsx",
70
+ "./resizable": "./src/components/ui/resizable.tsx",
71
+ "./scroll-area": "./src/components/ui/scroll-area.tsx",
72
+ "./select": "./src/components/ui/select.tsx",
73
+ "./separator": "./src/components/ui/separator.tsx",
74
+ "./sheet": "./src/components/ui/sheet.tsx",
75
+ "./sidebar": "./src/components/ui/sidebar.tsx",
76
+ "./skeleton": "./src/components/ui/skeleton.tsx",
77
+ "./slider": "./src/components/ui/slider.tsx",
78
+ "./spinner": "./src/components/ui/spinner.tsx",
79
+ "./switch": "./src/components/ui/switch.tsx",
80
+ "./table": "./src/components/ui/table.tsx",
81
+ "./tabs": "./src/components/ui/tabs.tsx",
82
+ "./tag-list-input": "./src/components/ui/tag-list-input.tsx",
83
+ "./textarea": "./src/components/ui/textarea.tsx",
84
+ "./timeline": "./src/components/ui/timeline.tsx",
85
+ "./toast": "./src/components/ui/toast.tsx",
86
+ "./toggle": "./src/components/ui/toggle.tsx",
87
+ "./toggle-group": "./src/components/ui/toggle-group.tsx",
88
+ "./tooltip": "./src/components/ui/tooltip.tsx",
89
+ "./list-selection": "./src/lib/list-selection.ts",
90
+ "./kind-icon-static": "./src/components/ui/kind-icon-static.ts"
91
+ },
92
+ "dependencies": {
93
+ "@base-ui/react": "^1.8.0",
94
+ "@shadcn/react": "^0.2.1",
95
+ "@tabler/icons-react": "^3.46.0",
96
+ "@tanstack/react-table": "^9.2.4",
97
+ "class-variance-authority": "^0.7.1",
98
+ "clsx": "^2.1.1",
99
+ "cmdk": "^1.1.1",
100
+ "date-fns": "^4.4.0",
101
+ "embla-carousel-react": "^8.6.0",
102
+ "input-otp": "^1.4.2",
103
+ "react-day-picker": "^10.0.1",
104
+ "react-resizable-panels": "^4.12.4",
105
+ "recharts": "3.8.0",
106
+ "tailwind-merge": "^3.6.0"
107
+ },
108
+ "peerDependencies": {
109
+ "react": "^19.0.0",
110
+ "react-dom": "^19.0.0"
111
+ },
112
+ "devDependencies": {
113
+ "@tailwindcss/node": "^4.3.3",
114
+ "@types/jsdom": "30.0.0",
115
+ "@types/node": "^24.13.3",
116
+ "@types/react": "^19.2.18",
117
+ "@types/react-dom": "^19.2.7",
118
+ "jsdom": "30.1.1",
119
+ "react": "^19.2.8",
120
+ "react-dom": "^19.2.8",
121
+ "shadcn": "^4.21.0",
122
+ "tailwindcss": "^4.3.3",
123
+ "tsx": "^4.23.13",
124
+ "typescript": "^7.0.2",
125
+ "@moloodev/platform": "0.1.0",
126
+ "@moloodev/typescript-config": "0.1.0"
127
+ },
128
+ "publishConfig": {
129
+ "access": "public"
130
+ },
131
+ "files": [
132
+ "src",
133
+ "registry",
134
+ "!src/**/*.test.ts",
135
+ "!src/**/*.test.tsx"
136
+ ],
137
+ "scripts": {
138
+ "typecheck": "tsc --noEmit",
139
+ "test": "tsx --test 'src/**/*.test.ts' 'src/**/*.test.tsx'",
140
+ "registry:build": "tsx scripts/build-registry.ts"
141
+ }
6
142
  }
@@ -0,0 +1,135 @@
1
+ export const CATEGORIES = [
2
+ "Forms & Inputs",
3
+ "Layout & Structure",
4
+ "Navigation",
5
+ "Overlays",
6
+ "Feedback & Status",
7
+ "Data Display",
8
+ ] as const
9
+
10
+ export type ComponentCategory = (typeof CATEGORIES)[number]
11
+
12
+ export type ComponentMeta = {
13
+ slug: string
14
+ title: string
15
+ description: string
16
+ category: ComponentCategory
17
+ /** Style-only docs page (utility classes, no installable component). */
18
+ styleOnly?: boolean
19
+ /** Intro note shown on a style-only page in place of installation. */
20
+ styleNote?: string
21
+ }
22
+
23
+ export const components: ComponentMeta[] = [
24
+ // Forms & Inputs
25
+ { slug: "button", title: "Button", description: "Displays a button or a component that looks like a button.", category: "Forms & Inputs" },
26
+ { slug: "button-group", title: "Button Group", description: "Groups related buttons together with consistent styling.", category: "Forms & Inputs" },
27
+ { slug: "input", title: "Input", description: "A text input for forms and user data entry.", category: "Forms & Inputs" },
28
+ { slug: "input-group", title: "Input Group", description: "Add addons, buttons, and helper content to inputs.", category: "Forms & Inputs" },
29
+ { slug: "input-otp", title: "Input OTP", description: "Accessible one-time password component with copy-paste.", category: "Forms & Inputs" },
30
+ { slug: "textarea", title: "Textarea", description: "A form textarea or a component that looks like one.", category: "Forms & Inputs" },
31
+ { slug: "highlighted-source", title: "Highlighted Source", description: "An editable source field with a syntax-highlighted overlay.", category: "Forms & Inputs" },
32
+ { slug: "tag-list-input", title: "Tag List Input", description: "An input that edits a list of strings.", category: "Forms & Inputs" },
33
+ { slug: "label", title: "Label", description: "An accessible label associated with controls.", category: "Forms & Inputs" },
34
+ { slug: "checkbox", title: "Checkbox", description: "A control that toggles between checked and not checked.", category: "Forms & Inputs" },
35
+ { slug: "radio-group", title: "Radio Group", description: "A set of checkable buttons where only one can be checked.", category: "Forms & Inputs" },
36
+ { slug: "switch", title: "Switch", description: "A control that toggles between checked and not checked.", category: "Forms & Inputs" },
37
+ { slug: "slider", title: "Slider", description: "An input where the user selects a value from a range.", category: "Forms & Inputs" },
38
+ { slug: "select", title: "Select", description: "Displays a list of options for the user to pick from.", category: "Forms & Inputs" },
39
+ { slug: "native-select", title: "Native Select", description: "A styled native HTML select element.", category: "Forms & Inputs" },
40
+ { slug: "combobox", title: "Combobox", description: "Autocomplete input with a list of suggestions.", category: "Forms & Inputs" },
41
+ { slug: "toggle", title: "Toggle", description: "A two-state button that can be either on or off.", category: "Forms & Inputs" },
42
+ { slug: "toggle-group", title: "Toggle Group", description: "A set of two-state buttons that can be toggled on or off.", category: "Forms & Inputs" },
43
+ { slug: "field", title: "Field", description: "Compose accessible form fields and grouped inputs.", category: "Forms & Inputs" },
44
+ { slug: "form", title: "Form", description: "Compose accessible forms from Form, Field, Input, and control primitives.", category: "Forms & Inputs" },
45
+ { slug: "calendar", title: "Calendar", description: "A date field component that allows selecting dates.", category: "Forms & Inputs" },
46
+ { slug: "date-picker", title: "Date Picker", description: "A date picker built from a popover and calendar.", category: "Forms & Inputs" },
47
+ { slug: "dropzone", title: "Dropzone", description: "A file drop area with drag-and-drop and click-to-select.", category: "Forms & Inputs" },
48
+ { slug: "image-field", title: "Image Field", description: "Pick, crop, and apply one image.", category: "Forms & Inputs" },
49
+
50
+ // Layout & Structure
51
+ { slug: "card", title: "Card", description: "Displays a card with header, content, and footer.", category: "Layout & Structure" },
52
+ { slug: "panel", title: "Panel", description: "A labeled region with a fixed header and a scrolling body.", category: "Layout & Structure" },
53
+ { slug: "aspect-ratio", title: "Aspect Ratio", description: "Displays content within a desired ratio.", category: "Layout & Structure" },
54
+ { slug: "separator", title: "Separator", description: "Visually or semantically separates content.", category: "Layout & Structure" },
55
+ { slug: "scroll-area", title: "Scroll Area", description: "Augments native scroll for custom, cross-browser styling.", category: "Layout & Structure" },
56
+ { slug: "table", title: "Table", description: "A responsive table component.", category: "Layout & Structure" },
57
+ { slug: "item", title: "Item", description: "Display content with media, title, description, and actions.", category: "Layout & Structure" },
58
+ { slug: "carousel", title: "Carousel", description: "A carousel with motion and swipe built using Embla.", category: "Layout & Structure" },
59
+ { slug: "resizable", title: "Resizable", description: "Accessible resizable panel groups and layouts.", category: "Layout & Structure" },
60
+
61
+ // Navigation
62
+ { slug: "breadcrumb", title: "Breadcrumb", description: "Displays the path to the current resource.", category: "Navigation" },
63
+ { slug: "navigation-menu", title: "Navigation Menu", description: "A collection of links for navigating websites.", category: "Navigation" },
64
+ { slug: "menubar", title: "Menubar", description: "A persistent menu providing quick access to commands.", category: "Navigation" },
65
+ { slug: "pagination", title: "Pagination", description: "Pagination with page navigation, next and previous links.", category: "Navigation" },
66
+ { slug: "tabs", title: "Tabs", description: "Layered sections of content displayed one at a time.", category: "Navigation" },
67
+ { slug: "sidebar", title: "Sidebar", description: "A composable, themeable and customizable sidebar.", category: "Navigation" },
68
+
69
+ // Overlays
70
+ { slug: "dialog", title: "Dialog", description: "A window overlaid on the primary window.", category: "Overlays" },
71
+ { slug: "alert-dialog", title: "Alert Dialog", description: "A modal dialog that interrupts with important content.", category: "Overlays" },
72
+ { slug: "sheet", title: "Sheet", description: "Extends Dialog to display complementary content.", category: "Overlays" },
73
+ { slug: "drawer", title: "Drawer", description: "A drawer component for React.", category: "Overlays" },
74
+ { slug: "popover", title: "Popover", description: "Displays rich content in a portal, triggered by a button.", category: "Overlays" },
75
+ { slug: "hover-card", title: "Hover Card", description: "Preview content available behind a link.", category: "Overlays" },
76
+ { slug: "tooltip", title: "Tooltip", description: "A popup that displays information related to an element.", category: "Overlays" },
77
+ { slug: "dropdown-menu", title: "Dropdown Menu", description: "Displays a menu triggered by a button.", category: "Overlays" },
78
+ { slug: "context-menu", title: "Context Menu", description: "Displays a menu of actions triggered by a right click.", category: "Overlays" },
79
+ { slug: "command", title: "Command", description: "Command menu for search and quick actions.", category: "Overlays" },
80
+
81
+ // Feedback & Status
82
+ { slug: "alert", title: "Alert", description: "Displays a callout for user attention.", category: "Feedback & Status" },
83
+ { slug: "badge", title: "Badge", description: "Displays a badge or a component that looks like one.", category: "Feedback & Status" },
84
+ { slug: "progress", title: "Progress", description: "An indicator showing the completion progress of a task.", category: "Feedback & Status" },
85
+ { slug: "skeleton", title: "Skeleton", description: "Show a placeholder while content is loading.", category: "Feedback & Status" },
86
+ { slug: "spinner", title: "Spinner", description: "An indicator that shows a loading state.", category: "Feedback & Status" },
87
+ { slug: "toast", title: "Toast", description: "Toast notifications built on Base UI Toast.", category: "Feedback & Status" },
88
+ { slug: "empty", title: "Empty", description: "Display an empty state.", category: "Feedback & Status" },
89
+
90
+ // Data Display
91
+ { slug: "avatar", title: "Avatar", description: "An image element with a fallback for representing a user.", category: "Data Display" },
92
+ { slug: "accordion", title: "Accordion", description: "A stacked set of headings that reveal a section of content.", category: "Data Display" },
93
+ { slug: "collapsible", title: "Collapsible", description: "An interactive component that expands and collapses a panel.", category: "Data Display" },
94
+ { slug: "kbd", title: "Kbd", description: "Display textual user input from a keyboard.", category: "Data Display" },
95
+ { slug: "kind-icon", title: "Kind Icon", description: "Lazily loads any Tabler icon by kebab-case name for asset kinds.", category: "Data Display" },
96
+ { slug: "kind-mark", title: "Kind Mark", description: "Coloured kind tile with a Tabler glyph. Props match platform kind values.", category: "Data Display" },
97
+ { slug: "chart", title: "Chart", description: "Charts built with Recharts in the moloo palette.", category: "Data Display" },
98
+ { slug: "data-table", title: "Data Table", description: "Headless table from TanStack Table createTableHook, with sorting, row selection, and pagination.", category: "Data Display" },
99
+ { slug: "bubble", title: "Bubble", description: "Chat bubble content with variants for messages.", category: "Data Display" },
100
+ { slug: "message", title: "Message", description: "Compose chat messages with alignment and metadata.", category: "Data Display" },
101
+ { slug: "message-scroller", title: "Message Scroller", description: "Scroll container helpers for chat threads.", category: "Data Display" },
102
+ { slug: "attachment", title: "Attachment", description: "File and media attachment chips for chat inputs.", category: "Data Display" },
103
+ { slug: "marker", title: "Marker", description: "Inline marker / highlight for composed content.", category: "Data Display" },
104
+ { slug: "outline-list", title: "Outline List", description: "A flat list of labeled rows, indented by level.", category: "Data Display" },
105
+ { slug: "timeline", title: "Timeline", description: "A vertical list of events along a rail.", category: "Data Display" },
106
+ { slug: "moloo-logo", title: "Moloo Logo", description: "The moloo mark. Three primary tiles and one tilted accent tile.", category: "Data Display" },
107
+ ]
108
+
109
+ export const componentsBySlug: Record<string, ComponentMeta> = Object.fromEntries(
110
+ components.map((c) => [c.slug, c])
111
+ )
112
+
113
+ export type ComponentGroup = {
114
+ category: ComponentCategory
115
+ items: readonly ComponentMeta[]
116
+ }
117
+
118
+ export function componentsByCategory(): readonly ComponentGroup[] {
119
+ return CATEGORIES.flatMap((category) => {
120
+ const items = components
121
+ .filter((component) => component.category === category)
122
+ .sort((a, b) => a.title.localeCompare(b.title, "en"))
123
+ return items.length === 0 ? [] : [{ category, items }]
124
+ })
125
+ }
126
+
127
+ export function categoryAnchorId(category: ComponentCategory): string {
128
+ return category
129
+ .toLowerCase()
130
+ .replaceAll("&", "")
131
+ .replaceAll(/[^a-z0-9]+/g, "-")
132
+ .replaceAll(/^-|-$/g, "")
133
+ }
134
+
135
+ export const REGISTRY_BASE_URL = "https://ui.moloo.dev"
@@ -0,0 +1,81 @@
1
+ /* Wanted Sans + SUIT (SIL OFL 1.1).
2
+ * Faces are served from the moloo registry host. For offline use, copy
3
+ * public/fonts/{wanted,suit}/*.woff2 into your app and point these URLs at
4
+ * /fonts/... instead. License texts: /fonts/wanted/OFL.txt, /fonts/suit/OFL.txt
5
+ */
6
+ @font-face {
7
+ font-family: "WantedSans";
8
+ src: url("https://ui.moloo.dev/fonts/wanted/WantedSans-Regular.woff2")
9
+ format("woff2");
10
+ font-weight: 400;
11
+ font-style: normal;
12
+ font-display: swap;
13
+ }
14
+ @font-face {
15
+ font-family: "WantedSans";
16
+ src: url("https://ui.moloo.dev/fonts/wanted/WantedSans-Medium.woff2")
17
+ format("woff2");
18
+ font-weight: 500;
19
+ font-style: normal;
20
+ font-display: swap;
21
+ }
22
+ @font-face {
23
+ font-family: "WantedSans";
24
+ src: url("https://ui.moloo.dev/fonts/wanted/WantedSans-SemiBold.woff2")
25
+ format("woff2");
26
+ font-weight: 600;
27
+ font-style: normal;
28
+ font-display: swap;
29
+ }
30
+ @font-face {
31
+ font-family: "WantedSans";
32
+ src: url("https://ui.moloo.dev/fonts/wanted/WantedSans-Bold.woff2")
33
+ format("woff2");
34
+ font-weight: 700;
35
+ font-style: normal;
36
+ font-display: swap;
37
+ }
38
+ @font-face {
39
+ font-family: "WantedSans";
40
+ src: url("https://ui.moloo.dev/fonts/wanted/WantedSans-ExtraBold.woff2")
41
+ format("woff2");
42
+ font-weight: 800;
43
+ font-style: normal;
44
+ font-display: swap;
45
+ }
46
+
47
+ @font-face {
48
+ font-family: "SUIT";
49
+ src: url("https://ui.moloo.dev/fonts/suit/SUIT-Regular.woff2") format("woff2");
50
+ font-weight: 400;
51
+ font-style: normal;
52
+ font-display: swap;
53
+ }
54
+ @font-face {
55
+ font-family: "SUIT";
56
+ src: url("https://ui.moloo.dev/fonts/suit/SUIT-Medium.woff2") format("woff2");
57
+ font-weight: 500;
58
+ font-style: normal;
59
+ font-display: swap;
60
+ }
61
+ @font-face {
62
+ font-family: "SUIT";
63
+ src: url("https://ui.moloo.dev/fonts/suit/SUIT-SemiBold.woff2") format("woff2");
64
+ font-weight: 600;
65
+ font-style: normal;
66
+ font-display: swap;
67
+ }
68
+ @font-face {
69
+ font-family: "SUIT";
70
+ src: url("https://ui.moloo.dev/fonts/suit/SUIT-Bold.woff2") format("woff2");
71
+ font-weight: 700;
72
+ font-style: normal;
73
+ font-display: swap;
74
+ }
75
+ @font-face {
76
+ font-family: "SUIT";
77
+ src: url("https://ui.moloo.dev/fonts/suit/SUIT-ExtraBold.woff2") format("woff2");
78
+ font-weight: 800;
79
+ font-style: normal;
80
+ font-display: swap;
81
+ }
@@ -0,0 +1,94 @@
1
+ Copyright (c) 2022, SUNN (http://sun.fo/suit),
2
+ with Reserved Font Name SUIT.
3
+
4
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
5
+ This license is copied below, and is also available with a FAQ at:
6
+ https://scripts.sil.org/OFL
7
+
8
+
9
+ -----------------------------------------------------------
10
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11
+ -----------------------------------------------------------
12
+
13
+ PREAMBLE
14
+ The goals of the Open Font License (OFL) are to stimulate worldwide
15
+ development of collaborative font projects, to support the font creation
16
+ efforts of academic and linguistic communities, and to provide a free and
17
+ open framework in which fonts may be shared and improved in partnership
18
+ with others.
19
+
20
+ The OFL allows the licensed fonts to be used, studied, modified and
21
+ redistributed freely as long as they are not sold by themselves. The
22
+ fonts, including any derivative works, can be bundled, embedded,
23
+ redistributed and/or sold with any software provided that any reserved
24
+ names are not used by derivative works. The fonts and derivatives,
25
+ however, cannot be released under any other type of license. The
26
+ requirement for fonts to remain under this license does not apply
27
+ to any document created using the fonts or their derivatives.
28
+
29
+ DEFINITIONS
30
+ "Font Software" refers to the set of files released by the Copyright
31
+ Holder(s) under this license and clearly marked as such. This may
32
+ include source files, build scripts and documentation.
33
+
34
+ "Reserved Font Name" refers to any names specified as such after the
35
+ copyright statement(s).
36
+
37
+ "Original Version" refers to the collection of Font Software components as
38
+ distributed by the Copyright Holder(s).
39
+
40
+ "Modified Version" refers to any derivative made by adding to, deleting,
41
+ or substituting -- in part or in whole -- any of the components of the
42
+ Original Version, by changing formats or by porting the Font Software to a
43
+ new environment.
44
+
45
+ "Author" refers to any designer, engineer, programmer, technical
46
+ writer or other person who contributed to the Font Software.
47
+
48
+ PERMISSION & CONDITIONS
49
+ Permission is hereby granted, free of charge, to any person obtaining
50
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
51
+ redistribute, and sell modified and unmodified copies of the Font
52
+ Software, subject to the following conditions:
53
+
54
+ 1) Neither the Font Software nor any of its individual components,
55
+ in Original or Modified Versions, may be sold by itself.
56
+
57
+ 2) Original or Modified Versions of the Font Software may be bundled,
58
+ redistributed and/or sold with any software, provided that each copy
59
+ contains the above copyright notice and this license. These can be
60
+ included either as stand-alone text files, human-readable headers or
61
+ in the appropriate machine-readable metadata fields within text or
62
+ binary files as long as those fields can be easily viewed by the user.
63
+
64
+ 3) No Modified Version of the Font Software may use the Reserved Font
65
+ Name(s) unless explicit written permission is granted by the corresponding
66
+ Copyright Holder. This restriction only applies to the primary font name as
67
+ presented to the users.
68
+
69
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70
+ Software shall not be used to promote, endorse or advertise any
71
+ Modified Version, except to acknowledge the contribution(s) of the
72
+ Copyright Holder(s) and the Author(s) or with their explicit written
73
+ permission.
74
+
75
+ 5) The Font Software, modified or unmodified, in part or in whole,
76
+ must be distributed entirely under this license, and must not be
77
+ distributed under any other license. The requirement for fonts to
78
+ remain under this license does not apply to any document created
79
+ using the Font Software.
80
+
81
+ TERMINATION
82
+ This license becomes null and void if any of the above conditions are
83
+ not met.
84
+
85
+ DISCLAIMER
86
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2024 The Wanted Sans Project Authors (https://github.com/wanteddev/wanted-sans)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,74 @@
1
+ import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion"
2
+
3
+ import { cn } from "../../lib/utils"
4
+ import { IconChevronDown } from "@tabler/icons-react"
5
+
6
+ function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
7
+ return (
8
+ <AccordionPrimitive.Root
9
+ data-slot="accordion"
10
+ className={cn("flex w-full flex-col", className)}
11
+ {...props}
12
+ />
13
+ )
14
+ }
15
+
16
+ function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {
17
+ return (
18
+ <AccordionPrimitive.Item
19
+ data-slot="accordion-item"
20
+ className={cn("not-last:border-b", className)}
21
+ {...props}
22
+ />
23
+ )
24
+ }
25
+
26
+ function AccordionTrigger({
27
+ className,
28
+ children,
29
+ ...props
30
+ }: AccordionPrimitive.Trigger.Props) {
31
+ return (
32
+ <AccordionPrimitive.Header className="flex">
33
+ <AccordionPrimitive.Trigger
34
+ data-slot="accordion-trigger"
35
+ className={cn(
36
+ "moloo-focus group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border-2 border-transparent py-2.5 text-left font-display text-sm font-bold tracking-[-0.02em] transition-all outline-none hover:underline aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
37
+ className
38
+ )}
39
+ {...props}
40
+ >
41
+ {children}
42
+ <IconChevronDown
43
+ data-slot="accordion-trigger-icon"
44
+ className="pointer-events-none shrink-0 transition-transform duration-200 group-aria-expanded/accordion-trigger:rotate-180"
45
+ />
46
+ </AccordionPrimitive.Trigger>
47
+ </AccordionPrimitive.Header>
48
+ )
49
+ }
50
+
51
+ function AccordionContent({
52
+ className,
53
+ children,
54
+ ...props
55
+ }: AccordionPrimitive.Panel.Props) {
56
+ return (
57
+ <AccordionPrimitive.Panel
58
+ data-slot="accordion-content"
59
+ className="overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up"
60
+ {...props}
61
+ >
62
+ <div
63
+ className={cn(
64
+ "h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
65
+ className
66
+ )}
67
+ >
68
+ {children}
69
+ </div>
70
+ </AccordionPrimitive.Panel>
71
+ )
72
+ }
73
+
74
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }