@optimum-intelligence/opti-ui 0.8.1 → 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.
- package/CHANGELOG.md +39 -0
- package/dist/components/calendar/Calendar.js +29 -17
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +4 -1
- package/dist/components/data-table/DataTable.js +20 -16
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableFilters.d.ts +3 -2
- package/dist/components/data-table/DataTableFilters.js +287 -171
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/DataTableRow.js +76 -72
- package/dist/components/data-table/DataTableRow.js.map +1 -1
- package/dist/components/data-table/layout.js +1 -1
- package/dist/components/data-table/layout.js.map +1 -1
- package/dist/components/data-table/types.d.ts +35 -3
- package/dist/components/data-table/useDataTable.d.ts +1 -1
- package/dist/components/data-table/useDataTable.js +312 -299
- package/dist/components/data-table/useDataTable.js.map +1 -1
- package/dist/components/dialog/ConfirmDialog.d.ts +6 -1
- package/dist/components/dialog/ConfirmDialog.js +88 -85
- package/dist/components/dialog/ConfirmDialog.js.map +1 -1
- package/dist/components/table/Table.d.ts +5 -1
- package/dist/components/table/Table.js +2 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components.json +23 -4
- package/dist/fonts/JetBrainsMono-OFL.txt +93 -0
- package/dist/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin.woff2 +0 -0
- package/dist/fonts.css +22 -1
- package/dist/llms-full.txt +8 -4
- package/dist/opti-ui.css +134 -32
- package/dist/utils/scroll-fade.d.ts +5 -1
- package/dist/utils/scroll-fade.js +11 -1
- package/dist/utils/scroll-fade.js.map +1 -1
- package/package.json +1 -1
package/dist/components.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@optimum-intelligence/opti-ui",
|
|
3
|
-
"version": "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",
|
|
@@ -3633,6 +3633,13 @@
|
|
|
3633
3633
|
"description": "The action is running: the confirm button spins and the dialog cannot be closed.",
|
|
3634
3634
|
"default": "false"
|
|
3635
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
|
+
},
|
|
3636
3643
|
{
|
|
3637
3644
|
"name": "error",
|
|
3638
3645
|
"type": "React.ReactNode",
|
|
@@ -5023,7 +5030,7 @@
|
|
|
5023
5030
|
},
|
|
5024
5031
|
{
|
|
5025
5032
|
"name": "DataTable.Filters",
|
|
5026
|
-
"description": "The filters of the table, in a wrapping row. Children are added after the filters. Selects
|
|
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.",
|
|
5027
5034
|
"propsType": "DataTableFiltersProps",
|
|
5028
5035
|
"props": [
|
|
5029
5036
|
{
|
|
@@ -5211,7 +5218,7 @@
|
|
|
5211
5218
|
},
|
|
5212
5219
|
{
|
|
5213
5220
|
"name": "DataTable.Summary",
|
|
5214
|
-
"description": "
|
|
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."
|
|
5215
5222
|
},
|
|
5216
5223
|
{
|
|
5217
5224
|
"name": "DataTable.Content",
|
|
@@ -5698,7 +5705,7 @@
|
|
|
5698
5705
|
"name": "wrapperProps",
|
|
5699
5706
|
"type": "React.HTMLAttributes<HTMLDivElement>",
|
|
5700
5707
|
"required": false,
|
|
5701
|
-
"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."
|
|
5702
5709
|
}
|
|
5703
5710
|
],
|
|
5704
5711
|
"extends": [
|
|
@@ -6137,6 +6144,18 @@
|
|
|
6137
6144
|
"required": false,
|
|
6138
6145
|
"description": "Tints a row to flag its state."
|
|
6139
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
|
+
},
|
|
6140
6159
|
{
|
|
6141
6160
|
"name": "rowProps",
|
|
6142
6161
|
"type": "(row: T) => React.HTMLAttributes<HTMLTableRowElement> & Record<`data-${string}`, unknown>",
|
|
@@ -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.
|
|
Binary file
|
|
Binary file
|
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
|
+
}
|
package/dist/llms-full.txt
CHANGED
|
@@ -1844,6 +1844,7 @@ import { ConfirmDialog } from '@optimum-intelligence/opti-ui';
|
|
|
1844
1844
|
| `onConfirm` | `() => void` | | Called by the confirm button. The dialog stays open; close it when the action succeeds. |
|
|
1845
1845
|
| `destructive?` | `boolean` | `false` | Red confirm button, for actions that delete or cannot be undone. |
|
|
1846
1846
|
| `pending?` | `boolean` | `false` | The action is running: the confirm button spins and the dialog cannot be closed. |
|
|
1847
|
+
| `confirmDisabled?` | `boolean` | `false` | Disables the confirm button, for an action that turns out to be blocked once the dialog is open. Say why in `children` or `error`. |
|
|
1847
1848
|
| `error?` | `React.ReactNode` | | Why the action failed, shown above the buttons. |
|
|
1848
1849
|
| `size?` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Dialog width. |
|
|
1849
1850
|
| `backdropBlur?` | `'none' \| 'sm' \| 'md' \| 'lg'` | | How strongly the page behind the dialog is blurred. |
|
|
@@ -2462,8 +2463,9 @@ Also accepts all props of: `Omit<BaseInput.Props, 'size'>`.
|
|
|
2462
2463
|
|
|
2463
2464
|
### DataTable.Filters
|
|
2464
2465
|
|
|
2465
|
-
The filters of the table, in a wrapping row. Children are added after the filters. Selects
|
|
2466
|
-
|
|
2466
|
+
The filters of the table, in a wrapping row. Children are added after the filters. Selects in the row have
|
|
2467
|
+
a fixed width (`--oui-data-table-filter-width`), and date ranges the width of a full range, so picking a
|
|
2468
|
+
value moves nothing. A filter's `width` overrides both.
|
|
2467
2469
|
|
|
2468
2470
|
| Prop | Type | Default | Description |
|
|
2469
2471
|
| --- | --- | --- | --- |
|
|
@@ -2564,7 +2566,8 @@ Spinner while the table loads. It keeps its space while idle, so nothing moves w
|
|
|
2564
2566
|
|
|
2565
2567
|
### DataTable.Summary
|
|
2566
2568
|
|
|
2567
|
-
|
|
2569
|
+
Matching rows of all rows (`"3 / 10"`), or the number of selected rows. In server mode, where the total
|
|
2570
|
+
before filters is not known, the `count` label. The default table shows it in the footer.
|
|
2568
2571
|
|
|
2569
2572
|
### DataTable.Content
|
|
2570
2573
|
|
|
@@ -2784,7 +2787,7 @@ import { Table } from '@optimum-intelligence/opti-ui';
|
|
|
2784
2787
|
| `striped?` | `boolean` | | Alternating row background. |
|
|
2785
2788
|
| `hoverable?` | `boolean` | `true` | Highlight rows on hover. |
|
|
2786
2789
|
| `stickyHeader?` | `boolean` | | Keep the header visible while the wrapper scrolls (set a max height on it). |
|
|
2787
|
-
| `wrapperProps?` | `React.HTMLAttributes<HTMLDivElement>` | | Props for the horizontally scrolling wrapper. |
|
|
2790
|
+
| `wrapperProps?` | `React.HTMLAttributes<HTMLDivElement>` | | Props for the horizontally scrolling wrapper. While the table overflows, the wrapper is focusable so keyboard users can scroll it; give it `role="region"` and an `aria-label` (or `aria-labelledby` the caption) so screen readers announce what it is. |
|
|
2788
2791
|
|
|
2789
2792
|
Also accepts all props of: `React.TableHTMLAttributes<HTMLTableElement>`.
|
|
2790
2793
|
|
|
@@ -2957,6 +2960,7 @@ import { useDataTable } from '@optimum-intelligence/opti-ui';
|
|
|
2957
2960
|
| `rowLabel?` | `(row: T) => string` | | Accessible name of a row, used by row selection and clickable rows. |
|
|
2958
2961
|
| `rowActions?` | `(row: T) => DataTableRowAction[] \| React.ReactNode` | | Trailing cell of each row: icon buttons, or any content (a menu, a link). |
|
|
2959
2962
|
| `rowTone?` | `(row: T) => DataTableRowTone \| null \| undefined` | | Tints a row to flag its state. |
|
|
2963
|
+
| `rowToneStyle?` | `'fill' \| 'bar' \| 'both'` | `'fill'` | How `rowTone` shows: `fill` tints the whole row, `bar` draws a 3px bar in the tone on the row's first cell, which marks rows without a block of colour and stays in view with `stickyFirstColumn`, and `both` tints the row and draws the bar. |
|
|
2960
2964
|
| `rowProps?` | `(row: T) => React.HTMLAttributes<HTMLTableRowElement> & Record<`data-${string}`, unknown>` | | Extra props for a row's `<tr>` (`className`, `style`, `data-*`). |
|
|
2961
2965
|
| `onRowSave?` | `(row: T, original: T) => void \| Promise<void>` | | Adds an edit action to each row; columns with `edit` turn into inputs. Called with the edited row. Return a promise to keep the row open while it saves; a rejected one leaves it open for another try. |
|
|
2962
2966
|
| `onRowDelete?` | `(row: T) => void` | | Adds a delete action, shown while a row is edited, or on every row without `onRowSave`. |
|
package/dist/opti-ui.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:root {
|
|
5
5
|
--oui-font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
6
6
|
--oui-font-heading: 'Montserrat', 'Poppins', system-ui, sans-serif;
|
|
7
|
-
--oui-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
7
|
+
--oui-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
8
8
|
--oui-font-size-2xs: 0.6875rem;
|
|
9
9
|
--oui-font-size-xs: 0.75rem;
|
|
10
10
|
--oui-font-size-sm: 0.8125rem;
|
|
@@ -2291,7 +2291,7 @@
|
|
|
2291
2291
|
.oui-combobox__group:focus-within {
|
|
2292
2292
|
border-color: var(--oui-color-border-focus);
|
|
2293
2293
|
box-shadow: var(--oui-focus-ring);
|
|
2294
|
-
outline:
|
|
2294
|
+
outline: 2px solid transparent;
|
|
2295
2295
|
}
|
|
2296
2296
|
.oui-combobox__group[data-size=sm] {
|
|
2297
2297
|
--_height: var(--oui-control-height-sm);
|
|
@@ -2403,6 +2403,7 @@
|
|
|
2403
2403
|
}
|
|
2404
2404
|
.oui-combobox__chip:focus-within, .oui-combobox__chip[data-highlighted] {
|
|
2405
2405
|
background: var(--oui-color-accent-strong);
|
|
2406
|
+
outline: 2px solid transparent;
|
|
2406
2407
|
}
|
|
2407
2408
|
.oui-combobox__chip[data-overflow] {
|
|
2408
2409
|
flex-shrink: 0;
|
|
@@ -2528,6 +2529,13 @@
|
|
|
2528
2529
|
background: var(--oui-color-accent-subtle);
|
|
2529
2530
|
color: var(--oui-color-text-strong);
|
|
2530
2531
|
}
|
|
2532
|
+
@media (forced-colors: active) {
|
|
2533
|
+
.oui-combobox__item[data-highlighted] {
|
|
2534
|
+
forced-color-adjust: none;
|
|
2535
|
+
background: Highlight;
|
|
2536
|
+
color: HighlightText;
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2531
2539
|
.oui-combobox__item[data-disabled] {
|
|
2532
2540
|
opacity: var(--oui-control-disabled-opacity);
|
|
2533
2541
|
pointer-events: none;
|
|
@@ -2670,6 +2678,13 @@
|
|
|
2670
2678
|
background: var(--oui-color-accent-subtle);
|
|
2671
2679
|
color: var(--oui-color-text-strong);
|
|
2672
2680
|
}
|
|
2681
|
+
@media (forced-colors: active) {
|
|
2682
|
+
.oui-command__item[data-highlighted] {
|
|
2683
|
+
forced-color-adjust: none;
|
|
2684
|
+
background: Highlight;
|
|
2685
|
+
color: HighlightText;
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2673
2688
|
.oui-command__item[data-disabled] {
|
|
2674
2689
|
opacity: var(--oui-control-disabled-opacity);
|
|
2675
2690
|
pointer-events: none;
|
|
@@ -2746,6 +2761,11 @@
|
|
|
2746
2761
|
font-size: var(--oui-font-size-xs);
|
|
2747
2762
|
}
|
|
2748
2763
|
}
|
|
2764
|
+
@property --_row-tint {
|
|
2765
|
+
syntax: "<color>";
|
|
2766
|
+
inherits: true;
|
|
2767
|
+
initial-value: transparent;
|
|
2768
|
+
}
|
|
2749
2769
|
@layer oui.components {
|
|
2750
2770
|
.oui-data-table {
|
|
2751
2771
|
box-sizing: border-box;
|
|
@@ -2790,6 +2810,9 @@
|
|
|
2790
2810
|
gap: var(--oui-space-4) var(--oui-space-6);
|
|
2791
2811
|
min-width: 0;
|
|
2792
2812
|
}
|
|
2813
|
+
.oui-data-table__controls > .oui-data-table__filters:not([data-stacked]) {
|
|
2814
|
+
display: contents;
|
|
2815
|
+
}
|
|
2793
2816
|
.oui-data-table__toolbar[data-layout=narrow] {
|
|
2794
2817
|
flex-wrap: nowrap;
|
|
2795
2818
|
gap: var(--oui-space-4);
|
|
@@ -2803,8 +2826,8 @@
|
|
|
2803
2826
|
margin-left: auto;
|
|
2804
2827
|
}
|
|
2805
2828
|
.oui-data-table .oui-table__row[data-selecting] > .oui-table__head {
|
|
2806
|
-
--
|
|
2807
|
-
background: linear-gradient(var(--
|
|
2829
|
+
--_row-tint: color-mix(in srgb, var(--oui-color-accent) 8%, transparent);
|
|
2830
|
+
background: linear-gradient(var(--_row-tint), var(--_row-tint)), var(--oui-color-surface);
|
|
2808
2831
|
}
|
|
2809
2832
|
.oui-data-table .oui-table__head.oui-data-table__selection-head {
|
|
2810
2833
|
box-sizing: border-box;
|
|
@@ -2963,15 +2986,14 @@
|
|
|
2963
2986
|
.oui-data-table__filters[data-stacked] .oui-data-table__filter-field > .oui-data-table__filter {
|
|
2964
2987
|
width: 100%;
|
|
2965
2988
|
}
|
|
2966
|
-
.oui-data-table__filters[data-stacked] .oui-select__trigger.oui-data-table__filter {
|
|
2967
|
-
|
|
2989
|
+
.oui-data-table__filters:not([data-stacked]) > .oui-select__trigger.oui-data-table__filter {
|
|
2990
|
+
width: var(--_filter-width, var(--oui-data-table-filter-width, 12rem));
|
|
2968
2991
|
}
|
|
2969
|
-
.oui-data-table__filters[data-stacked] .oui-
|
|
2970
|
-
|
|
2992
|
+
.oui-data-table__filters:not([data-stacked]) > .oui-date-picker.oui-data-table__filter > .oui-date-picker__trigger {
|
|
2993
|
+
width: var(--_filter-width, auto);
|
|
2971
2994
|
}
|
|
2972
2995
|
.oui-data-table__filters:not([data-stacked]) > :is(.oui-select__trigger, .oui-date-picker).oui-data-table__filter {
|
|
2973
2996
|
flex: none;
|
|
2974
|
-
width: var(--oui-data-table-filter-width, 12rem);
|
|
2975
2997
|
}
|
|
2976
2998
|
.oui-data-table__filters:not([data-stacked]) > :is(.oui-select__trigger, .oui-date-picker).oui-data-table__filter .oui-data-table__filter-label {
|
|
2977
2999
|
flex: none;
|
|
@@ -2983,6 +3005,21 @@
|
|
|
2983
3005
|
text-overflow: ellipsis;
|
|
2984
3006
|
white-space: nowrap;
|
|
2985
3007
|
}
|
|
3008
|
+
.oui-select__trigger.oui-data-table__filter {
|
|
3009
|
+
justify-content: flex-start;
|
|
3010
|
+
}
|
|
3011
|
+
.oui-select__trigger.oui-data-table__filter .oui-select__icon {
|
|
3012
|
+
margin-left: auto;
|
|
3013
|
+
}
|
|
3014
|
+
.oui-data-table__range {
|
|
3015
|
+
display: inline-grid;
|
|
3016
|
+
}
|
|
3017
|
+
.oui-data-table__range > * {
|
|
3018
|
+
grid-area: 1/1;
|
|
3019
|
+
}
|
|
3020
|
+
.oui-data-table__range-sizer {
|
|
3021
|
+
visibility: hidden;
|
|
3022
|
+
}
|
|
2986
3023
|
.oui-data-table__filter-field {
|
|
2987
3024
|
display: grid;
|
|
2988
3025
|
gap: var(--oui-space-3);
|
|
@@ -3119,7 +3156,8 @@
|
|
|
3119
3156
|
--_check-width: 2.25rem;
|
|
3120
3157
|
}
|
|
3121
3158
|
.oui-data-table .oui-table[data-sticky-column] .oui-table__row {
|
|
3122
|
-
--
|
|
3159
|
+
--_row-tint: transparent;
|
|
3160
|
+
transition: background-color var(--oui-duration-fast) var(--oui-ease), --_row-tint var(--oui-duration-fast) var(--oui-ease);
|
|
3123
3161
|
}
|
|
3124
3162
|
.oui-data-table .oui-table[data-sticky-column] .oui-table__row > :first-child,
|
|
3125
3163
|
.oui-data-table .oui-table[data-sticky-column] .oui-table__row > .oui-data-table__check + * {
|
|
@@ -3127,7 +3165,7 @@
|
|
|
3127
3165
|
left: 0;
|
|
3128
3166
|
z-index: 1;
|
|
3129
3167
|
background-color: var(--oui-color-surface);
|
|
3130
|
-
background-image: linear-gradient(var(--
|
|
3168
|
+
background-image: linear-gradient(var(--_row-tint), var(--_row-tint));
|
|
3131
3169
|
}
|
|
3132
3170
|
.oui-data-table .oui-table[data-sticky-column] .oui-table__row > .oui-data-table__check + * {
|
|
3133
3171
|
left: var(--_check-width);
|
|
@@ -3140,17 +3178,22 @@
|
|
|
3140
3178
|
z-index: 1;
|
|
3141
3179
|
}
|
|
3142
3180
|
.oui-data-table .oui-table[data-sticky-column][data-striped] .oui-table__body .oui-table__row:nth-child(even) {
|
|
3143
|
-
--
|
|
3181
|
+
--_row-tint: var(--oui-color-surface-muted);
|
|
3144
3182
|
}
|
|
3145
3183
|
.oui-data-table .oui-table[data-sticky-column][data-hoverable] .oui-table__body .oui-table__row:hover {
|
|
3146
|
-
--
|
|
3184
|
+
--_row-tint: var(--oui-color-surface-hover);
|
|
3185
|
+
}
|
|
3186
|
+
.oui-data-table .oui-table[data-sticky-column] .oui-table__row[data-tone-style~=fill]:not([data-selected]) {
|
|
3187
|
+
--_row-tint: var(--_tone-subtle);
|
|
3147
3188
|
}
|
|
3148
|
-
.oui-data-table .oui-table[data-sticky-column] .oui-table__row[data-tone]:not([data-selected]
|
|
3149
|
-
--
|
|
3189
|
+
.oui-data-table .oui-table[data-sticky-column] .oui-table__row[data-tone-style~=fill]:not([data-selected]):hover {
|
|
3190
|
+
--_row-tint: var(--_tone-hover);
|
|
3150
3191
|
}
|
|
3151
|
-
.oui-data-table .oui-table[data-sticky-column] .oui-table__row[data-clickable]:hover,
|
|
3152
3192
|
.oui-data-table .oui-table[data-sticky-column] .oui-table__row:is([data-selected], [data-editing]) {
|
|
3153
|
-
--
|
|
3193
|
+
--_row-tint: var(--oui-color-accent-subtle);
|
|
3194
|
+
}
|
|
3195
|
+
.oui-data-table .oui-table[data-sticky-column] .oui-table__row[data-clickable][data-clickable]:hover:not([data-selected], [data-editing], [data-tone-style~=fill]) {
|
|
3196
|
+
--_row-tint: var(--oui-color-accent-subtle);
|
|
3154
3197
|
}
|
|
3155
3198
|
.oui-data-table .oui-table-wrap:has(> .oui-table[data-sticky-column])[data-fade-start] {
|
|
3156
3199
|
mask-image: none;
|
|
@@ -3169,10 +3212,9 @@
|
|
|
3169
3212
|
mask-image: linear-gradient(to left, transparent, #000 var(--_fade));
|
|
3170
3213
|
}
|
|
3171
3214
|
.oui-data-table .oui-table__row[data-tone] {
|
|
3215
|
+
--_tone: var(--oui-color-accent);
|
|
3172
3216
|
--_tone-subtle: var(--oui-color-accent-subtle);
|
|
3173
|
-
|
|
3174
|
-
.oui-data-table .oui-table__row[data-tone]:not([data-selected], :hover) {
|
|
3175
|
-
background: var(--_tone-subtle);
|
|
3217
|
+
--_tone-hover: color-mix(in oklab, var(--_tone-subtle), var(--_tone) 12%);
|
|
3176
3218
|
}
|
|
3177
3219
|
.oui-data-table .oui-table__row[data-tone][data-tone=info] {
|
|
3178
3220
|
--_tone: var(--oui-color-info);
|
|
@@ -3237,6 +3279,15 @@
|
|
|
3237
3279
|
--_tone-subtle: var(--oui-color-pink-subtle);
|
|
3238
3280
|
--_tone-border: var(--oui-color-pink-border);
|
|
3239
3281
|
}
|
|
3282
|
+
.oui-data-table .oui-table__row[data-tone][data-tone-style~=fill]:not([data-selected]) {
|
|
3283
|
+
background: var(--_tone-subtle);
|
|
3284
|
+
}
|
|
3285
|
+
.oui-data-table .oui-table__row[data-tone][data-tone-style~=fill]:not([data-selected]):hover {
|
|
3286
|
+
background: var(--_tone-hover);
|
|
3287
|
+
}
|
|
3288
|
+
.oui-data-table .oui-table__row[data-tone][data-tone-style~=bar] > :first-child {
|
|
3289
|
+
box-shadow: inset 3px 0 0 var(--_tone);
|
|
3290
|
+
}
|
|
3240
3291
|
.oui-data-table .oui-data-table__row-actions {
|
|
3241
3292
|
width: 1%;
|
|
3242
3293
|
padding-block: 0;
|
|
@@ -3380,7 +3431,7 @@
|
|
|
3380
3431
|
.oui-date-picker__trigger:focus-visible, .oui-date-picker__trigger[data-popup-open] {
|
|
3381
3432
|
border-color: var(--oui-color-border-focus);
|
|
3382
3433
|
box-shadow: var(--oui-focus-ring);
|
|
3383
|
-
outline:
|
|
3434
|
+
outline: 2px solid transparent;
|
|
3384
3435
|
}
|
|
3385
3436
|
.oui-date-picker__trigger[data-placeholder] .oui-date-picker__value {
|
|
3386
3437
|
color: var(--oui-color-text-subtle);
|
|
@@ -3481,6 +3532,13 @@
|
|
|
3481
3532
|
background: var(--oui-color-accent-subtle);
|
|
3482
3533
|
color: var(--oui-color-text-strong);
|
|
3483
3534
|
}
|
|
3535
|
+
@media (forced-colors: active) {
|
|
3536
|
+
.oui-date-range-picker__preset[data-highlighted] {
|
|
3537
|
+
forced-color-adjust: none;
|
|
3538
|
+
background: Highlight;
|
|
3539
|
+
color: HighlightText;
|
|
3540
|
+
}
|
|
3541
|
+
}
|
|
3484
3542
|
.oui-date-range-picker__preset[data-disabled] {
|
|
3485
3543
|
opacity: var(--oui-control-disabled-opacity);
|
|
3486
3544
|
pointer-events: none;
|
|
@@ -4082,7 +4140,7 @@
|
|
|
4082
4140
|
.oui-dropzone:has(.oui-dropzone__input:focus-visible) {
|
|
4083
4141
|
border-color: var(--oui-color-border-focus);
|
|
4084
4142
|
box-shadow: var(--oui-focus-ring);
|
|
4085
|
-
outline:
|
|
4143
|
+
outline: 2px solid transparent;
|
|
4086
4144
|
}
|
|
4087
4145
|
.oui-dropzone[data-dragging] {
|
|
4088
4146
|
border-color: var(--oui-color-accent);
|
|
@@ -4253,7 +4311,7 @@
|
|
|
4253
4311
|
.oui-input:focus, .oui-input[data-focused] {
|
|
4254
4312
|
border-color: var(--oui-color-border-focus);
|
|
4255
4313
|
box-shadow: var(--oui-focus-ring);
|
|
4256
|
-
outline:
|
|
4314
|
+
outline: 2px solid transparent;
|
|
4257
4315
|
}
|
|
4258
4316
|
.oui-input[data-invalid]:focus {
|
|
4259
4317
|
border-color: var(--oui-color-danger);
|
|
@@ -4331,7 +4389,7 @@
|
|
|
4331
4389
|
.oui-input-group:focus-within {
|
|
4332
4390
|
border-color: var(--oui-color-border-focus);
|
|
4333
4391
|
box-shadow: var(--oui-focus-ring);
|
|
4334
|
-
outline:
|
|
4392
|
+
outline: 2px solid transparent;
|
|
4335
4393
|
}
|
|
4336
4394
|
.oui-input-group:has([data-invalid]) {
|
|
4337
4395
|
border-color: var(--oui-color-danger);
|
|
@@ -4943,6 +5001,13 @@
|
|
|
4943
5001
|
background: var(--oui-color-accent-subtle);
|
|
4944
5002
|
color: var(--oui-color-text-strong);
|
|
4945
5003
|
}
|
|
5004
|
+
@media (forced-colors: active) {
|
|
5005
|
+
.oui-menu__item[data-highlighted] {
|
|
5006
|
+
forced-color-adjust: none;
|
|
5007
|
+
background: Highlight;
|
|
5008
|
+
color: HighlightText;
|
|
5009
|
+
}
|
|
5010
|
+
}
|
|
4946
5011
|
.oui-menu__item[data-disabled] {
|
|
4947
5012
|
opacity: var(--oui-control-disabled-opacity);
|
|
4948
5013
|
pointer-events: none;
|
|
@@ -5065,7 +5130,7 @@
|
|
|
5065
5130
|
.oui-number-field__group:focus-within {
|
|
5066
5131
|
border-color: var(--oui-color-border-focus);
|
|
5067
5132
|
box-shadow: var(--oui-focus-ring);
|
|
5068
|
-
outline:
|
|
5133
|
+
outline: 2px solid transparent;
|
|
5069
5134
|
}
|
|
5070
5135
|
.oui-number-field__group[data-size=sm] {
|
|
5071
5136
|
--_height: var(--oui-control-height-sm);
|
|
@@ -5436,6 +5501,11 @@
|
|
|
5436
5501
|
border-radius: var(--oui-radius-pill);
|
|
5437
5502
|
background: color-mix(in srgb, var(--_tone) 16%, transparent);
|
|
5438
5503
|
}
|
|
5504
|
+
@media (forced-colors: active) {
|
|
5505
|
+
.oui-progress__track {
|
|
5506
|
+
border: 1px solid CanvasText;
|
|
5507
|
+
}
|
|
5508
|
+
}
|
|
5439
5509
|
.oui-progress__indicator {
|
|
5440
5510
|
display: block;
|
|
5441
5511
|
height: 100%;
|
|
@@ -5443,15 +5513,19 @@
|
|
|
5443
5513
|
background: var(--_tone);
|
|
5444
5514
|
transition: width var(--oui-duration-slow) var(--oui-ease-out);
|
|
5445
5515
|
}
|
|
5516
|
+
@media (forced-colors: active) {
|
|
5517
|
+
.oui-progress__indicator {
|
|
5518
|
+
forced-color-adjust: none;
|
|
5519
|
+
background: CanvasText;
|
|
5520
|
+
}
|
|
5521
|
+
}
|
|
5446
5522
|
.oui-progress__indicator[data-indeterminate] {
|
|
5447
5523
|
width: 35% !important;
|
|
5448
5524
|
animation: oui-indeterminate 1.3s ease-in-out infinite;
|
|
5449
5525
|
}
|
|
5450
5526
|
@media (prefers-reduced-motion: reduce) {
|
|
5451
5527
|
.oui-progress__indicator[data-indeterminate] {
|
|
5452
|
-
|
|
5453
|
-
animation-duration: 0.01ms !important;
|
|
5454
|
-
animation-iteration-count: 1 !important;
|
|
5528
|
+
animation-duration: 4s;
|
|
5455
5529
|
}
|
|
5456
5530
|
}
|
|
5457
5531
|
@keyframes oui-indeterminate {
|
|
@@ -5546,7 +5620,7 @@
|
|
|
5546
5620
|
.oui-select__trigger:focus-visible {
|
|
5547
5621
|
border-color: var(--oui-color-border-focus);
|
|
5548
5622
|
box-shadow: var(--oui-focus-ring);
|
|
5549
|
-
outline:
|
|
5623
|
+
outline: 2px solid transparent;
|
|
5550
5624
|
}
|
|
5551
5625
|
.oui-select__trigger[data-popup-open] {
|
|
5552
5626
|
border-color: var(--oui-color-accent);
|
|
@@ -5670,6 +5744,13 @@
|
|
|
5670
5744
|
background: var(--oui-color-accent-subtle);
|
|
5671
5745
|
color: var(--oui-color-text-strong);
|
|
5672
5746
|
}
|
|
5747
|
+
@media (forced-colors: active) {
|
|
5748
|
+
.oui-select__item[data-highlighted] {
|
|
5749
|
+
forced-color-adjust: none;
|
|
5750
|
+
background: Highlight;
|
|
5751
|
+
color: HighlightText;
|
|
5752
|
+
}
|
|
5753
|
+
}
|
|
5673
5754
|
.oui-select__item[data-disabled] {
|
|
5674
5755
|
opacity: var(--oui-control-disabled-opacity);
|
|
5675
5756
|
pointer-events: none;
|
|
@@ -5801,10 +5882,21 @@
|
|
|
5801
5882
|
border-radius: var(--oui-radius-pill);
|
|
5802
5883
|
background: var(--oui-color-accent-muted);
|
|
5803
5884
|
}
|
|
5885
|
+
@media (forced-colors: active) {
|
|
5886
|
+
.oui-slider__track {
|
|
5887
|
+
border: 1px solid CanvasText;
|
|
5888
|
+
}
|
|
5889
|
+
}
|
|
5804
5890
|
.oui-slider__indicator {
|
|
5805
5891
|
border-radius: inherit;
|
|
5806
5892
|
background: var(--oui-color-accent-fill);
|
|
5807
5893
|
}
|
|
5894
|
+
@media (forced-colors: active) {
|
|
5895
|
+
.oui-slider__indicator {
|
|
5896
|
+
forced-color-adjust: none;
|
|
5897
|
+
background: CanvasText;
|
|
5898
|
+
}
|
|
5899
|
+
}
|
|
5808
5900
|
.oui-slider__thumb {
|
|
5809
5901
|
--_size: var(--oui-slider-thumb-size, 1.15rem);
|
|
5810
5902
|
width: var(--_size);
|
|
@@ -5847,9 +5939,14 @@
|
|
|
5847
5939
|
}
|
|
5848
5940
|
@media (prefers-reduced-motion: reduce) {
|
|
5849
5941
|
.oui-spinner {
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5942
|
+
animation-duration: 3s;
|
|
5943
|
+
}
|
|
5944
|
+
}
|
|
5945
|
+
@media (forced-colors: active) {
|
|
5946
|
+
.oui-spinner {
|
|
5947
|
+
forced-color-adjust: none;
|
|
5948
|
+
border-color: GrayText;
|
|
5949
|
+
border-top-color: CanvasText;
|
|
5853
5950
|
}
|
|
5854
5951
|
}
|
|
5855
5952
|
@keyframes oui-spin {
|
|
@@ -6250,6 +6347,10 @@
|
|
|
6250
6347
|
.oui-table-wrap[data-fade-start][data-fade-end] {
|
|
6251
6348
|
mask-image: linear-gradient(to right, transparent, #000 var(--_fade), #000 calc(100% - var(--_fade)), transparent);
|
|
6252
6349
|
}
|
|
6350
|
+
.oui-table-wrap:focus-visible {
|
|
6351
|
+
outline: var(--oui-focus-outline);
|
|
6352
|
+
outline-offset: -2px;
|
|
6353
|
+
}
|
|
6253
6354
|
.oui-table {
|
|
6254
6355
|
box-sizing: border-box;
|
|
6255
6356
|
margin: 0;
|
|
@@ -6407,6 +6508,7 @@
|
|
|
6407
6508
|
overflow-x: auto;
|
|
6408
6509
|
overscroll-behavior-x: contain;
|
|
6409
6510
|
scrollbar-width: none;
|
|
6511
|
+
scroll-padding-inline: 1.5rem;
|
|
6410
6512
|
--_fade: 1.5rem;
|
|
6411
6513
|
}
|
|
6412
6514
|
.oui-tabs__list[data-fade-start] {
|
|
@@ -3,7 +3,11 @@ import type * as React from 'react';
|
|
|
3
3
|
* Callback ref for a sideways-scrolling element: sets `data-fade-start` and
|
|
4
4
|
* `data-fade-end` while content is cut off on that side, so CSS can fade the edge.
|
|
5
5
|
* Returns the cleanup that React 19 runs when the element goes away.
|
|
6
|
+
*
|
|
7
|
+
* With `focusable`, the element also gets `tabindex="0"` while it overflows, so keyboard users can scroll it
|
|
8
|
+
* when it holds nothing focusable (Safari does not make scrollers focusable on its own). A `tabindex` set by
|
|
9
|
+
* the caller is left alone.
|
|
6
10
|
*/
|
|
7
|
-
export declare function scrollFade(node: HTMLElement | null): (() => void) | undefined;
|
|
11
|
+
export declare function scrollFade(node: HTMLElement | null, focusable?: boolean): (() => void) | undefined;
|
|
8
12
|
/** Combines refs (objects, or callbacks with or without a cleanup) into one callback ref. */
|
|
9
13
|
export declare function mergeRefs<T>(...refs: (React.Ref<T> | ((node: T | null) => void | (() => void)) | undefined)[]): (node: T | null) => () => void;
|
|
@@ -4,14 +4,23 @@
|
|
|
4
4
|
* Callback ref for a sideways-scrolling element: sets `data-fade-start` and
|
|
5
5
|
* `data-fade-end` while content is cut off on that side, so CSS can fade the edge.
|
|
6
6
|
* Returns the cleanup that React 19 runs when the element goes away.
|
|
7
|
+
*
|
|
8
|
+
* With `focusable`, the element also gets `tabindex="0"` while it overflows, so keyboard users can scroll it
|
|
9
|
+
* when it holds nothing focusable (Safari does not make scrollers focusable on its own). A `tabindex` set by
|
|
10
|
+
* the caller is left alone.
|
|
7
11
|
*/
|
|
8
|
-
function scrollFade(node) {
|
|
12
|
+
function scrollFade(node, focusable = false) {
|
|
9
13
|
if (!node) return;
|
|
14
|
+
const manageTabIndex = focusable && !node.hasAttribute("tabindex");
|
|
10
15
|
const update = () => {
|
|
11
16
|
const offset = Math.abs(node.scrollLeft);
|
|
12
17
|
const hidden = node.scrollWidth - node.clientWidth;
|
|
13
18
|
node.toggleAttribute("data-fade-start", offset > 1);
|
|
14
19
|
node.toggleAttribute("data-fade-end", hidden - offset > 1);
|
|
20
|
+
if (manageTabIndex) {
|
|
21
|
+
if (hidden > 1 || node.scrollHeight - node.clientHeight > 1) node.setAttribute("tabindex", "0");
|
|
22
|
+
else node.removeAttribute("tabindex");
|
|
23
|
+
}
|
|
15
24
|
};
|
|
16
25
|
const resize = new ResizeObserver(update);
|
|
17
26
|
resize.observe(node);
|
|
@@ -21,6 +30,7 @@ function scrollFade(node) {
|
|
|
21
30
|
return () => {
|
|
22
31
|
resize.disconnect();
|
|
23
32
|
node.removeEventListener("scroll", update);
|
|
33
|
+
if (manageTabIndex) node.removeAttribute("tabindex");
|
|
24
34
|
};
|
|
25
35
|
}
|
|
26
36
|
/** Combines refs (objects, or callbacks with or without a cleanup) into one callback ref. */
|