@devalok/shilp-sutra 0.39.0 → 0.40.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/AGENTS.md +151 -0
- package/MIGRATION.md +137 -0
- package/README.md +3 -0
- package/dist/_chunks/badge-group.js +75 -74
- package/dist/_chunks/badge-group.js.map +1 -1
- package/dist/_chunks/chart-container.js +50 -0
- package/dist/_chunks/chart-container.js.map +1 -0
- package/dist/_chunks/chat.js +231 -223
- package/dist/_chunks/chat.js.map +1 -1
- package/dist/_chunks/colors.js +30 -0
- package/dist/_chunks/colors.js.map +1 -0
- package/dist/_chunks/emoji-data.js +45 -0
- package/dist/_chunks/emoji-data.js.map +1 -0
- package/dist/_chunks/grid-lines.js +72 -0
- package/dist/_chunks/grid-lines.js.map +1 -0
- package/dist/_chunks/mention-suggestion.js +31 -259
- package/dist/_chunks/mention-suggestion.js.map +1 -1
- package/dist/_chunks/normalize-icon.js +18 -0
- package/dist/_chunks/normalize-icon.js.map +1 -0
- package/dist/_chunks/oauth-button.js +227 -0
- package/dist/_chunks/oauth-button.js.map +1 -0
- package/dist/_chunks/primitives.js +107 -107
- package/dist/_chunks/primitives.js.map +1 -1
- package/dist/_chunks/{text.js → success.js} +24 -61
- package/dist/_chunks/success.js.map +1 -0
- package/dist/_chunks/tiptap.js +1952 -1949
- package/dist/_chunks/tiptap.js.map +1 -1
- package/dist/_chunks/tooltip.js +58 -0
- package/dist/_chunks/tooltip.js.map +1 -0
- package/dist/_chunks/tree-view.js +101 -96
- package/dist/_chunks/tree-view.js.map +1 -1
- package/dist/ai/ai-command-provider.d.ts +3 -2
- package/dist/ai/ai-command-provider.d.ts.map +1 -1
- package/dist/ai/ai-command-provider.js.map +1 -1
- package/dist/ai/block-renderer.js +11 -9
- package/dist/ai/block-renderer.js.map +1 -1
- package/dist/ai/blocks/error.js +31 -0
- package/dist/ai/blocks/error.js.map +1 -0
- package/dist/ai/blocks/index.d.ts +0 -2
- package/dist/ai/blocks/index.d.ts.map +1 -1
- package/dist/ai/blocks/index.js +2 -2
- package/dist/ai/blocks/text.js +19 -0
- package/dist/ai/blocks/text.js.map +1 -0
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +192 -187
- package/dist/ai/command-bar.js.map +1 -1
- package/dist/ai/conversation.d.ts +2 -1
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +88 -83
- package/dist/ai/conversation.js.map +1 -1
- package/dist/ai/index.d.ts +0 -4
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +45 -46
- package/dist/ai/index.js.map +1 -1
- package/dist/composed/activity-feed.d.ts +2 -1
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js.map +1 -1
- package/dist/composed/bulk-action-bar.d.ts +2 -2
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +11 -11
- package/dist/composed/bulk-action-bar.js.map +1 -1
- package/dist/composed/command-palette.d.ts +2 -1
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +103 -98
- package/dist/composed/command-palette.js.map +1 -1
- package/dist/composed/date-picker/index.js +747 -3
- package/dist/composed/date-picker/index.js.map +1 -0
- package/dist/composed/empty-state.d.ts +3 -3
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +40 -31
- package/dist/composed/empty-state.js.map +1 -1
- package/dist/composed/extensions/emoji-node.js +81 -0
- package/dist/composed/extensions/emoji-node.js.map +1 -0
- package/dist/composed/extensions/emoji-suggestion.js +117 -0
- package/dist/composed/extensions/emoji-suggestion.js.map +1 -0
- package/dist/composed/file-preview.js +498 -2
- package/dist/{_chunks → composed}/file-preview.js.map +1 -1
- package/dist/composed/index.d.ts +0 -15
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +16 -24
- package/dist/composed/rich-chat-input.js +2073 -2
- package/dist/{_chunks → composed}/rich-chat-input.js.map +1 -1
- package/dist/composed/rich-text-editor.js +64 -61
- package/dist/composed/rich-text-editor.js.map +1 -1
- package/dist/composed/status-badge.d.ts +3 -2
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +58 -53
- package/dist/composed/status-badge.js.map +1 -1
- package/dist/shell/app-command-palette.d.ts +2 -1
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js.map +1 -1
- package/dist/shell/bottom-navbar.d.ts +3 -1
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +90 -82
- package/dist/shell/bottom-navbar.js.map +1 -1
- package/dist/shell/command-registry.d.ts +2 -1
- package/dist/shell/command-registry.d.ts.map +1 -1
- package/dist/shell/command-registry.js.map +1 -1
- package/dist/shell/sidebar.d.ts +7 -4
- package/dist/shell/sidebar.d.ts.map +1 -1
- package/dist/shell/sidebar.js +143 -129
- package/dist/shell/sidebar.js.map +1 -1
- package/dist/shell/top-bar.d.ts +4 -3
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +114 -106
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/ui/badge.d.ts +3 -2
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/button.d.ts +3 -2
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +54 -53
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/charts/area-chart.js +177 -0
- package/dist/ui/charts/area-chart.js.map +1 -0
- package/dist/ui/charts/bar-chart.js +127 -0
- package/dist/ui/charts/bar-chart.js.map +1 -0
- package/dist/ui/charts/chart-container.js +3 -0
- package/dist/ui/charts/gauge-chart.js +72 -0
- package/dist/ui/charts/gauge-chart.js.map +1 -0
- package/dist/ui/charts/index.js +10 -1035
- package/dist/ui/charts/line-chart.js +135 -0
- package/dist/ui/charts/line-chart.js.map +1 -0
- package/dist/ui/charts/pie-chart.js +111 -0
- package/dist/ui/charts/pie-chart.js.map +1 -0
- package/dist/ui/charts/radar-chart.js +170 -0
- package/dist/ui/charts/radar-chart.js.map +1 -0
- package/dist/ui/charts/sparkline.js +119 -0
- package/dist/ui/charts/sparkline.js.map +1 -0
- package/dist/ui/chat/message.d.ts +3 -3
- package/dist/ui/chat/message.d.ts.map +1 -1
- package/dist/ui/chat/system-message.d.ts +2 -1
- package/dist/ui/chat/system-message.d.ts.map +1 -1
- package/dist/ui/combobox.d.ts +2 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +97 -92
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/container.d.ts +6 -1
- package/dist/ui/container.d.ts.map +1 -1
- package/dist/ui/container.js +2 -1
- package/dist/ui/container.js.map +1 -1
- package/dist/ui/icon-button.d.ts +9 -2
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-button.js +14 -13
- package/dist/ui/icon-button.js.map +1 -1
- package/dist/ui/index.d.ts +1 -3
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +31 -33
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/lib/icon-input.d.ts +42 -0
- package/dist/ui/lib/icon-input.d.ts.map +1 -0
- package/dist/ui/lib/normalize-icon.d.ts +39 -0
- package/dist/ui/lib/normalize-icon.d.ts.map +1 -0
- package/dist/ui/oauth-button/index.d.ts +3 -0
- package/dist/ui/oauth-button/index.d.ts.map +1 -0
- package/dist/ui/oauth-button/index.js +3 -0
- package/dist/ui/oauth-button/oauth-button.d.ts +208 -0
- package/dist/ui/oauth-button/oauth-button.d.ts.map +1 -0
- package/dist/ui/progress.js +1 -1
- package/dist/ui/segmented-control.d.ts +3 -4
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +53 -45
- package/dist/ui/segmented-control.js.map +1 -1
- package/dist/ui/stack.d.ts +6 -1
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/stack.js +2 -1
- package/dist/ui/stack.js.map +1 -1
- package/dist/ui/stat-card.d.ts +2 -3
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +117 -115
- package/dist/ui/stat-card.js.map +1 -1
- package/dist/ui/stepper.d.ts +2 -1
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +74 -69
- package/dist/ui/stepper.js.map +1 -1
- package/dist/ui/text.d.ts +7 -2
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/text.js +2 -1
- package/dist/ui/text.js.map +1 -1
- package/dist/ui/toaster.d.ts +11 -2
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js.map +1 -1
- package/dist/ui/tooltip.js +12 -12
- package/dist/ui/tree-view/tree-item.d.ts +3 -2
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/dist/ui/tree-view/use-tree.d.ts +2 -1
- package/dist/ui/tree-view/use-tree.d.ts.map +1 -1
- package/docs/components/ui/oauth-button.md +86 -0
- package/docs/recipes/customize-brand.md +15 -0
- package/docs/recipes/index.md +5 -1
- package/docs/recipes/install-astro.md +15 -0
- package/docs/recipes/install-next-app-router.md +21 -5
- package/docs/recipes/install-next-pages.md +2 -0
- package/docs/recipes/install-remix.md +15 -0
- package/docs/recipes/install-tanstack-start.md +15 -0
- package/docs/recipes/install-vite.md +15 -0
- package/docs/recipes/troubleshoot.md +22 -0
- package/llms-full.txt +87 -1
- package/llms-quick.txt +247 -0
- package/llms.txt +107 -2
- package/package.json +79 -2
- package/scripts/welcome.mjs +219 -0
- package/skill/SKILL.md +22 -3
- package/skill/references/components-full.md +87 -1
- package/skill/references/components.md +107 -2
- package/skill/references/customize-brand.md +15 -0
- package/skill/references/setup-astro.md +15 -0
- package/skill/references/setup-next-app-router.md +21 -5
- package/skill/references/setup-next-pages.md +2 -0
- package/skill/references/setup-remix.md +15 -0
- package/skill/references/setup-tanstack-start.md +15 -0
- package/skill/references/setup-vite.md +15 -0
- package/skill/references/troubleshoot.md +22 -0
- package/dist/_chunks/date-picker.js +0 -748
- package/dist/_chunks/date-picker.js.map +0 -1
- package/dist/_chunks/file-preview.js +0 -499
- package/dist/_chunks/rich-chat-input.js +0 -2071
- package/dist/_chunks/text.js.map +0 -1
- package/dist/ui/charts/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/ui/container.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,cAAc,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,IAAI;IACzD,EAAE,CAAC,EAAE,CAAC,CAAA;IACN,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,WAAW,GAAG,UAAU,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/ui/container.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,cAAc,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,IAAI;IACzD,EAAE,CAAC,EAAE,CAAC,CAAA;IACN,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,WAAW,GAAG,UAAU,CAAC,CAAA;AAWzE,KAAK,kBAAkB,GAAG,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAC7D,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;CAAE,KACvE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAkB1D,QAAA,MAAM,SAAS,EAA+B,kBAAkB,CAAA;AAEhE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAA"}
|
package/dist/ui/container.js
CHANGED
package/dist/ui/container.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","names":[],"sources":["../../src/ui/container.tsx"],"sourcesContent":["// @server-safe\nimport * as React from 'react'\n\nimport { cn } from './lib/utils'\n\ntype ContainerProps<T extends React.ElementType = 'div'> = {\n as?: T\n maxWidth?: 'default' | 'body' | 'full'\n className?: string\n children?: React.ReactNode\n} & Omit<React.ComponentPropsWithRef<T>, 'as' | 'className' | 'children'>\n\nconst maxWidthMap = {\n default: 'max-w-layout',\n body: 'max-w-layout-body',\n full: 'max-w-full',\n} as const\n\
|
|
1
|
+
{"version":3,"file":"container.js","names":[],"sources":["../../src/ui/container.tsx"],"sourcesContent":["// @server-safe\nimport * as React from 'react'\n\nimport { cn } from './lib/utils'\n\ntype ContainerProps<T extends React.ElementType = 'div'> = {\n as?: T\n maxWidth?: 'default' | 'body' | 'full'\n className?: string\n children?: React.ReactNode\n} & Omit<React.ComponentPropsWithRef<T>, 'as' | 'className' | 'children'>\n\nconst maxWidthMap = {\n default: 'max-w-layout',\n body: 'max-w-layout-body',\n full: 'max-w-full',\n} as const\n\n// Polymorphic component type — preserves T across the call site so element-\n// specific props (e.g. `<Container as=\"main\">` accepting <main> props)\n// typecheck. Standard polymorphic-component pattern; see text.tsx + stack.tsx.\ntype ContainerComponent = (<T extends React.ElementType = 'div'>(\n props: ContainerProps<T> & { ref?: React.ComponentPropsWithRef<T>['ref'] },\n) => React.ReactElement | null) & { displayName?: string }\n\nconst ContainerImpl = React.forwardRef<HTMLElement, ContainerProps>(\n ({ as, maxWidth = 'default', className, children, ...props }, ref) => {\n const Component = as || 'div'\n return React.createElement(\n Component,\n {\n ref,\n className: cn('mx-auto w-full px-page-x', maxWidthMap[maxWidth], className),\n ...props,\n },\n children,\n )\n },\n)\nContainerImpl.displayName = 'Container'\n\nconst Container = ContainerImpl as unknown as ContainerComponent\n\nexport { Container, type ContainerProps }\n"],"mappings":";;;AAYA,IAAM,IAAc;CAClB,SAAS;CACT,MAAM;CACN,MAAM;CACP,EASK,IAAgB,EAAM,YACzB,EAAE,OAAI,cAAW,WAAW,cAAW,aAAU,GAAG,KAAS,MAAQ;CACpE,IAAM,IAAY,KAAM;AACxB,QAAO,EAAM,cACX,GACA;EACE;EACA,WAAW,EAAG,4BAA4B,EAAY,IAAW,EAAU;EAC3E,GAAG;EACJ,EACD,EACD;EAEJ;AACD,EAAc,cAAc;AAE5B,IAAM,IAAY"}
|
package/dist/ui/icon-button.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ButtonProps } from './button';
|
|
3
|
+
import { IconInput } from './lib/icon-input';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
type IconButtonSize = 'sm' | 'md' | 'lg';
|
|
5
6
|
/**
|
|
@@ -33,8 +34,14 @@ type IconButtonSize = 'sm' | 'md' | 'lg';
|
|
|
33
34
|
* // These are just a few ways — feel free to combine props creatively!
|
|
34
35
|
*/
|
|
35
36
|
export interface IconButtonProps extends Omit<ButtonProps, 'startIcon' | 'endIcon' | 'fullWidth' | 'loadingPosition' | 'children' | 'size' | 'shape'> {
|
|
36
|
-
/**
|
|
37
|
-
|
|
37
|
+
/**
|
|
38
|
+
* The icon to render. Accepts any `IconInput`:
|
|
39
|
+
* - `<Icon icon={IconPlus} />` (canonical — size flows from context)
|
|
40
|
+
* - `<IconPlus />` (raw Tabler element — passes through)
|
|
41
|
+
* - `IconPlus` (Tabler component ref — auto-wrapped in `<Icon>`)
|
|
42
|
+
* - Custom `<span>$</span>` or any ReactElement.
|
|
43
|
+
*/
|
|
44
|
+
icon: IconInput;
|
|
38
45
|
/** Accessible label — required for icon-only buttons (WCAG AA) */
|
|
39
46
|
'aria-label': string;
|
|
40
47
|
/** Button shape. Default: 'square' */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/ui/icon-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/ui/icon-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAWjD,KAAK,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,iBAAiB,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IACpH;;;;;;OAMG;IACH,IAAI,EAAE,SAAS,CAAA;IACf,kEAAkE;IAClE,YAAY,EAAE,MAAM,CAAA;IACpB,sCAAsC;IACtC,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC3B,iCAAiC;IACjC,IAAI,CAAC,EAAE,cAAc,CAAA;CACtB;AAED,QAAA,MAAM,UAAU,2FAef,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
package/dist/ui/icon-button.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "./lib/utils.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { t } from "../_chunks/normalize-icon.js";
|
|
4
|
+
import { Button as n } from "./button.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
7
|
//#region src/ui/icon-button.tsx
|
|
7
|
-
var
|
|
8
|
+
var a = {
|
|
8
9
|
sm: "icon-sm",
|
|
9
10
|
md: "icon-md",
|
|
10
11
|
lg: "icon-lg"
|
|
11
|
-
},
|
|
12
|
-
ref:
|
|
13
|
-
size:
|
|
14
|
-
className: e(
|
|
15
|
-
loading:
|
|
12
|
+
}, o = r.forwardRef(({ icon: r, shape: o = "square", size: s = "md", className: c, loading: l, ...u }, d) => /* @__PURE__ */ i(n, {
|
|
13
|
+
ref: d,
|
|
14
|
+
size: a[s],
|
|
15
|
+
className: e(o === "circle" && "rounded-pill", c),
|
|
16
|
+
loading: l,
|
|
16
17
|
loadingPosition: "center",
|
|
17
|
-
...
|
|
18
|
-
children:
|
|
18
|
+
...u,
|
|
19
|
+
children: t(r)
|
|
19
20
|
}));
|
|
20
|
-
|
|
21
|
+
o.displayName = "IconButton";
|
|
21
22
|
//#endregion
|
|
22
|
-
export {
|
|
23
|
+
export { o as IconButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","names":[],"sources":["../../src/ui/icon-button.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport { Button, type ButtonProps } from './button'\nimport { cn } from './lib/utils'\n\n/** Map friendly sizes to icon-* sizes for the underlying Button */\nconst sizeMap = {\n sm: 'icon-sm',\n md: 'icon-md',\n lg: 'icon-lg',\n} as const\n\ntype IconButtonSize = 'sm' | 'md' | 'lg'\n\n/**\n * Props for IconButton — a square or circular icon-only button built on top of `<Button>`,\n * with `aria-label` required for WCAG AA compliance.\n *\n * **`aria-label` is required** — icon-only buttons have no visible text, so a descriptive label\n * is mandatory for screen readers. TypeScript enforces this.\n *\n * **Shape:** `'square'` (default, rounded corners) | `'circle'` (fully round, great for avatar-adjacent actions)\n *\n * **Size:** `'sm'` | `'md'` (default) | `'lg'` — maps to `icon-sm/md/lg` sizes internally.\n *\n * **All `Button` variants** are supported: `solid`, `outline`, `ghost`, `link` x `default`, `error`.\n *\n * @example\n * // Ghost toolbar icon button:\n * <IconButton icon={<Icon icon={IconEdit} />} variant=\"ghost\" aria-label=\"Edit item\" />\n *\n * @example\n * // Circular close button (e.g. in a modal header):\n * <IconButton icon={<Icon icon={IconX} />} shape=\"circle\" variant=\"ghost\" size=\"sm\" aria-label=\"Close dialog\" />\n *\n * @example\n * // Solid floating action button:\n * <IconButton icon={<Icon icon={IconPlus} />} variant=\"solid\" size=\"lg\" aria-label=\"Create new project\" />\n *\n * @example\n * // Error icon button with loading state (e.g. confirm delete):\n * <IconButton icon={<Icon icon={IconTrash} />} variant=\"solid\" color=\"error\" loading={isDeleting} aria-label=\"Delete\" />\n * // These are just a few ways — feel free to combine props creatively!\n */\nexport interface IconButtonProps\n extends Omit<ButtonProps, 'startIcon' | 'endIcon' | 'fullWidth' | 'loadingPosition' | 'children' | 'size' | 'shape'> {\n
|
|
1
|
+
{"version":3,"file":"icon-button.js","names":[],"sources":["../../src/ui/icon-button.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport { Button, type ButtonProps } from './button'\nimport type { IconInput } from './lib/icon-input'\nimport { normalizeIcon } from './lib/normalize-icon'\nimport { cn } from './lib/utils'\n\n/** Map friendly sizes to icon-* sizes for the underlying Button */\nconst sizeMap = {\n sm: 'icon-sm',\n md: 'icon-md',\n lg: 'icon-lg',\n} as const\n\ntype IconButtonSize = 'sm' | 'md' | 'lg'\n\n/**\n * Props for IconButton — a square or circular icon-only button built on top of `<Button>`,\n * with `aria-label` required for WCAG AA compliance.\n *\n * **`aria-label` is required** — icon-only buttons have no visible text, so a descriptive label\n * is mandatory for screen readers. TypeScript enforces this.\n *\n * **Shape:** `'square'` (default, rounded corners) | `'circle'` (fully round, great for avatar-adjacent actions)\n *\n * **Size:** `'sm'` | `'md'` (default) | `'lg'` — maps to `icon-sm/md/lg` sizes internally.\n *\n * **All `Button` variants** are supported: `solid`, `outline`, `ghost`, `link` x `default`, `error`.\n *\n * @example\n * // Ghost toolbar icon button:\n * <IconButton icon={<Icon icon={IconEdit} />} variant=\"ghost\" aria-label=\"Edit item\" />\n *\n * @example\n * // Circular close button (e.g. in a modal header):\n * <IconButton icon={<Icon icon={IconX} />} shape=\"circle\" variant=\"ghost\" size=\"sm\" aria-label=\"Close dialog\" />\n *\n * @example\n * // Solid floating action button:\n * <IconButton icon={<Icon icon={IconPlus} />} variant=\"solid\" size=\"lg\" aria-label=\"Create new project\" />\n *\n * @example\n * // Error icon button with loading state (e.g. confirm delete):\n * <IconButton icon={<Icon icon={IconTrash} />} variant=\"solid\" color=\"error\" loading={isDeleting} aria-label=\"Delete\" />\n * // These are just a few ways — feel free to combine props creatively!\n */\nexport interface IconButtonProps\n extends Omit<ButtonProps, 'startIcon' | 'endIcon' | 'fullWidth' | 'loadingPosition' | 'children' | 'size' | 'shape'> {\n /**\n * The icon to render. Accepts any `IconInput`:\n * - `<Icon icon={IconPlus} />` (canonical — size flows from context)\n * - `<IconPlus />` (raw Tabler element — passes through)\n * - `IconPlus` (Tabler component ref — auto-wrapped in `<Icon>`)\n * - Custom `<span>$</span>` or any ReactElement.\n */\n icon: IconInput\n /** Accessible label — required for icon-only buttons (WCAG AA) */\n 'aria-label': string\n /** Button shape. Default: 'square' */\n shape?: 'square' | 'circle'\n /** Button size. Default: 'md' */\n size?: IconButtonSize\n}\n\nconst IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ icon, shape = 'square', size = 'md', className, loading, ...props }, ref) => {\n return (\n <Button\n ref={ref}\n size={sizeMap[size]}\n className={cn(shape === 'circle' && 'rounded-pill', className)}\n loading={loading}\n loadingPosition=\"center\"\n {...props}\n >\n {normalizeIcon(icon)}\n </Button>\n )\n },\n)\nIconButton.displayName = 'IconButton'\n\nexport { IconButton }\n"],"mappings":";;;;;;;AAUA,IAAM,IAAU;CACd,IAAI;CACJ,IAAI;CACJ,IAAI;CACL,EAoDK,IAAa,EAAM,YACtB,EAAE,SAAM,WAAQ,UAAU,UAAO,MAAM,cAAW,YAAS,GAAG,KAAS,MAEpE,kBAAC,GAAD;CACO;CACL,MAAM,EAAQ;CACd,WAAW,EAAG,MAAU,YAAY,gBAAgB,EAAU;CACrD;CACT,iBAAgB;CAChB,GAAI;WAEH,EAAc,EAAK;CACb,CAAA,CAGd;AACD,EAAW,cAAc"}
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -33,7 +33,6 @@ export { Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, c
|
|
|
33
33
|
export { FileUpload, type FileUploadProps } from './file-upload';
|
|
34
34
|
export { Checkbox, type CheckboxProps } from './checkbox';
|
|
35
35
|
export { FormField, type FormFieldProps, type FormHelperState, FormHelperText, type FormHelperTextProps, useFormField } from './form';
|
|
36
|
-
export { InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot } from './input-otp';
|
|
37
36
|
export { NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputState, numberInputWrapperVariants } from './number-input';
|
|
38
37
|
export { RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps } from './radio';
|
|
39
38
|
export { SearchInput, type SearchInputProps } from './search-input';
|
|
@@ -49,8 +48,6 @@ export { Dialog, DialogClose, DialogContent, type DialogContentProps, DialogCont
|
|
|
49
48
|
export { HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger } from './hover-card';
|
|
50
49
|
export { Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger } from './popover';
|
|
51
50
|
export { Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, } from './sheet';
|
|
52
|
-
export { formatFileSize, toast, type ToastActionOptions, type ToastOptions, type ToastProps, type ToastType, type ToastUndoOptions, type ToastUploadOptions, type UploadFile, } from './toast';
|
|
53
|
-
export { Toaster, type ToasterProps } from './toaster';
|
|
54
51
|
export { Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger } from './tooltip';
|
|
55
52
|
export { Alert, type AlertProps, alertVariants } from './alert';
|
|
56
53
|
export { Banner, type BannerProps, bannerVariants } from './banner';
|
|
@@ -87,6 +84,7 @@ export { SegmentedControl, type SegmentedControlOption, type SegmentedControlPro
|
|
|
87
84
|
export { DevalokGrain, type DevalokGrainProps, type GrainIntensity } from './devalok-grain';
|
|
88
85
|
export { DateSeparator, type DateSeparatorProps, Message, type MessageActionProps, type MessageActionsProps, type MessageAuthorProps, type MessageAvatarProps, type MessageBodyProps, type MessageContentProps, type MessageContextValue, type MessageEditableBodyProps, MessageInput, type MessageInputProps, MessageList, type MessageListProps, type MessageProps, type MessageReactionsProps, SystemMessage, type SystemMessageProps, TypingIndicator, type TypingIndicatorProps, UnreadSeparator, type UnreadSeparatorProps, useMessageContext, } from './chat';
|
|
89
86
|
export { Link, type LinkProps } from './link';
|
|
87
|
+
export { getOAuthLabel, getOAuthName, OAuth, type OAuthAppearance, OAuthButton, type OAuthButtonProps, OAuthConnectionRow, type OAuthConnectionRowProps, OAuthDivider, type OAuthDividerProps, OAuthGlyph, type OAuthGlyphProps, OAuthGroup, type OAuthGroupProps, type OAuthIntent, type OAuthProvider, type OAuthVariant, } from './oauth-button';
|
|
90
88
|
export { formatRelativeTime } from './lib/date-utils';
|
|
91
89
|
export type { SpringPreset, TweenPreset } from './lib/motion';
|
|
92
90
|
export { springs, stagger, tweens, withReducedMotion } from './lib/motion';
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 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B,EAC7B,YAAY,EACZ,KAAK,iBAAiB,EACtB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,aAAa,EACb,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,oBAAoB,EACzB,eAAe,EACf,KAAK,oBAAoB,EACzB,iBAAiB,GAClB,MAAM,QAAQ,CAAA;AAGf,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAG7C,OAAO,EACL,aAAa,EACb,YAAY,EACZ,KAAK,EACL,KAAK,eAAe,EACpB,WAAW,EACX,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,YAAY,EACZ,KAAK,iBAAiB,EACtB,UAAU,EACV,KAAK,eAAe,EACpB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/ui/index.js
CHANGED
|
@@ -41,40 +41,38 @@ import { Label as Ft } from "./label.js";
|
|
|
41
41
|
import { Separator as It } from "./separator.js";
|
|
42
42
|
import { SplitButton as Lt } from "./split-button.js";
|
|
43
43
|
import { VisuallyHidden as Rt } from "./visually-hidden.js";
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
44
|
+
import { NumberInput as zt, numberInputWrapperVariants as Bt } from "./number-input.js";
|
|
45
|
+
import { RadioGroup as Vt, RadioGroupItem as Ht } from "./radio.js";
|
|
46
|
+
import { SearchInput as Ut } from "./search-input.js";
|
|
47
|
+
import { Select as Wt, SelectContent as Gt, SelectGroup as Kt, SelectItem as qt, SelectLabel as Jt, SelectScrollDownButton as Yt, SelectScrollUpButton as Q, SelectSeparator as Xt, SelectTrigger as Zt, SelectValue as Qt, selectTriggerVariants as $t } from "./select.js";
|
|
48
|
+
import { Slider as en, sliderThumbVariants as tn, sliderTrackVariants as nn } from "./slider.js";
|
|
49
|
+
import { Switch as rn } from "./switch.js";
|
|
50
|
+
import { Textarea as an, textareaVariants as on } from "./textarea.js";
|
|
51
|
+
import { Toggle as sn, toggleVariants as cn } from "./toggle.js";
|
|
52
|
+
import { ToggleGroup as ln, ToggleGroupItem as un } from "./toggle-group.js";
|
|
53
|
+
import { Sheet as dn, SheetClose as fn, SheetContent as pn, SheetDescription as mn, SheetFooter as hn, SheetHeader as gn, SheetOverlay as _n, SheetPortal as vn, SheetTitle as yn, SheetTrigger as bn } from "./sheet.js";
|
|
54
|
+
import { Tooltip as xn, TooltipContent as Sn, TooltipProvider as Cn, TooltipTrigger as wn } from "./tooltip.js";
|
|
55
55
|
import { Progress as Tn, progressIndicatorVariants as En, progressTrackVariants as Dn } from "./progress.js";
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import { Link as li } from "./link.js";
|
|
74
|
-
import { formatRelativeTime as ui } from "./lib/date-utils.js";
|
|
56
|
+
import { MultiProgressRing as On, ProgressRing as kn } from "./progress-ring.js";
|
|
57
|
+
import { StatCard as An } from "./stat-card.js";
|
|
58
|
+
import { StatusDot as jn } from "./status-dot.js";
|
|
59
|
+
import { Menubar as Mn, MenubarCheckboxItem as Nn, MenubarContent as Pn, MenubarGroup as Fn, MenubarItem as In, MenubarLabel as Ln, MenubarMenu as Rn, MenubarPortal as zn, MenubarRadioGroup as Bn, MenubarRadioItem as Vn, MenubarSeparator as Hn, MenubarShortcut as Un, MenubarSub as Wn, MenubarSubContent as Gn, MenubarSubTrigger as Kn, MenubarTrigger as qn } from "./menubar.js";
|
|
60
|
+
import { NavigationMenu as Jn, NavigationMenuContent as Yn, NavigationMenuIndicator as Xn, NavigationMenuItem as Zn, NavigationMenuLink as Qn, NavigationMenuList as $n, NavigationMenuTrigger as er, NavigationMenuViewport as tr } from "./navigation-menu.js";
|
|
61
|
+
import { PaginationContent as nr, PaginationEllipsis as rr, PaginationItem as ir, PaginationLink as ar, PaginationNav as or, PaginationNext as sr, PaginationPrevious as cr, PaginationRoot as lr, generatePagination as ur } from "./pagination.js";
|
|
62
|
+
import { Sidebar as dr, SidebarContent as fr, SidebarFooter as pr, SidebarGroup as mr, SidebarGroupAction as hr, SidebarGroupContent as gr, SidebarGroupLabel as _r, SidebarHeader as vr, SidebarInput as yr, SidebarInset as br, SidebarMenu as xr, SidebarMenuAction as Sr, SidebarMenuBadge as Cr, SidebarMenuButton as wr, SidebarMenuItem as Tr, SidebarMenuSkeleton as Er, SidebarMenuSub as Dr, SidebarMenuSubButton as Or, SidebarMenuSubItem as kr, SidebarProvider as Ar, SidebarRail as jr, SidebarSeparator as Mr, SidebarTrigger as Nr, useSidebar as Pr } from "./sidebar.js";
|
|
63
|
+
import { Tabs as Fr, TabsContent as Ir, TabsList as Lr, TabsTrigger as Rr } from "./tabs.js";
|
|
64
|
+
import { Step as zr, Stepper as Br } from "./stepper.js";
|
|
65
|
+
import { Text as Vr, textVariants as Hr } from "./text.js";
|
|
66
|
+
import { Stack as Ur } from "./stack.js";
|
|
67
|
+
import { n as Wr, r as Gr, t as Kr } from "../_chunks/tree-view.js";
|
|
68
|
+
import { SegmentedControl as qr } from "./segmented-control.js";
|
|
69
|
+
import { a as Jr, c as Yr, i as Xr, n as Zr, o as Qr, r as $r, s as ei, t as ti } from "../_chunks/chat.js";
|
|
70
|
+
import { Link as ni } from "./link.js";
|
|
71
|
+
import { a as ri, c as ii, i as ai, n as oi, o as si, r as ci, s as li, t as ui } from "../_chunks/oauth-button.js";
|
|
72
|
+
import { formatRelativeTime as di } from "./lib/date-utils.js";
|
|
75
73
|
//#region src/ui/lib/check-tokens.ts
|
|
76
74
|
var $ = !1;
|
|
77
|
-
function
|
|
75
|
+
function fi() {
|
|
78
76
|
if (!$ && !(typeof window > "u")) {
|
|
79
77
|
try {
|
|
80
78
|
return;
|
|
@@ -86,6 +84,6 @@ function di() {
|
|
|
86
84
|
}
|
|
87
85
|
//#endregion
|
|
88
86
|
//#region src/ui/index.ts
|
|
89
|
-
|
|
87
|
+
fi();
|
|
90
88
|
//#endregion
|
|
91
|
-
export { s as Accordion, c as AccordionContent, l as AccordionItem, u as AccordionTrigger, S as Alert, d as AlertDialog, f as AlertDialogAction, p as AlertDialogCancel, m as AlertDialogContent, h as AlertDialogDescription, g as AlertDialogFooter, _ as AlertDialogHeader, v as AlertDialogOverlay, y as AlertDialogPortal, b as AlertDialogTitle, x as AlertDialogTrigger, w as AspectRatio, O as Autocomplete, k as Avatar, A as AvatarFallback, j as AvatarImage, P as Badge, I as BadgeGroup, N as BadgeIndicator, L as Banner, z as Breadcrumb, B as BreadcrumbEllipsis, V as BreadcrumbItem, H as BreadcrumbLink, U as BreadcrumbList, W as BreadcrumbPage, G as BreadcrumbSeparator, J as Button, K as ButtonGroup, X as Card, Z as CardContent, re as CardDescription, ie as CardFooter, ae as CardHeader, oe as CardTitle, ce as Checkbox, le as Code, ue as Collapsible, de as CollapsibleContent, fe as CollapsibleTrigger, _e as ColorInput, ve as ColorSwatch, ye as Combobox, xe as Container, Se as ContextMenu, Ce as ContextMenuCheckboxItem, we as ContextMenuContent, Te as ContextMenuGroup, Ee as ContextMenuItem, De as ContextMenuLabel, Oe as ContextMenuPortal, ke as ContextMenuRadioGroup, Ae as ContextMenuRadioItem, je as ContextMenuSeparator, Me as ContextMenuShortcut, Ne as ContextMenuSub, Pe as ContextMenuSubContent, Fe as ContextMenuSubTrigger, Ie as ContextMenuTrigger,
|
|
89
|
+
export { s as Accordion, c as AccordionContent, l as AccordionItem, u as AccordionTrigger, S as Alert, d as AlertDialog, f as AlertDialogAction, p as AlertDialogCancel, m as AlertDialogContent, h as AlertDialogDescription, g as AlertDialogFooter, _ as AlertDialogHeader, v as AlertDialogOverlay, y as AlertDialogPortal, b as AlertDialogTitle, x as AlertDialogTrigger, w as AspectRatio, O as Autocomplete, k as Avatar, A as AvatarFallback, j as AvatarImage, P as Badge, I as BadgeGroup, N as BadgeIndicator, L as Banner, z as Breadcrumb, B as BreadcrumbEllipsis, V as BreadcrumbItem, H as BreadcrumbLink, U as BreadcrumbList, W as BreadcrumbPage, G as BreadcrumbSeparator, J as Button, K as ButtonGroup, X as Card, Z as CardContent, re as CardDescription, ie as CardFooter, ae as CardHeader, oe as CardTitle, ce as Checkbox, le as Code, ue as Collapsible, de as CollapsibleContent, fe as CollapsibleTrigger, _e as ColorInput, ve as ColorSwatch, ye as Combobox, xe as Container, Se as ContextMenu, Ce as ContextMenuCheckboxItem, we as ContextMenuContent, Te as ContextMenuGroup, Ee as ContextMenuItem, De as ContextMenuLabel, Oe as ContextMenuPortal, ke as ContextMenuRadioGroup, Ae as ContextMenuRadioItem, je as ContextMenuSeparator, Me as ContextMenuShortcut, Ne as ContextMenuSub, Pe as ContextMenuSubContent, Fe as ContextMenuSubTrigger, Ie as ContextMenuTrigger, Yr as DateSeparator, ht as DevalokGrain, gt as Dialog, _t as DialogClose, vt as DialogContent, yt as DialogContentRaw, bt as DialogDescription, xt as DialogFooter, St as DialogHeader, Ct as DialogOverlay, wt as DialogPortal, Tt as DialogTitle, Et as DialogTrigger, et as DropdownMenu, tt as DropdownMenuCheckboxItem, nt as DropdownMenuContent, rt as DropdownMenuGroup, it as DropdownMenuItem, at as DropdownMenuLabel, ot as DropdownMenuPortal, st as DropdownMenuRadioGroup, ct as DropdownMenuRadioItem, lt as DropdownMenuSeparator, ut as DropdownMenuShortcut, dt as DropdownMenuSub, ft as DropdownMenuSubContent, pt as DropdownMenuSubTrigger, mt as DropdownMenuTrigger, Dt as FileUpload, T as FormField, E as FormHelperText, Ot as HoverCard, kt as HoverCardContent, At as HoverCardTrigger, o as Icon, jt as IconButton, ee as IconContext, Mt as IconGroup, te as IconProvider, Nt as Input, Ft as Label, ni as Link, Mn as Menubar, Nn as MenubarCheckboxItem, Pn as MenubarContent, Fn as MenubarGroup, In as MenubarItem, Ln as MenubarLabel, Rn as MenubarMenu, zn as MenubarPortal, Bn as MenubarRadioGroup, Vn as MenubarRadioItem, Hn as MenubarSeparator, Un as MenubarShortcut, Wn as MenubarSub, Gn as MenubarSubContent, Kn as MenubarSubTrigger, qn as MenubarTrigger, Qr as Message, Jr as MessageInput, Xr as MessageList, On as MultiProgressRing, Jn as NavigationMenu, Yn as NavigationMenuContent, Xn as NavigationMenuIndicator, Zn as NavigationMenuItem, Qn as NavigationMenuLink, $n as NavigationMenuList, er as NavigationMenuTrigger, tr as NavigationMenuViewport, zt as NumberInput, ui as OAuth, oi as OAuthButton, ci as OAuthConnectionRow, ai as OAuthDivider, ri as OAuthGlyph, si as OAuthGroup, nr as PaginationContent, rr as PaginationEllipsis, ir as PaginationItem, ar as PaginationLink, or as PaginationNav, sr as PaginationNext, cr as PaginationPrevious, lr as PaginationRoot, ge as Popover, me as PopoverAnchor, he as PopoverContent, pe as PopoverTrigger, Tn as Progress, kn as ProgressRing, Vt as RadioGroup, Ht as RadioGroupItem, Ut as SearchInput, qr as SegmentedControl, Wt as Select, Gt as SelectContent, Kt as SelectGroup, qt as SelectItem, Jt as SelectLabel, Yt as SelectScrollDownButton, Q as SelectScrollUpButton, Xt as SelectSeparator, Zt as SelectTrigger, Qt as SelectValue, It as Separator, dn as Sheet, fn as SheetClose, pn as SheetContent, mn as SheetDescription, hn as SheetFooter, gn as SheetHeader, _n as SheetOverlay, vn as SheetPortal, yn as SheetTitle, bn as SheetTrigger, dr as Sidebar, fr as SidebarContent, pr as SidebarFooter, mr as SidebarGroup, hr as SidebarGroupAction, gr as SidebarGroupContent, _r as SidebarGroupLabel, vr as SidebarHeader, yr as SidebarInput, br as SidebarInset, xr as SidebarMenu, Sr as SidebarMenuAction, Cr as SidebarMenuBadge, wr as SidebarMenuButton, Tr as SidebarMenuItem, Er as SidebarMenuSkeleton, Dr as SidebarMenuSub, Or as SidebarMenuSubButton, kr as SidebarMenuSubItem, Ar as SidebarProvider, jr as SidebarRail, Mr as SidebarSeparator, Nr as SidebarTrigger, Le as Skeleton, Re as SkeletonAvatar, ze as SkeletonButton, Be as SkeletonChart, Ve as SkeletonGroup, He as SkeletonImage, Ue as SkeletonInput, We as SkeletonText, en as Slider, a as Spinner, Lt as SplitButton, Ur as Stack, An as StatCard, jn as StatusDot, zr as Step, Br as Stepper, rn as Switch, $r as SystemMessage, Ke as Table, qe as TableBody, Je as TableCaption, Ye as TableCell, Xe as TableFooter, Ze as TableHead, Qe as TableHeader, $e as TableRow, Fr as Tabs, Ir as TabsContent, Lr as TabsList, Rr as TabsTrigger, Vr as Text, an as Textarea, sn as Toggle, ln as ToggleGroup, un as ToggleGroupItem, xn as Tooltip, Sn as TooltipContent, Cn as TooltipProvider, wn as TooltipTrigger, Kr as TreeItem, Wr as TreeView, Zr as TypingIndicator, ti as UnreadSeparator, Rt as VisuallyHidden, C as alertVariants, M as avatarVariants, F as badgeVariants, R as bannerVariants, Y as buttonVariants, se as cardVariants, i as cn, be as comboboxTriggerVariants, di as formatRelativeTime, ur as generatePagination, li as getOAuthLabel, ii as getOAuthName, Pt as inputWrapperVariants, Bt as numberInputWrapperVariants, En as progressIndicatorVariants, Dn as progressTrackVariants, $t as selectTriggerVariants, Ge as skeletonVariants, tn as sliderThumbVariants, nn as sliderTrackVariants, e as springs, t as stagger, Hr as textVariants, on as textareaVariants, cn as toggleVariants, n as tweens, q as useButtonGroup, D as useFormField, ne as useIconContext, ei as useMessageContext, Pr as useSidebar, Gr as useTree, r as withReducedMotion };
|
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/ui/lib/check-tokens.ts","../../src/ui/index.ts"],"sourcesContent":["/**\n * Dev-mode check for missing token CSS.\n *\n * If the consumer forgets `import '@devalok/shilp-sutra/tokens'`, all CSS\n * custom properties resolve to empty strings and components render with\n * transparent/broken backgrounds. This check detects that condition and\n * warns in the console.\n *\n * Only runs once, only in development, only in the browser.\n */\nlet checked = false\n\nexport function checkTokensLoaded(): void {\n if (checked) return\n if (typeof window === 'undefined') return\n\n // Skip in production — bundlers (Vite, Next.js, webpack) define import.meta.env or process.env\n try {\n // @ts-expect-error -- import.meta.env is Vite-specific, not in base TS lib\n if (import.meta.env?.PROD) return\n } catch { /* not in Vite */ }\n\n checked = true\n\n // Wait for stylesheets to load\n requestAnimationFrame(() => {\n const value = getComputedStyle(document.documentElement).getPropertyValue('--color-accent-9').trim()\n if (!value) {\n console.warn(\n '[shilp-sutra] Design system tokens CSS not loaded. ' +\n 'Add `import \\'@devalok/shilp-sutra/tokens\\'` to your root layout. ' +\n 'Without it, components will render with missing colors, spacing, and typography.'\n )\n }\n })\n}\n","/**\n * @module @devalok/shilp-sutra/ui\n *\n * Core UI primitives: buttons, inputs, dialogs, cards, tables, badges, navigation, and more.\n * Most components require client-side React (\"use client\").\n *\n * **Server-safe components** (import individually for Server Components):\n * `Text`, `Skeleton`, `Stack`, `Container`, `Table`, `Code`, `VisuallyHidden`\n *\n * @example\n * // Server Component — import individually:\n * import { Text } from '@devalok/shilp-sutra/ui/text'\n * import { Stack } from '@devalok/shilp-sutra/ui/stack'\n *\n * // Client Component — barrel import:\n * import { Button, Dialog } from '@devalok/shilp-sutra/ui'\n */\n\n// Dev-mode token presence check — runs once on first import\nimport { checkTokensLoaded } from './lib/check-tokens'\ncheckTokensLoaded()\n\n// Core\nexport { Button, type ButtonProps,buttonVariants } from './button'\nexport { ButtonGroup, type ButtonGroupProps,useButtonGroup } from './button-group'\nexport { ColorInput, type ColorInputProps } from './color-input'\nexport { Icon, type IconProps } from './icon'\nexport { IconButton, type IconButtonProps } from './icon-button'\nexport { IconContext, type IconContextValue, IconProvider, type IconSize, type IconStroke,useIconContext } from './icon-context'\nexport { IconGroup, type IconGroupProps } from './icon-group'\nexport { Input, type InputProps, type InputState, inputWrapperVariants } from './input'\nexport { Label, type LabelProps } from './label'\nexport { Separator, type SeparatorProps } from './separator'\nexport { SplitButton, type SplitButtonProps } from './split-button'\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden'\n\n// Autocomplete\nexport { Autocomplete, type AutocompleteOption,type AutocompleteProps } from './autocomplete'\n\n// Combobox\nexport { Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize,comboboxTriggerVariants } from './combobox'\n\n// FileUpload\nexport { FileUpload, type FileUploadProps } from './file-upload'\n\n// Form Controls\nexport { Checkbox, type CheckboxProps } from './checkbox'\nexport { FormField, type FormFieldProps, type FormHelperState, FormHelperText, type FormHelperTextProps,useFormField } from './form'\nexport { InputOTP, InputOTPGroup, type InputOTPProps,InputOTPSeparator, InputOTPSlot } from './input-otp'\nexport { NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputState,numberInputWrapperVariants } from './number-input'\nexport { RadioGroup, RadioGroupItem, type RadioGroupItemProps,type RadioGroupProps } from './radio'\nexport { SearchInput, type SearchInputProps } from './search-input'\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n type SelectTriggerProps,\n selectTriggerVariants,\n SelectValue,\n} from './select'\nexport { Slider, type SliderColor,type SliderProps, type SliderSize, sliderThumbVariants, sliderTrackVariants } from './slider'\nexport { Switch, type SwitchProps } from './switch'\nexport { Textarea, type TextareaProps,textareaVariants } from './textarea'\nexport { Toggle, type ToggleProps,toggleVariants } from './toggle'\nexport { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps,type ToggleGroupProps } from './toggle-group'\n\n// Feedback & Overlays\nexport {\n AlertDialog,\n AlertDialogAction,\n type AlertDialogActionProps,\n AlertDialogCancel,\n type AlertDialogCancelProps,\n AlertDialogContent,\n type AlertDialogContentProps,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from './alert-dialog'\nexport { Collapsible, CollapsibleContent, type CollapsibleProps,CollapsibleTrigger } from './collapsible'\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n type DialogContentProps,\n DialogContentRaw,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n type DialogTitleProps,\n DialogTrigger,\n} from './dialog'\nexport { HoverCard, HoverCardContent, type HoverCardContentProps,HoverCardTrigger } from './hover-card'\nexport { Popover, PopoverAnchor, PopoverContent, type PopoverContentProps,PopoverTrigger } from './popover'\nexport {\n Sheet,\n SheetClose,\n SheetContent,\n type SheetContentProps,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetOverlay,\n SheetPortal,\n SheetTitle,\n SheetTrigger,\n} from './sheet'\nexport {\n formatFileSize,\n toast,\n type ToastActionOptions,\n type ToastOptions,\n type ToastProps,\n type ToastType,\n type ToastUndoOptions,\n type ToastUploadOptions,\n type UploadFile,\n} from './toast'\nexport { Toaster, type ToasterProps } from './toaster'\nexport { Tooltip, TooltipContent, type TooltipContentProps,TooltipProvider, TooltipTrigger } from './tooltip'\n// ---------------------------------------------------------------------------\n// Notifications — pick the right one:\n// Alert — inline, static feedback within a form or page section (no user action needed to show)\n// Banner — persistent, page-level notice shown above main content (survives navigation)\n// Toast — imperative, transient, action-triggered (fires on user action, auto-dismisses)\n// Requires <Toaster /> mounted once at layout root. Use toast.success() etc. from anywhere.\n// ---------------------------------------------------------------------------\nexport { Alert, type AlertProps,alertVariants } from './alert'\nexport { Banner, type BannerProps,bannerVariants } from './banner'\nexport { Spinner, type SpinnerProps } from './spinner'\n\n// Data Display\nexport { AspectRatio } from './aspect-ratio'\nexport { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarProps, type AvatarRing,type AvatarStatus, avatarVariants } from './avatar'\nexport { Badge, type BadgeProps,badgeVariants } from './badge'\nexport { BadgeGroup, type BadgeGroupProps } from './badge-group'\nexport { BadgeIndicator, type BadgeIndicatorProps } from './badge-indicator'\nexport { Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps,CardTitle, cardVariants } from './card'\nexport { Code, type CodeProps } from './code'\nexport { ColorSwatch, type ColorSwatchProps } from './color-swatch'\nexport { Progress, progressIndicatorVariants, type ProgressProps,progressTrackVariants } from './progress'\nexport { MultiProgressRing, type MultiProgressRingProps,ProgressRing, type ProgressRingProps } from './progress-ring'\nexport {\n Skeleton,\n SkeletonAvatar,\n type SkeletonAvatarProps,\n SkeletonButton,\n type SkeletonButtonProps,\n SkeletonChart,\n type SkeletonChartProps,\n SkeletonGroup,\n type SkeletonGroupProps,\n SkeletonImage,\n type SkeletonImageProps,\n SkeletonInput,\n type SkeletonInputProps,\n type SkeletonProps,\n SkeletonText,\n type SkeletonTextProps,\n skeletonVariants,\n} from './skeleton'\nexport { StatCard, type StatCardProps } from './stat-card'\nexport { StatusDot, type StatusDotProps, type StatusDotStatus } from './status-dot'\nexport { Table, TableBody, TableCaption, TableCell, type TableCellProps,TableFooter, TableHead, TableHeader, type TableProps, TableRow, type TableRowProps } from './table'\n\n// Navigation\nexport { Accordion, AccordionContent, type AccordionContentProps,AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps } from './accordion'\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n type BreadcrumbLinkProps,\n BreadcrumbList,\n BreadcrumbPage,\n type BreadcrumbProps,\n BreadcrumbSeparator,\n} from './breadcrumb'\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n type ContextMenuContentProps,\n ContextMenuGroup,\n ContextMenuItem,\n type ContextMenuItemProps,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n} from './context-menu'\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n type DropdownMenuContentProps,\n DropdownMenuGroup,\n DropdownMenuItem,\n type DropdownMenuItemProps,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from './dropdown-menu'\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n type MenubarContentProps,\n MenubarGroup,\n MenubarItem,\n type MenubarItemProps,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n} from './menubar'\nexport {\n NavigationMenu,\n NavigationMenuContent,\n type NavigationMenuContentProps,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n type NavigationMenuProps,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n} from './navigation-menu'\nexport {\n generatePagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n type PaginationLinkProps,\n PaginationNav,\n type PaginationNavProps,\n PaginationNext,\n PaginationPrevious,\n PaginationRoot,\n} from './pagination'\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n type SidebarProps,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from './sidebar'\nexport { Tabs, type TabsColor, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation,type TabsProps, type TabsSize, TabsTrigger, type TabsTriggerProps } from './tabs'\n\n// Workflow\nexport { Step, Stepper, type StepperProps, type StepProps } from './stepper'\n\n\n// Typography\nexport { Text, type TextProps, type TextVariant,textVariants } from './text'\n\n// Layout\nexport { Container, type ContainerProps } from './container'\nexport { type SpacingToken,Stack, type StackProps } from './stack'\n\n// Tree View\nexport { TreeItem, type TreeItemProps, type TreeNode,TreeView, type TreeViewProps, useTree } from './tree-view'\n\n// Segmented Control\nexport {\n SegmentedControl,\n type SegmentedControlOption,\n type SegmentedControlProps,\n type SegmentedControlSize,\n type SegmentedControlVariant,\n} from './segmented-control'\n\n// Brand Texture\nexport { DevalokGrain, type DevalokGrainProps, type GrainIntensity } from './devalok-grain'\n\n// Chat primitives\nexport {\n DateSeparator,\n type DateSeparatorProps,\n Message,\n type MessageActionProps,\n type MessageActionsProps,\n type MessageAuthorProps,\n type MessageAvatarProps,\n type MessageBodyProps,\n type MessageContentProps,\n type MessageContextValue,\n type MessageEditableBodyProps,\n MessageInput,\n type MessageInputProps,\n MessageList,\n type MessageListProps,\n type MessageProps,\n type MessageReactionsProps,\n SystemMessage,\n type SystemMessageProps,\n TypingIndicator,\n type TypingIndicatorProps,\n UnreadSeparator,\n type UnreadSeparatorProps,\n useMessageContext,\n} from './chat'\n\n// Other\nexport { Link, type LinkProps } from './link'\n\n// Utilities\nexport { formatRelativeTime } from './lib/date-utils'\nexport type { SpringPreset, TweenPreset } from './lib/motion'\nexport { springs, stagger, tweens, withReducedMotion } from './lib/motion'\nexport { cn } from './lib/utils'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAI,IAAU;AAEd,SAAgB,KAA0B;AACpC,WACA,SAAO,SAAW,MAGtB;MAAI;AAEyB;UACrB;AAKR,EAHA,IAAU,IAGV,4BAA4B;AAE1B,GADc,iBAAiB,SAAS,gBAAgB,CAAC,iBAAiB,mBAAmB,CAAC,MAAM,IAElG,QAAQ,KACN,sMAGD;IAEH;;;;;ACdJ,IAAmB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/ui/lib/check-tokens.ts","../../src/ui/index.ts"],"sourcesContent":["/**\n * Dev-mode check for missing token CSS.\n *\n * If the consumer forgets `import '@devalok/shilp-sutra/tokens'`, all CSS\n * custom properties resolve to empty strings and components render with\n * transparent/broken backgrounds. This check detects that condition and\n * warns in the console.\n *\n * Only runs once, only in development, only in the browser.\n */\nlet checked = false\n\nexport function checkTokensLoaded(): void {\n if (checked) return\n if (typeof window === 'undefined') return\n\n // Skip in production — bundlers (Vite, Next.js, webpack) define import.meta.env or process.env\n try {\n // @ts-expect-error -- import.meta.env is Vite-specific, not in base TS lib\n if (import.meta.env?.PROD) return\n } catch { /* not in Vite */ }\n\n checked = true\n\n // Wait for stylesheets to load\n requestAnimationFrame(() => {\n const value = getComputedStyle(document.documentElement).getPropertyValue('--color-accent-9').trim()\n if (!value) {\n console.warn(\n '[shilp-sutra] Design system tokens CSS not loaded. ' +\n 'Add `import \\'@devalok/shilp-sutra/tokens\\'` to your root layout. ' +\n 'Without it, components will render with missing colors, spacing, and typography.'\n )\n }\n })\n}\n","/**\n * @module @devalok/shilp-sutra/ui\n *\n * Core UI primitives: buttons, inputs, dialogs, cards, tables, badges, navigation, and more.\n * Most components require client-side React (\"use client\").\n *\n * **Server-safe components** (import individually for Server Components):\n * `Text`, `Skeleton`, `Stack`, `Container`, `Table`, `Code`, `VisuallyHidden`\n *\n * @example\n * // Server Component — import individually:\n * import { Text } from '@devalok/shilp-sutra/ui/text'\n * import { Stack } from '@devalok/shilp-sutra/ui/stack'\n *\n * // Client Component — barrel import:\n * import { Button, Dialog } from '@devalok/shilp-sutra/ui'\n */\n\n// Dev-mode token presence check — runs once on first import\nimport { checkTokensLoaded } from './lib/check-tokens'\ncheckTokensLoaded()\n\n// Core\nexport { Button, type ButtonProps,buttonVariants } from './button'\nexport { ButtonGroup, type ButtonGroupProps,useButtonGroup } from './button-group'\nexport { ColorInput, type ColorInputProps } from './color-input'\nexport { Icon, type IconProps } from './icon'\nexport { IconButton, type IconButtonProps } from './icon-button'\nexport { IconContext, type IconContextValue, IconProvider, type IconSize, type IconStroke,useIconContext } from './icon-context'\nexport { IconGroup, type IconGroupProps } from './icon-group'\nexport { Input, type InputProps, type InputState, inputWrapperVariants } from './input'\nexport { Label, type LabelProps } from './label'\nexport { Separator, type SeparatorProps } from './separator'\nexport { SplitButton, type SplitButtonProps } from './split-button'\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden'\n\n// Autocomplete\nexport { Autocomplete, type AutocompleteOption,type AutocompleteProps } from './autocomplete'\n\n// Combobox\nexport { Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize,comboboxTriggerVariants } from './combobox'\n\n// FileUpload\nexport { FileUpload, type FileUploadProps } from './file-upload'\n\n// Form Controls\nexport { Checkbox, type CheckboxProps } from './checkbox'\nexport { FormField, type FormFieldProps, type FormHelperState, FormHelperText, type FormHelperTextProps,useFormField } from './form'\n// InputOTP removed from barrel in 0.40.0 — hard peer `input-otp` was breaking\n// fresh-consumer builds. Import per-component instead:\n// import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from '@devalok/shilp-sutra/ui/input-otp'\nexport { NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputState,numberInputWrapperVariants } from './number-input'\nexport { RadioGroup, RadioGroupItem, type RadioGroupItemProps,type RadioGroupProps } from './radio'\nexport { SearchInput, type SearchInputProps } from './search-input'\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n type SelectTriggerProps,\n selectTriggerVariants,\n SelectValue,\n} from './select'\nexport { Slider, type SliderColor,type SliderProps, type SliderSize, sliderThumbVariants, sliderTrackVariants } from './slider'\nexport { Switch, type SwitchProps } from './switch'\nexport { Textarea, type TextareaProps,textareaVariants } from './textarea'\nexport { Toggle, type ToggleProps,toggleVariants } from './toggle'\nexport { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps,type ToggleGroupProps } from './toggle-group'\n\n// Feedback & Overlays\nexport {\n AlertDialog,\n AlertDialogAction,\n type AlertDialogActionProps,\n AlertDialogCancel,\n type AlertDialogCancelProps,\n AlertDialogContent,\n type AlertDialogContentProps,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from './alert-dialog'\nexport { Collapsible, CollapsibleContent, type CollapsibleProps,CollapsibleTrigger } from './collapsible'\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n type DialogContentProps,\n DialogContentRaw,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n type DialogTitleProps,\n DialogTrigger,\n} from './dialog'\nexport { HoverCard, HoverCardContent, type HoverCardContentProps,HoverCardTrigger } from './hover-card'\nexport { Popover, PopoverAnchor, PopoverContent, type PopoverContentProps,PopoverTrigger } from './popover'\nexport {\n Sheet,\n SheetClose,\n SheetContent,\n type SheetContentProps,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetOverlay,\n SheetPortal,\n SheetTitle,\n SheetTrigger,\n} from './sheet'\n// toast + Toaster removed from barrel in 0.40.0 — hard peer `sonner` was\n// breaking fresh-consumer builds when consumers imported other UI symbols\n// from the barrel without sonner installed. Import per-component instead:\n// import { toast, formatFileSize, type ToastOptions } from '@devalok/shilp-sutra/ui/toast'\n// import { Toaster } from '@devalok/shilp-sutra/ui/toaster'\nexport { Tooltip, TooltipContent, type TooltipContentProps,TooltipProvider, TooltipTrigger } from './tooltip'\n// ---------------------------------------------------------------------------\n// Notifications — pick the right one:\n// Alert — inline, static feedback within a form or page section (no user action needed to show)\n// Banner — persistent, page-level notice shown above main content (survives navigation)\n// Toast — imperative, transient, action-triggered (fires on user action, auto-dismisses)\n// Requires <Toaster /> mounted once at layout root. Use toast.success() etc. from anywhere.\n// ---------------------------------------------------------------------------\nexport { Alert, type AlertProps,alertVariants } from './alert'\nexport { Banner, type BannerProps,bannerVariants } from './banner'\nexport { Spinner, type SpinnerProps } from './spinner'\n\n// Data Display\nexport { AspectRatio } from './aspect-ratio'\nexport { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarProps, type AvatarRing,type AvatarStatus, avatarVariants } from './avatar'\nexport { Badge, type BadgeProps,badgeVariants } from './badge'\nexport { BadgeGroup, type BadgeGroupProps } from './badge-group'\nexport { BadgeIndicator, type BadgeIndicatorProps } from './badge-indicator'\nexport { Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps,CardTitle, cardVariants } from './card'\nexport { Code, type CodeProps } from './code'\nexport { ColorSwatch, type ColorSwatchProps } from './color-swatch'\nexport { Progress, progressIndicatorVariants, type ProgressProps,progressTrackVariants } from './progress'\nexport { MultiProgressRing, type MultiProgressRingProps,ProgressRing, type ProgressRingProps } from './progress-ring'\nexport {\n Skeleton,\n SkeletonAvatar,\n type SkeletonAvatarProps,\n SkeletonButton,\n type SkeletonButtonProps,\n SkeletonChart,\n type SkeletonChartProps,\n SkeletonGroup,\n type SkeletonGroupProps,\n SkeletonImage,\n type SkeletonImageProps,\n SkeletonInput,\n type SkeletonInputProps,\n type SkeletonProps,\n SkeletonText,\n type SkeletonTextProps,\n skeletonVariants,\n} from './skeleton'\nexport { StatCard, type StatCardProps } from './stat-card'\nexport { StatusDot, type StatusDotProps, type StatusDotStatus } from './status-dot'\nexport { Table, TableBody, TableCaption, TableCell, type TableCellProps,TableFooter, TableHead, TableHeader, type TableProps, TableRow, type TableRowProps } from './table'\n\n// Navigation\nexport { Accordion, AccordionContent, type AccordionContentProps,AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps } from './accordion'\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n type BreadcrumbLinkProps,\n BreadcrumbList,\n BreadcrumbPage,\n type BreadcrumbProps,\n BreadcrumbSeparator,\n} from './breadcrumb'\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n type ContextMenuContentProps,\n ContextMenuGroup,\n ContextMenuItem,\n type ContextMenuItemProps,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n} from './context-menu'\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n type DropdownMenuContentProps,\n DropdownMenuGroup,\n DropdownMenuItem,\n type DropdownMenuItemProps,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from './dropdown-menu'\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n type MenubarContentProps,\n MenubarGroup,\n MenubarItem,\n type MenubarItemProps,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n} from './menubar'\nexport {\n NavigationMenu,\n NavigationMenuContent,\n type NavigationMenuContentProps,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n type NavigationMenuProps,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n} from './navigation-menu'\nexport {\n generatePagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n type PaginationLinkProps,\n PaginationNav,\n type PaginationNavProps,\n PaginationNext,\n PaginationPrevious,\n PaginationRoot,\n} from './pagination'\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n type SidebarProps,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from './sidebar'\nexport { Tabs, type TabsColor, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation,type TabsProps, type TabsSize, TabsTrigger, type TabsTriggerProps } from './tabs'\n\n// Workflow\nexport { Step, Stepper, type StepperProps, type StepProps } from './stepper'\n\n\n// Typography\nexport { Text, type TextProps, type TextVariant,textVariants } from './text'\n\n// Layout\nexport { Container, type ContainerProps } from './container'\nexport { type SpacingToken,Stack, type StackProps } from './stack'\n\n// Tree View\nexport { TreeItem, type TreeItemProps, type TreeNode,TreeView, type TreeViewProps, useTree } from './tree-view'\n\n// Segmented Control\nexport {\n SegmentedControl,\n type SegmentedControlOption,\n type SegmentedControlProps,\n type SegmentedControlSize,\n type SegmentedControlVariant,\n} from './segmented-control'\n\n// Brand Texture\nexport { DevalokGrain, type DevalokGrainProps, type GrainIntensity } from './devalok-grain'\n\n// Chat primitives\nexport {\n DateSeparator,\n type DateSeparatorProps,\n Message,\n type MessageActionProps,\n type MessageActionsProps,\n type MessageAuthorProps,\n type MessageAvatarProps,\n type MessageBodyProps,\n type MessageContentProps,\n type MessageContextValue,\n type MessageEditableBodyProps,\n MessageInput,\n type MessageInputProps,\n MessageList,\n type MessageListProps,\n type MessageProps,\n type MessageReactionsProps,\n SystemMessage,\n type SystemMessageProps,\n TypingIndicator,\n type TypingIndicatorProps,\n UnreadSeparator,\n type UnreadSeparatorProps,\n useMessageContext,\n} from './chat'\n\n// Other\nexport { Link, type LinkProps } from './link'\n\n// OAuth / Social sign-in\nexport {\n getOAuthLabel,\n getOAuthName,\n OAuth,\n type OAuthAppearance,\n OAuthButton,\n type OAuthButtonProps,\n OAuthConnectionRow,\n type OAuthConnectionRowProps,\n OAuthDivider,\n type OAuthDividerProps,\n OAuthGlyph,\n type OAuthGlyphProps,\n OAuthGroup,\n type OAuthGroupProps,\n type OAuthIntent,\n type OAuthProvider,\n type OAuthVariant,\n} from './oauth-button'\n\n// Utilities\nexport { formatRelativeTime } from './lib/date-utils'\nexport type { SpringPreset, TweenPreset } from './lib/motion'\nexport { springs, stagger, tweens, withReducedMotion } from './lib/motion'\nexport { cn } from './lib/utils'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAI,IAAU;AAEd,SAAgB,KAA0B;AACpC,WACA,SAAO,SAAW,MAGtB;MAAI;AAEyB;UACrB;AAKR,EAHA,IAAU,IAGV,4BAA4B;AAE1B,GADc,iBAAiB,SAAS,gBAAgB,CAAC,iBAAiB,mBAAmB,CAAC,MAAM,IAElG,QAAQ,KACN,sMAGD;IAEH;;;;;ACdJ,IAAmB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/**
|
|
3
|
+
* Single source of truth for "icon" prop shapes across the design system.
|
|
4
|
+
*
|
|
5
|
+
* Before 0.41.0 every component invented its own icon prop type — 6 distinct
|
|
6
|
+
* shapes across 25+ components (ReactElement, ReactNode, ComponentType,
|
|
7
|
+
* dual-union, IconProps['icon'], ForwardRefExoticComponent). Consumers had
|
|
8
|
+
* to memorize per-component conventions. Stories drifted. Five separate
|
|
9
|
+
* `iconSizeMap` declarations cropped up in component source.
|
|
10
|
+
*
|
|
11
|
+
* `IconInput` collapses all 6 shapes into one. Every consumer-accepted icon
|
|
12
|
+
* prop should be typed as `IconInput`. The render path runs through
|
|
13
|
+
* `normalizeIcon()` (see `./normalize-icon.tsx`), which:
|
|
14
|
+
*
|
|
15
|
+
* - Wraps raw component refs (`IconPlus`) in `<Icon icon={IconPlus} />` so
|
|
16
|
+
* they pick up `IconProvider` size + stroke context.
|
|
17
|
+
* - Passes through already-instantiated elements (`<IconPlus />`,
|
|
18
|
+
* `<Icon icon={X} />`, or any custom node like `<span>$</span>`).
|
|
19
|
+
* - Returns `null` for `null` / `undefined`.
|
|
20
|
+
*
|
|
21
|
+
* Consumers can pass any of:
|
|
22
|
+
* - `<Icon icon={IconPlus} />` — canonical, size flows from context
|
|
23
|
+
* - `<IconPlus />` — raw Tabler element, passes through unchanged
|
|
24
|
+
* - `IconPlus` — Tabler component ref, normalizer wraps it
|
|
25
|
+
* - `<span>$</span>` — custom node, passes through
|
|
26
|
+
* - `null` / `undefined` — no icon
|
|
27
|
+
*
|
|
28
|
+
* All four work identically at the call site. The component renders them
|
|
29
|
+
* inside an `IconProvider` so size flows automatically.
|
|
30
|
+
*/
|
|
31
|
+
import type * as React from 'react';
|
|
32
|
+
/**
|
|
33
|
+
* Any value accepted as an "icon" prop across the design system.
|
|
34
|
+
*
|
|
35
|
+
* @see normalizeIcon for the runtime contract.
|
|
36
|
+
* @see IconProvider for size context propagation.
|
|
37
|
+
*/
|
|
38
|
+
export type IconInput = React.ReactElement | React.ComponentType<{
|
|
39
|
+
className?: string;
|
|
40
|
+
size?: number | string;
|
|
41
|
+
}> | null | undefined;
|
|
42
|
+
//# sourceMappingURL=icon-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-input.d.ts","sourceRoot":"","sources":["../../../src/ui/lib/icon-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GACjB,KAAK,CAAC,YAAY,GAClB,KAAK,CAAC,aAAa,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC,GACnE,IAAI,GACJ,SAAS,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IconSize } from '../icon-context';
|
|
2
|
+
import { IconInput } from './icon-input';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Normalize any IconInput shape into a renderable React node.
|
|
6
|
+
*
|
|
7
|
+
* - Component refs (`IconPlus`) → wrap in `<Icon icon={IconPlus} />` (context-aware).
|
|
8
|
+
* - Already-instantiated elements (`<IconPlus />`, `<Icon …/>`, `<span>$</span>`) →
|
|
9
|
+
* passed through. If inside an `<IconProvider>`, any nested `<Icon>` element
|
|
10
|
+
* picks up the size + stroke from context automatically.
|
|
11
|
+
* - `null` / `undefined` → returns `null`.
|
|
12
|
+
*
|
|
13
|
+
* Components calling this should also wrap their icon slot in
|
|
14
|
+
* `<IconProvider size={defaultSize}>` so the size context propagates to
|
|
15
|
+
* nested `<Icon>` elements. Example:
|
|
16
|
+
*
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { IconProvider } from './icon-context'
|
|
19
|
+
* import { normalizeIcon } from './lib/normalize-icon'
|
|
20
|
+
*
|
|
21
|
+
* function MyComponent({ icon, size = 'md' }: { icon?: IconInput; size?: 'sm' | 'md' | 'lg' }) {
|
|
22
|
+
* return (
|
|
23
|
+
* <div>
|
|
24
|
+
* <IconProvider size={iconSizeMap[size]}>
|
|
25
|
+
* {normalizeIcon(icon)}
|
|
26
|
+
* </IconProvider>
|
|
27
|
+
* </div>
|
|
28
|
+
* )
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @param input Anything matching `IconInput`.
|
|
33
|
+
* @param fallbackSize Optional explicit size to apply if the input is a
|
|
34
|
+
* raw component ref AND no IconProvider context is set. In practice you
|
|
35
|
+
* should use IconProvider for size control; this fallback is for unusual
|
|
36
|
+
* cases where the consumer can't be wrapped (e.g. portal-rendered icons).
|
|
37
|
+
*/
|
|
38
|
+
export declare function normalizeIcon(input: IconInput, fallbackSize?: IconSize): React.ReactNode;
|
|
39
|
+
//# sourceMappingURL=normalize-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-icon.d.ts","sourceRoot":"","sources":["../../../src/ui/lib/normalize-icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,SAAS,EAChB,YAAY,CAAC,EAAE,QAAQ,GACtB,KAAK,CAAC,SAAS,CA8BjB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { getOAuthLabel, getOAuthName, OAuth, type OAuthAppearance, OAuthButton, type OAuthButtonProps, OAuthConnectionRow, type OAuthConnectionRowProps, OAuthDivider, type OAuthDividerProps, OAuthGlyph, type OAuthGlyphProps, OAuthGroup, type OAuthGroupProps, type OAuthIntent, type OAuthProvider, type OAuthVariant, } from './oauth-button';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/oauth-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,KAAK,EACL,KAAK,eAAe,EACpB,WAAW,EACX,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,YAAY,EACZ,KAAK,iBAAiB,EACtB,UAAU,EACV,KAAK,eAAe,EACpB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../../_chunks/oauth-button.js";
|
|
3
|
+
export { s as OAuth, r as OAuthButton, a as OAuthConnectionRow, n as OAuthDivider, e as OAuthGlyph, i as OAuthGroup, o as getOAuthLabel, t as getOAuthName };
|