@lobehub/ui 6.5.0 → 6.6.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 +87 -125
- package/es/Accordion/style.d.mts +2 -2
- package/es/AutoComplete/style.d.mts +1 -1
- package/es/Carousel/Carousel.mjs +7 -8
- package/es/Carousel/Carousel.mjs.map +1 -1
- package/es/Drawer/atoms.mjs +5 -5
- package/es/Drawer/atoms.mjs.map +1 -1
- package/es/EditorSlashMenu/EditorSlashMenu.mjs +7 -9
- package/es/EditorSlashMenu/EditorSlashMenu.mjs.map +1 -1
- package/es/FormKit/List.mjs +24 -24
- package/es/FormKit/List.mjs.map +1 -1
- package/es/Highlighter/Highlighter.mjs +1 -3
- package/es/Highlighter/Highlighter.mjs.map +1 -1
- package/es/Highlighter/LangSelect.mjs +2 -2
- package/es/Highlighter/LangSelect.mjs.map +1 -1
- package/es/Highlighter/SyntaxHighlighter/StaticRenderer.mjs +2 -3
- package/es/Highlighter/SyntaxHighlighter/StaticRenderer.mjs.map +1 -1
- package/es/Highlighter/SyntaxHighlighter/StreamRenderer.mjs +4 -20
- package/es/Highlighter/SyntaxHighlighter/StreamRenderer.mjs.map +1 -1
- package/es/Highlighter/SyntaxHighlighter/index.mjs +2 -3
- package/es/Highlighter/SyntaxHighlighter/index.mjs.map +1 -1
- package/es/Highlighter/SyntaxHighlighter/tokenFade.mjs.map +1 -1
- package/es/Highlighter/const.d.mts +2 -0
- package/es/Highlighter/const.mjs +95 -12
- package/es/Highlighter/const.mjs.map +1 -1
- package/es/Highlighter/engine.mjs +75 -0
- package/es/Highlighter/engine.mjs.map +1 -0
- package/es/Highlighter/languages.mjs +501 -0
- package/es/Highlighter/languages.mjs.map +1 -0
- package/es/Highlighter/theme/lobe-highlights-theme.mjs +73 -0
- package/es/Highlighter/theme/lobe-highlights-theme.mjs.map +1 -0
- package/es/Highlighter/tokens.mjs +50 -0
- package/es/Highlighter/tokens.mjs.map +1 -0
- package/es/Highlighter/type.d.mts +5 -2
- package/es/Image/viewer/ActualSizeIcon.mjs +3 -4
- package/es/Image/viewer/ActualSizeIcon.mjs.map +1 -1
- package/es/ImageSelect/ImageSelect.mjs +22 -22
- package/es/ImageSelect/ImageSelect.mjs.map +1 -1
- package/es/Markdown/SyntaxMarkdown/MarkdownRender.mjs.map +1 -1
- package/es/Markdown/SyntaxMarkdown/StreamdownRender.mjs.map +1 -1
- package/es/Markdown/components/Footnotes.mjs +26 -26
- package/es/Markdown/components/Footnotes.mjs.map +1 -1
- package/es/Markdown/plugins/remarkCjkAutolink.mjs +101 -0
- package/es/Markdown/plugins/remarkCjkAutolink.mjs.map +1 -0
- package/es/Modal/Modal.mjs.map +1 -1
- package/es/Modal/atoms.mjs +5 -5
- package/es/Modal/atoms.mjs.map +1 -1
- package/es/Pagination/Pagination.mjs +5 -5
- package/es/Pagination/Pagination.mjs.map +1 -1
- package/es/Popover/PopoverInGroup.mjs.map +1 -1
- package/es/Rate/Rate.mjs +3 -4
- package/es/Rate/Rate.mjs.map +1 -1
- package/es/SearchBar/SearchBar.mjs +3 -1
- package/es/SearchBar/SearchBar.mjs.map +1 -1
- package/es/Select/parts.mjs +20 -20
- package/es/Select/parts.mjs.map +1 -1
- package/es/Spin/NetworkGlyph.mjs +5 -7
- package/es/Spin/NetworkGlyph.mjs.map +1 -1
- package/es/Table/render/Header.mjs +15 -16
- package/es/Table/render/Header.mjs.map +1 -1
- package/es/color/ColorScales/ScaleRow.mjs +7 -7
- package/es/color/ColorScales/ScaleRow.mjs.map +1 -1
- package/es/color/ColorScales/index.mjs +20 -21
- package/es/color/ColorScales/index.mjs.map +1 -1
- package/es/color/CssVar/ScaleRow.mjs +7 -7
- package/es/color/CssVar/ScaleRow.mjs.map +1 -1
- package/es/color/CssVar/VarRow.mjs +7 -7
- package/es/color/CssVar/VarRow.mjs.map +1 -1
- package/es/color/CssVar/index.mjs +20 -21
- package/es/color/CssVar/index.mjs.map +1 -1
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs +30 -25
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs.map +1 -1
- package/es/eslint/index.d.mts +1 -1
- package/es/hooks/useHighlight.mjs +35 -107
- package/es/hooks/useHighlight.mjs.map +1 -1
- package/es/hooks/useMarkdown/useMarkdownRemarkPlugins.mjs +2 -0
- package/es/hooks/useMarkdown/useMarkdownRemarkPlugins.mjs.map +1 -1
- package/es/hooks/useStreamHighlight.mjs +90 -194
- package/es/hooks/useStreamHighlight.mjs.map +1 -1
- package/es/node_modules/.pnpm/{eslint@10.13.0_jiti@2.6.1_supports-color@10.2.2 → eslint@10.13.0_jiti@2.7.0_supports-color@10.2.2}/node_modules/eslint/lib/types/index.d.mts +1 -1
- package/es/style.css +2 -46
- package/package.json +4 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.mjs","names":["clsx"],"sources":["../../../src/Table/render/Header.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { ArrowDownFromLine, ArrowUpDown, ArrowUpToLine } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport ActionIcon from '@/ActionIcon';\nimport Tooltip from '@/Tooltip';\n\nimport { TableHeader, TableHeaderCell, TableRow } from '../atoms';\nimport type { HeaderCellModel } from '../engine/types';\nimport { renderColumnTitle } from '../pipeline/columnUtils';\nimport type { ColumnSource } from '../pipeline/normalizeColumns';\nimport { getMultiplePriority, getNextSortOrder } from '../pipeline/useSorter';\nimport { styles } from '../style';\nimport type {\n SortOrder,\n TableColumn,\n TableColumnType,\n TableHeaderCellAttributes,\n TableLocale,\n TableSorterTooltipProps,\n} from '../type';\nimport { useHeaderView, useTableView } from './context';\nimport FilterDropdown from './FilterDropdown';\nimport { SelectionHeaderTitle } from './SelectionCells';\n\nconst sx = (...list: (stylex.StyleXStyles | false | null | undefined)[]) =>\n stylex.props(...list).className;\n\nconst sortTipOf = (next: SortOrder | undefined, locale: TableLocale) =>\n next === 'descend'\n ? locale.triggerDesc\n : next === 'ascend'\n ? locale.triggerAsc\n : locale.cancelSort;\n\nconst ariaSortOf = (order: SortOrder | undefined) =>\n order === 'ascend' ? 'ascending' : order === 'descend' ? 'descending' : 'none';\n\ninterface HeaderParts {\n attributes: TableHeaderCellAttributes;\n className?: string;\n content: ReactNode;\n}\n\nconst useDataHeader = <T,>(source: ColumnSource<T>): HeaderParts => {\n const { prefixCls } = useTableView<T>();\n const header = useHeaderView<T>();\n const column = source.column as TableColumnType<T>;\n const { id } = source;\n const {\n filterDropdown,\n filters,\n onHeaderCell,\n showSorterTooltip,\n sortDirections,\n sortIcon,\n sorter,\n } = column;\n const order = sorter ? header.sortStates.find(({ key }) => key === id)?.sortOrder : undefined;\n\n const titleNode = renderColumnTitle(column.title, header.titleProps);\n const titleText =\n typeof titleNode === 'string' || typeof titleNode === 'number' ? String(titleNode) : undefined;\n const titleContent = column.ellipsis ? (\n <span className={clsx(sx(styles.columnTitle), `${prefixCls}-column-title`)}>{titleNode}</span>\n ) : (\n titleNode\n );\n\n const filterNode =\n filters || filterDropdown ? (\n <FilterDropdown<T>\n column={column}\n columnKey={id}\n filterState={header.filterStates.find(({ key }) => key === id)}\n getPopupContainer={header.getPopupContainer}\n label={titleText ?? id}\n locale={header.locale}\n triggerFilter={header.triggerFilter}\n />\n ) : null;\n const hasControls = Boolean(sorter) || Boolean(filterNode);\n\n let sorterNode: ReactNode = null;\n if (sorter) {\n const nextOrder = getNextSortOrder(sortDirections ?? header.sortDirections, order);\n const showTooltip = showSorterTooltip ?? header.showSorterTooltip;\n const { target, ...tooltipOptions } =\n typeof showTooltip === 'object' ? showTooltip : ({} as TableSorterTooltipProps);\n const tooltipProps = { title: sortTipOf(nextOrder, header.locale), ...tooltipOptions };\n const iconOnlyTooltip = Boolean(showTooltip) && target === 'sorter-icon';\n const onSort = () =>\n header.triggerSort({\n column: column as TableColumn<T>,\n key: id,\n multiplePriority: getMultiplePriority(column as TableColumn<T>),\n sortOrder: nextOrder,\n });\n const sortAction = (\n <ActionIcon\n active={Boolean(order)}\n className={clsx(sx(styles.sortCaret), `${prefixCls}-column-sorter`)}\n data-order={order ?? undefined}\n size=\"small\"\n icon={\n sortIcon\n ? sortIcon({ sortOrder: order ?? null })\n : order === 'ascend'\n ? ArrowUpToLine\n : order === 'descend'\n ? ArrowDownFromLine\n : ArrowUpDown\n }\n {...(iconOnlyTooltip && showTooltip\n ? { title: tooltipProps.title, tooltipProps: tooltipOptions }\n : {})}\n onClick={(event) => {\n event.stopPropagation();\n onSort();\n }}\n />\n );\n const group = (\n <span\n className={clsx(sx(styles.sortButton), `${prefixCls}-column-sorters`)}\n title={showTooltip ? undefined : header.locale.sortTitle}\n >\n <span className={sx(styles.sortTitle)} onClick={onSort}>\n {titleContent}\n </span>\n {sortAction}\n </span>\n );\n sorterNode =\n showTooltip && !iconOnlyTooltip ? <Tooltip {...tooltipProps}>{group}</Tooltip> : group;\n }\n\n const cell = onHeaderCell?.(column as TableColumn<T>);\n return {\n attributes: {\n ...(sorter && { 'aria-sort': ariaSortOf(order) }),\n ...(column.ellipsis && hasControls && titleText && { title: titleText }),\n ...cell,\n className: clsx(sorter && `${prefixCls}-column-has-sorters`, cell?.className),\n },\n className: order ? `${prefixCls}-column-sort` : undefined,\n content: hasControls ? (\n <span className={sx(styles.headerInner)}>\n {sorterNode ?? titleContent}\n {filterNode}\n </span>\n ) : (\n titleContent\n ),\n };\n};\n\nconst DataHeaderContent = <T,>({\n children,\n source,\n}: {\n children: (parts: HeaderParts) => ReactNode;\n source: ColumnSource<T>;\n}) => <>{children(useDataHeader(source))}</>;\n\nexport const HeaderTitle = <T,>({ source }: { source: ColumnSource<T> }) => {\n if (source.kind === 'selection') return <SelectionHeaderTitle />;\n if (source.kind === 'expand' || source.kind === 'placeholder') {\n return <>{(source.column as TableColumnType<T>).title as ReactNode}</>;\n }\n return <DataHeaderContent source={source}>{(parts) => parts.content}</DataHeaderContent>;\n};\n\nconst HeaderCell = <T,>({\n cell,\n fixEndDelta,\n}: {\n cell: HeaderCellModel<ColumnSource<T>>;\n fixEndDelta: number;\n}) => {\n const { components, semanticClassNames, semanticStyles } = useTableView<T>();\n const { source } = cell.column;\n const column = source.column as TableColumnType<T>;\n\n const render = (parts: HeaderParts) => {\n const { className: attrClassName, style: attrStyle, ...attributes } = parts.attributes;\n return (\n <TableHeaderCell\n {...(attributes as object)}\n align={column.align}\n colSpan={cell.colSpan}\n component={components.headerCell}\n ellipsis={column.ellipsis}\n fixStart={cell.fixedInfo.fixStart}\n rowSpan={cell.rowSpan}\n scope={column.title ? (cell.colSpan > 1 ? 'colgroup' : 'col') : undefined}\n shadowEnd={cell.fixedInfo.shadowEnd}\n shadowStart={cell.fixedInfo.shadowStart}\n style={{ ...semanticStyles.header.cell, ...attrStyle }}\n zIndex={cell.fixedInfo.zIndex}\n zIndexReverse={cell.fixedInfo.zIndexReverse}\n className={clsx(\n column.className,\n semanticClassNames.header.cell,\n parts.className,\n attrClassName,\n )}\n fixEnd={\n cell.fixedInfo.fixEnd === undefined ? undefined : cell.fixedInfo.fixEnd + fixEndDelta\n }\n >\n {parts.content}\n </TableHeaderCell>\n );\n };\n\n if (source.kind === 'data') {\n return <DataHeaderContent source={source}>{render}</DataHeaderContent>;\n }\n return render({\n attributes: { ...column.onHeaderCell?.(column as TableColumn<T>) },\n content: <HeaderTitle source={source} />,\n });\n};\n\nexport const HeaderRows = <T,>({\n rows,\n scrollbar = 0,\n}: {\n rows: readonly HeaderCellModel<ColumnSource<T>>[][];\n scrollbar?: number;\n}) => {\n const { components, leafColumns, prefixCls, semanticClassNames, semanticStyles } =\n useTableView<T>();\n const lastFixed = leafColumns.at(-1)?.fixed;\n const { onHeaderRow } = useHeaderView<T>();\n return (\n <TableHeader\n className={semanticClassNames.header.wrapper}\n component={components.headerWrapper}\n style={semanticStyles.header.wrapper}\n >\n {rows.map((cells, rowIndex) => {\n const rowProps = onHeaderRow?.(\n cells.map((cell) => cell.column.source.column as TableColumn<T>),\n rowIndex,\n );\n return (\n <TableRow\n {...rowProps}\n className={clsx(rowProps?.className, semanticClassNames.header.row)}\n component={components.headerRow}\n key={rowIndex}\n style={{ ...rowProps?.style, ...semanticStyles.header.row }}\n >\n {cells.map((cell) => (\n <HeaderCell cell={cell} fixEndDelta={scrollbar} key={cell.key} />\n ))}\n {scrollbar > 0 && rowIndex === 0 && (\n <TableHeaderCell\n className={`${prefixCls}-cell-scrollbar`}\n component={components.headerCell}\n fixEnd={lastFixed === 'end' ? 0 : undefined}\n rowSpan={rows.length}\n />\n )}\n </TableRow>\n );\n })}\n </TableHeader>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,MAAM,MAAM,GAAG,SAA6D,OAAO,MAAM,GAAG,IAAI,CAAC,CAAC;AAClG,MAAM,aAAa,MAA6B,WAAwB,SAAS,YAAY,OAAO,cAAc,SAAS,WAAW,OAAO,aAAa,OAAO;AACjK,MAAM,cAAc,UAAiC,UAAU,WAAW,cAAc,UAAU,YAAY,eAAe;AAM7H,MAAM,iBAAqB,WAAyC;CAClE,MAAM,EACJ,cACE,aAAgB;CACpB,MAAM,SAAS,cAAiB;CAChC,MAAM,SAAS,OAAO;CACtB,MAAM,EACJ,OACE;CACJ,MAAM,EACJ,gBACA,SACA,cACA,mBACA,gBACA,UACA,WACE;CACJ,MAAM,QAAQ,SAAS,OAAO,WAAW,MAAM,EAC7C,UACI,QAAQ,EAAE,CAAC,EAAE,YAAY,KAAA;CAC/B,MAAM,YAAY,kBAAkB,OAAO,OAAO,OAAO,UAAU;CACnE,MAAM,YAAY,OAAO,cAAc,YAAY,OAAO,cAAc,WAAW,OAAO,SAAS,IAAI,KAAA;CACvG,MAAM,eAAe,OAAO,WAAW,oBAAC,QAAD;EAAM,WAAWA,OAAK,GAAG,OAAO,WAAW,GAAG,GAAG,UAAU,cAAc;EAAI,UAAA;CAAgB,CAAA,IAAI;CACxI,MAAM,aAAa,WAAW,iBAAiB,oBAAC,gBAAD;EAA2B;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,KAAI,SAAQ,oBAAC,YAAD;IAAkB;IAAM,aAAa;GAA2B,GAAX,KAAK,GAAM,CAAC,GACnF,YAAY,KAAK,aAAa,KAAK,oBAAC,iBAAD;IAAiB,WAAW,GAAG,UAAU;IAAkB,WAAW,WAAW;IAAY,QAAQ,cAAc,QAAQ,IAAI,KAAA;IAAW,SAAS,KAAK;GAAS,CAAA,CAC7L;EAChB,CAAC;CACY,CAAA;AACjB"}
|
|
1
|
+
{"version":3,"file":"Header.mjs","names":["clsx"],"sources":["../../../src/Table/render/Header.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { ArrowDownFromLine, ArrowUpDown, ArrowUpToLine } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport ActionIcon from '@/ActionIcon';\nimport Tooltip from '@/Tooltip';\n\nimport { TableHeader, TableHeaderCell, TableRow } from '../atoms';\nimport type { HeaderCellModel } from '../engine/types';\nimport { renderColumnTitle } from '../pipeline/columnUtils';\nimport type { ColumnSource } from '../pipeline/normalizeColumns';\nimport { getMultiplePriority, getNextSortOrder } from '../pipeline/useSorter';\nimport { styles } from '../style';\nimport type {\n SortOrder,\n TableColumn,\n TableColumnType,\n TableHeaderCellAttributes,\n TableLocale,\n TableSorterTooltipProps,\n} from '../type';\nimport { useHeaderView, useTableView } from './context';\nimport FilterDropdown from './FilterDropdown';\nimport { SelectionHeaderTitle } from './SelectionCells';\n\nconst sx = (...list: (stylex.StyleXStyles | false | null | undefined)[]) =>\n stylex.props(...list).className;\n\nconst sortTipOf = (next: SortOrder | undefined, locale: TableLocale) =>\n next === 'descend'\n ? locale.triggerDesc\n : next === 'ascend'\n ? locale.triggerAsc\n : locale.cancelSort;\n\nconst ariaSortOf = (order: SortOrder | undefined) =>\n order === 'ascend' ? 'ascending' : order === 'descend' ? 'descending' : 'none';\n\ninterface HeaderParts {\n attributes: TableHeaderCellAttributes;\n className?: string;\n content: ReactNode;\n}\n\nconst useDataHeader = <T,>(source: ColumnSource<T>): HeaderParts => {\n const { prefixCls } = useTableView<T>();\n const header = useHeaderView<T>();\n const column = source.column as TableColumnType<T>;\n const { id } = source;\n const {\n filterDropdown,\n filters,\n onHeaderCell,\n showSorterTooltip,\n sortDirections,\n sortIcon,\n sorter,\n } = column;\n const order = sorter ? header.sortStates.find(({ key }) => key === id)?.sortOrder : undefined;\n\n const titleNode = renderColumnTitle(column.title, header.titleProps);\n const titleText =\n typeof titleNode === 'string' || typeof titleNode === 'number' ? String(titleNode) : undefined;\n const titleContent = column.ellipsis ? (\n <span className={clsx(sx(styles.columnTitle), `${prefixCls}-column-title`)}>{titleNode}</span>\n ) : (\n titleNode\n );\n\n const filterNode =\n filters || filterDropdown ? (\n <FilterDropdown<T>\n column={column}\n columnKey={id}\n filterState={header.filterStates.find(({ key }) => key === id)}\n getPopupContainer={header.getPopupContainer}\n label={titleText ?? id}\n locale={header.locale}\n triggerFilter={header.triggerFilter}\n />\n ) : null;\n const hasControls = Boolean(sorter) || Boolean(filterNode);\n\n let sorterNode: ReactNode = null;\n if (sorter) {\n const nextOrder = getNextSortOrder(sortDirections ?? header.sortDirections, order);\n const showTooltip = showSorterTooltip ?? header.showSorterTooltip;\n const { target, ...tooltipOptions } =\n typeof showTooltip === 'object' ? showTooltip : ({} as TableSorterTooltipProps);\n const tooltipProps = { title: sortTipOf(nextOrder, header.locale), ...tooltipOptions };\n const iconOnlyTooltip = Boolean(showTooltip) && target === 'sorter-icon';\n const onSort = () =>\n header.triggerSort({\n column: column as TableColumn<T>,\n key: id,\n multiplePriority: getMultiplePriority(column as TableColumn<T>),\n sortOrder: nextOrder,\n });\n const sortAction = (\n <ActionIcon\n active={Boolean(order)}\n className={clsx(sx(styles.sortCaret), `${prefixCls}-column-sorter`)}\n data-order={order ?? undefined}\n size=\"small\"\n icon={\n sortIcon\n ? sortIcon({ sortOrder: order ?? null })\n : order === 'ascend'\n ? ArrowUpToLine\n : order === 'descend'\n ? ArrowDownFromLine\n : ArrowUpDown\n }\n {...(iconOnlyTooltip && showTooltip\n ? { title: tooltipProps.title, tooltipProps: tooltipOptions }\n : {})}\n onClick={(event) => {\n event.stopPropagation();\n onSort();\n }}\n />\n );\n const group = (\n <span\n className={clsx(sx(styles.sortButton), `${prefixCls}-column-sorters`)}\n title={showTooltip ? undefined : header.locale.sortTitle}\n >\n <span className={sx(styles.sortTitle)} onClick={onSort}>\n {titleContent}\n </span>\n {sortAction}\n </span>\n );\n sorterNode =\n showTooltip && !iconOnlyTooltip ? <Tooltip {...tooltipProps}>{group}</Tooltip> : group;\n }\n\n const cell = onHeaderCell?.(column as TableColumn<T>);\n return {\n attributes: {\n ...(sorter && { 'aria-sort': ariaSortOf(order) }),\n ...(column.ellipsis && hasControls && titleText && { title: titleText }),\n ...cell,\n className: clsx(sorter && `${prefixCls}-column-has-sorters`, cell?.className),\n },\n className: order ? `${prefixCls}-column-sort` : undefined,\n content: hasControls ? (\n <span className={sx(styles.headerInner)}>\n {sorterNode ?? titleContent}\n {filterNode}\n </span>\n ) : (\n titleContent\n ),\n };\n};\n\nconst DataHeaderContent = <T,>({\n children,\n source,\n}: {\n children: (parts: HeaderParts) => ReactNode;\n source: ColumnSource<T>;\n}) => <>{children(useDataHeader(source))}</>;\n\nexport const HeaderTitle = <T,>({ source }: { source: ColumnSource<T> }) => {\n if (source.kind === 'selection') return <SelectionHeaderTitle />;\n if (source.kind === 'expand' || source.kind === 'placeholder') {\n return <>{(source.column as TableColumnType<T>).title as ReactNode}</>;\n }\n return <DataHeaderContent source={source}>{(parts) => parts.content}</DataHeaderContent>;\n};\n\nconst HeaderCell = <T,>({\n cell,\n fixEndDelta,\n}: {\n cell: HeaderCellModel<ColumnSource<T>>;\n fixEndDelta: number;\n}) => {\n const { components, semanticClassNames, semanticStyles } = useTableView<T>();\n const { source } = cell.column;\n const column = source.column as TableColumnType<T>;\n\n const render = (parts: HeaderParts) => {\n const { className: attrClassName, style: attrStyle, ...attributes } = parts.attributes;\n return (\n <TableHeaderCell\n {...(attributes as object)}\n align={column.align}\n colSpan={cell.colSpan}\n component={components.headerCell}\n ellipsis={column.ellipsis}\n fixStart={cell.fixedInfo.fixStart}\n rowSpan={cell.rowSpan}\n scope={column.title ? (cell.colSpan > 1 ? 'colgroup' : 'col') : undefined}\n shadowEnd={cell.fixedInfo.shadowEnd}\n shadowStart={cell.fixedInfo.shadowStart}\n style={{ ...semanticStyles.header.cell, ...attrStyle }}\n zIndex={cell.fixedInfo.zIndex}\n zIndexReverse={cell.fixedInfo.zIndexReverse}\n className={clsx(\n column.className,\n semanticClassNames.header.cell,\n parts.className,\n attrClassName,\n )}\n fixEnd={\n cell.fixedInfo.fixEnd === undefined ? undefined : cell.fixedInfo.fixEnd + fixEndDelta\n }\n >\n {parts.content}\n </TableHeaderCell>\n );\n };\n\n if (source.kind === 'data') {\n return <DataHeaderContent source={source}>{render}</DataHeaderContent>;\n }\n return render({\n attributes: { ...column.onHeaderCell?.(column as TableColumn<T>) },\n content: <HeaderTitle source={source} />,\n });\n};\n\nexport const HeaderRows = <T,>({\n rows,\n scrollbar = 0,\n}: {\n rows: readonly HeaderCellModel<ColumnSource<T>>[][];\n scrollbar?: number;\n}) => {\n const { components, leafColumns, prefixCls, semanticClassNames, semanticStyles } =\n useTableView<T>();\n const lastFixed = leafColumns.at(-1)?.fixed;\n const { onHeaderRow } = useHeaderView<T>();\n return (\n <TableHeader\n className={semanticClassNames.header.wrapper}\n component={components.headerWrapper}\n style={semanticStyles.header.wrapper}\n >\n {rows.map((cells, rowIndex) => {\n const rowProps = onHeaderRow?.(\n cells.map((cell) => cell.column.source.column as TableColumn<T>),\n rowIndex,\n );\n return (\n <TableRow\n key={rowIndex}\n {...rowProps}\n className={clsx(rowProps?.className, semanticClassNames.header.row)}\n component={components.headerRow}\n style={{ ...rowProps?.style, ...semanticStyles.header.row }}\n >\n {cells.map((cell) => (\n <HeaderCell cell={cell} fixEndDelta={scrollbar} key={cell.key} />\n ))}\n {scrollbar > 0 && rowIndex === 0 && (\n <TableHeaderCell\n className={`${prefixCls}-cell-scrollbar`}\n component={components.headerCell}\n fixEnd={lastFixed === 'end' ? 0 : undefined}\n rowSpan={rows.length}\n />\n )}\n </TableRow>\n );\n })}\n </TableHeader>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,MAAM,MAAM,GAAG,SAA6D,OAAO,MAAM,GAAG,IAAI,CAAC,CAAC;AAClG,MAAM,aAAa,MAA6B,WAAwB,SAAS,YAAY,OAAO,cAAc,SAAS,WAAW,OAAO,aAAa,OAAO;AACjK,MAAM,cAAc,UAAiC,UAAU,WAAW,cAAc,UAAU,YAAY,eAAe;AAM7H,MAAM,iBAAqB,WAAyC;CAClE,MAAM,EACJ,cACE,aAAgB;CACpB,MAAM,SAAS,cAAiB;CAChC,MAAM,SAAS,OAAO;CACtB,MAAM,EACJ,OACE;CACJ,MAAM,EACJ,gBACA,SACA,cACA,mBACA,gBACA,UACA,WACE;CACJ,MAAM,QAAQ,SAAS,OAAO,WAAW,MAAM,EAC7C,UACI,QAAQ,EAAE,CAAC,EAAE,YAAY,KAAA;CAC/B,MAAM,YAAY,kBAAkB,OAAO,OAAO,OAAO,UAAU;CACnE,MAAM,YAAY,OAAO,cAAc,YAAY,OAAO,cAAc,WAAW,OAAO,SAAS,IAAI,KAAA;CACvG,MAAM,eAAe,OAAO,WAAW,oBAAC,QAAD;EAAM,WAAWA,OAAK,GAAG,OAAO,WAAW,GAAG,GAAG,UAAU,cAAc;EAAI,UAAA;CAAgB,CAAA,IAAI;CACxI,MAAM,aAAa,WAAW,iBAAiB,oBAAC,gBAAD;EAA2B;EAAQ,WAAW;EAAI,aAAa,OAAO,aAAa,MAAM,EACtI,UACI,QAAQ,EAAE;EAAG,mBAAmB,OAAO;EAAmB,OAAO,aAAa;EAAI,QAAQ,OAAO;EAAQ,eAAe,OAAO;CAAgB,CAAA,IAAI;CACzJ,MAAM,cAAc,QAAQ,MAAM,KAAK,QAAQ,UAAU;CACzD,IAAI,a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,CAC7L;GANQ,GAAA,QAMR;EAChB,CAAC;CACY,CAAA;AACjB"}
|
|
@@ -5,7 +5,7 @@ import { copyToClipboard } from "../../utils/copyToClipboard.mjs";
|
|
|
5
5
|
import { toast } from "../../Toast/imperative.mjs";
|
|
6
6
|
import { colorScalesClasses } from "./stable.mjs";
|
|
7
7
|
import { styles } from "./style.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { memo } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import * as stylex from "@stylexjs/stylex";
|
|
11
11
|
//#region src/color/ColorScales/ScaleRow.tsx
|
|
@@ -17,13 +17,13 @@ const ScaleRow = memo(({ name, title, scale }) => {
|
|
|
17
17
|
className: colorScalesClasses("row"),
|
|
18
18
|
gap: 2,
|
|
19
19
|
...toDataAttributes({ scale: title }),
|
|
20
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
21
21
|
...styleProps(styles.scaleRowTitle, colorScalesClasses("row-title")),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})
|
|
22
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
23
|
+
...stylex.props(styles.text),
|
|
24
|
+
children: title
|
|
25
|
+
})
|
|
26
|
+
}, title), scale.map((color, index) => {
|
|
27
27
|
if (index === 0 || index === 12) return false;
|
|
28
28
|
return /* @__PURE__ */ jsx("div", {
|
|
29
29
|
...styleProps([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScaleRow.mjs","names":["Flexbox"],"sources":["../../../src/color/ColorScales/ScaleRow.tsx"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport { memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toast } from '@/Toast';\nimport { toDataAttributes } from '@/utils/bem';\nimport { copyToClipboard } from '@/utils/copyToClipboard';\n\nimport { colorScalesClasses } from './stable';\nimport { styles } from './style';\n\nexport interface IScaleRow {\n name: string;\n scale: string[];\n title: 'light' | 'lightA' | 'dark' | 'darkA';\n}\n\nconst ScaleRow = memo<IScaleRow>(({ name, title, scale }) => {\n const isAlpha = title === 'lightA' || title === 'darkA';\n\n return (\n <Flexbox\n horizontal\n align={'center'}\n className={colorScalesClasses('row')}\n gap={2}\n {...toDataAttributes({ scale: title })}\n >\n <div {...styleProps(styles.scaleRowTitle, colorScalesClasses('row-title'))}
|
|
1
|
+
{"version":3,"file":"ScaleRow.mjs","names":["Flexbox"],"sources":["../../../src/color/ColorScales/ScaleRow.tsx"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport { memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toast } from '@/Toast';\nimport { toDataAttributes } from '@/utils/bem';\nimport { copyToClipboard } from '@/utils/copyToClipboard';\n\nimport { colorScalesClasses } from './stable';\nimport { styles } from './style';\n\nexport interface IScaleRow {\n name: string;\n scale: string[];\n title: 'light' | 'lightA' | 'dark' | 'darkA';\n}\n\nconst ScaleRow = memo<IScaleRow>(({ name, title, scale }) => {\n const isAlpha = title === 'lightA' || title === 'darkA';\n\n return (\n <Flexbox\n horizontal\n align={'center'}\n className={colorScalesClasses('row')}\n gap={2}\n {...toDataAttributes({ scale: title })}\n >\n <div key={title} {...styleProps(styles.scaleRowTitle, colorScalesClasses('row-title'))}>\n <div {...stylex.props(styles.text)}>{title}</div>\n </div>\n {scale.map((color, index) => {\n if (index === 0 || index === 12) return false;\n\n return (\n <div\n key={index}\n {...styleProps(\n [\n styles.scaleBox,\n title === 'lightA' && styles.alphaLight,\n title === 'darkA' && styles.alphaDark,\n ],\n colorScalesClasses('cell'),\n )}\n title={color}\n onClick={async () => {\n const content = `token.${name}${index}${isAlpha ? 'A' : ''} /* ${color} */`;\n\n await copyToClipboard(content);\n toast.success(content);\n }}\n >\n <Flexbox\n horizontal\n align={'center'}\n justify={'center'}\n {...styleProps(styles.scaleItem, colorScalesClasses('swatch'))}\n style={{ backgroundColor: color }}\n />\n </div>\n );\n })}\n </Flexbox>\n );\n});\n\nexport default ScaleRow;\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,WAAW,MAAiB,EAChC,MACA,OACA,YACI;CACJ,MAAM,UAAU,UAAU,YAAY,UAAU;CAChD,OAAO,qBAACA,mBAAD;EAAS,YAAA;EAAW,OAAO;EAAU,WAAW,mBAAmB,KAAK;EAAG,KAAK;EAAG,GAAI,iBAAiB,EAC7G,OAAO,MACT,CAAC;EAFM,UAAA,CAGH,oBAAC,OAAD;GAAiB,GAAI,WAAW,OAAO,eAAe,mBAAmB,WAAW,CAAC;GACnF,UAAA,oBAAC,OAAD;IAAK,GAAI,OAAO,MAAM,OAAO,IAAI;IAAI,UAAA;GAAW,CAAA;EAC7C,GAFK,KAEL,GACJ,MAAM,KAAK,OAAO,UAAU;GAC7B,IAAI,UAAU,KAAK,UAAU,IAAI,OAAO;GACxC,OAAO,oBAAC,OAAD;IAAiB,GAAI,WAAW;KAAC,OAAO;KAAU,UAAU,YAAY,OAAO;KAAY,UAAU,WAAW,OAAO;IAAS,GAAG,mBAAmB,MAAM,CAAC;IAAG,OAAO;IAAO,SAAS,YAAY;KACxM,MAAM,UAAU,SAAS,OAAO,QAAQ,UAAU,MAAM,GAAG,MAAM,MAAM;KACvE,MAAM,gBAAgB,OAAO;KAC7B,MAAM,QAAQ,OAAO;IACvB;IACM,UAAA,oBAACA,mBAAD;KAAS,YAAA;KAAW,OAAO;KAAU,SAAS;KAAU,GAAI,WAAW,OAAO,WAAW,mBAAmB,QAAQ,CAAC;KAAG,OAAO,EACjI,iBAAiB,MACnB;IAAI,CAAA;GACG,GARQ,KAQR;EACX,CAAC,CACQ;;AACb,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { colorScalesClasses } from "./stable.mjs";
|
|
|
7
7
|
import { styles } from "./style.mjs";
|
|
8
8
|
import ScaleRow from "./ScaleRow.mjs";
|
|
9
9
|
import clsx$1 from "clsx";
|
|
10
|
-
import {
|
|
10
|
+
import { memo } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import * as stylex from "@stylexjs/stylex";
|
|
13
13
|
//#region src/color/ColorScales/index.tsx
|
|
@@ -29,32 +29,31 @@ const ColorScales = memo(({ className, name, scale, midHighLight, style }) => {
|
|
|
29
29
|
align: "center",
|
|
30
30
|
className: colorScalesClasses("header"),
|
|
31
31
|
gap: 2,
|
|
32
|
-
children: [/* @__PURE__ */
|
|
32
|
+
children: [/* @__PURE__ */ jsx(FlexBasic_default, {
|
|
33
33
|
horizontal: true,
|
|
34
34
|
align: "center",
|
|
35
|
-
...styleProps(styles.scaleRowTitle, colorScalesClasses("row-title"))
|
|
36
|
-
|
|
37
|
-
}), Array.from({ length: scale.light.length }).fill("").map((_, index) => {
|
|
35
|
+
...styleProps(styles.scaleRowTitle, colorScalesClasses("row-title"))
|
|
36
|
+
}, "scale-num"), Array.from({ length: scale.light.length }).fill("").map((_, index) => {
|
|
38
37
|
if (index === 0 || index === 12) return false;
|
|
39
38
|
const isMidHighlight = midHighLight === index;
|
|
40
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ jsx("div", {
|
|
41
40
|
...styleProps(styles.scaleBox, colorScalesClasses("cell")),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
42
|
+
...stylex.props(styles.scaleBox),
|
|
43
|
+
children: /* @__PURE__ */ jsx(FlexBasic_default, {
|
|
44
|
+
horizontal: true,
|
|
45
|
+
align: "center",
|
|
46
|
+
justify: "center",
|
|
47
|
+
...styleProps([
|
|
48
|
+
styles.scaleItem,
|
|
49
|
+
styles.index,
|
|
50
|
+
isMidHighlight && styles.indexHighlight
|
|
51
|
+
], colorScalesClasses("index")),
|
|
52
|
+
...toDataAttributes({ highlight: isMidHighlight }),
|
|
53
|
+
children: index
|
|
54
|
+
})
|
|
56
55
|
})
|
|
57
|
-
})
|
|
56
|
+
}, `num${index}`);
|
|
58
57
|
})]
|
|
59
58
|
}, "scale-title"),
|
|
60
59
|
/* @__PURE__ */ jsx(ScaleRow, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Flexbox","clsx"],"sources":["../../../src/color/ColorScales/index.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { type CSSProperties, memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { ToastHost } from '@/Toast';\nimport { toDataAttributes } from '@/utils/bem';\n\nimport type { ColorScaleItem } from '../types';\nimport ScaleRow from './ScaleRow';\nimport { colorScalesClasses } from './stable';\nimport { styles } from './style';\n\nexport interface ColorScalesProps {\n className?: string;\n /**\n * @description Index of the mid highlight color in the scale\n */\n midHighLight: number;\n /**\n * @description Name of the color scale\n */\n name: string;\n /**\n * @description Color scale item object\n */\n scale: ColorScaleItem;\n style?: CSSProperties;\n}\n\nconst ColorScales = memo<ColorScalesProps>(({ className, name, scale, midHighLight, style }) => {\n return (\n <Flexbox\n horizontal\n align={'center'}\n className={clsx(colorScalesClasses(), className)}\n flex={1}\n justify={'center'}\n style={style}\n >\n <div {...styleProps(styles.content, colorScalesClasses('content'))}>\n <Flexbox gap={2}>\n <Flexbox\n horizontal\n align={'center'}\n className={colorScalesClasses('header')}\n gap={2}\n key=\"scale-title\"\n >\n <Flexbox\n horizontal\n align={'center'}\n {...styleProps(styles.scaleRowTitle, colorScalesClasses('row-title'))}\n
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Flexbox","clsx"],"sources":["../../../src/color/ColorScales/index.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { type CSSProperties, memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { ToastHost } from '@/Toast';\nimport { toDataAttributes } from '@/utils/bem';\n\nimport type { ColorScaleItem } from '../types';\nimport ScaleRow from './ScaleRow';\nimport { colorScalesClasses } from './stable';\nimport { styles } from './style';\n\nexport interface ColorScalesProps {\n className?: string;\n /**\n * @description Index of the mid highlight color in the scale\n */\n midHighLight: number;\n /**\n * @description Name of the color scale\n */\n name: string;\n /**\n * @description Color scale item object\n */\n scale: ColorScaleItem;\n style?: CSSProperties;\n}\n\nconst ColorScales = memo<ColorScalesProps>(({ className, name, scale, midHighLight, style }) => {\n return (\n <Flexbox\n horizontal\n align={'center'}\n className={clsx(colorScalesClasses(), className)}\n flex={1}\n justify={'center'}\n style={style}\n >\n <div {...styleProps(styles.content, colorScalesClasses('content'))}>\n <Flexbox gap={2}>\n <Flexbox\n horizontal\n align={'center'}\n className={colorScalesClasses('header')}\n gap={2}\n key=\"scale-title\"\n >\n <Flexbox\n horizontal\n align={'center'}\n key=\"scale-num\"\n {...styleProps(styles.scaleRowTitle, colorScalesClasses('row-title'))}\n />\n {Array.from({ length: scale.light.length })\n .fill('')\n .map((_, index) => {\n if (index === 0 || index === 12) return false;\n\n const isMidHighlight = midHighLight === index;\n\n return (\n <div\n key={`num${index}`}\n {...styleProps(styles.scaleBox, colorScalesClasses('cell'))}\n >\n <div {...stylex.props(styles.scaleBox)}>\n <Flexbox\n horizontal\n align={'center'}\n justify={'center'}\n {...styleProps(\n [styles.scaleItem, styles.index, isMidHighlight && styles.indexHighlight],\n colorScalesClasses('index'),\n )}\n {...toDataAttributes({ highlight: isMidHighlight })}\n >\n {index}\n </Flexbox>\n </div>\n </div>\n );\n })}\n </Flexbox>\n <ScaleRow key=\"light\" name={name} scale={scale.light} title=\"light\" />\n <ScaleRow key=\"lightA\" name={name} scale={scale.lightA} title=\"lightA\" />\n <ScaleRow key=\"dark\" name={name} scale={scale.dark} title=\"dark\" />\n <ScaleRow key=\"darkA\" name={name} scale={scale.darkA} title=\"darkA\" />\n </Flexbox>\n </div>\n <ToastHost />\n </Flexbox>\n );\n});\n\nexport default ColorScales;\n"],"mappings":";;;;;;;;;;;;;AA6BA,MAAM,cAAc,MAAwB,EAC1C,WACA,MACA,OACA,cACA,YACI;CACJ,OAAO,qBAACA,mBAAD;EAAS,YAAA;EAAW,OAAO;EAAU,WAAWC,OAAK,mBAAmB,GAAG,SAAS;EAAG,MAAM;EAAG,SAAS;EAAiB;EAA1H,UAAA,CACH,oBAAC,OAAD;GAAK,GAAI,WAAW,OAAO,SAAS,mBAAmB,SAAS,CAAC;GAC/D,UAAA,qBAACD,mBAAD;IAAS,KAAK;IAAd,UAAA;KACE,qBAACA,mBAAD;MAAS,YAAA;MAAW,OAAO;MAAU,WAAW,mBAAmB,QAAQ;MAAG,KAAK;MAAnF,UAAA,CACE,oBAACA,mBAAD;OAAS,YAAA;OAAW,OAAO;OAA0B,GAAI,WAAW,OAAO,eAAe,mBAAmB,WAAW,CAAC;MAAI,GAApF,WAAoF,GAC5H,MAAM,KAAK,EACZ,QAAQ,MAAM,MAAM,OACtB,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,GAAG,UAAU;OAC5B,IAAI,UAAU,KAAK,UAAU,IAAI,OAAO;OACxC,MAAM,iBAAiB,iBAAiB;OACxC,OAAO,oBAAC,OAAD;QAAyB,GAAI,WAAW,OAAO,UAAU,mBAAmB,MAAM,CAAC;QAClF,UAAA,oBAAC,OAAD;SAAK,GAAI,OAAO,MAAM,OAAO,QAAQ;SACnC,UAAA,oBAACA,mBAAD;UAAS,YAAA;UAAW,OAAO;UAAU,SAAS;UAAU,GAAI,WAAW;WAAC,OAAO;WAAW,OAAO;WAAO,kBAAkB,OAAO;UAAc,GAAG,mBAAmB,OAAO,CAAC;UAAG,GAAI,iBAAiB,EACzM,WAAW,eACb,CAAC;UACQ,UAAA;SACM,CAAA;QACN,CAAA;OACF,GARM,MAAM,OAQZ;MACb,CAAC,CACQ;KAjBiF,GAAA,aAiBjF;KACT,oBAAC,UAAD;MAA4B;MAAM,OAAO,MAAM;MAAO,OAAM;KAAS,GAAvD,OAAuD;KACrE,oBAAC,UAAD;MAA6B;MAAM,OAAO,MAAM;MAAQ,OAAM;KAAU,GAA1D,QAA0D;KACxE,oBAAC,UAAD;MAA2B;MAAM,OAAO,MAAM;MAAM,OAAM;KAAQ,GAApD,MAAoD;KAClE,oBAAC,UAAD;MAA4B;MAAM,OAAO,MAAM;MAAO,OAAM;KAAS,GAAvD,OAAuD;IAC9D;;EACN,CAAA,GACL,oBAAC,WAAD,CAAY,CAAA,CACL;;AACb,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { copyToClipboard } from "../../utils/copyToClipboard.mjs";
|
|
|
5
5
|
import { toast } from "../../Toast/imperative.mjs";
|
|
6
6
|
import { cssVarClasses } from "./stable.mjs";
|
|
7
7
|
import { styles } from "./style.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { memo } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import * as stylex from "@stylexjs/stylex";
|
|
11
11
|
//#region src/color/CssVar/ScaleRow.tsx
|
|
@@ -16,13 +16,13 @@ const ScaleRow = memo(({ name, title, scale }) => {
|
|
|
16
16
|
className: cssVarClasses("row"),
|
|
17
17
|
gap: 2,
|
|
18
18
|
...toDataAttributes({ scale: title }),
|
|
19
|
-
children: [/* @__PURE__ */
|
|
19
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
20
20
|
...styleProps(styles.scaleRowTitle, cssVarClasses("row-title")),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
21
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
22
|
+
...stylex.props(styles.text),
|
|
23
|
+
children: title
|
|
24
|
+
})
|
|
25
|
+
}, title), scale.map((color, index) => {
|
|
26
26
|
if (index === 0 || index === 12) return false;
|
|
27
27
|
return /* @__PURE__ */ jsx("div", {
|
|
28
28
|
...styleProps(styles.scaleBox, cssVarClasses("cell")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScaleRow.mjs","names":["Flexbox"],"sources":["../../../src/color/CssVar/ScaleRow.tsx"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport { memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toast } from '@/Toast';\nimport { toDataAttributes } from '@/utils/bem';\nimport { copyToClipboard } from '@/utils/copyToClipboard';\n\nimport { cssVarClasses } from './stable';\nimport { styles } from './style';\n\nexport interface IScaleRow {\n name: string;\n scale: string[];\n title: 'light' | 'dark';\n}\n\nconst ScaleRow = memo<IScaleRow>(({ name, title, scale }) => {\n const isAlpha = false;\n\n return (\n <Flexbox\n horizontal\n align={'center'}\n className={cssVarClasses('row')}\n gap={2}\n {...toDataAttributes({ scale: title })}\n >\n <div {...styleProps(styles.scaleRowTitle, cssVarClasses('row-title'))}
|
|
1
|
+
{"version":3,"file":"ScaleRow.mjs","names":["Flexbox"],"sources":["../../../src/color/CssVar/ScaleRow.tsx"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport { memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toast } from '@/Toast';\nimport { toDataAttributes } from '@/utils/bem';\nimport { copyToClipboard } from '@/utils/copyToClipboard';\n\nimport { cssVarClasses } from './stable';\nimport { styles } from './style';\n\nexport interface IScaleRow {\n name: string;\n scale: string[];\n title: 'light' | 'dark';\n}\n\nconst ScaleRow = memo<IScaleRow>(({ name, title, scale }) => {\n const isAlpha = false;\n\n return (\n <Flexbox\n horizontal\n align={'center'}\n className={cssVarClasses('row')}\n gap={2}\n {...toDataAttributes({ scale: title })}\n >\n <div key={title} {...styleProps(styles.scaleRowTitle, cssVarClasses('row-title'))}>\n <div {...stylex.props(styles.text)}>{title}</div>\n </div>\n {scale.map((color, index) => {\n if (index === 0 || index === 12) return false;\n\n return (\n <div\n key={index}\n {...styleProps(styles.scaleBox, cssVarClasses('cell'))}\n title={color}\n onClick={async () => {\n const content = `token.${name}${index}${isAlpha ? 'A' : ''} /* ${color} */`;\n\n await copyToClipboard(content);\n toast.success(content);\n }}\n >\n <Flexbox\n horizontal\n align={'center'}\n justify={'center'}\n {...styleProps(styles.scaleItem, cssVarClasses('swatch'))}\n style={{ backgroundColor: color }}\n />\n </div>\n );\n })}\n </Flexbox>\n );\n});\n\nexport default ScaleRow;\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,WAAW,MAAiB,EAChC,MACA,OACA,YACI;CAEJ,OAAO,qBAACA,mBAAD;EAAS,YAAA;EAAW,OAAO;EAAU,WAAW,cAAc,KAAK;EAAG,KAAK;EAAG,GAAI,iBAAiB,EACxG,OAAO,MACT,CAAC;EAFM,UAAA,CAGH,oBAAC,OAAD;GAAiB,GAAI,WAAW,OAAO,eAAe,cAAc,WAAW,CAAC;GAC9E,UAAA,oBAAC,OAAD;IAAK,GAAI,OAAO,MAAM,OAAO,IAAI;IAAI,UAAA;GAAW,CAAA;EAC7C,GAFK,KAEL,GACJ,MAAM,KAAK,OAAO,UAAU;GAC7B,IAAI,UAAU,KAAK,UAAU,IAAI,OAAO;GACxC,OAAO,oBAAC,OAAD;IAAiB,GAAI,WAAW,OAAO,UAAU,cAAc,MAAM,CAAC;IAAG,OAAO;IAAO,SAAS,YAAY;KACjH,MAAM,UAAU,SAAS,OAAO,MAAA,MAAiC,MAAM;KACvE,MAAM,gBAAgB,OAAO;KAC7B,MAAM,QAAQ,OAAO;IACvB;IACM,UAAA,oBAACA,mBAAD;KAAS,YAAA;KAAW,OAAO;KAAU,SAAS;KAAU,GAAI,WAAW,OAAO,WAAW,cAAc,QAAQ,CAAC;KAAG,OAAO,EAC5H,iBAAiB,MACnB;IAAI,CAAA;GACG,GARQ,KAQR;EACX,CAAC,CACQ;;AACb,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { copyToClipboard } from "../../utils/copyToClipboard.mjs";
|
|
|
6
6
|
import { toast } from "../../Toast/imperative.mjs";
|
|
7
7
|
import { cssVarClasses } from "./stable.mjs";
|
|
8
8
|
import { styles } from "./style.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { memo } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import * as stylex from "@stylexjs/stylex";
|
|
12
12
|
//#region src/color/CssVar/VarRow.tsx
|
|
@@ -17,13 +17,13 @@ const ScaleRow = memo(({ name }) => {
|
|
|
17
17
|
className: cssVarClasses("row"),
|
|
18
18
|
gap: 2,
|
|
19
19
|
...toDataAttributes({ scale: "css-var" }),
|
|
20
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
21
21
|
...styleProps(styles.scaleRowTitle, cssVarClasses("row-title")),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})
|
|
22
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
23
|
+
...stylex.props(styles.text),
|
|
24
|
+
children: "cssVar"
|
|
25
|
+
})
|
|
26
|
+
}, name), [
|
|
27
27
|
1,
|
|
28
28
|
2,
|
|
29
29
|
3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VarRow.mjs","names":["Flexbox"],"sources":["../../../src/color/CssVar/VarRow.tsx"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport { memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toast } from '@/Toast';\nimport { toDataAttributes } from '@/utils/bem';\nimport { copyToClipboard } from '@/utils/copyToClipboard';\n\nimport { cssVarClasses } from './stable';\nimport { styles } from './style';\n\nexport interface IScaleRow {\n name: string;\n}\n\nconst ScaleRow = memo<IScaleRow>(({ name }) => {\n return (\n <Flexbox\n horizontal\n align={'center'}\n className={cssVarClasses('row')}\n gap={2}\n {...toDataAttributes({ scale: 'css-var' })}\n >\n <div {...styleProps(styles.scaleRowTitle, cssVarClasses('row-title'))}
|
|
1
|
+
{"version":3,"file":"VarRow.mjs","names":["Flexbox"],"sources":["../../../src/color/CssVar/VarRow.tsx"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport { memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toast } from '@/Toast';\nimport { toDataAttributes } from '@/utils/bem';\nimport { copyToClipboard } from '@/utils/copyToClipboard';\n\nimport { cssVarClasses } from './stable';\nimport { styles } from './style';\n\nexport interface IScaleRow {\n name: string;\n}\n\nconst ScaleRow = memo<IScaleRow>(({ name }) => {\n return (\n <Flexbox\n horizontal\n align={'center'}\n className={cssVarClasses('row')}\n gap={2}\n {...toDataAttributes({ scale: 'css-var' })}\n >\n <div key={name} {...styleProps(styles.scaleRowTitle, cssVarClasses('row-title'))}>\n <div {...stylex.props(styles.text)}>cssVar</div>\n </div>\n {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((color) => {\n return (\n <div\n key={color}\n {...styleProps(styles.scaleBox, cssVarClasses('cell'))}\n title={(cssVar as any)[`${name}${color}`] as any}\n onClick={async () => {\n const content = (cssVar as any)[`${name}${color}`] as any;\n\n await copyToClipboard(content);\n toast.success(content);\n }}\n >\n <Flexbox\n horizontal\n align={'center'}\n justify={'center'}\n {...styleProps(styles.scaleItem, cssVarClasses('swatch'))}\n style={{ backgroundColor: (cssVar as any)[`${name}${color}`] as any }}\n />\n </div>\n );\n })}\n </Flexbox>\n );\n});\n\nexport default ScaleRow;\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,WAAW,MAAiB,EAChC,WACI;CACJ,OAAO,qBAACA,mBAAD;EAAS,YAAA;EAAW,OAAO;EAAU,WAAW,cAAc,KAAK;EAAG,KAAK;EAAG,GAAI,iBAAiB,EACxG,OAAO,UACT,CAAC;EAFM,UAAA,CAGH,oBAAC,OAAD;GAAgB,GAAI,WAAW,OAAO,eAAe,cAAc,WAAW,CAAC;GAC7E,UAAA,oBAAC,OAAD;IAAK,GAAI,OAAO,MAAM,OAAO,IAAI;IAAG,UAAA;GAAW,CAAA;EAC5C,GAFK,IAEL,GACJ;GAAC;GAAG;GAAG;GAAG;GAAG;GAAG;GAAG;GAAG;GAAG;GAAG;EAAE,CAAC,CAAC,KAAI,UAAS;GAC9C,OAAO,oBAAC,OAAD;IAAiB,GAAI,WAAW,OAAO,UAAU,cAAc,MAAM,CAAC;IAAG,OAAQ,OAAe,GAAG,OAAO;IAAiB,SAAS,YAAY;KACrJ,MAAM,UAAW,OAAe,GAAG,OAAO;KAC1C,MAAM,gBAAgB,OAAO;KAC7B,MAAM,QAAQ,OAAO;IACvB;IACM,UAAA,oBAACA,mBAAD;KAAS,YAAA;KAAW,OAAO;KAAU,SAAS;KAAU,GAAI,WAAW,OAAO,WAAW,cAAc,QAAQ,CAAC;KAAG,OAAO,EAC5H,iBAAkB,OAAe,GAAG,OAAO,SAC7C;IAAI,CAAA;GACG,GARQ,KAQR;EACX,CAAC,CACQ;;AACb,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { styles } from "./style.mjs";
|
|
|
9
9
|
import ScaleRow from "./ScaleRow.mjs";
|
|
10
10
|
import ScaleRow$1 from "./VarRow.mjs";
|
|
11
11
|
import clsx$1 from "clsx";
|
|
12
|
-
import {
|
|
12
|
+
import { memo } from "react";
|
|
13
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import * as stylex from "@stylexjs/stylex";
|
|
15
15
|
//#region src/color/CssVar/index.tsx
|
|
@@ -32,32 +32,31 @@ const ColorScales = memo(({ className, name, scale, midHighLight, style }) => {
|
|
|
32
32
|
align: "center",
|
|
33
33
|
className: cssVarClasses("header"),
|
|
34
34
|
gap: 2,
|
|
35
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ jsx(FlexBasic_default, {
|
|
36
36
|
horizontal: true,
|
|
37
37
|
align: "center",
|
|
38
|
-
...styleProps(styles.scaleRowTitle, cssVarClasses("row-title"))
|
|
39
|
-
|
|
40
|
-
}), Array.from({ length: scale.light.length }).fill("").map((_, index) => {
|
|
38
|
+
...styleProps(styles.scaleRowTitle, cssVarClasses("row-title"))
|
|
39
|
+
}, "scale-num"), Array.from({ length: scale.light.length }).fill("").map((_, index) => {
|
|
41
40
|
if (index === 0 || index === 12) return false;
|
|
42
41
|
const isMidHighlight = midHighLight === index;
|
|
43
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ jsx("div", {
|
|
44
43
|
...styleProps(styles.scaleBox, cssVarClasses("cell")),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
45
|
+
...stylex.props(styles.scaleBox),
|
|
46
|
+
children: /* @__PURE__ */ jsx(FlexBasic_default, {
|
|
47
|
+
horizontal: true,
|
|
48
|
+
align: "center",
|
|
49
|
+
justify: "center",
|
|
50
|
+
...styleProps([
|
|
51
|
+
styles.scaleItem,
|
|
52
|
+
styles.index,
|
|
53
|
+
isMidHighlight && styles.indexHighlight
|
|
54
|
+
], cssVarClasses("index")),
|
|
55
|
+
...toDataAttributes({ highlight: isMidHighlight }),
|
|
56
|
+
children: index
|
|
57
|
+
})
|
|
59
58
|
})
|
|
60
|
-
})
|
|
59
|
+
}, `num${index}`);
|
|
61
60
|
})]
|
|
62
61
|
}, "scale-title"),
|
|
63
62
|
/* @__PURE__ */ jsx(ScaleRow$1, { name }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Flexbox","clsx","VarRow"],"sources":["../../../src/color/CssVar/index.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { type CSSProperties, memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { useThemeMode } from '@/styles/theme/scope';\nimport { ToastHost } from '@/Toast';\nimport { toDataAttributes } from '@/utils/bem';\n\nimport { type ColorScaleItem } from '../types';\nimport ScaleRow from './ScaleRow';\nimport { cssVarClasses } from './stable';\nimport { styles } from './style';\nimport VarRow from './VarRow';\n\nexport interface ColorScalesProps {\n className?: string;\n /**\n * @description Index of the mid highlight color in the scale\n */\n midHighLight: number;\n /**\n * @description Name of the color scale\n */\n name: string;\n /**\n * @description Color scale item object\n */\n scale: ColorScaleItem;\n style?: CSSProperties;\n}\n\nconst ColorScales = memo<ColorScalesProps>(({ className, name, scale, midHighLight, style }) => {\n const { isDarkMode } = useThemeMode();\n return (\n <Flexbox\n horizontal\n align={'center'}\n className={clsx(cssVarClasses(), className)}\n flex={1}\n justify={'center'}\n style={style}\n >\n <div {...styleProps(styles.content, cssVarClasses('content'))}>\n <Flexbox gap={2}>\n <Flexbox\n horizontal\n align={'center'}\n className={cssVarClasses('header')}\n gap={2}\n key=\"scale-title\"\n >\n <Flexbox\n horizontal\n align={'center'}\n {...styleProps(styles.scaleRowTitle, cssVarClasses('row-title'))}\n
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Flexbox","clsx","VarRow"],"sources":["../../../src/color/CssVar/index.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { type CSSProperties, memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { styleProps } from '@/styles/stylex/props';\nimport { useThemeMode } from '@/styles/theme/scope';\nimport { ToastHost } from '@/Toast';\nimport { toDataAttributes } from '@/utils/bem';\n\nimport { type ColorScaleItem } from '../types';\nimport ScaleRow from './ScaleRow';\nimport { cssVarClasses } from './stable';\nimport { styles } from './style';\nimport VarRow from './VarRow';\n\nexport interface ColorScalesProps {\n className?: string;\n /**\n * @description Index of the mid highlight color in the scale\n */\n midHighLight: number;\n /**\n * @description Name of the color scale\n */\n name: string;\n /**\n * @description Color scale item object\n */\n scale: ColorScaleItem;\n style?: CSSProperties;\n}\n\nconst ColorScales = memo<ColorScalesProps>(({ className, name, scale, midHighLight, style }) => {\n const { isDarkMode } = useThemeMode();\n return (\n <Flexbox\n horizontal\n align={'center'}\n className={clsx(cssVarClasses(), className)}\n flex={1}\n justify={'center'}\n style={style}\n >\n <div {...styleProps(styles.content, cssVarClasses('content'))}>\n <Flexbox gap={2}>\n <Flexbox\n horizontal\n align={'center'}\n className={cssVarClasses('header')}\n gap={2}\n key=\"scale-title\"\n >\n <Flexbox\n horizontal\n align={'center'}\n key=\"scale-num\"\n {...styleProps(styles.scaleRowTitle, cssVarClasses('row-title'))}\n />\n {Array.from({ length: scale.light.length })\n .fill('')\n .map((_, index) => {\n if (index === 0 || index === 12) return false;\n\n const isMidHighlight = midHighLight === index;\n\n return (\n <div key={`num${index}`} {...styleProps(styles.scaleBox, cssVarClasses('cell'))}>\n <div {...stylex.props(styles.scaleBox)}>\n <Flexbox\n horizontal\n align={'center'}\n justify={'center'}\n {...styleProps(\n [styles.scaleItem, styles.index, isMidHighlight && styles.indexHighlight],\n cssVarClasses('index'),\n )}\n {...toDataAttributes({ highlight: isMidHighlight })}\n >\n {index}\n </Flexbox>\n </div>\n </div>\n );\n })}\n </Flexbox>\n <VarRow name={name} />\n {isDarkMode ? (\n <>\n <ScaleRow key=\"dark\" name={name} scale={scale.dark} title=\"dark\" />\n <ScaleRow key=\"light\" name={name} scale={scale.light} title=\"light\" />\n </>\n ) : (\n <>\n <ScaleRow key=\"light\" name={name} scale={scale.light} title=\"light\" />\n <ScaleRow key=\"dark\" name={name} scale={scale.dark} title=\"dark\" />\n </>\n )}\n </Flexbox>\n </div>\n <ToastHost />\n </Flexbox>\n );\n});\n\nexport default ColorScales;\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,MAAM,cAAc,MAAwB,EAC1C,WACA,MACA,OACA,cACA,YACI;CACJ,MAAM,EACJ,eACE,aAAa;CACjB,OAAO,qBAACA,mBAAD;EAAS,YAAA;EAAW,OAAO;EAAU,WAAWC,OAAK,cAAc,GAAG,SAAS;EAAG,MAAM;EAAG,SAAS;EAAiB;EAArH,UAAA,CACH,oBAAC,OAAD;GAAK,GAAI,WAAW,OAAO,SAAS,cAAc,SAAS,CAAC;GAC1D,UAAA,qBAACD,mBAAD;IAAS,KAAK;IAAd,UAAA;KACE,qBAACA,mBAAD;MAAS,YAAA;MAAW,OAAO;MAAU,WAAW,cAAc,QAAQ;MAAG,KAAK;MAA9E,UAAA,CACE,oBAACA,mBAAD;OAAS,YAAA;OAAW,OAAO;OAA0B,GAAI,WAAW,OAAO,eAAe,cAAc,WAAW,CAAC;MAAI,GAA/E,WAA+E,GACvH,MAAM,KAAK,EACZ,QAAQ,MAAM,MAAM,OACtB,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,GAAG,UAAU;OAC5B,IAAI,UAAU,KAAK,UAAU,IAAI,OAAO;OACxC,MAAM,iBAAiB,iBAAiB;OACxC,OAAO,oBAAC,OAAD;QAAyB,GAAI,WAAW,OAAO,UAAU,cAAc,MAAM,CAAC;QAC7E,UAAA,oBAAC,OAAD;SAAK,GAAI,OAAO,MAAM,OAAO,QAAQ;SACnC,UAAA,oBAACA,mBAAD;UAAS,YAAA;UAAW,OAAO;UAAU,SAAS;UAAU,GAAI,WAAW;WAAC,OAAO;WAAW,OAAO;WAAO,kBAAkB,OAAO;UAAc,GAAG,cAAc,OAAO,CAAC;UAAG,GAAI,iBAAiB,EACpM,WAAW,eACb,CAAC;UACQ,UAAA;SACM,CAAA;QACN,CAAA;OACF,GARM,MAAM,OAQZ;MACb,CAAC,CACQ;KAjB4E,GAAA,aAiB5E;KACT,oBAACE,YAAD,EAAc,KAAO,CAAA;KACpB,aAAa,qBAAA,YAAA,EAAA,UAAA,CACV,oBAAC,UAAD;MAA2B;MAAM,OAAO,MAAM;MAAM,OAAM;KAAQ,GAApD,MAAoD,GAClE,oBAAC,UAAD;MAA4B;MAAM,OAAO,MAAM;MAAO,OAAM;KAAS,GAAvD,OAAuD,CACrE,EAAA,CAAA,IAAI,qBAAA,YAAA,EAAA,UAAA,CACJ,oBAAC,UAAD;MAA4B;MAAM,OAAO,MAAM;MAAO,OAAM;KAAS,GAAvD,OAAuD,GACrE,oBAAC,UAAD;MAA2B;MAAM,OAAO,MAAM;MAAM,OAAM;KAAQ,GAApD,MAAoD,CAClE,EAAA,CAAA;IACG;;EACN,CAAA,GACL,oBAAC,WAAD,CAAY,CAAA,CACL;;AACb,CAAC"}
|
|
@@ -6,7 +6,6 @@ import { useSurfaceCardStyles } from "../Surface/link.mjs";
|
|
|
6
6
|
import { dashboardLoadingAnnouncerClasses, dashboardPageHeaderSkeletonClasses, dashboardPageLoadingClasses, dashboardStatCardSkeletonClasses, dashboardTableSkeletonClasses } from "./stable.mjs";
|
|
7
7
|
import { styles } from "./style.mjs";
|
|
8
8
|
import clsx$1 from "clsx";
|
|
9
|
-
import { createElement } from "react";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
//#region src/dashboard/PageSkeleton/PageSkeleton.tsx
|
|
12
11
|
const lineWidths = [
|
|
@@ -64,31 +63,37 @@ function TableSkeleton({ className, framed = true, leading = "text", rows = 6 })
|
|
|
64
63
|
style: { width },
|
|
65
64
|
xstyle: styles.theadCell
|
|
66
65
|
}, index))
|
|
67
|
-
}), Array.from({ length: rows }, (_, index) => /* @__PURE__ */
|
|
66
|
+
}), Array.from({ length: rows }, (_, index) => /* @__PURE__ */ jsxs("div", {
|
|
68
67
|
...styleProps(styles.row, classes("row")),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
68
|
+
children: [
|
|
69
|
+
leading === "avatar" ? /* @__PURE__ */ jsx(Skeleton.Avatar, {
|
|
70
|
+
className: classes("leading"),
|
|
71
|
+
shape: "circle",
|
|
72
|
+
size: 24
|
|
73
|
+
}) : null,
|
|
74
|
+
leading === "icon" ? /* @__PURE__ */ jsx(Skeleton.Avatar, {
|
|
75
|
+
className: classes("leading"),
|
|
76
|
+
shape: "square",
|
|
77
|
+
size: 24
|
|
78
|
+
}) : null,
|
|
79
|
+
/* @__PURE__ */ jsx("div", {
|
|
80
|
+
...styleProps(styles.copy, classes("copy")),
|
|
81
|
+
children: /* @__PURE__ */ jsx(Skeleton.Text, {
|
|
82
|
+
fontSize: 14,
|
|
83
|
+
rows: 2,
|
|
84
|
+
width: [...lineWidths[index % lineWidths.length]]
|
|
85
|
+
})
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ jsx(SkeletonImpl, {
|
|
88
|
+
className: classes("tag"),
|
|
89
|
+
xstyle: styles.tag
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ jsx(SkeletonImpl, {
|
|
92
|
+
className: classes("cell"),
|
|
93
|
+
xstyle: styles.cell
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
}, index))]
|
|
92
97
|
});
|
|
93
98
|
}
|
|
94
99
|
TableSkeleton.displayName = "TableSkeleton";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageSkeleton.mjs","names":["clsx"],"sources":["../../../src/dashboard/PageSkeleton/PageSkeleton.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\n\nimport Skeleton from '@/Skeleton';\nimport { SkeletonImpl } from '@/Skeleton/Skeleton';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { useSurfaceCardStyles } from '../Surface/link';\nimport {\n dashboardLoadingAnnouncerClasses,\n dashboardPageHeaderSkeletonClasses,\n dashboardPageLoadingClasses,\n dashboardStatCardSkeletonClasses,\n dashboardTableSkeletonClasses,\n} from './stable';\nimport { styles } from './style';\nimport type {\n LoadingAnnouncerProps,\n PageHeaderSkeletonProps,\n PageLoadingProps,\n TableSkeletonProps,\n} from './type';\n\nconst lineWidths = [\n ['68%', '36%'],\n ['52%', '28%'],\n ['76%', '42%'],\n ['58%', '32%'],\n] as const;\n\nfunction LoadingAnnouncer({ className, label }: LoadingAnnouncerProps) {\n return (\n <output\n aria-live=\"polite\"\n {...styleProps(styles.srOnly, clsx(dashboardLoadingAnnouncerClasses(), className))}\n >\n {label}\n </output>\n );\n}\n\nLoadingAnnouncer.displayName = 'LoadingAnnouncer';\n\nfunction PageHeaderSkeleton({ action = true, className }: PageHeaderSkeletonProps) {\n const classes = dashboardPageHeaderSkeletonClasses;\n return (\n <div aria-hidden {...styleProps(styles.header, clsx(classes(), className))}>\n <div {...styleProps(styles.headerCopy, classes('copy'))}>\n <SkeletonImpl className={classes('title')} xstyle={styles.title} />\n <Skeleton.Text className={classes('description')} fontSize={14} width=\"46%\" />\n </div>\n {action ? <SkeletonImpl className={classes('action')} xstyle={styles.action} /> : null}\n </div>\n );\n}\n\nPageHeaderSkeleton.displayName = 'PageHeaderSkeleton';\n\nfunction TableSkeleton({\n className,\n framed = true,\n leading = 'text',\n rows = 6,\n}: TableSkeletonProps) {\n const classes = dashboardTableSkeletonClasses;\n const cardStyles = useSurfaceCardStyles();\n const head = [96, 72, 64, 48];\n return (\n <div\n aria-hidden\n {...styleProps([styles.table, framed && cardStyles], clsx(classes(), className))}\n >\n <div {...styleProps(styles.thead, classes('head'))}>\n {head.map((width, index) => (\n <SkeletonImpl\n className={classes('head-cell')}\n key={index}\n style={{ width }}\n xstyle={styles.theadCell}\n />\n ))}\n </div>\n {Array.from({ length: rows }, (_, index) => (\n <div {...styleProps(styles.row, classes('row'))}
|
|
1
|
+
{"version":3,"file":"PageSkeleton.mjs","names":["clsx"],"sources":["../../../src/dashboard/PageSkeleton/PageSkeleton.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\n\nimport Skeleton from '@/Skeleton';\nimport { SkeletonImpl } from '@/Skeleton/Skeleton';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { useSurfaceCardStyles } from '../Surface/link';\nimport {\n dashboardLoadingAnnouncerClasses,\n dashboardPageHeaderSkeletonClasses,\n dashboardPageLoadingClasses,\n dashboardStatCardSkeletonClasses,\n dashboardTableSkeletonClasses,\n} from './stable';\nimport { styles } from './style';\nimport type {\n LoadingAnnouncerProps,\n PageHeaderSkeletonProps,\n PageLoadingProps,\n TableSkeletonProps,\n} from './type';\n\nconst lineWidths = [\n ['68%', '36%'],\n ['52%', '28%'],\n ['76%', '42%'],\n ['58%', '32%'],\n] as const;\n\nfunction LoadingAnnouncer({ className, label }: LoadingAnnouncerProps) {\n return (\n <output\n aria-live=\"polite\"\n {...styleProps(styles.srOnly, clsx(dashboardLoadingAnnouncerClasses(), className))}\n >\n {label}\n </output>\n );\n}\n\nLoadingAnnouncer.displayName = 'LoadingAnnouncer';\n\nfunction PageHeaderSkeleton({ action = true, className }: PageHeaderSkeletonProps) {\n const classes = dashboardPageHeaderSkeletonClasses;\n return (\n <div aria-hidden {...styleProps(styles.header, clsx(classes(), className))}>\n <div {...styleProps(styles.headerCopy, classes('copy'))}>\n <SkeletonImpl className={classes('title')} xstyle={styles.title} />\n <Skeleton.Text className={classes('description')} fontSize={14} width=\"46%\" />\n </div>\n {action ? <SkeletonImpl className={classes('action')} xstyle={styles.action} /> : null}\n </div>\n );\n}\n\nPageHeaderSkeleton.displayName = 'PageHeaderSkeleton';\n\nfunction TableSkeleton({\n className,\n framed = true,\n leading = 'text',\n rows = 6,\n}: TableSkeletonProps) {\n const classes = dashboardTableSkeletonClasses;\n const cardStyles = useSurfaceCardStyles();\n const head = [96, 72, 64, 48];\n return (\n <div\n aria-hidden\n {...styleProps([styles.table, framed && cardStyles], clsx(classes(), className))}\n >\n <div {...styleProps(styles.thead, classes('head'))}>\n {head.map((width, index) => (\n <SkeletonImpl\n className={classes('head-cell')}\n key={index}\n style={{ width }}\n xstyle={styles.theadCell}\n />\n ))}\n </div>\n {Array.from({ length: rows }, (_, index) => (\n <div key={index} {...styleProps(styles.row, classes('row'))}>\n {leading === 'avatar' ? (\n <Skeleton.Avatar className={classes('leading')} shape=\"circle\" size={24} />\n ) : null}\n {leading === 'icon' ? (\n <Skeleton.Avatar className={classes('leading')} shape=\"square\" size={24} />\n ) : null}\n <div {...styleProps(styles.copy, classes('copy'))}>\n <Skeleton.Text\n fontSize={14}\n rows={2}\n width={[...lineWidths[index % lineWidths.length]]}\n />\n </div>\n <SkeletonImpl className={classes('tag')} xstyle={styles.tag} />\n <SkeletonImpl className={classes('cell')} xstyle={styles.cell} />\n </div>\n ))}\n </div>\n );\n}\n\nTableSkeleton.displayName = 'TableSkeleton';\n\nfunction StatCardSkeleton({ className }: { className?: string }) {\n const cardStyles = useSurfaceCardStyles();\n const classes = dashboardStatCardSkeletonClasses;\n return (\n <div aria-hidden {...styleProps([styles.stat, cardStyles], clsx(classes(), className))}>\n <Skeleton.Text className={classes('label')} fontSize={14} width={72} />\n <SkeletonImpl className={classes('value')} xstyle={styles.statValue} />\n <Skeleton.Text className={classes('hint')} fontSize={14} width=\"68%\" />\n </div>\n );\n}\n\nStatCardSkeleton.displayName = 'StatCardSkeleton';\n\nfunction PageLoading({ className, header = true, label = 'Loading', stats = 4 }: PageLoadingProps) {\n return (\n <div\n aria-busy=\"true\"\n {...styleProps(styles.page, clsx(dashboardPageLoadingClasses(), className))}\n >\n <LoadingAnnouncer label={label} />\n {header ? <PageHeaderSkeleton /> : null}\n <section\n aria-hidden\n {...styleProps(styles.statGrid, dashboardPageLoadingClasses('stat-grid'))}\n >\n {Array.from({ length: stats }, (_, index) => (\n <StatCardSkeleton key={index} />\n ))}\n </section>\n <TableSkeleton />\n </div>\n );\n}\n\nPageLoading.displayName = 'PageLoading';\n\nexport { LoadingAnnouncer, PageHeaderSkeleton, StatCardSkeleton, TableSkeleton };\nexport default PageLoading;\n"],"mappings":";;;;;;;;;;AAwBA,MAAM,aAAa;CACjB,CAAC,OAAO,KAAK;CACb,CAAC,OAAO,KAAK;CACb,CAAC,OAAO,KAAK;CACb,CAAC,OAAO,KAAK;AACf;AAEA,SAAS,iBAAiB,EAAE,WAAW,SAAgC;CACrE,OACE,oBAAC,UAAD;EACE,aAAU;EACV,GAAI,WAAW,OAAO,QAAQA,OAAK,iCAAiC,GAAG,SAAS,CAAC;EAEhF,UAAA;CACK,CAAA;AAEZ;AAEA,iBAAiB,cAAc;AAE/B,SAAS,mBAAmB,EAAE,SAAS,MAAM,aAAsC;CACjF,MAAM,UAAU;CAChB,OACE,qBAAC,OAAD;EAAK,eAAA;EAAY,GAAI,WAAW,OAAO,QAAQA,OAAK,QAAQ,GAAG,SAAS,CAAC;EAAzE,UAAA,CACE,qBAAC,OAAD;GAAK,GAAI,WAAW,OAAO,YAAY,QAAQ,MAAM,CAAC;GAAtD,UAAA,CACE,oBAAC,cAAD;IAAc,WAAW,QAAQ,OAAO;IAAG,QAAQ,OAAO;GAAQ,CAAA,GAClE,oBAAC,SAAS,MAAV;IAAe,WAAW,QAAQ,aAAa;IAAG,UAAU;IAAI,OAAM;GAAO,CAAA,CAC1E;EACJ,CAAA,GAAA,SAAS,oBAAC,cAAD;GAAc,WAAW,QAAQ,QAAQ;GAAG,QAAQ,OAAO;EAAS,CAAA,IAAI,IAC/E;;AAET;AAEA,mBAAmB,cAAc;AAEjC,SAAS,cAAc,EACrB,WACA,SAAS,MACT,UAAU,QACV,OAA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qC;CAC/D,MAAM,aAAa,qBAAqB;CACxC,MAAM,UAAU;CAChB,OACE,qBAAC,OAAD;EAAK,eAAA;EAAY,GAAI,WAAW,CAAC,OAAO,MAAM,UAAU,GAAGA,OAAK,QAAQ,GAAG,SAAS,CAAC;EAArF,UAAA;GACE,oBAAC,SAAS,MAAV;IAAe,WAAW,QAAQ,OAAO;IAAG,UAAU;IAAI,OAAO;GAAK,CAAA;GACtE,oBAAC,cAAD;IAAc,WAAW,QAAQ,OAAO;IAAG,QAAQ,OAAO;GAAY,CAAA;GACtE,oBAAC,SAAS,MAAV;IAAe,WAAW,QAAQ,MAAM;IAAG,UAAU;IAAI,OAAM;GAAO,CAAA;EACnE;;AAET;AAEA,iBAAiB,cAAc;AAE/B,SAAS,YAAY,EAAE,WAAW,SAAS,MAAM,QAAQ,WAAW,QAAQ,KAAuB;CACjG,OACE,qBAAC,OAAD;EACE,aAAU;EACV,GAAI,WAAW,OAAO,MAAMA,OAAK,4BAA4B,GAAG,SAAS,CAAC;EAF5E,UAAA;GAIE,oBAAC,kBAAD,EAAyB,MAAQ,CAAA;GAChC,SAAS,oBAAC,oBAAD,CAAqB,CAAA,IAAI;GACnC,oBAAC,WAAD;IACE,eAAA;IACA,GAAI,WAAW,OAAO,UAAU,4BAA4B,WAAW,CAAC;IAEvE,UAAA,MAAM,KAAK,EAAE,QAAQ,MAAM,IAAI,GAAG,UACjC,oBAAC,kBAAD,CAA+B,GAAR,KAAQ,CAChC;GACM,CAAA;GACT,oBAAC,eAAD,CAAgB,CAAA;EACb;;AAET;AAEA,YAAY,cAAc"}
|
package/es/eslint/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Rule } from "../node_modules/.pnpm/eslint@10.13.0_jiti@2.
|
|
1
|
+
import { Rule } from "../node_modules/.pnpm/eslint@10.13.0_jiti@2.7.0_supports-color@10.2.2/node_modules/eslint/lib/types/index.mjs";
|
|
2
2
|
//#region src/eslint/index.d.ts
|
|
3
3
|
export declare const restrictedImports: {
|
|
4
4
|
rules: {
|