asterui 0.10.3 → 0.12.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/README.md +1 -100
- package/dist/components/Anchor.d.ts +45 -0
- package/dist/components/Diff.d.ts +12 -0
- package/dist/components/Kbd.d.ts +8 -0
- package/dist/components/Segmented.d.ts +37 -0
- package/dist/components/TextRotate.d.ts +13 -0
- package/dist/components/Tour.d.ts +61 -0
- package/dist/hooks/useClickOutside.d.ts +17 -0
- package/dist/hooks/useClipboard.d.ts +20 -0
- package/dist/hooks/useDebounce.d.ts +18 -0
- package/dist/hooks/useDisclosure.d.ts +20 -0
- package/dist/hooks/useHover.d.ts +18 -0
- package/dist/hooks/useKeyPress.d.ts +40 -0
- package/dist/hooks/useLocalStorage.d.ts +12 -0
- package/dist/hooks/usePrevious.d.ts +15 -0
- package/dist/hooks/useWindowSize.d.ts +21 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +205 -174
- package/dist/index.js.map +1 -1
- package/dist/index10.js +92 -30
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +12 -20
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +29 -22
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +17 -19
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +10788 -95
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +5 -360
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +40 -23
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +2 -73
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +6 -15
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +147 -61
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +26 -140
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +28 -263
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +30 -2
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +2 -56
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +72 -2
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +39 -2
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +26 -2
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +21 -2
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +24 -2
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +20 -2
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +100 -2
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +359 -31
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +259 -89
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +25 -2
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +72 -7
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +16 -2
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +66 -2
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +143 -20
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index126.js +55 -23
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +2 -71
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -21
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +2 -34
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +90 -153
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +2 -70
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -2
- package/dist/index132.js +2 -2
- package/dist/index133.js +2 -22
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +2 -2
- package/dist/index135.js +32 -2
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +2 -2
- package/dist/index137.js +8 -2
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +2 -4
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +5 -0
- package/dist/index139.js.map +1 -0
- package/dist/index14.js +154 -146
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +24 -0
- package/dist/index140.js.map +1 -0
- package/dist/index141.js +5 -0
- package/dist/index141.js.map +1 -0
- package/dist/index142.js +27 -0
- package/dist/index142.js.map +1 -0
- package/dist/index143.js +74 -0
- package/dist/index143.js.map +1 -0
- package/dist/index144.js +24 -0
- package/dist/index144.js.map +1 -0
- package/dist/index145.js +37 -0
- package/dist/index145.js.map +1 -0
- package/dist/index146.js +73 -0
- package/dist/index146.js.map +1 -0
- package/dist/index147.js +5 -0
- package/dist/index147.js.map +1 -0
- package/dist/index148.js +25 -0
- package/dist/index148.js.map +1 -0
- package/dist/index149.js +5 -0
- package/dist/index149.js.map +1 -0
- package/dist/index15.js +150 -5
- package/dist/index15.js.map +1 -1
- package/dist/index150.js +5 -0
- package/dist/index150.js.map +1 -0
- package/dist/index151.js +5 -0
- package/dist/index151.js.map +1 -0
- package/dist/index152.js +5 -0
- package/dist/index152.js.map +1 -0
- package/dist/index153.js +7 -0
- package/dist/index153.js.map +1 -0
- package/dist/index16.js +5 -71
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +71 -17
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +15 -96
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +89 -105
- package/dist/index19.js.map +1 -1
- package/dist/index20.js +107 -177
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +181 -107
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +107 -29
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +19 -41
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +31 -11
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +41 -33
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +12 -63
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +33 -80
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +63 -18
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +78 -159
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +96 -27
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +16 -1080
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +159 -16
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +1081 -121
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +17 -39
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +121 -190
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +37 -94
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +186 -157
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +89 -138
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +161 -14
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +146 -21
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +26 -99
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +12 -116
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +18 -13
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +21 -35
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +117 -114
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +13 -176
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +34 -146
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +116 -12
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +176 -22
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +147 -14
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +10 -5
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +100 -60
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +21 -265
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +10 -13
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +7 -122
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +262 -106
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +14 -167
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +121 -31
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +107 -119
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +161 -77
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +31 -19
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +117 -69
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +61 -130
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +82 -53
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +19 -44
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +70 -48
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +55 -60
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +39 -101
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +52 -41
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +62 -21
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +104 -43
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +41 -134
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +65 -49
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +130 -11
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +21 -22
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +46 -22
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +126 -321
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +52 -56
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +22 -40
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +22 -95
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +311 -112
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +52 -157
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +40 -65
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +23 -35
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +11 -70
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +92 -31
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +116 -196
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +155 -207
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +60 -290
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +34 -177
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +227 -251
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +34 -14
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +208 -31
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +206 -10786
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +295 -5
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +69 -91
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +172 -36
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +258 -2
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +13 -6
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +32 -151
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +5 -29
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +12 -28
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +46 -2
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +12 -71
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +13 -37
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +7 -25
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
package/dist/index72.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index72.js","sources":["../src/components/Table.tsx"],"sourcesContent":["import React, { useState } from 'react'\n\nexport interface FilterConfig {\n text: string\n value: string | number | boolean\n}\n\nexport interface ColumnType<T = any> {\n key: string\n title: string\n dataIndex?: string\n render?: (value: any, record: T, index: number) => React.ReactNode\n width?: string | number\n align?: 'left' | 'center' | 'right'\n fixed?: 'left' | 'right'\n sorter?: boolean | ((a: T, b: T) => number)\n filters?: FilterConfig[]\n onFilter?: (value: string | number | boolean, record: T) => boolean\n defaultSortOrder?: 'ascend' | 'descend'\n defaultFilteredValue?: (string | number | boolean)[]\n}\n\nexport interface RowSelection<T = any> {\n type?: 'checkbox' | 'radio'\n selectedRowKeys?: React.Key[]\n onChange?: (selectedRowKeys: React.Key[], selectedRows: T[]) => void\n getCheckboxProps?: (record: T) => { disabled?: boolean; [key: string]: any }\n}\n\nexport interface PaginationConfig {\n current?: number\n pageSize?: number\n total?: number\n onChange?: (page: number, pageSize: number) => void\n}\n\nexport interface TableProps<T = any> {\n columns: ColumnType<T>[]\n dataSource: T[]\n rowKey?: string | ((record: T) => string)\n loading?: boolean\n size?: 'xs' | 'sm' | 'md' | 'lg'\n bordered?: boolean\n hoverable?: boolean\n striped?: boolean\n pinRows?: boolean\n pinCols?: boolean\n pagination?: false | PaginationConfig\n rowSelection?: RowSelection<T>\n className?: string\n onRow?: (record: T, index: number) => React.HTMLAttributes<HTMLTableRowElement>\n}\n\nfunction FilterDropdown({\n filters,\n selectedValues,\n onChange,\n}: {\n filters: FilterConfig[]\n selectedValues: (string | number | boolean)[]\n onChange: (values: (string | number | boolean)[]) => void\n}) {\n const [isOpen, setIsOpen] = useState(false)\n\n const handleToggle = (value: string | number | boolean) => {\n const newValues = selectedValues.includes(value)\n ? selectedValues.filter((v) => v !== value)\n : [...selectedValues, value]\n onChange(newValues)\n }\n\n const handleClear = () => {\n onChange([])\n setIsOpen(false)\n }\n\n return (\n <div className=\"dropdown dropdown-end\">\n <button\n tabIndex={0}\n className={`btn btn-ghost btn-xs ${selectedValues.length > 0 ? 'text-primary' : ''}`}\n onClick={() => setIsOpen(!isOpen)}\n >\n <svg className=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z\" />\n </svg>\n </button>\n {isOpen && (\n <div\n tabIndex={0}\n className=\"dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-52 border border-base-content/10\"\n >\n <div className=\"space-y-2\">\n {filters.map((filter) => (\n <label key={String(filter.value)} className=\"flex items-center gap-2 cursor-pointer p-2 hover:bg-base-200 rounded\">\n <input\n type=\"checkbox\"\n className=\"checkbox checkbox-xs\"\n checked={selectedValues.includes(filter.value)}\n onChange={() => handleToggle(filter.value)}\n />\n <span className=\"text-sm\">{filter.text}</span>\n </label>\n ))}\n </div>\n <div className=\"divider my-1\"></div>\n <button\n className=\"btn btn-ghost btn-xs w-full\"\n onClick={handleClear}\n >\n Clear\n </button>\n </div>\n )}\n </div>\n )\n}\n\nexport function Table<T extends Record<string, any>>({\n columns,\n dataSource,\n rowKey = 'id',\n loading = false,\n size = 'md',\n bordered = false,\n hoverable = true,\n striped = false,\n pinRows = false,\n pinCols = false,\n pagination,\n rowSelection,\n className = '',\n onRow,\n}: TableProps<T>) {\n const defaultPageSize = 10\n const [currentPage, setCurrentPage] = useState(\n pagination !== false && pagination?.current ? pagination.current : 1\n )\n const pageSize = pagination !== false && pagination?.pageSize ? pagination.pageSize : defaultPageSize\n\n // Sorting state\n const [sortState, setSortState] = useState<{\n columnKey: string | null\n order: 'ascend' | 'descend' | null\n }>(() => {\n const defaultSortColumn = columns.find((col) => col.defaultSortOrder)\n return {\n columnKey: defaultSortColumn?.key || null,\n order: defaultSortColumn?.defaultSortOrder || null,\n }\n })\n\n // Filtering state\n const [filterState, setFilterState] = useState<Record<string, (string | number | boolean)[]>>(() => {\n const initial: Record<string, (string | number | boolean)[]> = {}\n columns.forEach((col) => {\n if (col.defaultFilteredValue) {\n initial[col.key] = col.defaultFilteredValue\n }\n })\n return initial\n })\n\n // Row selection state\n const [selectedKeys, setSelectedKeys] = useState<React.Key[]>(\n rowSelection?.selectedRowKeys || []\n )\n\n const isPaginationEnabled = pagination !== false\n\n // Apply filters\n let filteredData = [...dataSource]\n Object.entries(filterState).forEach(([columnKey, filterValues]) => {\n if (filterValues.length > 0) {\n const column = columns.find((col) => col.key === columnKey)\n if (column?.onFilter) {\n filteredData = filteredData.filter((record) =>\n filterValues.some((value) => column.onFilter!(value, record))\n )\n }\n }\n })\n\n // Apply sorting\n if (sortState.columnKey && sortState.order) {\n const column = columns.find((col) => col.key === sortState.columnKey)\n if (column?.sorter) {\n filteredData.sort((a, b) => {\n let result = 0\n if (typeof column.sorter === 'function') {\n result = column.sorter(a, b)\n } else if (column.dataIndex) {\n const aVal = a[column.dataIndex]\n const bVal = b[column.dataIndex]\n if (aVal < bVal) result = -1\n if (aVal > bVal) result = 1\n }\n return sortState.order === 'ascend' ? result : -result\n })\n }\n }\n\n const totalPages = Math.ceil(filteredData.length / pageSize)\n const startIndex = (currentPage - 1) * pageSize\n const endIndex = startIndex + pageSize\n const paginatedData = isPaginationEnabled ? filteredData.slice(startIndex, endIndex) : filteredData\n\n const handlePageChange = (page: number) => {\n setCurrentPage(page)\n if (pagination !== false && pagination?.onChange) {\n pagination.onChange(page, pageSize)\n }\n }\n\n const handleSort = (columnKey: string) => {\n setSortState((prev) => {\n if (prev.columnKey === columnKey) {\n // Cycle through: ascend -> descend -> null\n if (prev.order === 'ascend') return { columnKey, order: 'descend' }\n if (prev.order === 'descend') return { columnKey: null, order: null }\n }\n return { columnKey, order: 'ascend' }\n })\n setCurrentPage(1) // Reset to first page when sorting\n }\n\n const handleFilterChange = (columnKey: string, values: (string | number | boolean)[]) => {\n setFilterState((prev) => ({\n ...prev,\n [columnKey]: values,\n }))\n setCurrentPage(1) // Reset to first page when filtering\n }\n\n const handleSelectAll = (checked: boolean) => {\n const newSelectedKeys = checked\n ? paginatedData.map((record, index) => getRowKey(record, index))\n : []\n setSelectedKeys(newSelectedKeys)\n if (rowSelection?.onChange) {\n const selectedRecords = checked ? paginatedData : []\n rowSelection.onChange(newSelectedKeys, selectedRecords)\n }\n }\n\n const handleSelectRow = (record: T, index: number, checked: boolean) => {\n const key = getRowKey(record, index)\n const newSelectedKeys = checked\n ? [...selectedKeys, key]\n : selectedKeys.filter((k) => k !== key)\n setSelectedKeys(newSelectedKeys)\n if (rowSelection?.onChange) {\n const selectedRecords = filteredData.filter((r, i) =>\n newSelectedKeys.includes(getRowKey(r, i))\n )\n rowSelection.onChange(newSelectedKeys, selectedRecords)\n }\n }\n\n const getRowKey = (record: T, index: number): string => {\n if (typeof rowKey === 'function') {\n return rowKey(record)\n }\n return record[rowKey] ?? index.toString()\n }\n\n const getCellValue = (column: ColumnType<T>, record: T, index: number) => {\n if (column.render) {\n return column.render(\n column.dataIndex ? record[column.dataIndex] : undefined,\n record,\n index\n )\n }\n return column.dataIndex ? record[column.dataIndex] : ''\n }\n\n const getAlignClass = (align?: 'left' | 'center' | 'right') => {\n if (align === 'center') return 'text-center'\n if (align === 'right') return 'text-right'\n return 'text-left'\n }\n\n // Calculate fixed column offsets\n const getFixedColumnStyle = (columnIndex: number, isHeader = false): { className: string; style?: React.CSSProperties } => {\n const column = columns[columnIndex]\n if (!column.fixed) return { className: '' }\n\n const classes = ['sticky', 'bg-base-100']\n let offset = 0\n const style: React.CSSProperties = {\n boxSizing: 'border-box',\n }\n\n // Calculate cumulative width for left-fixed columns\n if (column.fixed === 'left') {\n for (let i = 0; i < columnIndex; i++) {\n if (columns[i].fixed === 'left' && columns[i].width) {\n const colWidth = columns[i].width!\n const width = typeof colWidth === 'number'\n ? colWidth\n : parseInt(String(colWidth))\n if (!isNaN(width)) {\n offset += width\n }\n }\n }\n if (offset === 0) {\n classes.push('left-0')\n } else {\n style.left = `${offset}px`\n }\n classes.push(isHeader ? 'z-30' : 'z-20')\n\n // Add shadow to the rightmost left-fixed column\n let lastLeftFixedIndex = -1\n for (let i = columns.length - 1; i >= 0; i--) {\n if (columns[i].fixed === 'left') {\n lastLeftFixedIndex = i\n break\n }\n }\n if (columnIndex === lastLeftFixedIndex) {\n style.boxShadow = '2px 0 4px rgba(0, 0, 0, 0.1)'\n }\n }\n\n // Calculate cumulative width for right-fixed columns\n if (column.fixed === 'right') {\n for (let i = columnIndex + 1; i < columns.length; i++) {\n if (columns[i].fixed === 'right' && columns[i].width) {\n const colWidth = columns[i].width!\n const width = typeof colWidth === 'number'\n ? colWidth\n : parseInt(String(colWidth))\n if (!isNaN(width)) {\n offset += width\n }\n }\n }\n if (offset === 0) {\n classes.push('right-0')\n } else {\n style.right = `${offset}px`\n }\n classes.push(isHeader ? 'z-30' : 'z-20')\n\n // Add shadow to the leftmost right-fixed column\n const isFirstRightFixed = columnIndex === columns.findIndex((col) => col.fixed === 'right')\n if (isFirstRightFixed) {\n style.boxShadow = '-2px 0 4px rgba(0, 0, 0, 0.1)'\n }\n }\n\n return {\n className: classes.filter(Boolean).join(' '),\n style: Object.keys(style).length > 0 ? style : undefined,\n }\n }\n\n const tableClasses = [\n 'table',\n 'bg-base-100',\n size === 'xs' && 'table-xs',\n size === 'sm' && 'table-sm',\n size === 'lg' && 'table-lg',\n striped && 'table-zebra',\n pinRows && 'table-pin-rows',\n pinCols && 'table-pin-cols',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n // Check if any columns are fixed\n const hasFixedColumns = columns.some((col) => col.fixed)\n\n const wrapperClasses = [\n (!pinRows || hasFixedColumns) && 'overflow-x-auto',\n bordered && 'rounded-box border border-base-content/5 bg-base-100',\n ]\n .filter(Boolean)\n .join(' ')\n\n if (loading) {\n return (\n <div className=\"flex justify-center items-center p-8\">\n <span className=\"loading loading-spinner loading-lg\"></span>\n </div>\n )\n }\n\n const isAllSelected = paginatedData.length > 0 && selectedKeys.length === paginatedData.length\n\n return (\n <div className=\"space-y-4\">\n <div className={wrapperClasses}>\n <table className={tableClasses} style={{ borderCollapse: 'separate', borderSpacing: 0, tableLayout: 'fixed' }}>\n <thead>\n <tr>\n {rowSelection && (\n <th style={{ width: 50 }} className=\"sticky left-0 z-20 bg-base-100\">\n {rowSelection.type !== 'radio' && (\n <input\n type=\"checkbox\"\n className=\"checkbox checkbox-sm\"\n checked={isAllSelected}\n onChange={(e) => handleSelectAll(e.target.checked)}\n />\n )}\n </th>\n )}\n {columns.map((column, columnIndex) => {\n const fixedStyle = getFixedColumnStyle(columnIndex, true)\n return (\n <th\n key={column.key}\n className={`${getAlignClass(column.align)} ${fixedStyle.className}`}\n style={{\n ...(column.width ? { width: column.width } : {}),\n ...fixedStyle.style,\n }}\n >\n <div className=\"flex items-center gap-2\">\n <span\n className={column.sorter ? 'cursor-pointer select-none' : ''}\n onClick={() => column.sorter && handleSort(column.key)}\n >\n {column.title}\n </span>\n {column.sorter && (\n <div className=\"flex flex-col\">\n <svg\n className={`w-3 h-3 ${sortState.columnKey === column.key && sortState.order === 'ascend' ? 'text-primary' : 'text-base-content/30'}`}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path d=\"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z\" />\n </svg>\n <svg\n className={`w-3 h-3 -mt-1 ${sortState.columnKey === column.key && sortState.order === 'descend' ? 'text-primary' : 'text-base-content/30'}`}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path d=\"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z\" />\n </svg>\n </div>\n )}\n {column.filters && (\n <FilterDropdown\n filters={column.filters}\n selectedValues={filterState[column.key] || []}\n onChange={(values) => handleFilterChange(column.key, values)}\n />\n )}\n </div>\n </th>\n )\n })}\n </tr>\n </thead>\n <tbody>\n {paginatedData.map((record, index) => {\n const rowProps = onRow?.(record, index) || {}\n const key = getRowKey(record, index)\n const isSelected = selectedKeys.includes(key)\n const rowClasses = [\n hoverable && 'hover:bg-base-300',\n isSelected && 'bg-primary/10',\n ]\n .filter(Boolean)\n .join(' ')\n\n const checkboxProps = rowSelection?.getCheckboxProps?.(record) || {}\n\n return (\n <tr\n key={key}\n className={rowClasses}\n {...rowProps}\n >\n {rowSelection && (\n <td className=\"sticky left-0 z-10 bg-base-100\">\n <input\n type={rowSelection.type === 'radio' ? 'radio' : 'checkbox'}\n className={rowSelection.type === 'radio' ? 'radio radio-sm' : 'checkbox checkbox-sm'}\n checked={isSelected}\n onChange={(e) => handleSelectRow(record, index, e.target.checked)}\n {...checkboxProps}\n />\n </td>\n )}\n {columns.map((column, columnIndex) => {\n const fixedStyle = getFixedColumnStyle(columnIndex, false)\n return (\n <td\n key={column.key}\n className={`${getAlignClass(column.align)} ${fixedStyle.className}`}\n style={fixedStyle.style}\n >\n {getCellValue(column, record, index)}\n </td>\n )\n })}\n </tr>\n )\n })}\n </tbody>\n </table>\n </div>\n\n {isPaginationEnabled && totalPages > 1 && (\n <div className=\"flex justify-end\">\n <div className=\"join\">\n <button\n className=\"join-item btn btn-sm\"\n onClick={() => handlePageChange(currentPage - 1)}\n disabled={currentPage === 1}\n >\n «\n </button>\n {Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => (\n <button\n key={page}\n className={`join-item btn btn-sm ${currentPage === page ? 'btn-active' : ''}`}\n onClick={() => handlePageChange(page)}\n >\n {page}\n </button>\n ))}\n <button\n className=\"join-item btn btn-sm\"\n onClick={() => handlePageChange(currentPage + 1)}\n disabled={currentPage === totalPages}\n >\n »\n </button>\n </div>\n </div>\n )}\n </div>\n )\n}\n"],"names":["FilterDropdown","filters","selectedValues","onChange","isOpen","setIsOpen","useState","handleToggle","value","newValues","v","handleClear","jsxs","jsx","filter","Table","columns","dataSource","rowKey","loading","size","bordered","hoverable","striped","pinRows","pinCols","pagination","rowSelection","className","onRow","currentPage","setCurrentPage","pageSize","sortState","setSortState","defaultSortColumn","col","filterState","setFilterState","initial","selectedKeys","setSelectedKeys","isPaginationEnabled","filteredData","columnKey","filterValues","column","record","a","b","result","aVal","bVal","totalPages","startIndex","endIndex","paginatedData","handlePageChange","page","handleSort","prev","handleFilterChange","values","handleSelectAll","checked","newSelectedKeys","index","getRowKey","selectedRecords","handleSelectRow","key","k","r","i","getCellValue","getAlignClass","align","getFixedColumnStyle","columnIndex","isHeader","classes","offset","style","colWidth","width","lastLeftFixedIndex","tableClasses","hasFixedColumns","wrapperClasses","isAllSelected","fixedStyle","rowProps","isSelected","rowClasses","checkboxProps","e","_"],"mappings":";;AAqDA,SAASA,GAAe;AA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IAAa,KACnC,gBAAAxC,EAAC,OAAA,EAAI,WAAU,oBACb,UAAA,gBAAAD,EAAC,OAAA,EAAI,WAAU,QACb,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,MAAM4C,EAAiB3B,IAAc,CAAC;AAAA,UAC/C,UAAUA,MAAgB;AAAA,UAC3B,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,MAGA,MAAM,KAAK,EAAE,QAAQuB,KAAc,CAAC2C,GAAGvB,MAAMA,IAAI,CAAC,EAAE,IAAI,CAACf,MACxD,gBAAA7C;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC,WAAW,wBAAwBiB,MAAgB4B,IAAO,eAAe,EAAE;AAAA,UAC3E,SAAS,MAAMD,EAAiBC,CAAI;AAAA,UAEnC,UAAAA;AAAA,QAAA;AAAA,QAJIA;AAAA,MAAA,CAMR;AAAA,MACD,gBAAA7C;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,MAAM4C,EAAiB3B,IAAc,CAAC;AAAA,UAC/C,UAAUA,MAAgBuB;AAAA,UAC3B,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAED,EAAA,CACF,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index72.js","sources":["../src/components/Splitter.tsx"],"sourcesContent":["import React, { useState, useRef, useCallback, useEffect } from 'react'\n\nexport interface SplitterPanelProps {\n children: React.ReactNode\n defaultSize?: number\n size?: number\n minSize?: number\n maxSize?: number\n collapsible?: boolean\n collapsed?: boolean\n onCollapse?: (collapsed: boolean) => void\n className?: string\n}\n\nexport interface SplitterProps {\n children: React.ReactNode\n direction?: 'horizontal' | 'vertical'\n sizes?: number[]\n defaultSizes?: number[]\n onSizesChange?: (sizes: number[]) => void\n gutterSize?: number\n minSize?: number\n className?: string\n}\n\nconst Panel: React.FC<SplitterPanelProps> = ({ children }) => {\n return <>{children}</>\n}\n\nexport const Splitter: React.FC<SplitterProps> & { Panel: typeof Panel } = ({\n children,\n direction = 'horizontal',\n sizes,\n defaultSizes,\n onSizesChange,\n gutterSize = 8,\n minSize = 50,\n className = '',\n}) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const panelsRef = useRef<(HTMLDivElement | null)[]>([])\n const draggingRef = useRef<{ index: number; startPos: number; startSizes: number[] } | null>(null)\n\n // Extract panel props from children\n const panels = React.Children.toArray(children).filter(\n (child): child is React.ReactElement<SplitterPanelProps> =>\n React.isValidElement(child)\n )\n\n const panelCount = panels.length\n\n // Initialize sizes\n const getInitialSizes = useCallback(() => {\n if (defaultSizes && defaultSizes.length === panelCount) {\n return defaultSizes\n }\n // Equal distribution\n const equalSize = 100 / panelCount\n return Array(panelCount).fill(equalSize)\n }, [defaultSizes, panelCount])\n\n const [internalSizes, setInternalSizes] = useState<number[]>(getInitialSizes)\n const currentSizes = sizes || internalSizes\n\n // Update internal sizes when panel count changes\n useEffect(() => {\n if (!sizes && internalSizes.length !== panelCount) {\n setInternalSizes(getInitialSizes())\n }\n }, [panelCount, sizes, internalSizes.length, getInitialSizes])\n\n const updateSizes = useCallback(\n (newSizes: number[]) => {\n if (!sizes) {\n setInternalSizes(newSizes)\n }\n onSizesChange?.(newSizes)\n },\n [sizes, onSizesChange]\n )\n\n const handleMouseDown = useCallback(\n (index: number, e: React.MouseEvent) => {\n e.preventDefault()\n const startPos = direction === 'horizontal' ? e.clientX : e.clientY\n draggingRef.current = {\n index,\n startPos,\n startSizes: [...currentSizes],\n }\n\n const handleMouseMove = (moveEvent: MouseEvent) => {\n if (!draggingRef.current || !containerRef.current) return\n\n const { index: dragIndex, startPos: dragStartPos, startSizes } = draggingRef.current\n const containerRect = containerRef.current.getBoundingClientRect()\n const containerSize = direction === 'horizontal' ? containerRect.width : containerRect.height\n const currentPos = direction === 'horizontal' ? moveEvent.clientX : moveEvent.clientY\n\n // Calculate delta as percentage\n const gutterCount = panelCount - 1\n const totalGutterSize = gutterCount * gutterSize\n const availableSize = containerSize - totalGutterSize\n const deltaPixels = currentPos - dragStartPos\n const deltaPercent = (deltaPixels / availableSize) * 100\n\n // Get min sizes for panels\n const panel1Props = panels[dragIndex]?.props || {}\n const panel2Props = panels[dragIndex + 1]?.props || {}\n const minSize1 = panel1Props.minSize ?? minSize\n const minSize2 = panel2Props.minSize ?? minSize\n const minPercent1 = (minSize1 / availableSize) * 100\n const minPercent2 = (minSize2 / availableSize) * 100\n\n // Calculate new sizes\n let newSize1 = startSizes[dragIndex] + deltaPercent\n let newSize2 = startSizes[dragIndex + 1] - deltaPercent\n\n // Apply min constraints\n if (newSize1 < minPercent1) {\n newSize1 = minPercent1\n newSize2 = startSizes[dragIndex] + startSizes[dragIndex + 1] - minPercent1\n }\n if (newSize2 < minPercent2) {\n newSize2 = minPercent2\n newSize1 = startSizes[dragIndex] + startSizes[dragIndex + 1] - minPercent2\n }\n\n // Apply max constraints\n const maxSize1 = panel1Props.maxSize\n const maxSize2 = panel2Props.maxSize\n if (maxSize1) {\n const maxPercent1 = (maxSize1 / availableSize) * 100\n if (newSize1 > maxPercent1) {\n newSize1 = maxPercent1\n newSize2 = startSizes[dragIndex] + startSizes[dragIndex + 1] - maxPercent1\n }\n }\n if (maxSize2) {\n const maxPercent2 = (maxSize2 / availableSize) * 100\n if (newSize2 > maxPercent2) {\n newSize2 = maxPercent2\n newSize1 = startSizes[dragIndex] + startSizes[dragIndex + 1] - maxPercent2\n }\n }\n\n const newSizes = [...startSizes]\n newSizes[dragIndex] = newSize1\n newSizes[dragIndex + 1] = newSize2\n updateSizes(newSizes)\n }\n\n const handleMouseUp = () => {\n draggingRef.current = null\n document.removeEventListener('mousemove', handleMouseMove)\n document.removeEventListener('mouseup', handleMouseUp)\n document.body.style.cursor = ''\n document.body.style.userSelect = ''\n }\n\n document.addEventListener('mousemove', handleMouseMove)\n document.addEventListener('mouseup', handleMouseUp)\n document.body.style.cursor = direction === 'horizontal' ? 'col-resize' : 'row-resize'\n document.body.style.userSelect = 'none'\n },\n [direction, currentSizes, panelCount, gutterSize, panels, minSize, updateSizes]\n )\n\n const handleKeyDown = useCallback(\n (index: number, e: React.KeyboardEvent) => {\n const step = e.shiftKey ? 10 : 1\n let delta = 0\n\n if (direction === 'horizontal') {\n if (e.key === 'ArrowLeft') delta = -step\n else if (e.key === 'ArrowRight') delta = step\n } else {\n if (e.key === 'ArrowUp') delta = -step\n else if (e.key === 'ArrowDown') delta = step\n }\n\n if (delta !== 0) {\n e.preventDefault()\n const newSizes = [...currentSizes]\n const minPercent = 5 // Minimum 5% when using keyboard\n\n let newSize1 = newSizes[index] + delta\n let newSize2 = newSizes[index + 1] - delta\n\n if (newSize1 >= minPercent && newSize2 >= minPercent) {\n newSizes[index] = newSize1\n newSizes[index + 1] = newSize2\n updateSizes(newSizes)\n }\n }\n },\n [direction, currentSizes, updateSizes]\n )\n\n const isHorizontal = direction === 'horizontal'\n\n return (\n <div\n ref={containerRef}\n className={`flex ${isHorizontal ? 'flex-row' : 'flex-col'} h-full w-full ${className}`}\n >\n {panels.map((panel, index) => {\n const panelProps = panel.props\n const isLast = index === panels.length - 1\n\n return (\n <React.Fragment key={index}>\n <div\n ref={(el) => {\n panelsRef.current[index] = el\n }}\n className={`overflow-auto ${panelProps.className || ''}`}\n style={{\n [isHorizontal ? 'width' : 'height']: `calc(${currentSizes[index]}% - ${\n ((panelCount - 1) * gutterSize) / panelCount\n }px)`,\n flexShrink: 0,\n }}\n >\n {panelProps.children}\n </div>\n {!isLast && (\n <div\n role=\"separator\"\n aria-orientation={isHorizontal ? 'vertical' : 'horizontal'}\n aria-valuenow={Math.round(currentSizes[index])}\n tabIndex={0}\n className={`\n flex-shrink-0 bg-base-300 hover:bg-primary/30 active:bg-primary/50\n transition-colors duration-150 relative group\n ${isHorizontal ? 'cursor-col-resize' : 'cursor-row-resize'}\n `}\n style={{\n [isHorizontal ? 'width' : 'height']: `${gutterSize}px`,\n }}\n onMouseDown={(e) => handleMouseDown(index, e)}\n onKeyDown={(e) => handleKeyDown(index, e)}\n >\n {/* Grip indicator */}\n <div\n className={`\n absolute inset-0 flex items-center justify-center\n ${isHorizontal ? 'flex-col gap-0.5' : 'flex-row gap-0.5'}\n `}\n >\n <div className=\"w-1 h-1 rounded-full bg-base-content/30 group-hover:bg-primary/60\" />\n <div className=\"w-1 h-1 rounded-full bg-base-content/30 group-hover:bg-primary/60\" />\n <div className=\"w-1 h-1 rounded-full bg-base-content/30 group-hover:bg-primary/60\" />\n </div>\n </div>\n )}\n </React.Fragment>\n )\n })}\n </div>\n )\n}\n\nSplitter.Panel = Panel\n"],"names":["Panel","children","Splitter","direction","sizes","defaultSizes","onSizesChange","gutterSize","minSize","className","containerRef","useRef","panelsRef","draggingRef","panels","React","child","panelCount","getInitialSizes","useCallback","equalSize","internalSizes","setInternalSizes","useState","currentSizes","useEffect","updateSizes","newSizes","handleMouseDown","index","startPos","handleMouseMove","moveEvent","dragIndex","dragStartPos","startSizes","containerRect","containerSize","currentPos","totalGutterSize","availableSize","deltaPercent","panel1Props","panel2Props","minSize1","minSize2","minPercent1","minPercent2","newSize1","newSize2","maxSize1","maxSize2","maxPercent1","maxPercent2","handleMouseUp","handleKeyDown","step","delta","minPercent","isHorizontal","jsx","panel","panelProps","isLast","jsxs","el","e"],"mappings":";;AAyBA,MAAMA,KAAsC,CAAC,EAAE,UAAAC,+BACnC,UAAAA,GAAS,GAGRC,KAA8D,CAAC;AAAA,EAC1E,UAAAD;AAAA,EACA,WAAAE,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AACd,MAAM;AACJ,QAAMC,IAAeC,EAAuB,IAAI,GAC1CC,IAAYD,EAAkC,EAAE,GAChDE,IAAcF,EAAyE,IAAI,GAG3FG,IAASC,EAAM,SAAS,QAAQd,CAAQ,EAAE;AAAA,I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EAAA,GA3CiB/B,CA6CrB;AAAA,MAEJ,CAAC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA3B,GAAS,QAAQF;"}
|
package/dist/index73.js
CHANGED
|
@@ -1,59 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
const R = Object.assign(T, {
|
|
54
|
-
Panel: d
|
|
55
|
-
});
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
const j = ({
|
|
3
|
+
children: s,
|
|
4
|
+
direction: a = "vertical",
|
|
5
|
+
spacing: n = 4,
|
|
6
|
+
align: e,
|
|
7
|
+
justify: t,
|
|
8
|
+
wrap: r = !1,
|
|
9
|
+
className: c = "",
|
|
10
|
+
...i
|
|
11
|
+
}) => {
|
|
12
|
+
const l = {
|
|
13
|
+
vertical: "flex-col",
|
|
14
|
+
horizontal: "flex-row"
|
|
15
|
+
}, o = {
|
|
16
|
+
0: "gap-0",
|
|
17
|
+
1: "gap-1",
|
|
18
|
+
2: "gap-2",
|
|
19
|
+
3: "gap-3",
|
|
20
|
+
4: "gap-4",
|
|
21
|
+
5: "gap-5",
|
|
22
|
+
6: "gap-6",
|
|
23
|
+
8: "gap-8",
|
|
24
|
+
10: "gap-10",
|
|
25
|
+
12: "gap-12",
|
|
26
|
+
16: "gap-16",
|
|
27
|
+
20: "gap-20",
|
|
28
|
+
24: "gap-24"
|
|
29
|
+
}, p = e && {
|
|
30
|
+
start: "items-start",
|
|
31
|
+
center: "items-center",
|
|
32
|
+
end: "items-end",
|
|
33
|
+
stretch: "items-stretch"
|
|
34
|
+
}[e], g = t && {
|
|
35
|
+
start: "justify-start",
|
|
36
|
+
center: "justify-center",
|
|
37
|
+
end: "justify-end",
|
|
38
|
+
between: "justify-between",
|
|
39
|
+
around: "justify-around",
|
|
40
|
+
evenly: "justify-evenly"
|
|
41
|
+
}[t], f = [
|
|
42
|
+
"flex",
|
|
43
|
+
l[a],
|
|
44
|
+
o[n],
|
|
45
|
+
p,
|
|
46
|
+
g,
|
|
47
|
+
r && "flex-wrap",
|
|
48
|
+
c
|
|
49
|
+
].filter(Boolean).join(" ");
|
|
50
|
+
return /* @__PURE__ */ u("div", { className: f, ...i, children: s });
|
|
51
|
+
};
|
|
56
52
|
export {
|
|
57
|
-
|
|
53
|
+
j as Stack
|
|
58
54
|
};
|
|
59
55
|
//# sourceMappingURL=index73.js.map
|
package/dist/index73.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index73.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index73.js","sources":["../src/components/Stack.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n direction?: 'vertical' | 'horizontal'\n spacing?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24\n align?: 'start' | 'center' | 'end' | 'stretch'\n justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'\n wrap?: boolean\n}\n\nexport const Stack: React.FC<StackProps> = ({\n children,\n direction = 'vertical',\n spacing = 4,\n align,\n justify,\n wrap = false,\n className = '',\n ...rest\n}) => {\n const directionClasses = {\n vertical: 'flex-col',\n horizontal: 'flex-row',\n }\n\n const spacingClasses = {\n 0: 'gap-0',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3',\n 4: 'gap-4',\n 5: 'gap-5',\n 6: 'gap-6',\n 8: 'gap-8',\n 10: 'gap-10',\n 12: 'gap-12',\n 16: 'gap-16',\n 20: 'gap-20',\n 24: 'gap-24',\n }\n\n const alignClasses = align && {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n }[align]\n\n const justifyClasses = justify && {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n }[justify]\n\n const classes = [\n 'flex',\n directionClasses[direction],\n spacingClasses[spacing],\n alignClasses,\n justifyClasses,\n wrap && 'flex-wrap',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return <div className={classes} {...rest}>{children}</div>\n}\n"],"names":["Stack","children","direction","spacing","align","justify","wrap","className","rest","directionClasses","spacingClasses","alignClasses","justifyClasses","classes"],"mappings":";AAWO,MAAMA,IAA8B,CAAC;AAAA,EAC1C,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAmB;AAAA,IACvB,UAAU;AAAA,IACV,YAAY;AAAA,EAAA,GAGRC,IAAiB;AAAA,IACrB,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EAAA,GAGAC,IAAeP,KAAS;AAAA,IAC5B,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,SAAS;AAAA,EAAA,EACTA,CAAK,GAEDQ,IAAiBP,KAAW;AAAA,IAChC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EAAA,EACRA,CAAO,GAEHQ,IAAU;AAAA,IACd;AAAA,IACAJ,EAAiBP,CAAS;AAAA,IAC1BQ,EAAeP,CAAO;AAAA,IACtBQ;AAAA,IACAC;AAAA,IACAN,KAAQ;AAAA,IACRC;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,2BAAQ,OAAA,EAAI,WAAWM,GAAU,GAAGL,GAAO,UAAAP,GAAS;AACtD;"}
|
package/dist/index74.js
CHANGED
|
@@ -1,43 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
accent: "textarea-accent",
|
|
23
|
-
info: "textarea-info",
|
|
24
|
-
success: "textarea-success",
|
|
25
|
-
warning: "textarea-warning",
|
|
26
|
-
error: "textarea-error"
|
|
27
|
-
}, c = [
|
|
28
|
-
"textarea",
|
|
29
|
-
"w-full",
|
|
30
|
-
r && "textarea-bordered",
|
|
31
|
-
t && "textarea-ghost",
|
|
32
|
-
e && n[e],
|
|
33
|
-
a && l[a],
|
|
34
|
-
s
|
|
35
|
-
].filter(Boolean).join(" ");
|
|
36
|
-
return /* @__PURE__ */ m("textarea", { ref: o, className: c, ...x });
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
f.displayName = "Textarea";
|
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
function o({ children: s, className: a = "", vertical: e = !1, ...i }) {
|
|
3
|
+
const c = [
|
|
4
|
+
"stats",
|
|
5
|
+
e ? "stats-vertical" : "stats-horizontal",
|
|
6
|
+
a
|
|
7
|
+
].filter(Boolean).join(" ");
|
|
8
|
+
return /* @__PURE__ */ t("div", { className: c, ...i, children: s });
|
|
9
|
+
}
|
|
10
|
+
function d({ title: s, value: a, desc: e, figure: i, actions: c, className: l = "", ...n }) {
|
|
11
|
+
return /* @__PURE__ */ r("div", { className: `stat ${l}`, ...n, children: [
|
|
12
|
+
i && /* @__PURE__ */ t("div", { className: "stat-figure", children: i }),
|
|
13
|
+
s && /* @__PURE__ */ t("div", { className: "stat-title", children: s }),
|
|
14
|
+
a && /* @__PURE__ */ t("div", { className: "stat-value", children: a }),
|
|
15
|
+
e && /* @__PURE__ */ t("div", { className: "stat-desc", children: e }),
|
|
16
|
+
c && /* @__PURE__ */ t("div", { className: "stat-actions", children: c })
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
const v = Object.assign(o, {
|
|
20
|
+
Stat: d
|
|
21
|
+
});
|
|
40
22
|
export {
|
|
41
|
-
|
|
23
|
+
v as Stats
|
|
42
24
|
};
|
|
43
25
|
//# sourceMappingURL=index74.js.map
|
package/dist/index74.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index74.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index74.js","sources":["../src/components/Stat.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface StatsProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n vertical?: boolean\n}\n\nexport interface StatProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n title?: React.ReactNode\n value?: React.ReactNode\n desc?: React.ReactNode\n figure?: React.ReactNode\n actions?: React.ReactNode\n}\n\nfunction StatsRoot({ children, className = '', vertical = false, ...rest }: StatsProps) {\n const classes = [\n 'stats',\n vertical ? 'stats-vertical' : 'stats-horizontal',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return <div className={classes} {...rest}>{children}</div>\n}\n\nfunction StatItem({ title, value, desc, figure, actions, className = '', ...rest }: StatProps) {\n return (\n <div className={`stat ${className}`} {...rest}>\n {figure && <div className=\"stat-figure\">{figure}</div>}\n {title && <div className=\"stat-title\">{title}</div>}\n {value && <div className=\"stat-value\">{value}</div>}\n {desc && <div className=\"stat-desc\">{desc}</div>}\n {actions && <div className=\"stat-actions\">{actions}</div>}\n </div>\n )\n}\n\nexport const Stats = Object.assign(StatsRoot, {\n Stat: StatItem,\n})\n"],"names":["StatsRoot","children","className","vertical","rest","classes","StatItem","title","value","desc","figure","actions","jsx","Stats"],"mappings":";AAeA,SAASA,EAAU,EAAE,UAAAC,GAAU,WAAAC,IAAY,IAAI,UAAAC,IAAW,IAAO,GAAGC,KAAoB;AACtF,QAAMC,IAAU;AAAA,IACd;AAAA,IACAF,IAAW,mBAAmB;AAAA,IAC9BD;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,2BAAQ,OAAA,EAAI,WAAWG,GAAU,GAAGD,GAAO,UAAAH,GAAS;AACtD;AAEA,SAASK,EAAS,EAAE,OAAAC,GAAO,OAAAC,GAAO,MAAAC,GAAM,QAAAC,GAAQ,SAAAC,GAAS,WAAAT,IAAY,IAAI,GAAGE,KAAmB;AAC7F,2BACG,OAAA,EAAI,WAAW,QAAQF,CAAS,IAAK,GAAGE,GACtC,UAAA;AAAA,IAAAM,KAAU,gBAAAE,EAAC,OAAA,EAAI,WAAU,eAAe,UAAAF,GAAO;AAAA,IAC/CH,KAAS,gBAAAK,EAAC,OAAA,EAAI,WAAU,cAAc,UAAAL,GAAM;AAAA,IAC5CC,KAAS,gBAAAI,EAAC,OAAA,EAAI,WAAU,cAAc,UAAAJ,GAAM;AAAA,IAC5CC,KAAQ,gBAAAG,EAAC,OAAA,EAAI,WAAU,aAAa,UAAAH,GAAK;AAAA,IACzCE,KAAW,gBAAAC,EAAC,OAAA,EAAI,WAAU,gBAAgB,UAAAD,EAAA,CAAQ;AAAA,EAAA,GACrD;AAEJ;AAEO,MAAME,IAAQ,OAAO,OAAOb,GAAW;AAAA,EAC5C,MAAMM;AACR,CAAC;"}
|
package/dist/index75.js
CHANGED
|
@@ -1,98 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
secondary: "badge-secondary",
|
|
23
|
-
accent: "badge-accent",
|
|
24
|
-
neutral: "badge-neutral",
|
|
25
|
-
info: "badge-info",
|
|
26
|
-
success: "badge-success",
|
|
27
|
-
warning: "badge-warning",
|
|
28
|
-
error: "badge-error",
|
|
29
|
-
ghost: "badge-ghost"
|
|
30
|
-
};
|
|
31
|
-
return c[e] ? c[e] : "";
|
|
32
|
-
}, p = {
|
|
33
|
-
xs: "badge-xs text-xs",
|
|
34
|
-
sm: "badge-sm text-sm",
|
|
35
|
-
md: "badge-md",
|
|
36
|
-
lg: "badge-lg text-lg"
|
|
37
|
-
}, f = [
|
|
38
|
-
"badge gap-1 inline-flex items-center",
|
|
39
|
-
d(),
|
|
40
|
-
p[o],
|
|
41
|
-
i
|
|
42
|
-
].filter(Boolean).join(" "), x = e && !d() ? { backgroundColor: e, borderColor: e } : void 0;
|
|
43
|
-
return /* @__PURE__ */ g("span", { className: f, style: x, ...b, children: [
|
|
44
|
-
r && /* @__PURE__ */ a("span", { className: "inline-flex", children: r }),
|
|
45
|
-
l,
|
|
46
|
-
s && /* @__PURE__ */ a(
|
|
47
|
-
"button",
|
|
48
|
-
{
|
|
49
|
-
type: "button",
|
|
50
|
-
onClick: h,
|
|
51
|
-
className: "btn btn-ghost btn-xs p-0 min-h-0 h-auto hover:bg-transparent",
|
|
52
|
-
"aria-label": "Close",
|
|
53
|
-
children: t || /* @__PURE__ */ a(
|
|
54
|
-
"svg",
|
|
55
|
-
{
|
|
56
|
-
className: "w-3 h-3",
|
|
57
|
-
fill: "none",
|
|
58
|
-
stroke: "currentColor",
|
|
59
|
-
viewBox: "0 0 24 24",
|
|
60
|
-
children: /* @__PURE__ */ a(
|
|
61
|
-
"path",
|
|
62
|
-
{
|
|
63
|
-
strokeLinecap: "round",
|
|
64
|
-
strokeLinejoin: "round",
|
|
65
|
-
strokeWidth: 2,
|
|
66
|
-
d: "M6 18L18 6M6 6l12 12"
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
] });
|
|
74
|
-
}, N = ({
|
|
75
|
-
checked: s = !1,
|
|
76
|
-
onChange: t,
|
|
77
|
-
icon: n,
|
|
78
|
-
children: e,
|
|
79
|
-
className: r = "",
|
|
80
|
-
...o
|
|
81
|
-
}) => {
|
|
82
|
-
const l = () => {
|
|
83
|
-
t?.(!s);
|
|
84
|
-
}, i = [
|
|
85
|
-
"badge badge-md gap-1 cursor-pointer transition-colors",
|
|
86
|
-
s ? "badge-primary" : "badge-outline hover:badge-primary hover:badge-outline",
|
|
87
|
-
r
|
|
88
|
-
].filter(Boolean).join(" ");
|
|
89
|
-
return /* @__PURE__ */ g("span", { className: i, onClick: l, role: "checkbox", "aria-checked": s, ...o, children: [
|
|
90
|
-
n && /* @__PURE__ */ a("span", { className: "inline-flex", children: n }),
|
|
91
|
-
e
|
|
92
|
-
] });
|
|
93
|
-
};
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
function c({ children: e, vertical: s = !1, className: t = "", ...n }) {
|
|
3
|
+
const r = ["steps", s && "steps-vertical", t].filter(Boolean).join(" ");
|
|
4
|
+
return /* @__PURE__ */ o("ul", { className: r, ...n, children: e });
|
|
5
|
+
}
|
|
6
|
+
function p({ children: e, color: s, dataContent: t, className: n = "", ...r }) {
|
|
7
|
+
const a = ["step", s && {
|
|
8
|
+
neutral: "step-neutral",
|
|
9
|
+
primary: "step-primary",
|
|
10
|
+
secondary: "step-secondary",
|
|
11
|
+
accent: "step-accent",
|
|
12
|
+
info: "step-info",
|
|
13
|
+
success: "step-success",
|
|
14
|
+
warning: "step-warning",
|
|
15
|
+
error: "step-error"
|
|
16
|
+
}[s], n].filter(Boolean).join(" ");
|
|
17
|
+
return /* @__PURE__ */ o("li", { className: a, "data-content": t, ...r, children: e });
|
|
18
|
+
}
|
|
19
|
+
const u = Object.assign(c, {
|
|
20
|
+
Step: p
|
|
21
|
+
});
|
|
94
22
|
export {
|
|
95
|
-
|
|
96
|
-
v as Tag
|
|
23
|
+
u as Steps
|
|
97
24
|
};
|
|
98
25
|
//# sourceMappingURL=index75.js.map
|
package/dist/index75.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index75.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index75.js","sources":["../src/components/Steps.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface StepsProps extends React.HTMLAttributes<HTMLUListElement> {\n children: React.ReactNode\n vertical?: boolean\n}\n\nexport interface StepProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'color'> {\n children: React.ReactNode\n color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error'\n dataContent?: string\n}\n\nfunction StepsRoot({ children, vertical = false, className = '', ...rest }: StepsProps) {\n const classes = ['steps', vertical && 'steps-vertical', className].filter(Boolean).join(' ')\n\n return <ul className={classes} {...rest}>{children}</ul>\n}\n\nfunction Step({ children, color, dataContent, className = '', ...rest }: StepProps) {\n const colorClasses = {\n neutral: 'step-neutral',\n primary: 'step-primary',\n secondary: 'step-secondary',\n accent: 'step-accent',\n info: 'step-info',\n success: 'step-success',\n warning: 'step-warning',\n error: 'step-error',\n }\n\n const classes = ['step', color && colorClasses[color], className].filter(Boolean).join(' ')\n\n return (\n <li className={classes} data-content={dataContent} {...rest}>\n {children}\n </li>\n )\n}\n\nexport const Steps = Object.assign(StepsRoot, {\n Step,\n})\n"],"names":["StepsRoot","children","vertical","className","rest","classes","Step","color","dataContent","jsx","Steps"],"mappings":";AAaA,SAASA,EAAU,EAAE,UAAAC,GAAU,UAAAC,IAAW,IAAO,WAAAC,IAAY,IAAI,GAAGC,KAAoB;AACtF,QAAMC,IAAU,CAAC,SAASH,KAAY,kBAAkBC,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE3F,2BAAQ,MAAA,EAAG,WAAWE,GAAU,GAAGD,GAAO,UAAAH,GAAS;AACrD;AAEA,SAASK,EAAK,EAAE,UAAAL,GAAU,OAAAM,GAAO,aAAAC,GAAa,WAAAL,IAAY,IAAI,GAAGC,KAAmB;AAYlF,QAAMC,IAAU,CAAC,QAAQE,KAXJ;AAAA,IACnB,SAAS;AAAA,IACT,SAAS;AAAA,IACT,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EAAA,EAGsCA,CAAK,GAAGJ,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1F,SACE,gBAAAM,EAAC,QAAG,WAAWJ,GAAS,gBAAcG,GAAc,GAAGJ,GACpD,UAAAH,GACH;AAEJ;AAEO,MAAMS,IAAQ,OAAO,OAAOV,GAAW;AAAA,EAC5C,MAAAM;AACF,CAAC;"}
|