@splenddev/kreativ-ui 0.3.18 → 0.3.20
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-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-JCJNV2P2.cjs} +279 -157
- package/dist/chunk-JCJNV2P2.cjs.map +1 -0
- package/dist/{chunk-3SX7MFC4.js → chunk-P63AGDBG.js} +163 -41
- package/dist/chunk-P63AGDBG.js.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-JCJNV2P2.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
|
}
|
|
@@ -3823,6 +3935,7 @@ function makeNavButton(name, dir) {
|
|
|
3823
3935
|
className,
|
|
3824
3936
|
recipeProps,
|
|
3825
3937
|
variant,
|
|
3938
|
+
placement,
|
|
3826
3939
|
...rest
|
|
3827
3940
|
}, ref) => {
|
|
3828
3941
|
const ctx = useCarouselContext(`Carousel.${name}`);
|
|
@@ -3832,11 +3945,11 @@ function makeNavButton(name, dir) {
|
|
|
3832
3945
|
const placementClass = resolveRecipe(
|
|
3833
3946
|
theme.recipes.CarouselControl,
|
|
3834
3947
|
{
|
|
3835
|
-
|
|
3836
|
-
side: dir < 0 ? "previous" : "next"
|
|
3837
|
-
...recipeProps
|
|
3948
|
+
placement,
|
|
3949
|
+
side: dir < 0 ? "previous" : "next"
|
|
3838
3950
|
},
|
|
3839
|
-
className
|
|
3951
|
+
className,
|
|
3952
|
+
recipeProps
|
|
3840
3953
|
);
|
|
3841
3954
|
const slotProps = {
|
|
3842
3955
|
"aria-label": `${name} slide`,
|
|
@@ -3865,23 +3978,39 @@ var CarouselNext = makeNavButton("Next", 1);
|
|
|
3865
3978
|
var CarouselIndicators = kreativCore.createComponent({
|
|
3866
3979
|
displayName: "Carousel.Indicators",
|
|
3867
3980
|
__kui: { role: "navigation", groupSlot: "Carousel", skeleton: "rect" },
|
|
3868
|
-
render: /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({ children, placement, recipeProps, className, ...rest }, ref) => {
|
|
3981
|
+
render: /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({ children, variant, placement, recipeProps, className, ...rest }, ref) => {
|
|
3869
3982
|
const ctx = useCarouselContext("Carousel.Indicators");
|
|
3870
3983
|
const { theme } = kreativCore.useTheme();
|
|
3871
3984
|
const positions = ctx.maxIndex + 1;
|
|
3872
3985
|
if (positions <= 1) return null;
|
|
3986
|
+
const wrapperClass = resolveRecipe(
|
|
3987
|
+
theme.recipes.CarouselIndicators,
|
|
3988
|
+
{ variant, placement },
|
|
3989
|
+
className,
|
|
3990
|
+
recipeProps
|
|
3991
|
+
);
|
|
3992
|
+
if (variant === "fraction" && typeof children !== "function" && children == null) {
|
|
3993
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: wrapperClass, ...rest, children: /* @__PURE__ */ jsxRuntime.jsxs("span", { "aria-hidden": "true", "data-part": "indicator-fraction", children: [
|
|
3994
|
+
ctx.index + 1,
|
|
3995
|
+
" / ",
|
|
3996
|
+
positions
|
|
3997
|
+
] }) });
|
|
3998
|
+
}
|
|
3873
3999
|
const info = { index: ctx.index, count: positions, goTo: ctx.goTo };
|
|
3874
4000
|
const body = typeof children === "function" ? children(info) : children ?? Array.from({ length: positions }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3875
4001
|
"button",
|
|
3876
4002
|
{
|
|
3877
4003
|
type: "button",
|
|
3878
|
-
className: resolveRecipe(theme.recipes.CarouselIndicator, {
|
|
4004
|
+
className: resolveRecipe(theme.recipes.CarouselIndicator, {
|
|
4005
|
+
variant
|
|
4006
|
+
}),
|
|
3879
4007
|
"data-part": "indicator",
|
|
3880
4008
|
"data-state": i === ctx.index ? "active" : "inactive",
|
|
3881
4009
|
"aria-label": `Go to slide ${i + 1}`,
|
|
3882
4010
|
"aria-current": i === ctx.index ? "true" : void 0,
|
|
3883
4011
|
"aria-controls": ctx.viewportId,
|
|
3884
|
-
onClick: () => ctx.goTo(i)
|
|
4012
|
+
onClick: () => ctx.goTo(i),
|
|
4013
|
+
children: variant === "numbers" ? i + 1 : null
|
|
3885
4014
|
},
|
|
3886
4015
|
i
|
|
3887
4016
|
));
|
|
@@ -3890,15 +4019,8 @@ var CarouselIndicators = kreativCore.createComponent({
|
|
|
3890
4019
|
{
|
|
3891
4020
|
ref,
|
|
3892
4021
|
role: "group",
|
|
3893
|
-
className: resolveRecipe(
|
|
3894
|
-
theme.recipes.CarouselIndicators,
|
|
3895
|
-
{
|
|
3896
|
-
placement,
|
|
3897
|
-
...recipeProps
|
|
3898
|
-
},
|
|
3899
|
-
className
|
|
3900
|
-
),
|
|
3901
4022
|
"aria-label": "Choose slide",
|
|
4023
|
+
className: wrapperClass,
|
|
3902
4024
|
...rest,
|
|
3903
4025
|
children: body
|
|
3904
4026
|
}
|
|
@@ -4159,7 +4281,7 @@ var ButtonGroupSeparator = React10.forwardRef(({ orientation: explicitOrientatio
|
|
|
4159
4281
|
"aria-orientation": orientation,
|
|
4160
4282
|
"data-kui-button-group-separator": "",
|
|
4161
4283
|
"data-orientation": orientation,
|
|
4162
|
-
className:
|
|
4284
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4163
4285
|
"bg-kui-border",
|
|
4164
4286
|
className
|
|
4165
4287
|
),
|
|
@@ -4174,7 +4296,7 @@ var ButtonGroupText = React10.forwardRef(({ className, children, ...rest }, ref)
|
|
|
4174
4296
|
{
|
|
4175
4297
|
ref,
|
|
4176
4298
|
"data-kui-button-group-text": "",
|
|
4177
|
-
className:
|
|
4299
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4178
4300
|
"inline-flex items-center text-sm text-muted-foreground",
|
|
4179
4301
|
className
|
|
4180
4302
|
),
|
|
@@ -4190,7 +4312,7 @@ var ButtonGroupLabel = React10.forwardRef(({ className, children, ...rest }, ref
|
|
|
4190
4312
|
{
|
|
4191
4313
|
ref,
|
|
4192
4314
|
"data-kui-button-group-label": "",
|
|
4193
|
-
className:
|
|
4315
|
+
className: chunkPOSRGA6G_cjs.cn("text-sm font-medium text-foreground", className),
|
|
4194
4316
|
...rest,
|
|
4195
4317
|
children
|
|
4196
4318
|
}
|
|
@@ -4207,7 +4329,7 @@ var ButtonGroupItem = React10.forwardRef(
|
|
|
4207
4329
|
"data-kui-button-group-item": "true",
|
|
4208
4330
|
"data-orientation": orientation,
|
|
4209
4331
|
"data-attached": attached || void 0,
|
|
4210
|
-
className:
|
|
4332
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4211
4333
|
"relative flex min-w-0 items-center",
|
|
4212
4334
|
"transition-[background-color,box-shadow]",
|
|
4213
4335
|
className
|
|
@@ -4253,7 +4375,7 @@ var ButtonGroupRoot = React10.forwardRef(
|
|
|
4253
4375
|
"data-kui-button-group": "",
|
|
4254
4376
|
"data-orientation": orientation,
|
|
4255
4377
|
"data-attached": attached || void 0,
|
|
4256
|
-
className:
|
|
4378
|
+
className: chunkPOSRGA6G_cjs.cn(recipeClasses, className),
|
|
4257
4379
|
style: {
|
|
4258
4380
|
"--kui-button-group-separator-size": separatorSizeToken
|
|
4259
4381
|
},
|
|
@@ -4306,7 +4428,7 @@ var Button = React10.forwardRef(
|
|
|
4306
4428
|
variant,
|
|
4307
4429
|
color
|
|
4308
4430
|
});
|
|
4309
|
-
const resolvedClassName =
|
|
4431
|
+
const resolvedClassName = chunkPOSRGA6G_cjs.cn(
|
|
4310
4432
|
recipeClasses,
|
|
4311
4433
|
fullWidth && "w-full",
|
|
4312
4434
|
iconOnly && "aspect-square",
|
|
@@ -4475,7 +4597,7 @@ var CycleMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4475
4597
|
color,
|
|
4476
4598
|
onClick: onCycle,
|
|
4477
4599
|
"aria-label": `Current theme: ${currentMode.label}`,
|
|
4478
|
-
className:
|
|
4600
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4479
4601
|
rounded && "rounded-full",
|
|
4480
4602
|
"py-5 overflow-hidden",
|
|
4481
4603
|
buttonProps?.className
|
|
@@ -4563,7 +4685,7 @@ var ButtonsMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4563
4685
|
rounded
|
|
4564
4686
|
]);
|
|
4565
4687
|
const effectiveRounded = rounded && !(orientation === "vertical" && !iconOnly && !unstyled);
|
|
4566
|
-
const containerClasses =
|
|
4688
|
+
const containerClasses = chunkPOSRGA6G_cjs.cn(
|
|
4567
4689
|
"inline-flex gap-1",
|
|
4568
4690
|
orientation === "vertical" && "flex-col",
|
|
4569
4691
|
!unstyled && [
|
|
@@ -4585,7 +4707,7 @@ var ButtonsMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4585
4707
|
buttonRefs.current.delete(key);
|
|
4586
4708
|
}
|
|
4587
4709
|
},
|
|
4588
|
-
className:
|
|
4710
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4589
4711
|
"relative flex",
|
|
4590
4712
|
orientation === "vertical" && "w-full",
|
|
4591
4713
|
isVerticalIconOnly && "justify-start"
|
|
@@ -4598,7 +4720,7 @@ var ButtonsMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4598
4720
|
color,
|
|
4599
4721
|
onClick: () => onSelect(key),
|
|
4600
4722
|
fullWidth: orientation === "vertical" && !iconOnly,
|
|
4601
|
-
className:
|
|
4723
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4602
4724
|
"relative z-10",
|
|
4603
4725
|
"bg-transparent hover:bg-transparent",
|
|
4604
4726
|
!effectiveRounded && "rounded-(--kui-theme-toggler-radius)",
|
|
@@ -4623,7 +4745,7 @@ var ButtonsMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4623
4745
|
ref: groupRef,
|
|
4624
4746
|
role: "group",
|
|
4625
4747
|
"aria-label": "Theme selector",
|
|
4626
|
-
className:
|
|
4748
|
+
className: chunkPOSRGA6G_cjs.cn(containerClasses, "relative"),
|
|
4627
4749
|
style: containerStyle,
|
|
4628
4750
|
"data-kui-theme-toggler": "",
|
|
4629
4751
|
"data-kui-display": "buttons",
|
|
@@ -4633,7 +4755,7 @@ var ButtonsMode = /* @__PURE__ */ chunkMAUKS2DZ_cjs.__name(({
|
|
|
4633
4755
|
framerMotion.motion.div,
|
|
4634
4756
|
{
|
|
4635
4757
|
"data-kui-theme-transition": "none",
|
|
4636
|
-
className:
|
|
4758
|
+
className: chunkPOSRGA6G_cjs.cn("pointer-events-none absolute z-0", indicatorClasses),
|
|
4637
4759
|
style: {
|
|
4638
4760
|
borderRadius: effectiveRounded ? "999px" : indicatorRadius
|
|
4639
4761
|
},
|
|
@@ -4882,7 +5004,7 @@ var Adornment = React10.forwardRef(
|
|
|
4882
5004
|
ref,
|
|
4883
5005
|
"data-kui-adornment": true,
|
|
4884
5006
|
"data-kui-adornment-position": position,
|
|
4885
|
-
className:
|
|
5007
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
4886
5008
|
"flex shrink-0 items-center justify-center",
|
|
4887
5009
|
position === "end" && "gap-1.5",
|
|
4888
5010
|
className
|
|
@@ -4941,7 +5063,7 @@ function ClearButton({
|
|
|
4941
5063
|
}
|
|
4942
5064
|
chunkMAUKS2DZ_cjs.__name(ClearButton, "ClearButton");
|
|
4943
5065
|
function iconButtonClass(motion3) {
|
|
4944
|
-
return
|
|
5066
|
+
return chunkPOSRGA6G_cjs.cn(
|
|
4945
5067
|
"flex items-center justify-center text-kui-text-muted hover:text-kui-text",
|
|
4946
5068
|
"focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
4947
5069
|
motion3 && "transition-colors"
|
|
@@ -5016,7 +5138,7 @@ function renderBaseInput({
|
|
|
5016
5138
|
[ref, shortcutRef]
|
|
5017
5139
|
);
|
|
5018
5140
|
const wrapperClasses = React10.useMemo(
|
|
5019
|
-
() =>
|
|
5141
|
+
() => chunkPOSRGA6G_cjs.cn(
|
|
5020
5142
|
resolveRecipe(theme.recipes.FormControl, {
|
|
5021
5143
|
variant,
|
|
5022
5144
|
state,
|
|
@@ -5047,7 +5169,7 @@ function renderBaseInput({
|
|
|
5047
5169
|
const hasLeftAdornment = Boolean(startIcon);
|
|
5048
5170
|
const hasRightAdornment = Boolean(endIcon) || Boolean(extraEndAdornment) || isLoading || clearable && hasValue && !isDisabled;
|
|
5049
5171
|
const inputClasses = React10.useMemo(
|
|
5050
|
-
() =>
|
|
5172
|
+
() => chunkPOSRGA6G_cjs.cn(
|
|
5051
5173
|
resolveRecipe(theme.recipes.Input, {
|
|
5052
5174
|
variant,
|
|
5053
5175
|
hasRightAdornment,
|
|
@@ -5305,7 +5427,7 @@ var FormFieldMessage = kreativCore.createComponent({
|
|
|
5305
5427
|
"aria-live": effectiveStatus === "error" ? "assertive" : "polite",
|
|
5306
5428
|
"data-status": effectiveStatus,
|
|
5307
5429
|
ref,
|
|
5308
|
-
className:
|
|
5430
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
5309
5431
|
"text-sm",
|
|
5310
5432
|
effectiveStatus !== "none" && statusClasses[effectiveStatus],
|
|
5311
5433
|
motionGated && "animate-none",
|
|
@@ -26206,7 +26328,7 @@ var SelectRoot = kreativCore.createComponent({
|
|
|
26206
26328
|
"div",
|
|
26207
26329
|
{
|
|
26208
26330
|
ref: kreativCore.composeRefs(rootRef, ref),
|
|
26209
|
-
className:
|
|
26331
|
+
className: chunkPOSRGA6G_cjs.cn("relative inline-block w-full", className),
|
|
26210
26332
|
children: [
|
|
26211
26333
|
children,
|
|
26212
26334
|
fieldName && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -26238,7 +26360,7 @@ var SelectTrigger = React10.forwardRef(
|
|
|
26238
26360
|
"select"
|
|
26239
26361
|
);
|
|
26240
26362
|
const state = ctx.isInvalid ? "error" : ctx.isSuccess ? "success" : "none";
|
|
26241
|
-
const wrapperClasses =
|
|
26363
|
+
const wrapperClasses = chunkPOSRGA6G_cjs.cn(
|
|
26242
26364
|
resolveRecipe(theme.recipes.FormControl, {
|
|
26243
26365
|
variant: ctx.variant,
|
|
26244
26366
|
state,
|
|
@@ -26348,7 +26470,7 @@ var SelectTrigger = React10.forwardRef(
|
|
|
26348
26470
|
lucideReact.ChevronDown,
|
|
26349
26471
|
{
|
|
26350
26472
|
size: 14,
|
|
26351
|
-
className:
|
|
26473
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26352
26474
|
"transition-transform duration-200",
|
|
26353
26475
|
ctx.open && "rotate-180"
|
|
26354
26476
|
)
|
|
@@ -26423,7 +26545,7 @@ function SelectContent({
|
|
|
26423
26545
|
"aria-labelledby": ctx.triggerId,
|
|
26424
26546
|
"data-state": ctx.open ? "open" : "closed",
|
|
26425
26547
|
"data-side": side,
|
|
26426
|
-
className:
|
|
26548
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26427
26549
|
"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
26550
|
"pointer-events-none opacity-0 scale-95",
|
|
26429
26551
|
"data-[state=open]:pointer-events-auto data-[state=open]:opacity-100 data-[state=open]:scale-100",
|
|
@@ -26485,7 +26607,7 @@ function SelectItem({
|
|
|
26485
26607
|
ctx.onValueChange(value);
|
|
26486
26608
|
}
|
|
26487
26609
|
},
|
|
26488
|
-
className:
|
|
26610
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26489
26611
|
"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
26612
|
selected && "bg-kui-brand/10 text-kui-brand hover:bg-kui-brand/20",
|
|
26491
26613
|
active && !selected && "bg-kui-surface-sunken",
|
|
@@ -26501,13 +26623,13 @@ chunkMAUKS2DZ_cjs.__name(SelectItem, "SelectItem");
|
|
|
26501
26623
|
function SelectValue({ placeholder, className }) {
|
|
26502
26624
|
const ctx = useSelectContext("SelectValue");
|
|
26503
26625
|
const displayLabel = ctx.selectedLabel ?? placeholder ?? ctx.placeholder;
|
|
26504
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
26626
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkPOSRGA6G_cjs.cn("min-w-0 truncate", className), children: displayLabel });
|
|
26505
26627
|
}
|
|
26506
26628
|
chunkMAUKS2DZ_cjs.__name(SelectValue, "SelectValue");
|
|
26507
26629
|
function SelectGroup({ children, className }) {
|
|
26508
26630
|
const fallbackId = React10.useId();
|
|
26509
26631
|
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:
|
|
26632
|
+
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
26633
|
}
|
|
26512
26634
|
chunkMAUKS2DZ_cjs.__name(SelectGroup, "SelectGroup");
|
|
26513
26635
|
function SelectLabel({ children, className }) {
|
|
@@ -26516,7 +26638,7 @@ function SelectLabel({ children, className }) {
|
|
|
26516
26638
|
React10.useEffect(() => {
|
|
26517
26639
|
group?.setHasLabel(id);
|
|
26518
26640
|
}, [group, id]);
|
|
26519
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { id, className:
|
|
26641
|
+
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
26642
|
}
|
|
26521
26643
|
chunkMAUKS2DZ_cjs.__name(SelectLabel, "SelectLabel");
|
|
26522
26644
|
function SelectImpl({ options, children, label, ...rootProps }, ref) {
|
|
@@ -26597,7 +26719,7 @@ var Switch = kreativCore.createComponent({
|
|
|
26597
26719
|
const autoId = React10.useId();
|
|
26598
26720
|
const field = useOptionalFormField();
|
|
26599
26721
|
const { theme } = kreativCore.useTheme();
|
|
26600
|
-
const motionGated =
|
|
26722
|
+
const motionGated = chunk5GGCRNXA_cjs.isMotionGated(props);
|
|
26601
26723
|
const id = externalId ?? field?.id ?? autoId;
|
|
26602
26724
|
const isDisabled = disabled || Boolean(field?.disabled);
|
|
26603
26725
|
const isRequired = required2 ?? field?.required;
|
|
@@ -26628,7 +26750,7 @@ var Switch = kreativCore.createComponent({
|
|
|
26628
26750
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26629
26751
|
"div",
|
|
26630
26752
|
{
|
|
26631
|
-
className:
|
|
26753
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26632
26754
|
"flex gap-2.5",
|
|
26633
26755
|
isDisabled && "cursor-not-allowed opacity-50",
|
|
26634
26756
|
className
|
|
@@ -26656,12 +26778,12 @@ var Switch = kreativCore.createComponent({
|
|
|
26656
26778
|
"div",
|
|
26657
26779
|
{
|
|
26658
26780
|
"aria-hidden": "true",
|
|
26659
|
-
className:
|
|
26781
|
+
className: chunkPOSRGA6G_cjs.cn(switchClasses, ""),
|
|
26660
26782
|
style: { width, height },
|
|
26661
26783
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
26662
26784
|
"div",
|
|
26663
26785
|
{
|
|
26664
|
-
className:
|
|
26786
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26665
26787
|
"absolute left-1 rounded-full bg-kui-white shadow top-1/2 -translate-y-1/2",
|
|
26666
26788
|
!motionGated && "transition-transform duration-(--kui-duration-fast)",
|
|
26667
26789
|
thumb,
|
|
@@ -26677,7 +26799,7 @@ var Switch = kreativCore.createComponent({
|
|
|
26677
26799
|
"label",
|
|
26678
26800
|
{
|
|
26679
26801
|
htmlFor: id,
|
|
26680
|
-
className:
|
|
26802
|
+
className: chunkPOSRGA6G_cjs.cn("text-kui-text", !isDisabled && "cursor-pointer"),
|
|
26681
26803
|
style: { fontSize },
|
|
26682
26804
|
children: label
|
|
26683
26805
|
}
|
|
@@ -26698,7 +26820,7 @@ var Switch = kreativCore.createComponent({
|
|
|
26698
26820
|
"label",
|
|
26699
26821
|
{
|
|
26700
26822
|
htmlFor: id,
|
|
26701
|
-
className:
|
|
26823
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26702
26824
|
"text-kui-text inline-flex items-center",
|
|
26703
26825
|
!isDisabled && "cursor-pointer"
|
|
26704
26826
|
),
|
|
@@ -26924,7 +27046,7 @@ var TextareaCore = React10.forwardRef(
|
|
|
26924
27046
|
const needsBottomSpace = showClear || showCounter;
|
|
26925
27047
|
const messageId = !field?.describedBy && (isInvalid || isSuccess) ? `${id}-message` : void 0;
|
|
26926
27048
|
const counterId = showCounter ? `${id}-counter` : void 0;
|
|
26927
|
-
const describedBy =
|
|
27049
|
+
const describedBy = chunkPOSRGA6G_cjs.cn(field?.describedBy, messageId, counterId).trim() || void 0;
|
|
26928
27050
|
const wrapperClassName = resolveRecipe(theme.recipes.FormControl, {
|
|
26929
27051
|
variant,
|
|
26930
27052
|
state,
|
|
@@ -26946,13 +27068,13 @@ var TextareaCore = React10.forwardRef(
|
|
|
26946
27068
|
const existingBottom = sizeStyle.paddingBottom;
|
|
26947
27069
|
textareaStyle.paddingBottom = existingBottom ? `calc(${existingBottom} + 1.25rem)` : "1.5rem";
|
|
26948
27070
|
}
|
|
26949
|
-
const counterClassName =
|
|
27071
|
+
const counterClassName = chunkPOSRGA6G_cjs.cn(
|
|
26950
27072
|
"pointer-events-none absolute",
|
|
26951
27073
|
"bottom-1.5 right-2.5",
|
|
26952
27074
|
"font-mono text-[11px]",
|
|
26953
27075
|
maxLengthExceeded ? "text-kui-destructive" : hasReachedMaxLength ? "text-kui-warning" : nearLimit ? "text-kui-warning" : "text-kui-text-muted"
|
|
26954
27076
|
);
|
|
26955
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
27077
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkPOSRGA6G_cjs.cn(wrapperClassName, "items-start py-2"), children: [
|
|
26956
27078
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26957
27079
|
"textarea",
|
|
26958
27080
|
{
|
|
@@ -26969,7 +27091,7 @@ var TextareaCore = React10.forwardRef(
|
|
|
26969
27091
|
"aria-required": required2,
|
|
26970
27092
|
required: required2,
|
|
26971
27093
|
style: textareaStyle,
|
|
26972
|
-
className:
|
|
27094
|
+
className: chunkPOSRGA6G_cjs.cn(textareaClasses, className),
|
|
26973
27095
|
"data-size": size2,
|
|
26974
27096
|
"data-invalid": isInvalid || void 0,
|
|
26975
27097
|
"data-success": isSuccess || void 0,
|
|
@@ -26986,7 +27108,7 @@ var TextareaCore = React10.forwardRef(
|
|
|
26986
27108
|
type: "button",
|
|
26987
27109
|
"aria-label": "Clear textarea",
|
|
26988
27110
|
onClick: handleClear,
|
|
26989
|
-
className:
|
|
27111
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
26990
27112
|
"absolute right-2 top-2",
|
|
26991
27113
|
"flex items-center justify-center",
|
|
26992
27114
|
"text-kui-text-muted",
|
|
@@ -27005,7 +27127,7 @@ var TextareaCore = React10.forwardRef(
|
|
|
27005
27127
|
{
|
|
27006
27128
|
id: messageId,
|
|
27007
27129
|
role: "alert",
|
|
27008
|
-
className:
|
|
27130
|
+
className: chunkPOSRGA6G_cjs.cn("mt-1.5 px-0.5", "text-xs text-kui-destructive"),
|
|
27009
27131
|
children: internalValidation.message
|
|
27010
27132
|
}
|
|
27011
27133
|
)
|
|
@@ -27112,7 +27234,7 @@ var Checkbox = kreativCore.createComponent({
|
|
|
27112
27234
|
disabled: !!isDisabled
|
|
27113
27235
|
});
|
|
27114
27236
|
const statusTransition = chunk52AQLHWM_cjs.useStatusTransition(state);
|
|
27115
|
-
const motionGated =
|
|
27237
|
+
const motionGated = chunk5GGCRNXA_cjs.isMotionGated(props);
|
|
27116
27238
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
27117
27239
|
const describedBy = [field?.describedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
27118
27240
|
function handleChange(event) {
|
|
@@ -27139,7 +27261,7 @@ var Checkbox = kreativCore.createComponent({
|
|
|
27139
27261
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27140
27262
|
"div",
|
|
27141
27263
|
{
|
|
27142
|
-
className:
|
|
27264
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
27143
27265
|
"inline-flex items-start gap-2",
|
|
27144
27266
|
isDisabled && "cursor-not-allowed opacity-50",
|
|
27145
27267
|
className
|
|
@@ -27150,7 +27272,7 @@ var Checkbox = kreativCore.createComponent({
|
|
|
27150
27272
|
"input",
|
|
27151
27273
|
{
|
|
27152
27274
|
...props,
|
|
27153
|
-
ref:
|
|
27275
|
+
ref: chunk5GGCRNXA_cjs.composeRefs(inputRef, ref),
|
|
27154
27276
|
id,
|
|
27155
27277
|
type: "checkbox",
|
|
27156
27278
|
checked,
|
|
@@ -27160,7 +27282,7 @@ var Checkbox = kreativCore.createComponent({
|
|
|
27160
27282
|
"aria-invalid": isInvalid || void 0,
|
|
27161
27283
|
"aria-describedby": describedBy,
|
|
27162
27284
|
"data-invalid": isInvalid || void 0,
|
|
27163
|
-
className:
|
|
27285
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
27164
27286
|
"peer absolute inset-0 z-10 m-0 h-full w-full",
|
|
27165
27287
|
"cursor-pointer opacity-0",
|
|
27166
27288
|
"disabled:cursor-not-allowed"
|
|
@@ -27182,7 +27304,7 @@ var Checkbox = kreativCore.createComponent({
|
|
|
27182
27304
|
"label",
|
|
27183
27305
|
{
|
|
27184
27306
|
htmlFor: id,
|
|
27185
|
-
className:
|
|
27307
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
27186
27308
|
"flex flex-col gap-px",
|
|
27187
27309
|
!isDisabled && "cursor-pointer"
|
|
27188
27310
|
),
|
|
@@ -27914,7 +28036,7 @@ var RepeaterItem = kreativCore.createComponent({
|
|
|
27914
28036
|
const contextValue = React10__namespace.useMemo(() => ({ index }), [index]);
|
|
27915
28037
|
const { theme } = kreativCore.useTheme();
|
|
27916
28038
|
const resolvedRecipe = resolveRecipe(theme.recipes.RepeaterItem);
|
|
27917
|
-
const classes =
|
|
28039
|
+
const classes = chunkPOSRGA6G_cjs.cn(resolvedRecipe, className);
|
|
27918
28040
|
return /* @__PURE__ */ jsxRuntime.jsx(RepeaterItemContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: composedRef, className: classes, ...rest, children }) });
|
|
27919
28041
|
}, "RepeaterItem")
|
|
27920
28042
|
});
|
|
@@ -27939,7 +28061,7 @@ var RepeaterRemove = kreativCore.createComponent({
|
|
|
27939
28061
|
const { className, ...rest } = props;
|
|
27940
28062
|
const { theme } = kreativCore.useTheme();
|
|
27941
28063
|
const resolvedRecipe = resolveRecipe(theme.recipes.RepeaterRemove);
|
|
27942
|
-
const classes =
|
|
28064
|
+
const classes = chunkPOSRGA6G_cjs.cn(resolvedRecipe, className);
|
|
27943
28065
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
27944
28066
|
"button",
|
|
27945
28067
|
{
|
|
@@ -27977,7 +28099,7 @@ var RepeaterMoveUp = kreativCore.createComponent({
|
|
|
27977
28099
|
const { className, ...rest } = props;
|
|
27978
28100
|
const { theme } = kreativCore.useTheme();
|
|
27979
28101
|
const resolvedRecipe = resolveRecipe(theme.recipes.RepeaterMoveUp);
|
|
27980
|
-
const classes =
|
|
28102
|
+
const classes = chunkPOSRGA6G_cjs.cn(resolvedRecipe, className);
|
|
27981
28103
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
27982
28104
|
"button",
|
|
27983
28105
|
{
|
|
@@ -28016,7 +28138,7 @@ var RepeaterMoveDown = kreativCore.createComponent({
|
|
|
28016
28138
|
const { className, ...rest } = props;
|
|
28017
28139
|
const { theme } = kreativCore.useTheme();
|
|
28018
28140
|
const resolvedRecipe = resolveRecipe(theme.recipes.RepeaterMoveDown);
|
|
28019
|
-
const classes =
|
|
28141
|
+
const classes = chunkPOSRGA6G_cjs.cn(resolvedRecipe, className);
|
|
28020
28142
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28021
28143
|
"button",
|
|
28022
28144
|
{
|
|
@@ -28053,7 +28175,7 @@ var RepeaterAdd = kreativCore.createComponent({
|
|
|
28053
28175
|
const root = useRequiredRepeaterRootContext("Repeater.Add");
|
|
28054
28176
|
const { theme } = kreativCore.useTheme();
|
|
28055
28177
|
const resolvedRecipe = resolveRecipe(theme.recipes.RepeaterAdd);
|
|
28056
|
-
const classes =
|
|
28178
|
+
const classes = chunkPOSRGA6G_cjs.cn(resolvedRecipe, className);
|
|
28057
28179
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28058
28180
|
"button",
|
|
28059
28181
|
{
|
|
@@ -28649,7 +28771,7 @@ var FormFieldRoot = kreativCore.createComponent({
|
|
|
28649
28771
|
valuePropConvention
|
|
28650
28772
|
]
|
|
28651
28773
|
);
|
|
28652
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: kreativCore.composeRefs(fieldRef, ref), className:
|
|
28774
|
+
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
28775
|
children,
|
|
28654
28776
|
!hasCustomMessage && /* @__PURE__ */ jsxRuntime.jsx(FormFieldMessage, {})
|
|
28655
28777
|
] }) });
|
|
@@ -28681,7 +28803,7 @@ var FormFieldLabel = kreativCore.createComponent({
|
|
|
28681
28803
|
ref,
|
|
28682
28804
|
id: labelId,
|
|
28683
28805
|
htmlFor: id,
|
|
28684
|
-
className:
|
|
28806
|
+
className: chunkPOSRGA6G_cjs.cn("text-sm font-medium", className),
|
|
28685
28807
|
children: [
|
|
28686
28808
|
children,
|
|
28687
28809
|
required2 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -28725,7 +28847,7 @@ var FormFieldDescription = kreativCore.createComponent({
|
|
|
28725
28847
|
...props,
|
|
28726
28848
|
ref,
|
|
28727
28849
|
id: descriptionId,
|
|
28728
|
-
className:
|
|
28850
|
+
className: chunkPOSRGA6G_cjs.cn("text-sm text-kui-muted", className),
|
|
28729
28851
|
children
|
|
28730
28852
|
}
|
|
28731
28853
|
);
|
|
@@ -29124,7 +29246,7 @@ var MarkdownEditor = kreativCore.createComponent({
|
|
|
29124
29246
|
const value = valueProp ?? draft;
|
|
29125
29247
|
const maxLengthReached = typeof maxLength === "number" && value.length >= maxLength;
|
|
29126
29248
|
const state = error62 || maxLengthReached ? "error" : success2 ? "success" : warning ? "warning" : field?.status ?? "none";
|
|
29127
|
-
const editorClasses =
|
|
29249
|
+
const editorClasses = chunkPOSRGA6G_cjs.cn(
|
|
29128
29250
|
resolveRecipe(theme.recipes.MarkdownEditor, {
|
|
29129
29251
|
variant,
|
|
29130
29252
|
state,
|
|
@@ -29206,7 +29328,7 @@ var MarkdownEditor = kreativCore.createComponent({
|
|
|
29206
29328
|
"aria-controls": t === "write" ? writePanelId : previewPanelId,
|
|
29207
29329
|
onClick: () => setTab(t),
|
|
29208
29330
|
disabled: isDisabled,
|
|
29209
|
-
className:
|
|
29331
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29210
29332
|
"border-b-2 py-2.5 text-sm capitalize",
|
|
29211
29333
|
!motionGated && "transition-colors",
|
|
29212
29334
|
"disabled:pointer-events-none disabled:cursor-not-allowed",
|
|
@@ -29225,7 +29347,7 @@ var MarkdownEditor = kreativCore.createComponent({
|
|
|
29225
29347
|
onMouseDown: (event) => event.preventDefault(),
|
|
29226
29348
|
onClick: () => runAction(item.action),
|
|
29227
29349
|
disabled: isDisabled,
|
|
29228
|
-
className:
|
|
29350
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29229
29351
|
"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
29352
|
!motionGated && "transition-colors"
|
|
29231
29353
|
),
|
|
@@ -29333,7 +29455,7 @@ function RadioGroup({
|
|
|
29333
29455
|
"aria-describedby": field?.describedBy,
|
|
29334
29456
|
"aria-required": groupRequired || void 0,
|
|
29335
29457
|
"aria-invalid": isInvalid || void 0,
|
|
29336
|
-
className:
|
|
29458
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29337
29459
|
"flex gap-3",
|
|
29338
29460
|
orientation === "horizontal" ? "flex-row flex-wrap" : "flex-col",
|
|
29339
29461
|
className
|
|
@@ -29398,7 +29520,7 @@ function Radio({
|
|
|
29398
29520
|
const checked = group.value === value;
|
|
29399
29521
|
const disabled = itemDisabled || group.disabled;
|
|
29400
29522
|
const descriptionId = description ? `${id}-description` : void 0;
|
|
29401
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
29523
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkPOSRGA6G_cjs.cn("flex gap-2.5", disabled && "cursor-not-allowed opacity-50", className), children: [
|
|
29402
29524
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative mt-0.5 inline-flex", children: [
|
|
29403
29525
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29404
29526
|
"input",
|
|
@@ -29420,17 +29542,17 @@ function Radio({
|
|
|
29420
29542
|
"div",
|
|
29421
29543
|
{
|
|
29422
29544
|
"aria-hidden": "true",
|
|
29423
|
-
className:
|
|
29545
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29424
29546
|
radioBubbleVariants({ size: group.size, state: group.state, checked, disabled }),
|
|
29425
29547
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-kui-brand peer-focus-visible:ring-offset-1"
|
|
29426
29548
|
),
|
|
29427
|
-
children: checked && /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
29549
|
+
children: checked && /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkPOSRGA6G_cjs.cn("rounded-full bg-kui-brand", radioDotSizes[group.size]) })
|
|
29428
29550
|
}
|
|
29429
29551
|
)
|
|
29430
29552
|
] }),
|
|
29431
29553
|
(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:
|
|
29554
|
+
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 }),
|
|
29555
|
+
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
29556
|
] })
|
|
29435
29557
|
] });
|
|
29436
29558
|
}
|
|
@@ -29591,7 +29713,7 @@ function ComboboxItem({
|
|
|
29591
29713
|
onMouseEnter: () => !disabled && ctx.setActiveValue(value),
|
|
29592
29714
|
onMouseDown: (e) => e.preventDefault(),
|
|
29593
29715
|
onClick: () => !disabled && ctx.onValueChange(value),
|
|
29594
|
-
className:
|
|
29716
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29595
29717
|
"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
29718
|
active && "bg-kui-brand/15 text-kui-brand",
|
|
29597
29719
|
selected && !active && "bg-kui-surface-raised",
|
|
@@ -29618,7 +29740,7 @@ function ComboboxContent({
|
|
|
29618
29740
|
role: "listbox",
|
|
29619
29741
|
"aria-labelledby": ctx.triggerId,
|
|
29620
29742
|
"data-side": side,
|
|
29621
|
-
className:
|
|
29743
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29622
29744
|
"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
29745
|
side === "bottom" ? "top-full mt-1" : "bottom-full mb-1",
|
|
29624
29746
|
className
|
|
@@ -29644,7 +29766,7 @@ function ComboboxLoading({
|
|
|
29644
29766
|
{
|
|
29645
29767
|
role: "status",
|
|
29646
29768
|
"aria-live": "polite",
|
|
29647
|
-
className:
|
|
29769
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29648
29770
|
"px-2 py-3 text-center text-sm text-kui-text-muted",
|
|
29649
29771
|
className
|
|
29650
29772
|
),
|
|
@@ -29950,7 +30072,7 @@ var MultiSelectTrigger = React10.forwardRef(({ className }, ref) => {
|
|
|
29950
30072
|
"div",
|
|
29951
30073
|
{
|
|
29952
30074
|
ref: ctx.triggerRef,
|
|
29953
|
-
className:
|
|
30075
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
29954
30076
|
inputWrapperVariants({
|
|
29955
30077
|
variant: ctx.variant,
|
|
29956
30078
|
state,
|
|
@@ -29987,7 +30109,7 @@ var MultiSelectTrigger = React10.forwardRef(({ className }, ref) => {
|
|
|
29987
30109
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29988
30110
|
"span",
|
|
29989
30111
|
{
|
|
29990
|
-
className:
|
|
30112
|
+
className: chunkPOSRGA6G_cjs.cn(chipSizeVariants({}), "bg-kui-brand/15 text-kui-brand"),
|
|
29991
30113
|
children: [
|
|
29992
30114
|
meta3?.label ?? v,
|
|
29993
30115
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -30017,7 +30139,7 @@ var MultiSelectTrigger = React10.forwardRef(({ className }, ref) => {
|
|
|
30017
30139
|
overflow > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30018
30140
|
"span",
|
|
30019
30141
|
{
|
|
30020
|
-
className:
|
|
30142
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
30021
30143
|
"text-kui-text-muted",
|
|
30022
30144
|
ctx.size === "sm" ? "text-[10px]" : ctx.size === "md" ? "text-xs" : "text-sm"
|
|
30023
30145
|
),
|
|
@@ -30068,7 +30190,7 @@ function MultiSelectContent({
|
|
|
30068
30190
|
"aria-labelledby": ctx.triggerId,
|
|
30069
30191
|
"data-state": ctx.open ? "open" : "closed",
|
|
30070
30192
|
"data-side": side,
|
|
30071
|
-
className:
|
|
30193
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
30072
30194
|
"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
30195
|
side === "bottom" ? "top-full mt-1" : "bottom-full mb-1",
|
|
30074
30196
|
className
|
|
@@ -30123,7 +30245,7 @@ function MultiSelectItem({
|
|
|
30123
30245
|
"aria-disabled": disabled || void 0,
|
|
30124
30246
|
onMouseEnter: () => !disabled && ctx.setActiveValue(value),
|
|
30125
30247
|
onClick: () => !disabled && ctx.toggleValue(value),
|
|
30126
|
-
className:
|
|
30248
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
30127
30249
|
"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
30250
|
active && "bg-kui-brand/15 text-kui-brand",
|
|
30129
30251
|
disabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
@@ -30310,7 +30432,7 @@ var Text = React10.forwardRef(
|
|
|
30310
30432
|
Tag,
|
|
30311
30433
|
{
|
|
30312
30434
|
ref,
|
|
30313
|
-
className:
|
|
30435
|
+
className: chunkPOSRGA6G_cjs.cn(
|
|
30314
30436
|
"kui-text",
|
|
30315
30437
|
weight && `font-${weight}`,
|
|
30316
30438
|
truncate && "truncate",
|
|
@@ -30454,5 +30576,5 @@ exports.useOptionalButtonGroupItemContext = useOptionalButtonGroupItemContext;
|
|
|
30454
30576
|
exports.useOverlayRoot = useOverlayRoot;
|
|
30455
30577
|
exports.useScrollProgress = useScrollProgress;
|
|
30456
30578
|
exports.useToasts = useToasts;
|
|
30457
|
-
//# sourceMappingURL=chunk-
|
|
30458
|
-
//# sourceMappingURL=chunk-
|
|
30579
|
+
//# sourceMappingURL=chunk-JCJNV2P2.cjs.map
|
|
30580
|
+
//# sourceMappingURL=chunk-JCJNV2P2.cjs.map
|