@moontra/moonui 3.2.0 → 3.4.0
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-VXDFZPDA.global.js +33 -0
- package/dist/{chunk-X5ULQZNC.global.js.map → chunk-VXDFZPDA.global.js.map} +1 -1
- package/dist/index.d.mts +47 -3
- package/dist/index.d.ts +47 -3
- package/dist/index.global.js +41 -19
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +216 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +208 -22
- package/dist/index.mjs.map +1 -1
- package/dist/lib/theme.global.js +30 -6
- package/dist/lib/theme.global.js.map +1 -1
- package/package.json +2 -1
- package/src/components/ui/__tests__/button-group.test.tsx +183 -0
- package/src/components/ui/__tests__/checkbox.test.tsx +16 -12
- package/src/components/ui/__tests__/color-picker.test.tsx +147 -331
- package/src/components/ui/__tests__/radio-group.test.tsx +60 -0
- package/src/components/ui/__tests__/slider.test.tsx +96 -0
- package/src/components/ui/__tests__/toggle-group.test.tsx +323 -0
- package/src/components/ui/button-group.tsx +125 -0
- package/src/components/ui/checkbox.tsx +20 -18
- package/src/components/ui/color-picker.tsx +12 -0
- package/src/components/ui/index.ts +30 -0
- package/src/components/ui/radio-group.tsx +47 -8
- package/src/components/ui/slider.tsx +56 -2
- package/src/components/ui/toggle-group.tsx +97 -0
- package/dist/chunk-X5ULQZNC.global.js +0 -33
|
@@ -125,6 +125,9 @@ export {
|
|
|
125
125
|
|
|
126
126
|
export type {
|
|
127
127
|
CheckboxProps as MoonUICheckboxProps,
|
|
128
|
+
CheckboxGroupProps as MoonUICheckboxGroupProps,
|
|
129
|
+
CheckboxLabelProps as MoonUICheckboxLabelProps,
|
|
130
|
+
CheckboxWithLabelProps as MoonUICheckboxWithLabelProps,
|
|
128
131
|
} from "./checkbox";
|
|
129
132
|
|
|
130
133
|
// Collapsible
|
|
@@ -302,6 +305,9 @@ export {
|
|
|
302
305
|
|
|
303
306
|
export type {
|
|
304
307
|
RadioGroupProps as MoonUIRadioGroupProps,
|
|
308
|
+
RadioGroupItemProps as MoonUIRadioGroupItemProps,
|
|
309
|
+
RadioLabelProps as MoonUIRadioLabelProps,
|
|
310
|
+
RadioItemWithLabelProps as MoonUIRadioItemWithLabelProps,
|
|
305
311
|
} from "./radio-group";
|
|
306
312
|
|
|
307
313
|
// RichTextEditor
|
|
@@ -356,6 +362,11 @@ export type {
|
|
|
356
362
|
// Slider
|
|
357
363
|
export { Slider as MoonUISlider } from "./slider";
|
|
358
364
|
|
|
365
|
+
export type {
|
|
366
|
+
SliderProps as MoonUISliderProps,
|
|
367
|
+
SliderBaseProps as MoonUISliderBaseProps,
|
|
368
|
+
} from "./slider";
|
|
369
|
+
|
|
359
370
|
// SwipeableCard
|
|
360
371
|
export { SwipeableCard as MoonUISwipeableCard } from "./swipeable-card";
|
|
361
372
|
|
|
@@ -445,6 +456,23 @@ export {
|
|
|
445
456
|
} from "./spinner";
|
|
446
457
|
export type { SpinnerProps as MoonUISpinnerProps } from "./spinner";
|
|
447
458
|
|
|
459
|
+
// Button Group (issue #257) — bitişik/segmentli buton grupları
|
|
460
|
+
export {
|
|
461
|
+
ButtonGroup as MoonUIButtonGroup,
|
|
462
|
+
buttonGroupVariants as moonUIButtonGroupVariants,
|
|
463
|
+
} from "./button-group";
|
|
464
|
+
export type { ButtonGroupProps as MoonUIButtonGroupProps } from "./button-group";
|
|
465
|
+
|
|
466
|
+
// Toggle Group (issue #257) — tek/çoklu seçim segmented toggle seti
|
|
467
|
+
export {
|
|
468
|
+
ToggleGroup as MoonUIToggleGroup,
|
|
469
|
+
ToggleGroupItem as MoonUIToggleGroupItem,
|
|
470
|
+
} from "./toggle-group";
|
|
471
|
+
export type {
|
|
472
|
+
ToggleGroupProps as MoonUIToggleGroupProps,
|
|
473
|
+
ToggleGroupItemProps as MoonUIToggleGroupItemProps,
|
|
474
|
+
} from "./toggle-group";
|
|
475
|
+
|
|
448
476
|
// Also export without MoonUI prefix for backward compatibility
|
|
449
477
|
export * from "./accordion";
|
|
450
478
|
export * from "./alert";
|
|
@@ -497,3 +525,5 @@ export * from "./tooltip";
|
|
|
497
525
|
export * from "./kbd";
|
|
498
526
|
export * from "./rating";
|
|
499
527
|
export * from "./spinner";
|
|
528
|
+
export * from "./button-group";
|
|
529
|
+
export * from "./toggle-group";
|
|
@@ -36,11 +36,20 @@ const radioGroupItemVariants = cva(
|
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
// NOT: `React.HTMLAttributes` kendi `defaultValue`'sunu
|
|
40
|
+
// (`string | number | readonly string[]`) taşır; radio grubu için tek bir `string`
|
|
41
|
+
// anlamlı olduğundan Omit ile daraltılır.
|
|
42
|
+
export interface RadioGroupProps
|
|
43
|
+
extends Omit<React.HTMLAttributes<HTMLDivElement>, "defaultValue"> {
|
|
40
44
|
/**
|
|
41
|
-
* Radio group value
|
|
45
|
+
* Radio group value (controlled)
|
|
42
46
|
*/
|
|
43
47
|
value?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Uncontrolled kullanımda başlangıç değeri. `value` verilmediğinde grup
|
|
50
|
+
* seçimi kendi iç state'inde tutar.
|
|
51
|
+
*/
|
|
52
|
+
defaultValue?: string;
|
|
44
53
|
/**
|
|
45
54
|
* Function to call when radio group value changes
|
|
46
55
|
*/
|
|
@@ -63,9 +72,34 @@ const RadioGroupContext = React.createContext<{
|
|
|
63
72
|
}>({});
|
|
64
73
|
|
|
65
74
|
const RadioGroup = React.forwardRef<HTMLDivElement, RadioGroupProps>(
|
|
66
|
-
({ className, value, onValueChange, disabled, name, ...props }, ref) => {
|
|
75
|
+
({ className, value, defaultValue, onValueChange, disabled, name, ...props }, ref) => {
|
|
76
|
+
// Controlled/uncontrolled ikili mod: `value` verilmişse tüketici yönetir,
|
|
77
|
+
// verilmemişse grup seçimi kendi iç state'inde tutar.
|
|
78
|
+
const [internalValue, setInternalValue] = React.useState<string | undefined>(
|
|
79
|
+
defaultValue
|
|
80
|
+
);
|
|
81
|
+
const isControlled = value !== undefined;
|
|
82
|
+
const currentValue = isControlled ? value : internalValue;
|
|
83
|
+
|
|
84
|
+
const handleValueChange = React.useCallback(
|
|
85
|
+
(next: string) => {
|
|
86
|
+
if (!isControlled) {
|
|
87
|
+
setInternalValue(next);
|
|
88
|
+
}
|
|
89
|
+
onValueChange?.(next);
|
|
90
|
+
},
|
|
91
|
+
[isControlled, onValueChange]
|
|
92
|
+
);
|
|
93
|
+
|
|
67
94
|
return (
|
|
68
|
-
<RadioGroupContext.Provider
|
|
95
|
+
<RadioGroupContext.Provider
|
|
96
|
+
value={{
|
|
97
|
+
value: currentValue,
|
|
98
|
+
onValueChange: handleValueChange,
|
|
99
|
+
disabled,
|
|
100
|
+
name,
|
|
101
|
+
}}
|
|
102
|
+
>
|
|
69
103
|
<div
|
|
70
104
|
ref={ref}
|
|
71
105
|
role="radiogroup"
|
|
@@ -131,7 +165,7 @@ const RadioGroupItem = React.forwardRef<
|
|
|
131
165
|
disabled={disabled || radioGroup.disabled}
|
|
132
166
|
name={radioGroup.name}
|
|
133
167
|
onChange={handleChange}
|
|
134
|
-
className="sr-only"
|
|
168
|
+
className="peer sr-only"
|
|
135
169
|
{...props}
|
|
136
170
|
/>
|
|
137
171
|
<label
|
|
@@ -139,7 +173,12 @@ const RadioGroupItem = React.forwardRef<
|
|
|
139
173
|
className={cn(
|
|
140
174
|
radioGroupItemVariants({ variant, size }),
|
|
141
175
|
"rounded-full",
|
|
142
|
-
|
|
176
|
+
// Gerçekte odaklanan eleman görsel olarak gizli `sr-only` input'tur.
|
|
177
|
+
// Görünür label onun KARDEŞİ olduğu için label'da `:focus-visible` hiç
|
|
178
|
+
// tetiklenmiyor, dolayısıyla klavye kullanıcısı hiçbir focus izi
|
|
179
|
+
// görmüyordu. Tailwind `peer` deseniyle (input `peer` sınıfını taşır ve
|
|
180
|
+
// DOM'da label'dan önce gelir) focus izi görünür elemana taşınır.
|
|
181
|
+
"peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-primary/50",
|
|
143
182
|
"relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",
|
|
144
183
|
disabled && "cursor-not-allowed opacity-50",
|
|
145
184
|
className
|
|
@@ -158,7 +197,7 @@ const RadioGroupItem = React.forwardRef<
|
|
|
158
197
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
159
198
|
|
|
160
199
|
// Radio Label Component
|
|
161
|
-
interface RadioLabelProps extends React.HTMLAttributes<HTMLLabelElement> {
|
|
200
|
+
export interface RadioLabelProps extends React.HTMLAttributes<HTMLLabelElement> {
|
|
162
201
|
/**
|
|
163
202
|
* HTML id for radio button
|
|
164
203
|
*/
|
|
@@ -194,7 +233,7 @@ const RadioLabel = React.forwardRef<HTMLLabelElement, RadioLabelProps>(
|
|
|
194
233
|
RadioLabel.displayName = "RadioLabel";
|
|
195
234
|
|
|
196
235
|
// Radio Item and Label combination
|
|
197
|
-
interface RadioItemWithLabelProps extends RadioGroupItemProps {
|
|
236
|
+
export interface RadioItemWithLabelProps extends RadioGroupItemProps {
|
|
198
237
|
/**
|
|
199
238
|
* Label content
|
|
200
239
|
*/
|
|
@@ -97,7 +97,7 @@ const sliderThumbVariants = cva(
|
|
|
97
97
|
)
|
|
98
98
|
|
|
99
99
|
// Custom type definition for component properties
|
|
100
|
-
type SliderBaseProps = {
|
|
100
|
+
export type SliderBaseProps = {
|
|
101
101
|
/**
|
|
102
102
|
* Track variant
|
|
103
103
|
*/
|
|
@@ -161,7 +161,7 @@ type SliderBaseProps = {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
// Merge HTML properties without defaultValue conflicts
|
|
164
|
-
type SliderProps = SliderBaseProps & Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue'>
|
|
164
|
+
export type SliderProps = SliderBaseProps & Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue'>
|
|
165
165
|
|
|
166
166
|
const Slider = React.forwardRef<
|
|
167
167
|
HTMLDivElement,
|
|
@@ -280,6 +280,59 @@ const Slider = React.forwardRef<
|
|
|
280
280
|
document.addEventListener('mouseup', handleMouseUp);
|
|
281
281
|
};
|
|
282
282
|
|
|
283
|
+
// Klavyeyle değer değiştirme (WCAG 2.1.1 Keyboard).
|
|
284
|
+
//
|
|
285
|
+
// Thumb'lar `role="slider"` + `aria-valuenow` + `tabIndex=0` taşıyıp
|
|
286
|
+
// odaklanabiliyordu, ancak hiçbir klavye handler'ı yoktu: bileşen ARIA
|
|
287
|
+
// sözleşmesinde slider olduğunu duyuruyor ama yalnızca fareyle çalışıyordu.
|
|
288
|
+
// Tuş eşlemesi Radix Slider davranışını izler.
|
|
289
|
+
const handleThumbKeyDown = (index: number) => (event: React.KeyboardEvent) => {
|
|
290
|
+
if (disabled) return;
|
|
291
|
+
|
|
292
|
+
const largeStep = step * 10;
|
|
293
|
+
const current = sliderValue[index];
|
|
294
|
+
let next: number;
|
|
295
|
+
|
|
296
|
+
switch (event.key) {
|
|
297
|
+
case "ArrowRight":
|
|
298
|
+
case "ArrowUp":
|
|
299
|
+
next = current + step;
|
|
300
|
+
break;
|
|
301
|
+
case "ArrowLeft":
|
|
302
|
+
case "ArrowDown":
|
|
303
|
+
next = current - step;
|
|
304
|
+
break;
|
|
305
|
+
case "PageUp":
|
|
306
|
+
next = current + largeStep;
|
|
307
|
+
break;
|
|
308
|
+
case "PageDown":
|
|
309
|
+
next = current - largeStep;
|
|
310
|
+
break;
|
|
311
|
+
case "Home":
|
|
312
|
+
next = min;
|
|
313
|
+
break;
|
|
314
|
+
case "End":
|
|
315
|
+
next = max;
|
|
316
|
+
break;
|
|
317
|
+
default:
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// Yalnızca yukarıdaki tuşlarda varsayılan davranışı engelle (sayfa kaydırma).
|
|
322
|
+
event.preventDefault();
|
|
323
|
+
|
|
324
|
+
// Çoklu thumb'da komşu değerleri aşma; tek thumb'da min/max sınırları geçerli.
|
|
325
|
+
const lowerBound = index > 0 ? sliderValue[index - 1] : min;
|
|
326
|
+
const upperBound =
|
|
327
|
+
index < sliderValue.length - 1 ? sliderValue[index + 1] : max;
|
|
328
|
+
const bounded = Math.max(lowerBound, Math.min(upperBound, next));
|
|
329
|
+
|
|
330
|
+
const newValues = [...sliderValue];
|
|
331
|
+
newValues[index] = bounded;
|
|
332
|
+
// handleValueChange, step hassasiyetine göre yuvarlamayı zaten uyguluyor.
|
|
333
|
+
handleValueChange(newValues);
|
|
334
|
+
};
|
|
335
|
+
|
|
283
336
|
return (
|
|
284
337
|
<div className="w-full" ref={ref} {...props}>
|
|
285
338
|
{showValueLabel && (
|
|
@@ -332,6 +385,7 @@ const Slider = React.forwardRef<
|
|
|
332
385
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
333
386
|
}}
|
|
334
387
|
onMouseDown={handleThumbMouseDown(i)}
|
|
388
|
+
onKeyDown={handleThumbKeyDown(i)}
|
|
335
389
|
aria-label={`Thumb ${i + 1}`}
|
|
336
390
|
tabIndex={disabled ? -1 : 0}
|
|
337
391
|
role="slider"
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
|
|
5
|
+
import { type VariantProps } from "class-variance-authority"
|
|
6
|
+
|
|
7
|
+
import { cn } from "../../lib/utils"
|
|
8
|
+
import { toggleVariants } from "./toggle"
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* ToggleGroup Component
|
|
12
|
+
*
|
|
13
|
+
* Tek (single) veya çoklu (multiple) seçim destekleyen segmented toggle seti.
|
|
14
|
+
* Radix UI `ToggleGroup` primitive'i üzerine kuruludur; roving-tabindex klavye
|
|
15
|
+
* navigasyonu, tek/çoklu seçim mantığı ve erişilebilirlik rolleri (single için
|
|
16
|
+
* `role="radiogroup"` + item `role="radio"`, multiple için `role="toolbar"` +
|
|
17
|
+
* item `aria-pressed`) Radix tarafından yönetilir — bu davranış yeniden yazılmaz.
|
|
18
|
+
*
|
|
19
|
+
* `variant` ve `size` değerleri bir React context (`ToggleGroupContext`) ile
|
|
20
|
+
* item'lara yayılır (shadcn deseni). Her `ToggleGroupItem`, `Toggle` bileşeniyle
|
|
21
|
+
* görsel parite için `toggleVariants`'i yeniden kullanır — aktif durum
|
|
22
|
+
* `data-[state=on]:bg-accent data-[state=on]:text-accent-foreground` ile stillenir.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
// Grup düzeyinde belirlenen variant/size'i item'lara taşıyan context (shadcn deseni).
|
|
26
|
+
// Item, önce context değerini; context tanımsızsa kendi prop'unu kullanır.
|
|
27
|
+
const ToggleGroupContext = React.createContext<
|
|
28
|
+
VariantProps<typeof toggleVariants>
|
|
29
|
+
>({
|
|
30
|
+
size: "default",
|
|
31
|
+
variant: "default",
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
// NOT: Radix `ToggleGroup.Root` prop tipi ayrımlı bir union'dır
|
|
35
|
+
// (type="single" → value: string, type="multiple" → value: string[]). Bir `interface`
|
|
36
|
+
// union'ı `extend` edemediğinden burada intersection'lı `type` alias kullanılır — bu,
|
|
37
|
+
// tek/çoklu ayrımını (discriminated union) korur.
|
|
38
|
+
export type ToggleGroupProps = React.ComponentPropsWithoutRef<
|
|
39
|
+
typeof ToggleGroupPrimitive.Root
|
|
40
|
+
> &
|
|
41
|
+
VariantProps<typeof toggleVariants>
|
|
42
|
+
|
|
43
|
+
const ToggleGroup = React.forwardRef<
|
|
44
|
+
React.ElementRef<typeof ToggleGroupPrimitive.Root>,
|
|
45
|
+
ToggleGroupProps
|
|
46
|
+
>(({ className, variant, size, children, ...props }, ref) => (
|
|
47
|
+
<ToggleGroupPrimitive.Root
|
|
48
|
+
ref={ref}
|
|
49
|
+
className={cn(
|
|
50
|
+
"moonui-theme inline-flex items-center justify-center gap-1",
|
|
51
|
+
// Radix roving-focus kök elemana `data-orientation` yazar; dikey yerleşim
|
|
52
|
+
// buna bağlanır. Yatay/tanımsız durumda taban sınıflar geçerli kalır —
|
|
53
|
+
// yani mevcut render değişmez. Kardeş `button-group` ile desen paritesi.
|
|
54
|
+
"data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",
|
|
55
|
+
className
|
|
56
|
+
)}
|
|
57
|
+
{...props}
|
|
58
|
+
>
|
|
59
|
+
<ToggleGroupContext.Provider value={{ variant, size }}>
|
|
60
|
+
{children}
|
|
61
|
+
</ToggleGroupContext.Provider>
|
|
62
|
+
</ToggleGroupPrimitive.Root>
|
|
63
|
+
))
|
|
64
|
+
|
|
65
|
+
ToggleGroup.displayName = "ToggleGroup"
|
|
66
|
+
|
|
67
|
+
export interface ToggleGroupItemProps
|
|
68
|
+
extends React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>,
|
|
69
|
+
VariantProps<typeof toggleVariants> {}
|
|
70
|
+
|
|
71
|
+
const ToggleGroupItem = React.forwardRef<
|
|
72
|
+
React.ElementRef<typeof ToggleGroupPrimitive.Item>,
|
|
73
|
+
ToggleGroupItemProps
|
|
74
|
+
>(({ className, children, variant, size, ...props }, ref) => {
|
|
75
|
+
// Grup context'i varsa onun değeri, yoksa item'ın kendi prop'u geçerli olur.
|
|
76
|
+
const context = React.useContext(ToggleGroupContext)
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<ToggleGroupPrimitive.Item
|
|
80
|
+
ref={ref}
|
|
81
|
+
className={cn(
|
|
82
|
+
toggleVariants({
|
|
83
|
+
variant: context.variant ?? variant,
|
|
84
|
+
size: context.size ?? size,
|
|
85
|
+
}),
|
|
86
|
+
className
|
|
87
|
+
)}
|
|
88
|
+
{...props}
|
|
89
|
+
>
|
|
90
|
+
{children}
|
|
91
|
+
</ToggleGroupPrimitive.Item>
|
|
92
|
+
)
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
ToggleGroupItem.displayName = "ToggleGroupItem"
|
|
96
|
+
|
|
97
|
+
export { ToggleGroup, ToggleGroupItem }
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
/** @license MoonUI v1.0.0 - MIT License - https://moonui.dev */
|
|
4
|
-
var M=Object.create;var $=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var ve=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var d=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Y=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of z(t))!W.call(e,o)&&o!==r&&$(e,o,{get:()=>t[o],enumerable:!(n=B(t,o))||n.enumerable});return e};var me=(e,t,r)=>(r=e!=null?M(H(e)):{},Y(t||!e||!e.__esModule?$(r,"default",{value:e,enumerable:!0}):r,e));var T=d(u=>{"use strict";var y=Symbol.for("react.element"),G=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),Z=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),re=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),b=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=b&&e[b]||e["@@iterator"],typeof e=="function"?e:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,P={};function p(e,t,r){this.props=e,this.context=t,this.refs=P,this.updater=r||C}p.prototype.isReactComponent={};p.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};p.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function g(){}g.prototype=p.prototype;function E(e,t,r){this.props=e,this.context=t,this.refs=P,this.updater=r||C}var k=E.prototype=new g;k.constructor=E;x(k,p.prototype);k.isPureReactComponent=!0;var j=Array.isArray,I=Object.prototype.hasOwnProperty,R={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,r){var n,o={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)I.call(t,n)&&!q.hasOwnProperty(n)&&(o[n]=t[n]);var f=arguments.length-2;if(f===1)o.children=r;else if(1<f){for(var c=Array(f),a=0;a<f;a++)c[a]=arguments[a+2];o.children=c}if(e&&e.defaultProps)for(n in f=e.defaultProps,f)o[n]===void 0&&(o[n]=f[n]);return{$$typeof:y,type:e,key:i,ref:s,props:o,_owner:R.current}}function ue(e,t){return{$$typeof:y,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function w(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}function ie(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var O=/\/+/g;function S(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ie(""+e.key):t.toString(36)}function v(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case y:case G:s=!0}}if(s)return s=e,o=o(s),e=n===""?"."+S(s,0):n,j(o)?(r="",e!=null&&(r=e.replace(O,"$&/")+"/"),v(o,t,r,"",function(a){return a})):o!=null&&(w(o)&&(o=ue(o,r+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(O,"$&/")+"/")+e)),t.push(o)),1;if(s=0,n=n===""?".":n+":",j(e))for(var f=0;f<e.length;f++){i=e[f];var c=n+S(i,f);s+=v(i,t,r,c,o)}else if(c=oe(e),typeof c=="function")for(e=c.call(e),f=0;!(i=e.next()).done;)i=i.value,c=n+S(i,f++),s+=v(i,t,r,c,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function _(e,t,r){if(e==null)return e;var n=[],o=0;return v(e,n,"","",function(i){return t.call(r,i,o++)}),n}function se(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var l={current:null},m={transition:null},ce={ReactCurrentDispatcher:l,ReactCurrentBatchConfig:m,ReactCurrentOwner:R};function D(){throw Error("act(...) is not supported in production builds of React.")}u.Children={map:_,forEach:function(e,t,r){_(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return _(e,function(){t++}),t},toArray:function(e){return _(e,function(t){return t})||[]},only:function(e){if(!w(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};u.Component=p;u.Fragment=J;u.Profiler=Q;u.PureComponent=E;u.StrictMode=K;u.Suspense=te;u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ce;u.act=D;u.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=x({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=R.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var f=e.type.defaultProps;for(c in t)I.call(t,c)&&!q.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&f!==void 0?f[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){f=Array(c);for(var a=0;a<c;a++)f[a]=arguments[a+2];n.children=f}return{$$typeof:y,type:e.type,key:o,ref:i,props:n,_owner:s}};u.createContext=function(e){return e={$$typeof:Z,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:X,_context:e},e.Consumer=e};u.createElement=N;u.createFactory=function(e){var t=N.bind(null,e);return t.type=e,t};u.createRef=function(){return{current:null}};u.forwardRef=function(e){return{$$typeof:ee,render:e}};u.isValidElement=w;u.lazy=function(e){return{$$typeof:ne,_payload:{_status:-1,_result:e},_init:se}};u.memo=function(e,t){return{$$typeof:re,type:e,compare:t===void 0?null:t}};u.startTransition=function(e){var t=m.transition;m.transition={};try{e()}finally{m.transition=t}};u.unstable_act=D;u.useCallback=function(e,t){return l.current.useCallback(e,t)};u.useContext=function(e){return l.current.useContext(e)};u.useDebugValue=function(){};u.useDeferredValue=function(e){return l.current.useDeferredValue(e)};u.useEffect=function(e,t){return l.current.useEffect(e,t)};u.useId=function(){return l.current.useId()};u.useImperativeHandle=function(e,t,r){return l.current.useImperativeHandle(e,t,r)};u.useInsertionEffect=function(e,t){return l.current.useInsertionEffect(e,t)};u.useLayoutEffect=function(e,t){return l.current.useLayoutEffect(e,t)};u.useMemo=function(e,t){return l.current.useMemo(e,t)};u.useReducer=function(e,t,r){return l.current.useReducer(e,t,r)};u.useRef=function(e){return l.current.useRef(e)};u.useState=function(e){return l.current.useState(e)};u.useSyncExternalStore=function(e,t,r){return l.current.useSyncExternalStore(e,t,r)};u.useTransition=function(){return l.current.useTransition()};u.version="18.3.1"});var L=d((Ee,V)=>{"use strict";V.exports=T()});var A=d(h=>{"use strict";var fe=L(),le=Symbol.for("react.element"),ae=Symbol.for("react.fragment"),pe=Object.prototype.hasOwnProperty,ye=fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,de={key:!0,ref:!0,__self:!0,__source:!0};function U(e,t,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)pe.call(t,n)&&!de.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:le,type:e,key:i,ref:s,props:o,_owner:ye.current}}h.Fragment=ae;h.jsx=U;h.jsxs=U});var _e=d((Re,F)=>{"use strict";F.exports=A()});export{ve as a,d as b,me as c,L as d,_e as e};
|
|
5
|
-
/*! Bundled license information:
|
|
6
|
-
|
|
7
|
-
react/cjs/react.production.min.js:
|
|
8
|
-
(**
|
|
9
|
-
* @license React
|
|
10
|
-
* react.production.min.js
|
|
11
|
-
*
|
|
12
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the MIT license found in the
|
|
15
|
-
* LICENSE file in the root directory of this source tree.
|
|
16
|
-
*)
|
|
17
|
-
|
|
18
|
-
react/cjs/react-jsx-runtime.production.min.js:
|
|
19
|
-
(**
|
|
20
|
-
* @license React
|
|
21
|
-
* react-jsx-runtime.production.min.js
|
|
22
|
-
*
|
|
23
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
24
|
-
*
|
|
25
|
-
* This source code is licensed under the MIT license found in the
|
|
26
|
-
* LICENSE file in the root directory of this source tree.
|
|
27
|
-
*)
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
if (typeof window !== 'undefined' && !window.React) {
|
|
31
|
-
console.warn('MoonUI: React not found. Please include React and ReactDOM before MoonUI.');
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=chunk-X5ULQZNC.global.js.map
|