@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../src/ui/input-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../src/ui/input-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAmB,MAAM,WAAW,CAAA;AAMrD,QAAA,MAAM,QAAQ;;;;;kBAQE,GAAG;;;;;;;;;;;;;kBAAH,GAAG;;;;;;;;2FAKjB,CAAA;AAGF,QAAA,MAAM,aAAa,mKAKjB,CAAA;AAGF,QAAA,MAAM,YAAY;WAEiC,MAAM;wCAuBvD,CAAA;AAGF,QAAA,MAAM,iBAAiB,mKAOrB,CAAA;AAGF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,QAAQ,CAAC,CAAA;AAE3E,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAA"}
|
package/dist/ui/input-otp.js
CHANGED
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as o from "react";
|
|
4
4
|
import { OTPInput as m, OTPInputContext as u } from "input-otp";
|
|
5
5
|
import { IconMinus as f } from "@tabler/icons-react";
|
|
6
|
-
import { cn as
|
|
7
|
-
|
|
6
|
+
import { cn as a } from "./lib/utils.js";
|
|
7
|
+
import { Icon as x } from "./icon.js";
|
|
8
|
+
const b = o.forwardRef(({ className: e, containerClassName: r, ...s }, n) => /* @__PURE__ */ t(
|
|
8
9
|
m,
|
|
9
10
|
{
|
|
10
11
|
ref: n,
|
|
11
|
-
containerClassName:
|
|
12
|
+
containerClassName: a(
|
|
12
13
|
"flex items-center gap-ds-03 has-[:disabled]:opacity-action-disabled",
|
|
13
14
|
r
|
|
14
15
|
),
|
|
15
|
-
className:
|
|
16
|
+
className: a("disabled:cursor-not-allowed", e),
|
|
16
17
|
...s
|
|
17
18
|
}
|
|
18
19
|
));
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const i =
|
|
20
|
+
b.displayName = "InputOTP";
|
|
21
|
+
const I = o.forwardRef(({ className: e, ...r }, s) => /* @__PURE__ */ t("div", { ref: s, className: a("flex items-center", e), ...r }));
|
|
22
|
+
I.displayName = "InputOTPGroup";
|
|
23
|
+
const O = o.forwardRef(({ index: e, className: r, ...s }, n) => {
|
|
24
|
+
const i = o.useContext(u), { char: d, hasFakeCaret: c, isActive: l } = i.slots[e];
|
|
24
25
|
return /* @__PURE__ */ p(
|
|
25
26
|
"div",
|
|
26
27
|
{
|
|
27
28
|
ref: n,
|
|
28
|
-
className:
|
|
29
|
+
className: a(
|
|
29
30
|
"relative flex h-ds-sm-plus w-ds-sm-plus items-center justify-center border-y border-r border-surface-border-strong text-ds-md shadow-raised transition-[box-shadow] first:rounded-l-ds-md first:border-l last:rounded-r-ds-md",
|
|
30
|
-
|
|
31
|
+
l && "z-raised ring-2 ring-accent-9",
|
|
31
32
|
r
|
|
32
33
|
),
|
|
33
34
|
...s,
|
|
34
35
|
children: [
|
|
35
36
|
d,
|
|
36
|
-
|
|
37
|
+
c && /* @__PURE__ */ t("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ t("div", { className: "animate-caret-blink h-[16px] w-px bg-surface-fg duration-slow-02" }) })
|
|
37
38
|
]
|
|
38
39
|
}
|
|
39
40
|
);
|
|
40
41
|
});
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
42
|
+
O.displayName = "InputOTPSlot";
|
|
43
|
+
const P = o.forwardRef(({ ...e }, r) => /* @__PURE__ */ t("div", { ref: r, role: "separator", ...e, children: /* @__PURE__ */ t(x, { icon: f, size: "sm" }) }));
|
|
44
|
+
P.displayName = "InputOTPSeparator";
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
b as InputOTP,
|
|
47
|
+
I as InputOTPGroup,
|
|
48
|
+
P as InputOTPSeparator,
|
|
49
|
+
O as InputOTPSlot
|
|
49
50
|
};
|
package/dist/ui/input.d.ts
CHANGED
|
@@ -2,21 +2,25 @@
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
export type InputState = 'default' | 'error' | 'warning' | 'success';
|
|
5
|
-
declare const
|
|
5
|
+
declare const inputWrapperVariants: (props?: ({
|
|
6
6
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
/**
|
|
9
|
-
* Props for Input — a single-line text field with
|
|
10
|
-
* and
|
|
9
|
+
* Props for Input — a single-line text field with container-first architecture,
|
|
10
|
+
* section-based icons with automatic padding, per-size scaling, and validation state coloring.
|
|
11
11
|
*
|
|
12
|
-
* **Sizes:** `sm` (32px) | `md` (40px, default) | `lg` (48px)
|
|
12
|
+
* **Sizes:** `xs` (28px) | `sm` (32px) | `md` (40px, default) | `lg` (48px)
|
|
13
13
|
* HTML's native `size` attribute is excluded — use CSS width instead.
|
|
14
14
|
*
|
|
15
15
|
* **Validation states:** `state="error"` colors the border red and sets `aria-invalid`.
|
|
16
16
|
* Use with `<FormField>` to show helper text below the input.
|
|
17
17
|
*
|
|
18
|
-
* **
|
|
19
|
-
*
|
|
18
|
+
* **Section-based icons:** `startSection` and `endSection` accept any React node.
|
|
19
|
+
* Icons are auto-sized via `IconProvider`. Sections are `pointer-events-none` by default;
|
|
20
|
+
* use `startSectionClickable`/`endSectionClickable` for interactive sections.
|
|
21
|
+
*
|
|
22
|
+
* **className** targets the `<input>` element (backward compatible).
|
|
23
|
+
* **wrapperClassName** targets the wrapper div for border/bg/ring overrides.
|
|
20
24
|
*
|
|
21
25
|
* @example
|
|
22
26
|
* // Basic email field with placeholder:
|
|
@@ -24,7 +28,7 @@ declare const inputVariants: (props?: ({
|
|
|
24
28
|
*
|
|
25
29
|
* @example
|
|
26
30
|
* // Search input with a leading icon:
|
|
27
|
-
* <Input size="md"
|
|
31
|
+
* <Input size="md" startSection={<IconSearch />} placeholder="Search projects..." />
|
|
28
32
|
*
|
|
29
33
|
* @example
|
|
30
34
|
* // Validated error state (pair with FormField for label + helper text):
|
|
@@ -32,14 +36,31 @@ declare const inputVariants: (props?: ({
|
|
|
32
36
|
*
|
|
33
37
|
* @example
|
|
34
38
|
* // Read-only field (shows a muted background, non-editable):
|
|
35
|
-
* <Input readOnly value="https://devalok.com/api/key/abc123"
|
|
36
|
-
* // These are just a few ways — feel free to combine props creatively!
|
|
39
|
+
* <Input readOnly value="https://devalok.com/api/key/abc123" endSection={<IconCopy />} />
|
|
37
40
|
*/
|
|
38
|
-
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof
|
|
41
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputWrapperVariants> {
|
|
39
42
|
state?: InputState;
|
|
43
|
+
startSection?: React.ReactNode;
|
|
44
|
+
endSection?: React.ReactNode;
|
|
45
|
+
startSectionClickable?: boolean;
|
|
46
|
+
endSectionClickable?: boolean;
|
|
47
|
+
/** Section display type. `'icon'` = fixed-width centered cell (default for ReactElements).
|
|
48
|
+
* `'label'` = tinted background with border separator (default for strings). */
|
|
49
|
+
startSectionType?: 'icon' | 'label';
|
|
50
|
+
/** Section display type. `'icon'` = fixed-width centered cell (default for ReactElements).
|
|
51
|
+
* `'label'` = tinted background with border separator (default for strings). */
|
|
52
|
+
endSectionType?: 'icon' | 'label';
|
|
53
|
+
/** Classes for the wrapper div (border, bg, ring). */
|
|
54
|
+
wrapperClassName?: string;
|
|
55
|
+
/** @deprecated Use startSection */
|
|
40
56
|
startIcon?: React.ReactNode;
|
|
57
|
+
/** @deprecated Use endSection */
|
|
41
58
|
endIcon?: React.ReactNode;
|
|
42
59
|
}
|
|
43
60
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
44
|
-
|
|
61
|
+
/** @deprecated Use inputWrapperVariants — semantics changed (now targets wrapper, not input) */
|
|
62
|
+
declare const inputVariants: (props?: ({
|
|
63
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
64
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
65
|
+
export { Input, inputVariants, inputWrapperVariants };
|
|
45
66
|
//# sourceMappingURL=input.d.ts.map
|
package/dist/ui/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/ui/input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/ui/input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAEpE,QAAA,MAAM,oBAAoB;;8EAsBzB,CAAA;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,EAC/D,YAAY,CAAC,OAAO,oBAAoB,CAAC;IAC3C,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;qFACiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACnC;qFACiF;IACjF,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACjC,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,mCAAmC;IACnC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,iCAAiC;IACjC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,QAAA,MAAM,KAAK,qFA4JV,CAAA;AAGD,gGAAgG;AAChG,QAAA,MAAM,aAAa;;8EAAuB,CAAA;AAE1C,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,CAAA"}
|
package/dist/ui/input.js
CHANGED
|
@@ -1,65 +1,170 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import { cn as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const y = p(
|
|
2
|
+
import { jsxs as F, jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import * as W from "react";
|
|
4
|
+
import { a as B } from "../_chunks/vendor-utils.js";
|
|
5
|
+
import { cn as r } from "./lib/utils.js";
|
|
6
|
+
import { useFormField as D } from "./form.js";
|
|
7
|
+
import { IconProvider as h } from "./icon-context.js";
|
|
8
|
+
const w = B(
|
|
10
9
|
[
|
|
11
|
-
"flex w-full font-sans",
|
|
10
|
+
"relative flex items-center w-full font-sans",
|
|
12
11
|
"bg-surface-raised-hover text-surface-fg",
|
|
13
12
|
"border border-surface-border rounded-ds-md",
|
|
14
|
-
"placeholder:text-surface-fg-subtle",
|
|
15
13
|
"hover:bg-surface-raised-active",
|
|
16
|
-
"transition-
|
|
17
|
-
"focus-
|
|
18
|
-
"disabled:cursor-not-allowed disabled:opacity-action-disabled",
|
|
19
|
-
"read-only:bg-surface-raised read-only:cursor-default"
|
|
14
|
+
"transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard",
|
|
15
|
+
"focus-within:outline-none focus-within:ring-2 focus-within:ring-accent-9 focus-within:ring-offset-2 focus-within:border-surface-border",
|
|
16
|
+
"has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-action-disabled",
|
|
17
|
+
"has-[:read-only]:bg-surface-raised has-[:read-only]:cursor-default"
|
|
20
18
|
],
|
|
21
19
|
{
|
|
22
20
|
variants: {
|
|
23
21
|
size: {
|
|
24
|
-
xs: "h-ds-xs-plus text-ds-sm
|
|
25
|
-
sm: "h-ds-sm text-ds-sm
|
|
26
|
-
md: "h-ds-md text-ds-md
|
|
27
|
-
lg: "h-ds-lg
|
|
22
|
+
xs: "h-ds-xs-plus text-ds-sm",
|
|
23
|
+
sm: "h-ds-sm text-ds-sm",
|
|
24
|
+
md: "h-ds-md text-ds-md",
|
|
25
|
+
lg: "h-ds-lg rounded-ds-lg text-ds-md"
|
|
28
26
|
}
|
|
29
27
|
},
|
|
30
28
|
defaultVariants: { size: "md" }
|
|
31
29
|
}
|
|
32
|
-
),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
), b = {
|
|
31
|
+
xs: "w-[26px]",
|
|
32
|
+
sm: "w-[30px]",
|
|
33
|
+
md: "w-[38px]",
|
|
34
|
+
lg: "w-[46px]"
|
|
35
|
+
}, g = {
|
|
36
|
+
xs: "xs",
|
|
37
|
+
sm: "sm",
|
|
38
|
+
md: "md",
|
|
39
|
+
lg: "lg"
|
|
40
|
+
}, A = W.forwardRef(
|
|
41
|
+
({
|
|
42
|
+
className: v,
|
|
43
|
+
type: y,
|
|
44
|
+
state: z,
|
|
45
|
+
size: N = "md",
|
|
46
|
+
startSection: T,
|
|
47
|
+
endSection: j,
|
|
48
|
+
startSectionClickable: f,
|
|
49
|
+
endSectionClickable: m,
|
|
50
|
+
startSectionType: q,
|
|
51
|
+
endSectionType: I,
|
|
52
|
+
startIcon: M,
|
|
53
|
+
endIcon: k,
|
|
54
|
+
wrapperClassName: P,
|
|
55
|
+
...o
|
|
56
|
+
}, R) => {
|
|
57
|
+
const e = N ?? "md", t = D(), n = z ?? (t.state === "helper" ? void 0 : t.state), S = o["aria-describedby"] ?? t.helperTextId, V = o["aria-required"] ?? t.required, d = T ?? M, i = j ?? k, a = !!d, c = !!i, l = q ?? (typeof d == "string" ? "label" : "icon"), u = I ?? (typeof i == "string" ? "label" : "icon"), p = {
|
|
58
|
+
xs: "px-ds-02",
|
|
59
|
+
sm: "px-ds-02",
|
|
60
|
+
md: "px-ds-03",
|
|
61
|
+
lg: "px-ds-03"
|
|
62
|
+
}, x = {
|
|
63
|
+
xs: "text-ds-sm",
|
|
64
|
+
sm: "text-ds-sm",
|
|
65
|
+
md: "text-ds-sm",
|
|
66
|
+
lg: "text-ds-md"
|
|
67
|
+
}, E = {
|
|
68
|
+
xs: "px-ds-02",
|
|
69
|
+
sm: "px-ds-03",
|
|
70
|
+
md: "px-ds-03",
|
|
71
|
+
lg: "px-ds-04"
|
|
72
|
+
};
|
|
73
|
+
return /* @__PURE__ */ F(
|
|
74
|
+
"div",
|
|
36
75
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
i === "warning" && "border-warning-7 focus-visible:ring-warning-7",
|
|
44
|
-
i === "success" && "border-success-7 focus-visible:ring-success-7",
|
|
45
|
-
n
|
|
76
|
+
className: r(
|
|
77
|
+
w({ size: e }),
|
|
78
|
+
n === "error" && "border-error-7 focus-within:ring-error-7",
|
|
79
|
+
n === "warning" && "border-warning-7 focus-within:ring-warning-7",
|
|
80
|
+
n === "success" && "border-success-7 focus-within:ring-success-7",
|
|
81
|
+
P
|
|
46
82
|
),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
83
|
+
children: [
|
|
84
|
+
a && l === "label" && /* @__PURE__ */ s(
|
|
85
|
+
"span",
|
|
86
|
+
{
|
|
87
|
+
className: r(
|
|
88
|
+
"flex items-center shrink-0 select-none self-stretch",
|
|
89
|
+
"border-r border-surface-border",
|
|
90
|
+
"bg-surface-raised text-surface-fg-muted",
|
|
91
|
+
"rounded-l-[inherit]",
|
|
92
|
+
p[e],
|
|
93
|
+
x[e],
|
|
94
|
+
!f && "pointer-events-none"
|
|
95
|
+
),
|
|
96
|
+
children: d
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
a && l === "icon" && /* @__PURE__ */ s(h, { size: g[e], children: /* @__PURE__ */ s(
|
|
100
|
+
"span",
|
|
101
|
+
{
|
|
102
|
+
className: r(
|
|
103
|
+
"flex items-center justify-center shrink-0 self-stretch text-surface-fg-muted",
|
|
104
|
+
b[e],
|
|
105
|
+
!f && "pointer-events-none"
|
|
106
|
+
),
|
|
107
|
+
children: d
|
|
108
|
+
}
|
|
109
|
+
) }),
|
|
110
|
+
/* @__PURE__ */ s(
|
|
111
|
+
"input",
|
|
112
|
+
{
|
|
113
|
+
type: y,
|
|
114
|
+
className: r(
|
|
115
|
+
"flex-1 min-w-0 h-full bg-transparent outline-none font-sans",
|
|
116
|
+
"placeholder:text-surface-fg-subtle",
|
|
117
|
+
"disabled:cursor-not-allowed",
|
|
118
|
+
"read-only:cursor-default",
|
|
119
|
+
E[e],
|
|
120
|
+
// Remove left padding when start icon section is present (icon provides visual space)
|
|
121
|
+
a && l === "icon" && "pl-0",
|
|
122
|
+
// Remove right padding when end icon section is present
|
|
123
|
+
c && u === "icon" && "pr-0",
|
|
124
|
+
v
|
|
125
|
+
),
|
|
126
|
+
"aria-invalid": n === "error" || void 0,
|
|
127
|
+
"aria-describedby": S,
|
|
128
|
+
"aria-required": V || void 0,
|
|
129
|
+
ref: R,
|
|
130
|
+
...o
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
c && u === "label" && /* @__PURE__ */ s(
|
|
134
|
+
"span",
|
|
135
|
+
{
|
|
136
|
+
className: r(
|
|
137
|
+
"flex items-center shrink-0 select-none self-stretch",
|
|
138
|
+
"border-l border-surface-border",
|
|
139
|
+
"bg-surface-raised text-surface-fg-muted",
|
|
140
|
+
"rounded-r-[inherit]",
|
|
141
|
+
p[e],
|
|
142
|
+
x[e],
|
|
143
|
+
!m && "pointer-events-none"
|
|
144
|
+
),
|
|
145
|
+
children: i
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
c && u === "icon" && /* @__PURE__ */ s(h, { size: g[e], children: /* @__PURE__ */ s(
|
|
149
|
+
"span",
|
|
150
|
+
{
|
|
151
|
+
className: r(
|
|
152
|
+
"flex items-center justify-center shrink-0 self-stretch text-surface-fg-muted",
|
|
153
|
+
b[e],
|
|
154
|
+
!m && "pointer-events-none"
|
|
155
|
+
),
|
|
156
|
+
children: i
|
|
157
|
+
}
|
|
158
|
+
) })
|
|
159
|
+
]
|
|
52
160
|
}
|
|
53
161
|
);
|
|
54
|
-
return !e && !s ? c : /* @__PURE__ */ v("div", { className: "relative flex items-center w-full", children: [
|
|
55
|
-
e && /* @__PURE__ */ d("span", { className: o("absolute left-ds-03 flex items-center text-surface-fg-muted pointer-events-none", t === "lg" ? "[&>svg]:h-ico-md [&>svg]:w-ico-md" : "[&>svg]:h-ico-sm [&>svg]:w-ico-sm"), children: e }),
|
|
56
|
-
c,
|
|
57
|
-
s && /* @__PURE__ */ d("span", { className: o("absolute right-ds-03 flex items-center text-surface-fg-muted pointer-events-none", t === "lg" ? "[&>svg]:h-ico-md [&>svg]:w-ico-md" : "[&>svg]:h-ico-sm [&>svg]:w-ico-sm"), children: s })
|
|
58
|
-
] });
|
|
59
162
|
}
|
|
60
163
|
);
|
|
61
|
-
|
|
164
|
+
A.displayName = "Input";
|
|
165
|
+
const O = w;
|
|
62
166
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
167
|
+
A as Input,
|
|
168
|
+
O as inputVariants,
|
|
169
|
+
w as inputWrapperVariants
|
|
65
170
|
};
|
package/dist/ui/label.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as i, jsx as d } from "react/jsx-runtime";
|
|
3
3
|
import * as n from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { ai as a } from "../_chunks/primitives.js";
|
|
5
5
|
import { cn as m } from "./lib/utils.js";
|
|
6
6
|
const c = n.forwardRef(({ className: e, required: t, children: r, ...s }, o) => /* @__PURE__ */ i(
|
|
7
7
|
a,
|
package/dist/ui/lib/motion.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export declare const tweens: {
|
|
|
18
18
|
readonly colorShift: Transition;
|
|
19
19
|
/** Greeting fade, hint crossfade — unhurried, confident */
|
|
20
20
|
readonly elegant: Transition;
|
|
21
|
+
/** Button/element layout transitions — smooth width/height changes, no overshoot */
|
|
22
|
+
readonly layout: Transition;
|
|
21
23
|
};
|
|
22
24
|
export declare function stagger(delay?: number): {
|
|
23
25
|
visible: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../../src/ui/lib/motion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/C,eAAO,MAAM,OAAO;IAClB,sDAAsD;qBACgB,UAAU;IAChF,0CAA0C;qBAC4B,UAAU;IAChF,4CAA4C;qBAC0B,UAAU;IAChF,iDAAiD;qBACqB,UAAU;IAChF,qEAAqE;yBACK,UAAU;CAC5E,CAAA;AAIV,eAAO,MAAM,MAAM;IACjB,yBAAyB;mBACmC,UAAU;IACtE,0CAA0C;yBACwB,UAAU;IAC5E,2DAA2D;sBACc,UAAU;
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../../src/ui/lib/motion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/C,eAAO,MAAM,OAAO;IAClB,sDAAsD;qBACgB,UAAU;IAChF,0CAA0C;qBAC4B,UAAU;IAChF,4CAA4C;qBAC0B,UAAU;IAChF,iDAAiD;qBACqB,UAAU;IAChF,qEAAqE;yBACK,UAAU;CAC5E,CAAA;AAIV,eAAO,MAAM,MAAM;IACjB,yBAAyB;mBACmC,UAAU;IACtE,0CAA0C;yBACwB,UAAU;IAC5E,2DAA2D;sBACc,UAAU;IACnF,oFAAoF;qBACZ,UAAU;CAC1E,CAAA;AAIV,wBAAgB,OAAO,CAAC,KAAK,SAAO;;;;;;;;;;;EAKnC;AAID,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAEpE;AAID,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,OAAO,CAAA;AAC/C,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,MAAM,CAAA;AAQ7C;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEhG"}
|
package/dist/ui/lib/motion.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s = {
|
|
2
2
|
/** Micro-interactions: buttons, hover, form inputs */
|
|
3
3
|
snappy: { type: "spring", stiffness: 500, damping: 30, mass: 0.5 },
|
|
4
4
|
/** Dialogs, sheets, panels, navigation */
|
|
@@ -15,23 +15,25 @@ const e = {
|
|
|
15
15
|
/** Hover color, bg, border transitions */
|
|
16
16
|
colorShift: { type: "tween", duration: 0.07, ease: "easeOut" },
|
|
17
17
|
/** Greeting fade, hint crossfade — unhurried, confident */
|
|
18
|
-
elegant: { type: "tween", duration: 0.4, ease: [0.25, 0.1, 0.25, 1] }
|
|
18
|
+
elegant: { type: "tween", duration: 0.4, ease: [0.25, 0.1, 0.25, 1] },
|
|
19
|
+
/** Button/element layout transitions — smooth width/height changes, no overshoot */
|
|
20
|
+
layout: { type: "tween", duration: 0.2, ease: [0.25, 0.1, 0.25, 1] }
|
|
19
21
|
};
|
|
20
|
-
function t(
|
|
22
|
+
function t(e = 0.04) {
|
|
21
23
|
return {
|
|
22
|
-
visible: { transition: { staggerChildren:
|
|
23
|
-
hidden: { transition: { staggerChildren:
|
|
24
|
+
visible: { transition: { staggerChildren: e } },
|
|
25
|
+
hidden: { transition: { staggerChildren: e } }
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
|
-
function i(
|
|
27
|
-
return { ...
|
|
28
|
+
function i(e) {
|
|
29
|
+
return { ...e, duration: 0 };
|
|
28
30
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
+
function a(e) {
|
|
32
|
+
return e;
|
|
31
33
|
}
|
|
32
34
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
a as motionProps,
|
|
36
|
+
s as springs,
|
|
35
37
|
t as stagger,
|
|
36
38
|
n as tweens,
|
|
37
39
|
i as withReducedMotion
|
package/dist/ui/lib/utils.js
CHANGED
package/dist/ui/menubar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/ui/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/ui/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAY7D,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAUvF,CAAA;AAOD,QAAA,MAAM,YAAY,EAAE,OAAO,gBAAgB,CAAC,KAA8B,CAAA;AAE1E,QAAA,MAAM,aAAa,EAAE,OAAO,gBAAgB,CAAC,MAAgC,CAAA;AAE7E,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAuBrF,CAAA;AAGD,QAAA,MAAM,iBAAiB,EAAE,OAAO,gBAAgB,CAAC,UACpB,CAAA;AAE7B,QAAA,MAAM,OAAO,yJAYX,CAAA;AAGF,QAAA,MAAM,cAAc,sKAYlB,CAAA;AAGF,QAAA,MAAM,iBAAiB;YAGX,OAAO;wCAejB,CAAA;AAGF,QAAA,MAAM,iBAAiB,mKA+BrB,CAAA;AAaF,QAAA,MAAM,cAAc,gKAgCnB,CAAA;AAGD,QAAA,MAAM,WAAW;YAGL,OAAO;wCAYjB,CAAA;AAGF,QAAA,MAAM,mBAAmB,qKAoBvB,CAAA;AAGF,QAAA,MAAM,gBAAgB,kKAmBpB,CAAA;AAGF,QAAA,MAAM,YAAY;YAGN,OAAO;wCAYjB,CAAA;AAGF,QAAA,MAAM,gBAAgB,kKASpB,CAAA;AAGF,QAAA,MAAM,eAAe;8BAGlB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAUvC,CAAA;AAGD,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAA;AACjG,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAA;AAE3F,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,CAAA"}
|