@gnome-ui/react 1.43.0 → 1.44.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 -0
- package/dist/components/ContributionGraph/ContributionGraph.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.cjs.map +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.d.ts +11 -6
- package/dist/components/ContributionGraph/ContributionGraph.js +211 -130
- package/dist/components/ContributionGraph/ContributionGraph.js.map +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.module.css.cjs +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.module.css.cjs.map +1 -1
- package/dist/components/ContributionGraph/ContributionGraph.module.css.js +9 -8
- package/dist/components/ContributionGraph/ContributionGraph.module.css.js.map +1 -1
- package/dist/components/ContributionGraph/index.d.ts +1 -1
- package/dist/components/Drawer/Drawer.cjs +2 -0
- package/dist/components/Drawer/Drawer.cjs.map +1 -0
- package/dist/components/Drawer/Drawer.d.ts +28 -0
- package/dist/components/Drawer/Drawer.js +55 -0
- package/dist/components/Drawer/Drawer.js.map +1 -0
- package/dist/components/Drawer/Drawer.module.css.cjs +2 -0
- package/dist/components/Drawer/Drawer.module.css.cjs.map +1 -0
- package/dist/components/Drawer/Drawer.module.css.js +18 -0
- package/dist/components/Drawer/Drawer.module.css.js.map +1 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer.cjs +1 -0
- package/dist/components/Drawer.d.ts +2 -0
- package/dist/components/Drawer.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +64 -63
- package/dist/style.css +1 -1
- package/package.json +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContributionGraph.js","names":[],"sources":["../../../src/components/ContributionGraph/ContributionGraph.tsx"],"sourcesContent":["import { useMemo, useRef, useState } from \"react\";\nimport type { KeyboardEvent } from \"react\";\nimport styles from \"./ContributionGraph.module.css\";\nimport { useDateTimeFormatter } from \"../GnomeProvider/GnomeContext\";\n\nexport interface ContributionDay {\n /** ISO 8601 date — \"YYYY-MM-DD\". */\n date: string;\n /** Non-negative activity count. */\n count: number;\n}\n\nexport interface ContributionGraphProps {\n /** Activity data. Days absent from the array are treated as count = 0. */\n data: ContributionDay[];\n /**\n * Number of intensity levels (excluding 0).\n * @default 4\n */\n maxLevel?: number;\n /**\n * Colour scale — length must be maxLevel + 1 (index 0 = empty).\n * Defaults to the Adwaita green palette.\n */\n colorScale?: string[];\n /** Cell side length in pixels. @default 12 */\n cellSize?: number;\n /** Gap between cells in pixels. @default 3 */\n cellGap?: number;\n /** 0 = Sunday · 1 = Monday (GNOME locale default). @default 1 */\n weekStartDay?: 0 | 1;\n /** @default true */\n showMonthLabels?: boolean;\n /** @default true */\n showDayLabels?: boolean;\n /** @default true */\n showLegend?: boolean;\n /** Number of week columns to display. @default 52 */\n weeks?: number;\n /** @default \"Contribution graph\" */\n ariaLabel?: string;\n onDayClick?: (day: ContributionDay) => void;\n /** Returns a plain-text tooltip string for a day. */\n tooltipContent?: (day: ContributionDay) => string;\n className?: string;\n}\n\n// Reference Sunday: 2000-01-02 is a Sunday (day index 0)\nconst REF_SUNDAY = new Date(2000, 0, 2);\n\nfunction getShortMonth(\n monthIndex: number,\n formatter: Intl.DateTimeFormat,\n): string {\n return formatter.format(new Date(2000, monthIndex));\n}\n\nfunction getShortDay(\n dayIndex: number,\n formatter: Intl.DateTimeFormat,\n): string {\n const date = new Date(REF_SUNDAY);\n date.setDate(REF_SUNDAY.getDate() + dayIndex);\n return formatter.format(date);\n}\n\nconst DAY_LABEL_WIDTH = 28;\nconst MONTH_LABEL_HEIGHT = 20;\n\nconst DEFAULT_COLORS = [\n \"var(--gnome-card-shade-color, rgba(0,0,0,0.07))\",\n \"var(--gnome-green-1, #8ff0a4)\",\n \"var(--gnome-green-2, #57e389)\",\n \"var(--gnome-green-4, #2ec27e)\",\n \"var(--gnome-green-5, #26a269)\",\n];\n\nfunction dateToIso(date: Date): string {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, \"0\");\n const d = String(date.getDate()).padStart(2, \"0\");\n return `${y}-${m}-${d}`;\n}\n\nfunction isoToLocal(iso: string): Date {\n const [y, m, d] = iso.split(\"-\").map(Number);\n return new Date(y, m - 1, d);\n}\n\nfunction fullDateLabel(iso: string, formatter: Intl.DateTimeFormat): string {\n return formatter.format(isoToLocal(iso));\n}\n\ninterface GridCell {\n iso: string;\n count: number;\n level: number;\n future: boolean;\n}\n\nexport function ContributionGraph({\n data,\n maxLevel = 4,\n colorScale,\n cellSize = 12,\n cellGap = 3,\n weekStartDay = 1,\n showMonthLabels = true,\n showDayLabels = true,\n showLegend = true,\n weeks = 52,\n ariaLabel = \"Contribution graph\",\n onDayClick,\n tooltipContent,\n className,\n}: ContributionGraphProps) {\n const monthFormatter = useDateTimeFormatter({ month: \"short\" });\n const weekdayFormatter = useDateTimeFormatter({ weekday: \"short\" });\n const fullDateFormatter = useDateTimeFormatter({\n weekday: \"long\",\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n });\n const stride = cellSize + cellGap;\n const svgRef = useRef<SVGSVGElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const colors = colorScale ?? DEFAULT_COLORS;\n\n const [focusedCell, setFocusedCell] = useState({ col: 0, row: 0 });\n const [tooltip, setTooltip] = useState<{\n x: number;\n y: number;\n text: string;\n } | null>(null);\n\n const countMap = useMemo(() => {\n const map = new Map<string, number>();\n for (const d of data) map.set(d.date, d.count);\n return map;\n }, [data]);\n\n const maxCount = useMemo(\n () => Math.max(1, ...data.map((d) => d.count)),\n [data],\n );\n\n const { grid, monthLabels } = useMemo(() => {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n\n // Align to start of current week\n const daysFromWeekStart = (today.getDay() - weekStartDay + 7) % 7;\n const lastWeekStart = new Date(today);\n lastWeekStart.setDate(today.getDate() - daysFromWeekStart);\n\n const firstDay = new Date(lastWeekStart);\n firstDay.setDate(lastWeekStart.getDate() - (weeks - 1) * 7);\n\n const gridResult: GridCell[][] = [];\n const labels: { col: number; month: string }[] = [];\n let lastMonth = -1;\n\n for (let col = 0; col < weeks; col++) {\n const colStart = new Date(firstDay);\n colStart.setDate(firstDay.getDate() + col * 7);\n\n // Month label when the column starts a new month\n if (colStart.getMonth() !== lastMonth) {\n labels.push({\n col,\n month: getShortMonth(colStart.getMonth(), monthFormatter),\n });\n lastMonth = colStart.getMonth();\n }\n\n const column: GridCell[] = [];\n for (let row = 0; row < 7; row++) {\n const date = new Date(firstDay);\n date.setDate(firstDay.getDate() + col * 7 + row);\n const future = date > today;\n const iso = dateToIso(date);\n const count = future ? 0 : (countMap.get(iso) ?? 0);\n const level =\n count === 0\n ? 0\n : Math.min(maxLevel, Math.ceil((count / maxCount) * maxLevel));\n column.push({ iso, count, level, future });\n }\n gridResult.push(column);\n }\n\n return { grid: gridResult, monthLabels: labels };\n }, [countMap, maxCount, maxLevel, weeks, weekStartDay, monthFormatter]);\n\n // Always label Mon(1), Wed(3), Fri(5) — rows shift with weekStartDay\n const labelRows = useMemo(\n () =>\n [1, 3, 5].map((dayIndex) => ({\n row: (dayIndex - weekStartDay + 7) % 7,\n label: getShortDay(dayIndex, weekdayFormatter),\n })),\n [weekStartDay, weekdayFormatter],\n );\n\n const dayLabelW = showDayLabels ? DAY_LABEL_WIDTH : 0;\n const monthLabelH = showMonthLabels ? MONTH_LABEL_HEIGHT : 0;\n const svgWidth = dayLabelW + weeks * stride - cellGap;\n const svgHeight = monthLabelH + 7 * stride - cellGap;\n const cellRx = Math.min(4, Math.floor(cellSize / 3));\n\n function focusCell(col: number, row: number) {\n const c = Math.max(0, Math.min(weeks - 1, col));\n const r = Math.max(0, Math.min(6, row));\n setFocusedCell({ col: c, row: r });\n svgRef.current\n ?.querySelector<SVGRectElement>(`[data-col=\"${c}\"][data-row=\"${r}\"]`)\n ?.focus();\n }\n\n function handleCellKey(e: KeyboardEvent, col: number, row: number) {\n const moves: Record<string, [number, number]> = {\n ArrowRight: [col + 1, row],\n ArrowLeft: [col - 1, row],\n ArrowDown: [col, row + 1],\n ArrowUp: [col, row - 1],\n };\n if (moves[e.key]) {\n e.preventDefault();\n focusCell(...moves[e.key]);\n } else if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n const cell = grid[col]?.[row];\n if (cell && !cell.future) onDayClick?.({ date: cell.iso, count: cell.count });\n }\n }\n\n function handleMouseEnter(\n e: React.MouseEvent<SVGRectElement>,\n text: string,\n ) {\n const wrapper = wrapperRef.current;\n if (!wrapper) return;\n const wRect = wrapper.getBoundingClientRect();\n const rRect = (e.currentTarget as Element).getBoundingClientRect();\n setTooltip({\n x: rRect.left - wRect.left + cellSize / 2,\n y: rRect.top - wRect.top,\n text,\n });\n }\n\n function cellColor(cell: GridCell): string {\n if (cell.future) return colors[0];\n return colors[Math.min(cell.level, colors.length - 1)] ?? colors[colors.length - 1];\n }\n\n function cellTooltip(cell: GridCell): string {\n if (cell.future) return fullDateLabel(cell.iso, fullDateFormatter);\n const formattedDate = fullDateLabel(cell.iso, fullDateFormatter);\n return (\n tooltipContent?.({ date: cell.iso, count: cell.count }) ??\n `${cell.count} contribution${cell.count !== 1 ? \"s\" : \"\"} on ${formattedDate}`\n );\n }\n\n return (\n <div\n ref={wrapperRef}\n className={[styles.wrapper, className].filter(Boolean).join(\" \")}\n >\n <svg\n ref={svgRef}\n width={svgWidth}\n height={svgHeight}\n className={styles.svg}\n aria-label={ariaLabel}\n role=\"img\"\n >\n {/* Month labels */}\n {showMonthLabels &&\n monthLabels.map(({ col, month }) => (\n <text\n key={`m-${col}`}\n x={dayLabelW + col * stride}\n y={12}\n className={styles.label}\n >\n {month}\n </text>\n ))}\n\n {/* Day-of-week labels: Mon, Wed, Fri */}\n {showDayLabels &&\n labelRows.map(({ row, label }) => (\n <text\n key={`d-${row}`}\n x={0}\n y={monthLabelH + row * stride + cellSize - 1}\n className={styles.label}\n >\n {label}\n </text>\n ))}\n\n {/* Activity grid */}\n <g role=\"grid\" aria-label={ariaLabel}>\n {grid.map((column, col) => (\n <g key={col} role=\"row\">\n {column.map((cell, row) => {\n const tipText = cellTooltip(cell);\n const isFocused =\n focusedCell.col === col && focusedCell.row === row;\n\n return (\n <rect\n key={`${col}-${row}`}\n data-col={col}\n data-row={row}\n x={dayLabelW + col * stride}\n y={monthLabelH + row * stride}\n width={cellSize}\n height={cellSize}\n rx={cellRx}\n fill={cellColor(cell)}\n opacity={cell.future ? 0.35 : 1}\n className={styles.cell}\n role=\"gridcell\"\n aria-label={tipText}\n aria-disabled={cell.future || undefined}\n tabIndex={isFocused ? 0 : -1}\n onClick={() => !cell.future && onDayClick?.({ date: cell.iso, count: cell.count })}\n onKeyDown={(e) => handleCellKey(e, col, row)}\n onFocus={() => setFocusedCell({ col, row })}\n onMouseEnter={(e) => handleMouseEnter(e, tipText)}\n onMouseLeave={() => setTooltip(null)}\n />\n );\n })}\n </g>\n ))}\n </g>\n </svg>\n\n {tooltip && (\n <div\n className={styles.tooltip}\n style={{ left: tooltip.x, top: tooltip.y }}\n role=\"tooltip\"\n >\n {tooltip.text}\n </div>\n )}\n\n {showLegend && (\n <div className={styles.legend}>\n <span className={styles.legendLabel}>Less</span>\n {Array.from({ length: maxLevel + 1 }, (_, i) => (\n <svg\n key={i}\n width={cellSize}\n height={cellSize}\n aria-hidden=\"true\"\n className={styles.legendCell}\n >\n <rect\n width={cellSize}\n height={cellSize}\n rx={cellRx}\n fill={colors[Math.min(i, colors.length - 1)]}\n />\n </svg>\n ))}\n <span className={styles.legendLabel}>More</span>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;AAgDA,IAAM,IAAa,IAAI,KAAK,KAAM,GAAG,EAAE;AAEvC,SAAS,EACP,GACA,GACQ;AACR,QAAO,EAAU,OAAO,IAAI,KAAK,KAAM,EAAW,CAAC;;AAGrD,SAAS,EACP,GACA,GACQ;CACR,IAAM,IAAO,IAAI,KAAK,EAA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AW,EAAO;gBAAa;MAAW,CAAA;KAC5C;;GAEJ"}
|
|
1
|
+
{"version":3,"file":"ContributionGraph.js","names":[],"sources":["../../../src/components/ContributionGraph/ContributionGraph.tsx"],"sourcesContent":["import { useContext, useEffect, useMemo, useRef, useState } from \"react\";\nimport type { KeyboardEvent } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport styles from \"./ContributionGraph.module.css\";\nimport {\n GnomeContext,\n useDateTimeFormatter,\n type GnomeNamedAccentColor,\n} from \"../GnomeProvider/GnomeContext\";\n\nexport interface ContributionDay {\n /** ISO 8601 date — \"YYYY-MM-DD\". */\n date: string;\n /** Non-negative activity count. */\n count: number;\n}\n\nexport interface ContributionGraphProps {\n /** Activity data. Days absent from the array are treated as count = 0. */\n data: ContributionDay[];\n /**\n * Number of intensity levels (excluding 0).\n * @default 4\n */\n maxLevel?: number;\n /** Cell side length in pixels. @default 12 */\n cellSize?: number;\n /** Gap between cells in pixels. @default 3 */\n cellGap?: number;\n /**\n * Fit the graph to its container by resizing cells and reducing visible\n * weeks when the configured range cannot stay legible.\n * @default true\n */\n responsive?: boolean;\n /** Smallest responsive cell side length in pixels. @default 8 */\n minCellSize?: number;\n /** Largest responsive cell side length in pixels. @default 24 */\n maxCellSize?: number;\n /** 0 = Sunday · 1 = Monday (GNOME locale default). @default 1 */\n weekStartDay?: 0 | 1;\n /** @default true */\n showMonthLabels?: boolean;\n /** @default true */\n showDayLabels?: boolean;\n /** @default true */\n showLegend?: boolean;\n /** Number of week columns to display. @default 52 */\n weeks?: number;\n /** @default \"Contribution graph\" */\n ariaLabel?: string;\n onDayClick?: (day: ContributionDay) => void;\n /** Returns a plain-text tooltip string for a day. */\n tooltipContent?: (day: ContributionDay) => string;\n className?: string;\n}\n\n// Reference Sunday: 2000-01-02 is a Sunday (day index 0)\nconst REF_SUNDAY = new Date(2000, 0, 2);\n\nfunction getShortMonth(\n monthIndex: number,\n formatter: Intl.DateTimeFormat,\n): string {\n return formatter.format(new Date(2000, monthIndex));\n}\n\nfunction getShortDay(\n dayIndex: number,\n formatter: Intl.DateTimeFormat,\n): string {\n const date = new Date(REF_SUNDAY);\n date.setDate(REF_SUNDAY.getDate() + dayIndex);\n return formatter.format(date);\n}\n\nconst DAY_LABEL_WIDTH = 28;\nconst MONTH_LABEL_HEIGHT = 20;\n\nconst NAMED_ACCENTS = new Set<GnomeNamedAccentColor>([\n \"blue\",\n \"green\",\n \"yellow\",\n \"orange\",\n \"red\",\n \"purple\",\n \"brown\",\n]);\n\nfunction accentScale(accentColor: GnomeNamedAccentColor): string[] {\n return [\n \"var(--gnome-card-shade-color)\",\n `var(--gnome-${accentColor}-1)`,\n `var(--gnome-${accentColor}-2)`,\n `var(--gnome-${accentColor}-4)`,\n `var(--gnome-${accentColor}-5)`,\n ];\n}\n\nfunction dateToIso(date: Date): string {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, \"0\");\n const d = String(date.getDate()).padStart(2, \"0\");\n return `${y}-${m}-${d}`;\n}\n\nfunction isoToLocal(iso: string): Date {\n const [y, m, d] = iso.split(\"-\").map(Number);\n return new Date(y, m - 1, d);\n}\n\nfunction fullDateLabel(iso: string, formatter: Intl.DateTimeFormat): string {\n return formatter.format(isoToLocal(iso));\n}\n\ninterface GridCell {\n iso: string;\n count: number;\n level: number;\n future: boolean;\n}\n\nexport function ContributionGraph({\n data,\n maxLevel = 4,\n cellSize = 12,\n cellGap = 3,\n responsive = true,\n minCellSize = 8,\n maxCellSize = 24,\n weekStartDay = 1,\n showMonthLabels = true,\n showDayLabels = true,\n showLegend = true,\n weeks = 52,\n ariaLabel = \"Contribution graph\",\n onDayClick,\n tooltipContent,\n className,\n}: ContributionGraphProps) {\n const monthFormatter = useDateTimeFormatter({ month: \"short\" });\n const weekdayFormatter = useDateTimeFormatter({ weekday: \"short\" });\n const fullDateFormatter = useDateTimeFormatter({\n weekday: \"long\",\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n });\n const { accentColor } = useContext(GnomeContext);\n const graphAccent = NAMED_ACCENTS.has(accentColor as GnomeNamedAccentColor)\n ? accentColor as GnomeNamedAccentColor\n : \"green\";\n const svgRef = useRef<SVGSVGElement>(null);\n const graphViewportRef = useRef<HTMLDivElement>(null);\n const tooltipRef = useRef<HTMLDivElement>(null);\n const colors = useMemo(() => accentScale(graphAccent), [graphAccent]);\n\n const [availableWidth, setAvailableWidth] = useState<number | null>(null);\n const [focusedCell, setFocusedCell] = useState({ col: 0, row: 0 });\n const [tooltip, setTooltip] = useState<{\n target: SVGRectElement;\n text: string;\n } | null>(null);\n const [tooltipPosition, setTooltipPosition] = useState<{\n left: number;\n top: number;\n } | null>(null);\n\n useEffect(() => {\n if (!responsive) return;\n\n const viewport = graphViewportRef.current;\n if (!viewport) return;\n\n const updateWidth = () => {\n const width = viewport.clientWidth || viewport.getBoundingClientRect().width;\n if (width > 0) setAvailableWidth(width);\n };\n\n updateWidth();\n\n if (typeof ResizeObserver === \"undefined\") {\n window.addEventListener(\"resize\", updateWidth);\n return () => window.removeEventListener(\"resize\", updateWidth);\n }\n\n const observer = new ResizeObserver(updateWidth);\n observer.observe(viewport);\n return () => observer.disconnect();\n }, [responsive]);\n\n useEffect(() => {\n if (!tooltip) return;\n\n const placeTooltip = () => {\n const tooltipNode = tooltipRef.current;\n if (!tooltipNode) return;\n\n const cellRect = tooltip.target.getBoundingClientRect();\n const tipRect = tooltipNode.getBoundingClientRect();\n const margin = 8;\n const gap = 6;\n const viewportWidth = document.documentElement.clientWidth || window.innerWidth;\n const viewportHeight = document.documentElement.clientHeight || window.innerHeight;\n const maxLeft = Math.max(margin, viewportWidth - tipRect.width - margin);\n const maxTop = Math.max(margin, viewportHeight - tipRect.height - margin);\n const centeredLeft = cellRect.left + cellRect.width / 2 - tipRect.width / 2;\n const aboveTop = cellRect.top - tipRect.height - gap;\n const preferredTop = aboveTop >= margin ? aboveTop : cellRect.bottom + gap;\n\n setTooltipPosition({\n left: Math.max(margin, Math.min(centeredLeft, maxLeft)),\n top: Math.max(margin, Math.min(preferredTop, maxTop)),\n });\n };\n\n placeTooltip();\n window.addEventListener(\"resize\", placeTooltip);\n window.addEventListener(\"scroll\", placeTooltip, { passive: true, capture: true });\n\n return () => {\n window.removeEventListener(\"resize\", placeTooltip);\n window.removeEventListener(\"scroll\", placeTooltip, { capture: true });\n };\n }, [tooltip]);\n\n const countMap = useMemo(() => {\n const map = new Map<string, number>();\n for (const d of data) map.set(d.date, d.count);\n return map;\n }, [data]);\n\n const maxCount = useMemo(\n () => Math.max(1, ...data.map((d) => d.count)),\n [data],\n );\n\n const dayLabelW = showDayLabels ? DAY_LABEL_WIDTH : 0;\n const monthLabelH = showMonthLabels ? MONTH_LABEL_HEIGHT : 0;\n const configuredWeeks = Math.max(1, Math.floor(weeks));\n const normalizedMinCellSize = Math.max(1, minCellSize);\n const normalizedMaxCellSize = Math.max(normalizedMinCellSize, maxCellSize);\n const fit = useMemo(() => {\n if (!responsive || availableWidth === null) {\n return { cellSize, weeks: configuredWeeks };\n }\n\n const gridWidth = Math.max(0, availableWidth - dayLabelW);\n const fittedCellSize = (gridWidth + cellGap) / configuredWeeks - cellGap;\n\n if (fittedCellSize >= normalizedMinCellSize) {\n return {\n cellSize: Math.min(normalizedMaxCellSize, fittedCellSize),\n weeks: configuredWeeks,\n };\n }\n\n const fittedWeeks = Math.floor((gridWidth + cellGap) / (normalizedMinCellSize + cellGap));\n return {\n cellSize: normalizedMinCellSize,\n weeks: Math.max(1, Math.min(configuredWeeks, fittedWeeks)),\n };\n }, [\n availableWidth,\n cellGap,\n cellSize,\n configuredWeeks,\n dayLabelW,\n normalizedMaxCellSize,\n normalizedMinCellSize,\n responsive,\n ]);\n const visibleWeeks = fit.weeks;\n const resolvedCellSize = fit.cellSize;\n const stride = resolvedCellSize + cellGap;\n\n const { grid, monthLabels } = useMemo(() => {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n\n // Align to start of current week\n const daysFromWeekStart = (today.getDay() - weekStartDay + 7) % 7;\n const lastWeekStart = new Date(today);\n lastWeekStart.setDate(today.getDate() - daysFromWeekStart);\n\n const firstDay = new Date(lastWeekStart);\n firstDay.setDate(lastWeekStart.getDate() - (visibleWeeks - 1) * 7);\n\n const gridResult: GridCell[][] = [];\n const labels: { col: number; month: string }[] = [];\n let lastMonth = -1;\n\n for (let col = 0; col < visibleWeeks; col++) {\n const colStart = new Date(firstDay);\n colStart.setDate(firstDay.getDate() + col * 7);\n\n // Month label when the column starts a new month\n if (colStart.getMonth() !== lastMonth) {\n labels.push({\n col,\n month: getShortMonth(colStart.getMonth(), monthFormatter),\n });\n lastMonth = colStart.getMonth();\n }\n\n const column: GridCell[] = [];\n for (let row = 0; row < 7; row++) {\n const date = new Date(firstDay);\n date.setDate(firstDay.getDate() + col * 7 + row);\n const future = date > today;\n const iso = dateToIso(date);\n const count = future ? 0 : (countMap.get(iso) ?? 0);\n const level =\n count === 0\n ? 0\n : Math.min(maxLevel, Math.ceil((count / maxCount) * maxLevel));\n column.push({ iso, count, level, future });\n }\n gridResult.push(column);\n }\n\n return { grid: gridResult, monthLabels: labels };\n }, [countMap, maxCount, maxLevel, visibleWeeks, weekStartDay, monthFormatter]);\n\n // Always label Mon(1), Wed(3), Fri(5) — rows shift with weekStartDay\n const labelRows = useMemo(\n () =>\n [1, 3, 5].map((dayIndex) => ({\n row: (dayIndex - weekStartDay + 7) % 7,\n label: getShortDay(dayIndex, weekdayFormatter),\n })),\n [weekStartDay, weekdayFormatter],\n );\n\n const svgWidth = dayLabelW + visibleWeeks * stride - cellGap;\n const svgHeight = monthLabelH + 7 * stride - cellGap;\n const cellRx = Math.min(4, Math.floor(resolvedCellSize / 3));\n\n useEffect(() => {\n setFocusedCell((current) => ({\n col: Math.min(visibleWeeks - 1, current.col),\n row: current.row,\n }));\n }, [visibleWeeks]);\n\n function focusCell(col: number, row: number) {\n const c = Math.max(0, Math.min(visibleWeeks - 1, col));\n const r = Math.max(0, Math.min(6, row));\n setFocusedCell({ col: c, row: r });\n svgRef.current\n ?.querySelector<SVGRectElement>(`[data-col=\"${c}\"][data-row=\"${r}\"]`)\n ?.focus();\n }\n\n function handleCellKey(e: KeyboardEvent, col: number, row: number) {\n const moves: Record<string, [number, number]> = {\n ArrowRight: [col + 1, row],\n ArrowLeft: [col - 1, row],\n ArrowDown: [col, row + 1],\n ArrowUp: [col, row - 1],\n };\n if (moves[e.key]) {\n e.preventDefault();\n focusCell(...moves[e.key]);\n } else if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n const cell = grid[col]?.[row];\n if (cell && !cell.future) onDayClick?.({ date: cell.iso, count: cell.count });\n }\n }\n\n function handleMouseEnter(\n e: React.MouseEvent<SVGRectElement>,\n text: string,\n ) {\n setTooltipPosition(null);\n setTooltip({\n target: e.currentTarget,\n text,\n });\n }\n\n function hideTooltip() {\n setTooltip(null);\n setTooltipPosition(null);\n }\n\n function cellColor(cell: GridCell): string {\n if (cell.future) return colors[0];\n return colors[Math.min(cell.level, colors.length - 1)] ?? colors[colors.length - 1];\n }\n\n function cellTooltip(cell: GridCell): string {\n if (cell.future) return fullDateLabel(cell.iso, fullDateFormatter);\n const formattedDate = fullDateLabel(cell.iso, fullDateFormatter);\n return (\n tooltipContent?.({ date: cell.iso, count: cell.count }) ??\n `${cell.count} contribution${cell.count !== 1 ? \"s\" : \"\"} on ${formattedDate}`\n );\n }\n\n return (\n <div\n className={[styles.wrapper, className].filter(Boolean).join(\" \")}\n >\n <div ref={graphViewportRef} className={styles.graphViewport}>\n <svg\n ref={svgRef}\n width={svgWidth}\n height={svgHeight}\n className={styles.svg}\n aria-label={ariaLabel}\n role=\"img\"\n data-cell-size={resolvedCellSize}\n data-visible-weeks={visibleWeeks}\n >\n {/* Month labels */}\n {showMonthLabels &&\n monthLabels.map(({ col, month }) => (\n <text\n key={`m-${col}`}\n x={dayLabelW + col * stride}\n y={12}\n className={styles.label}\n >\n {month}\n </text>\n ))}\n\n {/* Day-of-week labels: Mon, Wed, Fri */}\n {showDayLabels &&\n labelRows.map(({ row, label }) => (\n <text\n key={`d-${row}`}\n x={0}\n y={monthLabelH + row * stride + resolvedCellSize - 1}\n className={styles.label}\n >\n {label}\n </text>\n ))}\n\n {/* Activity grid */}\n <g role=\"grid\" aria-label={ariaLabel}>\n {grid.map((column, col) => (\n <g key={col} role=\"row\">\n {column.map((cell, row) => {\n const tipText = cellTooltip(cell);\n const isFocused =\n focusedCell.col === col && focusedCell.row === row;\n\n return (\n <rect\n key={`${col}-${row}`}\n data-col={col}\n data-row={row}\n x={dayLabelW + col * stride}\n y={monthLabelH + row * stride}\n width={resolvedCellSize}\n height={resolvedCellSize}\n rx={cellRx}\n fill={cellColor(cell)}\n opacity={cell.future ? 0.35 : 1}\n className={styles.cell}\n role=\"gridcell\"\n aria-label={tipText}\n aria-disabled={cell.future || undefined}\n tabIndex={isFocused ? 0 : -1}\n onClick={() => !cell.future && onDayClick?.({ date: cell.iso, count: cell.count })}\n onKeyDown={(e) => handleCellKey(e, col, row)}\n onFocus={() => setFocusedCell({ col, row })}\n onMouseEnter={(e) => handleMouseEnter(e, tipText)}\n onMouseLeave={hideTooltip}\n />\n );\n })}\n </g>\n ))}\n </g>\n </svg>\n </div>\n\n {tooltip && typeof document !== \"undefined\" && createPortal(\n <div\n ref={tooltipRef}\n className={styles.tooltip}\n style={\n tooltipPosition\n ? { left: tooltipPosition.left, top: tooltipPosition.top }\n : { visibility: \"hidden\", left: 0, top: 0 }\n }\n role=\"tooltip\"\n >\n {tooltip.text}\n </div>,\n document.body,\n )}\n\n {showLegend && (\n <div className={styles.legend}>\n <span className={styles.legendLabel}>Less</span>\n {Array.from({ length: maxLevel + 1 }, (_, i) => (\n <svg\n key={i}\n width={resolvedCellSize}\n height={resolvedCellSize}\n aria-hidden=\"true\"\n className={styles.legendCell}\n >\n <rect\n width={resolvedCellSize}\n height={resolvedCellSize}\n rx={cellRx}\n fill={colors[Math.min(i, colors.length - 1)]}\n />\n </svg>\n ))}\n <span className={styles.legendLabel}>More</span>\n </div>\n )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B;KACE,kBAAC,QAAD;MAAM,WAAW,EAAO;gBAAa;MAAW,CAAA;KAC/C,MAAM,KAAK,EAAE,QAAQ,IAAW,GAAG,GAAG,GAAG,MACxC,kBAAC,OAAD;MAEE,OAAO;MACP,QAAQ;MACR,eAAY;MACZ,WAAW,EAAO;gBAElB,kBAAC,QAAD;OACE,OAAO;OACP,QAAQ;OACR,IAAI;OACJ,MAAM,EAAO,KAAK,IAAI,GAAG,EAAO,SAAS,EAAE;OAC3C,CAAA;MACE,EAZC,EAYD,CACN;KACF,kBAAC,QAAD;MAAM,WAAW,EAAO;gBAAa;MAAW,CAAA;KAC5C;;GAEJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={wrapper:`
|
|
1
|
+
var e={wrapper:`_wrapper_1onba_1`,graphViewport:`_graphViewport_1onba_10`,svg:`_svg_1onba_17`,label:`_label_1onba_22`,cell:`_cell_1onba_30`,tooltip:`_tooltip_1onba_67`,legend:`_legend_1onba_86`,legendLabel:`_legendLabel_1onba_93`,legendCell:`_legendCell_1onba_101`};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=ContributionGraph.module.css.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContributionGraph.module.css.cjs","names":[],"sources":["../../../src/components/ContributionGraph/ContributionGraph.module.css"],"sourcesContent":[".wrapper {\n position: relative;\n display:
|
|
1
|
+
{"version":3,"file":"ContributionGraph.module.css.cjs","names":[],"sources":["../../../src/components/ContributionGraph/ContributionGraph.module.css"],"sourcesContent":[".wrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: var(--gnome-space-1, 6px);\n min-width: 0;\n}\n\n.graphViewport {\n width: 100%;\n min-width: 0;\n overflow-x: auto;\n overflow-y: visible;\n}\n\n.svg {\n display: block;\n flex-shrink: 0;\n}\n\n.label {\n font-family: var(--gnome-font-family, system-ui);\n font-size: 11px;\n fill: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n opacity: 0.6;\n user-select: none;\n}\n\n.cell {\n cursor: default;\n transition:\n stroke-opacity var(--gnome-transition-fast, 100ms) ease,\n stroke-width var(--gnome-transition-fast, 100ms) ease;\n outline: none;\n}\n\n.cell:not([aria-disabled=\"true\"]):hover {\n stroke: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n stroke-opacity: 0.35;\n stroke-width: 1;\n}\n\n.cell:not([aria-disabled=\"true\"]) {\n cursor: pointer;\n}\n\n.cell:focus-visible {\n outline: 2px solid var(--gnome-accent-color, #3584e4);\n outline-offset: 1px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .cell {\n transition: none;\n }\n}\n\n@media (prefers-contrast: more) {\n .cell {\n stroke: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n stroke-width: 0.5;\n stroke-opacity: 0.3;\n }\n}\n\n.tooltip {\n position: fixed;\n box-sizing: border-box;\n max-width: calc(100vw - 16px);\n background: var(--gnome-popover-bg-color, #fff);\n border: 1px solid var(--gnome-light-3, #deddda);\n border-radius: var(--gnome-radius-md, 8px);\n padding: 4px 8px;\n font-family: var(--gnome-font-family, system-ui);\n font-size: 12px;\n color: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n box-shadow: var(--gnome-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.12));\n pointer-events: none;\n overflow-wrap: anywhere;\n text-align: center;\n white-space: normal;\n z-index: 10001;\n}\n\n.legend {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--gnome-space-1, 6px);\n}\n\n.legendLabel {\n font-family: var(--gnome-font-family, system-ui);\n font-size: 11px;\n color: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n opacity: 0.6;\n user-select: none;\n}\n\n.legendCell {\n display: block;\n flex-shrink: 0;\n}\n"],"mappings":""}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
var e = {
|
|
2
|
-
wrapper: "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
wrapper: "_wrapper_1onba_1",
|
|
3
|
+
graphViewport: "_graphViewport_1onba_10",
|
|
4
|
+
svg: "_svg_1onba_17",
|
|
5
|
+
label: "_label_1onba_22",
|
|
6
|
+
cell: "_cell_1onba_30",
|
|
7
|
+
tooltip: "_tooltip_1onba_67",
|
|
8
|
+
legend: "_legend_1onba_86",
|
|
9
|
+
legendLabel: "_legendLabel_1onba_93",
|
|
10
|
+
legendCell: "_legendCell_1onba_101"
|
|
10
11
|
};
|
|
11
12
|
//#endregion
|
|
12
13
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContributionGraph.module.css.js","names":[],"sources":["../../../src/components/ContributionGraph/ContributionGraph.module.css"],"sourcesContent":[".wrapper {\n position: relative;\n display:
|
|
1
|
+
{"version":3,"file":"ContributionGraph.module.css.js","names":[],"sources":["../../../src/components/ContributionGraph/ContributionGraph.module.css"],"sourcesContent":[".wrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: var(--gnome-space-1, 6px);\n min-width: 0;\n}\n\n.graphViewport {\n width: 100%;\n min-width: 0;\n overflow-x: auto;\n overflow-y: visible;\n}\n\n.svg {\n display: block;\n flex-shrink: 0;\n}\n\n.label {\n font-family: var(--gnome-font-family, system-ui);\n font-size: 11px;\n fill: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n opacity: 0.6;\n user-select: none;\n}\n\n.cell {\n cursor: default;\n transition:\n stroke-opacity var(--gnome-transition-fast, 100ms) ease,\n stroke-width var(--gnome-transition-fast, 100ms) ease;\n outline: none;\n}\n\n.cell:not([aria-disabled=\"true\"]):hover {\n stroke: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n stroke-opacity: 0.35;\n stroke-width: 1;\n}\n\n.cell:not([aria-disabled=\"true\"]) {\n cursor: pointer;\n}\n\n.cell:focus-visible {\n outline: 2px solid var(--gnome-accent-color, #3584e4);\n outline-offset: 1px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .cell {\n transition: none;\n }\n}\n\n@media (prefers-contrast: more) {\n .cell {\n stroke: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n stroke-width: 0.5;\n stroke-opacity: 0.3;\n }\n}\n\n.tooltip {\n position: fixed;\n box-sizing: border-box;\n max-width: calc(100vw - 16px);\n background: var(--gnome-popover-bg-color, #fff);\n border: 1px solid var(--gnome-light-3, #deddda);\n border-radius: var(--gnome-radius-md, 8px);\n padding: 4px 8px;\n font-family: var(--gnome-font-family, system-ui);\n font-size: 12px;\n color: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n box-shadow: var(--gnome-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.12));\n pointer-events: none;\n overflow-wrap: anywhere;\n text-align: center;\n white-space: normal;\n z-index: 10001;\n}\n\n.legend {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--gnome-space-1, 6px);\n}\n\n.legendLabel {\n font-family: var(--gnome-font-family, system-ui);\n font-size: 11px;\n color: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n opacity: 0.6;\n user-select: none;\n}\n\n.legendCell {\n display: block;\n flex-shrink: 0;\n}\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { ContributionGraph } from './ContributionGraph';
|
|
2
|
-
export type { ContributionGraphProps, ContributionDay } from './ContributionGraph';
|
|
2
|
+
export type { ContributionGraphProps, ContributionDay, } from './ContributionGraph';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require(`../Dialog/dialogUtils.cjs`),t=require(`./Drawer.module.css.cjs`);let n=require(`react`),r=require(`react-dom`),i=require(`react/jsx-runtime`);function a({open:a,side:o=`right`,size:s=`classic`,title:c,content:l,children:u,onClose:d,closeOnBackdrop:f=!0,className:p,...m}){let h=(0,n.useRef)(null),g=(0,n.useId)(),_=(0,n.useRef)(null),v=e.useVisualViewport(),y=l===void 0?u:l;(0,n.useEffect)(()=>{a?(_.current=document.activeElement,h.current?.querySelector(e.FOCUSABLE)?.focus()):_.current?.focus()},[a]);let b=(0,n.useCallback)(t=>{if(t.key===`Escape`){t.preventDefault(),d?.();return}e.trapFocus(t,h)},[d]);if(!a)return null;let x=(0,i.jsx)(`div`,{className:t.default.backdrop,style:v,onClick:f?d:void 0,children:(0,i.jsxs)(`div`,{ref:h,role:`dialog`,"aria-modal":`true`,"aria-labelledby":c?g:void 0,"data-side":o,"data-size":s,className:[t.default.drawer,o===`left`?t.default.left:t.default.right,s===`wide`?t.default.wide:t.default.classic,p].filter(Boolean).join(` `),onKeyDown:b,onClick:e=>e.stopPropagation(),...m,children:[c&&(0,i.jsx)(`div`,{id:g,className:t.default.title,children:c}),y!==void 0&&(0,i.jsx)(`div`,{className:t.default.content,children:y})]})});return typeof document>`u`?x:(0,r.createPortal)(x,document.body)}exports.Drawer=a;
|
|
2
|
+
//# sourceMappingURL=Drawer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.cjs","names":[],"sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useId,\n useRef,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { FOCUSABLE, trapFocus, useVisualViewport } from \"../Dialog/dialogUtils\";\nimport styles from \"./Drawer.module.css\";\n\nexport type DrawerSide = \"left\" | \"right\";\nexport type DrawerSize = \"classic\" | \"wide\";\n\nexport interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, \"content\" | \"title\"> {\n /** Whether the drawer is visible. */\n open: boolean;\n /** Edge that the drawer slides in from. Defaults to `\"right\"`. */\n side?: DrawerSide;\n /** Preset drawer width. Defaults to `\"classic\"`. */\n size?: DrawerSize;\n /** Optional drawer heading. */\n title?: ReactNode;\n /** Drawer content when a prop is preferred over `children`. */\n content?: ReactNode;\n /** Drawer content. Used when `content` is not provided. */\n children?: ReactNode;\n /** Called when the user dismisses the drawer with Escape or the backdrop. */\n onClose?: () => void;\n /** Whether clicking the backdrop closes the drawer. Defaults to `true`. */\n closeOnBackdrop?: boolean;\n}\n\n/**\n * Slide-over panel for supplementary content.\n *\n * The drawer is controlled through `open`, renders into `document.body`, and\n * accepts its body as either `content` or `children`.\n */\nexport function Drawer({\n open,\n side = \"right\",\n size = \"classic\",\n title,\n content,\n children,\n onClose,\n closeOnBackdrop = true,\n className,\n ...props\n}: DrawerProps) {\n const drawerRef = useRef<HTMLDivElement>(null);\n const titleId = useId();\n const previouslyFocused = useRef<Element | null>(null);\n const viewportStyle = useVisualViewport();\n const body = content !== undefined ? content : children;\n\n useEffect(() => {\n if (open) {\n previouslyFocused.current = document.activeElement;\n drawerRef.current?.querySelector<HTMLElement>(FOCUSABLE)?.focus();\n } else {\n (previouslyFocused.current as HTMLElement | null)?.focus();\n }\n }, [open]);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"Escape\") {\n event.preventDefault();\n onClose?.();\n return;\n }\n\n trapFocus(event, drawerRef);\n },\n [onClose],\n );\n\n if (!open) return null;\n\n const node = (\n <div\n className={styles.backdrop}\n style={viewportStyle}\n onClick={closeOnBackdrop ? onClose : undefined}\n >\n <div\n ref={drawerRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title ? titleId : undefined}\n data-side={side}\n data-size={size}\n className={[\n styles.drawer,\n side === \"left\" ? styles.left : styles.right,\n size === \"wide\" ? styles.wide : styles.classic,\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n onKeyDown={handleKeyDown}\n onClick={(event) => event.stopPropagation()}\n {...props}\n >\n {title && <div id={titleId} className={styles.title}>{title}</div>}\n {body !== undefined && <div className={styles.content}>{body}</div>}\n </div>\n </div>\n );\n\n if (typeof document === \"undefined\") return node;\n return createPortal(node, document.body);\n}\n"],"mappings":"+JAyCA,SAAg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A,QAAO,iBAAU,EAAW,CAAA,CAC/D,GACF,CAAA,CAIR,OADI,OAAO,SAAa,IAAoB,GAC5C,EAAA,EAAA,cAAoB,EAAM,SAAS,KAAK"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type DrawerSide = "left" | "right";
|
|
3
|
+
export type DrawerSize = "classic" | "wide";
|
|
4
|
+
export interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, "content" | "title"> {
|
|
5
|
+
/** Whether the drawer is visible. */
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** Edge that the drawer slides in from. Defaults to `"right"`. */
|
|
8
|
+
side?: DrawerSide;
|
|
9
|
+
/** Preset drawer width. Defaults to `"classic"`. */
|
|
10
|
+
size?: DrawerSize;
|
|
11
|
+
/** Optional drawer heading. */
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
/** Drawer content when a prop is preferred over `children`. */
|
|
14
|
+
content?: ReactNode;
|
|
15
|
+
/** Drawer content. Used when `content` is not provided. */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
/** Called when the user dismisses the drawer with Escape or the backdrop. */
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
/** Whether clicking the backdrop closes the drawer. Defaults to `true`. */
|
|
20
|
+
closeOnBackdrop?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Slide-over panel for supplementary content.
|
|
24
|
+
*
|
|
25
|
+
* The drawer is controlled through `open`, renders into `document.body`, and
|
|
26
|
+
* accepts its body as either `content` or `children`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function Drawer({ open, side, size, title, content, children, onClose, closeOnBackdrop, className, ...props }: DrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { FOCUSABLE as e, trapFocus as t, useVisualViewport as n } from "../Dialog/dialogUtils.js";
|
|
2
|
+
import r from "./Drawer.module.css.js";
|
|
3
|
+
import { useCallback as i, useEffect as a, useId as o, useRef as s } from "react";
|
|
4
|
+
import { createPortal as c } from "react-dom";
|
|
5
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/Drawer/Drawer.tsx
|
|
7
|
+
function d({ open: d, side: f = "right", size: p = "classic", title: m, content: h, children: g, onClose: _, closeOnBackdrop: v = !0, className: y, ...b }) {
|
|
8
|
+
let x = s(null), S = o(), C = s(null), w = n(), T = h === void 0 ? g : h;
|
|
9
|
+
a(() => {
|
|
10
|
+
d ? (C.current = document.activeElement, x.current?.querySelector(e)?.focus()) : C.current?.focus();
|
|
11
|
+
}, [d]);
|
|
12
|
+
let E = i((e) => {
|
|
13
|
+
if (e.key === "Escape") {
|
|
14
|
+
e.preventDefault(), _?.();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
t(e, x);
|
|
18
|
+
}, [_]);
|
|
19
|
+
if (!d) return null;
|
|
20
|
+
let D = /* @__PURE__ */ l("div", {
|
|
21
|
+
className: r.backdrop,
|
|
22
|
+
style: w,
|
|
23
|
+
onClick: v ? _ : void 0,
|
|
24
|
+
children: /* @__PURE__ */ u("div", {
|
|
25
|
+
ref: x,
|
|
26
|
+
role: "dialog",
|
|
27
|
+
"aria-modal": "true",
|
|
28
|
+
"aria-labelledby": m ? S : void 0,
|
|
29
|
+
"data-side": f,
|
|
30
|
+
"data-size": p,
|
|
31
|
+
className: [
|
|
32
|
+
r.drawer,
|
|
33
|
+
f === "left" ? r.left : r.right,
|
|
34
|
+
p === "wide" ? r.wide : r.classic,
|
|
35
|
+
y
|
|
36
|
+
].filter(Boolean).join(" "),
|
|
37
|
+
onKeyDown: E,
|
|
38
|
+
onClick: (e) => e.stopPropagation(),
|
|
39
|
+
...b,
|
|
40
|
+
children: [m && /* @__PURE__ */ l("div", {
|
|
41
|
+
id: S,
|
|
42
|
+
className: r.title,
|
|
43
|
+
children: m
|
|
44
|
+
}), T !== void 0 && /* @__PURE__ */ l("div", {
|
|
45
|
+
className: r.content,
|
|
46
|
+
children: T
|
|
47
|
+
})]
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
return typeof document > "u" ? D : c(D, document.body);
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { d as Drawer };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=Drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.js","names":[],"sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useId,\n useRef,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { FOCUSABLE, trapFocus, useVisualViewport } from \"../Dialog/dialogUtils\";\nimport styles from \"./Drawer.module.css\";\n\nexport type DrawerSide = \"left\" | \"right\";\nexport type DrawerSize = \"classic\" | \"wide\";\n\nexport interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, \"content\" | \"title\"> {\n /** Whether the drawer is visible. */\n open: boolean;\n /** Edge that the drawer slides in from. Defaults to `\"right\"`. */\n side?: DrawerSide;\n /** Preset drawer width. Defaults to `\"classic\"`. */\n size?: DrawerSize;\n /** Optional drawer heading. */\n title?: ReactNode;\n /** Drawer content when a prop is preferred over `children`. */\n content?: ReactNode;\n /** Drawer content. Used when `content` is not provided. */\n children?: ReactNode;\n /** Called when the user dismisses the drawer with Escape or the backdrop. */\n onClose?: () => void;\n /** Whether clicking the backdrop closes the drawer. Defaults to `true`. */\n closeOnBackdrop?: boolean;\n}\n\n/**\n * Slide-over panel for supplementary content.\n *\n * The drawer is controlled through `open`, renders into `document.body`, and\n * accepts its body as either `content` or `children`.\n */\nexport function Drawer({\n open,\n side = \"right\",\n size = \"classic\",\n title,\n content,\n children,\n onClose,\n closeOnBackdrop = true,\n className,\n ...props\n}: DrawerProps) {\n const drawerRef = useRef<HTMLDivElement>(null);\n const titleId = useId();\n const previouslyFocused = useRef<Element | null>(null);\n const viewportStyle = useVisualViewport();\n const body = content !== undefined ? content : children;\n\n useEffect(() => {\n if (open) {\n previouslyFocused.current = document.activeElement;\n drawerRef.current?.querySelector<HTMLElement>(FOCUSABLE)?.focus();\n } else {\n (previouslyFocused.current as HTMLElement | null)?.focus();\n }\n }, [open]);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"Escape\") {\n event.preventDefault();\n onClose?.();\n return;\n }\n\n trapFocus(event, drawerRef);\n },\n [onClose],\n );\n\n if (!open) return null;\n\n const node = (\n <div\n className={styles.backdrop}\n style={viewportStyle}\n onClick={closeOnBackdrop ? onClose : undefined}\n >\n <div\n ref={drawerRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title ? titleId : undefined}\n data-side={side}\n data-size={size}\n className={[\n styles.drawer,\n side === \"left\" ? styles.left : styles.right,\n size === \"wide\" ? styles.wide : styles.classic,\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n onKeyDown={handleKeyDown}\n onClick={(event) => event.stopPropagation()}\n {...props}\n >\n {title && <div id={titleId} className={styles.title}>{title}</div>}\n {body !== undefined && <div className={styles.content}>{body}</div>}\n </div>\n </div>\n );\n\n if (typeof document === \"undefined\") return node;\n return createPortal(node, document.body);\n}\n"],"mappings":";;;;;;AAyCA,SAAgB,EAAO,EACrB,SACA,UAAO,SACP,UAAO,WACP,UACA,YACA,aACA,YACA,qBAAkB,IAClB,cACA,GAAG,KACW;CACd,IAAM,IAAY,EAAuB,KAAK,EACxC,IAAU,GAAO,EACjB,IAAoB,EAAuB,KAAK,EAChD,IAAgB,GAAmB,EACnC,IAAO,MAAY,KAAA,IAAsB,IAAV;AAErC,SAAgB;AACd,EAAI,KACF,EAAkB,UAAU,SAAS,eACrC,EAAU,SAAS,cAA2B,EAAU,EAAE,OAAO,IAEhE,EAAkB,SAAgC,OAAO;IAE3D,CAAC,EAAK,CAAC;CAEV,IAAM,IAAgB,GACnB,MAAyC;AACxC,MAAI,EAAM,QAAQ,UAAU;AAE1B,GADA,EAAM,gBAAgB,EACtB,KAAW;AACX;;AAGF,IAAU,GAAO,EAAU;IAE7B,CAAC,EAAQ,CACV;AAED,KAAI,CAAC,EAAM,QAAO;CAElB,IAAM,IACJ,kBAAC,OAAD;EACE,WAAW,EAAO;EAClB,OAAO;EACP,SAAS,IAAkB,IAAU,KAAA;YAErC,kBAAC,OAAD;GACE,KAAK;GACL,MAAK;GACL,cAAW;GACX,mBAAiB,IAAQ,IAAU,KAAA;GACnC,aAAW;GACX,aAAW;GACX,WAAW;IACT,EAAO;IACP,MAAS,SAAS,EAAO,OAAO,EAAO;IACvC,MAAS,SAAS,EAAO,OAAO,EAAO;IACvC;IACD,CACE,OAAO,QAAQ,CACf,KAAK,IAAI;GACZ,WAAW;GACX,UAAU,MAAU,EAAM,iBAAiB;GAC3C,GAAI;aAjBN,CAmBG,KAAS,kBAAC,OAAD;IAAK,IAAI;IAAS,WAAW,EAAO;cAAQ;IAAY,CAAA,EACjE,MAAS,KAAA,KAAa,kBAAC,OAAD;IAAK,WAAW,EAAO;cAAU;IAAW,CAAA,CAC/D;;EACF,CAAA;AAIR,QADI,OAAO,WAAa,MAAoB,IACrC,EAAa,GAAM,SAAS,KAAK"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=`_backdrop_iw6h1_3`,t=`_drawer_iw6h1_24`,n=`_classic_iw6h1_36`,r=`_wide_iw6h1_40`,i=`_left_iw6h1_44`,a=`_right_iw6h1_53`,o=`_title_iw6h1_72`,s=`_content_iw6h1_82`,c={backdrop:e,"backdrop-in":`_backdrop-in_iw6h1_1`,drawer:t,classic:n,wide:r,left:i,"drawer-in-left":`_drawer-in-left_iw6h1_1`,right:a,"drawer-in-right":`_drawer-in-right_iw6h1_1`,title:o,content:s};exports.default=c;
|
|
2
|
+
//# sourceMappingURL=Drawer.module.css.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.module.css.cjs","names":[],"sources":["../../../src/components/Drawer/Drawer.module.css"],"sourcesContent":["/* ─── Backdrop ─────────────────────────────────────────────────────────────── */\n\n.backdrop {\n position: fixed;\n inset: 0;\n z-index: 10000;\n\n display: flex;\n\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(4px);\n -webkit-backdrop-filter: blur(4px);\n\n animation: backdrop-in var(--gnome-duration-normal, 200ms) var(--gnome-easing-default, ease) both;\n}\n\n@keyframes backdrop-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* ─── Drawer ──────────────────────────────────────────────────────────────── */\n\n.drawer {\n display: flex;\n flex-direction: column;\n width: min(var(--gnome-drawer-width, var(--gnome-drawer-preset-width, 420px)), 100vw);\n height: 100dvh;\n min-width: 0;\n overflow: hidden;\n\n background-color: var(--gnome-dialog-bg-color, var(--gnome-window-bg-color, #fafafa));\n color: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n}\n\n.classic {\n --gnome-drawer-preset-width: 420px;\n}\n\n.wide {\n --gnome-drawer-preset-width: 640px;\n}\n\n.left {\n margin-right: auto;\n border-radius: 0 var(--gnome-radius-xl, 16px) var(--gnome-radius-xl, 16px) 0;\n box-shadow:\n 4px 0 24px rgba(0, 0, 0, 0.18),\n 0 0 0 1px rgba(0, 0, 0, 0.06);\n animation: drawer-in-left var(--gnome-duration-normal, 200ms) var(--gnome-easing-default, ease) both;\n}\n\n.right {\n margin-left: auto;\n border-radius: var(--gnome-radius-xl, 16px) 0 0 var(--gnome-radius-xl, 16px);\n box-shadow:\n -4px 0 24px rgba(0, 0, 0, 0.18),\n 0 0 0 1px rgba(0, 0, 0, 0.06);\n animation: drawer-in-right var(--gnome-duration-normal, 200ms) var(--gnome-easing-default, ease) both;\n}\n\n@keyframes drawer-in-left {\n from { transform: translateX(-100%); }\n to { transform: translateX(0); }\n}\n\n@keyframes drawer-in-right {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n}\n\n.title {\n flex-shrink: 0;\n padding: var(--gnome-space-4, 24px) var(--gnome-space-4, 24px) var(--gnome-space-2, 12px);\n\n font-family: var(--gnome-font-family);\n font-size: var(--gnome-font-size-title-4, 1.125rem);\n font-weight: var(--gnome-font-weight-bold, 700);\n line-height: var(--gnome-line-height-title, 1.3);\n}\n\n.content {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: var(--gnome-space-4, 24px);\n}\n\n.title + .content {\n padding-top: 0;\n}\n\n/* ─── Dark mode ────────────────────────────────────────────────────────────── */\n\n@media (prefers-color-scheme: dark) {\n .backdrop {\n background-color: rgba(0, 0, 0, 0.65);\n }\n\n .drawer {\n background-color: var(--gnome-dialog-bg-color, var(--gnome-window-bg-color, #242424));\n }\n\n .left {\n box-shadow:\n 4px 0 24px rgba(0, 0, 0, 0.45),\n 0 0 0 1px rgba(255, 255, 255, 0.06);\n }\n\n .right {\n box-shadow:\n -4px 0 24px rgba(0, 0, 0, 0.45),\n 0 0 0 1px rgba(255, 255, 255, 0.06);\n }\n}\n\n/* ─── Reduced motion ──────────────────────────────────────────────────────── */\n\n@media (prefers-reduced-motion: reduce) {\n .backdrop,\n .left,\n .right {\n animation: none;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/components/Drawer/Drawer.module.css
|
|
2
|
+
var e = "_backdrop_iw6h1_3", t = "_drawer_iw6h1_24", n = "_classic_iw6h1_36", r = "_wide_iw6h1_40", i = "_left_iw6h1_44", a = "_right_iw6h1_53", o = "_title_iw6h1_72", s = "_content_iw6h1_82", c = {
|
|
3
|
+
backdrop: e,
|
|
4
|
+
"backdrop-in": "_backdrop-in_iw6h1_1",
|
|
5
|
+
drawer: t,
|
|
6
|
+
classic: n,
|
|
7
|
+
wide: r,
|
|
8
|
+
left: i,
|
|
9
|
+
"drawer-in-left": "_drawer-in-left_iw6h1_1",
|
|
10
|
+
right: a,
|
|
11
|
+
"drawer-in-right": "_drawer-in-right_iw6h1_1",
|
|
12
|
+
title: o,
|
|
13
|
+
content: s
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { c as default };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=Drawer.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.module.css.js","names":[],"sources":["../../../src/components/Drawer/Drawer.module.css"],"sourcesContent":["/* ─── Backdrop ─────────────────────────────────────────────────────────────── */\n\n.backdrop {\n position: fixed;\n inset: 0;\n z-index: 10000;\n\n display: flex;\n\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(4px);\n -webkit-backdrop-filter: blur(4px);\n\n animation: backdrop-in var(--gnome-duration-normal, 200ms) var(--gnome-easing-default, ease) both;\n}\n\n@keyframes backdrop-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* ─── Drawer ──────────────────────────────────────────────────────────────── */\n\n.drawer {\n display: flex;\n flex-direction: column;\n width: min(var(--gnome-drawer-width, var(--gnome-drawer-preset-width, 420px)), 100vw);\n height: 100dvh;\n min-width: 0;\n overflow: hidden;\n\n background-color: var(--gnome-dialog-bg-color, var(--gnome-window-bg-color, #fafafa));\n color: var(--gnome-window-fg-color, rgba(0, 0, 0, 0.8));\n}\n\n.classic {\n --gnome-drawer-preset-width: 420px;\n}\n\n.wide {\n --gnome-drawer-preset-width: 640px;\n}\n\n.left {\n margin-right: auto;\n border-radius: 0 var(--gnome-radius-xl, 16px) var(--gnome-radius-xl, 16px) 0;\n box-shadow:\n 4px 0 24px rgba(0, 0, 0, 0.18),\n 0 0 0 1px rgba(0, 0, 0, 0.06);\n animation: drawer-in-left var(--gnome-duration-normal, 200ms) var(--gnome-easing-default, ease) both;\n}\n\n.right {\n margin-left: auto;\n border-radius: var(--gnome-radius-xl, 16px) 0 0 var(--gnome-radius-xl, 16px);\n box-shadow:\n -4px 0 24px rgba(0, 0, 0, 0.18),\n 0 0 0 1px rgba(0, 0, 0, 0.06);\n animation: drawer-in-right var(--gnome-duration-normal, 200ms) var(--gnome-easing-default, ease) both;\n}\n\n@keyframes drawer-in-left {\n from { transform: translateX(-100%); }\n to { transform: translateX(0); }\n}\n\n@keyframes drawer-in-right {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n}\n\n.title {\n flex-shrink: 0;\n padding: var(--gnome-space-4, 24px) var(--gnome-space-4, 24px) var(--gnome-space-2, 12px);\n\n font-family: var(--gnome-font-family);\n font-size: var(--gnome-font-size-title-4, 1.125rem);\n font-weight: var(--gnome-font-weight-bold, 700);\n line-height: var(--gnome-line-height-title, 1.3);\n}\n\n.content {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: var(--gnome-space-4, 24px);\n}\n\n.title + .content {\n padding-top: 0;\n}\n\n/* ─── Dark mode ────────────────────────────────────────────────────────────── */\n\n@media (prefers-color-scheme: dark) {\n .backdrop {\n background-color: rgba(0, 0, 0, 0.65);\n }\n\n .drawer {\n background-color: var(--gnome-dialog-bg-color, var(--gnome-window-bg-color, #242424));\n }\n\n .left {\n box-shadow:\n 4px 0 24px rgba(0, 0, 0, 0.45),\n 0 0 0 1px rgba(255, 255, 255, 0.06);\n }\n\n .right {\n box-shadow:\n -4px 0 24px rgba(0, 0, 0, 0.45),\n 0 0 0 1px rgba(255, 255, 255, 0.06);\n }\n}\n\n/* ─── Reduced motion ──────────────────────────────────────────────────────── */\n\n@media (prefers-reduced-motion: reduce) {\n .backdrop,\n .left,\n .right {\n animation: none;\n }\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./Drawer/Drawer.cjs`);exports.Drawer=e.Drawer;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const ee=require(`./components/AboutDialog/AboutDialog.cjs`),e=require(`./components/ActionRow/ActionRow.cjs`),t=require(`./components/Avatar/Avatar.cjs`),n=require(`./components/AvatarRotator/AvatarRotator.cjs`),r=require(`./components/Badge/Badge.cjs`),i=require(`./components/Banner/Banner.cjs`),a=require(`./components/Bin/Bin.cjs`),te=require(`./components/Blockquote/Blockquote.cjs`),o=require(`./components/BottomSheet/BottomSheet.cjs`),s=require(`./components/Box/Box.cjs`),c=require(`./components/Separator/Separator.cjs`),l=require(`./components/BoxedList/BoxedList.cjs`),u=require(`./components/BreakpointBin/BreakpointBin.cjs`),d=require(`./components/Button/Button.cjs`),f=require(`./components/ButtonContent/ButtonContent.cjs`),p=require(`./components/ButtonRow/ButtonRow.cjs`),m=require(`./components/Card/Card.cjs`),h=require(`./components/Carousel/Carousel.cjs`),g=require(`./components/CheckRow/CheckRow.cjs`),_=require(`./components/Checkbox/Checkbox.cjs`),v=require(`./components/Icon/Icon.cjs`),y=require(`./components/Chip/Chip.cjs`),b=require(`./components/Clamp/Clamp.cjs`),x=require(`./components/ColorPicker/ColorPicker.cjs`),S=require(`./components/ColumnView/ColumnView.cjs`),C=require(`./components/ComboRow/ComboRow.cjs`),w=require(`./components/GnomeProvider/GnomeContext.cjs`),T=require(`./components/ContributionGraph/ContributionGraph.cjs`),E=require(`./components/CountDownTimer/CountDownTimer.cjs`),D=require(`./components/Dialog/Dialog.cjs`),O=require(`./components/Drawer/Drawer.cjs`),k=require(`./components/Dropdown/Dropdown.cjs`),A=require(`./components/EntryRow/EntryRow.cjs`),j=require(`./components/ExpanderRow/ExpanderRow.cjs`),M=require(`./components/Footer/Footer.cjs`),N=require(`./components/Frame/Frame.cjs`),P=require(`./components/GnomeProvider/GnomeProvider.cjs`),F=require(`./components/HeaderBar/HeaderBar.cjs`),I=require(`./components/Tooltip/Tooltip.cjs`),L=require(`./components/IconButton/IconButton.cjs`),R=require(`./components/InlineViewSwitcher/InlineViewSwitcher.cjs`),z=require(`./components/InlineViewSwitcher/InlineViewSwitcherItem.cjs`),B=require(`./components/Link/Link.cjs`),V=require(`./components/LinkedGroup/LinkedGroup.cjs`),H=require(`./hooks/useBreakpoint.cjs`),U=require(`./components/NavigationSplitView/NavigationSplitView.cjs`),W=require(`./components/NavigationView/NavigationView.cjs`),G=require(`./components/OverlaySplitView/OverlaySplitView.cjs`),K=require(`./components/PasswordEntryRow/PasswordEntryRow.cjs`),q=require(`./components/PathBar/PathBar.cjs`),J=require(`./components/Popover/Popover.cjs`),Y=require(`./components/PreferencesDialog/PreferencesDialog.cjs`),X=require(`./components/PreferencesGroup/PreferencesGroup.cjs`),Z=require(`./components/PreferencesPage/PreferencesPage.cjs`),Q=require(`./components/ProgressBar/ProgressBar.cjs`),ne=require(`./components/RadioButton/RadioButton.cjs`),re=require(`./components/Spinner/Spinner.cjs`),ie=require(`./components/SearchBar/SearchBar.cjs`),ae=require(`./components/ShortcutLabel/ShortcutLabel.cjs`),oe=require(`./components/ShortcutsDialog/ShortcutsDialog.cjs`),se=require(`./components/StatusPage/StatusPage.cjs`),$=require(`./components/Sidebar/Sidebar.cjs`),ce=require(`./components/Sidebar/SidebarSection.cjs`),le=require(`./components/Sidebar/SidebarItem.cjs`),ue=require(`./components/Skeleton/Skeleton.cjs`),de=require(`./components/Slider/Slider.cjs`),fe=require(`./components/SpinButton/SpinButton.cjs`),pe=require(`./components/SpinRow/SpinRow.cjs`),me=require(`./components/SplitButton/SplitButton.cjs`),he=require(`./components/StatusBadge/StatusBadge.cjs`),ge=require(`./components/Switch/Switch.cjs`),_e=require(`./components/SwitchRow/SwitchRow.cjs`),ve=require(`./components/Tabs/TabBar.cjs`),ye=require(`./components/Tabs/TabItem.cjs`),be=require(`./components/Tabs/TabPanel.cjs`),xe=require(`./components/TerminalView/TerminalView.cjs`),Se=require(`./components/Text/Text.cjs`),Ce=require(`./components/TextField/TextField.cjs`),we=require(`./components/Timeline/Timeline.cjs`),Te=require(`./components/Toast/Toast.cjs`),Ee=require(`./components/Toast/Toaster.cjs`),De=require(`./components/ToggleGroup/ToggleGroup.cjs`),Oe=require(`./components/ToggleGroup/ToggleGroupItem.cjs`),ke=require(`./components/Toolbar/Toolbar.cjs`),Ae=require(`./components/Toolbar/Spacer.cjs`),je=require(`./components/ToolbarView/ToolbarView.cjs`),Me=require(`./components/ViewSwitcher/ViewSwitcher.cjs`),Ne=require(`./components/ViewSwitcher/ViewSwitcherItem.cjs`),Pe=require(`./components/ViewSwitcherBar/ViewSwitcherBar.cjs`),Fe=require(`./components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs`),Ie=require(`./components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs`),Le=require(`./components/WindowTitle/WindowTitle.cjs`),Re=require(`./components/WrapBox/WrapBox.cjs`);exports.AboutDialog=ee.AboutDialog,exports.ActionRow=e.ActionRow,exports.Avatar=t.Avatar,exports.AvatarRotator=n.AvatarRotator,exports.Badge=r.Badge,exports.Banner=i.Banner,exports.Bin=a.Bin,exports.Blockquote=te.Blockquote,exports.BottomSheet=o.BottomSheet,exports.Box=s.Box,exports.BoxedList=l.BoxedList,exports.BreakpointBin=u.BreakpointBin,exports.Button=d.Button,exports.ButtonContent=f.ButtonContent,exports.ButtonRow=p.ButtonRow,exports.Card=m.Card,exports.Carousel=h.Carousel,exports.CarouselIndicatorDots=h.CarouselIndicatorDots,exports.CarouselIndicatorLines=h.CarouselIndicatorLines,exports.CheckRow=g.CheckRow,exports.Checkbox=_.Checkbox,exports.Chip=y.Chip,exports.Clamp=b.Clamp,exports.ColorPicker=x.ColorPicker,exports.ColorSwatch=x.ColorSwatch,exports.ColumnView=S.ColumnView,exports.ComboRow=C.ComboRow,exports.ContributionGraph=T.ContributionGraph,exports.CountDownTimer=E.CountDownTimer,exports.Dialog=D.Dialog,exports.Drawer=O.Drawer,exports.Dropdown=k.Dropdown,exports.EntryRow=A.EntryRow,exports.ExpanderRow=j.ExpanderRow,exports.Footer=M.Footer,exports.Frame=N.Frame,exports.GNOME_BREAKPOINTS=H.GNOME_BREAKPOINTS,exports.GNOME_PALETTE=x.GNOME_PALETTE,exports.GnomeProvider=P.GnomeProvider,exports.HeaderBar=F.HeaderBar,exports.Icon=v.Icon,exports.IconButton=L.IconButton,exports.InlineViewSwitcher=R.InlineViewSwitcher,exports.InlineViewSwitcherItem=z.InlineViewSwitcherItem,exports.Link=B.Link,exports.LinkedGroup=V.LinkedGroup,exports.NavigationPage=W.NavigationPage,exports.NavigationSplitView=U.NavigationSplitView,exports.NavigationView=W.NavigationView,exports.OverlaySplitView=G.OverlaySplitView,exports.PasswordEntryRow=K.PasswordEntryRow,exports.PathBar=q.PathBar,exports.Popover=J.Popover,exports.PreferencesDialog=Y.PreferencesDialog,exports.PreferencesGroup=X.PreferencesGroup,exports.PreferencesPage=Z.PreferencesPage,exports.ProgressBar=Q.ProgressBar,exports.RadioButton=ne.RadioButton,exports.SearchBar=ie.SearchBar,exports.Separator=c.Separator,exports.ShortcutLabel=ae.ShortcutLabel,exports.ShortcutsDialog=oe.ShortcutsDialog,exports.Sidebar=$.Sidebar,exports.SidebarCollapsedContext=$.SidebarCollapsedContext,exports.SidebarItem=le.SidebarItem,exports.SidebarSection=ce.SidebarSection,exports.Skeleton=ue.Skeleton,exports.Slider=de.Slider,exports.Spacer=Ae.Spacer,exports.SpinButton=fe.SpinButton,exports.SpinRow=pe.SpinRow,exports.Spinner=re.Spinner,exports.SplitButton=me.SplitButton,exports.StatusBadge=he.StatusBadge,exports.StatusPage=se.StatusPage,exports.Switch=ge.Switch,exports.SwitchRow=_e.SwitchRow,exports.TabBar=ve.TabBar,exports.TabItem=ye.TabItem,exports.TabPanel=be.TabPanel,exports.TerminalView=xe.TerminalView,exports.Text=Se.Text,exports.TextField=Ce.TextField,exports.Timeline=we.Timeline,exports.Toast=Te.Toast,exports.Toaster=Ee.Toaster,exports.ToggleGroup=De.ToggleGroup,exports.ToggleGroupItem=Oe.ToggleGroupItem,exports.Toolbar=ke.Toolbar,exports.ToolbarView=je.ToolbarView,exports.Tooltip=I.Tooltip,exports.ViewSwitcher=Me.ViewSwitcher,exports.ViewSwitcherBar=Pe.ViewSwitcherBar,exports.ViewSwitcherItem=Ne.ViewSwitcherItem,exports.ViewSwitcherSidebar=Fe.ViewSwitcherSidebar,exports.ViewSwitcherSidebarItem=Ie.ViewSwitcherSidebarItem,exports.WindowTitle=Le.WindowTitle,exports.WrapBox=Re.WrapBox,exports.useAccentColor=w.useAccentColor,exports.useBreakpoint=H.useBreakpoint,exports.useColorScheme=w.useColorScheme,exports.useDateTimeFormatter=w.useDateTimeFormatter,exports.useDir=w.useDir,exports.useLocale=w.useLocale,exports.useNavigation=W.useNavigation,exports.useNumberFormatter=w.useNumberFormatter,exports.useResolvedColorScheme=w.useResolvedColorScheme,exports.useSidebarCollapsed=$.useSidebarCollapsed;
|
package/dist/index.d.ts
CHANGED
|
@@ -58,6 +58,8 @@ export { Toast, Toaster } from './components/Toast';
|
|
|
58
58
|
export type { ToastProps, ToasterProps } from './components/Toast';
|
|
59
59
|
export { Dialog } from './components/Dialog';
|
|
60
60
|
export type { DialogProps, DialogButton, AlertDialogResponse, AlertDialogResponseVariant, } from './components/Dialog';
|
|
61
|
+
export { Drawer } from './components/Drawer';
|
|
62
|
+
export type { DrawerProps, DrawerSide, DrawerSize } from './components/Drawer';
|
|
61
63
|
export { AboutDialog } from './components/AboutDialog';
|
|
62
64
|
export type { AboutDialogProps, AboutDialogLink } from './components/AboutDialog';
|
|
63
65
|
export { Tooltip } from './components/Tooltip';
|
|
@@ -151,7 +153,7 @@ export type { TimelineProps, TimelineItem, TimelineOrientation, TimelineVariant
|
|
|
151
153
|
export { PathBar } from './components/PathBar';
|
|
152
154
|
export type { PathBarProps, PathBarSegment } from './components/PathBar';
|
|
153
155
|
export { ContributionGraph } from './components/ContributionGraph';
|
|
154
|
-
export type { ContributionGraphProps, ContributionDay } from './components/ContributionGraph';
|
|
156
|
+
export type { ContributionGraphProps, ContributionDay, } from './components/ContributionGraph';
|
|
155
157
|
export { ColumnView } from './components/ColumnView';
|
|
156
158
|
export type { ColumnViewProps, ColumnDef, ColumnViewSortState, ColumnViewSelectionMode, SortDirection, } from './components/ColumnView';
|
|
157
159
|
export { TerminalView } from './components/TerminalView';
|
package/dist/index.js
CHANGED
|
@@ -28,66 +28,67 @@ import { useAccentColor as A, useColorScheme as j, useDateTimeFormatter as M, us
|
|
|
28
28
|
import { ContributionGraph as L } from "./components/ContributionGraph/ContributionGraph.js";
|
|
29
29
|
import { CountDownTimer as R } from "./components/CountDownTimer/CountDownTimer.js";
|
|
30
30
|
import { Dialog as z } from "./components/Dialog/Dialog.js";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
|
|
31
|
+
import { Drawer as B } from "./components/Drawer/Drawer.js";
|
|
32
|
+
import { Dropdown as V } from "./components/Dropdown/Dropdown.js";
|
|
33
|
+
import { EntryRow as H } from "./components/EntryRow/EntryRow.js";
|
|
34
|
+
import { ExpanderRow as U } from "./components/ExpanderRow/ExpanderRow.js";
|
|
35
|
+
import { Footer as W } from "./components/Footer/Footer.js";
|
|
36
|
+
import { Frame as G } from "./components/Frame/Frame.js";
|
|
37
|
+
import { GnomeProvider as K } from "./components/GnomeProvider/GnomeProvider.js";
|
|
38
|
+
import { HeaderBar as q } from "./components/HeaderBar/HeaderBar.js";
|
|
39
|
+
import { Tooltip as J } from "./components/Tooltip/Tooltip.js";
|
|
40
|
+
import { IconButton as Y } from "./components/IconButton/IconButton.js";
|
|
41
|
+
import { InlineViewSwitcher as X } from "./components/InlineViewSwitcher/InlineViewSwitcher.js";
|
|
42
|
+
import { InlineViewSwitcherItem as Z } from "./components/InlineViewSwitcher/InlineViewSwitcherItem.js";
|
|
43
|
+
import { Link as Q } from "./components/Link/Link.js";
|
|
44
|
+
import { LinkedGroup as $ } from "./components/LinkedGroup/LinkedGroup.js";
|
|
45
|
+
import { GNOME_BREAKPOINTS as ee, useBreakpoint as te } from "./hooks/useBreakpoint.js";
|
|
46
|
+
import { NavigationSplitView as ne } from "./components/NavigationSplitView/NavigationSplitView.js";
|
|
47
|
+
import { NavigationPage as re, NavigationView as ie, useNavigation as ae } from "./components/NavigationView/NavigationView.js";
|
|
48
|
+
import { OverlaySplitView as oe } from "./components/OverlaySplitView/OverlaySplitView.js";
|
|
49
|
+
import { PasswordEntryRow as se } from "./components/PasswordEntryRow/PasswordEntryRow.js";
|
|
50
|
+
import { PathBar as ce } from "./components/PathBar/PathBar.js";
|
|
51
|
+
import { Popover as le } from "./components/Popover/Popover.js";
|
|
52
|
+
import { PreferencesDialog as ue } from "./components/PreferencesDialog/PreferencesDialog.js";
|
|
53
|
+
import { PreferencesGroup as de } from "./components/PreferencesGroup/PreferencesGroup.js";
|
|
54
|
+
import { PreferencesPage as fe } from "./components/PreferencesPage/PreferencesPage.js";
|
|
55
|
+
import { ProgressBar as pe } from "./components/ProgressBar/ProgressBar.js";
|
|
56
|
+
import { RadioButton as me } from "./components/RadioButton/RadioButton.js";
|
|
57
|
+
import { Spinner as he } from "./components/Spinner/Spinner.js";
|
|
58
|
+
import { SearchBar as ge } from "./components/SearchBar/SearchBar.js";
|
|
59
|
+
import { ShortcutLabel as _e } from "./components/ShortcutLabel/ShortcutLabel.js";
|
|
60
|
+
import { ShortcutsDialog as ve } from "./components/ShortcutsDialog/ShortcutsDialog.js";
|
|
61
|
+
import { StatusPage as ye } from "./components/StatusPage/StatusPage.js";
|
|
62
|
+
import { Sidebar as be, SidebarCollapsedContext as xe, useSidebarCollapsed as Se } from "./components/Sidebar/Sidebar.js";
|
|
63
|
+
import { SidebarSection as Ce } from "./components/Sidebar/SidebarSection.js";
|
|
64
|
+
import { SidebarItem as we } from "./components/Sidebar/SidebarItem.js";
|
|
65
|
+
import { Skeleton as Te } from "./components/Skeleton/Skeleton.js";
|
|
66
|
+
import { Slider as Ee } from "./components/Slider/Slider.js";
|
|
67
|
+
import { SpinButton as De } from "./components/SpinButton/SpinButton.js";
|
|
68
|
+
import { SpinRow as Oe } from "./components/SpinRow/SpinRow.js";
|
|
69
|
+
import { SplitButton as ke } from "./components/SplitButton/SplitButton.js";
|
|
70
|
+
import { StatusBadge as Ae } from "./components/StatusBadge/StatusBadge.js";
|
|
71
|
+
import { Switch as je } from "./components/Switch/Switch.js";
|
|
72
|
+
import { SwitchRow as Me } from "./components/SwitchRow/SwitchRow.js";
|
|
73
|
+
import { TabBar as Ne } from "./components/Tabs/TabBar.js";
|
|
74
|
+
import { TabItem as Pe } from "./components/Tabs/TabItem.js";
|
|
75
|
+
import { TabPanel as Fe } from "./components/Tabs/TabPanel.js";
|
|
76
|
+
import { TerminalView as Ie } from "./components/TerminalView/TerminalView.js";
|
|
77
|
+
import { Text as Le } from "./components/Text/Text.js";
|
|
78
|
+
import { TextField as Re } from "./components/TextField/TextField.js";
|
|
79
|
+
import { Timeline as ze } from "./components/Timeline/Timeline.js";
|
|
80
|
+
import { Toast as Be } from "./components/Toast/Toast.js";
|
|
81
|
+
import { Toaster as Ve } from "./components/Toast/Toaster.js";
|
|
82
|
+
import { ToggleGroup as He } from "./components/ToggleGroup/ToggleGroup.js";
|
|
83
|
+
import { ToggleGroupItem as Ue } from "./components/ToggleGroup/ToggleGroupItem.js";
|
|
84
|
+
import { Toolbar as We } from "./components/Toolbar/Toolbar.js";
|
|
85
|
+
import { Spacer as Ge } from "./components/Toolbar/Spacer.js";
|
|
86
|
+
import { ToolbarView as Ke } from "./components/ToolbarView/ToolbarView.js";
|
|
87
|
+
import { ViewSwitcher as qe } from "./components/ViewSwitcher/ViewSwitcher.js";
|
|
88
|
+
import { ViewSwitcherItem as Je } from "./components/ViewSwitcher/ViewSwitcherItem.js";
|
|
89
|
+
import { ViewSwitcherBar as Ye } from "./components/ViewSwitcherBar/ViewSwitcherBar.js";
|
|
90
|
+
import { ViewSwitcherSidebar as Xe } from "./components/ViewSwitcherSidebar/ViewSwitcherSidebar.js";
|
|
91
|
+
import { ViewSwitcherSidebarItem as Ze } from "./components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js";
|
|
92
|
+
import { WindowTitle as Qe } from "./components/WindowTitle/WindowTitle.js";
|
|
93
|
+
import { WrapBox as $e } from "./components/WrapBox/WrapBox.js";
|
|
94
|
+
export { e as AboutDialog, t as ActionRow, n as Avatar, r as AvatarRotator, i as Badge, a as Banner, o as Bin, s as Blockquote, c as BottomSheet, l as Box, d as BoxedList, f as BreakpointBin, p as Button, m as ButtonContent, h as ButtonRow, g as Card, _ as Carousel, v as CarouselIndicatorDots, y as CarouselIndicatorLines, b as CheckRow, x as Checkbox, C as Chip, w as Clamp, T as ColorPicker, E as ColorSwatch, O as ColumnView, k as ComboRow, L as ContributionGraph, R as CountDownTimer, z as Dialog, B as Drawer, V as Dropdown, H as EntryRow, U as ExpanderRow, W as Footer, G as Frame, ee as GNOME_BREAKPOINTS, D as GNOME_PALETTE, K as GnomeProvider, q as HeaderBar, S as Icon, Y as IconButton, X as InlineViewSwitcher, Z as InlineViewSwitcherItem, Q as Link, $ as LinkedGroup, re as NavigationPage, ne as NavigationSplitView, ie as NavigationView, oe as OverlaySplitView, se as PasswordEntryRow, ce as PathBar, le as Popover, ue as PreferencesDialog, de as PreferencesGroup, fe as PreferencesPage, pe as ProgressBar, me as RadioButton, ge as SearchBar, u as Separator, _e as ShortcutLabel, ve as ShortcutsDialog, be as Sidebar, xe as SidebarCollapsedContext, we as SidebarItem, Ce as SidebarSection, Te as Skeleton, Ee as Slider, Ge as Spacer, De as SpinButton, Oe as SpinRow, he as Spinner, ke as SplitButton, Ae as StatusBadge, ye as StatusPage, je as Switch, Me as SwitchRow, Ne as TabBar, Pe as TabItem, Fe as TabPanel, Ie as TerminalView, Le as Text, Re as TextField, ze as Timeline, Be as Toast, Ve as Toaster, He as ToggleGroup, Ue as ToggleGroupItem, We as Toolbar, Ke as ToolbarView, J as Tooltip, qe as ViewSwitcher, Ye as ViewSwitcherBar, Je as ViewSwitcherItem, Xe as ViewSwitcherSidebar, Ze as ViewSwitcherSidebarItem, Qe as WindowTitle, $e as WrapBox, A as useAccentColor, te as useBreakpoint, j as useColorScheme, M as useDateTimeFormatter, N as useDir, P as useLocale, ae as useNavigation, F as useNumberFormatter, I as useResolvedColorScheme, Se as useSidebarCollapsed };
|