@devalok/shilp-sutra 0.8.4 → 0.9.1
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/avatar.js +50 -0
- package/dist/_chunks/button.js +95 -0
- package/dist/_chunks/card.js +40 -0
- package/dist/_chunks/checkbox.js +14 -0
- package/dist/_chunks/form.js +27 -0
- package/dist/_chunks/primitives.js +6965 -0
- package/dist/_chunks/sidebar.js +592 -0
- package/dist/_chunks/spinner.js +34 -0
- package/dist/_chunks/tiptap.js +15254 -0
- package/dist/_chunks/tooltip.js +13 -0
- package/dist/_chunks/tree-view.js +304 -0
- package/dist/_chunks/use-calendar.js +990 -0
- package/dist/_chunks/utils.js +15 -0
- package/dist/_chunks/vendor-client.js +1835 -0
- package/dist/_chunks/vendor-utils.js +3995 -0
- package/dist/composed/avatar-group.js +20 -20
- package/dist/composed/command-palette.js +1 -1
- package/dist/composed/confirm-dialog.js +5 -5
- package/dist/composed/content-card.d.ts +1 -1
- package/dist/composed/content-card.js +2 -2
- package/dist/composed/date-picker/index.js +13 -0
- package/dist/composed/empty-state.js +10 -10
- package/dist/composed/error-boundary.js +2 -2
- package/dist/composed/global-loading.js +4 -4
- package/dist/composed/index.js +45 -53
- package/dist/composed/loading-skeleton.js +2 -2
- package/dist/composed/member-picker.js +5 -5
- package/dist/composed/page-header.js +4 -4
- package/dist/composed/page-skeletons.js +1 -1
- package/dist/composed/priority-indicator.js +6 -6
- package/dist/composed/rich-text-editor.js +422 -209
- package/dist/composed/schedule-view.js +1 -1
- package/dist/composed/simple-tooltip.js +6 -6
- package/dist/composed/status-badge.d.ts +1 -1
- package/dist/composed/status-badge.js +2 -2
- package/dist/shell/bottom-navbar.js +1 -1
- package/dist/shell/notification-center.js +2 -2
- package/dist/shell/notification-preferences.js +32 -33
- package/dist/shell/sidebar.js +24 -24
- package/dist/shell/top-bar.js +22 -22
- package/dist/ui/accordion.js +17 -17
- package/dist/ui/alert-dialog.js +29 -29
- package/dist/ui/alert.d.ts +2 -2
- package/dist/ui/alert.js +65 -44
- package/dist/ui/aspect-ratio.js +1 -1
- package/dist/ui/autocomplete.js +11 -11
- package/dist/ui/avatar.d.ts +1 -1
- package/dist/ui/avatar.js +67 -25
- package/dist/ui/badge.d.ts +2 -2
- package/dist/ui/badge.js +115 -91
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.js +2 -2
- package/dist/ui/breadcrumb.js +14 -14
- package/dist/ui/button-group.js +30 -15
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.js +114 -71
- package/dist/ui/card.js +66 -22
- package/dist/ui/charts/index.js +1221 -18
- package/dist/ui/checkbox.js +25 -5
- package/dist/ui/chip.d.ts +4 -4
- package/dist/ui/chip.js +2 -2
- package/dist/ui/code.js +1 -1
- package/dist/ui/collapsible.js +5 -5
- package/dist/ui/color-input.js +11 -11
- package/dist/ui/combobox.js +12 -12
- package/dist/ui/container.js +4 -4
- package/dist/ui/context-menu.js +37 -37
- package/dist/ui/data-table-toolbar.js +18 -18
- package/dist/ui/data-table.js +2 -2
- package/dist/ui/dialog.js +33 -33
- package/dist/ui/dropdown-menu.js +60 -60
- package/dist/ui/file-upload.js +1 -1
- package/dist/ui/form.js +36 -15
- package/dist/ui/hover-card.js +7 -7
- package/dist/ui/icon-button.js +9 -9
- package/dist/ui/index.js +523 -325
- package/dist/ui/input-otp.d.ts +2 -2
- package/dist/ui/input-otp.js +14 -14
- package/dist/ui/input.js +56 -28
- package/dist/ui/label.js +18 -4
- package/dist/ui/lib/utils.js +4 -5
- package/dist/ui/link.js +9 -9
- package/dist/ui/menubar.js +81 -81
- package/dist/ui/navigation-menu.js +42 -42
- package/dist/ui/number-input.js +13 -13
- package/dist/ui/pagination.js +5 -5
- package/dist/ui/popover.js +9 -9
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/progress.js +15 -15
- package/dist/ui/radio.js +10 -10
- package/dist/ui/search-input.js +5 -5
- package/dist/ui/segmented-control.js +91 -83
- package/dist/ui/select.js +52 -52
- package/dist/ui/separator.js +20 -5
- package/dist/ui/sheet.js +28 -28
- package/dist/ui/sidebar.js +36 -560
- package/dist/ui/skeleton.d.ts +1 -1
- package/dist/ui/skeleton.js +7 -7
- package/dist/ui/slider.js +11 -11
- package/dist/ui/spinner.js +37 -2
- package/dist/ui/stack.js +1 -1
- package/dist/ui/stat-card.js +1 -1
- package/dist/ui/stepper.js +15 -15
- package/dist/ui/switch.js +22 -3
- package/dist/ui/table.js +1 -1
- package/dist/ui/tabs.js +59 -32
- package/dist/ui/text.js +2 -2
- package/dist/ui/textarea.js +7 -7
- package/dist/ui/toast.d.ts +1 -1
- package/dist/ui/toast.js +28 -28
- package/dist/ui/toggle-group.js +11 -11
- package/dist/ui/toggle.js +7 -7
- package/dist/ui/tooltip.js +17 -6
- package/dist/ui/transitions.js +68 -58
- package/dist/ui/tree-view/index.js +7 -0
- package/dist/ui/visually-hidden.js +3 -3
- package/llms-full.txt +1 -1
- package/llms.txt +7 -0
- package/package.json +656 -706
- package/dist/_virtual/client.js +0 -5
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/react-dom-client.development.js +0 -5
- package/dist/_virtual/react-dom-client.production.js +0 -5
- package/dist/_virtual/scheduler.development.js +0 -5
- package/dist/_virtual/scheduler.production.js +0 -5
- package/dist/composed/date-picker/calendar-grid.js +0 -194
- package/dist/composed/date-picker/date-picker.js +0 -124
- package/dist/composed/date-picker/date-range-picker.js +0 -167
- package/dist/composed/date-picker/date-time-picker.js +0 -193
- package/dist/composed/date-picker/month-picker.js +0 -53
- package/dist/composed/date-picker/presets.js +0 -84
- package/dist/composed/date-picker/time-picker.js +0 -181
- package/dist/composed/date-picker/use-calendar.js +0 -17
- package/dist/composed/date-picker/year-picker.js +0 -45
- package/dist/composed/extensions/emoji-suggestion.js +0 -119
- package/dist/composed/extensions/file-attachment.js +0 -55
- package/dist/composed/extensions/mention-suggestion.js +0 -79
- package/dist/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.js +0 -40141
- package/dist/node_modules/.pnpm/@emoji-mart_react@1.1.1_emoji-mart@5.6.0_react@19.2.4/node_modules/@emoji-mart/react/dist/module.js +0 -17
- package/dist/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.js +0 -2958
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js +0 -17062
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js +0 -9790
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +0 -20
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +0 -237
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +0 -234
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js +0 -11
- package/dist/primitives/_internal/number.js +0 -6
- package/dist/primitives/_internal/primitive.js +0 -9
- package/dist/primitives/_internal/react-arrow.js +0 -13
- package/dist/primitives/_internal/react-collection.js +0 -48
- package/dist/primitives/_internal/react-compose-refs.js +0 -29
- package/dist/primitives/_internal/react-context.js +0 -76
- package/dist/primitives/_internal/react-direction.js +0 -10
- package/dist/primitives/_internal/react-dismissable-layer.js +0 -103
- package/dist/primitives/_internal/react-focus-guards.js +0 -17
- package/dist/primitives/_internal/react-focus-scope.js +0 -137
- package/dist/primitives/_internal/react-id.js +0 -14
- package/dist/primitives/_internal/react-popper.js +0 -137
- package/dist/primitives/_internal/react-portal.js +0 -16
- package/dist/primitives/_internal/react-presence.js +0 -71
- package/dist/primitives/_internal/react-primitive.js +0 -36
- package/dist/primitives/_internal/react-use-callback-ref.js +0 -13
- package/dist/primitives/_internal/react-use-controllable-state.js +0 -44
- package/dist/primitives/_internal/react-use-escape-keydown.js +0 -14
- package/dist/primitives/_internal/react-use-is-hydrated.js +0 -15
- package/dist/primitives/_internal/react-use-layout-effect.js +0 -6
- package/dist/primitives/_internal/react-use-previous.js +0 -8
- package/dist/primitives/_internal/react-use-size.js +0 -27
- package/dist/primitives/react-accordion.js +0 -239
- package/dist/primitives/react-alert-dialog.js +0 -127
- package/dist/primitives/react-aspect-ratio.js +0 -43
- package/dist/primitives/react-avatar.js +0 -75
- package/dist/primitives/react-checkbox.js +0 -251
- package/dist/primitives/react-collapsible.js +0 -120
- package/dist/primitives/react-context-menu.js +0 -240
- package/dist/primitives/react-dialog.js +0 -262
- package/dist/primitives/react-dropdown-menu.js +0 -227
- package/dist/primitives/react-hover-card.js +0 -187
- package/dist/primitives/react-label.js +0 -20
- package/dist/primitives/react-menu.js +0 -652
- package/dist/primitives/react-menubar.js +0 -355
- package/dist/primitives/react-navigation-menu.js +0 -607
- package/dist/primitives/react-popover.js +0 -243
- package/dist/primitives/react-progress.js +0 -84
- package/dist/primitives/react-radio-group.js +0 -238
- package/dist/primitives/react-roving-focus.js +0 -183
- package/dist/primitives/react-select.js +0 -862
- package/dist/primitives/react-separator.js +0 -24
- package/dist/primitives/react-slider.js +0 -437
- package/dist/primitives/react-slot.js +0 -70
- package/dist/primitives/react-switch.js +0 -132
- package/dist/primitives/react-tabs.js +0 -163
- package/dist/primitives/react-toast.js +0 -446
- package/dist/primitives/react-toggle-group.js +0 -137
- package/dist/primitives/react-toggle.js +0 -33
- package/dist/primitives/react-tooltip.js +0 -338
- package/dist/primitives/react-visually-hidden.js +0 -32
- package/dist/ui/charts/_internal/animation.js +0 -18
- package/dist/ui/charts/_internal/axes.js +0 -42
- package/dist/ui/charts/_internal/colors.js +0 -21
- package/dist/ui/charts/_internal/grid-lines.js +0 -43
- package/dist/ui/charts/_internal/legend.js +0 -29
- package/dist/ui/charts/_internal/tooltip.js +0 -39
- package/dist/ui/charts/_internal/types.js +0 -10
- package/dist/ui/charts/area-chart.js +0 -245
- package/dist/ui/charts/bar-chart.js +0 -153
- package/dist/ui/charts/chart-container.js +0 -27
- package/dist/ui/charts/gauge-chart.js +0 -72
- package/dist/ui/charts/line-chart.js +0 -163
- package/dist/ui/charts/pie-chart.js +0 -132
- package/dist/ui/charts/radar-chart.js +0 -223
- package/dist/ui/charts/sparkline.js +0 -124
- package/dist/ui/lib/motion.js +0 -32
- package/dist/ui/lib/use-reduced-motion.js +0 -15
- package/dist/ui/lib/use-ripple.js +0 -14
- package/dist/ui/tree-view/tree-item.js +0 -139
- package/dist/ui/tree-view/tree-view.js +0 -140
- package/dist/ui/tree-view/use-tree.js +0 -38
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as p, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
import { R as n, I as o, F as t } from "./primitives.js";
|
|
5
|
+
import { e as u } from "./vendor-utils.js";
|
|
6
|
+
import { c as r } from "./utils.js";
|
|
7
|
+
const h = u("relative flex shrink-0 overflow-hidden", {
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
xs: "h-ds-xs w-ds-xs",
|
|
11
|
+
sm: "h-ds-sm w-ds-sm",
|
|
12
|
+
md: "h-ds-md w-ds-md",
|
|
13
|
+
lg: "h-ds-lg w-ds-lg",
|
|
14
|
+
xl: "h-ds-xl w-ds-xl"
|
|
15
|
+
},
|
|
16
|
+
shape: {
|
|
17
|
+
circle: "rounded-ds-full",
|
|
18
|
+
square: "rounded-ds-none",
|
|
19
|
+
rounded: "rounded-ds-md"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: { size: "md", shape: "circle" }
|
|
23
|
+
}), w = {
|
|
24
|
+
online: "bg-success",
|
|
25
|
+
offline: "bg-layer-03",
|
|
26
|
+
busy: "bg-error",
|
|
27
|
+
away: "bg-warning"
|
|
28
|
+
}, x = {
|
|
29
|
+
online: "Online",
|
|
30
|
+
offline: "Offline",
|
|
31
|
+
busy: "Busy",
|
|
32
|
+
away: "Away"
|
|
33
|
+
}, b = {
|
|
34
|
+
xs: "h-ds-02b w-ds-02b",
|
|
35
|
+
sm: "h-[8px] w-[8px]",
|
|
36
|
+
md: "h-ds-03 w-ds-03",
|
|
37
|
+
lg: "h-[12px] w-[12px]",
|
|
38
|
+
xl: "h-ds-04 w-ds-04"
|
|
39
|
+
}, g = i.forwardRef(({ className: a, size: s, shape: e, status: d, children: m, ...f }, c) => p("span", { className: "relative inline-flex shrink-0", children: [l(n, { ref: c, className: r(h({ size: s, shape: e }), a), ...f, children: m }), d && l("span", { className: r("absolute bottom-0 right-0 rounded-ds-full ring-2 ring-layer-01", w[d], b[s ?? "md"]), role: "img", "aria-label": x[d] })] }));
|
|
40
|
+
g.displayName = n.displayName;
|
|
41
|
+
const y = i.forwardRef(({ className: a, ...s }, e) => l(o, { ref: e, className: r("aspect-square h-full w-full", a), ...s }));
|
|
42
|
+
y.displayName = o.displayName;
|
|
43
|
+
const v = i.forwardRef(({ className: a, ...s }, e) => l(t, { ref: e, className: r("flex h-full w-full items-center justify-center rounded-ds-full bg-interactive-subtle text-interactive", a), ...s }));
|
|
44
|
+
v.displayName = t.displayName;
|
|
45
|
+
export {
|
|
46
|
+
g as A,
|
|
47
|
+
y as a,
|
|
48
|
+
v as b,
|
|
49
|
+
h as c
|
|
50
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as x } from "react/jsx-runtime";
|
|
3
|
+
import { e as V } from "./vendor-utils.js";
|
|
4
|
+
import { S as R, a as E } from "./primitives.js";
|
|
5
|
+
import * as G from "react";
|
|
6
|
+
import { u as M, S as q } from "./spinner.js";
|
|
7
|
+
import { c as s } from "./utils.js";
|
|
8
|
+
const p = V("inline-flex items-center justify-center gap-ds-03 whitespace-nowrap font-sans font-semibold select-none border border-transparent transition-[color,background-color,border-color,box-shadow] duration-fast-01 ease-productive-standard focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-[0.38]", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
solid: "",
|
|
12
|
+
default: "",
|
|
13
|
+
// alias → solid
|
|
14
|
+
outline: "",
|
|
15
|
+
ghost: "",
|
|
16
|
+
destructive: "",
|
|
17
|
+
// alias → solid + error
|
|
18
|
+
link: "text-text-link underline-offset-4 hover:underline active:opacity-[0.8]"
|
|
19
|
+
},
|
|
20
|
+
color: {
|
|
21
|
+
default: "",
|
|
22
|
+
error: ""
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
sm: "h-ds-sm rounded-ds-md px-ds-04 text-ds-sm",
|
|
26
|
+
md: "h-ds-md rounded-ds-md px-ds-05 text-ds-md",
|
|
27
|
+
lg: "h-ds-lg rounded-ds-lg px-ds-06 text-ds-base",
|
|
28
|
+
icon: "h-ds-md w-ds-md rounded-ds-md",
|
|
29
|
+
// alias → icon-md
|
|
30
|
+
"icon-sm": "h-ds-sm w-ds-sm rounded-ds-md",
|
|
31
|
+
"icon-md": "h-ds-md w-ds-md rounded-ds-md",
|
|
32
|
+
"icon-lg": "h-ds-lg w-ds-lg rounded-ds-lg"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
compoundVariants: [
|
|
36
|
+
// solid + default (primary)
|
|
37
|
+
{ variant: "solid", color: "default", className: "bg-interactive text-text-on-color hover:bg-interactive-hover active:bg-interactive-active shadow-01 hover:shadow-brand" },
|
|
38
|
+
// "default" alias → same as solid + default
|
|
39
|
+
{ variant: "default", color: "default", className: "bg-interactive text-text-on-color hover:bg-interactive-hover active:bg-interactive-active shadow-01 hover:shadow-brand" },
|
|
40
|
+
{ variant: "default", color: "error", className: "bg-error text-text-on-color hover:bg-error-hover active:bg-error-hover shadow-01" },
|
|
41
|
+
// "destructive" alias → solid + error
|
|
42
|
+
{ variant: "destructive", color: "default", className: "bg-error text-text-on-color hover:bg-error-hover active:bg-error-hover shadow-01" },
|
|
43
|
+
{ variant: "destructive", color: "error", className: "bg-error text-text-on-color hover:bg-error-hover active:bg-error-hover shadow-01" },
|
|
44
|
+
// solid + error
|
|
45
|
+
{ variant: "solid", color: "error", className: "bg-error text-text-on-color hover:bg-error-hover active:bg-error-hover shadow-01" },
|
|
46
|
+
// outline + default (secondary)
|
|
47
|
+
{ variant: "outline", color: "default", className: "bg-transparent text-interactive border-border-interactive hover:bg-interactive-subtle active:bg-layer-active" },
|
|
48
|
+
// outline + error (error-ghost)
|
|
49
|
+
{ variant: "outline", color: "error", className: "bg-transparent text-error border border-border-error hover:bg-error-surface active:bg-error-surface" },
|
|
50
|
+
// ghost + default
|
|
51
|
+
{ variant: "ghost", color: "default", className: "bg-transparent text-text-secondary hover:bg-layer-02 hover:text-text-primary active:bg-layer-active" },
|
|
52
|
+
// ghost + error
|
|
53
|
+
{ variant: "ghost", color: "error", className: "bg-transparent text-error hover:bg-error-surface hover:text-error active:bg-error-surface" }
|
|
54
|
+
],
|
|
55
|
+
defaultVariants: {
|
|
56
|
+
variant: "solid",
|
|
57
|
+
color: "default",
|
|
58
|
+
size: "md"
|
|
59
|
+
}
|
|
60
|
+
}), A = {
|
|
61
|
+
sm: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
62
|
+
md: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
63
|
+
lg: "h-ico-md w-ico-md [&>svg]:h-ico-md [&>svg]:w-ico-md",
|
|
64
|
+
icon: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
65
|
+
"icon-sm": "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
66
|
+
"icon-md": "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
67
|
+
"icon-lg": "h-ico-md w-ico-md [&>svg]:h-ico-md [&>svg]:w-ico-md"
|
|
68
|
+
}, D = {
|
|
69
|
+
sm: "sm",
|
|
70
|
+
md: "sm",
|
|
71
|
+
lg: "md",
|
|
72
|
+
icon: "sm",
|
|
73
|
+
"icon-sm": "sm",
|
|
74
|
+
"icon-md": "sm",
|
|
75
|
+
"icon-lg": "md"
|
|
76
|
+
}, F = G.forwardRef(({ className: c, variant: w, color: N, size: y, asChild: S = !1, startIcon: d, endIcon: l, loading: e = !1, loadingPosition: t = "start", fullWidth: m = !1, disabled: v, children: i, ...u }, h) => {
|
|
77
|
+
const a = M(), b = w ?? a.variant, f = N ?? a.color, o = y ?? a.size ?? "md", g = A[o], z = D[o], n = e ? r(q, { size: z }) : null;
|
|
78
|
+
if (S) {
|
|
79
|
+
const C = {
|
|
80
|
+
className: s(p({ variant: b, color: f, size: o }), m && "w-full", c),
|
|
81
|
+
ref: h,
|
|
82
|
+
disabled: v || e,
|
|
83
|
+
"aria-busy": e || void 0,
|
|
84
|
+
...u
|
|
85
|
+
};
|
|
86
|
+
return r(R, { ...C, children: r(E, { children: i }) });
|
|
87
|
+
}
|
|
88
|
+
const j = () => e && t === "start" ? n : d ? r("span", { className: s("inline-flex shrink-0 items-center justify-center", g), children: d }) : null, k = () => e && t === "end" ? n : l ? r("span", { className: s("inline-flex shrink-0 items-center justify-center", g), children: l }) : null, B = () => e && t === "center" ? x("span", { className: "relative inline-flex items-center justify-center", children: [r("span", { className: "invisible", children: i }), r("span", { className: "absolute inset-0 flex items-center justify-center", children: n })] }) : i;
|
|
89
|
+
return x("button", { className: s(p({ variant: b, color: f, size: o }), m && "w-full", c), ref: h, disabled: v || e, "aria-busy": e || void 0, ...u, children: [j(), B(), k()] });
|
|
90
|
+
});
|
|
91
|
+
F.displayName = "Button";
|
|
92
|
+
export {
|
|
93
|
+
F as B,
|
|
94
|
+
p as b
|
|
95
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import { bj as n, bk as c } from "./primitives.js";
|
|
5
|
+
import { c as s } from "./utils.js";
|
|
6
|
+
import { e as l } from "./vendor-utils.js";
|
|
7
|
+
const f = o.forwardRef(({ className: e, error: r, ...a }, d) => t(n, { className: s("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-ds-full border-2 border-transparent shadow-01 transition-colors duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-[0.38] data-[state=checked]:bg-interactive data-[state=unchecked]:bg-border-strong", r && "border-border-error data-[state=checked]:bg-error", e), ...a, ref: d, children: t(c, { className: s("pointer-events-none block h-ico-md w-ico-md rounded-ds-full bg-text-on-color shadow-02 ring-0 transition-transform duration-fast-01 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") }) }));
|
|
8
|
+
f.displayName = n.displayName;
|
|
9
|
+
const b = l("rounded-ds-lg text-text-primary", {
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-layer-01 border border-border-subtle shadow-01",
|
|
13
|
+
elevated: "bg-layer-01 border border-border-subtle shadow-02",
|
|
14
|
+
outline: "bg-transparent border-2 border-border shadow-none",
|
|
15
|
+
flat: "bg-layer-02 border-none shadow-none"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: { variant: "default" }
|
|
19
|
+
}), m = o.forwardRef(({ className: e, variant: r, interactive: a, ...d }, i) => t("div", { ref: i, className: s(b({ variant: r }), a && "hover:shadow-02 hover:border-border-strong cursor-pointer transition-shadow duration-fast-01", e), ...d }));
|
|
20
|
+
m.displayName = "Card";
|
|
21
|
+
const p = o.forwardRef(({ className: e, ...r }, a) => t("div", { ref: a, className: s("flex flex-col space-y-ds-02b p-ds-06", e), ...r }));
|
|
22
|
+
p.displayName = "CardHeader";
|
|
23
|
+
const u = o.forwardRef(({ className: e, ...r }, a) => t("div", { ref: a, className: s("font-sans font-semibold leading-ds-none tracking-ds-tight text-text-primary", e), ...r }));
|
|
24
|
+
u.displayName = "CardTitle";
|
|
25
|
+
const h = o.forwardRef(({ className: e, ...r }, a) => t("div", { ref: a, className: s("text-ds-md text-text-secondary", e), ...r }));
|
|
26
|
+
h.displayName = "CardDescription";
|
|
27
|
+
const v = o.forwardRef(({ className: e, ...r }, a) => t("div", { ref: a, className: s("p-ds-06 pt-0", e), ...r }));
|
|
28
|
+
v.displayName = "CardContent";
|
|
29
|
+
const w = o.forwardRef(({ className: e, ...r }, a) => t("div", { ref: a, className: s("flex items-center p-ds-06 pt-0", e), ...r }));
|
|
30
|
+
w.displayName = "CardFooter";
|
|
31
|
+
export {
|
|
32
|
+
m as C,
|
|
33
|
+
f as S,
|
|
34
|
+
p as a,
|
|
35
|
+
u as b,
|
|
36
|
+
v as c,
|
|
37
|
+
h as d,
|
|
38
|
+
w as e,
|
|
39
|
+
b as f
|
|
40
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { C as r, b as n } from "./primitives.js";
|
|
4
|
+
import { IconMinus as m, IconCheck as l } from "@tabler/icons-react";
|
|
5
|
+
import * as b from "react";
|
|
6
|
+
import { c as f } from "./utils.js";
|
|
7
|
+
const h = b.forwardRef(({ className: o, error: i, indeterminate: a, checked: s, ...c }, d) => {
|
|
8
|
+
const t = a ? "indeterminate" : s;
|
|
9
|
+
return e(r, { ref: d, checked: t, className: f("peer h-ico-md w-ico-md shrink-0 rounded-ds-sm", "border border-border-strong", "bg-field", "transition-colors duration-fast-01", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2", "disabled:cursor-not-allowed disabled:opacity-[0.38]", "data-[state=checked]:bg-interactive data-[state=checked]:border-interactive data-[state=checked]:text-text-on-color", "data-[state=indeterminate]:bg-interactive data-[state=indeterminate]:border-interactive data-[state=indeterminate]:text-text-on-color", i && "border-border-error", o), ...c, children: e(n, { className: "flex items-center justify-center text-current", children: t === "indeterminate" ? e(m, { className: "h-ico-sm w-ico-sm" }) : e(l, { className: "h-ico-sm w-ico-sm" }) }) });
|
|
10
|
+
});
|
|
11
|
+
h.displayName = r.displayName;
|
|
12
|
+
export {
|
|
13
|
+
h as C
|
|
14
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import * as e from "react";
|
|
4
|
+
import { c as i } from "./utils.js";
|
|
5
|
+
const x = e.createContext({}), m = e.forwardRef(({ className: s, helperTextId: o, state: a = "helper", required: l, children: n, ...t }, r) => {
|
|
6
|
+
const d = e.useId(), p = o || `${d}-helper`;
|
|
7
|
+
return c(x.Provider, { value: { state: a, helperTextId: p, required: l }, children: c("div", { ref: r, className: i("flex flex-col gap-ds-02", s), ...t, children: n }) });
|
|
8
|
+
});
|
|
9
|
+
m.displayName = "FormField";
|
|
10
|
+
const u = {
|
|
11
|
+
helper: "text-text-helper",
|
|
12
|
+
error: "text-text-error",
|
|
13
|
+
warning: "text-text-warning",
|
|
14
|
+
success: "text-text-success"
|
|
15
|
+
}, f = e.forwardRef(({ className: s, id: o, state: a, ...l }, n) => {
|
|
16
|
+
const t = e.useContext(x), r = a ?? t.state ?? "helper", d = o ?? t.helperTextId;
|
|
17
|
+
return c("p", { ref: n, id: d, role: r === "error" ? "alert" : void 0, className: i("text-ds-sm", u[r], s), ...l });
|
|
18
|
+
});
|
|
19
|
+
f.displayName = "FormHelperText";
|
|
20
|
+
function C() {
|
|
21
|
+
return e.useContext(x);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
m as F,
|
|
25
|
+
f as a,
|
|
26
|
+
C as u
|
|
27
|
+
};
|