@devalok/shilp-sutra 0.22.2 → 0.23.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/dist/_chunks/tree-view.js +26 -26
- package/dist/_chunks/use-calendar.js +106 -106
- package/dist/composed/activity-feed.js +10 -10
- package/dist/composed/avatar-group.js +74 -75
- package/dist/composed/command-palette.js +8 -8
- package/dist/composed/content-card.js +10 -10
- package/dist/composed/empty-state.js +6 -6
- package/dist/composed/error-boundary.js +2 -2
- package/dist/composed/loading-skeleton.js +83 -83
- package/dist/composed/member-picker.js +6 -6
- package/dist/composed/page-skeletons.js +5 -5
- package/dist/composed/rich-text-editor.js +63 -63
- package/dist/composed/schedule-view.js +26 -26
- package/dist/composed/status-badge.js +8 -8
- package/dist/shell/bottom-navbar.js +4 -4
- package/dist/shell/notification-center.js +29 -29
- package/dist/shell/notification-preferences.js +2 -2
- package/dist/shell/sidebar.js +6 -6
- package/dist/shell/top-bar.js +71 -71
- package/dist/tailwind/index.cjs +33 -11
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +33 -11
- package/dist/tokens/primitives.css +2 -0
- package/dist/tokens/semantic.css +83 -14
- package/dist/tokens/typography.css +1 -1
- package/dist/ui/accordion.js +1 -1
- package/dist/ui/alert-dialog.js +32 -32
- package/dist/ui/alert.js +12 -12
- package/dist/ui/autocomplete.js +16 -16
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +81 -74
- package/dist/ui/badge.js +2 -2
- package/dist/ui/banner.js +1 -1
- package/dist/ui/button.js +8 -8
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/card.js +10 -10
- package/dist/ui/charts/index.js +312 -312
- package/dist/ui/checkbox.js +3 -3
- package/dist/ui/chip.js +4 -4
- package/dist/ui/code.js +2 -2
- package/dist/ui/color-input.js +1 -1
- package/dist/ui/combobox.js +37 -37
- package/dist/ui/context-menu.js +6 -6
- package/dist/ui/data-table-toolbar.js +18 -18
- package/dist/ui/data-table.js +132 -132
- package/dist/ui/dialog.js +12 -12
- package/dist/ui/dropdown-menu.js +67 -67
- package/dist/ui/file-upload.js +3 -3
- package/dist/ui/hover-card.js +13 -13
- package/dist/ui/input-otp.js +9 -9
- package/dist/ui/input.js +10 -10
- package/dist/ui/menubar.js +33 -33
- package/dist/ui/navigation-menu.js +52 -52
- package/dist/ui/number-input.js +14 -14
- package/dist/ui/pagination.js +25 -25
- package/dist/ui/popover.js +17 -17
- package/dist/ui/progress.js +1 -1
- package/dist/ui/radio.js +2 -2
- package/dist/ui/search-input.js +3 -3
- package/dist/ui/segmented-control.d.ts +1 -1
- package/dist/ui/segmented-control.js +16 -16
- package/dist/ui/select.js +17 -17
- package/dist/ui/sheet.js +21 -21
- package/dist/ui/sidebar.js +13 -13
- package/dist/ui/slider.js +2 -2
- package/dist/ui/stat-card.js +52 -52
- package/dist/ui/stepper.js +1 -1
- package/dist/ui/switch.js +11 -11
- package/dist/ui/table.js +19 -19
- package/dist/ui/tabs.js +2 -2
- package/dist/ui/textarea.js +6 -6
- package/dist/ui/toast.js +3 -3
- package/dist/ui/toggle.js +7 -7
- package/dist/ui/tooltip.js +17 -17
- package/docs/components/composed/avatar-group.md +5 -0
- package/docs/components/ui/avatar.md +4 -0
- package/llms-full.txt +10 -1
- package/llms.txt +66 -5
- package/package.json +1 -1
|
@@ -34,11 +34,15 @@
|
|
|
34
34
|
## Gotchas
|
|
35
35
|
- Status dot renders with role="img" and aria-label (accessible, not decorative)
|
|
36
36
|
- Dot size scales automatically with avatar size
|
|
37
|
+
- AvatarFallback font size scales automatically with avatar size (via AvatarSizeContext)
|
|
37
38
|
- Ring offset color matches the surface context — ensure it sits on the expected background
|
|
38
39
|
- Badge is hidden when value is `0` (falsy); use `"dot"` for presence without a count
|
|
39
40
|
- Online status dot pulses with a CSS animation
|
|
40
41
|
|
|
41
42
|
## Changes
|
|
43
|
+
### v0.22.3
|
|
44
|
+
- **Fixed** AvatarFallback text now auto-scales with avatar size — xs gets `text-[9px]`, sm `text-ds-xs`, md `text-ds-sm`, lg `text-ds-md`, xl `text-ds-lg`
|
|
45
|
+
|
|
42
46
|
### v0.22.0
|
|
43
47
|
- **Fixed** Fallback always rendered `rounded-ds-full` regardless of `shape` prop. Now uses `AvatarShapeContext` to inherit the correct border-radius from `shape="square"` or `shape="rounded"`.
|
|
44
48
|
|
package/llms-full.txt
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> All variant values and props verified from source CVA definitions.
|
|
6
6
|
>
|
|
7
7
|
> Package: @devalok/shilp-sutra
|
|
8
|
-
> Version: 0.
|
|
8
|
+
> Version: 0.23.0
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -353,11 +353,15 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
|
|
|
353
353
|
## Gotchas
|
|
354
354
|
- Status dot renders with role="img" and aria-label (accessible, not decorative)
|
|
355
355
|
- Dot size scales automatically with avatar size
|
|
356
|
+
- AvatarFallback font size scales automatically with avatar size (via AvatarSizeContext)
|
|
356
357
|
- Ring offset color matches the surface context — ensure it sits on the expected background
|
|
357
358
|
- Badge is hidden when value is `0` (falsy); use `"dot"` for presence without a count
|
|
358
359
|
- Online status dot pulses with a CSS animation
|
|
359
360
|
|
|
360
361
|
## Changes
|
|
362
|
+
### v0.22.3
|
|
363
|
+
- **Fixed** AvatarFallback text now auto-scales with avatar size — xs gets `text-[9px]`, sm `text-ds-xs`, md `text-ds-sm`, lg `text-ds-md`, xl `text-ds-lg`
|
|
364
|
+
|
|
361
365
|
### v0.22.0
|
|
362
366
|
- **Fixed** Fallback always rendered `rounded-ds-full` regardless of `shape` prop. Now uses `AvatarShapeContext` to inherit the correct border-radius from `shape="square"` or `shape="rounded"`.
|
|
363
367
|
|
|
@@ -3042,8 +3046,13 @@ export default function RootLayout({ children }) {
|
|
|
3042
3046
|
- Missing `image` falls back to initials derived from `name`
|
|
3043
3047
|
- Hover expand animation uses CSS `group-hover` — parent must not clip overflow
|
|
3044
3048
|
- `borderColor` should match the surface context the group sits on (e.g., `surface-1` on cards)
|
|
3049
|
+
- `renderAvatar` wrapper is positioning-only — pass `size` directly to your Avatar (do NOT use `className="h-full w-full"`)
|
|
3045
3050
|
|
|
3046
3051
|
## Changes
|
|
3052
|
+
### v0.22.3
|
|
3053
|
+
- **Fixed** `renderAvatar` wrapper no longer clips consumer Avatar content (removed overflow-hidden, border, and size classes from wrapper)
|
|
3054
|
+
- **Fixed** Removed redundant text-size classes from wrapper — Avatar handles font scaling internally
|
|
3055
|
+
|
|
3047
3056
|
### v0.21.0
|
|
3048
3057
|
- **Added** `xs` and `xl` size variants
|
|
3049
3058
|
- **Added** `borderColor` prop for overlap border matching surface context
|
package/llms.txt
CHANGED
|
@@ -4,6 +4,65 @@
|
|
|
4
4
|
> Built on the same primitives as shadcn/ui but with key API differences.
|
|
5
5
|
> Read this file BEFORE writing any UI code. Do NOT guess from shadcn/ui knowledge.
|
|
6
6
|
|
|
7
|
+
## BREAKING CHANGES (v0.23.0 — Semantic Surface & Shadow Tokens)
|
|
8
|
+
|
|
9
|
+
**Surface tokens renamed:** Numeric `surface-1..4` replaced with semantic names.
|
|
10
|
+
| Old | New | Usage |
|
|
11
|
+
|-----|-----|-------|
|
|
12
|
+
| `bg-surface-1` | `bg-surface-base` | Page background |
|
|
13
|
+
| `bg-surface-1` | `bg-surface-sunken` | Shell chrome (sidebar, topbar), board columns |
|
|
14
|
+
| `bg-surface-1` | `bg-surface-overlay` | Dialogs, popovers, dropdowns, inputs |
|
|
15
|
+
| `bg-surface-2` | `bg-surface-raised` | Cards, widgets, panels |
|
|
16
|
+
| `bg-surface-3` | `bg-surface-raised-hover` | Hover states on raised elements |
|
|
17
|
+
| `bg-surface-4` | `bg-surface-raised-active` | Active/pressed states |
|
|
18
|
+
|
|
19
|
+
Same pattern for `border-surface-*`, `text-surface-*`, `ring-surface-*`.
|
|
20
|
+
|
|
21
|
+
**Shadow tokens renamed:** Numeric `shadow-01..05` replaced with semantic names.
|
|
22
|
+
| Old | New |
|
|
23
|
+
|-----|-----|
|
|
24
|
+
| `shadow-01` | `shadow-raised` |
|
|
25
|
+
| `shadow-02` | `shadow-raised-hover` |
|
|
26
|
+
| `shadow-03` | `shadow-floating` |
|
|
27
|
+
| `shadow-04` | `shadow-overlay` |
|
|
28
|
+
| `shadow-05` | (removed — was unused) |
|
|
29
|
+
|
|
30
|
+
**New surface tokens:**
|
|
31
|
+
- `bg-surface-sunken` — recessed areas (sidebar, board columns, segmented track)
|
|
32
|
+
- `bg-surface-overlay` — floating elements (dialogs, popovers, inputs). Diverges from base in dark mode.
|
|
33
|
+
- `bg-surface-inverted` / `text-surface-inverted-fg` — tooltips, inverted badges
|
|
34
|
+
- `bg-surface-disabled` / `text-surface-fg-disabled` — disabled elements
|
|
35
|
+
- `border-surface-border-subtle` — hairline dividers
|
|
36
|
+
- `bg-backdrop` — dialog/sheet backdrop overlay
|
|
37
|
+
|
|
38
|
+
**New shadow tokens:**
|
|
39
|
+
- `shadow-glow` — selection/focus accent glow
|
|
40
|
+
- `shadow-inset` — toggle/segmented track deboss
|
|
41
|
+
- `shadow-ring` / `shadow-ring-sm` — focus ring / subtle separator
|
|
42
|
+
|
|
43
|
+
**Hard rule: never combine explicit border + shadow.** Shadows include a 1px ring layer. Adding a CSS border creates a 2px edge. Use shadow OR border, never both.
|
|
44
|
+
|
|
45
|
+
**Backward compat:** Old CSS variable names (`--color-surface-1`, `--shadow-01`) preserved as aliases. Old Tailwind classes still resolve. Will be removed in a future major version.
|
|
46
|
+
|
|
47
|
+
**Component Decision Matrix:**
|
|
48
|
+
| Building... | Surface | Shadow |
|
|
49
|
+
|-------------|---------|--------|
|
|
50
|
+
| Page/layout | `surface-base` | none |
|
|
51
|
+
| Shell (sidebar/topbar) | `surface-sunken` | `shadow-raised` |
|
|
52
|
+
| Card/widget/panel | `surface-raised` | `shadow-raised` |
|
|
53
|
+
| Card hover | `surface-raised` | `shadow-raised-hover` |
|
|
54
|
+
| Board column/well | `surface-sunken` | none |
|
|
55
|
+
| Popover/menu/dropdown | `surface-overlay` | `shadow-floating` |
|
|
56
|
+
| Dialog/modal/sheet | `surface-overlay` | `shadow-overlay` |
|
|
57
|
+
| Tooltip | `surface-inverted` | `shadow-floating` |
|
|
58
|
+
| Toast | `surface-overlay` | `shadow-floating` |
|
|
59
|
+
| Input (rest) | `surface-overlay` | none |
|
|
60
|
+
| Input (focus) | `surface-overlay` | `shadow-ring` |
|
|
61
|
+
| Button (solid) | accent colors | `shadow-raised` |
|
|
62
|
+
| Button (disabled) | `surface-disabled` | none |
|
|
63
|
+
| Segmented track | `surface-sunken` | `shadow-inset` |
|
|
64
|
+
| Selected item | current surface | `shadow-glow` |
|
|
65
|
+
|
|
7
66
|
## BREAKING CHANGES (v0.18.0 — Framer Motion + OKLCH)
|
|
8
67
|
|
|
9
68
|
**New runtime dependency:** `framer-motion@^12.36.0` (bundled). Karm consumers must install `framer-motion@^12.0.0` as peer dep.
|
|
@@ -77,9 +136,9 @@
|
|
|
77
136
|
- All color primitives migrated from hex (50-950 shades) to OKLCH (12 functional steps)
|
|
78
137
|
- Old shade numbers: --pink-50..950. New step numbers: --pink-1..12 (OKLCH values)
|
|
79
138
|
- Step purposes: 1=app-bg, 2=subtle-bg, 3=component-bg, 4=hover, 5=active, 6=border-subtle, 7=border, 8=border-strong, 9=solid/accent, 10=solid-hover, 11=lo-contrast-text, 12=hi-contrast-text
|
|
80
|
-
- New semantic tokens: --color-accent-{1-12}, --color-secondary-{1-12}, --color-surface-{
|
|
139
|
+
- New semantic tokens: --color-accent-{1-12}, --color-secondary-{1-12}, --color-surface-{base,raised,raised-hover,raised-active,sunken,overlay,inverted,disabled}, --color-surface-fg/fg-muted/fg-subtle/border/border-subtle
|
|
81
140
|
- Status tokens: --color-error-{3,7,9,11,fg}, --color-success-{3,7,9,11,fg}, --color-warning-{3,7,9,11,fg}, --color-info-{3,7,9,11,fg}
|
|
82
|
-
- New Tailwind utilities: accent-1..12, secondary-1..12, surface-1..4, status/category step utilities
|
|
141
|
+
- New Tailwind utilities: accent-1..12, secondary-1..12, surface-base/raised/sunken/overlay/inverted/disabled (+ legacy surface-1..4 aliases), status/category step utilities
|
|
83
142
|
- Backward compat: ALL old semantic token names preserved as aliases. --color-interactive still works → maps to --color-accent-9
|
|
84
143
|
- Consumer rebranding: override --color-accent-1..12 CSS vars OR use generateScale() utility with a seed color
|
|
85
144
|
- Dark mode: algorithmically derived (OKLCH curves), NOT hex overrides. Surfaces lighten with elevation.
|
|
@@ -87,7 +146,7 @@
|
|
|
87
146
|
|
|
88
147
|
## v0.22.0 — UI Polish & Micro-Refinement
|
|
89
148
|
|
|
90
|
-
**Shadows**: All shadow tokens now use 3-layer stacks. Visual change only — same token names.
|
|
149
|
+
**Shadows**: All shadow tokens now use 3-layer stacks. Visual change only — same token names. Shadow tokens renamed in v0.23.0 (see breaking changes above).
|
|
91
150
|
|
|
92
151
|
**Transitions**: All CSS transitions use `ease-productive-standard` easing. Tween presets aligned: `tweens.fade` = 0.11s, `tweens.colorShift` = 0.07s.
|
|
93
152
|
|
|
@@ -101,7 +160,9 @@
|
|
|
101
160
|
|
|
102
161
|
**Tooltip**: Auto-wraps with `<TooltipProvider>` — no manual provider needed. Text color fixed for dark mode.
|
|
103
162
|
|
|
104
|
-
**Avatar fallback**: Now respects `shape` prop (was always circle).
|
|
163
|
+
**Avatar fallback**: Now respects `shape` prop (was always circle). Font size auto-scales with avatar size (v0.22.3).
|
|
164
|
+
|
|
165
|
+
**AvatarGroup renderAvatar**: Wrapper is positioning-only — pass `size` directly to your Avatar, do NOT use `className="h-full w-full"` (v0.22.3).
|
|
105
166
|
|
|
106
167
|
**New hover states**: Checkbox, Radio, Switch track, Select items, DropdownMenu items, Combobox trigger.
|
|
107
168
|
|
|
@@ -242,7 +303,7 @@ NOTIFICATION SELECTION GUIDE:
|
|
|
242
303
|
### Composed Components
|
|
243
304
|
- ConfirmDialog: open, onOpenChange, title, description, onConfirm + confirmText, cancelText, color(default|error), loading
|
|
244
305
|
- PageHeader: title, subtitle, breadcrumbs[], actions(ReactNode)
|
|
245
|
-
- AvatarGroup: users(AvatarUser[]), max?(number), size?(xs|sm|md|lg|xl), showTooltip?, borderColor?('surface-
|
|
306
|
+
- AvatarGroup: users(AvatarUser[]), max?(number), size?(xs|sm|md|lg|xl), showTooltip?, borderColor?('surface-base'|'surface-raised'), onOverflowClick?(), renderAvatar?((user,index)=>ReactNode), expandDirection?('left'|'right'), expandAmount?('compact'|'default'|'wide'). Type: AvatarUser = { name, image?, ring? }. GPU-composited hover expand via translateX. Use expandDirection="left" for right-aligned groups.
|
|
246
307
|
- StatusBadge: DISCRIMINATED UNION — pass status OR color, not both. status(active|pending|approved|rejected|completed|blocked|cancelled|draft) color(success|warning|error|info|neutral) size(sm|md)
|
|
247
308
|
- ContentCard: variant(default|outline|ghost) padding(default|compact|spacious|none)
|
|
248
309
|
- EmptyState: icon(ReactNode or ComponentType), title(required), description, action(ReactNode), compact
|