@nqlib/nqui 0.4.3 → 0.4.4
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/INSTALLATION.md +215 -0
- package/README.md +104 -151
- package/dist/button-CJHdCq9I.js +155 -0
- package/dist/button-R304rhsj.cjs +1 -0
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.es.js +1 -1
- package/dist/carousel-D1FMVglR.cjs +1 -0
- package/dist/carousel-U7RZhYZj.js +179 -0
- package/dist/carousel.cjs.js +1 -1
- package/dist/carousel.es.js +1 -1
- package/dist/command-palette-DCtLpM3Q.js +694 -0
- package/dist/command-palette-MHc03bBf.cjs +5 -0
- package/dist/command.cjs.js +1 -1
- package/dist/command.es.js +1 -1
- package/dist/components/custom/color-picker.d.ts +1 -1
- package/dist/components/custom/color-picker.d.ts.map +1 -1
- package/dist/components/custom/color-slider.d.ts +4 -10
- package/dist/components/custom/color-slider.d.ts.map +1 -1
- package/dist/components/custom/enhanced-radio-group.d.ts +13 -4
- package/dist/components/custom/enhanced-radio-group.d.ts.map +1 -1
- package/dist/components/custom/enhanced-tabs.d.ts.map +1 -1
- package/dist/components/debug/debug-features.d.ts +29 -0
- package/dist/components/debug/debug-features.d.ts.map +1 -0
- package/dist/components/debug/debug-panel.d.ts.map +1 -1
- package/dist/components/error-boundary.d.ts +20 -0
- package/dist/components/error-boundary.d.ts.map +1 -0
- package/dist/components/index.d.ts +103 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts +16 -5
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +38 -4
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts +16 -2
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/combobox.d.ts +2 -1
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/pagination.d.ts +3 -2
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/radio-group.d.ts +3 -1
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts +6 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/slider.d.ts +10 -2
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/sonner.d.ts +18 -2
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/spinner.d.ts +2 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/switch.d.ts +15 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/debug-panel-CG-vAN0L.js +9016 -0
- package/dist/debug-panel-DHBfAc1V.cjs +75 -0
- package/dist/debug.cjs.js +1 -0
- package/dist/debug.es.js +7 -0
- package/dist/{drawer-CU4lkcz7.js → drawer-DO26uhym.js} +31 -31
- package/dist/drawer-DVarEy65.cjs +1 -0
- package/dist/drawer.cjs.js +1 -1
- package/dist/drawer.es.js +1 -1
- package/dist/{enhanced-calendar-BENbxw7_.js → enhanced-calendar-BGlsSYJd.js} +1 -1
- package/dist/{enhanced-calendar-5PA8CeF7.cjs → enhanced-calendar-C7EQIr6i.cjs} +1 -1
- package/dist/entries/debug.d.ts +14 -0
- package/dist/entries/debug.d.ts.map +1 -0
- package/dist/entries/sonner.d.ts +1 -2
- package/dist/entries/sonner.d.ts.map +1 -1
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-scroll-spy.d.ts.map +1 -1
- package/dist/index-CI756mSv.cjs +41 -0
- package/dist/index-CgfzsUO6.js +1069 -0
- package/dist/index.d.ts +2 -98
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/index.d.ts +9 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/wrap-inline-label-text.d.ts +7 -0
- package/dist/lib/wrap-inline-label-text.d.ts.map +1 -0
- package/dist/nqui.cjs.js +49 -245
- package/dist/nqui.es.js +7399 -16735
- package/dist/sonner-CpmECDBk.js +179 -0
- package/dist/sonner-nE9hIalJ.cjs +48 -0
- package/dist/sonner.cjs.js +1 -1
- package/dist/sonner.es.js +3 -2
- package/dist/styles.css +186 -1
- package/docs/components/README.md +107 -8
- package/docs/components/nqui-badge.md +1 -0
- package/docs/components/nqui-button.md +3 -1
- package/docs/components/nqui-card.md +8 -0
- package/docs/components/nqui-carousel.md +6 -0
- package/docs/components/nqui-checkbox.md +38 -1
- package/docs/components/nqui-color-slider.md +5 -3
- package/docs/components/nqui-combobox.md +58 -37
- package/docs/components/nqui-drawer.md +1 -1
- package/docs/components/nqui-radio-group.md +45 -2
- package/docs/components/nqui-scroll-area.md +1 -1
- package/docs/components/nqui-select.md +2 -2
- package/docs/components/nqui-sheet.md +1 -1
- package/docs/components/nqui-slider.md +13 -0
- package/docs/components/nqui-spinner.md +6 -1
- package/docs/components/nqui-switch.md +23 -1
- package/docs/components/nqui-tabs.md +11 -1
- package/docs/components/nqui-toaster.md +5 -1
- package/docs/internal-notes/PUBLISHING.md +46 -4
- package/docs/nqui-skills/SKILL.md +102 -0
- package/docs/nqui-skills/design-system.md +143 -0
- package/docs/nqui-skills/rules/composition.md +183 -0
- package/docs/nqui-skills/rules/forms.md +190 -0
- package/docs/nqui-skills/rules/icons.md +158 -0
- package/docs/nqui-skills/rules/styling.md +192 -0
- package/package.json +23 -12
- package/scripts/build-styles.js +16 -0
- package/scripts/cli.js +1 -0
- package/scripts/download-skills.js +91 -0
- package/scripts/examples/nextjs-layout-sidebar.tsx +100 -0
- package/scripts/examples/nextjs-page-sidebar.tsx +81 -0
- package/scripts/examples/vite-app.tsx +135 -0
- package/scripts/examples/vite-main.tsx +17 -0
- package/scripts/examples.js +92 -6
- package/scripts/generate-docs.js +169 -0
- package/scripts/init-css.js +34 -14
- package/scripts/init-cursor.js +8 -0
- package/scripts/init-debug-css.js +4 -2
- package/scripts/post-install.js +41 -9
- package/scripts/publish-npmjs.js +17 -3
- package/scripts/resolve-target-dir.js +20 -1
- package/scripts/verify-build.js +1 -1
- package/scripts/wizard.js +12 -7
- package/dist/button-CYFTFDKe.cjs +0 -1
- package/dist/button-nJvDl3w8.js +0 -44
- package/dist/carousel-DEyyJi49.js +0 -179
- package/dist/carousel-Dhhz8m5V.cjs +0 -1
- package/dist/command-palette-UHk8zZOg.cjs +0 -45
- package/dist/command-palette-d-TrdBsM.js +0 -1778
- package/dist/components/custom/enhanced-badge.d.ts +0 -33
- package/dist/components/custom/enhanced-badge.d.ts.map +0 -1
- package/dist/components/custom/enhanced-button.d.ts +0 -34
- package/dist/components/custom/enhanced-button.d.ts.map +0 -1
- package/dist/components/custom/enhanced-checkbox.d.ts +0 -28
- package/dist/components/custom/enhanced-checkbox.d.ts.map +0 -1
- package/dist/components/custom/enhanced-combobox.d.ts +0 -35
- package/dist/components/custom/enhanced-combobox.d.ts.map +0 -1
- package/dist/components/custom/enhanced-select.d.ts +0 -30
- package/dist/components/custom/enhanced-select.d.ts.map +0 -1
- package/dist/components/custom/enhanced-sonner.d.ts +0 -16
- package/dist/components/custom/enhanced-sonner.d.ts.map +0 -1
- package/dist/drawer-BcIxWRN8.cjs +0 -1
- package/dist/sonner-Co6YpYVs.js +0 -546
- package/dist/sonner-DbQhVp8m.cjs +0 -330
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { Slot as u } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as b } from "class-variance-authority";
|
|
5
|
+
import { c as g } from "./utils-B6yFEsav.js";
|
|
6
|
+
function c(t) {
|
|
7
|
+
return o.Children.map(t, (e, r) => {
|
|
8
|
+
if (e === null || e === !1) return e;
|
|
9
|
+
if (typeof e == "string" || typeof e == "number")
|
|
10
|
+
return /* @__PURE__ */ i("span", { className: "min-w-0 shrink truncate", children: e }, `nqui-inline-lbl-${r}`);
|
|
11
|
+
if (o.isValidElement(e) && e.type === o.Fragment) {
|
|
12
|
+
const { children: n } = e.props;
|
|
13
|
+
return /* @__PURE__ */ i(o.Fragment, { children: c(n) }, `nqui-inline-fr-${r}`);
|
|
14
|
+
}
|
|
15
|
+
return e;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
const h = b(
|
|
19
|
+
"inline-flex min-w-0 max-w-full items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
20
|
+
{
|
|
21
|
+
variants: {
|
|
22
|
+
variant: {
|
|
23
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
24
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
25
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
26
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
27
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
28
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
29
|
+
},
|
|
30
|
+
size: {
|
|
31
|
+
default: "h-7 min-w-7 px-3",
|
|
32
|
+
sm: "h-6 min-w-6 px-2 text-xs",
|
|
33
|
+
lg: "h-8 min-w-8 px-4",
|
|
34
|
+
icon: "h-7 w-7 p-0"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
variant: "default",
|
|
39
|
+
size: "default"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
), l = o.forwardRef(
|
|
43
|
+
({ className: t, variant: e, size: r, asChild: n = !1, children: s, ...a }, d) => /* @__PURE__ */ i(
|
|
44
|
+
n ? u : "button",
|
|
45
|
+
{
|
|
46
|
+
className: g(h({ variant: e, size: r, className: t })),
|
|
47
|
+
ref: d,
|
|
48
|
+
...a,
|
|
49
|
+
children: c(s)
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
);
|
|
53
|
+
l.displayName = "Button";
|
|
54
|
+
const m = b(
|
|
55
|
+
"inline-flex min-w-0 max-w-full items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium leading-normal text-center cursor-pointer select-none touch-manipulation transition-[color,background-color,border-color,box-shadow,opacity,transform] duration-150 ease-in-out focus:outline-0 focus-visible:outline-0 disabled:pointer-events-none disabled:opacity-65 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
56
|
+
{
|
|
57
|
+
variants: {
|
|
58
|
+
variant: {
|
|
59
|
+
default: [
|
|
60
|
+
"bg-primary text-primary-foreground border border-primary",
|
|
61
|
+
"nqui-button-gradient nqui-button-shadow",
|
|
62
|
+
"opacity-90 hover:opacity-100",
|
|
63
|
+
"hover:bg-primary/90 hover:border-primary/90",
|
|
64
|
+
"focus:bg-primary/80 focus:border-primary/80",
|
|
65
|
+
"active:bg-primary/75 active:border-primary/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95",
|
|
66
|
+
"disabled:bg-transparent disabled:shadow-none disabled:opacity-65"
|
|
67
|
+
],
|
|
68
|
+
destructive: [
|
|
69
|
+
"bg-destructive text-destructive-foreground border border-destructive",
|
|
70
|
+
"nqui-button-gradient nqui-button-shadow",
|
|
71
|
+
"opacity-90 hover:opacity-100",
|
|
72
|
+
"hover:bg-destructive/90 hover:border-destructive/90",
|
|
73
|
+
"focus:bg-destructive/80 focus:border-destructive/80",
|
|
74
|
+
"active:bg-destructive/75 active:border-destructive/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95",
|
|
75
|
+
"disabled:bg-transparent disabled:shadow-none disabled:opacity-65"
|
|
76
|
+
],
|
|
77
|
+
secondary: [
|
|
78
|
+
"bg-secondary text-secondary-foreground border border-border",
|
|
79
|
+
"nqui-button-gradient nqui-button-shadow",
|
|
80
|
+
"opacity-90 hover:opacity-100",
|
|
81
|
+
"hover:bg-secondary/90 hover:border-border",
|
|
82
|
+
"focus:bg-secondary/80 focus:border-border",
|
|
83
|
+
"active:bg-secondary/75 active:border-border active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95",
|
|
84
|
+
"disabled:bg-transparent disabled:shadow-none disabled:opacity-65"
|
|
85
|
+
],
|
|
86
|
+
success: [
|
|
87
|
+
"bg-success text-success-foreground border border-success",
|
|
88
|
+
"nqui-button-gradient nqui-button-shadow",
|
|
89
|
+
"opacity-90 hover:opacity-100",
|
|
90
|
+
"hover:bg-success/90 hover:border-success/90",
|
|
91
|
+
"focus:bg-success/80 focus:border-success/80",
|
|
92
|
+
"active:bg-success/75 active:border-success/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95",
|
|
93
|
+
"disabled:bg-transparent disabled:shadow-none disabled:opacity-65"
|
|
94
|
+
],
|
|
95
|
+
warning: [
|
|
96
|
+
"bg-warning text-warning-foreground border border-warning",
|
|
97
|
+
"nqui-button-gradient nqui-button-shadow",
|
|
98
|
+
"opacity-90 hover:opacity-100",
|
|
99
|
+
"hover:bg-warning/90 hover:border-warning/90",
|
|
100
|
+
"focus:bg-warning/80 focus:border-warning/80",
|
|
101
|
+
"active:bg-warning/75 active:border-warning/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95",
|
|
102
|
+
"disabled:bg-transparent disabled:shadow-none disabled:opacity-65"
|
|
103
|
+
],
|
|
104
|
+
info: [
|
|
105
|
+
"bg-info text-info-foreground border border-info",
|
|
106
|
+
"nqui-button-gradient nqui-button-shadow",
|
|
107
|
+
"opacity-90 hover:opacity-100",
|
|
108
|
+
"hover:bg-info/90 hover:border-info/90",
|
|
109
|
+
"focus:bg-info/80 focus:border-info/80",
|
|
110
|
+
"active:bg-info/75 active:border-info/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95",
|
|
111
|
+
"disabled:bg-transparent disabled:shadow-none disabled:opacity-65"
|
|
112
|
+
],
|
|
113
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
114
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
115
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
116
|
+
},
|
|
117
|
+
size: {
|
|
118
|
+
default: "h-7 min-w-7 px-3",
|
|
119
|
+
sm: "h-6 min-w-6 px-2 text-xs",
|
|
120
|
+
lg: "h-8 min-w-8 px-4",
|
|
121
|
+
icon: "h-7 w-7 p-0"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
defaultVariants: {
|
|
125
|
+
variant: "default",
|
|
126
|
+
size: "default"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
), y = o.forwardRef(
|
|
130
|
+
({ className: t, variant: e, size: r, asChild: n = !1, children: s, ...a }, d) => {
|
|
131
|
+
if (!(e && ["default", "destructive", "secondary", "success", "warning", "info"].includes(e)) && e)
|
|
132
|
+
return /* @__PURE__ */ i(
|
|
133
|
+
l,
|
|
134
|
+
{
|
|
135
|
+
ref: d,
|
|
136
|
+
variant: e === "outline" || e === "ghost" || e === "link" ? e : "default",
|
|
137
|
+
size: r,
|
|
138
|
+
className: t,
|
|
139
|
+
asChild: n,
|
|
140
|
+
...a,
|
|
141
|
+
children: s
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
const p = n ? u : "button", v = g(m({ variant: e, size: r, className: t }));
|
|
145
|
+
return /* @__PURE__ */ i(p, { className: v, style: a.style, ref: d, ...a, children: c(s) });
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
y.displayName = "EnhancedButton";
|
|
149
|
+
export {
|
|
150
|
+
l as B,
|
|
151
|
+
y as E,
|
|
152
|
+
h as b,
|
|
153
|
+
m as e,
|
|
154
|
+
c as w
|
|
155
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),w=require("react"),l=require("@radix-ui/react-slot"),g=require("class-variance-authority"),f=require("./utils-IjLH3w2e.cjs");function _(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const o=_(w);function d(r){return o.Children.map(r,(e,t)=>{if(e===null||e===!1)return e;if(typeof e=="string"||typeof e=="number")return i.jsx("span",{className:"min-w-0 shrink truncate",children:e},`nqui-inline-lbl-${t}`);if(o.isValidElement(e)&&e.type===o.Fragment){const{children:n}=e.props;return i.jsx(o.Fragment,{children:d(n)},`nqui-inline-fr-${t}`)}return e})}const p=g.cva("inline-flex min-w-0 max-w-full items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 min-w-7 px-3",sm:"h-6 min-w-6 px-2 text-xs",lg:"h-8 min-w-8 px-4",icon:"h-7 w-7 p-0"}},defaultVariants:{variant:"default",size:"default"}}),u=o.forwardRef(({className:r,variant:e,size:t,asChild:n=!1,children:s,...a},c)=>{const b=n?l.Slot:"button";return i.jsx(b,{className:f.cn(p({variant:e,size:t,className:r})),ref:c,...a,children:d(s)})});u.displayName="Button";const v=g.cva("inline-flex min-w-0 max-w-full items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium leading-normal text-center cursor-pointer select-none touch-manipulation transition-[color,background-color,border-color,box-shadow,opacity,transform] duration-150 ease-in-out focus:outline-0 focus-visible:outline-0 disabled:pointer-events-none disabled:opacity-65 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:["bg-primary text-primary-foreground border border-primary","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-primary/90 hover:border-primary/90","focus:bg-primary/80 focus:border-primary/80","active:bg-primary/75 active:border-primary/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],destructive:["bg-destructive text-destructive-foreground border border-destructive","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-destructive/90 hover:border-destructive/90","focus:bg-destructive/80 focus:border-destructive/80","active:bg-destructive/75 active:border-destructive/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],secondary:["bg-secondary text-secondary-foreground border border-border","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-secondary/90 hover:border-border","focus:bg-secondary/80 focus:border-border","active:bg-secondary/75 active:border-border active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],success:["bg-success text-success-foreground border border-success","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-success/90 hover:border-success/90","focus:bg-success/80 focus:border-success/80","active:bg-success/75 active:border-success/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],warning:["bg-warning text-warning-foreground border border-warning","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-warning/90 hover:border-warning/90","focus:bg-warning/80 focus:border-warning/80","active:bg-warning/75 active:border-warning/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],info:["bg-info text-info-foreground border border-info","nqui-button-gradient nqui-button-shadow","opacity-90 hover:opacity-100","hover:bg-info/90 hover:border-info/90","focus:bg-info/80 focus:border-info/80","active:bg-info/75 active:border-info/75 active:shadow-[inset_0_3px_5px_rgba(0,0,0,0.125)] active:scale-95","disabled:bg-transparent disabled:shadow-none disabled:opacity-65"],outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 min-w-7 px-3",sm:"h-6 min-w-6 px-2 text-xs",lg:"h-8 min-w-8 px-4",icon:"h-7 w-7 p-0"}},defaultVariants:{variant:"default",size:"default"}}),h=o.forwardRef(({className:r,variant:e,size:t,asChild:n=!1,children:s,...a},c)=>{if(!(e&&["default","destructive","secondary","success","warning","info"].includes(e))&&e){const x=e==="outline"||e==="ghost"||e==="link"?e:"default";return i.jsx(u,{ref:c,variant:x,size:t,className:r,asChild:n,...a,children:s})}const y=n?l.Slot:"button",m=f.cn(v({variant:e,size:t,className:r}));return i.jsx(y,{className:m,style:a.style,ref:c,...a,children:d(s)})});h.displayName="EnhancedButton";exports.Button=u;exports.EnhancedButton=h;exports.buttonVariants=p;exports.enhancedButtonVariants=v;exports.wrapInlineLabelTextNodes=d;
|
package/dist/calendar.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./enhanced-calendar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./enhanced-calendar-C7EQIr6i.cjs");exports.Calendar=a.EnhancedCalendar;exports.CalendarDayButton=a.CalendarDayButton;exports.CoreCalendar=a.Calendar;
|
package/dist/calendar.es.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),S=require("react"),z=require("embla-carousel-react"),h=require("./keyboard-BapbM2wb.cjs"),f=require("./utils-IjLH3w2e.cjs"),y=require("./button-R304rhsj.cjs"),m=require("@hugeicons/react"),C=require("@hugeicons/core-free-icons");function q(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const a=q(S),b=a.createContext(null);function p(){const e=a.useContext(b);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function I({orientation:e="horizontal",opts:t,setApi:o,plugins:s,className:c,children:i,...u}){const[N,r]=z({...t,axis:e==="horizontal"?"x":"y"},s),[g,j]=a.useState(!1),[w,k]=a.useState(!1),d=a.useCallback(l=>{l&&(j(l.canScrollPrev()),k(l.canScrollNext()))},[]),x=a.useCallback(()=>{r?.scrollPrev()},[r]),v=a.useCallback(()=>{r?.scrollNext()},[r]),P=a.useCallback(l=>{l.key===h.Keys.ArrowLeft?(l.preventDefault(),x()):l.key===h.Keys.ArrowRight&&(l.preventDefault(),v())},[x,v]);return a.useEffect(()=>{!r||!o||o(r)},[r,o]),a.useEffect(()=>{if(r)return d(r),r.on("reInit",d),r.on("select",d),()=>{r?.off("select",d)}},[r,d]),n.jsx(b.Provider,{value:{carouselRef:N,api:r,opts:t,orientation:e||(t?.axis==="y"?"vertical":"horizontal"),scrollPrev:x,scrollNext:v,canScrollPrev:g,canScrollNext:w},children:n.jsx("div",{onKeyDownCapture:P,className:f.cn("relative min-w-0 group/carousel",c),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...u,children:i})})}function R({className:e,...t}){const{carouselRef:o,orientation:s}=p();return n.jsx("div",{ref:o,className:"overflow-hidden","data-slot":"carousel-content",children:n.jsx("div",{className:f.cn("flex",s==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})}function D({className:e,...t}){const{orientation:o}=p();return n.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:f.cn("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})}function O({className:e,variant:t="outline",size:o="icon",...s}){const{orientation:c,scrollPrev:i,canScrollPrev:u}=p();return n.jsxs(y.Button,{"data-slot":"carousel-previous",variant:t,size:o,className:f.cn("rounded-full absolute touch-manipulation z-[var(--z-content)] opacity-35 shadow-sm transition-[opacity,transform] duration-150 ease-out hover:opacity-100 focus-visible:opacity-100 active:opacity-100 group-hover/carousel:opacity-75 disabled:pointer-events-none disabled:opacity-20",c==="horizontal"?"top-1/2 left-2 -translate-y-1/2":"top-2 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!u,onClick:i,...s,children:[n.jsx(m.HugeiconsIcon,{icon:C.ArrowLeft01Icon,strokeWidth:2}),n.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function E({className:e,variant:t="outline",size:o="icon",...s}){const{orientation:c,scrollNext:i,canScrollNext:u}=p();return n.jsxs(y.Button,{"data-slot":"carousel-next",variant:t,size:o,className:f.cn("rounded-full absolute touch-manipulation z-[var(--z-content)] opacity-35 shadow-sm transition-[opacity,transform] duration-150 ease-out hover:opacity-100 focus-visible:opacity-100 active:opacity-100 group-hover/carousel:opacity-75 disabled:pointer-events-none disabled:opacity-20",c==="horizontal"?"top-1/2 right-2 -translate-y-1/2":"bottom-2 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!u,onClick:i,...s,children:[n.jsx(m.HugeiconsIcon,{icon:C.ArrowRight01Icon,strokeWidth:2}),n.jsx("span",{className:"sr-only",children:"Next slide"})]})}exports.Carousel=I;exports.CarouselContent=R;exports.CarouselItem=D;exports.CarouselNext=E;exports.CarouselPrevious=O;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { jsx as l, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import P from "embla-carousel-react";
|
|
4
|
+
import { K as v } from "./keyboard-pkY42Y3a.js";
|
|
5
|
+
import { c as f } from "./utils-B6yFEsav.js";
|
|
6
|
+
import { B as x } from "./button-CJHdCq9I.js";
|
|
7
|
+
import { HugeiconsIcon as C } from "@hugeicons/react";
|
|
8
|
+
import { ArrowLeft01Icon as I, ArrowRight01Icon as R } from "@hugeicons/core-free-icons";
|
|
9
|
+
const b = a.createContext(null);
|
|
10
|
+
function m() {
|
|
11
|
+
const e = a.useContext(b);
|
|
12
|
+
if (!e)
|
|
13
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
14
|
+
return e;
|
|
15
|
+
}
|
|
16
|
+
function W({
|
|
17
|
+
orientation: e = "horizontal",
|
|
18
|
+
opts: t,
|
|
19
|
+
setApi: r,
|
|
20
|
+
plugins: n,
|
|
21
|
+
className: i,
|
|
22
|
+
children: c,
|
|
23
|
+
...u
|
|
24
|
+
}) {
|
|
25
|
+
const [N, o] = P(
|
|
26
|
+
{
|
|
27
|
+
...t,
|
|
28
|
+
axis: e === "horizontal" ? "x" : "y"
|
|
29
|
+
},
|
|
30
|
+
n
|
|
31
|
+
), [w, k] = a.useState(!1), [z, S] = a.useState(!1), d = a.useCallback((s) => {
|
|
32
|
+
s && (k(s.canScrollPrev()), S(s.canScrollNext()));
|
|
33
|
+
}, []), p = a.useCallback(() => {
|
|
34
|
+
o?.scrollPrev();
|
|
35
|
+
}, [o]), h = a.useCallback(() => {
|
|
36
|
+
o?.scrollNext();
|
|
37
|
+
}, [o]), g = a.useCallback(
|
|
38
|
+
(s) => {
|
|
39
|
+
s.key === v.ArrowLeft ? (s.preventDefault(), p()) : s.key === v.ArrowRight && (s.preventDefault(), h());
|
|
40
|
+
},
|
|
41
|
+
[p, h]
|
|
42
|
+
);
|
|
43
|
+
return a.useEffect(() => {
|
|
44
|
+
!o || !r || r(o);
|
|
45
|
+
}, [o, r]), a.useEffect(() => {
|
|
46
|
+
if (o)
|
|
47
|
+
return d(o), o.on("reInit", d), o.on("select", d), () => {
|
|
48
|
+
o?.off("select", d);
|
|
49
|
+
};
|
|
50
|
+
}, [o, d]), /* @__PURE__ */ l(
|
|
51
|
+
b.Provider,
|
|
52
|
+
{
|
|
53
|
+
value: {
|
|
54
|
+
carouselRef: N,
|
|
55
|
+
api: o,
|
|
56
|
+
opts: t,
|
|
57
|
+
orientation: e || (t?.axis === "y" ? "vertical" : "horizontal"),
|
|
58
|
+
scrollPrev: p,
|
|
59
|
+
scrollNext: h,
|
|
60
|
+
canScrollPrev: w,
|
|
61
|
+
canScrollNext: z
|
|
62
|
+
},
|
|
63
|
+
children: /* @__PURE__ */ l(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
onKeyDownCapture: g,
|
|
67
|
+
className: f("relative min-w-0 group/carousel", i),
|
|
68
|
+
role: "region",
|
|
69
|
+
"aria-roledescription": "carousel",
|
|
70
|
+
"data-slot": "carousel",
|
|
71
|
+
...u,
|
|
72
|
+
children: c
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
function H({ className: e, ...t }) {
|
|
79
|
+
const { carouselRef: r, orientation: n } = m();
|
|
80
|
+
return /* @__PURE__ */ l(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
ref: r,
|
|
84
|
+
className: "overflow-hidden",
|
|
85
|
+
"data-slot": "carousel-content",
|
|
86
|
+
children: /* @__PURE__ */ l(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className: f(
|
|
90
|
+
"flex",
|
|
91
|
+
n === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
92
|
+
e
|
|
93
|
+
),
|
|
94
|
+
...t
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function q({ className: e, ...t }) {
|
|
101
|
+
const { orientation: r } = m();
|
|
102
|
+
return /* @__PURE__ */ l(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
role: "group",
|
|
106
|
+
"aria-roledescription": "slide",
|
|
107
|
+
"data-slot": "carousel-item",
|
|
108
|
+
className: f(
|
|
109
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
110
|
+
r === "horizontal" ? "pl-4" : "pt-4",
|
|
111
|
+
e
|
|
112
|
+
),
|
|
113
|
+
...t
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function F({
|
|
118
|
+
className: e,
|
|
119
|
+
variant: t = "outline",
|
|
120
|
+
size: r = "icon",
|
|
121
|
+
...n
|
|
122
|
+
}) {
|
|
123
|
+
const { orientation: i, scrollPrev: c, canScrollPrev: u } = m();
|
|
124
|
+
return /* @__PURE__ */ y(
|
|
125
|
+
x,
|
|
126
|
+
{
|
|
127
|
+
"data-slot": "carousel-previous",
|
|
128
|
+
variant: t,
|
|
129
|
+
size: r,
|
|
130
|
+
className: f(
|
|
131
|
+
"rounded-full absolute touch-manipulation z-[var(--z-content)] opacity-35 shadow-sm transition-[opacity,transform] duration-150 ease-out hover:opacity-100 focus-visible:opacity-100 active:opacity-100 group-hover/carousel:opacity-75 disabled:pointer-events-none disabled:opacity-20",
|
|
132
|
+
i === "horizontal" ? "top-1/2 left-2 -translate-y-1/2" : "top-2 left-1/2 -translate-x-1/2 rotate-90",
|
|
133
|
+
e
|
|
134
|
+
),
|
|
135
|
+
disabled: !u,
|
|
136
|
+
onClick: c,
|
|
137
|
+
...n,
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ l(C, { icon: I, strokeWidth: 2 }),
|
|
140
|
+
/* @__PURE__ */ l("span", { className: "sr-only", children: "Previous slide" })
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function G({
|
|
146
|
+
className: e,
|
|
147
|
+
variant: t = "outline",
|
|
148
|
+
size: r = "icon",
|
|
149
|
+
...n
|
|
150
|
+
}) {
|
|
151
|
+
const { orientation: i, scrollNext: c, canScrollNext: u } = m();
|
|
152
|
+
return /* @__PURE__ */ y(
|
|
153
|
+
x,
|
|
154
|
+
{
|
|
155
|
+
"data-slot": "carousel-next",
|
|
156
|
+
variant: t,
|
|
157
|
+
size: r,
|
|
158
|
+
className: f(
|
|
159
|
+
"rounded-full absolute touch-manipulation z-[var(--z-content)] opacity-35 shadow-sm transition-[opacity,transform] duration-150 ease-out hover:opacity-100 focus-visible:opacity-100 active:opacity-100 group-hover/carousel:opacity-75 disabled:pointer-events-none disabled:opacity-20",
|
|
160
|
+
i === "horizontal" ? "top-1/2 right-2 -translate-y-1/2" : "bottom-2 left-1/2 -translate-x-1/2 rotate-90",
|
|
161
|
+
e
|
|
162
|
+
),
|
|
163
|
+
disabled: !u,
|
|
164
|
+
onClick: c,
|
|
165
|
+
...n,
|
|
166
|
+
children: [
|
|
167
|
+
/* @__PURE__ */ l(C, { icon: R, strokeWidth: 2 }),
|
|
168
|
+
/* @__PURE__ */ l("span", { className: "sr-only", children: "Next slide" })
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
export {
|
|
174
|
+
W as C,
|
|
175
|
+
H as a,
|
|
176
|
+
q as b,
|
|
177
|
+
F as c,
|
|
178
|
+
G as d
|
|
179
|
+
};
|
package/dist/carousel.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./carousel-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./carousel-D1FMVglR.cjs");exports.Carousel=e.Carousel;exports.CarouselContent=e.CarouselContent;exports.CarouselItem=e.CarouselItem;exports.CarouselNext=e.CarouselNext;exports.CarouselPrevious=e.CarouselPrevious;
|
package/dist/carousel.es.js
CHANGED