@optimum-intelligence/opti-ui 0.8.0 → 0.9.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +3 -3
  3. package/dist/components/app-shell/AppShell.d.ts +6 -1
  4. package/dist/components/app-shell/AppShell.js +99 -94
  5. package/dist/components/app-shell/AppShell.js.map +1 -1
  6. package/dist/components/breadcrumbs/Breadcrumbs.d.ts +6 -1
  7. package/dist/components/breadcrumbs/Breadcrumbs.js +42 -40
  8. package/dist/components/breadcrumbs/Breadcrumbs.js.map +1 -1
  9. package/dist/components/calendar/Calendar.js +29 -17
  10. package/dist/components/calendar/Calendar.js.map +1 -1
  11. package/dist/components/combobox/Combobox.d.ts +1 -1
  12. package/dist/components/combobox/Combobox.js +38 -29
  13. package/dist/components/combobox/Combobox.js.map +1 -1
  14. package/dist/components/command-palette/CommandPalette.d.ts +13 -4
  15. package/dist/components/command-palette/CommandPalette.js +91 -89
  16. package/dist/components/command-palette/CommandPalette.js.map +1 -1
  17. package/dist/components/data-table/DataTable.d.ts +38 -13
  18. package/dist/components/data-table/DataTable.js +421 -266
  19. package/dist/components/data-table/DataTable.js.map +1 -1
  20. package/dist/components/data-table/DataTableContent.d.ts +7 -1
  21. package/dist/components/data-table/DataTableContent.js +246 -210
  22. package/dist/components/data-table/DataTableContent.js.map +1 -1
  23. package/dist/components/data-table/DataTableFilters.d.ts +4 -3
  24. package/dist/components/data-table/DataTableFilters.js +311 -194
  25. package/dist/components/data-table/DataTableFilters.js.map +1 -1
  26. package/dist/components/data-table/DataTableRow.js +76 -72
  27. package/dist/components/data-table/DataTableRow.js.map +1 -1
  28. package/dist/components/data-table/layout.d.ts +5 -0
  29. package/dist/components/data-table/layout.js +23 -1
  30. package/dist/components/data-table/layout.js.map +1 -1
  31. package/dist/components/data-table/types.d.ts +57 -3
  32. package/dist/components/data-table/useDataTable.d.ts +1 -1
  33. package/dist/components/data-table/useDataTable.js +396 -351
  34. package/dist/components/data-table/useDataTable.js.map +1 -1
  35. package/dist/components/dialog/ConfirmDialog.d.ts +6 -1
  36. package/dist/components/dialog/ConfirmDialog.js +88 -85
  37. package/dist/components/dialog/ConfirmDialog.js.map +1 -1
  38. package/dist/components/progress/Progress.d.ts +2 -1
  39. package/dist/components/progress/Progress.js.map +1 -1
  40. package/dist/components/stat-card/StatCard.d.ts +7 -2
  41. package/dist/components/stat-card/StatCard.js +1 -1
  42. package/dist/components/stat-card/StatCard.js.map +1 -1
  43. package/dist/components/table/Table.d.ts +5 -1
  44. package/dist/components/table/Table.js +2 -1
  45. package/dist/components/table/Table.js.map +1 -1
  46. package/dist/components.json +124 -18
  47. package/dist/fonts/JetBrainsMono-OFL.txt +93 -0
  48. package/dist/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
  49. package/dist/fonts/jetbrains-mono-latin.woff2 +0 -0
  50. package/dist/fonts.css +22 -1
  51. package/dist/icons/index.d.ts +4 -0
  52. package/dist/icons/index.js +12 -1
  53. package/dist/icons/index.js.map +1 -1
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.js +3 -2
  56. package/dist/labels/Labels.d.ts +9 -1
  57. package/dist/labels/Labels.js +4 -0
  58. package/dist/labels/Labels.js.map +1 -1
  59. package/dist/labels/hu.d.ts +17 -0
  60. package/dist/labels/hu.js +124 -0
  61. package/dist/labels/hu.js.map +1 -0
  62. package/dist/llms-full.txt +60 -17
  63. package/dist/llms.txt +2 -1
  64. package/dist/opti-ui.css +303 -70
  65. package/dist/utils/scroll-fade.d.ts +5 -1
  66. package/dist/utils/scroll-fade.js +11 -1
  67. package/dist/utils/scroll-fade.js.map +1 -1
  68. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"StatCard.js","names":["React","cx","Card","CardProps","Skeleton","TrendingDownIcon","TrendingUpIcon","StatTrend","StatTone","StatCardProps","Omit","label","ReactNode","value","unit","delta","trend","tone","hint","icon","loading","StatCard","t0","$","_c","className","props","ref","resolvedTone","t1","t2","t3","t4","t5","t6","_c","_Fragment"],"sources":["../../../src/components/stat-card/StatCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../utils/cx';\nimport { Card, type CardProps } from '../card/Card';\nimport { Skeleton } from '../skeleton/Skeleton';\nimport { TrendingDownIcon, TrendingUpIcon } from '../../icons';\n\nexport type StatTrend = 'up' | 'down' | 'flat';\nexport type StatTone = 'positive' | 'negative' | 'neutral';\n\nexport interface StatCardProps extends Omit<CardProps, 'children'> {\n /** What the number measures. */\n label: React.ReactNode;\n /** The headline figure. */\n value: React.ReactNode;\n /** Unit beside the value, e.g. \"kWh\" or \"orders\". */\n unit?: React.ReactNode;\n /** Change indicator, e.g. \"+12.4%\". */\n delta?: React.ReactNode;\n /** Arrow direction shown next to `delta`. */\n trend?: StatTrend;\n /** Color of the delta. Defaults to positive for `up`, negative for `down`. */\n tone?: StatTone;\n /** Supporting text under the value. */\n hint?: React.ReactNode;\n /** Icon tile shown in the top-right corner. Hidden below 640px, where the tile is compact. */\n icon?: React.ReactNode;\n /** Replaces the value with a skeleton while data loads. */\n loading?: boolean;\n}\n\n/** KPI tile: label, large value, optional unit and trend. Below 640px it turns compact (smaller value, no icon) to sit two to a row. */\nexport function StatCard({\n label,\n value,\n unit,\n delta,\n trend,\n tone,\n hint,\n icon,\n loading,\n className,\n ref,\n ...props\n}: StatCardProps) {\n const resolvedTone: StatTone = tone ?? (trend === 'up' ? 'positive' : trend === 'down' ? 'negative' : 'neutral');\n return (\n <Card ref={ref} className={cx('oui-stat', className)} {...props}>\n <div className=\"oui-stat__header\">\n <p className=\"oui-stat__label\">{label}</p>\n {icon && <span className=\"oui-stat__icon\">{icon}</span>}\n </div>\n {loading ? (\n <div className=\"oui-stat__loading\">\n <Skeleton height=\"2.25rem\" width=\"55%\" />\n <Skeleton height=\"0.9rem\" width=\"35%\" />\n </div>\n ) : (\n <>\n <div className=\"oui-stat__body\">\n <p className=\"oui-stat__value\">{value}</p>\n {unit && <p className=\"oui-stat__unit\">{unit}</p>}\n </div>\n {(delta || hint) && (\n <div className=\"oui-stat__footer\">\n {delta && (\n <span className=\"oui-stat__delta\" data-tone={resolvedTone}>\n {trend === 'up' && <TrendingUpIcon />}\n {trend === 'down' && <TrendingDownIcon />}\n {delta}\n </span>\n )}\n {hint && <span className=\"oui-stat__hint\">{hint}</span>}\n </div>\n )}\n </>\n )}\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;;AA+BA,SAAOqB,SAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAV;CAAA,IAAAG;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAS;CAAA,IAAAM;CAAA,IAAAC;CAAA,IAAAV;CAAA,IAAAD;CAAA,IAAAF;CAAA,IAAAD;CAAA,IAAAU,EAAA,OAAAD,IAAA;EAAkB,CAAA,CAAAX,OAAAE,OAAAC,MAAAC,OAAAC,OAAAC,MAAAC,MAAAC,MAAAC,SAAAK,WAAAE,KAAA,GAAAD,SAAAJ;EAaTC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAR;EAAAQ,EAAA,KAAAL;EAAAK,EAAA,KAAAJ;EAAAI,EAAA,KAAAZ;EAAAY,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAN;EAAAM,EAAA,MAAAP;EAAAO,EAAA,MAAAT;EAAAS,EAAA,MAAAV;CAAA,OAAA;EAAAY,YAAAF,EAAA;EAAAR,QAAAQ,EAAA;EAAAL,OAAAK,EAAA;EAAAJ,OAAAI,EAAA;EAAAZ,QAAAY,EAAA;EAAAH,UAAAG,EAAA;EAAAG,QAAAH,EAAA;EAAAI,MAAAJ,EAAA;EAAAN,OAAAM,EAAA;EAAAP,QAAAO,EAAA;EAAAT,OAAAS,EAAA;EAAAV,QAAAU,EAAA;CAAA;CACd,MAAAK,eAA+BX,SA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A,CACE,oBAAA,KAAA;IAAa,WAAA;IAAmBvB,UAAAA;GAAU,CAAA,GACzCC,QAAQ,oBAAA,KAAA;IAAa,WAAA;IAAkBA,UAAAA;GAAS,CAAA,CAC7C;EACJC,CAAAA,IAAAA,SAAAG,SACA,qBAAA,OAAA;GAAe,WAAA;GAAf,UAAA,CACGH,SACC,qBAAA,QAAA;IAAgB,WAAA;IAA6Ba,aAAAA;IAA7C,UAAA;KACGZ,UAAU,QAAQ,oBAAC,gBAAD,CAAe,CAAA;KACjCA,UAAU,UAAU,oBAAC,kBAAD,CAAiB,CAAA;KACrCD;IACI;GAERG,CAAAA,GAAAA,QAAQ,oBAAA,QAAA;IAAgB,WAAA;IAAkBA,UAAAA;GAAY,CAAA,CACnD;EACP,CAAA,CAAA,EAAA,CAAA;EAEJK,EAAA,MAAAR;EAAAQ,EAAA,MAAAL;EAAAK,EAAA,MAAAH;EAAAG,EAAA,MAAAK;EAAAL,EAAA,MAAAP;EAAAO,EAAA,MAAAT;EAAAS,EAAA,MAAAV;EAAAU,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAW;CAAA,IAAAX,EAAA,QAAAG,SAAAH,EAAA,QAAAI,OAAAJ,EAAA,QAAAM,MAAAN,EAAA,QAAAS,MAAAT,EAAA,QAAAU,IAAA;EA7BHC,KAAA,qBAAC,MAAD;GAAWP;GAAgB,WAAAE;GAAyB,GAAMH;GAA1D,UAAA,CACEM,IAICC,EALE;;EA8BEV,EAAA,MAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAM;EAAAN,EAAA,MAAAS;EAAAT,EAAA,MAAAU;EAAAV,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OA9BPW;AA8BO"}
