@devalok/shilp-sutra 0.27.2 → 0.29.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/badge-group.js +299 -0
- package/dist/_chunks/framer.js +1915 -1980
- package/dist/_chunks/keybinding.js +4 -5
- package/dist/_chunks/primitives.js +3198 -3272
- package/dist/_chunks/sonner.js +29 -31
- package/dist/_chunks/stat-row.js +110 -131
- package/dist/_chunks/tiptap.js +42 -78
- package/dist/_chunks/tree-view.js +138 -149
- package/dist/_chunks/typing-indicator.js +565 -0
- package/dist/_chunks/use-calendar.js +416 -439
- package/dist/_chunks/vendor-client.js +977 -814
- package/dist/_chunks/vendor-utils.js +5 -5
- package/dist/ai/block-renderer.js +22 -22
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +241 -263
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +87 -107
- package/dist/composed/activity-feed.d.ts +2 -0
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +118 -90
- package/dist/composed/avatar-group.d.ts +1 -0
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +91 -67
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +29 -28
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +99 -113
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +29 -28
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +30 -27
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +261 -271
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +49 -48
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +12 -11
- package/dist/composed/global-loading.js +1 -1
- package/dist/composed/index.js +63 -63
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +55 -54
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +44 -43
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +35 -34
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +64 -64
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js +31 -37
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +37 -36
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +287 -306
- package/dist/composed/schedule-view.js +62 -62
- package/dist/composed/status-badge.d.ts +4 -2
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +58 -45
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +93 -93
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +21 -20
- package/dist/shell/index.js +18 -18
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +96 -95
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +82 -85
- package/dist/shell/sidebar.js +59 -60
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +103 -103
- package/dist/tailwind/index.cjs +37 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +38 -5
- package/dist/tokens/primitives.css +10 -0
- package/dist/tokens/semantic.css +70 -7
- package/dist/ui/accordion.d.ts +5 -2
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +44 -39
- package/dist/ui/alert-dialog.js +57 -57
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +30 -29
- package/dist/ui/aspect-ratio.js +4 -4
- package/dist/ui/autocomplete.js +56 -56
- package/dist/ui/avatar.js +2 -2
- package/dist/ui/badge-group.d.ts +22 -0
- package/dist/ui/badge-group.d.ts.map +1 -0
- package/dist/ui/badge-group.js +8 -0
- package/dist/ui/badge-indicator.d.ts +32 -0
- package/dist/ui/badge-indicator.d.ts.map +1 -0
- package/dist/ui/badge-indicator.js +54 -0
- package/dist/ui/badge.d.ts +27 -24
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +13 -129
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +27 -26
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +37 -36
- package/dist/ui/button-group.d.ts +12 -6
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js +18 -18
- package/dist/ui/button-processing.d.ts +15 -0
- package/dist/ui/button-processing.d.ts.map +1 -0
- package/dist/ui/button-processing.js +77 -0
- package/dist/ui/button.d.ts +50 -25
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +243 -127
- package/dist/ui/card.js +20 -21
- package/dist/ui/charts/index.js +499 -508
- package/dist/ui/chat/date-separator.d.ts +12 -0
- package/dist/ui/chat/date-separator.d.ts.map +1 -0
- package/dist/ui/chat/index.d.ts +9 -0
- package/dist/ui/chat/index.d.ts.map +1 -0
- package/dist/ui/chat/index.js +12 -0
- package/dist/ui/chat/message-input.d.ts +16 -0
- package/dist/ui/chat/message-input.d.ts.map +1 -0
- package/dist/ui/chat/message-list.d.ts +24 -0
- package/dist/ui/chat/message-list.d.ts.map +1 -0
- package/dist/ui/chat/message.d.ts +108 -0
- package/dist/ui/chat/message.d.ts.map +1 -0
- package/dist/ui/chat/system-message.d.ts +11 -0
- package/dist/ui/chat/system-message.d.ts.map +1 -0
- package/dist/ui/chat/typing-indicator.d.ts +14 -0
- package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
- package/dist/ui/chat/unread-separator.d.ts +12 -0
- package/dist/ui/chat/unread-separator.d.ts.map +1 -0
- package/dist/ui/checkbox.js +18 -18
- package/dist/ui/chip.d.ts +13 -62
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +10 -109
- package/dist/ui/collapsible.js +4 -4
- package/dist/ui/color-input.d.ts +19 -5
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +371 -79
- package/dist/ui/color-swatch.js +11 -11
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +74 -80
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +86 -85
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +51 -57
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +268 -296
- package/dist/ui/devalok-grain.d.ts +81 -0
- package/dist/ui/devalok-grain.d.ts.map +1 -0
- package/dist/ui/devalok-grain.js +69 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +73 -72
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +93 -92
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +82 -82
- package/dist/ui/hover-card.js +29 -29
- package/dist/ui/icon-button.d.ts +7 -7
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-context.d.ts +15 -0
- package/dist/ui/icon-context.d.ts.map +1 -0
- package/dist/ui/icon-context.js +20 -0
- package/dist/ui/icon-group.d.ts +22 -0
- package/dist/ui/icon-group.d.ts.map +1 -0
- package/dist/ui/icon-group.js +32 -0
- package/dist/ui/icon.d.ts +57 -0
- package/dist/ui/icon.d.ts.map +1 -0
- package/dist/ui/icon.js +122 -0
- package/dist/ui/index.d.ts +8 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +351 -329
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +21 -20
- package/dist/ui/input.d.ts +32 -11
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +149 -44
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/motion.d.ts +2 -0
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +13 -11
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +87 -86
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +23 -28
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +54 -53
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js +45 -44
- package/dist/ui/popover.js +30 -30
- package/dist/ui/progress.d.ts +3 -1
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +43 -39
- package/dist/ui/radio.js +1 -1
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +47 -60
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +54 -53
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +46 -45
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +196 -193
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.js +1 -1
- package/dist/ui/spinner.js +74 -74
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +85 -86
- package/dist/ui/switch.d.ts +3 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +40 -26
- package/dist/ui/tabs.js +43 -43
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +10 -10
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +169 -169
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +5 -5
- package/dist/ui/tooltip.js +41 -41
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/docs/components/_header.md +4 -4
- package/docs/components/composed/activity-feed.md +7 -0
- package/docs/components/composed/avatar-group.md +8 -5
- package/docs/components/composed/status-badge.md +14 -1
- package/docs/components/ui/accordion.md +5 -2
- package/docs/components/ui/badge-group.md +38 -0
- package/docs/components/ui/badge-indicator.md +40 -0
- package/docs/components/ui/badge.md +36 -5
- package/docs/components/ui/button-processing.md +15 -0
- package/docs/components/ui/button.md +40 -11
- package/docs/components/ui/chat.md +214 -0
- package/docs/components/ui/color-input.md +58 -4
- package/docs/components/ui/data-table.md +3 -0
- package/docs/components/ui/devalok-grain.md +55 -0
- package/docs/components/ui/icon-button.md +12 -5
- package/docs/components/ui/icon-context.md +38 -0
- package/docs/components/ui/icon-group.md +36 -0
- package/docs/components/ui/icon.md +47 -0
- package/docs/components/ui/input.md +32 -6
- package/docs/components/ui/progress.md +5 -0
- package/docs/components/ui/spinner.md +3 -0
- package/docs/components/ui/switch.md +13 -0
- package/llms-full.txt +724 -44
- package/llms.txt +38 -19
- package/package.json +8 -2
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { cn as r } from "./lib/utils.js";
|
|
4
|
+
import { springs as x } from "./lib/motion.js";
|
|
5
|
+
import { u as b, A as u, m as h } from "../_chunks/framer.js";
|
|
6
|
+
const y = {
|
|
7
|
+
"top-right": "-top-1 -right-1",
|
|
8
|
+
"top-left": "-top-1 -left-1",
|
|
9
|
+
"bottom-right": "-bottom-1 -right-1",
|
|
10
|
+
"bottom-left": "-bottom-1 -left-1"
|
|
11
|
+
}, w = {
|
|
12
|
+
error: "bg-error-9 text-error-fg",
|
|
13
|
+
success: "bg-success-9 text-success-fg",
|
|
14
|
+
warning: "bg-warning-9 text-warning-fg",
|
|
15
|
+
accent: "bg-accent-9 text-accent-fg",
|
|
16
|
+
info: "bg-info-9 text-info-fg"
|
|
17
|
+
};
|
|
18
|
+
function S({
|
|
19
|
+
count: t,
|
|
20
|
+
max: o = 99,
|
|
21
|
+
dot: e = !1,
|
|
22
|
+
color: s = "error",
|
|
23
|
+
invisible: a = !1,
|
|
24
|
+
showZero: c = !1,
|
|
25
|
+
placement: f = "top-right",
|
|
26
|
+
className: l,
|
|
27
|
+
children: p
|
|
28
|
+
}) {
|
|
29
|
+
const i = b(), g = !a && (e || t !== void 0 && (t > 0 || c)), m = t !== void 0 && t > o ? `${o}+` : t;
|
|
30
|
+
return /* @__PURE__ */ d("span", { className: r("relative inline-flex", l), children: [
|
|
31
|
+
p,
|
|
32
|
+
/* @__PURE__ */ n(u, { children: g && /* @__PURE__ */ n(
|
|
33
|
+
h.span,
|
|
34
|
+
{
|
|
35
|
+
initial: i ? { opacity: 0 } : { scale: 0, opacity: 0 },
|
|
36
|
+
animate: i ? { opacity: 1 } : { scale: 1, opacity: 1 },
|
|
37
|
+
exit: i ? { opacity: 0 } : { scale: 0, opacity: 0 },
|
|
38
|
+
transition: x.bouncy,
|
|
39
|
+
className: r(
|
|
40
|
+
"absolute flex items-center justify-center rounded-full font-sans font-semibold ring-2 ring-surface-raised",
|
|
41
|
+
w[s],
|
|
42
|
+
y[f],
|
|
43
|
+
e ? "h-2.5 w-2.5" : "min-w-[18px] h-[18px] px-1 text-[11px] leading-none"
|
|
44
|
+
),
|
|
45
|
+
children: !e && m
|
|
46
|
+
},
|
|
47
|
+
"indicator"
|
|
48
|
+
) })
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
S.displayName = "BadgeIndicator";
|
|
52
|
+
export {
|
|
53
|
+
S as BadgeIndicator
|
|
54
|
+
};
|
package/dist/ui/badge.d.ts
CHANGED
|
@@ -1,47 +1,50 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { BadgeIndicator } from './badge-indicator';
|
|
4
|
+
import { BadgeGroup } from './badge-group';
|
|
3
5
|
import * as React from 'react';
|
|
4
6
|
declare const badgeVariants: (props?: ({
|
|
5
|
-
variant?: "outline" | "solid" | "subtle" | "
|
|
6
|
-
color?: "accent" | "
|
|
7
|
+
variant?: "outline" | "solid" | "subtle" | "soft" | null | undefined;
|
|
8
|
+
color?: "default" | "accent" | "success" | "error" | "custom" | "cyan" | "indigo" | "orange" | "teal" | "info" | "warning" | "neutral" | "amber" | "slate" | "emerald" | null | undefined;
|
|
7
9
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
8
10
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
11
|
/**
|
|
10
|
-
*
|
|
11
|
-
* leading dot indicator, and a dismissible close button.
|
|
12
|
+
* Badge — a compact inline label with a two-axis variant system.
|
|
12
13
|
*
|
|
13
14
|
* **Two axes:**
|
|
14
|
-
* - `variant` controls **visual style**: `"subtle"`
|
|
15
|
-
* - `color` controls **semantic intent/category**:
|
|
16
|
-
* `"warning"` | `"brand"` | `"accent"` | `"teal"` | `"amber"` | `"slate"` | `"indigo"` | `"cyan"` | `"orange"` | `"emerald"`
|
|
15
|
+
* - `variant` controls **visual style**: `"subtle"` | `"solid"` | `"outline"` | `"soft"`
|
|
16
|
+
* - `color` controls **semantic intent/category**: 16 built-in colors + `"custom"` (CSS variable)
|
|
17
17
|
*
|
|
18
|
-
* **
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* boolean prop — the presence of `onDismiss` is the signal.
|
|
18
|
+
* **Interactive:** Pass `onClick` to make it a button. Pass `selected` for toggle state.
|
|
19
|
+
* **Dismissible:** Pass `onDismiss` to show a dismiss button.
|
|
20
|
+
* **Custom colors:** Set `color="custom"` and CSS variable `--badge-color` on a parent or via `style`.
|
|
21
|
+
* For light custom colors on solid variant, set `--badge-fg-color` to a dark value.
|
|
23
22
|
*
|
|
24
23
|
* @example
|
|
25
|
-
* // Status badge in a table cell:
|
|
26
24
|
* <Badge color="success">Active</Badge>
|
|
27
25
|
*
|
|
28
26
|
* @example
|
|
29
|
-
* // Notification count with dot indicator (solid fill for high contrast):
|
|
30
27
|
* <Badge variant="solid" size="sm" dot>3 new</Badge>
|
|
31
28
|
*
|
|
32
29
|
* @example
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* // Error badge for a failed job in a pipeline view:
|
|
38
|
-
* <Badge color="error" size="lg">Build failed</Badge>
|
|
39
|
-
* // These are just a few ways — feel free to combine props creatively!
|
|
30
|
+
* <Badge color="custom" style={{ '--badge-color': '#8b5cf6' } as React.CSSProperties}>
|
|
31
|
+
* Custom
|
|
32
|
+
* </Badge>
|
|
40
33
|
*/
|
|
41
|
-
|
|
34
|
+
interface BadgeProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'>, VariantProps<typeof badgeVariants> {
|
|
35
|
+
asChild?: boolean;
|
|
36
|
+
startIcon?: React.ReactElement | null;
|
|
37
|
+
endIcon?: React.ReactElement | null;
|
|
42
38
|
dot?: boolean;
|
|
43
39
|
onDismiss?: () => void;
|
|
40
|
+
selected?: boolean;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
maxWidth?: number;
|
|
43
|
+
circle?: boolean;
|
|
44
44
|
}
|
|
45
|
-
declare const
|
|
46
|
-
|
|
45
|
+
declare const BadgeCompound: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLElement>> & {
|
|
46
|
+
Indicator: typeof BadgeIndicator;
|
|
47
|
+
Group: typeof BadgeGroup;
|
|
48
|
+
};
|
|
49
|
+
export { BadgeCompound as Badge, badgeVariants, type BadgeProps };
|
|
47
50
|
//# sourceMappingURL=badge.d.ts.map
|
package/dist/ui/badge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,aAAa;;;;8EAyGlB,CAAA;AA0BD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,UAAU,UACR,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,EACtD,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;IACrC,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;IACnC,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AA6LD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,QAAA,MAAM,aAAa;;;CAGjB,CAAA;AAEF,OAAO,EAAE,aAAa,IAAI,KAAK,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,CAAA"}
|
package/dist/ui/badge.js
CHANGED
|
@@ -1,132 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
subtle: "",
|
|
14
|
-
secondary: "",
|
|
15
|
-
// alias → subtle
|
|
16
|
-
solid: "",
|
|
17
|
-
outline: "",
|
|
18
|
-
destructive: ""
|
|
19
|
-
// alias → solid + error
|
|
20
|
-
},
|
|
21
|
-
color: {
|
|
22
|
-
default: "",
|
|
23
|
-
info: "",
|
|
24
|
-
success: "",
|
|
25
|
-
error: "",
|
|
26
|
-
warning: "",
|
|
27
|
-
brand: "",
|
|
28
|
-
accent: "",
|
|
29
|
-
teal: "",
|
|
30
|
-
amber: "",
|
|
31
|
-
slate: "",
|
|
32
|
-
indigo: "",
|
|
33
|
-
cyan: "",
|
|
34
|
-
orange: "",
|
|
35
|
-
emerald: ""
|
|
36
|
-
},
|
|
37
|
-
size: {
|
|
38
|
-
xs: "h-[16px] px-ds-02b text-ds-xs",
|
|
39
|
-
sm: "h-[20px] px-ds-03 text-ds-xs",
|
|
40
|
-
md: "h-ds-xs px-ds-03 text-ds-sm",
|
|
41
|
-
lg: "h-ds-xs-plus px-ds-04 text-ds-md"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
compoundVariants: [
|
|
45
|
-
// subtle (surface bg)
|
|
46
|
-
{ variant: "subtle", color: "default", className: "bg-surface-raised-hover text-surface-fg-muted border-surface-border-strong" },
|
|
47
|
-
// "secondary" alias → same as subtle + default
|
|
48
|
-
{ variant: "secondary", color: "default", className: "bg-surface-raised-hover text-surface-fg-muted border-surface-border-strong" },
|
|
49
|
-
// "destructive" alias → solid + error
|
|
50
|
-
{ variant: "destructive", color: "default", className: "bg-error-9 text-accent-fg border-transparent" },
|
|
51
|
-
{ variant: "destructive", color: "error", className: "bg-error-9 text-accent-fg border-transparent" },
|
|
52
|
-
{ variant: "subtle", color: "info", className: "bg-info-3 text-info-11 border-info-7" },
|
|
53
|
-
{ variant: "subtle", color: "success", className: "bg-success-3 text-success-11 border-success-7" },
|
|
54
|
-
{ variant: "subtle", color: "error", className: "bg-error-3 text-error-11 border-error-7" },
|
|
55
|
-
{ variant: "subtle", color: "warning", className: "bg-warning-3 text-warning-11 border-warning-7" },
|
|
56
|
-
{ variant: "subtle", color: "brand", className: "bg-accent-2 text-accent-11 border-accent-7" },
|
|
57
|
-
{ variant: "subtle", color: "accent", className: "bg-accent-2 text-accent-11 border-accent-7" },
|
|
58
|
-
{ variant: "subtle", color: "teal", className: "bg-category-teal-3 text-category-teal-11 border-category-teal-7" },
|
|
59
|
-
{ variant: "subtle", color: "amber", className: "bg-category-amber-3 text-category-amber-11 border-category-amber-7" },
|
|
60
|
-
{ variant: "subtle", color: "slate", className: "bg-category-slate-3 text-category-slate-11 border-category-slate-7" },
|
|
61
|
-
{ variant: "subtle", color: "indigo", className: "bg-category-indigo-3 text-category-indigo-11 border-category-indigo-7" },
|
|
62
|
-
{ variant: "subtle", color: "cyan", className: "bg-category-cyan-3 text-category-cyan-11 border-category-cyan-7" },
|
|
63
|
-
{ variant: "subtle", color: "orange", className: "bg-category-orange-3 text-category-orange-11 border-category-orange-7" },
|
|
64
|
-
{ variant: "subtle", color: "emerald", className: "bg-category-emerald-3 text-category-emerald-11 border-category-emerald-7" },
|
|
65
|
-
// solid (filled bg)
|
|
66
|
-
{ variant: "solid", color: "default", className: "bg-accent-9 text-accent-fg border-transparent" },
|
|
67
|
-
{ variant: "solid", color: "info", className: "bg-info-9 text-accent-fg border-transparent" },
|
|
68
|
-
{ variant: "solid", color: "success", className: "bg-success-9 text-accent-fg border-transparent" },
|
|
69
|
-
{ variant: "solid", color: "error", className: "bg-error-9 text-accent-fg border-transparent" },
|
|
70
|
-
{ variant: "solid", color: "warning", className: "bg-warning-9 text-accent-fg border-transparent" },
|
|
71
|
-
{ variant: "solid", color: "brand", className: "bg-accent-9 text-accent-fg border-transparent" },
|
|
72
|
-
{ variant: "solid", color: "accent", className: "bg-accent-9 text-accent-fg border-transparent" },
|
|
73
|
-
{ variant: "solid", color: "teal", className: "bg-category-teal-9 text-accent-fg border-transparent" },
|
|
74
|
-
{ variant: "solid", color: "amber", className: "bg-category-amber-9 text-accent-fg border-transparent" },
|
|
75
|
-
{ variant: "solid", color: "slate", className: "bg-category-slate-9 text-accent-fg border-transparent" },
|
|
76
|
-
{ variant: "solid", color: "indigo", className: "bg-category-indigo-9 text-accent-fg border-transparent" },
|
|
77
|
-
{ variant: "solid", color: "cyan", className: "bg-category-cyan-9 text-accent-fg border-transparent" },
|
|
78
|
-
{ variant: "solid", color: "orange", className: "bg-category-orange-9 text-accent-fg border-transparent" },
|
|
79
|
-
{ variant: "solid", color: "emerald", className: "bg-category-emerald-9 text-accent-fg border-transparent" },
|
|
80
|
-
// outline (border only)
|
|
81
|
-
{ variant: "outline", color: "default", className: "bg-transparent text-surface-fg-muted border-surface-border-strong" },
|
|
82
|
-
{ variant: "outline", color: "info", className: "bg-transparent text-info-11 border-info-7" },
|
|
83
|
-
{ variant: "outline", color: "success", className: "bg-transparent text-success-11 border-success-7" },
|
|
84
|
-
{ variant: "outline", color: "error", className: "bg-transparent text-error-11 border-error-7" },
|
|
85
|
-
{ variant: "outline", color: "warning", className: "bg-transparent text-warning-11 border-warning-7" },
|
|
86
|
-
{ variant: "outline", color: "brand", className: "bg-transparent text-accent-11 border-accent-7" },
|
|
87
|
-
{ variant: "outline", color: "accent", className: "bg-transparent text-accent-11 border-accent-7" },
|
|
88
|
-
{ variant: "outline", color: "teal", className: "bg-transparent text-category-teal-11 border-category-teal-7" },
|
|
89
|
-
{ variant: "outline", color: "amber", className: "bg-transparent text-category-amber-11 border-category-amber-7" },
|
|
90
|
-
{ variant: "outline", color: "slate", className: "bg-transparent text-category-slate-11 border-category-slate-7" },
|
|
91
|
-
{ variant: "outline", color: "indigo", className: "bg-transparent text-category-indigo-11 border-category-indigo-7" },
|
|
92
|
-
{ variant: "outline", color: "cyan", className: "bg-transparent text-category-cyan-11 border-category-cyan-7" },
|
|
93
|
-
{ variant: "outline", color: "orange", className: "bg-transparent text-category-orange-11 border-category-orange-7" },
|
|
94
|
-
{ variant: "outline", color: "emerald", className: "bg-transparent text-category-emerald-11 border-category-emerald-7" }
|
|
95
|
-
],
|
|
96
|
-
defaultVariants: {
|
|
97
|
-
variant: "subtle",
|
|
98
|
-
color: "default",
|
|
99
|
-
size: "md"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
), v = b.forwardRef(
|
|
103
|
-
({ className: o, variant: s, color: n, size: c, dot: l, onDismiss: r, children: e, ...i }, d) => /* @__PURE__ */ t("span", { ref: d, className: u(x({ variant: s, color: n, size: c }), o), ...i, children: [
|
|
104
|
-
l && /* @__PURE__ */ t("span", { className: "relative inline-flex h-ds-02b w-ds-02b shrink-0", "aria-hidden": "true", children: [
|
|
105
|
-
/* @__PURE__ */ a(
|
|
106
|
-
f.span,
|
|
107
|
-
{
|
|
108
|
-
className: "absolute inset-0 rounded-ds-full bg-current",
|
|
109
|
-
animate: { scale: [1, 2.5], opacity: [0.4, 0] },
|
|
110
|
-
transition: { repeat: 1 / 0, duration: 1.5, ease: "easeOut" }
|
|
111
|
-
}
|
|
112
|
-
),
|
|
113
|
-
/* @__PURE__ */ a("span", { className: "relative h-ds-02b w-ds-02b rounded-ds-full bg-current" })
|
|
114
|
-
] }),
|
|
115
|
-
e,
|
|
116
|
-
r && /* @__PURE__ */ a(
|
|
117
|
-
"button",
|
|
118
|
-
{
|
|
119
|
-
type: "button",
|
|
120
|
-
onClick: r,
|
|
121
|
-
className: "ml-ds-01 min-h-ds-xs min-w-ds-xs flex items-center justify-center rounded-ds-full text-current/60 hover:text-current hover:bg-current/10 transition-[color,background-color,transform] duration-fast-02 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
122
|
-
"aria-label": `Remove ${typeof e == "string" ? e : ""}`.trim() || "Remove",
|
|
123
|
-
children: /* @__PURE__ */ a(g, { className: "h-ico-sm w-ico-sm" })
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
] })
|
|
127
|
-
);
|
|
128
|
-
v.displayName = "Badge";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "@tabler/icons-react";
|
|
4
|
+
import "../_chunks/vendor-utils.js";
|
|
5
|
+
import "./lib/motion.js";
|
|
6
|
+
import "../_chunks/primitives.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import "./icon.js";
|
|
9
|
+
import "./lib/utils.js";
|
|
10
|
+
import "./badge-indicator.js";
|
|
11
|
+
import { B, b as f } from "../_chunks/badge-group.js";
|
|
12
|
+
import "../_chunks/framer.js";
|
|
129
13
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
14
|
+
B as Badge,
|
|
15
|
+
f as badgeVariants
|
|
132
16
|
};
|
package/dist/ui/banner.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const bannerVariants: (props?: ({
|
|
5
|
-
color?: "
|
|
5
|
+
color?: "success" | "error" | "info" | "warning" | "neutral" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
/**
|
|
8
8
|
* Props for Banner — a full-width notification strip with a colored icon, message, optional
|
package/dist/ui/banner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/ui/banner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/ui/banner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAMjE,QAAA,MAAM,cAAc;;8EAmBnB,CAAA;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,EACzD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,wCAAwC;IACxC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,iGAAiG;IACjG,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,QAAA,MAAM,MAAM,oFA0CX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
package/dist/ui/banner.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as
|
|
3
|
-
import { IconInfoCircle as
|
|
2
|
+
import { jsx as e, jsxs as x } from "react/jsx-runtime";
|
|
3
|
+
import { IconInfoCircle as t, IconAlertCircle as h, IconAlertTriangle as v, IconCircleCheck as w, IconX as I } from "@tabler/icons-react";
|
|
4
4
|
import * as r from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { cn as
|
|
7
|
-
import { springs as
|
|
8
|
-
import {
|
|
9
|
-
|
|
5
|
+
import { a as N } from "../_chunks/vendor-utils.js";
|
|
6
|
+
import { cn as C } from "./lib/utils.js";
|
|
7
|
+
import { springs as y, motionProps as k } from "./lib/motion.js";
|
|
8
|
+
import { Icon as i } from "./icon.js";
|
|
9
|
+
import { A, m as _ } from "../_chunks/framer.js";
|
|
10
|
+
const B = N(
|
|
10
11
|
"flex flex-wrap items-center gap-ds-04 px-ds-06 py-ds-04 text-ds-md font-medium border-b",
|
|
11
12
|
{
|
|
12
13
|
variants: {
|
|
@@ -21,38 +22,38 @@ const _ = N(
|
|
|
21
22
|
defaultVariants: { color: "info" }
|
|
22
23
|
}
|
|
23
24
|
), V = {
|
|
24
|
-
info:
|
|
25
|
-
success:
|
|
26
|
-
warning:
|
|
25
|
+
info: t,
|
|
26
|
+
success: w,
|
|
27
|
+
warning: v,
|
|
27
28
|
error: h,
|
|
28
|
-
neutral:
|
|
29
|
+
neutral: t
|
|
29
30
|
}, j = r.forwardRef(
|
|
30
|
-
({ className:
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
({ className: a, color: s = "info", action: c, actions: d, onDismiss: n, children: l, ...m }, f) => {
|
|
32
|
+
const o = d ?? c, u = V[s ?? "info"], [b, p] = r.useState(!0), g = r.useCallback(() => {
|
|
33
|
+
p(!1);
|
|
33
34
|
}, []);
|
|
34
|
-
return /* @__PURE__ */ e(
|
|
35
|
-
|
|
35
|
+
return /* @__PURE__ */ e(A, { onExitComplete: n, children: b && /* @__PURE__ */ x(
|
|
36
|
+
_.div,
|
|
36
37
|
{
|
|
37
|
-
ref:
|
|
38
|
+
ref: f,
|
|
38
39
|
initial: { height: "auto", opacity: 1 },
|
|
39
40
|
exit: { height: 0, opacity: 0 },
|
|
40
|
-
transition:
|
|
41
|
-
className:
|
|
41
|
+
transition: y.snappy,
|
|
42
|
+
className: C(B({ color: s }), "overflow-hidden", a),
|
|
42
43
|
role: "alert",
|
|
43
|
-
...
|
|
44
|
+
...k(m),
|
|
44
45
|
children: [
|
|
45
|
-
/* @__PURE__ */ e(
|
|
46
|
-
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children:
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
/* @__PURE__ */ e(i, { icon: u, size: "md", className: "shrink-0" }),
|
|
47
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: l }),
|
|
48
|
+
o && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-ds-02 [&_button]:transition-colors [&_button]:duration-moderate-01 [&_button]:ease-productive-standard [&_button:hover]:bg-current/10", children: o }),
|
|
49
|
+
n && /* @__PURE__ */ e(
|
|
49
50
|
"button",
|
|
50
51
|
{
|
|
51
52
|
type: "button",
|
|
52
53
|
onClick: g,
|
|
53
54
|
className: "shrink-0 min-h-ds-xs min-w-ds-xs flex items-center justify-center rounded-ds-sm transition-colors duration-moderate-01 ease-productive-standard hover:bg-current/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9",
|
|
54
55
|
"aria-label": "Dismiss",
|
|
55
|
-
children: /* @__PURE__ */ e(
|
|
56
|
+
children: /* @__PURE__ */ e(i, { icon: I, size: "sm" })
|
|
56
57
|
}
|
|
57
58
|
)
|
|
58
59
|
]
|
|
@@ -63,5 +64,5 @@ const _ = N(
|
|
|
63
64
|
j.displayName = "Banner";
|
|
64
65
|
export {
|
|
65
66
|
j as Banner,
|
|
66
|
-
|
|
67
|
+
B as bannerVariants
|
|
67
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/ui/breadcrumb.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/ui/breadcrumb.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,UAAU;gBAEwC,KAAK,CAAC,SAAS;qCACO,CAAA;AAG9E,QAAA,MAAM,cAAc,2KAWnB,CAAA;AAGD,QAAA,MAAM,cAAc,kKAInB,CAAA;AAGD,QAAA,MAAM,cAAc;cAEgC,OAAO;2CAczD,CAAA;AAGF,QAAA,MAAM,cAAc,sKASnB,CAAA;AAGD,QAAA,MAAM,mBAAmB;wCAAuC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;;CASzF,CAAA;AAGD,QAAA,MAAM,kBAAkB;8BAA6B,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;;CAUhF,CAAA;AAGD,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AACnE,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAA;AAErE,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,CAAA"}
|
package/dist/ui/breadcrumb.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as s, jsxs as
|
|
3
|
-
import { S as
|
|
4
|
-
import { IconDots as
|
|
5
|
-
import * as
|
|
6
|
-
import { cn as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import { S as d } from "../_chunks/primitives.js";
|
|
4
|
+
import { IconDots as n, IconChevronRight as l } from "@tabler/icons-react";
|
|
5
|
+
import * as o from "react";
|
|
6
|
+
import { cn as i } from "./lib/utils.js";
|
|
7
|
+
import { Icon as m } from "./icon.js";
|
|
8
|
+
const u = o.forwardRef(({ ...e }, r) => /* @__PURE__ */ s("nav", { ref: r, "aria-label": "breadcrumb", ...e }));
|
|
9
|
+
u.displayName = "Breadcrumb";
|
|
10
|
+
const f = o.forwardRef(
|
|
10
11
|
({ className: e, ...r }, a) => /* @__PURE__ */ s(
|
|
11
12
|
"ol",
|
|
12
13
|
{
|
|
13
14
|
ref: a,
|
|
14
|
-
className:
|
|
15
|
+
className: i(
|
|
15
16
|
"flex flex-wrap items-center gap-ds-02b break-words text-ds-md text-surface-fg-muted sm:gap-ds-03",
|
|
16
17
|
e
|
|
17
18
|
),
|
|
@@ -19,66 +20,66 @@ const u = i.forwardRef(
|
|
|
19
20
|
}
|
|
20
21
|
)
|
|
21
22
|
);
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
({ className: e, ...r }, a) => /* @__PURE__ */ s("li", { ref: a, className:
|
|
23
|
+
f.displayName = "BreadcrumbList";
|
|
24
|
+
const p = o.forwardRef(
|
|
25
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ s("li", { ref: a, className: i("inline-flex items-center gap-ds-03", e), ...r })
|
|
25
26
|
);
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
r ?
|
|
27
|
+
p.displayName = "BreadcrumbItem";
|
|
28
|
+
const b = o.forwardRef(({ className: e, asChild: r = !1, ...a }, t) => /* @__PURE__ */ s(
|
|
29
|
+
r ? d : "a",
|
|
29
30
|
{
|
|
30
|
-
ref:
|
|
31
|
-
className:
|
|
31
|
+
ref: t,
|
|
32
|
+
className: i(
|
|
32
33
|
"transition-colors duration-fast-01 ease-productive-standard hover:text-surface-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 rounded-ds-sm",
|
|
33
34
|
e
|
|
34
35
|
),
|
|
35
36
|
...a
|
|
36
37
|
}
|
|
37
38
|
));
|
|
38
|
-
|
|
39
|
-
const
|
|
39
|
+
b.displayName = "BreadcrumbLink";
|
|
40
|
+
const g = o.forwardRef(
|
|
40
41
|
({ className: e, ...r }, a) => /* @__PURE__ */ s(
|
|
41
42
|
"span",
|
|
42
43
|
{
|
|
43
44
|
ref: a,
|
|
44
45
|
"aria-current": "page",
|
|
45
|
-
className:
|
|
46
|
+
className: i("font-medium text-surface-fg", e),
|
|
46
47
|
...r
|
|
47
48
|
}
|
|
48
49
|
)
|
|
49
50
|
);
|
|
50
|
-
|
|
51
|
-
const
|
|
51
|
+
g.displayName = "BreadcrumbPage";
|
|
52
|
+
const B = ({ children: e, className: r, ...a }) => /* @__PURE__ */ s(
|
|
52
53
|
"li",
|
|
53
54
|
{
|
|
54
55
|
role: "presentation",
|
|
55
56
|
"aria-hidden": "true",
|
|
56
|
-
className:
|
|
57
|
+
className: i("[&>svg]:h-ico-sm [&>svg]:w-ico-sm", r),
|
|
57
58
|
...a,
|
|
58
|
-
children: e ?? /* @__PURE__ */ s(
|
|
59
|
+
children: e ?? /* @__PURE__ */ s(m, { icon: l, size: "sm" })
|
|
59
60
|
}
|
|
60
61
|
);
|
|
61
|
-
|
|
62
|
-
const
|
|
62
|
+
B.displayName = "BreadcrumbSeparator";
|
|
63
|
+
const N = ({ className: e, ...r }) => /* @__PURE__ */ c(
|
|
63
64
|
"span",
|
|
64
65
|
{
|
|
65
66
|
role: "presentation",
|
|
66
67
|
"aria-hidden": "true",
|
|
67
|
-
className:
|
|
68
|
+
className: i("flex h-ds-sm-plus w-ds-sm-plus items-center justify-center", e),
|
|
68
69
|
...r,
|
|
69
70
|
children: [
|
|
70
|
-
/* @__PURE__ */ s(
|
|
71
|
+
/* @__PURE__ */ s(m, { icon: n, size: "sm" }),
|
|
71
72
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More" })
|
|
72
73
|
]
|
|
73
74
|
}
|
|
74
75
|
);
|
|
75
|
-
|
|
76
|
+
N.displayName = "BreadcrumbEllipsis";
|
|
76
77
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
u as Breadcrumb,
|
|
79
|
+
N as BreadcrumbEllipsis,
|
|
80
|
+
p as BreadcrumbItem,
|
|
81
|
+
b as BreadcrumbLink,
|
|
82
|
+
f as BreadcrumbList,
|
|
83
|
+
g as BreadcrumbPage,
|
|
84
|
+
B as BreadcrumbSeparator
|
|
84
85
|
};
|
|
@@ -4,24 +4,26 @@ import * as React from 'react';
|
|
|
4
4
|
interface ButtonGroupContextValue {
|
|
5
5
|
variant?: ButtonProps['variant'];
|
|
6
6
|
color?: ButtonProps['color'];
|
|
7
|
+
weight?: ButtonProps['weight'];
|
|
8
|
+
shape?: ButtonProps['shape'];
|
|
7
9
|
size?: ButtonProps['size'];
|
|
8
10
|
}
|
|
9
11
|
export declare function useButtonGroup(): ButtonGroupContextValue;
|
|
10
12
|
/**
|
|
11
13
|
* Props for ButtonGroup — a container that visually merges adjacent `<Button>` components into
|
|
12
|
-
* a single connected unit, and propagates
|
|
14
|
+
* a single connected unit, and propagates shared props (`variant`, `color`, `weight`, `shape`, `size`) via context.
|
|
13
15
|
*
|
|
14
|
-
* **Context propagation:** Child `<Button>` components automatically inherit `variant
|
|
15
|
-
* from ButtonGroup. Individual children can still override
|
|
16
|
+
* **Context propagation:** Child `<Button>` components automatically inherit `variant`, `color`,
|
|
17
|
+
* `weight`, `shape`, and `size` from ButtonGroup. Individual children can still override any prop.
|
|
16
18
|
*
|
|
17
19
|
* **Visual joining:** Adjacent button borders are merged with negative margins and border-radius overrides.
|
|
18
20
|
*
|
|
19
21
|
* @example
|
|
20
22
|
* // Horizontal toolbar action group (outline variant shared):
|
|
21
23
|
* <ButtonGroup variant="outline" size="sm">
|
|
22
|
-
* <Button startIcon={<IconBold />}>Bold</Button>
|
|
23
|
-
* <Button startIcon={<IconItalic />}>Italic</Button>
|
|
24
|
-
* <Button startIcon={<IconUnderline />}>Underline</Button>
|
|
24
|
+
* <Button startIcon={<Icon icon={IconBold} />}>Bold</Button>
|
|
25
|
+
* <Button startIcon={<Icon icon={IconItalic} />}>Italic</Button>
|
|
26
|
+
* <Button startIcon={<Icon icon={IconUnderline} />}>Underline</Button>
|
|
25
27
|
* </ButtonGroup>
|
|
26
28
|
*
|
|
27
29
|
* @example
|
|
@@ -45,6 +47,10 @@ export interface ButtonGroupProps extends Omit<React.HTMLAttributes<HTMLDivEleme
|
|
|
45
47
|
variant?: ButtonProps['variant'];
|
|
46
48
|
/** Shared color applied to all child Buttons (children can override) */
|
|
47
49
|
color?: ButtonProps['color'];
|
|
50
|
+
/** Shared weight applied to all child Buttons (children can override) */
|
|
51
|
+
weight?: ButtonProps['weight'];
|
|
52
|
+
/** Shared shape applied to all child Buttons (children can override) */
|
|
53
|
+
shape?: ButtonProps['shape'];
|
|
48
54
|
/** Shared size applied to all child Buttons (children can override) */
|
|
49
55
|
size?: ButtonProps['size'];
|
|
50
56
|
/** Layout direction. Default: 'horizontal' */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../src/ui/button-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC3B;AAID,wBAAgB,cAAc,4BAE7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC3F,0EAA0E;IAC1E,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,wEAAwE;IACxE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,uEAAuE;IACvE,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CACxC;AAED,QAAA,MAAM,WAAW,yFAiChB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../src/ui/button-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC9B,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC3B;AAID,wBAAgB,cAAc,4BAE7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC3F,0EAA0E;IAC1E,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,wEAAwE;IACxE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,yEAAyE;IACzE,MAAM,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAA;IAC9B,wEAAwE;IACxE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,uEAAuE;IACvE,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,8CAA8C;IAC9C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CACxC;AAED,QAAA,MAAM,WAAW,yFAiChB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/ui/button-group.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
3
|
import * as o from "react";
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
return o.useContext(
|
|
4
|
+
import { cn as p } from "./lib/utils.js";
|
|
5
|
+
const d = o.createContext({});
|
|
6
|
+
function G() {
|
|
7
|
+
return o.useContext(d);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
({ className:
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */
|
|
9
|
+
const x = o.forwardRef(
|
|
10
|
+
({ className: i, variant: t, color: n, weight: r, shape: e, size: l, orientation: c = "horizontal", children: s, ...f }, a) => {
|
|
11
|
+
const m = o.useMemo(() => ({ variant: t, color: n, weight: r, shape: e, size: l }), [t, n, r, e, l]);
|
|
12
|
+
return /* @__PURE__ */ u(d.Provider, { value: m, children: /* @__PURE__ */ u(
|
|
13
13
|
"div",
|
|
14
14
|
{
|
|
15
|
-
ref:
|
|
15
|
+
ref: a,
|
|
16
16
|
role: "group",
|
|
17
|
-
className:
|
|
17
|
+
className: p(
|
|
18
18
|
"inline-flex",
|
|
19
|
-
|
|
19
|
+
c === "horizontal" ? [
|
|
20
20
|
"flex-row",
|
|
21
21
|
"[&>*:not(:first-child)]:rounded-l-none",
|
|
22
22
|
"[&>*:not(:last-child)]:rounded-r-none",
|
|
@@ -27,16 +27,16 @@ const p = o.forwardRef(
|
|
|
27
27
|
"[&>*:not(:last-child)]:rounded-b-none",
|
|
28
28
|
"[&>*:not(:first-child)]:-mt-px"
|
|
29
29
|
],
|
|
30
|
-
|
|
30
|
+
i
|
|
31
31
|
),
|
|
32
|
-
...
|
|
33
|
-
children:
|
|
32
|
+
...f,
|
|
33
|
+
children: s
|
|
34
34
|
}
|
|
35
35
|
) });
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
|
-
|
|
38
|
+
x.displayName = "ButtonGroup";
|
|
39
39
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
x as ButtonGroup,
|
|
41
|
+
G as useButtonGroup
|
|
42
42
|
};
|