@krosoft/react 0.0.237 → 0.0.239
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/AppActions-C_0YI75w.js +60 -0
- package/dist/AppSubTitle-tqqV9nuT.js +19 -0
- package/dist/AppTitle-BR4JFZfp.js +19 -0
- package/dist/ErrorAlert-BDqDHUUc.js +27 -0
- package/dist/GenericForm-CWXT5wiv.js +310 -0
- package/dist/ImageInput-CN2ozjpc.js +80 -0
- package/dist/MultiSelect-BF0zL0B0.js +134 -0
- package/dist/SearchInput-BJPT0SbB.js +255 -0
- package/dist/alert-REQGK9bR.js +32 -0
- package/dist/behavior-BR_V9Rpe.js +76 -0
- package/dist/cards-Cta6x49J.js +126 -0
- package/dist/chart-Dq3AIrue.js +166 -0
- package/dist/charts-CXhVUqLH.js +328 -0
- package/dist/components/core/cards/index.js +2 -10
- package/dist/components/core/charts/index.js +2 -11
- package/dist/components/core/dialogs/index.js +4 -19
- package/dist/components/core/filters/index.js +426 -7
- package/dist/components/core/forms/index.js +2 -4
- package/dist/components/core/index.js +24 -97
- package/dist/components/core/inputs/index.js +4 -11
- package/dist/components/core/language/index.js +2 -4
- package/dist/components/core/layouts/index.js +50 -11
- package/dist/components/core/navbar/index.js +2 -9
- package/dist/components/core/states/index.js +3 -8
- package/dist/components/core/table/index.js +2 -15
- package/dist/components/core/tabs/index.js +188 -6
- package/dist/components/core/theme/index.js +2 -4
- package/dist/components/index.js +28 -322
- package/dist/components/ui/index.js +8 -240
- package/dist/contexts/index.js +2 -5
- package/dist/dialogs-BGHSClsq.js +208 -0
- package/dist/helpers/index.js +39 -46
- package/dist/hooks/behavior/index.js +2 -10
- package/dist/hooks/index.js +11 -30
- package/dist/hooks/ui/index.js +10 -22
- package/dist/i18n/index.js +2 -10
- package/dist/i18n-Dw99bRmg.js +190 -0
- package/dist/language-DxHhlpgN.js +58 -0
- package/dist/navbar-Bc5OQWRI.js +385 -0
- package/dist/providers/index.js +42 -49
- package/dist/pwa/index.js +32 -34
- package/dist/select-ULiTPOr5.js +81 -0
- package/dist/sheet-CRrYTZrl.js +226 -0
- package/dist/sidebar.context-BahtU6hE.js +5 -0
- package/dist/skeleton-D6Ga4BLw.js +11 -0
- package/dist/states-N8-LjFng.js +26 -0
- package/dist/table-muUyiaK6.js +571 -0
- package/dist/tailwind/index.js +126 -156
- package/dist/tailwind.helper-CJaRYBmL.js +8 -0
- package/dist/theme-B_n0F6R4.js +57 -0
- package/dist/tokens/index.js +37 -46
- package/dist/tooltip-B2dzyfs9.js +50 -0
- package/dist/types/forms/index.js +0 -1
- package/dist/types/index.js +1 -1
- package/dist/ui-CiX0E_bn.js +1165 -0
- package/dist/ui-DSVBO3iM.js +46 -0
- package/dist/useDocumentTitle-D7MywIeB.js +19 -0
- package/dist/useFixedColumns-DfAX30tT.js +147 -0
- package/dist/useLanguage-DN3CuBv5.js +19 -0
- package/dist/useMobile-pTQ8lWvt.js +16 -0
- package/dist/useNotifications-CyhTruIG.js +20 -0
- package/dist/useScrollFade-D9kqJBDh.js +27 -0
- package/dist/useTheme-DVfcJ-Qd.js +25 -0
- package/dist/useToast-UeDRLovh.js +103 -0
- package/package.json +3 -3
- package/dist/AppActions-BFwztl-1.js +0 -76
- package/dist/AppSubTitle-BTN0YAc7.js +0 -13
- package/dist/AppTitle-D15YXeMx.js +0 -13
- package/dist/AppVerticalTabs-B7XXtAVj.js +0 -103
- package/dist/ConfirmationDialog-Dj4WdnHg.js +0 -188
- package/dist/DataTable-CjrR27Di.js +0 -638
- package/dist/ErrorAlert-B99Xb_Hg.js +0 -23
- package/dist/ErrorState-CkeS_IBT.js +0 -14
- package/dist/GenericForm-CydibLHU.js +0 -343
- package/dist/ImageInput-DoOOvvth.js +0 -70
- package/dist/KpiCardsLayout-Bq4xQ3i8.js +0 -43
- package/dist/LanguageSelector-C7E51rCQ.js +0 -47
- package/dist/LoadingState-BN0YaPSs.js +0 -9
- package/dist/MetricCard-B0xnFyim.js +0 -53
- package/dist/MultiSelect-DbH7LrsD.js +0 -149
- package/dist/PieChart-uozNJtEx.js +0 -295
- package/dist/SearchInput-DIZ5Yt6L.js +0 -246
- package/dist/SkeletonCards-B9C4cNMr.js +0 -75
- package/dist/TableFilter-CmEVF5Bo.js +0 -422
- package/dist/ThemeSelector-CLi4_epH.js +0 -52
- package/dist/Topbar-Clby5_uj.js +0 -431
- package/dist/alert-B9F1N9Qk.js +0 -30
- package/dist/chart-DntJZGxB.js +0 -181
- package/dist/select-BpjFWqAY.js +0 -96
- package/dist/sheet-XYI-ezvY.js +0 -292
- package/dist/sidebar.context-D5nywlmP.js +0 -6
- package/dist/skeleton-BX4RcsiK.js +0 -8
- package/dist/tailwind.helper-B6yFEsav.js +0 -8
- package/dist/toaster-CyzB1m5z.js +0 -75
- package/dist/toggle-group-iZqnrTj7.js +0 -1276
- package/dist/tooltip-DVeqVwqV.js +0 -61
- package/dist/useDateFnsLocale-D6VExZ8U.js +0 -11
- package/dist/useDocumentTitle-WNwdPz-I.js +0 -14
- package/dist/useFixedColumns-CKZyu4PD.js +0 -161
- package/dist/useKrosoftTranslation-BTp46G94.js +0 -47
- package/dist/useLanguage-C9jI2nwn.js +0 -19
- package/dist/useMobile-DN1_OMDB.js +0 -16
- package/dist/useNotifications-zbUhCvF_.js +0 -12
- package/dist/usePage-BQm6tdJD.js +0 -84
- package/dist/useScrollFade-BA4KqJYp.js +0 -23
- package/dist/useServerTable-UvTY6L1N.js +0 -38
- package/dist/useSidebar-BJuALHqQ.js +0 -11
- package/dist/useTheme-DS6ZjdzM.js +0 -27
- package/dist/useToast-BFTk4lWz.js +0 -100
package/dist/tailwind/index.js
CHANGED
|
@@ -1,157 +1,127 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"accordion-down": {
|
|
126
|
-
from: { height: "0" },
|
|
127
|
-
to: { height: "var(--radix-accordion-content-height)" }
|
|
128
|
-
},
|
|
129
|
-
"accordion-up": {
|
|
130
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
131
|
-
to: { height: "0" }
|
|
132
|
-
},
|
|
133
|
-
progress: {
|
|
134
|
-
"0%": { transform: "translateX(-100%)" },
|
|
135
|
-
"100%": { transform: "translateX(100%)" }
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
animation: {
|
|
139
|
-
"accordion-down": "accordion-down 0.2s ease-out",
|
|
140
|
-
"accordion-up": "accordion-up 0.2s ease-out",
|
|
141
|
-
progress: "progress 1.5s ease-in-out infinite"
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
// Les composants shadcn du package utilisent `animate-in`, `fade-in-0`,
|
|
146
|
-
// `zoom-in-95`, `slide-in-from-*`… Sans ce plugin, ces classes ne sont pas
|
|
147
|
-
// générées et les overlays (dialog, popover, select, dropdown) s'affichent
|
|
148
|
-
// sans transition. Le plugin est porté par le preset pour que les projets
|
|
149
|
-
// consommateurs n'aient rien à déclarer de leur côté.
|
|
150
|
-
plugins: [r]
|
|
151
|
-
// Partial<Config> et non Config : c'est le type d'un preset (`presets: Array<Partial<Config>>`).
|
|
152
|
-
// Un preset ne déclare pas de `content` — voir krosoftContent ci-dessus.
|
|
153
|
-
};
|
|
154
|
-
export {
|
|
155
|
-
e as default,
|
|
156
|
-
o as krosoftContent
|
|
1
|
+
import e from "tailwindcss-animate";
|
|
2
|
+
//#region src/tailwind/index.ts
|
|
3
|
+
var t = ["./node_modules/@krosoft/react/dist/**/*.js"], n = {
|
|
4
|
+
darkMode: ["class", ":is([class~=\"dark\"],[class*=\"dark-\"])"],
|
|
5
|
+
theme: {
|
|
6
|
+
container: {
|
|
7
|
+
center: !0,
|
|
8
|
+
padding: "2rem",
|
|
9
|
+
screens: { "2xl": "1400px" }
|
|
10
|
+
},
|
|
11
|
+
extend: {
|
|
12
|
+
colors: {
|
|
13
|
+
border: "hsl(var(--border))",
|
|
14
|
+
input: "hsl(var(--input))",
|
|
15
|
+
ring: "hsl(var(--ring))",
|
|
16
|
+
background: "hsl(var(--background))",
|
|
17
|
+
foreground: "hsl(var(--foreground))",
|
|
18
|
+
primary: {
|
|
19
|
+
DEFAULT: "hsl(var(--primary))",
|
|
20
|
+
foreground: "hsl(var(--primary-foreground))"
|
|
21
|
+
},
|
|
22
|
+
secondary: {
|
|
23
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
24
|
+
foreground: "hsl(var(--secondary-foreground))"
|
|
25
|
+
},
|
|
26
|
+
destructive: {
|
|
27
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
28
|
+
foreground: "hsl(var(--destructive-foreground))"
|
|
29
|
+
},
|
|
30
|
+
muted: {
|
|
31
|
+
DEFAULT: "hsl(var(--muted))",
|
|
32
|
+
foreground: "hsl(var(--muted-foreground))"
|
|
33
|
+
},
|
|
34
|
+
accent: {
|
|
35
|
+
DEFAULT: "hsl(var(--accent))",
|
|
36
|
+
foreground: "hsl(var(--accent-foreground))"
|
|
37
|
+
},
|
|
38
|
+
popover: {
|
|
39
|
+
DEFAULT: "hsl(var(--popover))",
|
|
40
|
+
foreground: "hsl(var(--popover-foreground))"
|
|
41
|
+
},
|
|
42
|
+
card: {
|
|
43
|
+
DEFAULT: "hsl(var(--card))",
|
|
44
|
+
foreground: "hsl(var(--card-foreground))"
|
|
45
|
+
},
|
|
46
|
+
success: {
|
|
47
|
+
DEFAULT: "hsl(var(--k-success))",
|
|
48
|
+
foreground: "hsl(var(--k-success-foreground))"
|
|
49
|
+
},
|
|
50
|
+
warning: {
|
|
51
|
+
DEFAULT: "hsl(var(--k-warning))",
|
|
52
|
+
foreground: "hsl(var(--k-warning-foreground))"
|
|
53
|
+
},
|
|
54
|
+
info: {
|
|
55
|
+
DEFAULT: "hsl(var(--k-info))",
|
|
56
|
+
foreground: "hsl(var(--k-info-foreground))"
|
|
57
|
+
},
|
|
58
|
+
chart: {
|
|
59
|
+
1: "hsl(var(--k-chart-1))",
|
|
60
|
+
2: "hsl(var(--k-chart-2))",
|
|
61
|
+
3: "hsl(var(--k-chart-3))",
|
|
62
|
+
4: "hsl(var(--k-chart-4))",
|
|
63
|
+
5: "hsl(var(--k-chart-5))"
|
|
64
|
+
},
|
|
65
|
+
sidebar: {
|
|
66
|
+
DEFAULT: "hsl(var(--sidebar-background))",
|
|
67
|
+
foreground: "hsl(var(--sidebar-foreground))",
|
|
68
|
+
primary: {
|
|
69
|
+
DEFAULT: "hsl(var(--sidebar-primary))",
|
|
70
|
+
foreground: "hsl(var(--sidebar-primary-foreground))"
|
|
71
|
+
},
|
|
72
|
+
accent: {
|
|
73
|
+
DEFAULT: "hsl(var(--sidebar-accent))",
|
|
74
|
+
foreground: "hsl(var(--sidebar-accent-foreground))"
|
|
75
|
+
},
|
|
76
|
+
border: "hsl(var(--sidebar-border))",
|
|
77
|
+
ring: "hsl(var(--sidebar-ring))",
|
|
78
|
+
muted: "hsl(var(--k-sidebar-muted))"
|
|
79
|
+
},
|
|
80
|
+
topbar: {
|
|
81
|
+
DEFAULT: "hsl(var(--k-topbar-background))",
|
|
82
|
+
foreground: "hsl(var(--k-topbar-foreground))",
|
|
83
|
+
primary: {
|
|
84
|
+
DEFAULT: "hsl(var(--k-topbar-primary))",
|
|
85
|
+
foreground: "hsl(var(--k-topbar-primary-foreground))"
|
|
86
|
+
},
|
|
87
|
+
accent: {
|
|
88
|
+
DEFAULT: "hsl(var(--k-topbar-accent))",
|
|
89
|
+
foreground: "hsl(var(--k-topbar-accent-foreground))"
|
|
90
|
+
},
|
|
91
|
+
border: "hsl(var(--k-topbar-border))",
|
|
92
|
+
ring: "hsl(var(--k-topbar-ring))",
|
|
93
|
+
muted: "hsl(var(--k-topbar-muted))"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
borderRadius: {
|
|
97
|
+
control: "var(--k-radius-control, var(--radius))",
|
|
98
|
+
surface: "var(--k-radius-surface, var(--radius))",
|
|
99
|
+
lg: "var(--radius)",
|
|
100
|
+
md: "max(0px, calc(var(--radius) - 2px))",
|
|
101
|
+
sm: "max(0px, calc(var(--radius) - 4px))"
|
|
102
|
+
},
|
|
103
|
+
keyframes: {
|
|
104
|
+
"accordion-down": {
|
|
105
|
+
from: { height: "0" },
|
|
106
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
107
|
+
},
|
|
108
|
+
"accordion-up": {
|
|
109
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
110
|
+
to: { height: "0" }
|
|
111
|
+
},
|
|
112
|
+
progress: {
|
|
113
|
+
"0%": { transform: "translateX(-100%)" },
|
|
114
|
+
"100%": { transform: "translateX(100%)" }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
animation: {
|
|
118
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
119
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
120
|
+
progress: "progress 1.5s ease-in-out infinite"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
plugins: [e]
|
|
157
125
|
};
|
|
126
|
+
//#endregion
|
|
127
|
+
export { n as default, t as krosoftContent };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { i as e, n as t, r as n, s as r, t as i } from "./tooltip-B2dzyfs9.js";
|
|
2
|
+
import { t as a } from "./i18n-Dw99bRmg.js";
|
|
3
|
+
import { i as o, l as s, n as c, t as l, u } from "./select-ULiTPOr5.js";
|
|
4
|
+
import { t as d } from "./useTheme-DVfcJ-Qd.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/core/theme/ThemeSelector.tsx
|
|
8
|
+
function m({ themeOptions: m, variant: h = "select", id: g }) {
|
|
9
|
+
let { t: _ } = a(), { theme: v, handleThemeChange: y, currentThemeOption: b, nextThemeOption: x, cycleTheme: S } = d(m);
|
|
10
|
+
if (h === "mini") {
|
|
11
|
+
let a = b?.icon;
|
|
12
|
+
return /* @__PURE__ */ f(n, { children: /* @__PURE__ */ p(i, { children: [/* @__PURE__ */ f(e, {
|
|
13
|
+
asChild: !0,
|
|
14
|
+
children: /* @__PURE__ */ p(r, {
|
|
15
|
+
id: g,
|
|
16
|
+
variant: "ghost",
|
|
17
|
+
size: "icon",
|
|
18
|
+
onClick: S,
|
|
19
|
+
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
20
|
+
children: [a && /* @__PURE__ */ f(a, { className: "size-4" }), /* @__PURE__ */ p("span", {
|
|
21
|
+
className: "sr-only",
|
|
22
|
+
children: ["Thème actuel : ", b?.label]
|
|
23
|
+
})]
|
|
24
|
+
})
|
|
25
|
+
}), /* @__PURE__ */ p(t, {
|
|
26
|
+
side: "bottom",
|
|
27
|
+
align: "center",
|
|
28
|
+
children: ["Passer en ", x?.label]
|
|
29
|
+
})] }) });
|
|
30
|
+
}
|
|
31
|
+
return /* @__PURE__ */ p("div", {
|
|
32
|
+
className: "space-y-2",
|
|
33
|
+
children: [/* @__PURE__ */ p(l, {
|
|
34
|
+
value: v,
|
|
35
|
+
onValueChange: y,
|
|
36
|
+
children: [/* @__PURE__ */ f(s, {
|
|
37
|
+
id: g,
|
|
38
|
+
className: "w-full",
|
|
39
|
+
children: /* @__PURE__ */ f(u, { placeholder: _("select.theme") })
|
|
40
|
+
}), /* @__PURE__ */ f(c, { children: m.map((e) => {
|
|
41
|
+
let t = e.icon;
|
|
42
|
+
return /* @__PURE__ */ f(o, {
|
|
43
|
+
value: e.value,
|
|
44
|
+
children: /* @__PURE__ */ p("div", {
|
|
45
|
+
className: "flex items-center gap-2",
|
|
46
|
+
children: [/* @__PURE__ */ f(t, { className: "size-4" }), e.label]
|
|
47
|
+
})
|
|
48
|
+
}, e.value);
|
|
49
|
+
}) })]
|
|
50
|
+
}), b?.message && /* @__PURE__ */ f("p", {
|
|
51
|
+
className: "text-sm text-muted-foreground",
|
|
52
|
+
children: b.message
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { m as t };
|
package/dist/tokens/index.js
CHANGED
|
@@ -1,47 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"--k-radius-surface": "1.25rem",
|
|
37
|
-
"--k-radius-control-dense": "0.5rem",
|
|
38
|
-
"--k-radius-surface-dense": "0.75rem"
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
a as applyTokenPreset,
|
|
43
|
-
u as applyTokens,
|
|
44
|
-
c as clearTokens,
|
|
45
|
-
m as radiusPresets,
|
|
46
|
-
d as tokensToStyle
|
|
1
|
+
//#region src/tokens/apply.ts
|
|
2
|
+
var e = (e) => e || (typeof document > "u" ? null : document.documentElement), t = (t, n) => {
|
|
3
|
+
let r = e(n);
|
|
4
|
+
if (r) for (let [e, n] of Object.entries(t)) r.style.setProperty(e, n);
|
|
5
|
+
}, n = (t, n) => {
|
|
6
|
+
let r = e(n);
|
|
7
|
+
if (r) for (let e of Object.keys(t)) r.style.removeProperty(e);
|
|
8
|
+
}, r = (r, i, a) => {
|
|
9
|
+
let o = e(a);
|
|
10
|
+
if (o) {
|
|
11
|
+
for (let e of Object.values(r)) n(e, o);
|
|
12
|
+
t(r[i], o);
|
|
13
|
+
}
|
|
14
|
+
}, i = (e) => e, a = {
|
|
15
|
+
square: {
|
|
16
|
+
"--radius": "0rem",
|
|
17
|
+
"--k-radius-control": "0rem",
|
|
18
|
+
"--k-radius-surface": "0rem",
|
|
19
|
+
"--k-radius-control-dense": "0rem",
|
|
20
|
+
"--k-radius-surface-dense": "0rem"
|
|
21
|
+
},
|
|
22
|
+
soft: {
|
|
23
|
+
"--radius": "0.5rem",
|
|
24
|
+
"--k-radius-control": "0.5rem",
|
|
25
|
+
"--k-radius-surface": "0.75rem",
|
|
26
|
+
"--k-radius-control-dense": "0.5rem",
|
|
27
|
+
"--k-radius-surface-dense": "0.75rem"
|
|
28
|
+
},
|
|
29
|
+
round: {
|
|
30
|
+
"--radius": "0.75rem",
|
|
31
|
+
"--k-radius-control": "9999px",
|
|
32
|
+
"--k-radius-surface": "1.25rem",
|
|
33
|
+
"--k-radius-control-dense": "0.5rem",
|
|
34
|
+
"--k-radius-surface-dense": "0.75rem"
|
|
35
|
+
}
|
|
47
36
|
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { r as applyTokenPreset, t as applyTokens, n as clearTokens, a as radiusPresets, i as tokensToStyle };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { cva as r } from "class-variance-authority";
|
|
5
|
+
import { Slot as i } from "@radix-ui/react-slot";
|
|
6
|
+
import * as a from "@radix-ui/react-tooltip";
|
|
7
|
+
//#region src/components/ui/button.tsx
|
|
8
|
+
var o = r("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-control 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", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
13
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
14
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
16
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
17
|
+
styled: "bg-gradient-to-r from-slate-900 to-purple-700 hover:from-slate-800 hover:to-purple-600 text-white shadow-lg shadow-purple-500/25 px-6 h-12"
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "h-10 px-4 py-2",
|
|
21
|
+
sm: "h-9 rounded-control px-3",
|
|
22
|
+
lg: "h-11 rounded-control px-8",
|
|
23
|
+
icon: "h-10 w-10"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "default"
|
|
29
|
+
}
|
|
30
|
+
}), s = t.forwardRef(({ className: t, variant: r, size: a, asChild: s = !1, ...c }, l) => /* @__PURE__ */ n(s ? i : "button", {
|
|
31
|
+
className: e(o({
|
|
32
|
+
variant: r,
|
|
33
|
+
size: a,
|
|
34
|
+
className: t
|
|
35
|
+
})),
|
|
36
|
+
ref: l,
|
|
37
|
+
...c
|
|
38
|
+
}));
|
|
39
|
+
s.displayName = "Button";
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/components/ui/control.ts
|
|
42
|
+
var c = "h-10 rounded-control border border-input bg-background px-3 py-2 text-sm ring-offset-background disabled:cursor-not-allowed disabled:opacity-50", l = e(c, "flex items-center justify-between focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&>span]:line-clamp-1"), u = a.Provider, d = a.Root, f = a.Trigger, p = t.forwardRef(({ className: t, sideOffset: r = 4, ...i }, o) => /* @__PURE__ */ n(a.Content, {
|
|
43
|
+
ref: o,
|
|
44
|
+
sideOffset: r,
|
|
45
|
+
className: e("z-50 overflow-hidden rounded-surface border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", t),
|
|
46
|
+
...i
|
|
47
|
+
}));
|
|
48
|
+
p.displayName = a.Content.displayName;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { c as a, o as c, f as i, p as n, l as o, u as r, s, d as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./forms/index.js";
|