1
+ {"version":3,"file":"StatCard.js","names":["React","cx","Card","CardProps","Skeleton","TrendingDownIcon","TrendingUpIcon","StatTrend","StatTone","StatCardProps","Omit","label","ReactNode","value","unit","delta","trend","tone","hint","icon","loading","StatCard","t0","$","_c","className","props","ref","given","resolvedTone","t1","t2","t3","t4","t5","t6","_c","_Fragment"],"sources":["../../../src/components/stat-card/StatCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../utils/cx';\nimport { Card, type CardProps } from '../card/Card';\nimport { Skeleton } from '../skeleton/Skeleton';\nimport { TrendingDownIcon, TrendingUpIcon } from '../../icons';\n\nexport type StatTrend = 'up' | 'down' | 'flat';\n/** Colour of a stat's delta. `positive` and `negative` are deprecated aliases of `success` and `danger`. */\nexport type StatTone = 'success' | 'danger' | 'neutral' | 'positive' | 'negative';\n\nexport interface StatCardProps extends Omit<CardProps, 'children'> {\n /** What the number measures. */\n label: React.ReactNode;\n /** The headline figure. */\n value: React.ReactNode;\n /** Unit beside the value, e.g. \"kWh\" or \"orders\". */\n unit?: React.ReactNode;\n /** Change indicator, e.g. \"+12.4%\". */\n delta?: React.ReactNode;\n /** Arrow direction shown next to `delta`. */\n trend?: StatTrend;\n /**\n * Colour of the delta: whether the change is good (`success`) or bad (`danger`), which the direction\n * alone does not say. Defaults to `success` for `up`, `danger` for `down`. `positive` and `negative`\n * still work but are deprecated.\n */\n tone?: StatTone;\n /** Supporting text under the value. */\n hint?: React.ReactNode;\n /** Icon tile shown in the top-right corner. Hidden below 640px, where the tile is compact. */\n icon?: React.ReactNode;\n /** Replaces the value with a skeleton while data loads. */\n loading?: boolean;\n}\n\n/** KPI tile: label, large value, optional unit and trend. Below 640px it turns compact (smaller value, no icon) to sit two to a row. */\nexport function StatCard({\n label,\n value,\n unit,\n delta,\n trend,\n tone,\n hint,\n icon,\n loading,\n className,\n ref,\n ...props\n}: StatCardProps) {\n const given = tone === 'positive' ? 'success' : tone === 'negative' ? 'danger' : tone;\n const resolvedTone = given ?? (trend === 'up' ? 'success' : trend === 'down' ? 'danger' : 'neutral');\n return (\n <Card ref={ref} className={cx('oui-stat', className)} {...props}>\n <div className=\"oui-stat__header\">\n <p className=\"oui-stat__label\">{label}</p>\n {icon && <span className=\"oui-stat__icon\">{icon}</span>}\n </div>\n {loading ? (\n <div className=\"oui-stat__loading\">\n <Skeleton height=\"2.25rem\" width=\"55%\" />\n <Skeleton height=\"0.9rem\" width=\"35%\" />\n </div>\n ) : (\n <>\n <div className=\"oui-stat__body\">\n <p className=\"oui-stat__value\">{value}</p>\n {unit && <p className=\"oui-stat__unit\">{unit}</p>}\n </div>\n {(delta || hint) && (\n <div className=\"oui-stat__footer\">\n {delta && (\n <span className=\"oui-stat__delta\" data-tone={resolvedTone}>\n {trend === 'up' && <TrendingUpIcon />}\n {trend === 'down' && <TrendingDownIcon />}\n {delta}\n </span>\n )}\n {hint && <span className=\"oui-stat__hint\">{hint}</span>}\n </div>\n )}\n </>\n )}\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;;AAoCA,SAAOqB,SAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAV;CAAA,IAAAG;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAS;CAAA,IAAAM;CAAA,IAAAC;CAAA,IAAAV;CAAA,IAAAD;CAAA,IAAAF;CAAA,IAAAD;CAAA,IAAAU,EAAA,OAAAD,IAAA;EAAkB,CAAA,CAAAX,OAAAE,OAAAC,MAAAC,OAAAC,OAAAC,MAAAC,MAAAC,MAAAC,SAAAK,WAAAE,KAAA,GAAAD,SAAAJ;EAaTC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAR;EAAAQ,EAAA,KAAAL;EAAAK,EAAA,KAAAJ;EAAAI,EAAA,KAAAZ;EAAAY,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAN;EAAAM,EAAA,MAAAP;EAAAO,EAAA,MAAAT;EAAAS,EAAA,MAAAV;CAAA,OAAA;EAAAY,YAAAF,EAAA;EAAAR,QAAAQ,EAAA;EAAAL,OAAAK,EAAA;EAAAJ,OAAAI,EAAA;EAAAZ,QAAAY,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AW;EAAAX,EAAA,MAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OA9BPY;AA8BO"}
@@ -10,7 +10,11 @@ export interface TableProps extends React.TableHTMLAttributes<HTMLTableElement>
10
10
  hoverable?: boolean;
11
11
  /** Keep the header visible while the wrapper scrolls (set a max height on it). */
12
12
  stickyHeader?: boolean;
13
- /** Props for the horizontally scrolling wrapper. */
13
+ /**
14
+ * Props for the horizontally scrolling wrapper. While the table overflows, the wrapper is focusable so keyboard
15
+ * users can scroll it; give it `role="region"` and an `aria-label` (or `aria-labelledby` the caption) so screen
16
+ * readers announce what it is.
17
+ */
14
18
  wrapperProps?: React.HTMLAttributes<HTMLDivElement>;
15
19
  }
