asterui 0.12.2 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Kbd.d.ts +2 -1
- package/dist/components/Modal.d.ts +7 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +196 -201
- package/dist/index.js.map +1 -1
- package/dist/index100.js +11 -44
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +12 -10
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +7 -14
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +12 -7
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +29 -11
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +16 -29
- package/dist/index105.js.map +1 -1
- package/dist/index13.js +95 -35
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +153 -90
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +146 -154
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +5 -150
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +71 -5
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +17 -71
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +96 -15
- package/dist/index19.js.map +1 -1
- package/dist/index20.js +105 -89
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +177 -107
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +107 -181
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +19 -110
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +41 -17
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +32 -43
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +41 -32
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +12 -41
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +33 -12
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +63 -33
- package/dist/index29.js.map +1 -1
- package/dist/index30.js +77 -60
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +18 -80
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +217 -15
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +1078 -216
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +17 -1081
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +121 -17
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +37 -119
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +182 -31
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +97 -191
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +158 -93
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +139 -155
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +15 -146
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +17 -15
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +21 -18
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +116 -18
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +10 -116
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +35 -13
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +34 -35
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +116 -10
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +174 -114
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +136 -165
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +11 -146
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +20 -10
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +14 -22
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +7 -14
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +268 -6
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +17 -266
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +122 -17
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +108 -120
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +167 -107
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +29 -167
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +120 -30
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +80 -116
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +19 -85
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +73 -19
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +54 -71
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +44 -56
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +49 -42
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +62 -52
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +101 -56
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +41 -107
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +68 -41
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +19 -66
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +43 -18
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +132 -44
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +50 -132
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +21 -51
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +31 -22
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +22 -31
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +327 -20
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +50 -323
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +40 -56
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +23 -40
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +93 -21
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +123 -88
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +154 -123
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +63 -159
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +35 -65
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +234 -35
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +31 -231
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +210 -34
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +198 -195
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +241 -159
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +166 -283
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +253 -173
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +14 -258
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +31 -12
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +5 -32
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +13 -5
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +43 -11
- package/dist/index99.js.map +1 -1
- package/package.json +11 -5
- package/dist/components/Calendar.d.ts +0 -23
- package/dist/index.css +0 -1
- package/dist/index106.js +0 -21
- package/dist/index106.js.map +0 -1
- package/dist/index107.js +0 -177
- package/dist/index107.js.map +0 -1
- package/dist/index109.js +0 -10796
- package/dist/index109.js.map +0 -1
- package/dist/index110.js +0 -8
- package/dist/index110.js.map +0 -1
- package/dist/index111.js +0 -45
- package/dist/index111.js.map +0 -1
- package/dist/index112.js +0 -5
- package/dist/index112.js.map +0 -1
- package/dist/index113.js +0 -10
- package/dist/index113.js.map +0 -1
- package/dist/index114.js +0 -155
- package/dist/index114.js.map +0 -1
- package/dist/index115.js +0 -33
- package/dist/index115.js.map +0 -1
- package/dist/index116.js +0 -33
- package/dist/index116.js.map +0 -1
- package/dist/index117.js +0 -5
- package/dist/index117.js.map +0 -1
- package/dist/index118.js +0 -75
- package/dist/index118.js.map +0 -1
- package/dist/index119.js +0 -42
- package/dist/index119.js.map +0 -1
- package/dist/index120.js +0 -29
- package/dist/index120.js.map +0 -1
- package/dist/index121.js +0 -24
- package/dist/index121.js.map +0 -1
- package/dist/index122.js +0 -27
- package/dist/index122.js.map +0 -1
- package/dist/index123.js +0 -23
- package/dist/index123.js.map +0 -1
- package/dist/index124.js +0 -103
- package/dist/index124.js.map +0 -1
- package/dist/index125.js +0 -363
- package/dist/index125.js.map +0 -1
- package/dist/index126.js +0 -28
- package/dist/index126.js.map +0 -1
- package/dist/index127.js +0 -76
- package/dist/index127.js.map +0 -1
- package/dist/index128.js +0 -19
- package/dist/index128.js.map +0 -1
- package/dist/index129.js +0 -69
- package/dist/index129.js.map +0 -1
- package/dist/index130.js +0 -147
- package/dist/index130.js.map +0 -1
- package/dist/index131.js +0 -5
- package/dist/index131.js.map +0 -1
- package/dist/index132.js +0 -59
- package/dist/index132.js.map +0 -1
- package/dist/index133.js +0 -5
- package/dist/index133.js.map +0 -1
- package/dist/index134.js +0 -5
- package/dist/index134.js.map +0 -1
- package/dist/index135.js +0 -5
- package/dist/index135.js.map +0 -1
- package/dist/index136.js +0 -5
- package/dist/index136.js.map +0 -1
- package/dist/index137.js +0 -5
- package/dist/index137.js.map +0 -1
- package/dist/index138.js +0 -5
- package/dist/index138.js.map +0 -1
- package/dist/index139.js +0 -5
- package/dist/index139.js.map +0 -1
- package/dist/index140.js +0 -5
- package/dist/index140.js.map +0 -1
- package/dist/index141.js +0 -35
- package/dist/index141.js.map +0 -1
- package/dist/index142.js +0 -5
- package/dist/index142.js.map +0 -1
- package/dist/index143.js +0 -11
- package/dist/index143.js.map +0 -1
- package/dist/index144.js +0 -5
- package/dist/index144.js.map +0 -1
- package/dist/index145.js +0 -5
- package/dist/index145.js.map +0 -1
- package/dist/index146.js +0 -24
- package/dist/index146.js.map +0 -1
- package/dist/index147.js +0 -5
- package/dist/index147.js.map +0 -1
- package/dist/index148.js +0 -27
- package/dist/index148.js.map +0 -1
- package/dist/index149.js +0 -74
- package/dist/index149.js.map +0 -1
- package/dist/index150.js +0 -24
- package/dist/index150.js.map +0 -1
- package/dist/index151.js +0 -37
- package/dist/index151.js.map +0 -1
- package/dist/index152.js +0 -73
- package/dist/index152.js.map +0 -1
- package/dist/index153.js +0 -5
- package/dist/index153.js.map +0 -1
- package/dist/index154.js +0 -25
- package/dist/index154.js.map +0 -1
- package/dist/index155.js +0 -5
- package/dist/index155.js.map +0 -1
- package/dist/index156.js +0 -5
- package/dist/index156.js.map +0 -1
- package/dist/index157.js +0 -5
- package/dist/index157.js.map +0 -1
- package/dist/index158.js +0 -5
- package/dist/index158.js.map +0 -1
- package/dist/index159.js +0 -7
- package/dist/index159.js.map +0 -1
package/dist/index40.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index40.js","sources":["../src/components/Input.tsx"],"sourcesContent":["import React, { forwardRef, useState, useCallback, useRef, useEffect } from 'react'\n\nexport interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n type?: 'text' | 'password' | 'email' | 'number' | 'date' | 'datetime-local' | 'week' | 'month' | 'tel' | 'url' | 'search' | 'time'\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error'\n ghost?: boolean\n bordered?: boolean\n className?: string\n /** Input mask pattern. Use # for digits, A for letters, * for alphanumeric */\n mask?: string\n /** Placeholder character shown in mask (default: _) */\n maskPlaceholder?: string\n}\n\n// Helper to apply mask to raw value\nfunction applyMask(raw: string, mask: string, placeholder: string): string {\n let result = ''\n let rawIndex = 0\n\n for (let i = 0; i < mask.length && rawIndex <= raw.length; i++) {\n const maskChar = mask[i]\n if (maskChar === '#' || maskChar === 'A' || maskChar === '*') {\n if (rawIndex < raw.length) {\n result += raw[rawIndex]\n rawIndex++\n } else {\n result += placeholder\n }\n } else {\n result += maskChar\n }\n }\n\n return result\n}\n\n// Extract raw value from masked input\nfunction extractRaw(value: string, mask: string): string {\n let raw = ''\n for (let i = 0; i < value.length && i < mask.length; i++) {\n const maskChar = mask[i]\n if ((maskChar === '#' || maskChar === 'A' || maskChar === '*') && value[i] !== '_') {\n raw += value[i]\n }\n }\n return raw\n}\n\n// Check if character is valid for mask position\nfunction isValidChar(char: string, maskChar: string): boolean {\n if (maskChar === '#') return /\\d/.test(char)\n if (maskChar === 'A') return /[a-zA-Z]/.test(char)\n if (maskChar === '*') return /[a-zA-Z0-9]/.test(char)\n return false\n}\n\n// Find next input position in mask\nfunction findNextInputPosition(mask: string, fromIndex: number): number {\n for (let i = fromIndex; i < mask.length; i++) {\n if (mask[i] === '#' || mask[i] === 'A' || mask[i] === '*') {\n return i\n }\n }\n return mask.length\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n type = 'text',\n size,\n color,\n ghost = false,\n bordered = true,\n className = '',\n mask,\n maskPlaceholder = '_',\n value,\n defaultValue,\n onChange,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const sizeClasses = {\n xs: 'input-xs',\n sm: 'input-sm',\n md: 'input-md',\n lg: 'input-lg',\n xl: 'input-xl',\n }\n\n const colorClasses = {\n neutral: 'input-neutral',\n primary: 'input-primary',\n secondary: 'input-secondary',\n accent: 'input-accent',\n info: 'input-info',\n success: 'input-success',\n warning: 'input-warning',\n error: 'input-error',\n }\n\n const inputClasses = [\n 'input',\n !bordered && 'border-0',\n ghost && 'input-ghost',\n size && sizeClasses[size],\n color && colorClasses[color],\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n // Mask handling\n const innerRef = useRef<HTMLInputElement>(null)\n const inputRef = (ref as React.RefObject<HTMLInputElement>) || innerRef\n\n const getInitialRaw = useCallback(() => {\n if (!mask) return ''\n const initial = (value ?? defaultValue ?? '') as string\n return extractRaw(initial, mask)\n }, [mask, value, defaultValue])\n\n const [rawValue, setRawValue] = useState(getInitialRaw)\n const [cursorPos, setCursorPos] = useState<number | null>(null)\n\n // Sync with controlled value\n useEffect(() => {\n if (mask && value !== undefined) {\n setRawValue(extractRaw(value as string, mask))\n }\n }, [mask, value])\n\n // Set cursor position after render\n useEffect(() => {\n if (cursorPos !== null && inputRef.current) {\n inputRef.current.setSelectionRange(cursorPos, cursorPos)\n setCursorPos(null)\n }\n }, [cursorPos, inputRef])\n\n const handleMaskedChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (!mask) {\n onChange?.(e)\n return\n }\n\n const input = e.target\n const inputValue = input.value\n\n // Extract what the user is trying to type\n const newRaw = extractRaw(inputValue, mask)\n\n // Filter to only valid characters\n let filteredRaw = ''\n let rawIdx = 0\n for (let i = 0; i < mask.length && rawIdx < newRaw.length; i++) {\n const maskChar = mask[i]\n if (maskChar === '#' || maskChar === 'A' || maskChar === '*') {\n if (isValidChar(newRaw[rawIdx], maskChar)) {\n filteredRaw += newRaw[rawIdx]\n }\n rawIdx++\n }\n }\n\n setRawValue(filteredRaw)\n\n // Calculate new cursor position\n const maskedValue = applyMask(filteredRaw, mask, maskPlaceholder)\n let newCursor = findNextInputPosition(mask, 0)\n let charsPlaced = 0\n for (let i = 0; i < mask.length; i++) {\n const maskChar = mask[i]\n if (maskChar === '#' || maskChar === 'A' || maskChar === '*') {\n if (charsPlaced < filteredRaw.length) {\n charsPlaced++\n newCursor = i + 1\n }\n }\n }\n // Skip to next input position if we're on a literal\n newCursor = findNextInputPosition(mask, newCursor)\n if (newCursor > mask.length) newCursor = mask.length\n\n setCursorPos(newCursor)\n\n // Create synthetic event with masked value\n const syntheticEvent = {\n ...e,\n target: { ...input, value: maskedValue },\n currentTarget: { ...input, value: maskedValue },\n } as React.ChangeEvent<HTMLInputElement>\n\n onChange?.(syntheticEvent)\n },\n [mask, maskPlaceholder, onChange]\n )\n\n const handleMaskedKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (!mask) {\n onKeyDown?.(e)\n return\n }\n\n if (e.key === 'Backspace') {\n e.preventDefault()\n const newRaw = rawValue.slice(0, -1)\n setRawValue(newRaw)\n\n // Calculate cursor position\n let newCursor = 0\n let charsPlaced = 0\n for (let i = 0; i < mask.length; i++) {\n const maskChar = mask[i]\n if (maskChar === '#' || maskChar === 'A' || maskChar === '*') {\n if (charsPlaced < newRaw.length) {\n charsPlaced++\n newCursor = i + 1\n } else {\n newCursor = i\n break\n }\n }\n }\n setCursorPos(newCursor)\n\n const maskedValue = applyMask(newRaw, mask, maskPlaceholder)\n const input = e.currentTarget\n const syntheticEvent = {\n target: { ...input, value: maskedValue },\n currentTarget: { ...input, value: maskedValue },\n } as unknown as React.ChangeEvent<HTMLInputElement>\n\n onChange?.(syntheticEvent)\n }\n\n onKeyDown?.(e)\n },\n [mask, maskPlaceholder, rawValue, onChange, onKeyDown]\n )\n\n // If no mask, render simple input\n if (!mask) {\n return (\n <input\n ref={ref}\n type={type}\n className={inputClasses}\n value={value}\n defaultValue={defaultValue}\n onChange={onChange}\n onKeyDown={onKeyDown}\n {...props}\n />\n )\n }\n\n // Render masked input\n const maskedValue = applyMask(rawValue, mask, maskPlaceholder)\n\n return (\n <input\n ref={inputRef}\n type=\"text\"\n className={inputClasses}\n value={maskedValue}\n onChange={handleMaskedChange}\n onKeyDown={handleMaskedKeyDown}\n {...props}\n />\n )\n }\n)\n\nInput.displayName = 'Input'\n"],"names":["applyMask","raw","mask","placeholder","result","rawIndex","i","maskChar","extractRaw","value","isValidChar","char","findNextInputPosition","fromIndex","Input","forwardRef","type","size","color","ghost","bordered","className","maskPlaceholder","defaultValue","onChange","onKeyDown","props","ref","sizeClasses","colorClasses","inputClasses","innerRef","useRef","inputRef","getInitialRaw","useCallback","rawValue","setRawValue","useState","cursorPos","setCursorPos","useEffect","handleMaskedChange","e","input","inputValue","newRaw","filteredRaw","rawIdx","maskedValue","newCursor","charsPlaced","syntheticEvent","handleMaskedKeyDown","jsx"],"mappings":";;AAgBA,SAASA,EAAUC,GAAaC,GAAcC,GAA6B;AACzE,MAAIC,IAAS,IACTC,IAAW;AAEf,WAASC,IAAI,GAAGA,IAAIJ,EAAK,UAAUG,KAAYJ,EAAI,QAAQK,KAAK;AAC9D,UAAMC,IAAWL,EAAKI,CAAC;AACvB,IAAIC,MAAa,OAAOA,MAAa,OAAOA,MAAa,MACnDF,IAAWJ,EAAI,UACjBG,KAAUH,EAAII,CAAQ,GACtBA,OAEAD,KAAUD,IAGZC,KAAUG;AAAA,EAEd;AAEA,SAAOH;AACT;AAGA,SAASI,EAAWC,GAAeP,GAAsB;AACvD,MAAID,IAAM;AACV,WAAS,I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A,cACF;AAAA,UAEJ;AACA,UAAAkC,EAAaU,CAAS;AAEtB,gBAAMD,IAAcjD,EAAU8C,GAAQ5C,GAAMoB,CAAe,GACrDsB,IAAQD,EAAE,eACVS,IAAiB;AAAA,YACrB,QAAQ,EAAE,GAAGR,GAAO,OAAOK,EAAAA;AAAAA,YAC3B,eAAe,EAAE,GAAGL,GAAO,OAAOK,EAAAA;AAAAA,UAAY;AAGhD,UAAAzB,IAAW4B,CAAc;AAAA,QAC3B;AAEA,QAAA3B,IAAYkB,CAAC;AAAA,MACf;AAAA,MACA,CAACzC,GAAMoB,GAAiBc,GAAUZ,GAAUC,CAAS;AAAA,IAAA;AAIvD,QAAI,CAACvB;AACH,aACE,gBAAAoD;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAA3B;AAAA,UACA,MAAAX;AAAA,UACA,WAAWc;AAAA,UACX,OAAArB;AAAA,UACA,cAAAc;AAAA,UACA,UAAAC;AAAA,UACA,WAAAC;AAAA,UACC,GAAGC;AAAA,QAAA;AAAA,MAAA;AAMV,UAAMuB,IAAcjD,EAAUoC,GAAUlC,GAAMoB,CAAe;AAE7D,WACE,gBAAAgC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKrB;AAAA,QACL,MAAK;AAAA,QACL,WAAWH;AAAA,QACX,OAAOmB;AAAA,QACP,UAAUP;AAAA,QACV,WAAWW;AAAA,QACV,GAAG3B;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAZ,EAAM,cAAc;"}
|
|
1
|
+
{"version":3,"file":"index40.js","sources":["../src/components/InputNumber.tsx"],"sourcesContent":["import React, { useState, useRef, forwardRef, useImperativeHandle } from 'react'\n\nexport interface InputNumberProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange' | 'value' | 'defaultValue'> {\n value?: number\n defaultValue?: number\n min?: number\n max?: number\n step?: number\n precision?: number\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n disabled?: boolean\n onChange?: (value: number | null) => void\n formatter?: (value: number | undefined) => string\n parser?: (displayValue: string) => number\n className?: string\n controls?: boolean\n block?: boolean\n}\n\nexport const InputNumber = forwardRef<HTMLInputElement, InputNumberProps>(\n (\n {\n value: controlledValue,\n defaultValue,\n min = -Infinity,\n max = Infinity,\n step = 1,\n precision,\n size,\n disabled = false,\n onChange,\n formatter,\n parser,\n className = '',\n controls = true,\n block = true,\n ...props\n },\n ref\n ) => {\n const [internalValue, setInternalValue] = useState<number | null>(defaultValue ?? null)\n const inputRef = useRef<HTMLInputElement>(null)\n\n useImperativeHandle(ref, () => inputRef.current!)\n\n const value = controlledValue !== undefined ? controlledValue : internalValue\n\n const formatValue = (num: number | null): string => {\n if (num === null) return ''\n let formatted = num\n if (precision !== undefined) {\n formatted = Number(num.toFixed(precision))\n }\n return formatter ? formatter(formatted) : String(formatted)\n }\n\n const parseValue = (str: string): number | null => {\n if (!str) return null\n const parsed = parser ? parser(str) : parseFloat(str)\n if (isNaN(parsed)) return null\n return parsed\n }\n\n const clampValue = (num: number): number => {\n let clamped = Math.max(min, Math.min(max, num))\n if (precision !== undefined) {\n clamped = Number(clamped.toFixed(precision))\n }\n return clamped\n }\n\n const updateValue = (newValue: number | null) => {\n if (newValue === null) {\n if (controlledValue === undefined) {\n setInternalValue(null)\n }\n onChange?.(null)\n return\n }\n\n const clamped = clampValue(newValue)\n if (controlledValue === undefined) {\n setInternalValue(clamped)\n }\n onChange?.(clamped)\n }\n\n const handleIncrement = () => {\n if (disabled) return\n const currentValue = value ?? 0\n updateValue(currentValue + step)\n }\n\n const handleDecrement = () => {\n if (disabled) return\n const currentValue = value ?? 0\n updateValue(currentValue - step)\n }\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const parsed = parseValue(e.target.value)\n if (parsed !== null) {\n updateValue(parsed)\n } else if (e.target.value === '') {\n updateValue(null)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (disabled) return\n\n if (e.key === 'ArrowUp') {\n e.preventDefault()\n handleIncrement()\n } else if (e.key === 'ArrowDown') {\n e.preventDefault()\n handleDecrement()\n }\n }\n\n const handleBlur = () => {\n // Ensure value is within bounds on blur\n if (value !== null && (value < min || value > max)) {\n updateValue(clampValue(value))\n }\n }\n\n const sizeClasses = {\n xs: 'input-xs',\n sm: 'input-sm',\n md: 'input-md',\n lg: 'input-lg',\n xl: 'input-xl',\n }\n\n const inputClasses = [\n 'input',\n 'input-bordered',\n 'w-full',\n size && sizeClasses[size],\n disabled && 'input-disabled',\n controls && 'pr-8',\n ]\n .filter(Boolean)\n .join(' ')\n\n const buttonSize = size === 'xs' || size === 'sm' ? 'btn-xs' : 'btn-sm'\n\n return (\n <div className={`relative ${block ? 'w-full' : 'inline-block'} group ${className}`}>\n <input\n ref={inputRef}\n type=\"text\"\n className={inputClasses}\n value={formatValue(value)}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n disabled={disabled}\n {...props}\n />\n {controls && (\n <div className=\"absolute right-1 top-1/2 -translate-y-1/2 flex flex-col gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity\">\n <button\n type=\"button\"\n className={`btn ${buttonSize} btn-ghost px-1 min-h-0 h-3.5`}\n onClick={handleIncrement}\n disabled={disabled || (value !== null && value >= max)}\n tabIndex={-1}\n >\n <svg\n className=\"w-3 h-3\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 15l7-7 7 7\"\n />\n </svg>\n </button>\n <button\n type=\"button\"\n className={`btn ${buttonSize} btn-ghost px-1 min-h-0 h-3.5`}\n onClick={handleDecrement}\n disabled={disabled || (value !== null && value <= min)}\n tabIndex={-1}\n >\n <svg\n className=\"w-3 h-3\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 9l-7 7-7-7\"\n />\n </svg>\n </button>\n </div>\n )}\n </div>\n )\n }\n)\n\nInputNumber.displayName = 'InputNumber'\n\nexport default InputNumber\n"],"names":["InputNumber","forwardRef","controlledValue","defaultValue","min","max","step","precision","size","disabled","onChange","formatter","parser","className","controls","block","props","ref","internalValue","setInternalValue","useState","inputRef","useRef","useImperativeHandle","value","formatValue","num","formatted","parseValue","str","parsed","clampValue","clamped","updateValue","newValue","handleIncrement","handleDecrement","handleInputChange","e","handleKeyDown","handleBlur","inputClasses","buttonSize","jsxs","jsx"],"mappings":";;AAmBO,MAAMA,IAAcC;AAAA,EACzB,CACE;AAAA,IACE,OAAOC;AAAA,IACP,cAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,KAAAC,IAAM;AAAA,IACN,MAAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,UAAAC,IAAW;AAAA,IACX,OAAAC,IAAQ;AAAA,IACR,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAwBjB,KAAgB,IAAI,GAChFkB,IAAWC,EAAyB,IAAI;AAE9C,IAAAC,EAAoBN,GAAK,MAAMI,EAAS,OAAQ;AAEhD,UAAMG,IAAQtB,MAAoB,SAAYA,IAAkBgB,GAE1DO,IAAc,CAACC,MAA+B;AAClD,UAAIA,MAAQ,KAAM,QAAO;AACzB,UAAIC,IAAYD;AAChB,aAAInB,MAAc,WAChBoB,IAAY,OAAOD,EAAI,QAAQnB,CAAS,CAAC,IAEpCI,IAAYA,EAAUgB,CAAS,IAAI,OAAOA,CAAS;AAAA,IAC5D,GAEMC,IAAa,CAACC,MAA+B;AACjD,UAAI,CAACA,EAAK,QAAO;AACjB,YAAMC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AAAA,YACL,WAAW,OAAOF,CAAU;AAAA,YAC5B,SAASN;AAAA,YACT,UAAU3B,KAAae,MAAU,QAAQA,KAASpB;AAAA,YAClD,UAAU;AAAA,YAEV,UAAA,gBAAAwC;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,QAAO;AAAA,gBAEP,UAAA,gBAAAA;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,eAAc;AAAA,oBACd,gBAAe;AAAA,oBACf,aAAa;AAAA,oBACb,GAAE;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACJ;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MACF,EAAA,CACF;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;AAEA5C,EAAY,cAAc;"}
|
package/dist/index41.js
CHANGED
|
@@ -1,149 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
parser: h,
|
|
16
|
-
className: I = "",
|
|
17
|
-
controls: m = !0,
|
|
18
|
-
block: C = !0,
|
|
19
|
-
...D
|
|
20
|
-
}, V) => {
|
|
21
|
-
const [j, v] = A(w ?? null), x = K(null);
|
|
22
|
-
W(V, () => x.current);
|
|
23
|
-
const n = o !== void 0 ? o : j, B = (t) => {
|
|
24
|
-
if (t === null) return "";
|
|
25
|
-
let e = t;
|
|
26
|
-
return a !== void 0 && (e = Number(t.toFixed(a))), d ? d(e) : String(e);
|
|
27
|
-
}, L = (t) => {
|
|
28
|
-
if (!t) return null;
|
|
29
|
-
const e = h ? h(t) : parseFloat(t);
|
|
30
|
-
return isNaN(e) ? null : e;
|
|
31
|
-
}, b = (t) => {
|
|
32
|
-
let e = Math.max(i, Math.min(c, t));
|
|
33
|
-
return a !== void 0 && (e = Number(e.toFixed(a))), e;
|
|
34
|
-
}, u = (t) => {
|
|
35
|
-
if (t === null) {
|
|
36
|
-
o === void 0 && v(null), f?.(null);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const e = b(t);
|
|
40
|
-
o === void 0 && v(e), f?.(e);
|
|
41
|
-
}, g = () => {
|
|
42
|
-
if (l) return;
|
|
43
|
-
u((n ?? 0) + p);
|
|
44
|
-
}, y = () => {
|
|
45
|
-
if (l) return;
|
|
46
|
-
u((n ?? 0) - p);
|
|
47
|
-
}, M = (t) => {
|
|
48
|
-
const e = L(t.target.value);
|
|
49
|
-
e !== null ? u(e) : t.target.value === "" && u(null);
|
|
50
|
-
}, $ = (t) => {
|
|
51
|
-
l || (t.key === "ArrowUp" ? (t.preventDefault(), g()) : t.key === "ArrowDown" && (t.preventDefault(), y()));
|
|
52
|
-
}, F = () => {
|
|
53
|
-
n !== null && (n < i || n > c) && u(b(n));
|
|
54
|
-
}, R = [
|
|
55
|
-
"input",
|
|
56
|
-
"input-bordered",
|
|
57
|
-
"w-full",
|
|
58
|
-
s && {
|
|
59
|
-
xs: "input-xs",
|
|
60
|
-
sm: "input-sm",
|
|
61
|
-
md: "input-md",
|
|
62
|
-
lg: "input-lg",
|
|
63
|
-
xl: "input-xl"
|
|
64
|
-
}[s],
|
|
65
|
-
l && "input-disabled",
|
|
66
|
-
m && "pr-8"
|
|
67
|
-
].filter(Boolean).join(" "), N = s === "xs" || s === "sm" ? "btn-xs" : "btn-sm";
|
|
68
|
-
return /* @__PURE__ */ k("div", { className: `relative ${C ? "w-full" : "inline-block"} group ${I}`, children: [
|
|
69
|
-
/* @__PURE__ */ r(
|
|
70
|
-
"input",
|
|
71
|
-
{
|
|
72
|
-
ref: x,
|
|
73
|
-
type: "text",
|
|
74
|
-
className: R,
|
|
75
|
-
value: B(n),
|
|
76
|
-
onChange: M,
|
|
77
|
-
onKeyDown: $,
|
|
78
|
-
onBlur: F,
|
|
79
|
-
disabled: l,
|
|
80
|
-
...D
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
m && /* @__PURE__ */ k("div", { className: "absolute right-1 top-1/2 -translate-y-1/2 flex flex-col gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity", children: [
|
|
84
|
-
/* @__PURE__ */ r(
|
|
85
|
-
"button",
|
|
86
|
-
{
|
|
87
|
-
type: "button",
|
|
88
|
-
className: `btn ${N} btn-ghost px-1 min-h-0 h-3.5`,
|
|
89
|
-
onClick: g,
|
|
90
|
-
disabled: l || n !== null && n >= c,
|
|
91
|
-
tabIndex: -1,
|
|
92
|
-
children: /* @__PURE__ */ r(
|
|
93
|
-
"svg",
|
|
94
|
-
{
|
|
95
|
-
className: "w-3 h-3",
|
|
96
|
-
fill: "none",
|
|
97
|
-
viewBox: "0 0 24 24",
|
|
98
|
-
stroke: "currentColor",
|
|
99
|
-
children: /* @__PURE__ */ r(
|
|
100
|
-
"path",
|
|
101
|
-
{
|
|
102
|
-
strokeLinecap: "round",
|
|
103
|
-
strokeLinejoin: "round",
|
|
104
|
-
strokeWidth: 2,
|
|
105
|
-
d: "M5 15l7-7 7 7"
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
)
|
|
110
|
-
}
|
|
111
|
-
),
|
|
112
|
-
/* @__PURE__ */ r(
|
|
113
|
-
"button",
|
|
114
|
-
{
|
|
115
|
-
type: "button",
|
|
116
|
-
className: `btn ${N} btn-ghost px-1 min-h-0 h-3.5`,
|
|
117
|
-
onClick: y,
|
|
118
|
-
disabled: l || n !== null && n <= i,
|
|
119
|
-
tabIndex: -1,
|
|
120
|
-
children: /* @__PURE__ */ r(
|
|
121
|
-
"svg",
|
|
122
|
-
{
|
|
123
|
-
className: "w-3 h-3",
|
|
124
|
-
fill: "none",
|
|
125
|
-
viewBox: "0 0 24 24",
|
|
126
|
-
stroke: "currentColor",
|
|
127
|
-
children: /* @__PURE__ */ r(
|
|
128
|
-
"path",
|
|
129
|
-
{
|
|
130
|
-
strokeLinecap: "round",
|
|
131
|
-
strokeLinejoin: "round",
|
|
132
|
-
strokeWidth: 2,
|
|
133
|
-
d: "M19 9l-7 7-7-7"
|
|
134
|
-
}
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
)
|
|
140
|
-
] })
|
|
141
|
-
] });
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
H.displayName = "InputNumber";
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
|
+
function p({ children: i, vertical: o = !1, className: t = "", ...a }) {
|
|
4
|
+
const r = ["join", o && "join-vertical", t].filter(Boolean).join(" "), m = n.Children.map(i, (e) => {
|
|
5
|
+
if (n.isValidElement(e)) {
|
|
6
|
+
const s = e.props.className || "", l = s ? `join-item ${s}` : "join-item";
|
|
7
|
+
return n.cloneElement(e, {
|
|
8
|
+
className: l
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
return e;
|
|
12
|
+
});
|
|
13
|
+
return /* @__PURE__ */ c("div", { className: r, ...a, children: m });
|
|
14
|
+
}
|
|
145
15
|
export {
|
|
146
|
-
|
|
147
|
-
H as default
|
|
16
|
+
p as Join
|
|
148
17
|
};
|
|
149
18
|
//# sourceMappingURL=index41.js.map
|
package/dist/index41.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index41.js","sources":["../src/components/InputNumber.tsx"],"sourcesContent":["import React, { useState, useRef, forwardRef, useImperativeHandle } from 'react'\n\nexport interface InputNumberProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange' | 'value' | 'defaultValue'> {\n value?: number\n defaultValue?: number\n min?: number\n max?: number\n step?: number\n precision?: number\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n disabled?: boolean\n onChange?: (value: number | null) => void\n formatter?: (value: number | undefined) => string\n parser?: (displayValue: string) => number\n className?: string\n controls?: boolean\n block?: boolean\n}\n\nexport const InputNumber = forwardRef<HTMLInputElement, InputNumberProps>(\n (\n {\n value: controlledValue,\n defaultValue,\n min = -Infinity,\n max = Infinity,\n step = 1,\n precision,\n size,\n disabled = false,\n onChange,\n formatter,\n parser,\n className = '',\n controls = true,\n block = true,\n ...props\n },\n ref\n ) => {\n const [internalValue, setInternalValue] = useState<number | null>(defaultValue ?? null)\n const inputRef = useRef<HTMLInputElement>(null)\n\n useImperativeHandle(ref, () => inputRef.current!)\n\n const value = controlledValue !== undefined ? controlledValue : internalValue\n\n const formatValue = (num: number | null): string => {\n if (num === null) return ''\n let formatted = num\n if (precision !== undefined) {\n formatted = Number(num.toFixed(precision))\n }\n return formatter ? formatter(formatted) : String(formatted)\n }\n\n const parseValue = (str: string): number | null => {\n if (!str) return null\n const parsed = parser ? parser(str) : parseFloat(str)\n if (isNaN(parsed)) return null\n return parsed\n }\n\n const clampValue = (num: number): number => {\n let clamped = Math.max(min, Math.min(max, num))\n if (precision !== undefined) {\n clamped = Number(clamped.toFixed(precision))\n }\n return clamped\n }\n\n const updateValue = (newValue: number | null) => {\n if (newValue === null) {\n if (controlledValue === undefined) {\n setInternalValue(null)\n }\n onChange?.(null)\n return\n }\n\n const clamped = clampValue(newValue)\n if (controlledValue === undefined) {\n setInternalValue(clamped)\n }\n onChange?.(clamped)\n }\n\n const handleIncrement = () => {\n if (disabled) return\n const currentValue = value ?? 0\n updateValue(currentValue + step)\n }\n\n const handleDecrement = () => {\n if (disabled) return\n const currentValue = value ?? 0\n updateValue(currentValue - step)\n }\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const parsed = parseValue(e.target.value)\n if (parsed !== null) {\n updateValue(parsed)\n } else if (e.target.value === '') {\n updateValue(null)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (disabled) return\n\n if (e.key === 'ArrowUp') {\n e.preventDefault()\n handleIncrement()\n } else if (e.key === 'ArrowDown') {\n e.preventDefault()\n handleDecrement()\n }\n }\n\n const handleBlur = () => {\n // Ensure value is within bounds on blur\n if (value !== null && (value < min || value > max)) {\n updateValue(clampValue(value))\n }\n }\n\n const sizeClasses = {\n xs: 'input-xs',\n sm: 'input-sm',\n md: 'input-md',\n lg: 'input-lg',\n xl: 'input-xl',\n }\n\n const inputClasses = [\n 'input',\n 'input-bordered',\n 'w-full',\n size && sizeClasses[size],\n disabled && 'input-disabled',\n controls && 'pr-8',\n ]\n .filter(Boolean)\n .join(' ')\n\n const buttonSize = size === 'xs' || size === 'sm' ? 'btn-xs' : 'btn-sm'\n\n return (\n <div className={`relative ${block ? 'w-full' : 'inline-block'} group ${className}`}>\n <input\n ref={inputRef}\n type=\"text\"\n className={inputClasses}\n value={formatValue(value)}\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n onBlur={handleBlur}\n disabled={disabled}\n {...props}\n />\n {controls && (\n <div className=\"absolute right-1 top-1/2 -translate-y-1/2 flex flex-col gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity\">\n <button\n type=\"button\"\n className={`btn ${buttonSize} btn-ghost px-1 min-h-0 h-3.5`}\n onClick={handleIncrement}\n disabled={disabled || (value !== null && value >= max)}\n tabIndex={-1}\n >\n <svg\n className=\"w-3 h-3\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 15l7-7 7 7\"\n />\n </svg>\n </button>\n <button\n type=\"button\"\n className={`btn ${buttonSize} btn-ghost px-1 min-h-0 h-3.5`}\n onClick={handleDecrement}\n disabled={disabled || (value !== null && value <= min)}\n tabIndex={-1}\n >\n <svg\n className=\"w-3 h-3\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 9l-7 7-7-7\"\n />\n </svg>\n </button>\n </div>\n )}\n </div>\n )\n }\n)\n\nInputNumber.displayName = 'InputNumber'\n\nexport default InputNumber\n"],"names":["InputNumber","forwardRef","controlledValue","defaultValue","min","max","step","precision","size","disabled","onChange","formatter","parser","className","controls","block","props","ref","internalValue","setInternalValue","useState","inputRef","useRef","useImperativeHandle","value","formatValue","num","formatted","parseValue","str","parsed","clampValue","clamped","updateValue","newValue","handleIncrement","handleDecrement","handleInputChange","e","handleKeyDown","handleBlur","inputClasses","buttonSize","jsxs","jsx"],"mappings":";;AAmBO,MAAMA,IAAcC;AAAA,EACzB,CACE;AAAA,IACE,OAAOC;AAAA,IACP,cAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,KAAAC,IAAM;AAAA,IACN,MAAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,UAAAC,IAAW;AAAA,IACX,OAAAC,IAAQ;AAAA,IACR,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAwBjB,KAAgB,IAAI,GAChFkB,IAAWC,EAAyB,IAAI;AAE9C,IAAAC,EAAoBN,GAAK,MAAMI,EAAS,OAAQ;AAEhD,UAAMG,IAAQtB,MAAoB,SAAYA,IAAkBgB,GAE1DO,IAAc,CAACC,MAA+B;AAClD,UAAIA,MAAQ,KAAM,QAAO;AACzB,UAAIC,IAAYD;AAChB,aAAInB,MAAc,WAChBoB,IAAY,OAAOD,EAAI,QAAQnB,CAAS,CAAC,IAEpCI,IAAYA,EAAUgB,CAAS,IAAI,OAAOA,CAAS;AAAA,IAC5D,GAEMC,IAAa,CAACC,MAA+B;AACjD,UAAI,CAACA,EAAK,QAAO;AACjB,YAAMC,IAASlB,IAASA,EAAOiB,CAAG,IAAI,WAAW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5B,SAASN;AAAA,YACT,UAAU3B,KAAae,MAAU,QAAQA,KAASpB;AAAA,YAClD,UAAU;AAAA,YAEV,UAAA,gBAAAwC;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,QAAO;AAAA,gBAEP,UAAA,gBAAAA;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,eAAc;AAAA,oBACd,gBAAe;AAAA,oBACf,aAAa;AAAA,oBACb,GAAE;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACJ;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MACF,EAAA,CACF;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;AAEA5C,EAAY,cAAc;"}
|
|
1
|
+
{"version":3,"file":"index41.js","sources":["../src/components/Join.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface JoinProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n vertical?: boolean\n}\n\nexport function Join({ children, vertical = false, className = '', ...rest }: JoinProps) {\n const classes = ['join', vertical && 'join-vertical', className].filter(Boolean).join(' ')\n\n // Automatically add join-item class to all children\n const childrenWithJoinItem = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n const existingClassName = (child.props as any).className || ''\n const newClassName = existingClassName ? `join-item ${existingClassName}` : 'join-item'\n\n return React.cloneElement(child as React.ReactElement<any>, {\n className: newClassName,\n })\n }\n return child\n })\n\n return <div className={classes} {...rest}>{childrenWithJoinItem}</div>\n}\n"],"names":["Join","children","vertical","className","rest","classes","childrenWithJoinItem","React","child","existingClassName","newClassName"],"mappings":";;AAOO,SAASA,EAAK,EAAE,UAAAC,GAAU,UAAAC,IAAW,IAAO,WAAAC,IAAY,IAAI,GAAGC,KAAmB;AACvF,QAAMC,IAAU,CAAC,QAAQH,KAAY,iBAAiBC,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAGnFG,IAAuBC,EAAM,SAAS,IAAIN,GAAU,CAACO,MAAU;AACnE,QAAID,EAAM,eAAeC,CAAK,GAAG;AAC/B,YAAMC,IAAqBD,EAAM,MAAc,aAAa,IACtDE,IAAeD,IAAoB,aAAaA,CAAiB,KAAK;AAE5E,aAAOF,EAAM,aAAaC,GAAkC;AAAA,QAC1D,WAAWE;AAAA,MAAA,CACZ;AAAA,IACH;AACA,WAAOF;AAAA,EACT,CAAC;AAED,2BAAQ,OAAA,EAAI,WAAWH,GAAU,GAAGD,GAAO,UAAAE,GAAqB;AAClE;"}
|
package/dist/index42.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
const k = {
|
|
3
|
+
xs: "kbd-xs",
|
|
4
|
+
sm: "kbd-sm",
|
|
5
|
+
md: "kbd-md",
|
|
6
|
+
lg: "kbd-lg",
|
|
7
|
+
xl: "kbd-xl"
|
|
8
|
+
}, t = ({
|
|
9
|
+
size: s,
|
|
10
|
+
children: d,
|
|
11
|
+
className: l = "",
|
|
12
|
+
...o
|
|
13
|
+
}) => {
|
|
14
|
+
const b = ["kbd", s ? k[s] : "", l].filter(Boolean).join(" ");
|
|
15
|
+
return /* @__PURE__ */ e("kbd", { className: b, ...o, children: d });
|
|
16
|
+
};
|
|
15
17
|
export {
|
|
16
|
-
|
|
18
|
+
t as Kbd
|
|
17
19
|
};
|
|
18
20
|
//# sourceMappingURL=index42.js.map
|
package/dist/index42.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index42.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index42.js","sources":["../src/components/Kbd.tsx"],"sourcesContent":["import React from 'react'\n\nexport type KbdSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nexport interface KbdProps extends React.HTMLAttributes<HTMLElement> {\n /** Size of the kbd */\n size?: KbdSize\n /** Key content */\n children?: React.ReactNode\n}\n\nconst sizeClasses: Record<KbdSize, string> = {\n xs: 'kbd-xs',\n sm: 'kbd-sm',\n md: 'kbd-md',\n lg: 'kbd-lg',\n xl: 'kbd-xl',\n}\n\nexport const Kbd: React.FC<KbdProps> = ({\n size,\n children,\n className = '',\n ...rest\n}) => {\n const classes = ['kbd', size ? sizeClasses[size] : '', className]\n .filter(Boolean)\n .join(' ')\n\n return (\n <kbd className={classes} {...rest}>\n {children}\n </kbd>\n )\n}\n"],"names":["sizeClasses","Kbd","size","children","className","rest","classes"],"mappings":";AAWA,MAAMA,IAAuC;AAAA,EAC3C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAA0B,CAAC;AAAA,EACtC,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAU,CAAC,OAAOJ,IAAOF,EAAYE,CAAI,IAAI,IAAIE,CAAS,EAC7D,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,2BACG,OAAA,EAAI,WAAWE,GAAU,GAAGD,GAC1B,UAAAF,GACH;AAEJ;"}
|
package/dist/index43.js
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
}
|
|
1
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
function c({ children: l, className: n = "", ...s }) {
|
|
3
|
+
return /* @__PURE__ */ a("span", { className: `label ${n}`, ...s, children: l });
|
|
4
|
+
}
|
|
5
|
+
function r({ children: l, label: n, size: s, className: e = "", ...t }) {
|
|
6
|
+
const i = ["floating-label", s && {
|
|
7
|
+
xs: "input-xs",
|
|
8
|
+
sm: "input-sm",
|
|
9
|
+
md: "input-md",
|
|
10
|
+
lg: "input-lg",
|
|
11
|
+
xl: "input-xl"
|
|
12
|
+
}[s], e].filter(Boolean).join(" ");
|
|
13
|
+
return /* @__PURE__ */ o("label", { className: i, ...t, children: [
|
|
14
|
+
l,
|
|
15
|
+
/* @__PURE__ */ a("span", { children: n })
|
|
16
|
+
] });
|
|
17
|
+
}
|
|
18
|
+
const m = Object.assign(c, {
|
|
19
|
+
Floating: r
|
|
20
|
+
});
|
|
18
21
|
export {
|
|
19
|
-
|
|
22
|
+
m as Label
|
|
20
23
|
};
|
|
21
24
|
//# sourceMappingURL=index43.js.map
|
package/dist/index43.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index43.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index43.js","sources":["../src/components/Label.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface LabelProps extends React.HTMLAttributes<HTMLSpanElement> {\n children: React.ReactNode\n}\n\nexport interface FloatingLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {\n children: React.ReactNode\n label: string\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n}\n\nfunction LabelRoot({ children, className = '', ...rest }: LabelProps) {\n return <span className={`label ${className}`} {...rest}>{children}</span>\n}\n\nfunction FloatingLabel({ children, label, size, className = '', ...rest }: FloatingLabelProps) {\n const sizeClasses = {\n xs: 'input-xs',\n sm: 'input-sm',\n md: 'input-md',\n lg: 'input-lg',\n xl: 'input-xl',\n }\n\n const classes = ['floating-label', size && sizeClasses[size], className].filter(Boolean).join(' ')\n\n return (\n <label className={classes} {...rest}>\n {children}\n <span>{label}</span>\n </label>\n )\n}\n\nexport const Label = Object.assign(LabelRoot, {\n Floating: FloatingLabel,\n})\n"],"names":["LabelRoot","children","className","rest","jsx","FloatingLabel","label","size","classes","jsxs","Label"],"mappings":";AAYA,SAASA,EAAU,EAAE,UAAAC,GAAU,WAAAC,IAAY,IAAI,GAAGC,KAAoB;AACpE,SAAO,gBAAAC,EAAC,UAAK,WAAW,SAASF,CAAS,IAAK,GAAGC,GAAO,UAAAF,GAAS;AACpE;AAEA,SAASI,EAAc,EAAE,UAAAJ,GAAU,OAAAK,GAAO,MAAAC,GAAM,WAAAL,IAAY,IAAI,GAAGC,KAA4B;AAS7F,QAAMK,IAAU,CAAC,kBAAkBD,KARf;AAAA,IAClB,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,EAGiDA,CAAI,GAAGL,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAEjG,SACE,gBAAAO,EAAC,SAAA,EAAM,WAAWD,GAAU,GAAGL,GAC5B,UAAA;AAAA,IAAAF;AAAA,IACD,gBAAAG,EAAC,UAAM,UAAAE,EAAA,CAAM;AAAA,EAAA,GACf;AAEJ;AAEO,MAAMI,IAAQ,OAAO,OAAOV,GAAW;AAAA,EAC5C,UAAUK;AACZ,CAAC;"}
|
package/dist/index44.js
CHANGED
|
@@ -1,24 +1,122 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { jsx as a, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
import u, { useContext as k, createContext as S, useState as w, useCallback as g } from "react";
|
|
3
|
+
const p = S(null);
|
|
4
|
+
function F() {
|
|
5
|
+
return k(p);
|
|
4
6
|
}
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
function m({ children: o, className: n = "", style: s }) {
|
|
8
|
+
const t = u.Children.toArray(o), l = t.some(
|
|
9
|
+
(e) => u.isValidElement(e) && e.type.displayName === "LayoutSider"
|
|
10
|
+
), f = [
|
|
11
|
+
"flex",
|
|
12
|
+
"min-h-0",
|
|
13
|
+
l ? "flex-row" : "flex-col",
|
|
14
|
+
n
|
|
15
|
+
].filter(Boolean).join(" "), i = l ? t.map((e) => {
|
|
16
|
+
if (u.isValidElement(e) && (e.type === m || e.type.displayName === "LayoutRoot") && e.type.displayName !== "LayoutSider") {
|
|
17
|
+
const c = e.props.className || "";
|
|
18
|
+
if (!c.includes("flex-1"))
|
|
19
|
+
return u.cloneElement(e, {
|
|
20
|
+
className: `flex-1 ${c}`.trim()
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return e;
|
|
24
|
+
}) : o;
|
|
25
|
+
return /* @__PURE__ */ a("div", { className: f, style: s, children: i });
|
|
17
26
|
}
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
m.displayName = "LayoutRoot";
|
|
28
|
+
function B({ children: o, className: n = "", style: s }) {
|
|
29
|
+
const t = [
|
|
30
|
+
"flex",
|
|
31
|
+
"items-center",
|
|
32
|
+
"px-6",
|
|
33
|
+
"h-16",
|
|
34
|
+
"bg-base-300",
|
|
35
|
+
"flex-shrink-0",
|
|
36
|
+
n
|
|
37
|
+
].filter(Boolean).join(" ");
|
|
38
|
+
return /* @__PURE__ */ a("header", { className: t, style: s, children: o });
|
|
39
|
+
}
|
|
40
|
+
function E({ children: o, className: n = "", style: s }) {
|
|
41
|
+
const t = [
|
|
42
|
+
"px-6",
|
|
43
|
+
"py-4",
|
|
44
|
+
"text-center",
|
|
45
|
+
"bg-base-300",
|
|
46
|
+
"flex-shrink-0",
|
|
47
|
+
n
|
|
48
|
+
].filter(Boolean).join(" ");
|
|
49
|
+
return /* @__PURE__ */ a("footer", { className: t, style: s, children: o });
|
|
50
|
+
}
|
|
51
|
+
function R({ children: o, className: n = "", style: s }) {
|
|
52
|
+
const t = ["flex-1", "min-h-0", "overflow-auto", n].filter(Boolean).join(" ");
|
|
53
|
+
return /* @__PURE__ */ a("main", { className: t, style: s, children: o });
|
|
54
|
+
}
|
|
55
|
+
function y({
|
|
56
|
+
children: o,
|
|
57
|
+
width: n = 200,
|
|
58
|
+
collapsedWidth: s = 80,
|
|
59
|
+
collapsed: t,
|
|
60
|
+
defaultCollapsed: l = !1,
|
|
61
|
+
collapsible: f = !1,
|
|
62
|
+
onCollapse: i,
|
|
63
|
+
trigger: e,
|
|
64
|
+
className: c = "",
|
|
65
|
+
style: C
|
|
66
|
+
}) {
|
|
67
|
+
const [b, N] = w(l), r = t ?? b, h = g(() => {
|
|
68
|
+
const x = !r;
|
|
69
|
+
t === void 0 && N(x), i?.(x);
|
|
70
|
+
}, [r, t, i]), d = r ? s : n, L = [
|
|
71
|
+
"flex",
|
|
72
|
+
"flex-col",
|
|
73
|
+
"bg-base-200",
|
|
74
|
+
"flex-shrink-0",
|
|
75
|
+
"transition-all",
|
|
76
|
+
"duration-200",
|
|
77
|
+
c
|
|
78
|
+
].filter(Boolean).join(" "), j = f && e !== null && /* @__PURE__ */ a(
|
|
79
|
+
"button",
|
|
80
|
+
{
|
|
81
|
+
onClick: h,
|
|
82
|
+
className: "flex items-center justify-center h-10 w-full bg-base-300 hover:bg-base-content/10 transition-colors",
|
|
83
|
+
"aria-label": r ? "Expand sidebar" : "Collapse sidebar",
|
|
84
|
+
children: /* @__PURE__ */ a(
|
|
85
|
+
"svg",
|
|
86
|
+
{
|
|
87
|
+
className: `w-4 h-4 transition-transform ${r ? "rotate-180" : ""}`,
|
|
88
|
+
fill: "none",
|
|
89
|
+
viewBox: "0 0 24 24",
|
|
90
|
+
stroke: "currentColor",
|
|
91
|
+
children: /* @__PURE__ */ a("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" })
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
return /* @__PURE__ */ a(p.Provider, { value: { collapsed: r, collapsedWidth: s, width: n }, children: /* @__PURE__ */ v(
|
|
97
|
+
"aside",
|
|
98
|
+
{
|
|
99
|
+
className: L,
|
|
100
|
+
style: {
|
|
101
|
+
width: typeof d == "number" ? `${d}px` : d,
|
|
102
|
+
...C
|
|
103
|
+
},
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ a("div", { className: "flex-1 overflow-auto", children: o }),
|
|
106
|
+
e !== null && (e ?? j)
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
) });
|
|
110
|
+
}
|
|
111
|
+
y.displayName = "LayoutSider";
|
|
112
|
+
const H = Object.assign(m, {
|
|
113
|
+
Header: B,
|
|
114
|
+
Footer: E,
|
|
115
|
+
Content: R,
|
|
116
|
+
Sider: y
|
|
20
117
|
});
|
|
21
118
|
export {
|
|
22
|
-
|
|
119
|
+
H as Layout,
|
|
120
|
+
F as useSiderContext
|
|
23
121
|
};
|
|
24
122
|
//# sourceMappingURL=index44.js.map
|
package/dist/index44.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index44.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index44.js","sources":["../src/components/Layout.tsx"],"sourcesContent":["import React, { createContext, useContext, useState, useCallback } from 'react'\n\nexport interface LayoutProps {\n children: React.ReactNode\n className?: string\n style?: React.CSSProperties\n}\n\nexport interface LayoutHeaderProps {\n children: React.ReactNode\n className?: string\n style?: React.CSSProperties\n}\n\nexport interface LayoutFooterProps {\n children: React.ReactNode\n className?: string\n style?: React.CSSProperties\n}\n\nexport interface LayoutContentProps {\n children: React.ReactNode\n className?: string\n style?: React.CSSProperties\n}\n\nexport interface LayoutSiderProps {\n children: React.ReactNode\n width?: number | string\n collapsedWidth?: number | string\n collapsed?: boolean\n defaultCollapsed?: boolean\n collapsible?: boolean\n onCollapse?: (collapsed: boolean) => void\n trigger?: React.ReactNode | null\n breakpoint?: 'sm' | 'md' | 'lg' | 'xl' | '2xl'\n onBreakpoint?: (broken: boolean) => void\n className?: string\n style?: React.CSSProperties\n}\n\ninterface SiderContextValue {\n collapsed: boolean\n collapsedWidth: number | string\n width: number | string\n}\n\nconst SiderContext = createContext<SiderContextValue | null>(null)\n\nexport function useSiderContext() {\n return useContext(SiderContext)\n}\n\nfunction LayoutRoot({ children, className = '', style }: LayoutProps) {\n // Check if any child is a Sider to determine flex direction\n const childArray = React.Children.toArray(children)\n const hasSider = childArray.some(\n (child) => React.isValidElement(child) && (child.type as any).displayName === 'LayoutSider'\n )\n\n const layoutClasses = [\n 'flex',\n 'min-h-0',\n hasSider ? 'flex-row' : 'flex-col',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n // If we have a Sider, auto-add flex-1 to non-Sider Layout children\n const processedChildren = hasSider\n ? childArray.map((child) => {\n if (\n React.isValidElement(child) &&\n (child.type === LayoutRoot || (child.type as any).displayName === 'LayoutRoot') &&\n (child.type as any).displayName !== 'LayoutSider'\n ) {\n // Clone the Layout child and add flex-1 if not already present\n const existingClassName = (child.props as any).className || ''\n if (!existingClassName.includes('flex-1')) {\n return React.cloneElement(child as React.ReactElement<any>, {\n className: `flex-1 ${existingClassName}`.trim(),\n })\n }\n }\n return child\n })\n : children\n\n return (\n <div className={layoutClasses} style={style}>\n {processedChildren}\n </div>\n )\n}\n\nLayoutRoot.displayName = 'LayoutRoot'\n\nfunction LayoutHeader({ children, className = '', style }: LayoutHeaderProps) {\n const headerClasses = [\n 'flex',\n 'items-center',\n 'px-6',\n 'h-16',\n 'bg-base-300',\n 'flex-shrink-0',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return (\n <header className={headerClasses} style={style}>\n {children}\n </header>\n )\n}\n\nfunction LayoutFooter({ children, className = '', style }: LayoutFooterProps) {\n const footerClasses = [\n 'px-6',\n 'py-4',\n 'text-center',\n 'bg-base-300',\n 'flex-shrink-0',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return (\n <footer className={footerClasses} style={style}>\n {children}\n </footer>\n )\n}\n\nfunction LayoutContent({ children, className = '', style }: LayoutContentProps) {\n // flex-1 by default so Content fills available space\n const contentClasses = ['flex-1', 'min-h-0', 'overflow-auto', className].filter(Boolean).join(' ')\n\n return (\n <main className={contentClasses} style={style}>\n {children}\n </main>\n )\n}\n\nfunction LayoutSider({\n children,\n width = 200,\n collapsedWidth = 80,\n collapsed: controlledCollapsed,\n defaultCollapsed = false,\n collapsible = false,\n onCollapse,\n trigger,\n className = '',\n style,\n}: LayoutSiderProps) {\n const [internalCollapsed, setInternalCollapsed] = useState(defaultCollapsed)\n\n const collapsed = controlledCollapsed ?? internalCollapsed\n\n const handleCollapse = useCallback(() => {\n const newCollapsed = !collapsed\n if (controlledCollapsed === undefined) {\n setInternalCollapsed(newCollapsed)\n }\n onCollapse?.(newCollapsed)\n }, [collapsed, controlledCollapsed, onCollapse])\n\n const currentWidth = collapsed ? collapsedWidth : width\n\n const siderClasses = [\n 'flex',\n 'flex-col',\n 'bg-base-200',\n 'flex-shrink-0',\n 'transition-all',\n 'duration-200',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const defaultTrigger = collapsible && trigger !== null && (\n <button\n onClick={handleCollapse}\n className=\"flex items-center justify-center h-10 w-full bg-base-300 hover:bg-base-content/10 transition-colors\"\n aria-label={collapsed ? 'Expand sidebar' : 'Collapse sidebar'}\n >\n <svg\n className={`w-4 h-4 transition-transform ${collapsed ? 'rotate-180' : ''}`}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15 19l-7-7 7-7\" />\n </svg>\n </button>\n )\n\n return (\n <SiderContext.Provider value={{ collapsed, collapsedWidth, width }}>\n <aside\n className={siderClasses}\n style={{\n width: typeof currentWidth === 'number' ? `${currentWidth}px` : currentWidth,\n ...style,\n }}\n >\n <div className=\"flex-1 overflow-auto\">{children}</div>\n {trigger !== null && (trigger ?? defaultTrigger)}\n </aside>\n </SiderContext.Provider>\n )\n}\n\nLayoutSider.displayName = 'LayoutSider'\n\nexport const Layout = Object.assign(LayoutRoot, {\n Header: LayoutHeader,\n Footer: LayoutFooter,\n Content: LayoutContent,\n Sider: LayoutSider,\n})\n"],"names":["SiderContext","createContext","useSiderContext","useContext","LayoutRoot","children","className","style","childArray","React","hasSider","child","layoutClasses","processedChildren","existingClassName","jsx","LayoutHeader","headerClasses","LayoutFooter","footerClasses","LayoutContent","contentClasses","LayoutSider","width","collapsedWidth","controlledCollapsed","defaultCollapsed","collapsible","onCollapse","trigger","internalCollapsed","setInternalCollapsed","useState","collapsed","handleCollapse","useCallback","newCollapsed","currentWidth","siderClasses","defaultTrigger","jsxs","Layout"],"mappings":";;AA+CA,MAAMA,IAAeC,EAAwC,IAAI;AAE1D,SAASC,IAAkB;AAChC,SAAOC,EAAWH,CAAY;AAChC;AAEA,SAASI,EAAW,EAAE,UAAAC,GAAU,WAAAC,IAAY,IAAI,OAAAC,KAAsB;AAEpE,QAAMC,IAAaC,EAAM,SAAS,QAAQJ,CAAQ,GAC5CK,IAAWF,EAAW;AAAA,IAC1B,CAACG,MAAUF,EAAM,eAAeE,CAAK,KAAMA,EAAM,KAAa,gBAAgB;AAAA,EAAA,GAG1EC,IAAgB;AAAA,IACpB;AAAA,IACA;AAAA,IACAF,IAAW,aAAa;AAAA,IACxBJ;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,GAGLO,IAAoBH,IACtBF,EAAW,IAAI,CAACG,MAAU;AACxB,QACEF,EAAM,eAAeE,CAAK,MACzBA,EAAM,SAASP,KAAeO,EAAM,KAAa,gBAAgB,iBACjEA,EAAM,KAAa,gBAAgB,eACpC;AAEA,YAAMG,IAAqBH,EAAM,MAAc,aAAa;AAC5D,UAAI,CAACG,EAAkB,SAAS,QAAQ;AACtC,eAAOL,EAAM,aAAaE,G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