@dreamtree-org/twreact-ui 1.3.1 → 1.3.2
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/DESIGN.md +2 -2
- package/README.md +80 -1
- package/ai-skills/dreamtree-ui.md +40 -3
- package/charts/package.json +5 -0
- package/dist/_shared/cn-DPPQUJu1.js +138 -0
- package/dist/ai-schema.json +638 -0
- package/dist/charts/index.d.ts +9 -0
- package/dist/charts/index.d.ts.map +1 -0
- package/dist/charts/index.js +769 -0
- package/dist/components/charts/AreaChart.d.ts +4 -0
- package/dist/components/charts/AreaChart.d.ts.map +1 -0
- package/dist/components/charts/BarChart.d.ts +4 -0
- package/dist/components/charts/BarChart.d.ts.map +1 -0
- package/dist/components/charts/CartesianChart.d.ts +5 -0
- package/dist/components/charts/CartesianChart.d.ts.map +1 -0
- package/dist/components/charts/ChartFrame.d.ts +18 -0
- package/dist/components/charts/ChartFrame.d.ts.map +1 -0
- package/dist/components/charts/DonutChart.d.ts +4 -0
- package/dist/components/charts/DonutChart.d.ts.map +1 -0
- package/dist/components/charts/LineChart.d.ts +4 -0
- package/dist/components/charts/LineChart.d.ts.map +1 -0
- package/dist/components/charts/Sparkline.d.ts +5 -0
- package/dist/components/charts/Sparkline.d.ts.map +1 -0
- package/dist/components/charts/chartTheme.d.ts +26 -0
- package/dist/components/charts/chartTheme.d.ts.map +1 -0
- package/dist/components/rich-text/RichTextEditor.d.ts +4 -0
- package/dist/components/rich-text/RichTextEditor.d.ts.map +1 -0
- package/dist/components/rich-text/RichTextToolbar.d.ts +219 -0
- package/dist/components/rich-text/RichTextToolbar.d.ts.map +1 -0
- package/dist/esm/charts/index.js +5 -0
- package/dist/esm/components/charts/AreaChart.js +16 -0
- package/dist/esm/components/charts/BarChart.js +16 -0
- package/dist/esm/components/charts/CartesianChart.js +250 -0
- package/dist/esm/components/charts/ChartFrame.js +170 -0
- package/dist/esm/components/charts/DonutChart.js +119 -0
- package/dist/esm/components/charts/LineChart.js +16 -0
- package/dist/esm/components/charts/Sparkline.js +110 -0
- package/dist/esm/components/charts/chartTheme.js +109 -0
- package/dist/esm/components/rich-text/RichTextEditor.js +244 -0
- package/dist/esm/components/rich-text/RichTextToolbar.js +397 -0
- package/dist/esm/rich-text/index.js +1 -0
- package/dist/index.css +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +17 -4
- package/dist/index.js +17 -4
- package/dist/rich-text/index.d.ts +5 -0
- package/dist/rich-text/index.d.ts.map +1 -0
- package/dist/rich-text/index.js +654 -0
- package/dist/tokens/brands/studio.css +14 -0
- package/dist/tokens/brands/studio.json +20 -0
- package/dist/types/charts.d.ts +97 -0
- package/dist/types/charts.d.ts.map +1 -0
- package/dist/types/rich-text.d.ts +50 -0
- package/dist/types/rich-text.d.ts.map +1 -0
- package/doc/README.md +13 -0
- package/mcp/catalog.snapshot.json +1009 -3
- package/mcp/server-core.mjs +30 -1
- package/package.json +38 -2
- package/rich-text/package.json +5 -0
- package/tokens/brands/studio.json +20 -0
package/DESIGN.md
CHANGED
|
@@ -41,7 +41,7 @@ rounded:
|
|
|
41
41
|
spacing:
|
|
42
42
|
grid: 4px
|
|
43
43
|
steps: [4, 8, 12, 16, 20, 24, 32]
|
|
44
|
-
brands: [default, practicepro]
|
|
44
|
+
brands: [default, practicepro, studio]
|
|
45
45
|
---
|
|
46
46
|
|
|
47
47
|
<!-- Generated by twreact-ui scripts/build-tokens.mjs from tokens/tokens.json. Edit the tokens or this generator, not this file. -->
|
|
@@ -76,7 +76,7 @@ Every Dreamtree product screen, and every prototype generated by Dreamtree Studi
|
|
|
76
76
|
|
|
77
77
|
- **One accent per screen.** `primary` marks the primary action, the active nav item, the current step and progress. Red (`error`) is only for errors, overdue items and destructive actions.
|
|
78
78
|
- Badge and status fills use the 100 step with 800 text, which keeps contrast at or above 4.5:1.
|
|
79
|
-
- Products change their look with a **brand file** (`tokens/brands/<product>.json`), which overrides `--dt-*` variables. Brands available: `default`, `practicepro`.
|
|
79
|
+
- Products change their look with a **brand file** (`tokens/brands/<product>.json`), which overrides `--dt-*` variables. Brands available: `default`, `practicepro`, `studio`.
|
|
80
80
|
|
|
81
81
|
## 3. Type, space and shape
|
|
82
82
|
|
package/README.md
CHANGED
|
@@ -79,7 +79,8 @@ bundle. `import { Button } from '@dreamtree-org/twreact-ui'` costs about 8 KB gz
|
|
|
79
79
|
100 KB. `require()`, Jest and plain Node keep getting the CommonJS build (`dist/index.js`).
|
|
80
80
|
|
|
81
81
|
There are no per-component subpaths such as `@dreamtree-org/twreact-ui/button`. The root import
|
|
82
|
-
already tree-shakes.
|
|
82
|
+
already tree-shakes. The only subpaths are the two **optional entry points** below, which exist
|
|
83
|
+
because they need an extra dependency. Existing file paths (`dist/index.css`, `dist/tokens/*`, `tokens/*`,
|
|
83
84
|
`dist/index.esm.js`, `package.json`, …) still resolve through the `exports` map.
|
|
84
85
|
|
|
85
86
|
### Next.js App Router
|
|
@@ -103,6 +104,27 @@ Server Component to these Client Components. You also cannot dot into a client e
|
|
|
103
104
|
In Vite, Rollup can log `Module level directives cause errors when bundled, "use client" … was ignored`.
|
|
104
105
|
This message is harmless. To hide it, filter `MODULE_LEVEL_DIRECTIVE` in `build.rollupOptions.onwarn`.
|
|
105
106
|
|
|
107
|
+
### Optional entry points: charts and rich text
|
|
108
|
+
|
|
109
|
+
Charts and the rich-text editor wrap third-party libraries, so they live on their own entry points
|
|
110
|
+
and use **optional peer dependencies**. If you never import them you install nothing extra, and
|
|
111
|
+
nothing changes in your bundle — the root `@dreamtree-org/twreact-ui` import never touches them.
|
|
112
|
+
|
|
113
|
+
| Entry point | Exports | Install first |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| `@dreamtree-org/twreact-ui/charts` | `LineChart`, `BarChart`, `AreaChart`, `DonutChart`, `Sparkline` | `npm install recharts` (recharts 2.15+ or 3.x; React 18 apps also `npm install react-is@18`) |
|
|
116
|
+
| `@dreamtree-org/twreact-ui/rich-text` | `RichTextEditor` | `npm install @tiptap/react @tiptap/pm @tiptap/starter-kit` (Tiptap 3) |
|
|
117
|
+
|
|
118
|
+
```jsx
|
|
119
|
+
import { LineChart, DonutChart } from '@dreamtree-org/twreact-ui/charts';
|
|
120
|
+
import { RichTextEditor } from '@dreamtree-org/twreact-ui/rich-text';
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Both ship ESM (with `'use client'`), CommonJS and TypeScript declarations, and resolve under every
|
|
124
|
+
TypeScript `moduleResolution` (`bundler`, `node16`/`nodenext` and legacy `node`). Their styles are
|
|
125
|
+
already in `dist/index.css`. Rich-text output is HTML from the user — **sanitize it on the server**
|
|
126
|
+
before you store or render it (see [doc/RichTextEditor.md](doc/RichTextEditor.md#security-sanitize-the-html-on-the-server)).
|
|
127
|
+
|
|
106
128
|
## Quick Start
|
|
107
129
|
|
|
108
130
|
```jsx
|
|
@@ -709,6 +731,61 @@ import { Drawer, Popover, Textarea, Slider, Sortable, Tour, Button } from '@drea
|
|
|
709
731
|
<Tour open={tourOpen} steps={[{ title: 'Welcome' }, { target: '[data-tour="new-task"]', title: 'Capture work' }]} onClose={() => setTourOpen(false)} />
|
|
710
732
|
```
|
|
711
733
|
|
|
734
|
+
### Charts (optional entry point)
|
|
735
|
+
|
|
736
|
+
Import from `@dreamtree-org/twreact-ui/charts` after `npm install recharts`. A data-first API over
|
|
737
|
+
recharts: pass rows as `data`, the x-axis key as `index` and the series keys as `categories`.
|
|
738
|
+
Colours are design tokens (`'primary'`, `'success-600'`, …) resolved from the `--dt-*` variables,
|
|
739
|
+
so charts follow your theme and dark mode. Every chart is responsive, `forwardRef` + `className` +
|
|
740
|
+
`...rest`, a named `role="img"` (`title` / `description`) with a visually-hidden data table for
|
|
741
|
+
screen readers (`accessibleTable`), shows `emptyState` for empty data, and disables animation under
|
|
742
|
+
`prefers-reduced-motion`.
|
|
743
|
+
|
|
744
|
+
| Component | Use for |
|
|
745
|
+
|---|---|
|
|
746
|
+
| [`LineChart`](doc/LineChart.md) | Trends over time (`curveType`, `showDots`, `connectNulls`) |
|
|
747
|
+
| [`BarChart`](doc/BarChart.md) | Comparisons — grouped, `stacked` or `horizontal` |
|
|
748
|
+
| [`AreaChart`](doc/AreaChart.md) | Volume over time, optionally `stacked` |
|
|
749
|
+
| [`DonutChart`](doc/DonutChart.md) | Part-to-whole (`variant="donut"` or `"pie"`, `centerLabel`) |
|
|
750
|
+
| [`Sparkline`](doc/Sparkline.md) | Word-sized trend for stat cards and table cells |
|
|
751
|
+
|
|
752
|
+
Shared props: `valueFormatter`, `height`, `showLegend`, `showTooltip`, `showXAxis`, `showYAxis`,
|
|
753
|
+
`showGrid`, `colors`, `animate`.
|
|
754
|
+
|
|
755
|
+
```jsx
|
|
756
|
+
import { LineChart, DonutChart, Sparkline } from '@dreamtree-org/twreact-ui/charts';
|
|
757
|
+
|
|
758
|
+
<LineChart
|
|
759
|
+
data={[{ month: 'Jan', revenue: 4200 }, { month: 'Feb', revenue: 5100 }]}
|
|
760
|
+
index="month"
|
|
761
|
+
categories={['revenue']}
|
|
762
|
+
valueFormatter={(v) => `$${v.toLocaleString()}`}
|
|
763
|
+
title="Revenue, Jan–Feb"
|
|
764
|
+
/>
|
|
765
|
+
<DonutChart data={byStatus} index="status" category="tasks" centerLabel="63 tasks" title="Tasks by status" />
|
|
766
|
+
<Sparkline data={weekly} category="signups" color="success" title="Signups, last 4 weeks" />
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
### Rich text (optional entry point)
|
|
770
|
+
|
|
771
|
+
[`RichTextEditor`](doc/RichTextEditor.md) — import from `@dreamtree-org/twreact-ui/rich-text` after
|
|
772
|
+
`npm install @tiptap/react @tiptap/pm @tiptap/starter-kit`. A Tiptap (StarterKit) field with the
|
|
773
|
+
same `label` / `error` / `helperText` / `required` wiring as `Input`; controlled (`value` +
|
|
774
|
+
`onChange(html)`) or uncontrolled (`defaultValue`), `outputFormat="json"` for Tiptap JSON,
|
|
775
|
+
`disabled` / `readOnly`, `minHeight` / `maxHeight`, and a `toolbar` (bold, italic, strike, code,
|
|
776
|
+
headings, lists, quote, link, undo/redo) that is a `role="toolbar"` of real buttons with
|
|
777
|
+
`aria-pressed` and arrow-key roving focus. The `ref` is an imperative handle (`editor`, `focus()`,
|
|
778
|
+
`getHTML()`, `getJSON()`, `setContent()`, `clear()`). SSR-safe: the editor mounts on the client.
|
|
779
|
+
|
|
780
|
+
```jsx
|
|
781
|
+
import { RichTextEditor } from '@dreamtree-org/twreact-ui/rich-text';
|
|
782
|
+
|
|
783
|
+
<RichTextEditor label="Description" placeholder="Describe the task…" value={html} onChange={setHtml} maxHeight={320} />
|
|
784
|
+
```
|
|
785
|
+
|
|
786
|
+
> The HTML comes from the user. Sanitize it on the server (e.g. DOMPurify / `sanitize-html`) before
|
|
787
|
+
> storing or rendering it; this library ships no sanitizer.
|
|
788
|
+
|
|
712
789
|
### Page blocks
|
|
713
790
|
|
|
714
791
|
Page-level patterns extracted from the Dreamtree products. Build pages from these before composing layouts by hand.
|
|
@@ -766,6 +843,8 @@ Every colour in the compiled CSS is a CSS variable (`--dt-primary-600`, `--dt-su
|
|
|
766
843
|
@import "@dreamtree-org/twreact-ui/dist/tokens/brands/practicepro.css"; /* or your own --dt-* overrides */
|
|
767
844
|
```
|
|
768
845
|
|
|
846
|
+
Shipped brands: `default`, `practicepro`, `studio` (Dreamtree Studio's own pages).
|
|
847
|
+
|
|
769
848
|
**Use the same tokens in your own classes:**
|
|
770
849
|
|
|
771
850
|
```js
|
|
@@ -29,6 +29,17 @@ npm install react react-dom
|
|
|
29
29
|
`react` / `react-dom` are **peer dependencies** at `^18.3.1`. React 19
|
|
30
30
|
is not yet supported.
|
|
31
31
|
|
|
32
|
+
**Optional entry points** — install the peer only when the user needs it:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# charts: @dreamtree-org/twreact-ui/charts
|
|
36
|
+
npm install recharts # React 18 apps also: npm install react-is@18
|
|
37
|
+
# rich text: @dreamtree-org/twreact-ui/rich-text
|
|
38
|
+
npm install @tiptap/react @tiptap/pm @tiptap/starter-kit
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Apps that don't import these subpaths install and bundle nothing extra.
|
|
42
|
+
|
|
32
43
|
## Wiring (do not invent alternatives)
|
|
33
44
|
|
|
34
45
|
```jsx
|
|
@@ -112,6 +123,8 @@ The library exports four kinds of things from `@dreamtree-org/twreact-ui`:
|
|
|
112
123
|
| **Feedback** | `Dialog`, `Toast` (+ `ToastProvider`, `ToastContainer`, `useToast`), `Alert`, `Drawer` (side sheet; `isOpen`/`onClose` like Dialog), `Tour` (onboarding spotlight) |
|
|
113
124
|
| **Utility** | `Badge`, `Avatar`, `Card`, `Pagination`, `Stepper`, `FileUpload`, `Condition`, `Carousel`, `Sortable` (drag + keyboard reorder) |
|
|
114
125
|
| **Blocks** | `AppShell`, `PageHeader`, `StatCard`, `StatusPill`, `EmptyState`, `ErrorState`, `LoadingState`, `ConfirmDialog` — page-level patterns; build pages from these before composing layouts by hand |
|
|
126
|
+
| **Charts** (`@dreamtree-org/twreact-ui/charts`, peer `recharts`) | `LineChart`, `BarChart`, `AreaChart`, `DonutChart`, `Sparkline` — NOT exported from the root |
|
|
127
|
+
| **Rich text** (`@dreamtree-org/twreact-ui/rich-text`, peers `@tiptap/react @tiptap/pm @tiptap/starter-kit`) | `RichTextEditor` — NOT exported from the root |
|
|
115
128
|
|
|
116
129
|
### Hooks
|
|
117
130
|
|
|
@@ -185,6 +198,8 @@ When suggesting a component or new variant value, use this exact vocabulary.
|
|
|
185
198
|
- `Textarea` — same API as `Input` plus `autoResize`/`maxRows`; never a raw `<textarea>`.
|
|
186
199
|
- `Slider` — `defaultValue={40}` for one thumb, `[low, high]` for a range; `onChangeEnd` to save after a drag.
|
|
187
200
|
- `Sortable` — `items` + `onReorder(newItems)` + `renderItem`; keyboard reordering and announcements are built in. Pass `handle` and spread `handleProps` on a grip for touch screens.
|
|
201
|
+
- Charts (`/charts`) — `<LineChart data={rows} index="month" categories={['revenue', 'costs']} />`; same shape for `BarChart` (`stacked`, `horizontal`) and `AreaChart` (`stacked`); `DonutChart` takes `index` (name key) + `category` (value key) + `centerLabel`; `Sparkline` takes `category` + `color`. Colours are tokens (`colors={['primary', 'success-600']}`), never hex. Always pass `title` (accessible name) and, for key charts, a `description` with the takeaway. `valueFormatter` formats tooltip/axis/table values.
|
|
202
|
+
- `RichTextEditor` (`/rich-text`) — `label`/`error`/`helperText` like `Input`; `value` + `onChange(html)` (or `outputFormat="json"`); `toolbar={['bold', 'italic', 'link']}` to trim. Tell the user to **sanitize the HTML server-side**; never render it with `dangerouslySetInnerHTML` unsanitized.
|
|
188
203
|
- `Tour` — onboarding coach marks: `steps=[{ target: '[data-tour="x"]', title, content, placement }]`, `open`, `onClose(reason)`; a missing target falls back to a centred card.
|
|
189
204
|
|
|
190
205
|
**Tokens:** colours are CSS variables (`--dt-primary-600`, `--dt-surface`, …) generated from
|
|
@@ -326,6 +341,25 @@ fetchApiWith('updateUser', [7, { name: 'A' }]); // apiMap.updateUser(7, {...})
|
|
|
326
341
|
Treat `useApi` as a thin axios wrapper, not a caching/dedup layer. For
|
|
327
342
|
cache, the consumer brings their own (React Query, SWR, etc.).
|
|
328
343
|
|
|
344
|
+
### Charts and rich text (optional entry points)
|
|
345
|
+
|
|
346
|
+
```jsx
|
|
347
|
+
import { LineChart, DonutChart, Sparkline } from '@dreamtree-org/twreact-ui/charts';
|
|
348
|
+
import { RichTextEditor } from '@dreamtree-org/twreact-ui/rich-text';
|
|
349
|
+
|
|
350
|
+
<LineChart
|
|
351
|
+
data={[{ month: 'Jan', revenue: 4200 }, { month: 'Feb', revenue: 5100 }]}
|
|
352
|
+
index="month"
|
|
353
|
+
categories={['revenue']}
|
|
354
|
+
valueFormatter={(v) => `$${v.toLocaleString()}`}
|
|
355
|
+
title="Revenue, Jan–Feb"
|
|
356
|
+
/>
|
|
357
|
+
<DonutChart data={byStatus} index="status" category="tasks" colors={['info', 'error', 'success']} centerLabel="63 tasks" title="Tasks by status" />
|
|
358
|
+
<Sparkline data={weekly} category="signups" color="success" title="Signups, last 4 weeks" />
|
|
359
|
+
|
|
360
|
+
<RichTextEditor label="Description" placeholder="Describe the task…" value={html} onChange={setHtml} maxHeight={320} />
|
|
361
|
+
```
|
|
362
|
+
|
|
329
363
|
### cn
|
|
330
364
|
|
|
331
365
|
```jsx
|
|
@@ -341,7 +375,7 @@ import { cn } from '@dreamtree-org/twreact-ui';
|
|
|
341
375
|
1. **Use library components.** When the user asks for a button, input,
|
|
342
376
|
table, modal, toast, navbar, sidebar, breadcrumb, badge, card,
|
|
343
377
|
stepper, file uploader, date picker, color picker, location picker,
|
|
344
|
-
pagination, or
|
|
378
|
+
pagination, carousel, chart or rich-text editor — reach into this library FIRST. Don't
|
|
345
379
|
propose a hand-rolled `<div>` + Tailwind unless the library has no
|
|
346
380
|
matching primitive.
|
|
347
381
|
2. **Use the shared vocabulary.** `variant="primary"`, `size="md"`,
|
|
@@ -356,8 +390,11 @@ import { cn } from '@dreamtree-org/twreact-ui';
|
|
|
356
390
|
"components render unstyled," check first whether their
|
|
357
391
|
`tailwind.config.js` `content[]` includes
|
|
358
392
|
`./node_modules/@dreamtree-org/twreact-ui/dist/**/*.{js,mjs}`.
|
|
359
|
-
6. **Don't deep-import.**
|
|
360
|
-
|
|
393
|
+
6. **Don't deep-import.** The public modules are `@dreamtree-org/twreact-ui`
|
|
394
|
+
plus the two optional entry points `@dreamtree-org/twreact-ui/charts` and
|
|
395
|
+
`@dreamtree-org/twreact-ui/rich-text` (each needs its peer installed).
|
|
396
|
+
Don't suggest `@dreamtree-org/twreact-ui/src/components/core/Button`, and
|
|
397
|
+
never import charts or `RichTextEditor` from the root.
|
|
361
398
|
7. **React 18 only.** If the user is on React 19, warn them: this
|
|
362
399
|
library has not yet been verified on React 19.
|
|
363
400
|
8. **Accessibility-first.** Icon-only buttons need `aria-label`.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var clsx = require('clsx');
|
|
4
|
+
var tailwindMerge = require('tailwind-merge');
|
|
5
|
+
|
|
6
|
+
function _arrayLikeToArray(r, a) {
|
|
7
|
+
(null == a || a > r.length) && (a = r.length);
|
|
8
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
9
|
+
return n;
|
|
10
|
+
}
|
|
11
|
+
function _arrayWithHoles(r) {
|
|
12
|
+
if (Array.isArray(r)) return r;
|
|
13
|
+
}
|
|
14
|
+
function _arrayWithoutHoles(r) {
|
|
15
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
16
|
+
}
|
|
17
|
+
function _defineProperty(e, r, t) {
|
|
18
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
19
|
+
value: t,
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true
|
|
23
|
+
}) : e[r] = t, e;
|
|
24
|
+
}
|
|
25
|
+
function _iterableToArray(r) {
|
|
26
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
27
|
+
}
|
|
28
|
+
function _iterableToArrayLimit(r, l) {
|
|
29
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
30
|
+
if (null != t) {
|
|
31
|
+
var e,
|
|
32
|
+
n,
|
|
33
|
+
i,
|
|
34
|
+
u,
|
|
35
|
+
a = [],
|
|
36
|
+
f = true,
|
|
37
|
+
o = false;
|
|
38
|
+
try {
|
|
39
|
+
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
40
|
+
} catch (r) {
|
|
41
|
+
o = true, n = r;
|
|
42
|
+
} finally {
|
|
43
|
+
try {
|
|
44
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
45
|
+
} finally {
|
|
46
|
+
if (o) throw n;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return a;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function _nonIterableRest() {
|
|
53
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
54
|
+
}
|
|
55
|
+
function _nonIterableSpread() {
|
|
56
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
57
|
+
}
|
|
58
|
+
function ownKeys(e, r) {
|
|
59
|
+
var t = Object.keys(e);
|
|
60
|
+
if (Object.getOwnPropertySymbols) {
|
|
61
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
62
|
+
r && (o = o.filter(function (r) {
|
|
63
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
64
|
+
})), t.push.apply(t, o);
|
|
65
|
+
}
|
|
66
|
+
return t;
|
|
67
|
+
}
|
|
68
|
+
function _objectSpread2(e) {
|
|
69
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
70
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
71
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
72
|
+
_defineProperty(e, r, t[r]);
|
|
73
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
74
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return e;
|
|
78
|
+
}
|
|
79
|
+
function _objectWithoutProperties(e, t) {
|
|
80
|
+
if (null == e) return {};
|
|
81
|
+
var o,
|
|
82
|
+
r,
|
|
83
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
84
|
+
if (Object.getOwnPropertySymbols) {
|
|
85
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
86
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
87
|
+
}
|
|
88
|
+
return i;
|
|
89
|
+
}
|
|
90
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
91
|
+
if (null == r) return {};
|
|
92
|
+
var t = {};
|
|
93
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
94
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
95
|
+
t[n] = r[n];
|
|
96
|
+
}
|
|
97
|
+
return t;
|
|
98
|
+
}
|
|
99
|
+
function _slicedToArray(r, e) {
|
|
100
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
101
|
+
}
|
|
102
|
+
function _toConsumableArray(r) {
|
|
103
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
104
|
+
}
|
|
105
|
+
function _toPrimitive(t, r) {
|
|
106
|
+
if ("object" != typeof t || !t) return t;
|
|
107
|
+
var e = t[Symbol.toPrimitive];
|
|
108
|
+
if (void 0 !== e) {
|
|
109
|
+
var i = e.call(t, r);
|
|
110
|
+
if ("object" != typeof i) return i;
|
|
111
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
112
|
+
}
|
|
113
|
+
return ("string" === r ? String : Number)(t);
|
|
114
|
+
}
|
|
115
|
+
function _toPropertyKey(t) {
|
|
116
|
+
var i = _toPrimitive(t, "string");
|
|
117
|
+
return "symbol" == typeof i ? i : i + "";
|
|
118
|
+
}
|
|
119
|
+
function _unsupportedIterableToArray(r, a) {
|
|
120
|
+
if (r) {
|
|
121
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
122
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
123
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function cn() {
|
|
128
|
+
for (var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
129
|
+
inputs[_key] = arguments[_key];
|
|
130
|
+
}
|
|
131
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
exports._objectSpread2 = _objectSpread2;
|
|
135
|
+
exports._objectWithoutProperties = _objectWithoutProperties;
|
|
136
|
+
exports._slicedToArray = _slicedToArray;
|
|
137
|
+
exports._toConsumableArray = _toConsumableArray;
|
|
138
|
+
exports.cn = cn;
|