@duro-app/ui 5.6.0 → 5.8.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/dist/{Table-B1sWL3GA.js → Table-CAjPFgTX.js} +398 -394
- package/dist/Table-CAjPFgTX.js.map +1 -0
- package/dist/{compiler-runtime-B2IcI8_O.js → compiler-runtime-BuugS4D0.js} +67 -59
- package/dist/{compiler-runtime-B2IcI8_O.js.map → compiler-runtime-BuugS4D0.js.map} +1 -1
- package/dist/components/AppShell/AppShell.d.ts +74 -0
- package/dist/components/AppShell/AppShell.d.ts.map +1 -0
- package/dist/components/AppShell/AppShell.meta.d.ts +3 -0
- package/dist/components/AppShell/AppShell.meta.d.ts.map +1 -0
- package/dist/components/AppShell/AppShell.stories.d.ts +186 -0
- package/dist/components/AppShell/AppShell.stories.d.ts.map +1 -0
- package/dist/components/AppShell/styles.css.d.ts +187 -0
- package/dist/components/AppShell/styles.css.d.ts.map +1 -0
- package/dist/components/Aside/Aside.d.ts +23 -0
- package/dist/components/Aside/Aside.d.ts.map +1 -0
- package/dist/components/Aside/Aside.meta.d.ts +3 -0
- package/dist/components/Aside/Aside.meta.d.ts.map +1 -0
- package/dist/components/Aside/Aside.stories.d.ts +45 -0
- package/dist/components/Aside/Aside.stories.d.ts.map +1 -0
- package/dist/components/Aside/styles.css.d.ts +44 -0
- package/dist/components/Aside/styles.css.d.ts.map +1 -0
- package/dist/components/Button/styles.css.d.ts +2 -0
- package/dist/components/Button/styles.css.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +3 -3
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.d.ts +29 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/dist/components/CodeBlock/CodeBlock.meta.d.ts +3 -0
- package/dist/components/CodeBlock/CodeBlock.meta.d.ts.map +1 -0
- package/dist/components/CodeBlock/CodeBlock.stories.d.ts +67 -0
- package/dist/components/CodeBlock/CodeBlock.stories.d.ts.map +1 -0
- package/dist/components/CodeBlock/styles.css.d.ts +32 -0
- package/dist/components/CodeBlock/styles.css.d.ts.map +1 -0
- package/dist/components/DragDrop/DragDrop.d.ts +95 -14
- package/dist/components/DragDrop/DragDrop.d.ts.map +1 -1
- package/dist/components/DragDrop/DragDrop.meta.d.ts.map +1 -1
- package/dist/components/DragDrop/DragDropBoard.stories.d.ts +69 -0
- package/dist/components/DragDrop/DragDropBoard.stories.d.ts.map +1 -0
- package/dist/components/DragDrop/styles.css.d.ts +80 -3
- package/dist/components/DragDrop/styles.css.d.ts.map +1 -1
- package/dist/components/Grid/Grid.d.ts +13 -4
- package/dist/components/Grid/Grid.d.ts.map +1 -1
- package/dist/components/Grid/Grid.meta.d.ts.map +1 -1
- package/dist/components/Grid/Grid.stories.d.ts +28 -0
- package/dist/components/Grid/Grid.stories.d.ts.map +1 -1
- package/dist/components/Grid/styles.css.d.ts +3 -0
- package/dist/components/Grid/styles.css.d.ts.map +1 -1
- package/dist/components/Heading/Heading.d.ts +3 -1
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.stories.d.ts +9 -0
- package/dist/components/Heading/Heading.stories.d.ts.map +1 -0
- package/dist/components/LinkButton/LinkButton.stories.d.ts +7 -0
- package/dist/components/LinkButton/LinkButton.stories.d.ts.map +1 -1
- package/dist/components/LinkButton/styles.css.d.ts +2 -0
- package/dist/components/LinkButton/styles.css.d.ts.map +1 -1
- package/dist/components/LiveRegion/LiveRegion.d.ts +28 -0
- package/dist/components/LiveRegion/LiveRegion.d.ts.map +1 -0
- package/dist/components/LiveRegion/LiveRegion.meta.d.ts +3 -0
- package/dist/components/LiveRegion/LiveRegion.meta.d.ts.map +1 -0
- package/dist/components/LiveRegion/LiveRegion.stories.d.ts +66 -0
- package/dist/components/LiveRegion/LiveRegion.stories.d.ts.map +1 -0
- package/dist/components/Menu/Menu.stories.d.ts +7 -0
- package/dist/components/Menu/Menu.stories.d.ts.map +1 -1
- package/dist/components/Menu/styles.css.d.ts +2 -0
- package/dist/components/Menu/styles.css.d.ts.map +1 -1
- package/dist/components/Meter/Meter.d.ts +17 -0
- package/dist/components/Meter/Meter.d.ts.map +1 -0
- package/dist/components/Meter/Meter.meta.d.ts +3 -0
- package/dist/components/Meter/Meter.meta.d.ts.map +1 -0
- package/dist/components/Meter/Meter.stories.d.ts +12 -0
- package/dist/components/Meter/Meter.stories.d.ts.map +1 -0
- package/dist/components/Meter/styles.css.d.ts +34 -0
- package/dist/components/Meter/styles.css.d.ts.map +1 -0
- package/dist/components/PageNav/styles.css.d.ts +1 -1
- package/dist/components/Prose/Prose.d.ts +17 -0
- package/dist/components/Prose/Prose.d.ts.map +1 -0
- package/dist/components/Prose/Prose.meta.d.ts +3 -0
- package/dist/components/Prose/Prose.meta.d.ts.map +1 -0
- package/dist/components/Prose/Prose.stories.d.ts +63 -0
- package/dist/components/Prose/Prose.stories.d.ts.map +1 -0
- package/dist/components/SideNav/SideNav.d.ts +7 -1
- package/dist/components/SideNav/SideNav.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.stories.d.ts +3 -0
- package/dist/components/SideNav/SideNav.stories.d.ts.map +1 -1
- package/dist/components/Time/Time.d.ts +26 -0
- package/dist/components/Time/Time.d.ts.map +1 -0
- package/dist/components/Time/Time.meta.d.ts +3 -0
- package/dist/components/Time/Time.meta.d.ts.map +1 -0
- package/dist/components/Time/Time.stories.d.ts +77 -0
- package/dist/components/Time/Time.stories.d.ts.map +1 -0
- package/dist/components/Time/relative.d.ts +27 -0
- package/dist/components/Time/relative.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.d.ts +71 -0
- package/dist/components/Timeline/Timeline.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.meta.d.ts +3 -0
- package/dist/components/Timeline/Timeline.meta.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.stories.d.ts +26 -0
- package/dist/components/Timeline/Timeline.stories.d.ts.map +1 -0
- package/dist/components/Timeline/styles.css.d.ts +158 -0
- package/dist/components/Timeline/styles.css.d.ts.map +1 -0
- package/dist/components/Toast/Toast.meta.d.ts.map +1 -1
- package/dist/components/Toast/Toast.stories.d.ts +9 -0
- package/dist/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/components/Toast/ToastProvider.d.ts +11 -5
- package/dist/components/Toast/ToastProvider.d.ts.map +1 -1
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toast/styles.css.d.ts +6 -0
- package/dist/components/Toast/styles.css.d.ts.map +1 -1
- package/dist/form.js +1 -1
- package/dist/hooks/useContainerBelow.d.ts +18 -0
- package/dist/hooks/useContainerBelow.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +13 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7316 -5536
- package/dist/index.js.map +1 -1
- package/dist/table.js +2 -2
- package/package.json +2 -2
- package/src/components/AppShell/AppShell.meta.ts +62 -0
- package/src/components/AppShell/AppShell.stories.tsx +770 -0
- package/src/components/AppShell/AppShell.tsx +346 -0
- package/src/components/AppShell/styles.css.ts +219 -0
- package/src/components/Aside/Aside.meta.ts +33 -0
- package/src/components/Aside/Aside.stories.tsx +106 -0
- package/src/components/Aside/Aside.tsx +42 -0
- package/src/components/Aside/styles.css.ts +60 -0
- package/src/components/Button/styles.css.ts +7 -2
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +4 -5
- package/src/components/CodeBlock/CodeBlock.meta.ts +29 -0
- package/src/components/CodeBlock/CodeBlock.stories.tsx +162 -0
- package/src/components/CodeBlock/CodeBlock.tsx +99 -0
- package/src/components/CodeBlock/styles.css.ts +36 -0
- package/src/components/DragDrop/DragDrop.meta.ts +22 -21
- package/src/components/DragDrop/DragDrop.tsx +1147 -246
- package/src/components/DragDrop/DragDropBoard.stories.tsx +668 -0
- package/src/components/DragDrop/styles.css.ts +74 -4
- package/src/components/Grid/Grid.meta.ts +2 -1
- package/src/components/Grid/Grid.stories.tsx +202 -3
- package/src/components/Grid/Grid.tsx +35 -6
- package/src/components/Grid/styles.css.ts +11 -0
- package/src/components/Heading/Heading.stories.tsx +51 -0
- package/src/components/Heading/Heading.tsx +38 -7
- package/src/components/LinkButton/LinkButton.stories.tsx +41 -1
- package/src/components/LinkButton/styles.css.ts +6 -2
- package/src/components/LiveRegion/LiveRegion.meta.ts +29 -0
- package/src/components/LiveRegion/LiveRegion.stories.tsx +139 -0
- package/src/components/LiveRegion/LiveRegion.tsx +48 -0
- package/src/components/Menu/Menu.stories.tsx +62 -0
- package/src/components/Menu/styles.css.ts +6 -3
- package/src/components/Meter/Meter.meta.ts +24 -0
- package/src/components/Meter/Meter.stories.tsx +64 -0
- package/src/components/Meter/Meter.tsx +55 -0
- package/src/components/Meter/styles.css.ts +30 -0
- package/src/components/Prose/Prose.meta.ts +32 -0
- package/src/components/Prose/Prose.stories.tsx +233 -0
- package/src/components/Prose/Prose.tsx +25 -0
- package/src/components/Prose/prose.css +177 -0
- package/src/components/SideNav/SideNav.stories.tsx +29 -0
- package/src/components/SideNav/SideNav.tsx +14 -2
- package/src/components/Time/Time.meta.ts +17 -0
- package/src/components/Time/Time.stories.tsx +173 -0
- package/src/components/Time/Time.tsx +33 -0
- package/src/components/Time/relative.ts +89 -0
- package/src/components/Timeline/Timeline.meta.ts +46 -0
- package/src/components/Timeline/Timeline.stories.tsx +238 -0
- package/src/components/Timeline/Timeline.tsx +332 -0
- package/src/components/Timeline/styles.css.ts +162 -0
- package/src/components/Toast/Toast.meta.ts +2 -1
- package/src/components/Toast/Toast.stories.tsx +84 -0
- package/src/components/Toast/ToastProvider.tsx +49 -11
- package/src/components/Toast/index.ts +7 -1
- package/src/components/Toast/styles.css.ts +2 -0
- package/src/hooks/useContainerBelow.ts +39 -0
- package/src/index.ts +29 -1
- package/src/strict.css +4 -1
- package/dist/Table-B1sWL3GA.js.map +0 -1
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
useEffect,
|
|
6
6
|
useMemo,
|
|
7
7
|
useRef,
|
|
8
|
+
useState,
|
|
8
9
|
useSyncExternalStore,
|
|
9
10
|
type ReactNode,
|
|
10
11
|
} from 'react'
|
|
@@ -14,7 +15,7 @@ import {Icon, type IconName} from '../Icon'
|
|
|
14
15
|
import {usePortalMount} from '../ThemeProvider/ThemeProvider'
|
|
15
16
|
import {styles} from './styles.css'
|
|
16
17
|
|
|
17
|
-
export type ToastVariant = 'success' | 'error' | 'info'
|
|
18
|
+
export type ToastVariant = 'success' | 'error' | 'info' | 'warning'
|
|
18
19
|
|
|
19
20
|
export interface ToastAction {
|
|
20
21
|
label: string
|
|
@@ -22,12 +23,14 @@ export interface ToastAction {
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export interface ToastOptions {
|
|
25
|
-
/** Visual + semantic tone. Errors announce assertively and
|
|
26
|
+
/** Visual + semantic tone. Errors announce assertively; errors and
|
|
27
|
+
* warnings linger longer. */
|
|
26
28
|
variant?: ToastVariant
|
|
27
29
|
message: ReactNode
|
|
28
30
|
/** Optional single action, e.g. Undo. Runs, then dismisses the toast. */
|
|
29
31
|
action?: ToastAction
|
|
30
|
-
/** Auto-dismiss delay in ms. `0` (or negative) keeps it until dismissed.
|
|
32
|
+
/** Auto-dismiss delay in ms. `0` (or negative) keeps it until dismissed.
|
|
33
|
+
* The countdown pauses while the toast is hovered or holds focus. */
|
|
31
34
|
duration?: number
|
|
32
35
|
}
|
|
33
36
|
|
|
@@ -56,6 +59,7 @@ const DEFAULT_DURATION: Record<ToastVariant, number> = {
|
|
|
56
59
|
success: 5000,
|
|
57
60
|
info: 5000,
|
|
58
61
|
error: 8000,
|
|
62
|
+
warning: 8000,
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
function createToastStore(): ToastStore {
|
|
@@ -92,11 +96,13 @@ const variantIcon: Record<ToastVariant, IconName> = {
|
|
|
92
96
|
success: 'check-circle-filled',
|
|
93
97
|
error: 'x-circle-filled',
|
|
94
98
|
info: 'info-circle-filled',
|
|
99
|
+
warning: 'alert-triangle-filled',
|
|
95
100
|
}
|
|
96
101
|
const variantIconStyle = {
|
|
97
102
|
success: styles.iconSuccess,
|
|
98
103
|
error: styles.iconError,
|
|
99
104
|
info: styles.iconInfo,
|
|
105
|
+
warning: styles.iconWarning,
|
|
100
106
|
} as const
|
|
101
107
|
|
|
102
108
|
const ToastContext = createContext<ToastContextValue | null>(null)
|
|
@@ -107,20 +113,45 @@ export function useToast(): ToastContextValue {
|
|
|
107
113
|
return ctx
|
|
108
114
|
}
|
|
109
115
|
|
|
110
|
-
function ToastItem({
|
|
116
|
+
function ToastItem({
|
|
117
|
+
entry,
|
|
118
|
+
onDismiss,
|
|
119
|
+
dismissLabel,
|
|
120
|
+
}: {
|
|
121
|
+
entry: ToastEntry
|
|
122
|
+
onDismiss: (id: string) => void
|
|
123
|
+
dismissLabel: string
|
|
124
|
+
}) {
|
|
111
125
|
const {id, variant, message, action, duration} = entry
|
|
126
|
+
const [hovered, setHovered] = useState(false)
|
|
127
|
+
const [focused, setFocused] = useState(false)
|
|
128
|
+
const paused = hovered || focused
|
|
129
|
+
// What is left of the countdown; a pause keeps it, a resume restarts the
|
|
130
|
+
// timer with what was left (WCAG 2.2.1: the reader controls the timing).
|
|
131
|
+
const remaining = useRef(duration)
|
|
112
132
|
|
|
113
133
|
useEffect(() => {
|
|
114
|
-
if (duration <= 0) return
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
134
|
+
if (duration <= 0 || paused) return
|
|
135
|
+
const started = Date.now()
|
|
136
|
+
const timer = setTimeout(() => onDismiss(id), Math.max(remaining.current, 0))
|
|
137
|
+
return () => {
|
|
138
|
+
clearTimeout(timer)
|
|
139
|
+
remaining.current -= Date.now() - started
|
|
140
|
+
}
|
|
141
|
+
}, [id, duration, paused, onDismiss])
|
|
118
142
|
|
|
119
143
|
return (
|
|
120
144
|
<html.div
|
|
121
145
|
role={variant === 'error' ? 'alert' : 'status'}
|
|
122
146
|
aria-live={variant === 'error' ? 'assertive' : 'polite'}
|
|
123
147
|
style={[styles.toast, styles[variant]]}
|
|
148
|
+
onPointerEnter={() => setHovered(true)}
|
|
149
|
+
onPointerLeave={() => setHovered(false)}
|
|
150
|
+
onFocus={() => setFocused(true)}
|
|
151
|
+
onBlur={(e: {currentTarget: HTMLElement; relatedTarget: EventTarget | null}) => {
|
|
152
|
+
// Focus moving between the toast's own buttons keeps it paused.
|
|
153
|
+
if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setFocused(false)
|
|
154
|
+
}}
|
|
124
155
|
>
|
|
125
156
|
<html.div style={[styles.iconWrap, variantIconStyle[variant]]}>
|
|
126
157
|
<Icon name={variantIcon[variant]} size="md" />
|
|
@@ -142,7 +173,7 @@ function ToastItem({entry, onDismiss}: {entry: ToastEntry; onDismiss: (id: strin
|
|
|
142
173
|
</html.div>
|
|
143
174
|
<html.button
|
|
144
175
|
type="button"
|
|
145
|
-
aria-label=
|
|
176
|
+
aria-label={dismissLabel}
|
|
146
177
|
style={styles.closeBtn}
|
|
147
178
|
onClick={() => onDismiss(id)}
|
|
148
179
|
>
|
|
@@ -152,7 +183,14 @@ function ToastItem({entry, onDismiss}: {entry: ToastEntry; onDismiss: (id: strin
|
|
|
152
183
|
)
|
|
153
184
|
}
|
|
154
185
|
|
|
155
|
-
export
|
|
186
|
+
export interface ToastProviderProps {
|
|
187
|
+
/** Accessible name of each toast's close button, e.g. from the app's
|
|
188
|
+
* message catalog. */
|
|
189
|
+
dismissLabel?: string
|
|
190
|
+
children: ReactNode
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export function ToastProvider({dismissLabel = 'Dismiss', children}: ToastProviderProps) {
|
|
156
194
|
const storeRef = useRef<ToastStore>(null)
|
|
157
195
|
if (storeRef.current === null) {
|
|
158
196
|
storeRef.current = createToastStore()
|
|
@@ -175,7 +213,7 @@ export function ToastProvider({children}: {children: ReactNode}) {
|
|
|
175
213
|
const region = (
|
|
176
214
|
<html.div role="region" aria-label="Notifications" style={styles.region}>
|
|
177
215
|
{entries.map((entry) => (
|
|
178
|
-
<ToastItem key={entry.id} entry={entry} onDismiss={dismiss} />
|
|
216
|
+
<ToastItem key={entry.id} entry={entry} onDismiss={dismiss} dismissLabel={dismissLabel} />
|
|
179
217
|
))}
|
|
180
218
|
</html.div>
|
|
181
219
|
)
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export {ToastProvider, useToast} from './ToastProvider'
|
|
2
|
-
export type {
|
|
2
|
+
export type {
|
|
3
|
+
ToastVariant,
|
|
4
|
+
ToastOptions,
|
|
5
|
+
ToastAction,
|
|
6
|
+
ToastContextValue,
|
|
7
|
+
ToastProviderProps,
|
|
8
|
+
} from './ToastProvider'
|
|
@@ -62,6 +62,7 @@ export const styles = css.create({
|
|
|
62
62
|
success: {borderLeftColor: colors.successBorder},
|
|
63
63
|
error: {borderLeftColor: colors.errorBorder},
|
|
64
64
|
info: {borderLeftColor: colors.infoBorder},
|
|
65
|
+
warning: {borderLeftColor: colors.warningBorder},
|
|
65
66
|
|
|
66
67
|
iconWrap: {
|
|
67
68
|
flexShrink: 0,
|
|
@@ -73,6 +74,7 @@ export const styles = css.create({
|
|
|
73
74
|
iconSuccess: {color: colors.successText},
|
|
74
75
|
iconError: {color: colors.errorText},
|
|
75
76
|
iconInfo: {color: colors.infoText},
|
|
77
|
+
iconWarning: {color: colors.warningText},
|
|
76
78
|
|
|
77
79
|
content: {
|
|
78
80
|
flex: 1,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {useEffect, useState, type RefObject} from 'react'
|
|
2
|
+
import {breakpointsPx, type Breakpoint} from '@duro-app/tokens/tokens/breakpoints.css'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Whether the element behind `ref` is narrower than a Duro breakpoint — its
|
|
6
|
+
* own width, as a container query sees it, not the window's. For the choices
|
|
7
|
+
* CSS cannot make (a table of contents as a list or a menu, a row of buttons
|
|
8
|
+
* or an overflow `Menu`).
|
|
9
|
+
*
|
|
10
|
+
* `false` on the server and until the first measurement, so the server and
|
|
11
|
+
* the first client render agree on the wide layout; a ResizeObserver then
|
|
12
|
+
* follows the element. A width of 0 (the element is not laid out, e.g.
|
|
13
|
+
* `display: none`) keeps the last answer.
|
|
14
|
+
*
|
|
15
|
+
* Narrower than means `width < breakpoint`: at exactly 768px an element is not
|
|
16
|
+
* below `md`, the same line `Grid`'s named layouts collapse on.
|
|
17
|
+
*/
|
|
18
|
+
export function useContainerBelow(
|
|
19
|
+
ref: RefObject<HTMLElement | null>,
|
|
20
|
+
breakpoint: Breakpoint,
|
|
21
|
+
): boolean {
|
|
22
|
+
const [below, setBelow] = useState(false)
|
|
23
|
+
const limit = breakpointsPx[breakpoint]
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const element = ref.current
|
|
27
|
+
if (!element || typeof ResizeObserver === 'undefined') return
|
|
28
|
+
const observer = new ResizeObserver((entries) => {
|
|
29
|
+
const entry = entries[0]
|
|
30
|
+
if (!entry) return
|
|
31
|
+
const width = entry.contentBoxSize?.[0]?.inlineSize ?? entry.contentRect.width
|
|
32
|
+
if (width > 0) setBelow(width < limit)
|
|
33
|
+
})
|
|
34
|
+
observer.observe(element)
|
|
35
|
+
return () => observer.disconnect()
|
|
36
|
+
}, [ref, limit])
|
|
37
|
+
|
|
38
|
+
return below
|
|
39
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -10,6 +10,12 @@ import './strict.css'
|
|
|
10
10
|
export {ActionBar, type ActionBarProps} from './components/ActionBar/ActionBar'
|
|
11
11
|
export {ActionBarProvider} from './components/ActionBar/ActionBarProvider'
|
|
12
12
|
export {Alert, type AlertVariant} from './components/Alert/Alert'
|
|
13
|
+
export {
|
|
14
|
+
AppShell,
|
|
15
|
+
type AppShellCollapse,
|
|
16
|
+
type AppShellRailState,
|
|
17
|
+
} from './components/AppShell/AppShell'
|
|
18
|
+
export {Aside} from './components/Aside/Aside'
|
|
13
19
|
export {Icon, type IconName} from './components/Icon'
|
|
14
20
|
export {Badge, type BadgeVariant, type BadgeSize} from './components/Badge/Badge'
|
|
15
21
|
export {Breadcrumb} from './components/Breadcrumb/Breadcrumb'
|
|
@@ -19,15 +25,22 @@ export {ButtonGroup, type ButtonGroupProps} from './components/ButtonGroup/Butto
|
|
|
19
25
|
export {Callout, type CalloutVariant} from './components/Callout/Callout'
|
|
20
26
|
export {Card, type CardVariant, type CardSize} from './components/Card/Card'
|
|
21
27
|
export {Checkbox} from './components/Checkbox/Checkbox'
|
|
28
|
+
export {CodeBlock} from './components/CodeBlock/CodeBlock'
|
|
22
29
|
export {CheckboxGroup} from './components/CheckboxGroup/CheckboxGroup'
|
|
23
30
|
export {ColorInput} from './components/ColorInput/ColorInput'
|
|
24
31
|
export {ConfirmDialog} from './components/ConfirmDialog/ConfirmDialog'
|
|
25
32
|
export {
|
|
26
33
|
DragDrop,
|
|
27
34
|
useDragDrop,
|
|
35
|
+
type DragDropAnnouncement,
|
|
28
36
|
type DragDropEvent,
|
|
29
37
|
type DragDropItemData,
|
|
38
|
+
type DragDropOverEvent,
|
|
39
|
+
type DragDropPlaceholderInfo,
|
|
40
|
+
type DragDropRefusal,
|
|
41
|
+
type DragDropRenderPlaceholder,
|
|
30
42
|
type DragDropTarget,
|
|
43
|
+
type DragDropVerdict,
|
|
31
44
|
} from './components/DragDrop/DragDrop'
|
|
32
45
|
export {Dialog, type DialogSize} from './components/Dialog/Dialog'
|
|
33
46
|
export {DetailPanel, type DetailPanelSize} from './components/DetailPanel/DetailPanel'
|
|
@@ -35,6 +48,7 @@ export {Drawer, type DrawerAnchor, type DrawerSize} from './components/Drawer/Dr
|
|
|
35
48
|
export {EmptyState} from './components/EmptyState/EmptyState'
|
|
36
49
|
export {Heading, type HeadingVariant} from './components/Heading/Heading'
|
|
37
50
|
export {List, type ListSelectionMode} from './components/List/List'
|
|
51
|
+
export {LiveRegion, type LiveRegionPoliteness} from './components/LiveRegion/LiveRegion'
|
|
38
52
|
export {Field} from './components/Field/Field'
|
|
39
53
|
export type {LabelPosition, NecessityIndicator} from './components/Form/FormContext'
|
|
40
54
|
export {Fieldset, type FieldsetGap} from './components/Fieldset/Fieldset'
|
|
@@ -46,8 +60,10 @@ export {
|
|
|
46
60
|
type LinkButtonSize,
|
|
47
61
|
} from './components/LinkButton/LinkButton'
|
|
48
62
|
export {Menu} from './components/Menu/Menu'
|
|
63
|
+
export {Meter, type MeterProps, type MeterTone} from './components/Meter/Meter'
|
|
49
64
|
export {PageNav} from './components/PageNav/PageNav'
|
|
50
65
|
export {Panel} from './components/Panel/Panel'
|
|
66
|
+
export {Prose} from './components/Prose/Prose'
|
|
51
67
|
export {RadioGroup} from './components/RadioGroup/RadioGroup'
|
|
52
68
|
export {ScrollArea} from './components/ScrollArea/ScrollArea'
|
|
53
69
|
export {Combobox} from './components/Combobox/Combobox'
|
|
@@ -65,6 +81,7 @@ export {
|
|
|
65
81
|
type ToastOptions,
|
|
66
82
|
type ToastAction,
|
|
67
83
|
type ToastContextValue,
|
|
84
|
+
type ToastProviderProps,
|
|
68
85
|
} from './components/Toast'
|
|
69
86
|
export {
|
|
70
87
|
StatusIcon,
|
|
@@ -84,6 +101,14 @@ export {
|
|
|
84
101
|
type TableOfContentsVariant,
|
|
85
102
|
} from './components/TableOfContents/TableOfContents'
|
|
86
103
|
export {Tabs} from './components/Tabs/Tabs'
|
|
104
|
+
export {
|
|
105
|
+
Timeline,
|
|
106
|
+
type TimelineBarDropZone,
|
|
107
|
+
type TimelineBarProps,
|
|
108
|
+
type TimelineDate,
|
|
109
|
+
type TimelineRootProps,
|
|
110
|
+
type TimelineRowProps,
|
|
111
|
+
} from './components/Timeline/Timeline'
|
|
87
112
|
export {Tree} from './components/Tree/Tree'
|
|
88
113
|
export {Textarea, type TextareaVariant} from './components/Textarea/Textarea'
|
|
89
114
|
export {
|
|
@@ -98,6 +123,8 @@ export {
|
|
|
98
123
|
type ColorModePreference,
|
|
99
124
|
} from './components/ColorMode'
|
|
100
125
|
export {Text, type TextVariant, type TextColor} from './components/Text/Text'
|
|
126
|
+
export {Time} from './components/Time/Time'
|
|
127
|
+
export {relative, type RelativeOptions} from './components/Time/relative'
|
|
101
128
|
export {Toggle, type ToggleSize} from './components/Toggle/Toggle'
|
|
102
129
|
export {ToggleGroup} from './components/ToggleGroup/ToggleGroup'
|
|
103
130
|
export {Tooltip} from './components/Tooltip/Tooltip'
|
|
@@ -111,7 +138,7 @@ export {Switch} from './components/Switch/Switch'
|
|
|
111
138
|
export {Stack, type SpacingKey} from './components/Stack/Stack'
|
|
112
139
|
export {Inline} from './components/Inline/Inline'
|
|
113
140
|
export {Cluster} from './components/Cluster/Cluster'
|
|
114
|
-
export {Grid} from './components/Grid/Grid'
|
|
141
|
+
export {Grid, type GridLayout} from './components/Grid/Grid'
|
|
115
142
|
export type {GridTrack} from './shared/length'
|
|
116
143
|
export {PageShell, type PageShellMaxWidth, type PageShellPadding} from './components/PageShell'
|
|
117
144
|
|
|
@@ -120,6 +147,7 @@ export type {LinkClickEvent, OnNavigate} from './shared/navigate'
|
|
|
120
147
|
|
|
121
148
|
// Hooks
|
|
122
149
|
export {useContainerQuery, type ContainerSize} from './hooks/useContainerQuery'
|
|
150
|
+
export {useContainerBelow} from './hooks/useContainerBelow'
|
|
123
151
|
|
|
124
152
|
// Tokens — import directly from @duro-app/tokens with deep imports:
|
|
125
153
|
// import { colors } from '@duro-app/tokens/tokens/colors.css'
|
package/src/strict.css
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/* Layer order for the whole page: the reset, then Prose's descendant rules
|
|
2
|
+
* (above the reset's margins, below every component style), then StyleX's
|
|
3
|
+
* priority layers, which @react-strict-dom declares. */
|
|
4
|
+
@layer reset, duro-prose;
|
|
2
5
|
@react-strict-dom;
|
|
3
6
|
|
|
4
7
|
/* Table: reveal sort indicator on header cell hover */
|