@splenddev/kreativ-ui 0.3.18 → 0.3.19
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/{chunk-3SX7MFC4.js → chunk-3QVHDUG2.js} +158 -37
- package/dist/chunk-3QVHDUG2.js.map +1 -0
- package/dist/{chunk-4KNQFZZT.cjs → chunk-5GGCRNXA.cjs} +2 -10
- package/dist/chunk-5GGCRNXA.cjs.map +1 -0
- package/dist/chunk-6MO73J54.js +12 -0
- package/dist/chunk-6MO73J54.js.map +1 -0
- package/dist/{chunk-HHSP6YJA.cjs → chunk-C2JEK4T5.cjs} +29 -7
- package/dist/{chunk-HHSP6YJA.cjs.map → chunk-C2JEK4T5.cjs.map} +1 -1
- package/dist/{chunk-TGYV2M2L.js → chunk-C4PCJAAL.js} +3 -10
- package/dist/chunk-C4PCJAAL.js.map +1 -0
- package/dist/{chunk-L3YGJX72.cjs → chunk-KJ2CWKTU.cjs} +274 -153
- package/dist/chunk-KJ2CWKTU.cjs.map +1 -0
- package/dist/chunk-POSRGA6G.cjs +14 -0
- package/dist/chunk-POSRGA6G.cjs.map +1 -0
- package/dist/{chunk-6GN2Y3X4.js → chunk-X7373GJO.js} +29 -7
- package/dist/{chunk-6GN2Y3X4.js.map → chunk-X7373GJO.js.map} +1 -1
- package/dist/cn-Cbsgs0XP.d.cts +5 -0
- package/dist/cn-Cbsgs0XP.d.ts +5 -0
- package/dist/components.cjs +91 -90
- package/dist/components.d.cts +10 -2
- package/dist/components.d.ts +10 -2
- package/dist/components.js +3 -2
- package/dist/core.cjs +22 -17
- package/dist/core.d.cts +2 -0
- package/dist/core.d.ts +2 -0
- package/dist/core.js +2 -1
- package/dist/index.cjs +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/utils.cjs +40 -39
- package/dist/utils.d.cts +3 -4
- package/dist/utils.d.ts +3 -4
- package/dist/utils.js +2 -1
- package/package.json +1 -1
- package/dist/chunk-3SX7MFC4.js.map +0 -1
- package/dist/chunk-4KNQFZZT.cjs.map +0 -1
- package/dist/chunk-L3YGJX72.cjs.map +0 -1
- package/dist/chunk-TGYV2M2L.js.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk52AQLHWM_cjs = require('./chunk-52AQLHWM.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk5GGCRNXA_cjs = require('./chunk-5GGCRNXA.cjs');
|
|
5
|
+
var chunkPOSRGA6G_cjs = require('./chunk-POSRGA6G.cjs');
|
|
5
6
|
var chunkMAUKS2DZ_cjs = require('./chunk-MAUKS2DZ.cjs');
|
|
6
7
|
var React10 = require('react');
|
|
7
8
|
var reactDom = require('react-dom');
|
|
@@ -46,7 +47,7 @@ function readProcessEnv() {
|
|
|
46
47
|
chunkMAUKS2DZ_cjs.__name(readProcessEnv, "readProcessEnv");
|
|
47
48
|
function readImportMetaEnv() {
|
|
48
49
|
try {
|
|
49
|
-
return typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
50
|
+
return typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-KJ2CWKTU.cjs', document.baseURI).href)) }) !== "undefined" ? undefined?.MODE : void 0;
|
|
50
51
|
} catch {
|
|
51
52
|
return void 0;
|
|
52
53
|
}
|
|
@@ -118,7 +119,7 @@ function resolveRecipe(recipe, props = {}, className, recipeProps) {
|
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
if (className) classes.push(className);
|
|
121
|
-
return
|
|
122
|
+
return chunkPOSRGA6G_cjs.cn(...classes);
|
|
122
123
|
}
|
|
123
124
|
chunkMAUKS2DZ_cjs.__name(resolveRecipe, "resolveRecipe");
|
|
124
125
|
|
|
@@ -443,7 +444,7 @@ var ToastIcon = utils.createComponent({
|
|
|
443
444
|
{
|
|
444
445
|
ref,
|
|
445
446
|
"aria-hidden": "true",
|
|
446
|
-
className:
|
|
447
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
447
448
|
resolveRecipe(theme.recipes.ToastIcon, { status }),
|
|
448
449
|
className
|
|
449
450
|
),
|
|
@@ -462,7 +463,7 @@ var ToastContent = utils.createComponent({
|
|
|
462
463
|
"div",
|
|
463
464
|
{
|
|
464
465
|
ref,
|
|
465
|
-
className:
|
|
466
|
+
className: chunkPOSRGA6G_cjs.cn(resolveRecipe(theme.recipes.ToastContent, {}), className),
|
|
466
467
|
...rest
|
|
467
468
|
}
|
|
468
469
|
);
|
|
@@ -477,7 +478,7 @@ var ToastTitle = utils.createComponent({
|
|
|
477
478
|
"div",
|
|
478
479
|
{
|
|
479
480
|
ref,
|
|
480
|
-
className:
|
|
481
|
+
className: chunkPOSRGA6G_cjs.cn(resolveRecipe(theme.recipes.ToastTitle, {}), className),
|
|
481
482
|
...rest
|
|
482
483
|
}
|
|
483
484
|
);
|
|
@@ -492,7 +493,7 @@ var ToastDescription = utils.createComponent({
|
|
|
492
493
|
"div",
|
|
493
494
|
{
|
|
494
495
|
ref,
|
|
495
|
-
className:
|
|
496
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
496
497
|
resolveRecipe(theme.recipes.ToastDescription, {}),
|
|
497
498
|
className
|
|
498
499
|
),
|
|
@@ -513,7 +514,7 @@ var ToastAction = utils.createComponent(
|
|
|
513
514
|
{
|
|
514
515
|
ref,
|
|
515
516
|
type: "button",
|
|
516
|
-
className:
|
|
517
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
517
518
|
resolveRecipe(theme.recipes.ToastAction, {}),
|
|
518
519
|
className
|
|
519
520
|
),
|
|
@@ -539,7 +540,7 @@ var ToastClose = utils.createComponent({
|
|
|
539
540
|
ref,
|
|
540
541
|
type: "button",
|
|
541
542
|
"aria-label": "Dismiss notification",
|
|
542
|
-
className:
|
|
543
|
+
className: chunkPOSRGA6G_cjs.cn(resolveRecipe(theme.recipes.ToastClose, {}), className),
|
|
543
544
|
...rest,
|
|
544
545
|
onClick: (e) => {
|
|
545
546
|
onClick?.(e);
|
|
@@ -702,7 +703,7 @@ function ToastItem({
|
|
|
702
703
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
703
704
|
"div",
|
|
704
705
|
{
|
|
705
|
-
className:
|
|
706
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
706
707
|
"h-full origin-left rtl:origin-right",
|
|
707
708
|
progressColors[entry.status]
|
|
708
709
|
),
|
|
@@ -768,7 +769,7 @@ var ToastViewport = utils.createComponent({
|
|
|
768
769
|
"aria-label": label,
|
|
769
770
|
tabIndex: -1,
|
|
770
771
|
"data-kui-toast-viewport": "",
|
|
771
|
-
className:
|
|
772
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
772
773
|
resolveRecipe(theme.recipes.ToastViewport, { placement }),
|
|
773
774
|
className
|
|
774
775
|
),
|
|
@@ -2042,13 +2043,62 @@ var Menu = {
|
|
|
2042
2043
|
SubTrigger: MenuSubTrigger,
|
|
2043
2044
|
SubContent: MenuSubContent
|
|
2044
2045
|
};
|
|
2045
|
-
var CarouselContext = React10__namespace.createContext(
|
|
2046
|
+
var CarouselContext = React10__namespace.createContext(
|
|
2047
|
+
null
|
|
2048
|
+
);
|
|
2046
2049
|
function useCarouselContext(part) {
|
|
2047
2050
|
const ctx = React10__namespace.useContext(CarouselContext);
|
|
2048
2051
|
if (!ctx) throw new Error(`${part} must be rendered inside <Carousel.Root>`);
|
|
2049
2052
|
return ctx;
|
|
2050
2053
|
}
|
|
2051
2054
|
chunkMAUKS2DZ_cjs.__name(useCarouselContext, "useCarouselContext");
|
|
2055
|
+
var MIN_VISIBLE = 0.05;
|
|
2056
|
+
var EPS = 1e-6;
|
|
2057
|
+
function resolveWindow(visibility, slidesPerViewProp) {
|
|
2058
|
+
if (visibility && visibility.length > 0) {
|
|
2059
|
+
const v = visibility.map(
|
|
2060
|
+
(x) => Number.isFinite(x) ? Math.min(Math.max(x, MIN_VISIBLE), 1) : 1
|
|
2061
|
+
);
|
|
2062
|
+
const n = v.length;
|
|
2063
|
+
const lead = n > 1 && v[0] < 1 - EPS ? v[0] : 0;
|
|
2064
|
+
const trail = n > 1 && v[n - 1] < 1 - EPS ? v[n - 1] : 0;
|
|
2065
|
+
const interior = v.slice(lead > 0 ? 1 : 0, n - (trail > 0 ? 1 : 0));
|
|
2066
|
+
if (process.env.NODE_ENV !== "production" && interior.some((x) => x < 1 - EPS)) {
|
|
2067
|
+
console.warn(
|
|
2068
|
+
"<Carousel.Root slideVisibility>: only the first and last entries may be below 1. Interior entries are treated as 1."
|
|
2069
|
+
);
|
|
2070
|
+
}
|
|
2071
|
+
if (interior.length >= 1) {
|
|
2072
|
+
return {
|
|
2073
|
+
slidesPerView: interior.length,
|
|
2074
|
+
window: {
|
|
2075
|
+
span: interior.length + lead + trail,
|
|
2076
|
+
gapCount: n - 1,
|
|
2077
|
+
lead,
|
|
2078
|
+
trail,
|
|
2079
|
+
padded: true
|
|
2080
|
+
}
|
|
2081
|
+
};
|
|
2082
|
+
}
|
|
2083
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2084
|
+
console.warn(
|
|
2085
|
+
"<Carousel.Root slideVisibility> needs at least one whole slide (a 1). Falling back to slidesPerView."
|
|
2086
|
+
);
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
const spv = Number.isFinite(slidesPerViewProp) ? Math.max(1, slidesPerViewProp) : 1;
|
|
2090
|
+
return {
|
|
2091
|
+
slidesPerView: spv,
|
|
2092
|
+
window: {
|
|
2093
|
+
span: spv,
|
|
2094
|
+
gapCount: Math.ceil(spv) - 1,
|
|
2095
|
+
lead: 0,
|
|
2096
|
+
trail: 0,
|
|
2097
|
+
padded: false
|
|
2098
|
+
}
|
|
2099
|
+
};
|
|
2100
|
+
}
|
|
2101
|
+
chunkMAUKS2DZ_cjs.__name(resolveWindow, "resolveWindow");
|
|
2052
2102
|
function usePrefersReducedMotion() {
|
|
2053
2103
|
const query = "(prefers-reduced-motion: reduce)";
|
|
2054
2104
|
const [reduced, setReduced] = React10__namespace.useState(
|
|
@@ -2096,13 +2146,18 @@ var CarouselRoot = kreativCore.createComponent({
|
|
|
2096
2146
|
onBlur,
|
|
2097
2147
|
onKeyDown,
|
|
2098
2148
|
recipeProps,
|
|
2149
|
+
slideVisibility,
|
|
2099
2150
|
...rest
|
|
2100
2151
|
} = props;
|
|
2101
2152
|
const id = React10__namespace.useId();
|
|
2102
2153
|
const { theme } = kreativCore.useTheme();
|
|
2103
|
-
const
|
|
2154
|
+
const visibilityKey = slideVisibility?.join(",");
|
|
2155
|
+
const { slidesPerView, window: slideWindow } = React10__namespace.useMemo(
|
|
2156
|
+
() => resolveWindow(slideVisibility, spvProp),
|
|
2157
|
+
[visibilityKey, spvProp]
|
|
2158
|
+
);
|
|
2104
2159
|
const [count, setCount] = React10__namespace.useState(0);
|
|
2105
|
-
const maxIndex = Math.max(count - slidesPerView, 0);
|
|
2160
|
+
const maxIndex = slideWindow.padded ? Math.max(count - slidesPerView, 0) : Math.max(Math.ceil(count - slidesPerView - 1e-6), 0);
|
|
2106
2161
|
const [rawIndex, setIndex] = chunk52AQLHWM_cjs.useControllableState({
|
|
2107
2162
|
value: indexProp,
|
|
2108
2163
|
defaultValue: defaultIndex,
|
|
@@ -2189,7 +2244,8 @@ var CarouselRoot = kreativCore.createComponent({
|
|
|
2189
2244
|
canNext,
|
|
2190
2245
|
canPrevious,
|
|
2191
2246
|
indexRef,
|
|
2192
|
-
maxIndexRef
|
|
2247
|
+
maxIndexRef,
|
|
2248
|
+
window: slideWindow
|
|
2193
2249
|
}),
|
|
2194
2250
|
[
|
|
2195
2251
|
id,
|
|
@@ -2209,7 +2265,8 @@ var CarouselRoot = kreativCore.createComponent({
|
|
|
2209
2265
|
next,
|
|
2210
2266
|
previous,
|
|
2211
2267
|
canNext,
|
|
2212
|
-
canPrevious
|
|
2268
|
+
canPrevious,
|
|
2269
|
+
slideWindow
|
|
2213
2270
|
]
|
|
2214
2271
|
);
|
|
2215
2272
|
return /* @__PURE__ */ jsxRuntime.jsx(CarouselContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2287,7 +2344,7 @@ var Container = React10.forwardRef(
|
|
|
2287
2344
|
const recipeClassName = unstyled ? "" : resolveRecipe(theme.recipes.Container, { maxWidth });
|
|
2288
2345
|
const responsiveStyles = {};
|
|
2289
2346
|
if (padding !== void 0) {
|
|
2290
|
-
const { base, responsive } =
|
|
2347
|
+
const { base, responsive } = chunk5GGCRNXA_cjs.resolveResponsiveValue(padding);
|
|
2291
2348
|
if (base !== void 0) {
|
|
2292
2349
|
responsiveStyles.base = { paddingInline: `var(--kui-spacing-${base})` };
|
|
2293
2350
|
}
|
|
@@ -2303,7 +2360,7 @@ var Container = React10.forwardRef(
|
|
|
2303
2360
|
{
|
|
2304
2361
|
ref,
|
|
2305
2362
|
"data-kui-responsive": attribute,
|
|
2306
|
-
className:
|
|
2363
|
+
className: chunkPOSRGA6G_cjs.cn(recipeClassName, centered && "mx-auto", className),
|
|
2307
2364
|
style,
|
|
2308
2365
|
...rest,
|
|
2309
2366
|
children
|
|
@@ -2352,9 +2409,9 @@ var Flex = kreativCore.createComponent({
|
|
|
2352
2409
|
[wrap, (v) => ({ flexWrap: v })],
|
|
2353
2410
|
[align, (v) => ({ alignItems: v })],
|
|
2354
2411
|
[justify, (v) => ({ justifyContent: v })],
|
|
2355
|
-
[gap, (v) => ({ gap:
|
|
2356
|
-
[gapX, (v) => ({ columnGap:
|
|
2357
|
-
[gapY, (v) => ({ rowGap:
|
|
2412
|
+
[gap, (v) => ({ gap: chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
2413
|
+
[gapX, (v) => ({ columnGap: chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
2414
|
+
[gapY, (v) => ({ rowGap: chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
2358
2415
|
[grow, (v) => ({ flexGrow: v === true ? 1 : v === false ? 0 : v })],
|
|
2359
2416
|
[shrink, (v) => ({ flexShrink: v === true ? 1 : v === false ? 0 : v })],
|
|
2360
2417
|
[basis, (v) => ({ flexBasis: v })]
|
|
@@ -2372,7 +2429,7 @@ var Flex = kreativCore.createComponent({
|
|
|
2372
2429
|
{
|
|
2373
2430
|
ref,
|
|
2374
2431
|
"data-kui-responsive": attribute,
|
|
2375
|
-
className:
|
|
2432
|
+
className: chunkPOSRGA6G_cjs.cn(!unstyled && recipeClasses, className),
|
|
2376
2433
|
style,
|
|
2377
2434
|
...rest,
|
|
2378
2435
|
children
|
|
@@ -2434,7 +2491,7 @@ var GridItem = kreativCore.createComponent({
|
|
|
2434
2491
|
{
|
|
2435
2492
|
ref,
|
|
2436
2493
|
"data-kui-responsive": attribute,
|
|
2437
|
-
className:
|
|
2494
|
+
className: chunkPOSRGA6G_cjs.cn(!unstyled && className),
|
|
2438
2495
|
style,
|
|
2439
2496
|
...rest,
|
|
2440
2497
|
children
|
|
@@ -2447,7 +2504,7 @@ var RAW_LENGTH = /px|rem|em|%|vw|vh|ch|var\(/i;
|
|
|
2447
2504
|
function resolveTrackSize(value) {
|
|
2448
2505
|
if (typeof value === "number") return `${value}px`;
|
|
2449
2506
|
if (RAW_LENGTH.test(value)) return value;
|
|
2450
|
-
return
|
|
2507
|
+
return chunk5GGCRNXA_cjs.resolveSpace(value);
|
|
2451
2508
|
}
|
|
2452
2509
|
chunkMAUKS2DZ_cjs.__name(resolveTrackSize, "resolveTrackSize");
|
|
2453
2510
|
var GridRoot = kreativCore.createComponent({
|
|
@@ -2502,9 +2559,9 @@ var GridRoot = kreativCore.createComponent({
|
|
|
2502
2559
|
[templateColumns, (v) => ({ gridTemplateColumns: v })],
|
|
2503
2560
|
[templateRows, (v) => ({ gridTemplateRows: v })],
|
|
2504
2561
|
[autoFlow, (v) => ({ gridAutoFlow: v })],
|
|
2505
|
-
[gap, (v) => ({ gap:
|
|
2506
|
-
[gapX, (v) => ({ columnGap:
|
|
2507
|
-
[gapY, (v) => ({ rowGap:
|
|
2562
|
+
[gap, (v) => ({ gap: chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
2563
|
+
[gapX, (v) => ({ columnGap: chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
2564
|
+
[gapY, (v) => ({ rowGap: chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
2508
2565
|
[align, (v) => ({ alignItems: v })],
|
|
2509
2566
|
[justifyItems, (v) => ({ justifyItems: v })]
|
|
2510
2567
|
]);
|
|
@@ -2517,7 +2574,7 @@ var GridRoot = kreativCore.createComponent({
|
|
|
2517
2574
|
{
|
|
2518
2575
|
ref,
|
|
2519
2576
|
"data-kui-responsive": attribute,
|
|
2520
|
-
className:
|
|
2577
|
+
className: chunkPOSRGA6G_cjs.cn(!unstyled && recipeClasses, className),
|
|
2521
2578
|
style: { ...style, gridTemplateAreas: templateAreas },
|
|
2522
2579
|
...rest,
|
|
2523
2580
|
children
|
|
@@ -2564,7 +2621,7 @@ var CardOverlay = kreativCore.createComponent({
|
|
|
2564
2621
|
"div",
|
|
2565
2622
|
{
|
|
2566
2623
|
ref,
|
|
2567
|
-
className:
|
|
2624
|
+
className: chunkPOSRGA6G_cjs.cn(resolveRecipe(theme.recipes.CardOverlay), className),
|
|
2568
2625
|
style: {
|
|
2569
2626
|
...background !== void 0 ? gradient ? { backgroundImage: background } : { backgroundColor: background } : null,
|
|
2570
2627
|
...!gradient && opacity !== void 0 ? { opacity } : null,
|
|
@@ -2600,7 +2657,7 @@ var CardMedia = kreativCore.createComponent({
|
|
|
2600
2657
|
"div",
|
|
2601
2658
|
{
|
|
2602
2659
|
ref,
|
|
2603
|
-
className:
|
|
2660
|
+
className: chunkPOSRGA6G_cjs.cn(resolveRecipe(theme.recipes.CardMedia), className),
|
|
2604
2661
|
style: {
|
|
2605
2662
|
...aspectRatio !== void 0 ? { aspectRatio } : null,
|
|
2606
2663
|
...style
|
|
@@ -2642,7 +2699,7 @@ var CardRoot = kreativCore.createComponent({
|
|
|
2642
2699
|
"div",
|
|
2643
2700
|
{
|
|
2644
2701
|
ref,
|
|
2645
|
-
className:
|
|
2702
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
2646
2703
|
resolveRecipe(theme.recipes.Card, { variant, size: size2, fullWidth }),
|
|
2647
2704
|
className
|
|
2648
2705
|
),
|
|
@@ -2663,7 +2720,7 @@ var CardHeader = kreativCore.createComponent({
|
|
|
2663
2720
|
"div",
|
|
2664
2721
|
{
|
|
2665
2722
|
ref,
|
|
2666
|
-
className:
|
|
2723
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
2667
2724
|
resolveRecipe(theme.recipes.CardHeader, { size: size2, noPadding }),
|
|
2668
2725
|
className
|
|
2669
2726
|
),
|
|
@@ -2684,7 +2741,7 @@ var CardBody = kreativCore.createComponent({
|
|
|
2684
2741
|
"div",
|
|
2685
2742
|
{
|
|
2686
2743
|
ref,
|
|
2687
|
-
className:
|
|
2744
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
2688
2745
|
resolveRecipe(theme.recipes.CardBody, { size: size2, noPadding }),
|
|
2689
2746
|
className
|
|
2690
2747
|
),
|
|
@@ -2705,7 +2762,7 @@ var CardFooter = kreativCore.createComponent({
|
|
|
2705
2762
|
"div",
|
|
2706
2763
|
{
|
|
2707
2764
|
ref,
|
|
2708
|
-
className:
|
|
2765
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
2709
2766
|
resolveRecipe(theme.recipes.CardFooter, { size: size2, noPadding }),
|
|
2710
2767
|
className
|
|
2711
2768
|
),
|
|
@@ -2943,7 +3000,7 @@ function createStore(initial, equals = Object.is) {
|
|
|
2943
3000
|
chunkMAUKS2DZ_cjs.__name(createStore, "createStore");
|
|
2944
3001
|
|
|
2945
3002
|
// src/components/layout/ScrollArea/ScrollEngine.ts
|
|
2946
|
-
var
|
|
3003
|
+
var EPS2 = 1;
|
|
2947
3004
|
var round = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name((n) => Math.round(n * 1e4) / 1e4, "round");
|
|
2948
3005
|
var progressEqual = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name((a, b) => a.x === b.x && a.y === b.y, "progressEqual");
|
|
2949
3006
|
var STICKY_EDGES = ["top", "bottom", "left", "right"];
|
|
@@ -3042,13 +3099,13 @@ var _ScrollEngine = class _ScrollEngine {
|
|
|
3042
3099
|
const r = s.el.getBoundingClientRect();
|
|
3043
3100
|
const o = s.offsets;
|
|
3044
3101
|
const hit = [];
|
|
3045
|
-
if (o.top !== void 0 && Math.abs(r.top - (portTop + o.top)) <=
|
|
3102
|
+
if (o.top !== void 0 && Math.abs(r.top - (portTop + o.top)) <= EPS2 && el.scrollTop > EPS2)
|
|
3046
3103
|
hit.push("top");
|
|
3047
|
-
if (o.bottom !== void 0 && Math.abs(r.bottom - (portBottom - o.bottom)) <=
|
|
3104
|
+
if (o.bottom !== void 0 && Math.abs(r.bottom - (portBottom - o.bottom)) <= EPS2 && el.scrollTop < maxY - EPS2)
|
|
3048
3105
|
hit.push("bottom");
|
|
3049
|
-
if (o.left !== void 0 && Math.abs(r.left - (portLeft + o.left)) <=
|
|
3106
|
+
if (o.left !== void 0 && Math.abs(r.left - (portLeft + o.left)) <= EPS2 && el.scrollLeft > EPS2)
|
|
3050
3107
|
hit.push("left");
|
|
3051
|
-
if (o.right !== void 0 && Math.abs(r.right - (portRight - o.right)) <=
|
|
3108
|
+
if (o.right !== void 0 && Math.abs(r.right - (portRight - o.right)) <= EPS2 && el.scrollLeft < maxX - EPS2)
|
|
3052
3109
|
hit.push("right");
|
|
3053
3110
|
stickyStates.push([s, hit.join(" ")]);
|
|
3054
3111
|
});
|
|
@@ -3225,7 +3282,7 @@ var ScrollAreaScene = kreativCore.createComponent({
|
|
|
3225
3282
|
},
|
|
3226
3283
|
render: /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({ range, axis, as: Tag = "div", ...rest }, forwardedRef) => {
|
|
3227
3284
|
const ref = React10.useRef(null);
|
|
3228
|
-
void
|
|
3285
|
+
void chunk5GGCRNXA_cjs.isMotionGated(rest);
|
|
3229
3286
|
useElementScrollProgress(ref, { range, axis });
|
|
3230
3287
|
return /* @__PURE__ */ jsxRuntime.jsx(Tag, { ref: kreativCore.composeRefs(ref, forwardedRef), "data-kui-scroll-scene": true, ...rest });
|
|
3231
3288
|
}, "render")
|
|
@@ -3360,7 +3417,7 @@ var ScrollAreaRoot = kreativCore.createComponent({
|
|
|
3360
3417
|
}, forwardedRef) => {
|
|
3361
3418
|
const { theme } = kreativCore.useTheme();
|
|
3362
3419
|
const [engine] = React10.useState(() => new ScrollEngine());
|
|
3363
|
-
const motionGated =
|
|
3420
|
+
const motionGated = chunk5GGCRNXA_cjs.isMotionGated(rest);
|
|
3364
3421
|
const snapActive = motionGated ? "none" : snap;
|
|
3365
3422
|
const dragActive = motionGated ? false : dragToScroll;
|
|
3366
3423
|
const { elRef, state, handleScroll, measure } = useScrollPosition({
|
|
@@ -3460,8 +3517,8 @@ var ScrollAreaRoot = kreativCore.createComponent({
|
|
|
3460
3517
|
const responsiveDims = React10.useMemo(() => {
|
|
3461
3518
|
const styles = {};
|
|
3462
3519
|
const inlineStyle = {};
|
|
3463
|
-
if (
|
|
3464
|
-
const { base, responsive } =
|
|
3520
|
+
if (chunk5GGCRNXA_cjs.isResponsiveValue(maxHeight)) {
|
|
3521
|
+
const { base, responsive } = chunk5GGCRNXA_cjs.resolveResponsiveValue(maxHeight);
|
|
3465
3522
|
if (base !== void 0) inlineStyle.maxHeight = base;
|
|
3466
3523
|
Object.entries(responsive).forEach(([bp, val]) => {
|
|
3467
3524
|
styles[bp] = {
|
|
@@ -3472,8 +3529,8 @@ var ScrollAreaRoot = kreativCore.createComponent({
|
|
|
3472
3529
|
} else if (maxHeight !== void 0) {
|
|
3473
3530
|
inlineStyle.maxHeight = maxHeight;
|
|
3474
3531
|
}
|
|
3475
|
-
if (
|
|
3476
|
-
const { base, responsive } =
|
|
3532
|
+
if (chunk5GGCRNXA_cjs.isResponsiveValue(maxWidth)) {
|
|
3533
|
+
const { base, responsive } = chunk5GGCRNXA_cjs.resolveResponsiveValue(maxWidth);
|
|
3477
3534
|
if (base !== void 0) inlineStyle.maxWidth = base;
|
|
3478
3535
|
Object.entries(responsive).forEach(([bp, val]) => {
|
|
3479
3536
|
styles[bp] = {
|
|
@@ -3525,7 +3582,7 @@ var ScrollAreaRoot = kreativCore.createComponent({
|
|
|
3525
3582
|
"data-kui-responsive": attribute,
|
|
3526
3583
|
onScroll: handleScrollEvent,
|
|
3527
3584
|
tabIndex: resolvedTabIndex,
|
|
3528
|
-
className:
|
|
3585
|
+
className: chunkPOSRGA6G_cjs.cn(recipeClasses, className),
|
|
3529
3586
|
style: {
|
|
3530
3587
|
...responsiveDims.inlineStyle,
|
|
3531
3588
|
overscrollBehavior,
|
|
@@ -3554,7 +3611,7 @@ function resolveSize(value) {
|
|
|
3554
3611
|
if (value === "full") return "100%";
|
|
3555
3612
|
if (value === "fit") return "fit-content";
|
|
3556
3613
|
if (value === "auto") return "auto";
|
|
3557
|
-
return
|
|
3614
|
+
return chunk5GGCRNXA_cjs.resolveSpace(value);
|
|
3558
3615
|
}
|
|
3559
3616
|
chunkMAUKS2DZ_cjs.__name(resolveSize, "resolveSize");
|
|
3560
3617
|
var Box = kreativCore.createComponent({
|
|
@@ -3592,16 +3649,16 @@ var Box = kreativCore.createComponent({
|
|
|
3592
3649
|
const { theme } = kreativCore.useTheme();
|
|
3593
3650
|
const borderColor = typeof border === "boolean" ? void 0 : border;
|
|
3594
3651
|
const responsiveStyles = chunk52AQLHWM_cjs.useMergedResponsiveStyles([
|
|
3595
|
-
[p, (v) => ({ padding:
|
|
3596
|
-
[px, (v) => ({ paddingInline:
|
|
3597
|
-
[py, (v) => ({ paddingBlock:
|
|
3598
|
-
[m, (v) => ({ margin: v === "auto" ? "auto" :
|
|
3599
|
-
[mx, (v) => ({ marginInline: v === "auto" ? "auto" :
|
|
3600
|
-
[my, (v) => ({ marginBlock: v === "auto" ? "auto" :
|
|
3601
|
-
[bg, (v) => ({ background:
|
|
3602
|
-
[color, (v) => ({ color:
|
|
3603
|
-
[borderColor, (v) => ({ borderColor:
|
|
3604
|
-
[rounded, (v) => ({ borderRadius:
|
|
3652
|
+
[p, (v) => ({ padding: chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
3653
|
+
[px, (v) => ({ paddingInline: chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
3654
|
+
[py, (v) => ({ paddingBlock: chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
3655
|
+
[m, (v) => ({ margin: v === "auto" ? "auto" : chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
3656
|
+
[mx, (v) => ({ marginInline: v === "auto" ? "auto" : chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
3657
|
+
[my, (v) => ({ marginBlock: v === "auto" ? "auto" : chunk5GGCRNXA_cjs.resolveSpace(v) })],
|
|
3658
|
+
[bg, (v) => ({ background: chunk5GGCRNXA_cjs.resolveColor(v) })],
|
|
3659
|
+
[color, (v) => ({ color: chunk5GGCRNXA_cjs.resolveColor(v) })],
|
|
3660
|
+
[borderColor, (v) => ({ borderColor: chunk5GGCRNXA_cjs.resolveColor(v) })],
|
|
3661
|
+
[rounded, (v) => ({ borderRadius: chunk5GGCRNXA_cjs.resolveRadius(v) })],
|
|
3605
3662
|
[w, (v) => ({ width: resolveSize(v) })],
|
|
3606
3663
|
[h, (v) => ({ height: resolveSize(v) })]
|
|
3607
3664
|
]);
|
|
@@ -3616,7 +3673,7 @@ var Box = kreativCore.createComponent({
|
|
|
3616
3673
|
{
|
|
3617
3674
|
ref,
|
|
3618
3675
|
"data-kui-responsive": attribute,
|
|
3619
|
-
className:
|
|
3676
|
+
className: chunkPOSRGA6G_cjs.cn(!unstyled && recipeClasses, className),
|
|
3620
3677
|
style,
|
|
3621
3678
|
...rest,
|
|
3622
3679
|
children
|
|
@@ -3635,6 +3692,17 @@ function slideOffset(viewport, i) {
|
|
|
3635
3692
|
return slide.getBoundingClientRect().left - viewport.getBoundingClientRect().left + viewport.scrollLeft;
|
|
3636
3693
|
}
|
|
3637
3694
|
chunkMAUKS2DZ_cjs.__name(slideOffset, "slideOffset");
|
|
3695
|
+
function slideTarget(viewport, i, padded) {
|
|
3696
|
+
const off = slideOffset(viewport, i);
|
|
3697
|
+
if (off == null) return null;
|
|
3698
|
+
const base = padded ? slideOffset(viewport, 0) : 0;
|
|
3699
|
+
if (base == null) return null;
|
|
3700
|
+
return Math.max(
|
|
3701
|
+
0,
|
|
3702
|
+
Math.min(off - base, viewport.scrollWidth - viewport.clientWidth)
|
|
3703
|
+
);
|
|
3704
|
+
}
|
|
3705
|
+
chunkMAUKS2DZ_cjs.__name(slideTarget, "slideTarget");
|
|
3638
3706
|
var CarouselSlide = kreativCore.createComponent({
|
|
3639
3707
|
displayName: "Carousel.Slide",
|
|
3640
3708
|
__kui: { role: "layout", groupSlot: "Carousel", skeleton: "preserve" },
|
|
@@ -3647,7 +3715,11 @@ var CarouselSlide = kreativCore.createComponent({
|
|
|
3647
3715
|
);
|
|
3648
3716
|
const { slideStyle } = useCarouselSnap();
|
|
3649
3717
|
const { theme } = kreativCore.useTheme();
|
|
3650
|
-
const
|
|
3718
|
+
const { lead, trail, padded } = ctx.window;
|
|
3719
|
+
const EPS3 = 1e-6;
|
|
3720
|
+
const startU = padded ? ctx.index - lead : Math.max(Math.min(ctx.index, ctx.count - ctx.slidesPerView), 0);
|
|
3721
|
+
const endU = padded ? ctx.index + ctx.slidesPerView + trail : startU + ctx.slidesPerView;
|
|
3722
|
+
const active = index + 1 > startU + EPS3 && index < endU - EPS3;
|
|
3651
3723
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3652
3724
|
"div",
|
|
3653
3725
|
{
|
|
@@ -3662,7 +3734,7 @@ var CarouselSlide = kreativCore.createComponent({
|
|
|
3662
3734
|
"aria-hidden": !active ? true : void 0,
|
|
3663
3735
|
className: resolveRecipe(theme.recipes.CarouselSlide, {}, className),
|
|
3664
3736
|
style: {
|
|
3665
|
-
flexBasis: "calc((100% -
|
|
3737
|
+
flexBasis: "calc((100% - var(--kui-carousel-gaps) * var(--kui-carousel-gap)) / var(--kui-carousel-per-view))",
|
|
3666
3738
|
...slideStyle,
|
|
3667
3739
|
...style
|
|
3668
3740
|
},
|
|
@@ -3704,7 +3776,7 @@ var CarouselViewport = kreativCore.createComponent({
|
|
|
3704
3776
|
React10__namespace.useLayoutEffect(() => {
|
|
3705
3777
|
const vp = getScroller();
|
|
3706
3778
|
if (!vp || count === 0 || ctx.count !== count) return;
|
|
3707
|
-
const left =
|
|
3779
|
+
const left = slideTarget(vp, ctx.index, ctx.window.padded);
|
|
3708
3780
|
if (left == null) return;
|
|
3709
3781
|
const first = !mounted.current;
|
|
3710
3782
|
mounted.current = true;
|
|
@@ -3718,6 +3790,7 @@ var CarouselViewport = kreativCore.createComponent({
|
|
|
3718
3790
|
ctx.count,
|
|
3719
3791
|
count,
|
|
3720
3792
|
ctx.slidesPerView,
|
|
3793
|
+
ctx.window,
|
|
3721
3794
|
ctx.gap,
|
|
3722
3795
|
ctx.prefersReducedMotion,
|
|
3723
3796
|
getScroller
|
|
@@ -3734,10 +3807,10 @@ var CarouselViewport = kreativCore.createComponent({
|
|
|
3734
3807
|
let best = 0;
|
|
3735
3808
|
let bestDist = Infinity;
|
|
3736
3809
|
for (let i = 0; i <= ctx.maxIndexRef.current; i++) {
|
|
3737
|
-
const off =
|
|
3810
|
+
const off = slideTarget(vp, i, ctx.window.padded);
|
|
3738
3811
|
if (off == null) continue;
|
|
3739
3812
|
const d = Math.abs(off - vp.scrollLeft);
|
|
3740
|
-
if (d
|
|
3813
|
+
if (d <= bestDist) {
|
|
3741
3814
|
bestDist = d;
|
|
3742
3815
|
best = i;
|
|
3743
3816
|
}
|
|
@@ -3745,30 +3818,69 @@ var CarouselViewport = kreativCore.createComponent({
|
|
|
3745
3818
|
if (best !== ctx.indexRef.current) ctx.goTo(best);
|
|
3746
3819
|
}, 100);
|
|
3747
3820
|
}, [ctx, getScroller]);
|
|
3821
|
+
const SLIDE_W = "(100% - var(--kui-carousel-gaps) * var(--kui-carousel-gap)) / var(--kui-carousel-per-view)";
|
|
3822
|
+
const { lead, trail, span, gapCount, padded } = ctx.window;
|
|
3823
|
+
const g = toCss(ctx.gap);
|
|
3824
|
+
const snapPad = padded && lead > 0 ? {
|
|
3825
|
+
scrollPaddingLeft: `calc(${lead} * (100% - ${gapCount} * ${g}) / ${span} + ${g})`
|
|
3826
|
+
} : null;
|
|
3748
3827
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3749
3828
|
ScrollArea,
|
|
3750
3829
|
{
|
|
3751
3830
|
ref: handleRef,
|
|
3752
3831
|
direction: "horizontal",
|
|
3753
|
-
overscrollBehavior: "
|
|
3832
|
+
overscrollBehavior: "auto",
|
|
3754
3833
|
showScrollbar: "never",
|
|
3755
3834
|
onScroll,
|
|
3756
3835
|
id: ctx.viewportId,
|
|
3757
3836
|
"aria-live": ctx.autoplayRunning ? "off" : "polite",
|
|
3758
3837
|
className,
|
|
3759
|
-
style: {
|
|
3838
|
+
style: {
|
|
3839
|
+
...viewportStyle,
|
|
3840
|
+
...snapPad,
|
|
3841
|
+
overscrollBehaviorX: "contain",
|
|
3842
|
+
overscrollBehaviorY: "auto",
|
|
3843
|
+
...style
|
|
3844
|
+
},
|
|
3760
3845
|
...rest,
|
|
3761
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
3846
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3762
3847
|
"div",
|
|
3763
3848
|
{
|
|
3764
3849
|
"data-part": "track",
|
|
3765
|
-
className: resolveRecipe(theme.recipes.CarouselTrack, {}
|
|
3850
|
+
className: resolveRecipe(theme.recipes.CarouselTrack, {}),
|
|
3766
3851
|
style: {
|
|
3767
|
-
gap:
|
|
3768
|
-
"--kui-carousel-gap":
|
|
3769
|
-
"--kui-carousel-per-view":
|
|
3852
|
+
gap: g,
|
|
3853
|
+
"--kui-carousel-gap": g,
|
|
3854
|
+
"--kui-carousel-per-view": span,
|
|
3855
|
+
"--kui-carousel-gaps": gapCount,
|
|
3856
|
+
"--kui-carousel-lead": lead,
|
|
3857
|
+
"--kui-carousel-trail": trail
|
|
3770
3858
|
},
|
|
3771
|
-
children:
|
|
3859
|
+
children: [
|
|
3860
|
+
lead > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3861
|
+
"div",
|
|
3862
|
+
{
|
|
3863
|
+
"aria-hidden": "true",
|
|
3864
|
+
"data-part": "spacer",
|
|
3865
|
+
className: "shrink-0 grow-0",
|
|
3866
|
+
style: {
|
|
3867
|
+
flexBasis: `calc(var(--kui-carousel-lead) * (${SLIDE_W}))`
|
|
3868
|
+
}
|
|
3869
|
+
}
|
|
3870
|
+
),
|
|
3871
|
+
slides,
|
|
3872
|
+
trail > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3873
|
+
"div",
|
|
3874
|
+
{
|
|
3875
|
+
"aria-hidden": "true",
|
|
3876
|
+
"data-part": "spacer",
|
|
3877
|
+
className: "shrink-0 grow-0",
|
|
3878
|
+
style: {
|
|
3879
|
+
flexBasis: `calc(var(--kui-carousel-trail) * (${SLIDE_W}))`
|
|
3880
|
+
}
|
|
3881
|
+
}
|
|
3882
|
+
)
|
|
3883
|
+
]
|
|
3772
3884
|
}
|
|
3773
3885
|
)
|
|
3774
3886
|
}
|
|
@@ -3791,7 +3903,7 @@ function mergeSlotProps(slotProps, childProps) {
|
|
|
3791
3903
|
if (!(ev && ev.defaultPrevented)) slotVal(...args);
|
|
3792
3904
|
};
|
|
3793
3905
|
} else if (key === "className") {
|
|
3794
|
-
merged.className =
|
|
3906
|
+
merged.className = chunkPOSRGA6G_cjs.cn(slotVal, childVal);
|
|
3795
3907
|
} else if (key === "style") {
|
|
3796
3908
|
merged.style = { ...slotVal, ...childVal };
|
|
3797
3909
|
}
|
|
@@ -3865,23 +3977,39 @@ var CarouselNext = makeNavButton("Next", 1);
|
|
|
3865
3977
|
var CarouselIndicators = kreativCore.createComponent({
|
|
3866
3978
|
displayName: "Carousel.Indicators",
|
|
3867
3979
|
__kui: { role: "navigation", groupSlot: "Carousel", skeleton: "rect" },
|
|
3868
|
-
render: /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({ children, placement, recipeProps, className, ...rest }, ref) => {
|
|
3980
|
+
render: /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({ children, variant, placement, recipeProps, className, ...rest }, ref) => {
|
|
3869
3981
|
const ctx = useCarouselContext("Carousel.Indicators");
|
|
3870
3982
|
const { theme } = kreativCore.useTheme();
|
|
3871
3983
|
const positions = ctx.maxIndex + 1;
|
|
3872
3984
|
if (positions <= 1) return null;
|
|
3985
|
+
const wrapperClass = resolveRecipe(
|
|
3986
|
+
theme.recipes.CarouselIndicators,
|
|
3987
|
+
{ variant, placement },
|
|
3988
|
+
className,
|
|
3989
|
+
recipeProps
|
|
3990
|
+
);
|
|
3991
|
+
if (variant === "fraction" && typeof children !== "function" && children == null) {
|
|
3992
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: wrapperClass, ...rest, children: /* @__PURE__ */ jsxRuntime.jsxs("span", { "aria-hidden": "true", "data-part": "indicator-fraction", children: [
|
|
3993
|
+
ctx.index + 1,
|
|
3994
|
+
" / ",
|
|
3995
|
+
positions
|
|
3996
|
+
] }) });
|
|
3997
|
+
}
|
|
3873
3998
|
const info = { index: ctx.index, count: positions, goTo: ctx.goTo };
|
|
3874
3999
|
const body = typeof children === "function" ? children(info) : children ?? Array.from({ length: positions }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3875
4000
|
"button",
|
|
3876
4001
|
{
|
|
3877
4002
|
type: "button",
|
|
3878
|
-
className: resolveRecipe(theme.recipes.CarouselIndicator, {
|
|
4003
|
+
className: resolveRecipe(theme.recipes.CarouselIndicator, {
|
|
4004
|
+
variant
|
|
4005
|
+
}),
|
|
3879
4006
|
"data-part": "indicator",
|
|
3880
4007
|
"data-state": i === ctx.index ? "active" : "inactive",
|
|
3881
4008
|
"aria-label": `Go to slide ${i + 1}`,
|
|
3882
4009
|
"aria-current": i === ctx.index ? "true" : void 0,
|
|
3883
4010
|
"aria-controls": ctx.viewportId,
|
|
3884
|
-
onClick: () => ctx.goTo(i)
|
|
4011
|
+
onClick: () => ctx.goTo(i),
|
|
4012
|
+
children: variant === "numbers" ? i + 1 : null
|
|
3885
4013
|
},
|
|
3886
4014
|
i
|
|
3887
4015
|
));
|
|
@@ -3890,15 +4018,8 @@ var CarouselIndicators = kreativCore.createComponent({
|
|
|
3890
4018
|
{
|
|
3891
4019
|
ref,
|
|
3892
4020
|
role: "group",
|
|
3893
|
-
className: resolveRecipe(
|
|
3894
|
-
theme.recipes.CarouselIndicators,
|
|
3895
|
-
{
|
|
3896
|
-
placement,
|
|
3897
|
-
...recipeProps
|
|
3898
|
-
},
|
|
3899
|
-
className
|
|
3900
|
-
),
|
|
3901
4021
|
"aria-label": "Choose slide",
|
|
4022
|
+
className: wrapperClass,
|
|
3902
4023
|
...rest,
|
|
3903
4024
|
children: body
|
|
3904
4025
|
}
|
|
@@ -4159,7 +4280,7 @@ var ButtonGroupSeparator = React10.forwardRef(({ orientation: explicitOrientatio
|
|
|
4159
4280
|
"aria-orientation": orientation,
|
|
4160
4281
|
"data-kui-button-group-separator": "",
|
|
4161
4282
|
"data-orientation": orientation,
|
|
4162
|
-
className:
|
|
4283
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4163
4284
|
"bg-kui-border",
|
|
4164
4285
|
className
|
|
4165
4286
|
),
|
|
@@ -4174,7 +4295,7 @@ var ButtonGroupText = React10.forwardRef(({ className, children, ...rest }, ref)
|
|
|
4174
4295
|
{
|
|
4175
4296
|
ref,
|
|
4176
4297
|
"data-kui-button-group-text": "",
|
|
4177
|
-
className:
|
|
4298
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4178
4299
|
"inline-flex items-center text-sm text-muted-foreground",
|
|
4179
4300
|
className
|
|
4180
4301
|
),
|
|
@@ -4190,7 +4311,7 @@ var ButtonGroupLabel = React10.forwardRef(({ className, children, ...rest }, ref
|
|
|
4190
4311
|
{
|
|
4191
4312
|
ref,
|
|
4192
4313
|
"data-kui-button-group-label": "",
|
|
4193
|
-
className:
|
|
4314
|
+
className: chunkPOSRGA6G_cjs.cn("text-sm font-medium text-foreground", className),
|
|
4194
4315
|
...rest,
|
|
4195
4316
|
children
|
|
4196
4317
|
}
|
|
@@ -4207,7 +4328,7 @@ var ButtonGroupItem = React10.forwardRef(
|
|
|
4207
4328
|
"data-kui-button-group-item": "true",
|
|
4208
4329
|
"data-orientation": orientation,
|
|
4209
4330
|
"data-attached": attached || void 0,
|
|
4210
|
-
className:
|
|
4331
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4211
4332
|
"relative flex min-w-0 items-center",
|
|
4212
4333
|
"transition-[background-color,box-shadow]",
|
|
4213
4334
|
className
|
|
@@ -4253,7 +4374,7 @@ var ButtonGroupRoot = React10.forwardRef(
|
|
|
4253
4374
|
"data-kui-button-group": "",
|
|
4254
4375
|
"data-orientation": orientation,
|
|
4255
4376
|
"data-attached": attached || void 0,
|
|
4256
|
-
className:
|
|
4377
|
+
className: chunkPOSRGA6G_cjs.cn(recipeClasses, className),
|
|
4257
4378
|
style: {
|
|
4258
4379
|
"--kui-button-group-separator-size": separatorSizeToken
|
|
4259
4380
|
},
|
|
@@ -4306,7 +4427,7 @@ var Button = React10.forwardRef(
|
|
|
4306
4427
|
variant,
|
|
4307
4428
|
color
|
|
4308
4429
|
});
|
|
4309
|
-
const resolvedClassName =
|
|
4430
|
+
const resolvedClassName = chunkPOSRGA6G_cjs.cn(
|
|
4310
4431
|
recipeClasses,
|
|
4311
4432
|
fullWidth && "w-full",
|
|
4312
4433
|
iconOnly && "aspect-square",
|
|
@@ -4475,7 +4596,7 @@ var CycleMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4475
4596
|
color,
|
|
4476
4597
|
onClick: onCycle,
|
|
4477
4598
|
"aria-label": `Current theme: ${currentMode.label}`,
|
|
4478
|
-
className:
|
|
4599
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4479
4600
|
rounded && "rounded-full",
|
|
4480
4601
|
"py-5 overflow-hidden",
|
|
4481
4602
|
buttonProps?.className
|
|
@@ -4563,7 +4684,7 @@ var ButtonsMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4563
4684
|
rounded
|
|
4564
4685
|
]);
|
|
4565
4686
|
const effectiveRounded = rounded && !(orientation === "vertical" && !iconOnly && !unstyled);
|
|
4566
|
-
const containerClasses =
|
|
4687
|
+
const containerClasses = chunkPOSRGA6G_cjs.cn(
|
|
4567
4688
|
"inline-flex gap-1",
|
|
4568
4689
|
orientation === "vertical" && "flex-col",
|
|
4569
4690
|
!unstyled && [
|
|
@@ -4585,7 +4706,7 @@ var ButtonsMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4585
4706
|
buttonRefs.current.delete(key);
|
|
4586
4707
|
}
|
|
4587
4708
|
},
|
|
4588
|
-
className:
|
|
4709
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4589
4710
|
"relative flex",
|
|
4590
4711
|
orientation === "vertical" && "w-full",
|
|
4591
4712
|
isVerticalIconOnly && "justify-start"
|
|
@@ -4598,7 +4719,7 @@ var ButtonsMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4598
4719
|
color,
|
|
4599
4720
|
onClick: () => onSelect(key),
|
|
4600
4721
|
fullWidth: orientation === "vertical" && !iconOnly,
|
|
4601
|
-
className:
|
|
4722
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4602
4723
|
"relative z-10",
|
|
4603
4724
|
"bg-transparent hover:bg-transparent",
|
|
4604
4725
|
!effectiveRounded && "rounded-(--kui-theme-toggler-radius)",
|
|
@@ -4623,7 +4744,7 @@ var ButtonsMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4623
4744
|
ref: groupRef,
|
|
4624
4745
|
role: "group",
|
|
4625
4746
|
"aria-label": "Theme selector",
|
|
4626
|
-
className:
|
|
4747
|
+
className: chunkPOSRGA6G_cjs.cn(containerClasses, "relative"),
|
|
4627
4748
|
style: containerStyle,
|
|
4628
4749
|
"data-kui-theme-toggler": "",
|
|
4629
4750
|
"data-kui-display": "buttons",
|
|
@@ -4633,7 +4754,7 @@ var ButtonsMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4633
4754
|
framerMotion.motion.div,
|
|
4634
4755
|
{
|
|
4635
4756
|
"data-kui-theme-transition": "none",
|
|
4636
|
-
className:
|
|
4757
|
+
className: chunkPOSRGA6G_cjs.cn("pointer-events-none absolute z-0", indicatorClasses),
|
|
4637
4758
|
style: {
|
|
4638
4759
|
borderRadius: effectiveRounded ? "999px" : indicatorRadius
|
|
4639
4760
|
},
|
|
@@ -4882,7 +5003,7 @@ var Adornment = React10.forwardRef(
|
|
|
4882
5003
|
ref,
|
|
4883
5004
|
"data-kui-adornment": true,
|
|
4884
5005
|
"data-kui-adornment-position": position,
|
|
4885
|
-
className:
|
|
5006
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4886
5007
|
"flex shrink-0 items-center justify-center",
|
|
4887
5008
|
position === "end" && "gap-1.5",
|
|
4888
5009
|
className
|
|
@@ -4941,7 +5062,7 @@ function ClearButton({
|
|
|
4941
5062
|
}
|
|
4942
5063
|
chunkMAUKS2DZ_cjs.__name(ClearButton, "ClearButton");
|
|
4943
5064
|
function iconButtonClass(motion3) {
|
|
4944
|
-
return
|
|
5065
|
+
return chunkPOSRGA6G_cjs.cn(
|
|
4945
5066
|
"flex items-center justify-center text-kui-text-muted hover:text-kui-text",
|
|
4946
5067
|
"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
4947
5068
|
motion3 && "transition-colors"
|
|
@@ -5016,7 +5137,7 @@ function renderBaseInput({
|
|
|
5016
5137
|
[ref, shortcutRef]
|
|
5017
5138
|
);
|
|
5018
5139
|
const wrapperClasses = React10.useMemo(
|
|
5019
|
-
() =>
|
|
5140
|
+
() => chunkPOSRGA6G_cjs.cn(
|
|
5020
5141
|
resolveRecipe(theme.recipes.FormControl, {
|
|
5021
5142
|
variant,
|
|
5022
5143
|
state,
|
|
@@ -5047,7 +5168,7 @@ function renderBaseInput({
|
|
|
5047
5168
|
const hasLeftAdornment = Boolean(startIcon);
|
|
5048
5169
|
const hasRightAdornment = Boolean(endIcon) || Boolean(extraEndAdornment) || isLoading || clearable && hasValue && !isDisabled;
|
|
5049
5170
|
const inputClasses = React10.useMemo(
|
|
5050
|
-
() =>
|
|
5171
|
+
() => chunkPOSRGA6G_cjs.cn(
|
|
5051
5172
|
resolveRecipe(theme.recipes.Input, {
|
|
5052
5173
|
variant,
|
|
5053
5174
|
hasRightAdornment,
|
|
@@ -5305,7 +5426,7 @@ var FormFieldMessage = kreativCore.createComponent({
|
|
|
5305
5426
|
"aria-live": effectiveStatus === "error" ? "assertive" : "polite",
|
|
5306
5427
|
"data-status": effectiveStatus,
|
|
5307
5428
|
ref,
|
|
5308
|
-
className:
|
|
5429
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
5309
5430
|
"text-sm",
|
|
5310
5431
|
effectiveStatus !== "none" && statusClasses[effectiveStatus],
|
|
5311
5432
|
motionGated && "animate-none",
|
|
@@ -26206,7 +26327,7 @@ var SelectRoot = kreativCore.createComponent({
|
|
|
26206
26327
|
"div",
|
|
26207
26328
|
{
|
|
26208
26329
|
ref: kreativCore.composeRefs(rootRef, ref),
|
|
26209
|
-
className:
|
|
26330
|
+
className: chunkPOSRGA6G_cjs.cn("relative inline-block w-full", className),
|
|
26210
26331
|
children: [
|
|
26211
26332
|
children,
|
|
26212
26333
|
fieldName && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -26238,7 +26359,7 @@ var SelectTrigger = React10.forwardRef(
|
|
|
26238
26359
|
"select"
|
|
26239
26360
|
);
|
|
26240
26361
|
const state = ctx.isInvalid ? "error" : ctx.isSuccess ? "success" : "none";
|
|
26241
|
-
const wrapperClasses =
|
|
26362
|
+
const wrapperClasses = chunkPOSRGA6G_cjs.cn(
|
|
26242
26363
|
resolveRecipe(theme.recipes.FormControl, {
|
|
26243
26364
|
variant: ctx.variant,
|
|
26244
26365
|
state,
|
|
@@ -26348,7 +26469,7 @@ var SelectTrigger = React10.forwardRef(
|
|
|
26348
26469
|
lucideReact.ChevronDown,
|
|
26349
26470
|
{
|
|
26350
26471
|
size: 14,
|
|
26351
|
-
className:
|
|
26472
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26352
26473
|
"transition-transform duration-200",
|
|
26353
26474
|
ctx.open && "rotate-180"
|
|
26354
26475
|
)
|
|
@@ -26423,7 +26544,7 @@ function SelectContent({
|
|
|
26423
26544
|
"aria-labelledby": ctx.triggerId,
|
|
26424
26545
|
"data-state": ctx.open ? "open" : "closed",
|
|
26425
26546
|
"data-side": side,
|
|
26426
|
-
className:
|
|
26547
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26427
26548
|
"absolute z-50 max-h-64 w-full overflow-auto rounded-(--kui-radii-md) border border-kui-border bg-kui-surface p-1 shadow-lg kui-scrollbar space-y-0.75",
|
|
26428
26549
|
"pointer-events-none opacity-0 scale-95",
|
|
26429
26550
|
"data-[state=open]:pointer-events-auto data-[state=open]:opacity-100 data-[state=open]:scale-100",
|
|
@@ -26485,7 +26606,7 @@ function SelectItem({
|
|
|
26485
26606
|
ctx.onValueChange(value);
|
|
26486
26607
|
}
|
|
26487
26608
|
},
|
|
26488
|
-
className:
|
|
26609
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26489
26610
|
"flex cursor-pointer items-center rounded-[calc(var(--kui-radii-md)-2px)] px-2.5 py-1.5 text-sm text-kui-text transition-colors",
|
|
26490
26611
|
selected && "bg-kui-brand/10 text-kui-brand hover:bg-kui-brand/20",
|
|
26491
26612
|
active && !selected && "bg-kui-surface-sunken",
|
|
@@ -26501,13 +26622,13 @@ chunkMAUKS2DZ_cjs.__name(SelectItem, "SelectItem");
|
|
|
26501
26622
|
function SelectValue({ placeholder, className }) {
|
|
26502
26623
|
const ctx = useSelectContext("SelectValue");
|
|
26503
26624
|
const displayLabel = ctx.selectedLabel ?? placeholder ?? ctx.placeholder;
|
|
26504
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
26625
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkPOSRGA6G_cjs.cn("min-w-0 truncate", className), children: displayLabel });
|
|
26505
26626
|
}
|
|
26506
26627
|
chunkMAUKS2DZ_cjs.__name(SelectValue, "SelectValue");
|
|
26507
26628
|
function SelectGroup({ children, className }) {
|
|
26508
26629
|
const fallbackId = React10.useId();
|
|
26509
26630
|
const [labelId, setLabelId] = React10.useState(void 0);
|
|
26510
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SelectGroupContext.Provider, { value: { labelId: labelId ?? fallbackId, setHasLabel: setLabelId }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { role: "group", "aria-labelledby": labelId, className:
|
|
26631
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectGroupContext.Provider, { value: { labelId: labelId ?? fallbackId, setHasLabel: setLabelId }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { role: "group", "aria-labelledby": labelId, className: chunkPOSRGA6G_cjs.cn("py-1", className), children }) });
|
|
26511
26632
|
}
|
|
26512
26633
|
chunkMAUKS2DZ_cjs.__name(SelectGroup, "SelectGroup");
|
|
26513
26634
|
function SelectLabel({ children, className }) {
|
|
@@ -26516,7 +26637,7 @@ function SelectLabel({ children, className }) {
|
|
|
26516
26637
|
React10.useEffect(() => {
|
|
26517
26638
|
group?.setHasLabel(id);
|
|
26518
26639
|
}, [group, id]);
|
|
26519
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { id, className:
|
|
26640
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { id, className: chunkPOSRGA6G_cjs.cn("px-2.5 py-1.5 font-mono text-[11px] text-kui-text-muted", className), children });
|
|
26520
26641
|
}
|
|
26521
26642
|
chunkMAUKS2DZ_cjs.__name(SelectLabel, "SelectLabel");
|
|
26522
26643
|
function SelectImpl({ options, children, label, ...rootProps }, ref) {
|
|
@@ -26597,7 +26718,7 @@ var Switch = kreativCore.createComponent({
|
|
|
26597
26718
|
const autoId = React10.useId();
|
|
26598
26719
|
const field = useOptionalFormField();
|
|
26599
26720
|
const { theme } = kreativCore.useTheme();
|
|
26600
|
-
const motionGated =
|
|
26721
|
+
const motionGated = chunk5GGCRNXA_cjs.isMotionGated(props);
|
|
26601
26722
|
const id = externalId ?? field?.id ?? autoId;
|
|
26602
26723
|
const isDisabled = disabled || Boolean(field?.disabled);
|
|
26603
26724
|
const isRequired = required2 ?? field?.required;
|
|
@@ -26628,7 +26749,7 @@ var Switch = kreativCore.createComponent({
|
|
|
26628
26749
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26629
26750
|
"div",
|
|
26630
26751
|
{
|
|
26631
|
-
className:
|
|
26752
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26632
26753
|
"flex gap-2.5",
|
|
26633
26754
|
isDisabled && "cursor-not-allowed opacity-50",
|
|
26634
26755
|
className
|
|
@@ -26656,12 +26777,12 @@ var Switch = kreativCore.createComponent({
|
|
|
26656
26777
|
"div",
|
|
26657
26778
|
{
|
|
26658
26779
|
"aria-hidden": "true",
|
|
26659
|
-
className:
|
|
26780
|
+
className: chunkPOSRGA6G_cjs.cn(switchClasses, ""),
|
|
26660
26781
|
style: { width, height },
|
|
26661
26782
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
26662
26783
|
"div",
|
|
26663
26784
|
{
|
|
26664
|
-
className:
|
|
26785
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26665
26786
|
"absolute left-1 rounded-full bg-kui-white shadow top-1/2 -translate-y-1/2",
|
|
26666
26787
|
!motionGated && "transition-transform duration-(--kui-duration-fast)",
|
|
26667
26788
|
thumb,
|
|
@@ -26677,7 +26798,7 @@ var Switch = kreativCore.createComponent({
|
|
|
26677
26798
|
"label",
|
|
26678
26799
|
{
|
|
26679
26800
|
htmlFor: id,
|
|
26680
|
-
className:
|
|
26801
|
+
className: chunkPOSRGA6G_cjs.cn("text-kui-text", !isDisabled && "cursor-pointer"),
|
|
26681
26802
|
style: { fontSize },
|
|
26682
26803
|
children: label
|
|
26683
26804
|
}
|
|
@@ -26698,7 +26819,7 @@ var Switch = kreativCore.createComponent({
|
|
|
26698
26819
|
"label",
|
|
26699
26820
|
{
|
|
26700
26821
|
htmlFor: id,
|
|
26701
|
-
className:
|
|
26822
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26702
26823
|
"text-kui-text inline-flex items-center",
|
|
26703
26824
|
!isDisabled && "cursor-pointer"
|
|
26704
26825
|
),
|
|
@@ -26924,7 +27045,7 @@ var TextareaCore = React10.forwardRef(
|
|
|
26924
27045
|
const needsBottomSpace = showClear || showCounter;
|
|
26925
27046
|
const messageId = !field?.describedBy && (isInvalid || isSuccess) ? `${id}-message` : void 0;
|
|
26926
27047
|
const counterId = showCounter ? `${id}-counter` : void 0;
|
|
26927
|
-
const describedBy =
|
|
27048
|
+
const describedBy = chunkPOSRGA6G_cjs.cn(field?.describedBy, messageId, counterId).trim() || void 0;
|
|
26928
27049
|
const wrapperClassName = resolveRecipe(theme.recipes.FormControl, {
|
|
26929
27050
|
variant,
|
|
26930
27051
|
state,
|
|
@@ -26946,13 +27067,13 @@ var TextareaCore = React10.forwardRef(
|
|
|
26946
27067
|
const existingBottom = sizeStyle.paddingBottom;
|
|
26947
27068
|
textareaStyle.paddingBottom = existingBottom ? `calc(${existingBottom} + 1.25rem)` : "1.5rem";
|
|
26948
27069
|
}
|
|
26949
|
-
const counterClassName =
|
|
27070
|
+
const counterClassName = chunkPOSRGA6G_cjs.cn(
|
|
26950
27071
|
"pointer-events-none absolute",
|
|
26951
27072
|
"bottom-1.5 right-2.5",
|
|
26952
27073
|
"font-mono text-[11px]",
|
|
26953
27074
|
maxLengthExceeded ? "text-kui-destructive" : hasReachedMaxLength ? "text-kui-warning" : nearLimit ? "text-kui-warning" : "text-kui-text-muted"
|
|
26954
27075
|
);
|
|
26955
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
27076
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkPOSRGA6G_cjs.cn(wrapperClassName, "items-start py-2"), children: [
|
|
26956
27077
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26957
27078
|
"textarea",
|
|
26958
27079
|
{
|
|
@@ -26969,7 +27090,7 @@ var TextareaCore = React10.forwardRef(
|
|
|
26969
27090
|
"aria-required": required2,
|
|
26970
27091
|
required: required2,
|
|
26971
27092
|
style: textareaStyle,
|
|
26972
|
-
className:
|
|
27093
|
+
className: chunkPOSRGA6G_cjs.cn(textareaClasses, className),
|
|
26973
27094
|
"data-size": size2,
|
|
26974
27095
|
"data-invalid": isInvalid || void 0,
|
|
26975
27096
|
"data-success": isSuccess || void 0,
|
|
@@ -26986,7 +27107,7 @@ var TextareaCore = React10.forwardRef(
|
|
|
26986
27107
|
type: "button",
|
|
26987
27108
|
"aria-label": "Clear textarea",
|
|
26988
27109
|
onClick: handleClear,
|
|
26989
|
-
className:
|
|
27110
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26990
27111
|
"absolute right-2 top-2",
|
|
26991
27112
|
"flex items-center justify-center",
|
|
26992
27113
|
"text-kui-text-muted",
|
|
@@ -27005,7 +27126,7 @@ var TextareaCore = React10.forwardRef(
|
|
|
27005
27126
|
{
|
|
27006
27127
|
id: messageId,
|
|
27007
27128
|
role: "alert",
|
|
27008
|
-
className:
|
|
27129
|
+
className: chunkPOSRGA6G_cjs.cn("mt-1.5 px-0.5", "text-xs text-kui-destructive"),
|
|
27009
27130
|
children: internalValidation.message
|
|
27010
27131
|
}
|
|
27011
27132
|
)
|
|
@@ -27112,7 +27233,7 @@ var Checkbox = kreativCore.createComponent({
|
|
|
27112
27233
|
disabled: !!isDisabled
|
|
27113
27234
|
});
|
|
27114
27235
|
const statusTransition = chunk52AQLHWM_cjs.useStatusTransition(state);
|
|
27115
|
-
const motionGated =
|
|
27236
|
+
const motionGated = chunk5GGCRNXA_cjs.isMotionGated(props);
|
|
27116
27237
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
27117
27238
|
const describedBy = [field?.describedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
27118
27239
|
function handleChange(event) {
|
|
@@ -27139,7 +27260,7 @@ var Checkbox = kreativCore.createComponent({
|
|
|
27139
27260
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27140
27261
|
"div",
|
|
27141
27262
|
{
|
|
27142
|
-
className:
|
|
27263
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
27143
27264
|
"inline-flex items-start gap-2",
|
|
27144
27265
|
isDisabled && "cursor-not-allowed opacity-50",
|
|
27145
27266
|
className
|
|
@@ -27150,7 +27271,7 @@ var Checkbox = kreativCore.createComponent({
|
|
|
27150
27271
|
"input",
|
|
27151
27272
|
{
|
|
27152
27273
|
...props,
|
|
27153
|
-
ref:
|
|
27274
|
+
ref: chunk5GGCRNXA_cjs.composeRefs(inputRef, ref),
|
|
27154
27275
|
id,
|
|
27155
27276
|
type: "checkbox",
|
|
27156
27277
|
checked,
|
|
@@ -27160,7 +27281,7 @@ var Checkbox = kreativCore.createComponent({
|
|
|
27160
27281
|
"aria-invalid": isInvalid || void 0,
|
|
27161
27282
|
"aria-describedby": describedBy,
|
|
27162
27283
|
"data-invalid": isInvalid || void 0,
|
|
27163
|
-
className:
|
|
27284
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
27164
27285
|
"peer absolute inset-0 z-10 m-0 h-full w-full",
|
|
27165
27286
|
"cursor-pointer opacity-0",
|
|
27166
27287
|
"disabled:cursor-not-allowed"
|
|
@@ -27182,7 +27303,7 @@ var Checkbox = kreativCore.createComponent({
|
|
|
27182
27303
|
"label",
|
|
27183
27304
|
{
|
|
27184
27305
|
htmlFor: id,
|
|
27185
|
-
className:
|
|
27306
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
27186
27307
|
"flex flex-col gap-px",
|
|
27187
27308
|
!isDisabled && "cursor-pointer"
|
|
27188
27309
|
),
|
|
@@ -27914,7 +28035,7 @@ var RepeaterItem = kreativCore.createComponent({
|
|
|
27914
28035
|
const contextValue = React10__namespace.useMemo(() => ({ index }), [index]);
|
|
27915
28036
|
const { theme } = kreativCore.useTheme();
|
|
27916
28037
|
const resolvedRecipe = resolveRecipe(theme.recipes.RepeaterItem);
|
|
27917
|
-
const classes =
|
|
28038
|
+
const classes = chunkPOSRGA6G_cjs.cn(resolvedRecipe, className);
|
|
27918
28039
|
return /* @__PURE__ */ jsxRuntime.jsx(RepeaterItemContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: composedRef, className: classes, ...rest, children }) });
|
|
27919
28040
|
}, "RepeaterItem")
|
|
27920
28041
|
});
|
|
@@ -27939,7 +28060,7 @@ var RepeaterRemove = kreativCore.createComponent({
|
|
|
27939
28060
|
const { className, ...rest } = props;
|
|
27940
28061
|
const { theme } = kreativCore.useTheme();
|
|
27941
28062
|
const resolvedRecipe = resolveRecipe(theme.recipes.RepeaterRemove);
|
|
27942
|
-
const classes =
|
|
28063
|
+
const classes = chunkPOSRGA6G_cjs.cn(resolvedRecipe, className);
|
|
27943
28064
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
27944
28065
|
"button",
|
|
27945
28066
|
{
|
|
@@ -27977,7 +28098,7 @@ var RepeaterMoveUp = kreativCore.createComponent({
|
|
|
27977
28098
|
const { className, ...rest } = props;
|
|
27978
28099
|
const { theme } = kreativCore.useTheme();
|
|
27979
28100
|
const resolvedRecipe = resolveRecipe(theme.recipes.RepeaterMoveUp);
|
|
27980
|
-
const classes =
|
|
28101
|
+
const classes = chunkPOSRGA6G_cjs.cn(resolvedRecipe, className);
|
|
27981
28102
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
27982
28103
|
"button",
|
|
27983
28104
|
{
|
|
@@ -28016,7 +28137,7 @@ var RepeaterMoveDown = kreativCore.createComponent({
|
|
|
28016
28137
|
const { className, ...rest } = props;
|
|
28017
28138
|
const { theme } = kreativCore.useTheme();
|
|
28018
28139
|
const resolvedRecipe = resolveRecipe(theme.recipes.RepeaterMoveDown);
|
|
28019
|
-
const classes =
|
|
28140
|
+
const classes = chunkPOSRGA6G_cjs.cn(resolvedRecipe, className);
|
|
28020
28141
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28021
28142
|
"button",
|
|
28022
28143
|
{
|
|
@@ -28053,7 +28174,7 @@ var RepeaterAdd = kreativCore.createComponent({
|
|
|
28053
28174
|
const root = useRequiredRepeaterRootContext("Repeater.Add");
|
|
28054
28175
|
const { theme } = kreativCore.useTheme();
|
|
28055
28176
|
const resolvedRecipe = resolveRecipe(theme.recipes.RepeaterAdd);
|
|
28056
|
-
const classes =
|
|
28177
|
+
const classes = chunkPOSRGA6G_cjs.cn(resolvedRecipe, className);
|
|
28057
28178
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28058
28179
|
"button",
|
|
28059
28180
|
{
|
|
@@ -28649,7 +28770,7 @@ var FormFieldRoot = kreativCore.createComponent({
|
|
|
28649
28770
|
valuePropConvention
|
|
28650
28771
|
]
|
|
28651
28772
|
);
|
|
28652
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: kreativCore.composeRefs(fieldRef, ref), className:
|
|
28773
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: kreativCore.composeRefs(fieldRef, ref), className: chunkPOSRGA6G_cjs.cn("flex flex-col gap-2", className), children: [
|
|
28653
28774
|
children,
|
|
28654
28775
|
!hasCustomMessage && /* @__PURE__ */ jsxRuntime.jsx(FormFieldMessage, {})
|
|
28655
28776
|
] }) });
|
|
@@ -28681,7 +28802,7 @@ var FormFieldLabel = kreativCore.createComponent({
|
|
|
28681
28802
|
ref,
|
|
28682
28803
|
id: labelId,
|
|
28683
28804
|
htmlFor: id,
|
|
28684
|
-
className:
|
|
28805
|
+
className: chunkPOSRGA6G_cjs.cn("text-sm font-medium", className),
|
|
28685
28806
|
children: [
|
|
28686
28807
|
children,
|
|
28687
28808
|
required2 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -28725,7 +28846,7 @@ var FormFieldDescription = kreativCore.createComponent({
|
|
|
28725
28846
|
...props,
|
|
28726
28847
|
ref,
|
|
28727
28848
|
id: descriptionId,
|
|
28728
|
-
className:
|
|
28849
|
+
className: chunkPOSRGA6G_cjs.cn("text-sm text-kui-muted", className),
|
|
28729
28850
|
children
|
|
28730
28851
|
}
|
|
28731
28852
|
);
|
|
@@ -29124,7 +29245,7 @@ var MarkdownEditor = kreativCore.createComponent({
|
|
|
29124
29245
|
const value = valueProp ?? draft;
|
|
29125
29246
|
const maxLengthReached = typeof maxLength === "number" && value.length >= maxLength;
|
|
29126
29247
|
const state = error62 || maxLengthReached ? "error" : success2 ? "success" : warning ? "warning" : field?.status ?? "none";
|
|
29127
|
-
const editorClasses =
|
|
29248
|
+
const editorClasses = chunkPOSRGA6G_cjs.cn(
|
|
29128
29249
|
resolveRecipe(theme.recipes.MarkdownEditor, {
|
|
29129
29250
|
variant,
|
|
29130
29251
|
state,
|
|
@@ -29206,7 +29327,7 @@ var MarkdownEditor = kreativCore.createComponent({
|
|
|
29206
29327
|
"aria-controls": t === "write" ? writePanelId : previewPanelId,
|
|
29207
29328
|
onClick: () => setTab(t),
|
|
29208
29329
|
disabled: isDisabled,
|
|
29209
|
-
className:
|
|
29330
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29210
29331
|
"border-b-2 py-2.5 text-sm capitalize",
|
|
29211
29332
|
!motionGated && "transition-colors",
|
|
29212
29333
|
"disabled:pointer-events-none disabled:cursor-not-allowed",
|
|
@@ -29225,7 +29346,7 @@ var MarkdownEditor = kreativCore.createComponent({
|
|
|
29225
29346
|
onMouseDown: (event) => event.preventDefault(),
|
|
29226
29347
|
onClick: () => runAction(item.action),
|
|
29227
29348
|
disabled: isDisabled,
|
|
29228
|
-
className:
|
|
29349
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29229
29350
|
"rounded-(--kui-radii-sm) p-1.5 text-kui-text-muted hover:bg-kui-surface-raised hover:text-kui-text disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
29230
29351
|
!motionGated && "transition-colors"
|
|
29231
29352
|
),
|
|
@@ -29333,7 +29454,7 @@ function RadioGroup({
|
|
|
29333
29454
|
"aria-describedby": field?.describedBy,
|
|
29334
29455
|
"aria-required": groupRequired || void 0,
|
|
29335
29456
|
"aria-invalid": isInvalid || void 0,
|
|
29336
|
-
className:
|
|
29457
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29337
29458
|
"flex gap-3",
|
|
29338
29459
|
orientation === "horizontal" ? "flex-row flex-wrap" : "flex-col",
|
|
29339
29460
|
className
|
|
@@ -29398,7 +29519,7 @@ function Radio({
|
|
|
29398
29519
|
const checked = group.value === value;
|
|
29399
29520
|
const disabled = itemDisabled || group.disabled;
|
|
29400
29521
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
29401
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
29522
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkPOSRGA6G_cjs.cn("flex gap-2.5", disabled && "cursor-not-allowed opacity-50", className), children: [
|
|
29402
29523
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative mt-0.5 inline-flex", children: [
|
|
29403
29524
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29404
29525
|
"input",
|
|
@@ -29420,17 +29541,17 @@ function Radio({
|
|
|
29420
29541
|
"div",
|
|
29421
29542
|
{
|
|
29422
29543
|
"aria-hidden": "true",
|
|
29423
|
-
className:
|
|
29544
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29424
29545
|
radioBubbleVariants({ size: group.size, state: group.state, checked, disabled }),
|
|
29425
29546
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-kui-brand peer-focus-visible:ring-offset-1"
|
|
29426
29547
|
),
|
|
29427
|
-
children: checked && /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
29548
|
+
children: checked && /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkPOSRGA6G_cjs.cn("rounded-full bg-kui-brand", radioDotSizes[group.size]) })
|
|
29428
29549
|
}
|
|
29429
29550
|
)
|
|
29430
29551
|
] }),
|
|
29431
29552
|
(label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
29432
|
-
label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className:
|
|
29433
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { id: descriptionId, className:
|
|
29553
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: chunkPOSRGA6G_cjs.cn("text-sm text-kui-text", !disabled && "cursor-pointer", group.size === "sm" && "text-xs"), children: label }),
|
|
29554
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { id: descriptionId, className: chunkPOSRGA6G_cjs.cn("text-xs text-kui-text-muted", group.size === "sm" && "text-[10px]"), children: description })
|
|
29434
29555
|
] })
|
|
29435
29556
|
] });
|
|
29436
29557
|
}
|
|
@@ -29591,7 +29712,7 @@ function ComboboxItem({
|
|
|
29591
29712
|
onMouseEnter: () => !disabled && ctx.setActiveValue(value),
|
|
29592
29713
|
onMouseDown: (e) => e.preventDefault(),
|
|
29593
29714
|
onClick: () => !disabled && ctx.onValueChange(value),
|
|
29594
|
-
className:
|
|
29715
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29595
29716
|
"flex cursor-pointer items-center rounded-[calc(var(--kui-radii-md)-2px)] px-2.5 py-1.5 text-sm text-kui-text transition-colors",
|
|
29596
29717
|
active && "bg-kui-brand/15 text-kui-brand",
|
|
29597
29718
|
selected && !active && "bg-kui-surface-raised",
|
|
@@ -29618,7 +29739,7 @@ function ComboboxContent({
|
|
|
29618
29739
|
role: "listbox",
|
|
29619
29740
|
"aria-labelledby": ctx.triggerId,
|
|
29620
29741
|
"data-side": side,
|
|
29621
|
-
className:
|
|
29742
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29622
29743
|
"animate-kui-scale-in absolute z-50 max-h-64 w-full overflow-auto rounded-(--kui-radii-md) border border-kui-border bg-kui-surface p-1 shadow-lg",
|
|
29623
29744
|
side === "bottom" ? "top-full mt-1" : "bottom-full mb-1",
|
|
29624
29745
|
className
|
|
@@ -29644,7 +29765,7 @@ function ComboboxLoading({
|
|
|
29644
29765
|
{
|
|
29645
29766
|
role: "status",
|
|
29646
29767
|
"aria-live": "polite",
|
|
29647
|
-
className:
|
|
29768
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29648
29769
|
"px-2 py-3 text-center text-sm text-kui-text-muted",
|
|
29649
29770
|
className
|
|
29650
29771
|
),
|
|
@@ -29950,7 +30071,7 @@ var MultiSelectTrigger = React10.forwardRef(({ className }, ref) => {
|
|
|
29950
30071
|
"div",
|
|
29951
30072
|
{
|
|
29952
30073
|
ref: ctx.triggerRef,
|
|
29953
|
-
className:
|
|
30074
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29954
30075
|
inputWrapperVariants({
|
|
29955
30076
|
variant: ctx.variant,
|
|
29956
30077
|
state,
|
|
@@ -29987,7 +30108,7 @@ var MultiSelectTrigger = React10.forwardRef(({ className }, ref) => {
|
|
|
29987
30108
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29988
30109
|
"span",
|
|
29989
30110
|
{
|
|
29990
|
-
className:
|
|
30111
|
+
className: chunkPOSRGA6G_cjs.cn(chipSizeVariants({}), "bg-kui-brand/15 text-kui-brand"),
|
|
29991
30112
|
children: [
|
|
29992
30113
|
meta3?.label ?? v,
|
|
29993
30114
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -30017,7 +30138,7 @@ var MultiSelectTrigger = React10.forwardRef(({ className }, ref) => {
|
|
|
30017
30138
|
overflow > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30018
30139
|
"span",
|
|
30019
30140
|
{
|
|
30020
|
-
className:
|
|
30141
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
30021
30142
|
"text-kui-text-muted",
|
|
30022
30143
|
ctx.size === "sm" ? "text-[10px]" : ctx.size === "md" ? "text-xs" : "text-sm"
|
|
30023
30144
|
),
|
|
@@ -30068,7 +30189,7 @@ function MultiSelectContent({
|
|
|
30068
30189
|
"aria-labelledby": ctx.triggerId,
|
|
30069
30190
|
"data-state": ctx.open ? "open" : "closed",
|
|
30070
30191
|
"data-side": side,
|
|
30071
|
-
className:
|
|
30192
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
30072
30193
|
"animate-kui-scale-in absolute z-50 max-h-64 w-full overflow-auto rounded-[var(--kui-radii-md)] border border-kui-border bg-kui-surface p-1 shadow-lg",
|
|
30073
30194
|
side === "bottom" ? "top-full mt-1" : "bottom-full mb-1",
|
|
30074
30195
|
className
|
|
@@ -30123,7 +30244,7 @@ function MultiSelectItem({
|
|
|
30123
30244
|
"aria-disabled": disabled || void 0,
|
|
30124
30245
|
onMouseEnter: () => !disabled && ctx.setActiveValue(value),
|
|
30125
30246
|
onClick: () => !disabled && ctx.toggleValue(value),
|
|
30126
|
-
className:
|
|
30247
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
30127
30248
|
"flex cursor-pointer items-center justify-between rounded-[calc(var(--kui-radii-md)-2px)] px-2.5 py-1.5 text-sm text-kui-text transition-colors",
|
|
30128
30249
|
active && "bg-kui-brand/15 text-kui-brand",
|
|
30129
30250
|
disabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
@@ -30310,7 +30431,7 @@ var Text = React10.forwardRef(
|
|
|
30310
30431
|
Tag,
|
|
30311
30432
|
{
|
|
30312
30433
|
ref,
|
|
30313
|
-
className:
|
|
30434
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
30314
30435
|
"kui-text",
|
|
30315
30436
|
weight && `font-${weight}`,
|
|
30316
30437
|
truncate && "truncate",
|
|
@@ -30454,5 +30575,5 @@ exports.useOptionalButtonGroupItemContext = useOptionalButtonGroupItemContext;
|
|
|
30454
30575
|
exports.useOverlayRoot = useOverlayRoot;
|
|
30455
30576
|
exports.useScrollProgress = useScrollProgress;
|
|
30456
30577
|
exports.useToasts = useToasts;
|
|
30457
|
-
//# sourceMappingURL=chunk-
|
|
30458
|
-
//# sourceMappingURL=chunk-
|
|
30578
|
+
//# sourceMappingURL=chunk-KJ2CWKTU.cjs.map
|
|
30579
|
+
//# sourceMappingURL=chunk-KJ2CWKTU.cjs.map
|