16
20
  /**
@@ -7,6 +7,7 @@ import { c } from "react/compiler-runtime";
7
7
  import "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/components/table/Table.tsx
10
+ var focusableScrollFade = (node) => scrollFade(node, true);
10
11
  /**
11
12
  * Styled HTML table inside a horizontally scrolling wrapper, whose cut-off edge fades. Compose with `TableHeader`, `TableBody`,
12
13
  * `TableFooter`, `TableRow`, `TableHead`, `TableCell` and `TableCaption`. For search, filters, sorting
@@ -95,7 +96,7 @@ function Table(t0) {
95
96
  if ($[21] !== t4 || $[22] !== t9 || $[23] !== wrapperProps) {
96
97
  t10 = /* @__PURE__ */ jsx("div", {
97
98
  ...wrapperProps,
98
- ref: scrollFade,
99
+ ref: focusableScrollFade,
99
100
  className: t4,
100
101
  children: t9
101
102
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","names":["React","cx","createPrimitive","scrollFade","ChevronDownIcon","ChevronUpIcon","ChevronsUpDownIcon","TableProps","TableHTMLAttributes","HTMLTableElement","ref","Ref","density","striped","hoverable","stickyHeader","wrapperProps","HTMLAttributes","HTMLDivElement","Table","t0","$","_c","className","props","t1","t2","undefined","t3","t4","t5","t6","t7","t8","t9","t10","TableHeader","TableBody","TableFooter","TableRow","TableCaption","Align","SortDirection","TableHeadProps","Omit","ThHTMLAttributes","HTMLTableCellElement","align","sort","onSort","TableHead","children","sortable","TableCellProps","TdHTMLAttributes","numeric","TableCell","_c"],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../utils/cx';\nimport { createPrimitive } from '../../utils/primitive';\nimport { scrollFade } from '../../utils/scroll-fade';\nimport { ChevronDownIcon, ChevronUpIcon, ChevronsUpDownIcon } from '../../icons';\n\nexport interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {\n /** Ref to the `<table>`. */\n ref?: React.Ref<HTMLTableElement>;\n /** Row height and cell padding. `normal` suits data-heavy screens; `comfortable` adds air for short tables. */\n density?: 'compact' | 'normal' | 'comfortable';\n /** Alternating row background. */\n striped?: boolean;\n /** Highlight rows on hover. */\n hoverable?: boolean;\n /** Keep the header visible while the wrapper scrolls (set a max height on it). */\n stickyHeader?: boolean;\n /** Props for the horizontally scrolling wrapper. */\n wrapperProps?: React.HTMLAttributes<HTMLDivElement>;\n}\n\n/**\n * Styled HTML table inside a horizontally scrolling wrapper, whose cut-off edge fades. Compose with `TableHeader`, `TableBody`,\n * `TableFooter`, `TableRow`, `TableHead`, `TableCell` and `TableCaption`. For search, filters, sorting\n * and pagination use `DataTable` instead.\n *\n * @example\n * <Table striped>\n * <TableHeader>\n * <TableRow><TableHead>Site</TableHead><TableHead align=\"end\">kWh</TableHead></TableRow>\n * </TableHeader>\n * <TableBody>\n * <TableRow><TableCell>Győr</TableCell><TableCell numeric>1,204</TableCell></TableRow>\n * </TableBody>\n * </Table>\n */\nexport function Table({\n density = 'normal',\n striped,\n hoverable = true,\n stickyHeader,\n wrapperProps,\n className,\n ref,\n ...props\n}: TableProps) {\n return (\n <div {...wrapperProps} ref={scrollFade} className={cx('oui-table-wrap', wrapperProps?.className)}>\n <table\n ref={ref}\n className={cx('oui-table', className)}\n data-density={density}\n data-striped={striped || undefined}\n data-hoverable={hoverable || undefined}\n data-sticky-header={stickyHeader || undefined}\n {...props}\n />\n </div>\n );\n}\n\nexport const TableHeader = createPrimitive('thead', 'oui-table__header', 'TableHeader');\nexport const TableBody = createPrimitive('tbody', 'oui-table__body', 'TableBody');\nexport const TableFooter = createPrimitive('tfoot', 'oui-table__footer', 'TableFooter');\nexport const TableRow = createPrimitive('tr', 'oui-table__row', 'TableRow');\nexport const TableCaption = createPrimitive('caption', 'oui-table__caption', 'TableCaption');\n\ntype Align = 'start' | 'center' | 'end';\nexport type SortDirection = 'asc' | 'desc' | false;\n\nexport interface TableHeadProps extends Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'align'> {\n /** Ref to the `<th>`. */\n ref?: React.Ref<HTMLTableCellElement>;\n /** Horizontal alignment of the header content. */\n align?: Align;\n /** Current sort of this column. Passing it (even `false`) makes the header sortable. */\n sort?: SortDirection;\n /** Called when the sortable header is clicked. */\n onSort?: () => void;\n}\n\n/** Column header cell (`<th>`), optionally a sort button. */\nexport function TableHead({ align = 'start', sort, onSort, className, children, ref, ...props }: TableHeadProps) {\n const sortable = sort !== undefined;\n return (\n <th\n ref={ref}\n scope=\"col\"\n className={cx('oui-table__head', className)}\n data-align={align}\n aria-sort={sort === 'asc' ? 'ascending' : sort === 'desc' ? 'descending' : undefined}\n {...props}\n >\n {sortable ? (\n <button type=\"button\" className=\"oui-table__sort\" data-active={sort ? '' : undefined} onClick={onSort}>\n {children}\n {sort === 'asc' ? <ChevronUpIcon /> : sort === 'desc' ? <ChevronDownIcon /> : <ChevronsUpDownIcon />}\n </button>\n ) : (\n children\n )}\n </th>\n );\n}\n\nexport interface TableCellProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'align'> {\n /** Ref to the `<td>`. */\n ref?: React.Ref<HTMLTableCellElement>;\n /** Horizontal alignment. Defaults to `end` when `numeric`, else `start`. */\n align?: Align;\n /** Tabular figures for numeric columns. */\n numeric?: boolean;\n}\n\n/** Body cell (`<td>`). `numeric` right-aligns and uses tabular figures. */\nexport function TableCell({ align, numeric, className, ref, ...props }: TableCellProps) {\n return (\n <td\n ref={ref}\n className={cx('oui-table__cell', className)}\n data-align={align ?? (numeric ? 'end' : 'start')}\n data-numeric={numeric || undefined}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAOmB,MAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAd;CAAA,IAAAK;CAAA,IAAAF;CAAA,IAAAY;CAAA,IAAAC;CAAA,IAAAV;CAAA,IAAAK,EAAA,OAAAD,IAAA;EAAe,CAAA,CAAAR,SAAAa,IAAAZ,SAAAC,WAAAY,IAAAX,cAAAC,cAAAO,WAAAb,KAAA,GAAAc,SAAAJ;EASTC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAX;EAAAW,EAAA,KAAAN;EAAAM,EAAA,KAAAR;EAAAQ,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAL;CAAA,OAAA;EAAAO,YAAAF,EAAA;EAAAG,QAAAH,EAAA;EAAAX,MAAAW,EAAA;EAAAN,eAAAM,EAAA;EAAAR,UAAAQ,EAAA;EAAAI,KAAAJ,EAAA;EAAAK,KAAAL,EAAA;EAAAL,eAAAK,EAAA;CAAA;CARX,MAAAT,UAAAa,OAAAE,KAAAA,IAAA,WAAAF;CAEA,MAAAX,YAAAY,OAAAC,KAAAA,IAAA,OAAAD;CAQ0E,MAAAE,KAAAZ,cAAYO;CAAW,IAAAM;CAAA,IAAAR,EAAA,OAAAO,IAAA;EAA5CC,KAAA5B,GAAG,kBAAkB2B,EAAuB;EAACP,EAAA,KAAAO;EAAAP,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,QAAAE,WAAA;EAGjFO,KAAA7B,GAAG,aAAasB,SAAS;EAACF,EAAA,MAAAE;EAAAF,EAAA,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A;EAIrEE,KAAAxB,GAAG,mBAAmBsB,SAAS;EAACF,EAAA,KAAAE;EAAAF,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAC/B,MAAAK,KAAAqB,UAAUQ,UAAA,QAAA;CACR,MAAA3B,KAAA2B,WAAA5B,KAAAA;CAAoB,IAAAE;CAAA,IAAAR,EAAA,OAAAG,SAAAH,EAAA,OAAAX,OAAAW,EAAA,QAAAI,MAAAJ,EAAA,QAAAK,MAAAL,EAAA,QAAAO,IAAA;EAJpCC,KAAA,oBAAA,MAAA;GACOnB;GACM,WAAAe;GACC,cAAAC;GACE,gBAAAE;GAAoB,GAC9BJ;EAAK,CAAA;EACTH,EAAA,KAAAG;EAAAH,EAAA,KAAAX;EAAAW,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAO;EAAAP,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANFQ;AAME"}
1
+ {"version":3,"file":"Table.js","names":["React","cx","createPrimitive","scrollFade","ChevronDownIcon","ChevronUpIcon","ChevronsUpDownIcon","focusableScrollFade","node","HTMLDivElement","TableProps","TableHTMLAttributes","HTMLTableElement","ref","Ref","density","striped","hoverable","stickyHeader","wrapperProps","HTMLAttributes","Table","t0","$","_c","className","props","t1","t2","undefined","t3","t4","t5","t6","t7","t8","t9","t10","TableHeader","TableBody","TableFooter","TableRow","TableCaption","Align","SortDirection","TableHeadProps","Omit","ThHTMLAttributes","HTMLTableCellElement","align","sort","onSort","TableHead","children","sortable","TableCellProps","TdHTMLAttributes","numeric","TableCell","_c"],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../utils/cx';\nimport { createPrimitive } from '../../utils/primitive';\nimport { scrollFade } from '../../utils/scroll-fade';\nimport { ChevronDownIcon, ChevronUpIcon, ChevronsUpDownIcon } from '../../icons';\n\nconst focusableScrollFade = (node: HTMLDivElement | null) => scrollFade(node, true);\n\nexport interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {\n /** Ref to the `<table>`. */\n ref?: React.Ref<HTMLTableElement>;\n /** Row height and cell padding. `normal` suits data-heavy screens; `comfortable` adds air for short tables. */\n density?: 'compact' | 'normal' | 'comfortable';\n /** Alternating row background. */\n striped?: boolean;\n /** Highlight rows on hover. */\n hoverable?: boolean;\n /** Keep the header visible while the wrapper scrolls (set a max height on it). */\n stickyHeader?: boolean;\n /**\n * Props for the horizontally scrolling wrapper. While the table overflows, the wrapper is focusable so keyboard\n * users can scroll it; give it `role=\"region\"` and an `aria-label` (or `aria-labelledby` the caption) so screen\n * readers announce what it is.\n */\n wrapperProps?: React.HTMLAttributes<HTMLDivElement>;\n}\n\n/**\n * Styled HTML table inside a horizontally scrolling wrapper, whose cut-off edge fades. Compose with `TableHeader`, `TableBody`,\n * `TableFooter`, `TableRow`, `TableHead`, `TableCell` and `TableCaption`. For search, filters, sorting\n * and pagination use `DataTable` instead.\n *\n * @example\n * <Table striped>\n * <TableHeader>\n * <TableRow><TableHead>Site</TableHead><TableHead align=\"end\">kWh</TableHead></TableRow>\n * </TableHeader>\n * <TableBody>\n * <TableRow><TableCell>Győr</TableCell><TableCell numeric>1,204</TableCell></TableRow>\n * </TableBody>\n * </Table>\n */\nexport function Table({\n density = 'normal',\n striped,\n hoverable = true,\n stickyHeader,\n wrapperProps,\n className,\n ref,\n ...props\n}: TableProps) {\n return (\n <div {...wrapperProps} ref={focusableScrollFade} className={cx('oui-table-wrap', wrapperProps?.className)}>\n <table\n ref={ref}\n className={cx('oui-table', className)}\n data-density={density}\n data-striped={striped || undefined}\n data-hoverable={hoverable || undefined}\n data-sticky-header={stickyHeader || undefined}\n {...props}\n />\n </div>\n );\n}\n\nexport const TableHeader = createPrimitive('thead', 'oui-table__header', 'TableHeader');\nexport const TableBody = createPrimitive('tbody', 'oui-table__body', 'TableBody');\nexport const TableFooter = createPrimitive('tfoot', 'oui-table__footer', 'TableFooter');\nexport const TableRow = createPrimitive('tr', 'oui-table__row', 'TableRow');\nexport const TableCaption = createPrimitive('caption', 'oui-table__caption', 'TableCaption');\n\ntype Align = 'start' | 'center' | 'end';\nexport type SortDirection = 'asc' | 'desc' | false;\n\nexport interface TableHeadProps extends Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'align'> {\n /** Ref to the `<th>`. */\n ref?: React.Ref<HTMLTableCellElement>;\n /** Horizontal alignment of the header content. */\n align?: Align;\n /** Current sort of this column. Passing it (even `false`) makes the header sortable. */\n sort?: SortDirection;\n /** Called when the sortable header is clicked. */\n onSort?: () => void;\n}\n\n/** Column header cell (`<th>`), optionally a sort button. */\nexport function TableHead({ align = 'start', sort, onSort, className, children, ref, ...props }: TableHeadProps) {\n const sortable = sort !== undefined;\n return (\n <th\n ref={ref}\n scope=\"col\"\n className={cx('oui-table__head', className)}\n data-align={align}\n aria-sort={sort === 'asc' ? 'ascending' : sort === 'desc' ? 'descending' : undefined}\n {...props}\n >\n {sortable ? (\n <button type=\"button\" className=\"oui-table__sort\" data-active={sort ? '' : undefined} onClick={onSort}>\n {children}\n {sort === 'asc' ? <ChevronUpIcon /> : sort === 'desc' ? <ChevronDownIcon /> : <ChevronsUpDownIcon />}\n </button>\n ) : (\n children\n )}\n </th>\n );\n}\n\nexport interface TableCellProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'align'> {\n /** Ref to the `<td>`. */\n ref?: React.Ref<HTMLTableCellElement>;\n /** Horizontal alignment. Defaults to `end` when `numeric`, else `start`. */\n align?: Align;\n /** Tabular figures for numeric columns. */\n numeric?: boolean;\n}\n\n/** Body cell (`<td>`). `numeric` right-aligns and uses tabular figures. */\nexport function TableCell({ align, numeric, className, ref, ...props }: TableCellProps) {\n return (\n <td\n ref={ref}\n className={cx('oui-table__cell', className)}\n data-align={align ?? (numeric ? 'end' : 'start')}\n data-numeric={numeric || undefined}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAMA,IAAMO,uBAAuBC,SAAgCL,WAAWK,MAAM,I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A,QAAA;CACR,MAAA3B,KAAA2B,WAAA5B,KAAAA;CAAoB,IAAAE;CAAA,IAAAR,EAAA,OAAAG,SAAAH,EAAA,OAAAV,OAAAU,EAAA,QAAAI,MAAAJ,EAAA,QAAAK,MAAAL,EAAA,QAAAO,IAAA;EAJpCC,KAAA,oBAAA,MAAA;GACOlB;GACM,WAAAc;GACC,cAAAC;GACE,gBAAAE;GAAoB,GAC9BJ;EAAK,CAAA;EACTH,EAAA,KAAAG;EAAAH,EAAA,KAAAV;EAAAU,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAO;EAAAP,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANFQ;AAME"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@optimum-intelligence/opti-ui",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Optimum's customizable React component library, built on Base UI.",
5
5
  "categories": [
6
6
  "Theme",
@@ -23,6 +23,14 @@
23
23
  "import": "import { createTheme } from '@optimum-intelligence/opti-ui';",
24
24
  "signature": "createTheme(...themes: Theme[])"
25
25
  },
26
+ {
27
+ "name": "huLabels",
28
+ "kind": "constant",
29
+ "category": "Theme",
30
+ "description": "Hungarian texts for every built-in label of the library, in the formal register (magázás). Pass it to\n`LabelsProvider` once at the app root; spread it to change single texts. Dates also need `locale=\"hu\"` (or\n`DateConfigProvider`) for month and weekday names. Map texts are separate: see `MapLabels`.",
31
+ "import": "import { huLabels } from '@optimum-intelligence/opti-ui';",
32
+ "example": "<LabelsProvider labels={{ ...huLabels, dataTable: { ...huLabels.dataTable, count: (n) => `${n} jármű` } }}>\n <App />\n</LabelsProvider>"
33
+ },
26
34
  {
27
35
  "name": "LabelsProvider",
28
36
  "kind": "component",
@@ -2353,6 +2361,12 @@
2353
2361
  "required": false,
2354
2362
  "description": "Also shows the item in the `AppShell` mobile tab bar (icon and label). Pin up to four items; the\nfirst four in navbar order are used. Has no effect outside an `AppShell`.",
2355
2363
  "default": "false"
2364
+ },
2365
+ {
2366
+ "name": "tabLabel",
2367
+ "type": "React.ReactNode",
2368
+ "required": false,
2369
+ "description": "Shorter label for the mobile tab bar, where long labels are cut short (e.g. \"Vehicles\" for \"Vehicle\nregister\"). The full label stays in the navbar and becomes the tab's tooltip. Only used with `pinned`."
2356
2370
  }
2357
2371
  ],
2358
2372
  "extends": [
@@ -2625,11 +2639,13 @@
2625
2639
  "type": "StatTone",
2626
2640
  "required": false,
2627
2641
  "values": [
2642
+ "success",
2643
+ "danger",
2644
+ "neutral",
2628
2645
  "positive",
2629
- "negative",
2630
- "neutral"
2646
+ "negative"
2631
2647
  ],
2632
- "description": "Color of the delta. Defaults to positive for `up`, negative for `down`."
2648
+ "description": "Colour of the delta: whether the change is good (`success`) or bad (`danger`), which the direction\nalone does not say. Defaults to `success` for `up`, `danger` for `down`. `positive` and `negative`\nstill work but are deprecated."
2633
2649
  },
2634
2650
  {
2635
2651
  "name": "hint",
@@ -3482,22 +3498,22 @@
3482
3498
  "name": "title",
3483
3499
  "type": "string",
3484
3500
  "required": false,
3485
- "description": "Accessible name of the dialog.",
3486
- "default": "'Command palette'"
3501
+ "default": "'Command palette'",
3502
+ "description": "Accessible name of the dialog. Set app-wide with `LabelsProvider` (`commandPalette`)."
3487
3503
  },
3488
3504
  {
3489
3505
  "name": "placeholder",
3490
3506
  "type": "string",
3491
3507
  "required": false,
3492
- "description": "Placeholder of the search input.",
3493
- "default": "'Search…'"
3508
+ "default": "'Search…'",
3509
+ "description": "Placeholder and accessible name of the search input. Set app-wide with `LabelsProvider` (`commandSearch`)."
3494
3510
  },
3495
3511
  {
3496
3512
  "name": "emptyText",
3497
3513
  "type": "React.ReactNode",
3498
3514
  "required": false,
3499
- "description": "Shown when nothing matches.",
3500
- "default": "'No results found.'"
3515
+ "default": "'No results found.'",
3516
+ "description": "Shown when nothing matches. Set app-wide with `LabelsProvider` (`noResults`)."
3501
3517
  },
3502
3518
  {
3503
3519
  "name": "loading",
@@ -3617,6 +3633,13 @@
3617
3633
  "description": "The action is running: the confirm button spins and the dialog cannot be closed.",
3618
3634
  "default": "false"
3619
3635
  },
3636
+ {
3637
+ "name": "confirmDisabled",
3638
+ "type": "boolean",
3639
+ "required": false,
3640
+ "description": "Disables the confirm button, for an action that turns out to be blocked once the dialog is open.\nSay why in `children` or `error`.",
3641
+ "default": "false"
3642
+ },
3620
3643
  {
3621
3644
  "name": "error",
3622
3645
  "type": "React.ReactNode",
@@ -4339,6 +4362,13 @@
4339
4362
  "type": "React.ReactNode",
4340
4363
  "required": false,
4341
4364
  "description": "Shown between items. Defaults to a chevron."
4365
+ },
4366
+ {
4367
+ "name": "aria-label",
4368
+ "type": "string",
4369
+ "required": false,
4370
+ "default": "'Breadcrumb'",
4371
+ "description": "Accessible name of the `<nav>`. Set app-wide with `LabelsProvider` (`breadcrumbs`)."
4342
4372
  }
4343
4373
  ],
