@devalok/shilp-sutra 0.55.1 → 0.57.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.
- package/BREAKING.json +13 -0
- package/MIGRATION.md +163 -0
- package/README.md +16 -1
- package/dist/_chunks/badge-group.js +92 -78
- package/dist/_chunks/badge-group.js.map +1 -1
- package/dist/_chunks/chat.js +91 -75
- package/dist/_chunks/chat.js.map +1 -1
- package/dist/_chunks/document-preview.js +1 -1
- package/dist/_chunks/document-preview.js.map +1 -1
- package/dist/_chunks/emoji-suggestion.js +32 -30
- package/dist/_chunks/emoji-suggestion.js.map +1 -1
- package/dist/_chunks/mention-suggestion.js +36 -35
- package/dist/_chunks/mention-suggestion.js.map +1 -1
- package/dist/_chunks/oauth-button.js +1 -1
- package/dist/_chunks/oauth-button.js.map +1 -1
- package/dist/_chunks/primitives-internal.js +437 -537
- package/dist/_chunks/primitives-internal.js.map +1 -1
- package/dist/_chunks/success.js +2 -2
- package/dist/_chunks/success.js.map +1 -1
- package/dist/_chunks/tree-view.js +1 -1
- package/dist/_chunks/tree-view.js.map +1 -1
- package/dist/_chunks/use-calendar.js +4 -4
- package/dist/_chunks/use-calendar.js.map +1 -1
- package/dist/ai/blocks/text.js +1 -1
- package/dist/ai/blocks/text.js.map +1 -1
- package/dist/ai/command-bar.js +9 -9
- package/dist/ai/command-bar.js.map +1 -1
- package/dist/ai/conversation.js +2 -2
- package/dist/ai/conversation.js.map +1 -1
- package/dist/composed/activity-feed.js +1 -1
- package/dist/composed/activity-feed.js.map +1 -1
- package/dist/composed/avatar-group.d.ts +7 -2
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +3 -3
- package/dist/composed/avatar-group.js.map +1 -1
- package/dist/composed/command-palette.js +7 -7
- package/dist/composed/command-palette.js.map +1 -1
- package/dist/composed/content-card.js +20 -20
- package/dist/composed/content-card.js.map +1 -1
- package/dist/composed/date-picker/index.js +4 -4
- package/dist/composed/date-picker/index.js.map +1 -1
- package/dist/composed/diff.d.ts +23 -2
- package/dist/composed/diff.d.ts.map +1 -1
- package/dist/composed/diff.js +341 -260
- package/dist/composed/diff.js.map +1 -1
- package/dist/composed/emoji-picker.js +3 -3
- package/dist/composed/emoji-picker.js.map +1 -1
- package/dist/composed/error-boundary.js +2 -2
- package/dist/composed/error-boundary.js.map +1 -1
- package/dist/composed/extensions/emoji-node.js +8 -7
- package/dist/composed/extensions/emoji-node.js.map +1 -1
- package/dist/composed/file-preview.js +1 -1
- package/dist/composed/file-preview.js.map +1 -1
- package/dist/composed/filter-bar.js +1 -1
- package/dist/composed/filter-bar.js.map +1 -1
- package/dist/composed/inline-edit.js +1 -1
- package/dist/composed/inline-edit.js.map +1 -1
- package/dist/composed/loading-skeleton.js +3 -3
- package/dist/composed/loading-skeleton.js.map +1 -1
- package/dist/composed/master-detail.js +1 -1
- package/dist/composed/master-detail.js.map +1 -1
- package/dist/composed/member-picker.js +1 -1
- package/dist/composed/member-picker.js.map +1 -1
- package/dist/composed/multi-select-popover.js +1 -1
- package/dist/composed/multi-select-popover.js.map +1 -1
- package/dist/composed/page-skeletons.js +4 -4
- package/dist/composed/page-skeletons.js.map +1 -1
- package/dist/composed/responsive-modal.js +1 -1
- package/dist/composed/responsive-modal.js.map +1 -1
- package/dist/composed/rich-chat-input.js +549 -540
- package/dist/composed/rich-chat-input.js.map +1 -1
- package/dist/composed/rich-text-editor.js +206 -198
- package/dist/composed/rich-text-editor.js.map +1 -1
- package/dist/composed/schedule-view.js +5 -5
- package/dist/composed/schedule-view.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -3
- package/dist/hooks/use-container-size.d.ts +18 -0
- package/dist/hooks/use-container-size.d.ts.map +1 -0
- package/dist/hooks/use-container-size.js +28 -0
- package/dist/hooks/use-container-size.js.map +1 -0
- package/dist/shell/app-shell.d.ts +101 -0
- package/dist/shell/app-shell.d.ts.map +1 -0
- package/dist/shell/app-shell.js +76 -0
- package/dist/shell/app-shell.js.map +1 -0
- package/dist/shell/bottom-navbar.js +2 -2
- package/dist/shell/bottom-navbar.js.map +1 -1
- package/dist/shell/index.d.ts +1 -0
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +6 -5
- package/dist/shell/notification-center.js +4 -4
- package/dist/shell/notification-center.js.map +1 -1
- package/dist/shell/notification-preferences.js +1 -1
- package/dist/shell/notification-preferences.js.map +1 -1
- package/dist/shell/top-bar.js +7 -7
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/tokens/generate-scale.d.ts +49 -0
- package/dist/tokens/generate-scale.d.ts.map +1 -1
- package/dist/tokens/primitives.css +29 -26
- package/dist/tokens/semantic.css +98 -39
- package/dist/tokens/variants.css +1 -1
- package/dist/ui/accordion.js +1 -1
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.js +1 -1
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +36 -36
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/avatar.js +44 -44
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge-indicator.js +1 -1
- package/dist/ui/badge-indicator.js.map +1 -1
- package/dist/ui/badge.d.ts +47 -33
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/banner.js +26 -26
- package/dist/ui/banner.js.map +1 -1
- package/dist/ui/button.js +35 -35
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/card.js +42 -42
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/chat/date-separator.d.ts +8 -1
- package/dist/ui/chat/date-separator.d.ts.map +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/code.js +2 -2
- package/dist/ui/code.js.map +1 -1
- package/dist/ui/color-input.js +3 -3
- package/dist/ui/color-input.js.map +1 -1
- package/dist/ui/combobox.js +139 -139
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/context-menu.js +4 -4
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/data-table-body.d.ts +3 -1
- package/dist/ui/data-table-body.d.ts.map +1 -1
- package/dist/ui/data-table-body.js +93 -92
- package/dist/ui/data-table-body.js.map +1 -1
- package/dist/ui/data-table-bulk-actions.d.ts +7 -1
- package/dist/ui/data-table-bulk-actions.d.ts.map +1 -1
- package/dist/ui/data-table-bulk-actions.js +14 -8
- package/dist/ui/data-table-bulk-actions.js.map +1 -1
- package/dist/ui/data-table-card.d.ts.map +1 -1
- package/dist/ui/data-table-card.js +66 -47
- package/dist/ui/data-table-card.js.map +1 -1
- package/dist/ui/data-table-context.d.ts +4 -0
- package/dist/ui/data-table-context.d.ts.map +1 -1
- package/dist/ui/data-table-context.js.map +1 -1
- package/dist/ui/data-table-header.d.ts.map +1 -1
- package/dist/ui/data-table-header.js +18 -15
- package/dist/ui/data-table-header.js.map +1 -1
- package/dist/ui/data-table-pagination.js +3 -3
- package/dist/ui/data-table-pagination.js.map +1 -1
- package/dist/ui/data-table-toolbar.d.ts +11 -1
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +7 -7
- package/dist/ui/data-table-toolbar.js.map +1 -1
- package/dist/ui/data-table.d.ts +52 -5
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +181 -169
- package/dist/ui/data-table.js.map +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/dot.js +13 -13
- package/dist/ui/dot.js.map +1 -1
- package/dist/ui/dropdown-menu.js +4 -4
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/file-upload.js +3 -3
- package/dist/ui/file-upload.js.map +1 -1
- package/dist/ui/input-otp.js +1 -1
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/input.js +30 -30
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/lib/utils.js +2 -1
- package/dist/ui/lib/utils.js.map +1 -1
- package/dist/ui/menubar.js +5 -5
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/navigation-menu.js +1 -1
- package/dist/ui/navigation-menu.js.map +1 -1
- package/dist/ui/number-input.js +36 -36
- package/dist/ui/number-input.js.map +1 -1
- package/dist/ui/pagination.js +1 -1
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/progress-ring.js +2 -2
- package/dist/ui/progress-ring.js.map +1 -1
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +66 -62
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio.js +1 -1
- package/dist/ui/radio.js.map +1 -1
- package/dist/ui/select.js +61 -61
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/sheet.js +47 -47
- package/dist/ui/sheet.js.map +1 -1
- package/dist/ui/sidebar.js +132 -132
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/skeleton.js +39 -39
- package/dist/ui/slider.js +18 -18
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/split-button.js +3 -3
- package/dist/ui/split-button.js.map +1 -1
- package/dist/ui/stat-card.js +1 -1
- package/dist/ui/stat-card.js.map +1 -1
- package/dist/ui/stepper.js +2 -2
- package/dist/ui/stepper.js.map +1 -1
- package/dist/ui/surface.d.ts.map +1 -1
- package/dist/ui/surface.js +11 -11
- package/dist/ui/surface.js.map +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.js +1 -1
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +48 -48
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/text.js +8 -8
- package/dist/ui/textarea.js +17 -17
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/toast.js +1 -1
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/toggle.js +15 -15
- package/dist/ui/toggle.js.map +1 -1
- package/docs/components/composed/avatar-group.md +4 -4
- package/docs/components/composed/diff.md +10 -2
- package/docs/components/composed/schedule-view.md +1 -1
- package/docs/components/shell/app-shell.md +132 -0
- package/docs/components/ui/avatar.md +1 -1
- package/docs/components/ui/button.md +1 -1
- package/docs/components/ui/chat.md +7 -1
- package/docs/components/ui/color-swatch.md +1 -1
- package/docs/components/ui/data-table-toolbar.md +6 -2
- package/docs/components/ui/data-table.md +41 -7
- package/docs/components/ui/dot.md +1 -1
- package/docs/components/ui/progress.md +1 -0
- package/docs/components/ui/surface.md +3 -3
- package/docs/components/ui/table.md +2 -2
- package/docs/recipes/install-astro.md +3 -2
- package/docs/recipes/install-next-app-router.md +3 -2
- package/docs/recipes/install-remix.md +3 -2
- package/docs/recipes/install-tanstack-start.md +3 -2
- package/docs/recipes/install-vite.md +3 -2
- package/docs/recipes/troubleshoot.md +26 -5
- package/llms.txt +2 -1
- package/make-kit/Guidelines.md +2 -2
- package/make-kit/components/button.md +1 -1
- package/make-kit/components/card.md +6 -6
- package/make-kit/components/surface.md +4 -4
- package/make-kit/foundations/color.md +4 -4
- package/make-kit/foundations/dark-mode.md +1 -1
- package/make-kit/foundations/radius.md +1 -1
- package/make-kit/foundations/surfaces.md +9 -9
- package/mcp-manifest.json +373 -34
- package/package.json +43 -13
- package/skill/SKILL.md +12 -6
- package/skill/references/components.md +2 -1
- package/skill/references/setup-astro.md +3 -2
- package/skill/references/setup-next-app-router.md +3 -2
- package/skill/references/setup-remix.md +3 -2
- package/skill/references/setup-tanstack-start.md +3 -2
- package/skill/references/setup-vite.md +3 -2
- package/skill/references/troubleshoot.md +26 -5
- package/dist/_chunks/tiptap.js +0 -18809
- package/dist/_chunks/tiptap.js.map +0 -1
- package/dist/_chunks/vendor-utils.js +0 -1766
- package/dist/_chunks/vendor-utils.js.map +0 -1
- package/dist/primitives/react-toast.d.ts +0 -120
- package/dist/ui/charts/_internal/scales.d.ts +0 -5
- package/dist/ui/charts/_internal/scales.d.ts.map +0 -1
- package/dist/ui/lib/slot.d.ts +0 -8
- package/dist/ui/lib/slot.d.ts.map +0 -1
- package/scripts/welcome.mjs +0 -312
package/BREAKING.json
CHANGED
|
@@ -350,6 +350,19 @@
|
|
|
350
350
|
"Fastest migration: `npx shadcn@latest add @devalok/sidebar-app`, then replace <AppSidebar navGroups={…} user={…} currentPath={…} /> with the pasted <SidebarApp/>, wiring your router Link + active path. Composing @devalok/shilp-sutra/ui/sidebar directly is equally valid and needs no registry.",
|
|
351
351
|
"Deprecation cycle: no PUBLISHED version carried an @deprecated AppSidebar — 0.53.0 shipped it undeprecated, 0.54.0 removes it. The deprecation marker existed only within the unreleased 0.54.0 line. This is a deliberate call for a 0.x beta with a single coordinated consumer (breaking changes ship in 0.x minors); a post-1.0 removal would get a real deprecate→remove window."
|
|
352
352
|
]
|
|
353
|
+
},
|
|
354
|
+
"0.56.0": {
|
|
355
|
+
"summary": "TipTap is no longer bundled — @tiptap/* and prosemirror-* are externalized, so RichTextEditor / RichChatInput now REQUIRE their peers to be installed. No symbol, prop, or export changed; this is an install-graph break only.",
|
|
356
|
+
"migrationDoc": "MIGRATION.md#v0560--tiptap-externalized--no-install-scripts",
|
|
357
|
+
"notes": [
|
|
358
|
+
"BREAKING: @tiptap/* and prosemirror-* were declared as optional peerDependencies AND bundled into a 641 KB _chunks/tiptap.js. RichTextEditor / RichChatInput therefore worked whether or not you installed the peers. They are now externalized and the peers are mandatory for those two components. Install command per framework: §2a of docs/recipes/install-*.md, or run the MCP's preflight tool.",
|
|
359
|
+
"WHY: a consumer who DID follow our peer instructions ran two ProseMirror copies. Plugin keys are module-scoped, so the copies could not see each other's plugins and the editors misbehaved un-attributably. Same failure class as the framer-motion/sonner externalization in 0.37.0. It also removes 641 KB from the package for every consumer who never touches rich text.",
|
|
360
|
+
"Twelve @tiptap/* packages are now declared as optional peers (previously four: core, pm, react, suggestion) — the full set we import must be resolvable by the consumer. Two internal `prosemirror-state` imports were rerouted to `@tiptap/pm/state` so they ride the existing @tiptap/pm peer instead of requiring a separate prosemirror-state install.",
|
|
361
|
+
"NOT breaking: every component outside RichTextEditor / RichChatInput is untouched. No exported symbol, prop type, or subpath export changed in this release — no widening and no narrowing.",
|
|
362
|
+
"use-sync-external-store is no longer a dependency. React 18+ has useSyncExternalStore built in and our own code always called it directly (primitives/_internal/react-use-is-hydrated.ts); the dep existed only to feed the bundled TipTap chunk. Runtime dependencies are now class-variance-authority, clsx, tailwind-merge, tw-animate-css.",
|
|
363
|
+
"clsx / class-variance-authority / tailwind-merge are now externalized rather than bundled. All three leak into our published .d.ts (25 files reference VariantProps, cva's return type embeds class-variance-authority/types#ClassProp, utils.d.ts imports ClassValue), so consumers already had to resolve them for tsc; bundling a second copy shipped the same code twice and blocked dedupe with the consumer's own copies. tailwind-merge moves devDependency -> dependency (it was already shipping, hidden inside our bundle). All auto-installed with us — no consumer action.",
|
|
364
|
+
"The postinstall script is REMOVED — this package now runs no lifecycle scripts at all on install. It previously printed a welcome banner and wrote a project-scoped .mcp.json into the consumer's repo pointing at our hosted docs MCP. Nothing is required when upgrading. To clean up after the old behaviour: remove the `shilp-sutra` entry from .mcp.json and delete the node_modules/.shilp-sutra-welcomed and .shilp-sutra-mcp-written sentinels. Add the MCP deliberately with `claude mcp add --transport http shilp-sutra https://shilp-sutra.devalok.in/mcp`."
|
|
365
|
+
]
|
|
353
366
|
}
|
|
354
367
|
}
|
|
355
368
|
}
|
package/MIGRATION.md
CHANGED
|
@@ -4,6 +4,169 @@ This page indexes all breaking changes across `@devalok/shilp-sutra` versions. F
|
|
|
4
4
|
|
|
5
5
|
> **Upgrading from < 0.36?** Start here, then read each intermediate version section. Breaking changes stack — skipping versions means stacking migrations.
|
|
6
6
|
|
|
7
|
+
## v0.57.0 — one token removed, one renamed, and a colour change you will see
|
|
8
|
+
|
|
9
|
+
The surface model was rebuilt. Almost all of it is aliased, so `tsc` and your
|
|
10
|
+
build stay green — but **one token is removed with no alias**, and the neutral
|
|
11
|
+
ramp itself changed, so the release looks different even where nothing errors.
|
|
12
|
+
|
|
13
|
+
Shipped as a minor. Pre-1.0 we bump minor for breaking changes rather than
|
|
14
|
+
reserving major for a stability promise the system is not ready to make, so read
|
|
15
|
+
this section rather than trusting the version number.
|
|
16
|
+
|
|
17
|
+
### REMOVED, no alias: `surface-chrome`
|
|
18
|
+
|
|
19
|
+
The one thing here that can actually break you. Every other renamed token still
|
|
20
|
+
resolves through a deprecated alias. `--color-surface-chrome` does not, so
|
|
21
|
+
`bg-surface-chrome` — and the `text-` / `border-` / `ring-` forms — stops
|
|
22
|
+
emitting CSS entirely. The element renders with no background.
|
|
23
|
+
|
|
24
|
+
Chrome is an arrangement decision, not a theme value: which shell you picked
|
|
25
|
+
decides it. Use `surface-base`, or the new `AppShell` with `variant`
|
|
26
|
+
(`flat` | `inset`) and `chrome` (`dim` | `bright`).
|
|
27
|
+
|
|
28
|
+
```diff
|
|
29
|
+
- <header className="bg-surface-chrome">
|
|
30
|
+
+ <header className="bg-surface-base">
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### RENAMED, aliased: `surface-raised` → `surface-panel`
|
|
34
|
+
|
|
35
|
+
`-hover` and `-active` follow. In light it was never raised — it is the same
|
|
36
|
+
white as the page — so the name was a lie. The old names still resolve as
|
|
37
|
+
deprecated aliases and are removed next major, so nothing breaks on upgrade day.
|
|
38
|
+
|
|
39
|
+
### Run the codemod. Do not find-and-replace.
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pnpm add -D @devalok/eslint-plugin-shilp-sutra@latest
|
|
43
|
+
pnpm eslint . --fix
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`shilp-sutra/no-renamed-surface-token` ships the autofix. **This is not a
|
|
47
|
+
rename — 37 of the references in our own codebase were a retarget**, and a blind
|
|
48
|
+
search-and-replace ships that many invisible hover states.
|
|
49
|
+
|
|
50
|
+
The reason: in light, `surface-base`, `surface-panel` and `surface-overlay` are
|
|
51
|
+
now all `#ffffff`. An edge is what makes a card a card, not a fill. So any
|
|
52
|
+
interaction state painted with a *container* value is invisible:
|
|
53
|
+
|
|
54
|
+
```diff
|
|
55
|
+
- hover:bg-surface-raised /* container value → invisible on a panel */
|
|
56
|
+
+ hover:bg-surface-panel-hover
|
|
57
|
+
|
|
58
|
+
- bg-surface-raised /* genuine container → plain rename */
|
|
59
|
+
+ bg-surface-panel
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The rule tells those two apart, and knows `dark:` and `md:` are not interaction
|
|
63
|
+
states. It **reports template literals without fixing them** — a
|
|
64
|
+
`TemplateElement`'s range covers its delimiters, so rewriting one destroys the
|
|
65
|
+
literal. Those need a human.
|
|
66
|
+
|
|
67
|
+
**The rule cannot see a JavaScript conditional.** `isActive ? 'bg-surface-panel' : …`
|
|
68
|
+
compiles to a plain string; three of our own components shipped that way and were
|
|
69
|
+
caught by eye, not by tooling. Grep your codebase for `surface-panel` inside
|
|
70
|
+
ternaries and check each one is a container, not a state.
|
|
71
|
+
|
|
72
|
+
### Visual: the neutral ramp is de-warmed and dark is lifted
|
|
73
|
+
|
|
74
|
+
This changes the actual colour of **all text and every border**, not only
|
|
75
|
+
surfaces. Every neutral step is now pure grey (chroma 0), and dark lightness
|
|
76
|
+
rises by 0.037 so surfaces have somewhere to stack. Dark page is `#0a0a0a`, a
|
|
77
|
+
dark panel `#171717`.
|
|
78
|
+
|
|
79
|
+
If you sampled our colours into your own tokens, re-sample them.
|
|
80
|
+
|
|
81
|
+
### Borders split into two families
|
|
82
|
+
|
|
83
|
+
Decorative edges are now translucent and no longer carry control contrast:
|
|
84
|
+
|
|
85
|
+
- `surface-border-subtle` / `-border` / `-border-strong` — **objects**. Black at
|
|
86
|
+
5/9/14% in light, white at 6/10/16% in dark. On white the default computes to
|
|
87
|
+
`#e8e8e8`.
|
|
88
|
+
- `surface-border-interactive` / `-interactive-strong` — **controls**. Solid, and
|
|
89
|
+
carry the WCAG 1.4.11 contrast inputs, checkboxes and switches need.
|
|
90
|
+
|
|
91
|
+
A form control left on a decorative tier loses required contrast. If you built a
|
|
92
|
+
custom input against `surface-border`, move it to `-border-interactive`.
|
|
93
|
+
|
|
94
|
+
### Shadows are scoped to things that float
|
|
95
|
+
|
|
96
|
+
Cards, panels and the inset canvas lose theirs; menus, dialogs, popovers,
|
|
97
|
+
tooltips and control thumbs keep them. Interactive cards now change surface on
|
|
98
|
+
hover instead of gaining a shadow. `Surface elevation="raised"` and
|
|
99
|
+
`Card variant="elevated"` keep their shadows — those are explicit opt-ins.
|
|
100
|
+
`--shadow-strength` is unchanged as the consumer dial.
|
|
101
|
+
|
|
102
|
+
### Also worth knowing
|
|
103
|
+
|
|
104
|
+
- **`bg-surface-1` … `bg-surface-4` are still deprecated** and still resolve.
|
|
105
|
+
They do not invert for dark mode. The named tokens do. `--fix` rewrites them.
|
|
106
|
+
- **A second new rule**, `shilp-sutra/no-subtle-text-on-sunken`, flags
|
|
107
|
+
`text-surface-fg-subtle` on `bg-surface-sunken` (4.38:1, under AA). Not
|
|
108
|
+
autofixable — swapping to `fg-muted` changes the text's visual weight, which is
|
|
109
|
+
your call.
|
|
110
|
+
- **`AvatarGroup`'s `borderColor`** accepts `'surface-panel'`; `'surface-raised'`
|
|
111
|
+
still works. A widening, not a break.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## v0.56.0 — TipTap externalized; no install scripts
|
|
115
|
+
|
|
116
|
+
One breaking change, and it only affects `RichTextEditor` / `RichChatInput`. No exported symbol, prop type, or subpath export changed — nothing widened and nothing narrowed.
|
|
117
|
+
|
|
118
|
+
### If you import `RichTextEditor` or `RichChatInput`, install the TipTap peers
|
|
119
|
+
|
|
120
|
+
0.55.x declared `@tiptap/*` as optional peers **and** bundled TipTap into a 641 KB chunk, so these components worked whether or not you installed anything. TipTap is now externalized: the peers are required.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# RichTextEditor
|
|
124
|
+
pnpm add @tiptap/core @tiptap/extension-highlight @tiptap/extension-image \
|
|
125
|
+
@tiptap/extension-list @tiptap/extension-mention @tiptap/extension-text-align \
|
|
126
|
+
@tiptap/extensions @tiptap/markdown @tiptap/pm @tiptap/react \
|
|
127
|
+
@tiptap/starter-kit @tiptap/suggestion
|
|
128
|
+
|
|
129
|
+
# RichChatInput — the list above, plus:
|
|
130
|
+
pnpm add date-fns
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Note these are plain `pnpm add`, not `-D`. In 0.55.0 they were devDependencies for types only; now they are the runtime.
|
|
134
|
+
|
|
135
|
+
§2a of your framework's install recipe carries the same list, and the docs MCP's `preflight` derives it from your actual imports.
|
|
136
|
+
|
|
137
|
+
**Why the churn:** the old arrangement meant a consumer who *did* follow our peer instructions ran two ProseMirror copies. Plugin keys are module-scoped, so the copies could not recognise each other's plugins and the editors misbehaved in ways nobody could attribute to us. This is the same failure class as the framer-motion / sonner externalization in 0.37.0. It also removes 641 KB from the package for every consumer who never touches rich text.
|
|
138
|
+
|
|
139
|
+
### If you don't use the editors — nothing to do
|
|
140
|
+
|
|
141
|
+
Every other component is untouched, and the package gets smaller.
|
|
142
|
+
|
|
143
|
+
### `use-sync-external-store` is gone — nothing to do
|
|
144
|
+
|
|
145
|
+
It was never ours. React 18+ has `useSyncExternalStore` built in and our code always called it directly; the dependency existed only to feed the bundled TipTap chunk. Runtime dependencies are now `class-variance-authority`, `clsx`, `tailwind-merge`, `tw-animate-css`.
|
|
146
|
+
|
|
147
|
+
### `clsx` / `class-variance-authority` / `tailwind-merge` externalized — nothing to do
|
|
148
|
+
|
|
149
|
+
All three leak into our published `.d.ts`, so you already had to resolve them for `tsc`. We were also bundling copies, which shipped the same code twice and stopped your own copies from deduping with ours. `tailwind-merge` moves from our devDependencies to our dependencies — it was already shipping, just hidden inside the bundle. All three install with us automatically.
|
|
150
|
+
|
|
151
|
+
### No more `postinstall` — nothing to do
|
|
152
|
+
|
|
153
|
+
This package now runs **zero lifecycle scripts** on install. The old `postinstall` printed a welcome banner and wrote a project-scoped `.mcp.json` into your repo pointing at our hosted docs MCP.
|
|
154
|
+
|
|
155
|
+
To clean up after the old behaviour if you want to:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# 1. drop the entry we added (or the whole file, if we created it and you keep nothing else there)
|
|
159
|
+
# .mcp.json → mcpServers → "shilp-sutra"
|
|
160
|
+
# 2. remove the sentinels
|
|
161
|
+
rm -f node_modules/.shilp-sutra-welcomed node_modules/.shilp-sutra-mcp-written
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
To add the MCP deliberately:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
claude mcp add --transport http shilp-sutra https://shilp-sutra.devalok.in/mcp
|
|
168
|
+
```
|
|
169
|
+
|
|
7
170
|
## v0.55.0 — additive; one optional step if you use the editors
|
|
8
171
|
|
|
9
172
|
Nothing breaks. No existing import, prop value, or install stops working.
|
package/README.md
CHANGED
|
@@ -53,8 +53,22 @@ claude mcp add --transport http shilp-sutra https://shilp-sutra.devalok.in/mcp
|
|
|
53
53
|
|
|
54
54
|
Six read-only tools: `find_component`, `get_component`, `get_tokens`, `get_setup`, `upgrade`, `search_docs`. Every tool takes a `version` param — pass your installed version (from `node_modules/@devalok/shilp-sutra/package.json`) so answers match your prop surface exactly.
|
|
55
55
|
|
|
56
|
+
Prefer a local skill over a network call? Copy the one we ship:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
cp -r node_modules/@devalok/shilp-sutra/skill ~/.claude/skills/shilp-sutra
|
|
60
|
+
```
|
|
61
|
+
|
|
56
62
|
Without MCP: `llms.txt` (router) → `docs/components/<tier>/<name>.md` (per-component) → `mcp-manifest.json` (all props/tokens/composition as JSON). Full contract in `AGENTS.md`.
|
|
57
63
|
|
|
64
|
+
### No install scripts
|
|
65
|
+
|
|
66
|
+
This package has **no `postinstall` and no lifecycle scripts of any kind**. Installing it runs zero code on your machine and writes nothing outside its own directory.
|
|
67
|
+
|
|
68
|
+
Up to 0.55.x we shipped a `postinstall` that printed a welcome banner and wrote a project-scoped `.mcp.json` pointing at the docs MCP above. Both are gone as of 0.56.0. The banner was noise; writing a config file into someone's repo — unasked, to wire their AI agent to our server — is exactly the behaviour npm's install-script blocking exists to stop, and it is not a thing a design system should do to earn a place in your dependency tree. Add the MCP yourself with the command above if you want it.
|
|
69
|
+
|
|
70
|
+
> **Upgrading from ≤0.55.x?** Nothing to do. If you want the old auto-written config gone, delete the `shilp-sutra` entry from your `.mcp.json` (or the file, if we created it and you keep nothing else there) and remove the `node_modules/.shilp-sutra-welcomed` / `.shilp-sutra-mcp-written` sentinels.
|
|
71
|
+
|
|
58
72
|
## Peer Dependencies
|
|
59
73
|
|
|
60
74
|
### Required
|
|
@@ -74,7 +88,8 @@ Install only what you use:
|
|
|
74
88
|
|---------|----------|
|
|
75
89
|
| Toasts (`./ui/toaster`, `./ui/toast`) | `sonner` |
|
|
76
90
|
| Charts (`./ui/charts`) | `d3-array`, `d3-axis`, `d3-format`, `d3-interpolate`, `d3-scale`, `d3-selection`, `d3-shape`, `d3-time-format`, `d3-transition` |
|
|
77
|
-
| Rich Text Editor (`./composed/rich-text-editor`) | `@tiptap/react`, `@tiptap/starter-kit` |
|
|
91
|
+
| Rich Text Editor (`./composed/rich-text-editor`) | `@tiptap/core`, `@tiptap/extension-highlight`, `@tiptap/extension-image`, `@tiptap/extension-list`, `@tiptap/extension-mention`, `@tiptap/extension-text-align`, `@tiptap/extensions`, `@tiptap/markdown`, `@tiptap/pm`, `@tiptap/react`, `@tiptap/starter-kit`, `@tiptap/suggestion` |
|
|
92
|
+
| Rich Chat Input (`./composed/rich-chat-input`) | the Rich Text Editor list, plus `date-fns` |
|
|
78
93
|
| DataTable (`./ui/data-table`) | `@tanstack/react-table`, `@tanstack/react-virtual` |
|
|
79
94
|
| Icons | `@tabler/icons-react` |
|
|
80
95
|
| Date components (`./composed/date-picker`) | `date-fns` |
|
|
@@ -1,128 +1,142 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Slot as e } from "./primitives-internal.js";
|
|
3
3
|
import { durations as t, springs as n } from "../ui/lib/motion.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
4
|
+
import { cn as r } from "../ui/lib/utils.js";
|
|
5
|
+
import { Icon as i } from "../ui/icon.js";
|
|
6
|
+
import { Dot as a } from "../ui/dot.js";
|
|
7
|
+
import { normalizeIcon as o } from "./normalize-icon.js";
|
|
8
|
+
import { BadgeIndicator as s } from "../ui/badge-indicator.js";
|
|
9
|
+
import * as c from "react";
|
|
10
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
|
+
import { IconCheck as d, IconX as f } from "@tabler/icons-react";
|
|
12
|
+
import { AnimatePresence as p, motion as m } from "framer-motion";
|
|
13
|
+
import { cva as h } from "class-variance-authority";
|
|
14
14
|
//#region src/ui/badge.tsx
|
|
15
15
|
var g = {
|
|
16
16
|
default: {
|
|
17
|
-
bg: "bg-surface-
|
|
17
|
+
bg: "bg-surface-panel-hover",
|
|
18
|
+
softBg: "bg-surface-panel-hover",
|
|
18
19
|
fg: "text-surface-fg-muted",
|
|
19
20
|
border: "border-surface-border-strong",
|
|
20
21
|
solid: "bg-neutral-5",
|
|
21
22
|
solidFg: "text-surface-fg"
|
|
22
23
|
},
|
|
23
24
|
accent: {
|
|
24
|
-
bg: "bg-accent-
|
|
25
|
+
bg: "bg-accent-2",
|
|
26
|
+
softBg: "bg-accent-3",
|
|
25
27
|
fg: "text-accent-11",
|
|
26
|
-
border: "border-accent-
|
|
28
|
+
border: "border-accent-4",
|
|
27
29
|
solid: "bg-accent-9",
|
|
28
30
|
solidFg: "text-accent-fg"
|
|
29
31
|
},
|
|
30
32
|
error: {
|
|
31
|
-
bg: "bg-error-
|
|
33
|
+
bg: "bg-error-2",
|
|
34
|
+
softBg: "bg-error-3",
|
|
32
35
|
fg: "text-error-11",
|
|
33
|
-
border: "border-error-
|
|
36
|
+
border: "border-error-4",
|
|
34
37
|
solid: "bg-error-9",
|
|
35
38
|
solidFg: "text-error-fg"
|
|
36
39
|
},
|
|
37
40
|
success: {
|
|
38
|
-
bg: "bg-success-
|
|
41
|
+
bg: "bg-success-2",
|
|
42
|
+
softBg: "bg-success-3",
|
|
39
43
|
fg: "text-success-11",
|
|
40
|
-
border: "border-success-
|
|
44
|
+
border: "border-success-4",
|
|
41
45
|
solid: "bg-success-9",
|
|
42
46
|
solidFg: "text-success-fg"
|
|
43
47
|
},
|
|
44
48
|
warning: {
|
|
45
|
-
bg: "bg-warning-
|
|
49
|
+
bg: "bg-warning-2",
|
|
50
|
+
softBg: "bg-warning-3",
|
|
46
51
|
fg: "text-warning-11",
|
|
47
|
-
border: "border-warning-
|
|
52
|
+
border: "border-warning-4",
|
|
48
53
|
solid: "bg-warning-9",
|
|
49
54
|
solidFg: "text-warning-fg"
|
|
50
55
|
},
|
|
51
56
|
info: {
|
|
52
|
-
bg: "bg-info-
|
|
57
|
+
bg: "bg-info-2",
|
|
58
|
+
softBg: "bg-info-3",
|
|
53
59
|
fg: "text-info-11",
|
|
54
|
-
border: "border-info-
|
|
60
|
+
border: "border-info-4",
|
|
55
61
|
solid: "bg-info-9",
|
|
56
62
|
solidFg: "text-info-fg"
|
|
57
63
|
},
|
|
58
64
|
neutral: {
|
|
59
|
-
bg: "bg-surface-
|
|
65
|
+
bg: "bg-surface-panel-hover",
|
|
66
|
+
softBg: "bg-surface-panel-hover",
|
|
60
67
|
fg: "text-surface-fg-muted",
|
|
61
68
|
border: "border-surface-border-strong",
|
|
62
69
|
solid: "bg-neutral-5",
|
|
63
70
|
solidFg: "text-surface-fg"
|
|
64
71
|
},
|
|
65
72
|
teal: {
|
|
66
|
-
bg: "bg-category-teal-
|
|
73
|
+
bg: "bg-category-teal-2",
|
|
74
|
+
softBg: "bg-category-teal-3",
|
|
67
75
|
fg: "text-category-teal-11",
|
|
68
|
-
border: "border-category-teal-
|
|
76
|
+
border: "border-category-teal-4",
|
|
69
77
|
solid: "bg-category-teal-9",
|
|
70
|
-
solidFg: "text-
|
|
78
|
+
solidFg: "text-category-fg"
|
|
71
79
|
},
|
|
72
80
|
amber: {
|
|
73
|
-
bg: "bg-category-amber-
|
|
81
|
+
bg: "bg-category-amber-2",
|
|
82
|
+
softBg: "bg-category-amber-3",
|
|
74
83
|
fg: "text-category-amber-11",
|
|
75
|
-
border: "border-category-amber-
|
|
84
|
+
border: "border-category-amber-4",
|
|
76
85
|
solid: "bg-category-amber-9",
|
|
77
|
-
solidFg: "text-
|
|
86
|
+
solidFg: "text-category-fg"
|
|
78
87
|
},
|
|
79
88
|
slate: {
|
|
80
|
-
bg: "bg-category-slate-
|
|
89
|
+
bg: "bg-category-slate-2",
|
|
90
|
+
softBg: "bg-category-slate-3",
|
|
81
91
|
fg: "text-category-slate-11",
|
|
82
|
-
border: "border-category-slate-
|
|
92
|
+
border: "border-category-slate-4",
|
|
83
93
|
solid: "bg-category-slate-9",
|
|
84
|
-
solidFg: "text-
|
|
94
|
+
solidFg: "text-category-fg"
|
|
85
95
|
},
|
|
86
96
|
indigo: {
|
|
87
|
-
bg: "bg-category-indigo-
|
|
97
|
+
bg: "bg-category-indigo-2",
|
|
98
|
+
softBg: "bg-category-indigo-3",
|
|
88
99
|
fg: "text-category-indigo-11",
|
|
89
|
-
border: "border-category-indigo-
|
|
100
|
+
border: "border-category-indigo-4",
|
|
90
101
|
solid: "bg-category-indigo-9",
|
|
91
|
-
solidFg: "text-
|
|
102
|
+
solidFg: "text-category-fg"
|
|
92
103
|
},
|
|
93
104
|
cyan: {
|
|
94
|
-
bg: "bg-category-cyan-
|
|
105
|
+
bg: "bg-category-cyan-2",
|
|
106
|
+
softBg: "bg-category-cyan-3",
|
|
95
107
|
fg: "text-category-cyan-11",
|
|
96
|
-
border: "border-category-cyan-
|
|
108
|
+
border: "border-category-cyan-4",
|
|
97
109
|
solid: "bg-category-cyan-9",
|
|
98
|
-
solidFg: "text-
|
|
110
|
+
solidFg: "text-category-fg"
|
|
99
111
|
},
|
|
100
112
|
orange: {
|
|
101
|
-
bg: "bg-category-orange-
|
|
113
|
+
bg: "bg-category-orange-2",
|
|
114
|
+
softBg: "bg-category-orange-3",
|
|
102
115
|
fg: "text-category-orange-11",
|
|
103
|
-
border: "border-category-orange-
|
|
116
|
+
border: "border-category-orange-4",
|
|
104
117
|
solid: "bg-category-orange-9",
|
|
105
|
-
solidFg: "text-
|
|
118
|
+
solidFg: "text-category-fg"
|
|
106
119
|
},
|
|
107
120
|
emerald: {
|
|
108
|
-
bg: "bg-category-emerald-
|
|
121
|
+
bg: "bg-category-emerald-2",
|
|
122
|
+
softBg: "bg-category-emerald-3",
|
|
109
123
|
fg: "text-category-emerald-11",
|
|
110
|
-
border: "border-category-emerald-
|
|
124
|
+
border: "border-category-emerald-4",
|
|
111
125
|
solid: "bg-category-emerald-9",
|
|
112
|
-
solidFg: "text-
|
|
126
|
+
solidFg: "text-category-fg"
|
|
113
127
|
}
|
|
114
128
|
};
|
|
115
129
|
function _(e, t) {
|
|
116
130
|
if (t === "custom") return "";
|
|
117
131
|
let n = g[t];
|
|
118
132
|
switch (e) {
|
|
119
|
-
case "subtle": return
|
|
120
|
-
case "solid": return
|
|
121
|
-
case "outline": return
|
|
122
|
-
case "soft": return
|
|
133
|
+
case "subtle": return r(n.bg, n.fg, n.border);
|
|
134
|
+
case "solid": return r(n.solid, n.solidFg, "border-transparent");
|
|
135
|
+
case "outline": return r("bg-transparent", n.fg, n.border);
|
|
136
|
+
case "soft": return r(n.softBg, n.fg, "border-transparent");
|
|
123
137
|
}
|
|
124
138
|
}
|
|
125
|
-
var v =
|
|
139
|
+
var v = h("relative inline-flex items-center rounded-pill font-sans font-medium overflow-hidden isolate transition-[color,background-color,border-color,padding] duration-fast-02 ease-productive-standard select-none [&>span:not([data-grain])]:relative [&>span:not([data-grain])]:z-[2]", {
|
|
126
140
|
variants: {
|
|
127
141
|
variant: {
|
|
128
142
|
subtle: "border",
|
|
@@ -156,8 +170,8 @@ var v = r("relative inline-flex items-center rounded-pill font-sans font-medium
|
|
|
156
170
|
sm: "pr-ds-02",
|
|
157
171
|
md: "pr-ds-02",
|
|
158
172
|
lg: "pr-ds-02b"
|
|
159
|
-
}, S =
|
|
160
|
-
let R = c ?? "subtle", z =
|
|
173
|
+
}, S = c.forwardRef(({ className: s, variant: c, color: h, size: g, asChild: S, startIcon: C, endIcon: w, dot: T, dotPulse: E, onDismiss: D, onClick: O, selected: k, disabled: A, maxWidth: j, truncate: M, circle: N, children: P, style: F, ...I }, L) => {
|
|
174
|
+
let R = c ?? "subtle", z = h ?? "default", B = g ?? "md", V = S ? e : O && D ? "div" : O ? "button" : "span", H = z === "custom" ? {
|
|
161
175
|
...R === "subtle" && {
|
|
162
176
|
backgroundColor: "color-mix(in oklch, var(--badge-color) 15%, transparent)",
|
|
163
177
|
color: "var(--badge-color)",
|
|
@@ -181,12 +195,12 @@ var v = r("relative inline-flex items-center rounded-pill font-sans font-medium
|
|
|
181
195
|
} : void 0, U = O && D ? (e) => {
|
|
182
196
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), A || O(e)), I.onKeyDown?.(e);
|
|
183
197
|
} : I.onKeyDown, W = !!(T || C || O && k && !C && !T), G = !!(D || w);
|
|
184
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ u(V, {
|
|
185
199
|
ref: L,
|
|
186
|
-
className:
|
|
200
|
+
className: r(v({
|
|
187
201
|
variant: R,
|
|
188
202
|
size: B
|
|
189
|
-
}), _(R, z), W && b[B], G && x[B], O && "cursor-pointer hover:brightness-[0.97] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-1 transition-[color,background-color,border-color,transform,filter] duration-moderate-01 ease-productive-exit hover:duration-fast-02 hover:ease-productive-entrance active:scale-[0.95] active:brightness-[0.92] active:duration-[0ms]", k && "ring-1 ring-current/20 transition-shadow duration-fast-02", A && "opacity-action-disabled pointer-events-none saturate-[0.3]", N && "justify-center px-0 aspect-square",
|
|
203
|
+
}), _(R, z), W && b[B], G && x[B], O && "cursor-pointer hover:brightness-[0.97] focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-1 transition-[color,background-color,border-color,transform,filter] duration-moderate-01 ease-productive-exit hover:duration-fast-02 hover:ease-productive-entrance active:scale-[0.95] active:brightness-[0.92] active:duration-[0ms]", k && "ring-1 ring-current/20 transition-shadow duration-fast-02", A && "opacity-action-disabled pointer-events-none saturate-[0.3]", N && "justify-center px-0 aspect-square", s),
|
|
190
204
|
style: {
|
|
191
205
|
...F,
|
|
192
206
|
...H,
|
|
@@ -202,19 +216,19 @@ var v = r("relative inline-flex items-center rounded-pill font-sans font-medium
|
|
|
202
216
|
} : {},
|
|
203
217
|
...I,
|
|
204
218
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ l(p, { children: T && /* @__PURE__ */ l(m.span, {
|
|
206
220
|
initial: { scale: 0 },
|
|
207
221
|
animate: { scale: 1 },
|
|
208
222
|
exit: { scale: 0 },
|
|
209
223
|
transition: n.snappy,
|
|
210
224
|
className: "inline-flex shrink-0",
|
|
211
|
-
children: /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ l(a, {
|
|
212
226
|
color: "current",
|
|
213
227
|
size: "sm",
|
|
214
228
|
pulse: E
|
|
215
229
|
})
|
|
216
230
|
}, "dot") }),
|
|
217
|
-
O && !C && !T && /* @__PURE__ */
|
|
231
|
+
O && !C && !T && /* @__PURE__ */ l(m.span, {
|
|
218
232
|
initial: !1,
|
|
219
233
|
animate: k ? {
|
|
220
234
|
opacity: 1,
|
|
@@ -239,33 +253,33 @@ var v = r("relative inline-flex items-center rounded-pill font-sans font-medium
|
|
|
239
253
|
},
|
|
240
254
|
className: "inline-flex shrink-0 overflow-hidden",
|
|
241
255
|
"aria-hidden": !k,
|
|
242
|
-
children: /* @__PURE__ */
|
|
243
|
-
icon:
|
|
256
|
+
children: /* @__PURE__ */ l(i, {
|
|
257
|
+
icon: d,
|
|
244
258
|
size: "xs"
|
|
245
259
|
})
|
|
246
260
|
}),
|
|
247
|
-
C && /* @__PURE__ */
|
|
248
|
-
className:
|
|
249
|
-
children:
|
|
261
|
+
C && /* @__PURE__ */ l("span", {
|
|
262
|
+
className: r("shrink-0", y[B]),
|
|
263
|
+
children: o(C)
|
|
250
264
|
}),
|
|
251
|
-
M || j ? /* @__PURE__ */
|
|
265
|
+
M || j ? /* @__PURE__ */ l("span", {
|
|
252
266
|
className: "truncate",
|
|
253
267
|
title: typeof P == "string" ? P : void 0,
|
|
254
268
|
children: P
|
|
255
269
|
}) : P,
|
|
256
|
-
w && /* @__PURE__ */
|
|
257
|
-
className:
|
|
258
|
-
children:
|
|
270
|
+
w && /* @__PURE__ */ l("span", {
|
|
271
|
+
className: r("shrink-0", y[B]),
|
|
272
|
+
children: o(w)
|
|
259
273
|
}),
|
|
260
|
-
D && /* @__PURE__ */
|
|
274
|
+
D && /* @__PURE__ */ l("button", {
|
|
261
275
|
type: "button",
|
|
262
276
|
onClick: (e) => {
|
|
263
277
|
e.stopPropagation(), D();
|
|
264
278
|
},
|
|
265
|
-
className:
|
|
279
|
+
className: r("shrink-0 rounded-pill text-current/60 hover:text-current hover:bg-current/10 transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent-9", B === "xs" ? "p-0 -mr-0.5 min-w-ds-05 min-h-ds-05" : "p-px"),
|
|
266
280
|
"aria-label": `Remove ${typeof P == "string" ? P : ""}`.trim() || "Remove",
|
|
267
|
-
children: /* @__PURE__ */
|
|
268
|
-
icon:
|
|
281
|
+
children: /* @__PURE__ */ l(i, {
|
|
282
|
+
icon: f,
|
|
269
283
|
size: "xs"
|
|
270
284
|
})
|
|
271
285
|
})
|
|
@@ -274,24 +288,24 @@ var v = r("relative inline-flex items-center rounded-pill font-sans font-medium
|
|
|
274
288
|
});
|
|
275
289
|
S.displayName = "Badge";
|
|
276
290
|
var C = Object.assign(S, {
|
|
277
|
-
Indicator:
|
|
291
|
+
Indicator: s,
|
|
278
292
|
Group: T
|
|
279
293
|
}), w = {
|
|
280
294
|
tight: "gap-1",
|
|
281
295
|
default: "gap-1.5",
|
|
282
296
|
loose: "gap-2"
|
|
283
|
-
}, T =
|
|
284
|
-
let
|
|
285
|
-
return /* @__PURE__ */
|
|
286
|
-
ref:
|
|
287
|
-
className:
|
|
297
|
+
}, T = c.forwardRef(function({ max: e, gap: t = "default", size: n, onOverflowClick: i, className: a, children: o, ...s }, l) {
|
|
298
|
+
let d = c.Children.toArray(o), f = d.length, p = e !== void 0 && f > e, m = p ? d.slice(0, e) : d, h = p ? f - e : 0;
|
|
299
|
+
return /* @__PURE__ */ u("div", {
|
|
300
|
+
ref: l,
|
|
301
|
+
className: r("flex flex-wrap items-center", w[t], a),
|
|
288
302
|
...s,
|
|
289
|
-
children: [m, p && /* @__PURE__ */
|
|
303
|
+
children: [m, p && /* @__PURE__ */ u(C, {
|
|
290
304
|
variant: "outline",
|
|
291
305
|
color: "neutral",
|
|
292
306
|
size: n ?? "sm",
|
|
293
|
-
onClick:
|
|
294
|
-
"aria-label":
|
|
307
|
+
onClick: i,
|
|
308
|
+
"aria-label": i ? `Show ${h} more` : void 0,
|
|
295
309
|
children: ["+", h]
|
|
296
310
|
})]
|
|
297
311
|
});
|