4344
4374
  "extends": [
@@ -4811,7 +4841,7 @@
4811
4841
  "name": "DataTable",
4812
4842
  "kind": "compound",
4813
4843
  "category": "Feedback & data display",
4814
- "description": "`<DataTable data={…} columns={…} />` renders a complete table with search,\nfilters, sorting, pagination, row selection, row actions and inline editing;\ncolumns declare what they take part in. Every piece of state works\nuncontrolled or controlled (`search` / `filterValues` / `sort` / `page` /\n`selection`), and with `mode=\"server\"` the same state drives an API.\n\nFor another layout, create the table with `useDataTable` and compose the\nparts: `DataTable.Root`, `DataTable.Toolbar`, `DataTable.Controls` (the\ntoolbar's left column), `DataTable.Search`, `DataTable.Filters` (`quick`\npicks the toolbar filters), `DataTable.Filter`, `DataTable.FilterPanel`\n(the \"Filters\" button and panel for the other filters),\n`DataTable.ActiveFilters` (their tags), `DataTable.FilterSheet` (the phone\nfilter button and sheet), `DataTable.ClearFilters`, `DataTable.Actions`,\n`DataTable.Loading`, `DataTable.Summary`, `DataTable.Content`,\n`DataTable.Pagination`.\n\nOn phones (below 640px) columns with `priority: 'low'` are hidden, and\n`stickyFirstColumn` keeps each row's name in view while the rest scrolls.",
4844
+ "description": "`<DataTable data={…} columns={…} />` renders a complete table with search,\nfilters, sorting, pagination, row selection, row actions and inline editing;\ncolumns declare what they take part in. Every piece of state works\nuncontrolled or controlled (`search` / `filterValues` / `sort` / `page` /\n`selection`), and with `mode=\"server\"` the same state drives an API.\n\nFor another layout, create the table with `useDataTable` and compose the\nparts: `DataTable.Root`, `DataTable.Toolbar`, `DataTable.Controls` (the\ntoolbar's left column), `DataTable.Search`, `DataTable.Filters` (`quick`\npicks the toolbar filters), `DataTable.Filter`, `DataTable.FilterPanel`\n(the \"Filters\" button and panel for the other filters),\n`DataTable.ActiveFilters` (their tags), `DataTable.FilterSheet` (the phone\nfilter button and sheet), `DataTable.ClearFilters`, `DataTable.Actions`,\n`DataTable.ColumnsMenu`,\n`DataTable.Loading`, `DataTable.Summary`, `DataTable.Content`,\n`DataTable.Pagination`.\n\nOn phones (below 640px) columns with `priority: 'low'` are hidden, and\n`stickyFirstColumn` keeps each row's name in view while the rest scrolls.",
4815
4845
  "import": "import { DataTable } from '@optimum-intelligence/opti-ui';",
4816
4846
  "propsType": "DataTableProps",
4817
4847
  "props": [
@@ -4881,13 +4911,26 @@
4881
4911
  "name": "toolbar",
4882
4912
  "type": "React.ReactNode | ((context: DataTableToolbarContext<T>) => React.ReactNode)",
4883
4913
  "required": false,
4884
- "description": "Extra toolbar content (add, bulk actions…). A function receives the processed rows."
4914
+ "description": "Extra toolbar content (add, import…). A function receives the processed rows."
4915
+ },
4916
+ {
4917
+ "name": "bulkActions",
4918
+ "type": "(context: DataTableToolbarContext<T>) => React.ReactNode",
4919
+ "required": false,
4920
+ "description": "Actions on the selected rows. While rows are selected, the header row shows their count, a clear\nbutton and these actions in place of the column names. Needs `onSelectionChange`."
4921
+ },
4922
+ {
4923
+ "name": "columnsMenu",
4924
+ "type": "boolean",
4925
+ "required": false,
4926
+ "description": "Adds an icon button whose menu shows and hides columns (`DataTable.ColumnsMenu`).",
4927
+ "default": "false"
4885
4928
  },
4886
4929
  {
4887
4930
  "name": "showToolbar",
4888
4931
  "type": "boolean",
4889
4932
  "required": false,
4890
- "description": "`false` drops the search, filters, row count and toolbar content: rows only, for short tables under\ntheir own heading. The toolbar holds the search, the `quick` filters, a \"Filters (n)\" button whose\npanel holds the other filters, and a clear button on the left; the loading spinner, `toolbar` content\nand export on the right. Active filters from the panel show as tags under it. The row count sits in\nthe footer: the pagination's range, or a count when the table is not paginated or rows are selected.\nBelow 640px the toolbar is one line: the search, a \"Filters (n)\" button whose bottom sheet holds every\nfilter and the `toolbar` content, and export.",
4933
+ "description": "`false` drops the search, filters, row count and toolbar content: rows only, for short tables under\ntheir own heading. The toolbar holds the search, a \"Filters (n)\" button whose panel holds the filters\nthat are not `quick`, the `quick` filters and a clear button on the left; the loading spinner,\n`toolbar` content, columns menu and export on the right. Active filters from the panel show\nas tags under it. The row count sits in the footer: the pagination's range, or a count when the table\nis not paginated. Below 640px the toolbar is one line: the search, a filter icon button whose bottom\nsheet holds every filter and the `toolbar` content, and export.",
4891
4934
  "default": "true"
4892
4935
  },
4893
4936
  {
@@ -4987,7 +5030,7 @@
4987
5030
  },
4988
5031
  {
4989
5032
  "name": "DataTable.Filters",
4990
- "description": "The filters of the table, in a wrapping row. Children are added after the filters. Selects and date\nranges in the row have a fixed width (`--oui-data-table-filter-width`), so picking a value moves nothing.",
5033
+ "description": "The filters of the table, in a wrapping row. Children are added after the filters. Selects in the row have\na fixed width (`--oui-data-table-filter-width`), and date ranges the width of a full range, so picking a\nvalue moves nothing. A filter's `width` overrides both.",
4991
5034
  "propsType": "DataTableFiltersProps",
4992
5035
  "props": [
4993
5036
  {
@@ -5048,7 +5091,7 @@
5048
5091
  },
5049
5092
  {
5050
5093
  "name": "DataTable.FilterSheet",
5051
- "description": "The phone toolbar's \"Filters (n)\" button, which opens a bottom sheet holding every filter and the\n`children`. Filters apply as they change. The footer keeps a clear button (disabled while no filter\nis set, so nothing moves when one is) and a button that closes the sheet on the result count.",
5094
+ "description": "The phone toolbar's filter button: an icon with the number of active filters, so the search next to it\nkeeps the width. It opens a bottom sheet holding every filter and the `children`. Filters apply as they\nchange. The footer keeps a clear button (disabled while no filter is set, so nothing moves when one is)\nand a button that closes the sheet on the result count.",
5052
5095
  "propsType": "DataTableFilterSheetProps",
5053
5096
  "props": [
5054
5097
  {
@@ -5104,7 +5147,7 @@
5104
5147
  "description": "Class name for the button."
5105
5148
  }
5106
5149
  ],
5107
- "example": "<DataTable.Root table={table}>\n <DataTable.Toolbar>\n <DataTable.Controls>\n <DataTable.Search />\n <DataTable.Filters quick />\n <DataTable.FilterPanel />\n <DataTable.ClearFilters keepSpace />\n </DataTable.Controls>\n </DataTable.Toolbar>\n <DataTable.ActiveFilters />\n <DataTable.Content />\n</DataTable.Root>"
5150
+ "example": "<DataTable.Root table={table}>\n <DataTable.Toolbar>\n <DataTable.Controls>\n <DataTable.Search />\n <DataTable.FilterPanel />\n <DataTable.Filters quick />\n <DataTable.ClearFilters keepSpace />\n </DataTable.Controls>\n </DataTable.Toolbar>\n <DataTable.ActiveFilters />\n <DataTable.Content />\n</DataTable.Root>"
5108
5151
  },
5109
5152
  {
5110
5153
  "name": "DataTable.ActiveFilters",
@@ -5145,13 +5188,37 @@
5145
5188
  }
5146
5189
  ]
5147
5190
  },
5191
+ {
5192
+ "name": "DataTable.ColumnsMenu",
5193
+ "description": "Icon button with a menu of checkboxes that show or hide columns. Columns with `hidden` or\n`hideable: false` are not listed. The choice is in `table.hiddenColumns`; keep it across visits with\n`hiddenColumns` and `onHiddenColumnsChange`.",
5194
+ "propsType": "DataTableColumnsMenuProps",
5195
+ "props": [
5196
+ {
5197
+ "name": "size",
5198
+ "type": "DataTableControlSize",
5199
+ "required": false,
5200
+ "values": [
5201
+ "sm",
5202
+ "md"
5203
+ ],
5204
+ "description": "Height of the button.",
5205
+ "default": "'md'"
5206
+ },
5207
+ {
5208
+ "name": "className",
5209
+ "type": "string",
5210
+ "required": false,
5211
+ "description": "Class name for the button."
5212
+ }
5213
+ ]
5214
+ },
5148
5215
  {
5149
5216
  "name": "DataTable.Loading",
5150
5217
  "description": "Spinner while the table loads. It keeps its space while idle, so nothing moves when it shows."
5151
5218
  },
5152
5219
  {
5153
5220
  "name": "DataTable.Summary",
5154
- "description": "Row count, or the number of selected rows. The default table shows it in the footer."
5221
+ "description": "Matching rows of all rows (`\"3 / 10\"`), or the number of selected rows. In server mode, where the total\nbefore filters is not known, the `count` label. The default table shows it in the footer."
5155
5222
  },
5156
5223
  {
5157
5224
  "name": "DataTable.Content",
@@ -5198,6 +5265,12 @@
5198
5265
  "required": false,
5199
5266
  "description": "Replaces the default empty state."
5200
5267
  },
5268
+ {
5269
+ "name": "selectionActions",
5270
+ "type": "React.ReactNode",
5271
+ "required": false,
5272
+ "description": "Actions on the selected rows (delete, export, assign…). While rows are selected, the header row shows\ntheir count, a button that clears the selection and these actions in place of the column names, at the\nheader's height, so the rows do not move. Buttons in it are made header-sized."
5273
+ },
5201
5274
  {
5202
5275
  "name": "tableProps",
5203
5276
  "type": "Omit<TableProps, 'children'>",
@@ -5404,6 +5477,7 @@
5404
5477
  "required": false,
5405
5478
  "values": [
5406
5479
  "accent",
5480
+ "info",
5407
5481
  "primary",
5408
5482
  "success",
5409
5483
  "warning",
@@ -5455,6 +5529,7 @@
5455
5529
  "required": false,
5456
5530
  "values": [
5457
5531
  "accent",
5532
+ "info",
5458
5533
  "primary",
5459
5534
  "success",
5460
5535
  "warning",
@@ -5630,7 +5705,7 @@
5630
5705
  "name": "wrapperProps",
5631
5706
  "type": "React.HTMLAttributes<HTMLDivElement>",
5632
5707
  "required": false,
5633
- "description": "Props for the horizontally scrolling wrapper."
5708
+ "description": "Props for the horizontally scrolling wrapper. While the table overflows, the wrapper is focusable so keyboard\nusers can scroll it; give it `role=\"region\"` and an `aria-label` (or `aria-labelledby` the caption) so screen\nreaders announce what it is."
5634
5709
  }
5635
5710
  ],
5636
5711
  "extends": [
@@ -6027,6 +6102,24 @@
6027
6102
  "required": false,
6028
6103
  "description": "Called with the selected row ids."
6029
6104
  },
6105
+ {
6106
+ "name": "hiddenColumns",
6107
+ "type": "string[]",
6108
+ "required": false,
6109
+ "description": "Ids of the columns hidden from the columns menu (controlled). Columns with `hidden` stay hidden regardless."
6110
+ },
6111
+ {
6112
+ "name": "defaultHiddenColumns",
6113
+ "type": "string[]",
6114
+ "required": false,
6115
+ "description": "Initial hidden column ids when uncontrolled."
6116
+ },
6117
+ {
6118
+ "name": "onHiddenColumnsChange",
6119
+ "type": "(hiddenColumns: string[]) => void",
6120
+ "required": false,
6121
+ "description": "Called with the hidden column ids when one is shown or hidden; store them to keep the choice."
6122
+ },
6030
6123
  {
6031
6124
  "name": "onRowClick",
6032
6125
  "type": "(row: T) => void",
@@ -6051,6 +6144,18 @@
6051
6144
  "required": false,
6052
6145
  "description": "Tints a row to flag its state."
6053
6146
  },
6147
+ {
6148
+ "name": "rowToneStyle",
6149
+ "type": "DataTableRowToneStyle",
6150
+ "required": false,
6151
+ "values": [
6152
+ "fill",
6153
+ "bar",
6154
+ "both"
6155
+ ],
6156
+ "description": "How `rowTone` shows: `fill` tints the whole row, `bar` draws a 3px bar in the tone on the row's first\ncell, which marks rows without a block of colour and stays in view with `stickyFirstColumn`, and\n`both` tints the row and draws the bar.",
6157
+ "default": "'fill'"
6158
+ },
6054
6159
  {
6055
6160
  "name": "rowProps",
6056
6161
  "type": "(row: T) => React.HTMLAttributes<HTMLTableRowElement> & Record<`data-${string}`, unknown>",
@@ -6115,6 +6220,7 @@
6115
6220
  "CircleIcon",
6116
6221
  "CircleXIcon",
6117
6222
  "ClockIcon",
6223
+ "ColumnsIcon",
6118
6224
  "DownloadIcon",
6119
6225
  "ExternalLinkIcon",
6120
6226
  "EyeIcon",
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
package/dist/fonts.css CHANGED
@@ -1,3 +1,24 @@
1
- /* Optional: loads the default Opti UI typefaces from Google Fonts.
1
+ /* Optional: loads the default Opti UI typefaces. Poppins and Montserrat come from Google Fonts;
2
+ JetBrains Mono (OFL-1.1, see fonts/JetBrainsMono-OFL.txt) ships with the package.
2
3
  Skip this file if your app self-hosts fonts or overrides --oui-font-*. */
3
4
  @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Poppins:wght@400;500;600;700&display=swap');
5
+
6
+ @font-face {
7
+ font-family: 'JetBrains Mono';
8
+ font-style: normal;
9
+ font-display: swap;
10
+ font-weight: 100 800;
11
+ src: url('./fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
12
+ unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
13
+ U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
14
+ }
15
+
16
+ @font-face {
17
+ font-family: 'JetBrains Mono';
18
+ font-style: normal;
19
+ font-display: swap;
20
+ font-weight: 100 800;
21
+ src: url('./fonts/jetbrains-mono-latin.woff2') format('woff2');
22
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
23
+ U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
24
+ }
@@ -143,3 +143,7 @@ export declare const FilterIcon: {
143
143
  ({ size, strokeWidth, ref, ...props }: IconProps): React.JSX.Element;
144
144
  displayName: string;
145
145
  };
146
+ export declare const ColumnsIcon: {
147
+ ({ size, strokeWidth, ref, ...props }: IconProps): React.JSX.Element;
148
+ displayName: string;
149
+ };
@@ -191,7 +191,18 @@ var FilterIcon = createIcon("FilterIcon", /* @__PURE__ */ jsxs(Fragment, { child
191
191
  /* @__PURE__ */ jsx("path", { d: "M7 12h10" }),
192
192
  /* @__PURE__ */ jsx("path", { d: "M10 18h4" })
193
193
  ] }));
194
+ var ColumnsIcon = createIcon("ColumnsIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
195
+ /* @__PURE__ */ jsx("rect", {
196
+ width: "18",
197
+ height: "18",
198
+ x: "3",
199
+ y: "3",
200
+ rx: "2"
201
+ }),
202
+ /* @__PURE__ */ jsx("path", { d: "M9 3v18" }),
203
+ /* @__PURE__ */ jsx("path", { d: "M15 3v18" })
204
+ ] }));
194
205
  //#endregion
195
- export { ArrowDownIcon, ArrowUpIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, CircleCheckIcon, CircleIcon, CircleXIcon, ClockIcon, DownloadIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileIcon, FilterIcon, InfoIcon, LayersIcon, MenuIcon, MinusIcon, MoreHorizontalIcon, PencilIcon, PlusIcon, SearchIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleAlertIcon, UploadIcon, XIcon };
206
+ export { ArrowDownIcon, ArrowUpIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, CircleCheckIcon, CircleIcon, CircleXIcon, ClockIcon, ColumnsIcon, DownloadIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileIcon, FilterIcon, InfoIcon, LayersIcon, MenuIcon, MinusIcon, MoreHorizontalIcon, PencilIcon, PlusIcon, SearchIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleAlertIcon, UploadIcon, XIcon };
196
207
 
197
208
  //# sourceMappingURL=index.js.map