@sereno-ds/ui 0.36.3 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/dist/_internal/Field.d.ts +1 -1
- package/dist/_internal/Field.js +2 -2
- package/dist/_internal/Field.js.map +1 -1
- package/dist/_internal/mask.d.ts +1 -1
- package/dist/_internal/mask.js.map +1 -1
- package/dist/core/Avatar.d.ts +1 -1
- package/dist/core/Avatar.js.map +1 -1
- package/dist/core/Badge.js +1 -1
- package/dist/core/Badge.js.map +1 -1
- package/dist/core/Brand.d.ts +2 -2
- package/dist/core/Brand.js.map +1 -1
- package/dist/core/Button.d.ts +1 -1
- package/dist/core/Button.js.map +1 -1
- package/dist/core/Card.js +1 -1
- package/dist/core/Card.js.map +1 -1
- package/dist/core/IconButton.d.ts +2 -2
- package/dist/core/IconButton.js.map +1 -1
- package/dist/core/Menu.d.ts +5 -5
- package/dist/core/Menu.js.map +1 -1
- package/dist/core/Table.d.ts +7 -7
- package/dist/core/Table.js +1 -1
- package/dist/core/Table.js.map +1 -1
- package/dist/core/Typography.d.ts +3 -3
- package/dist/core/Typography.js +1 -1
- package/dist/core/Typography.js.map +1 -1
- package/dist/feedback/Alert.d.ts +2 -2
- package/dist/feedback/Alert.js.map +1 -1
- package/dist/feedback/Dialog.d.ts +5 -5
- package/dist/feedback/Dialog.js.map +1 -1
- package/dist/feedback/Skeleton.d.ts +1 -1
- package/dist/feedback/Skeleton.js.map +1 -1
- package/dist/feedback/Toast.d.ts +1 -1
- package/dist/feedback/Toast.js.map +1 -1
- package/dist/feedback/ToastProvider.d.ts +3 -3
- package/dist/feedback/ToastProvider.js +1 -1
- package/dist/feedback/ToastProvider.js.map +1 -1
- package/dist/forms/AvatarUpload.d.ts +5 -5
- package/dist/forms/AvatarUpload.js +2 -2
- package/dist/forms/AvatarUpload.js.map +1 -1
- package/dist/forms/Checkbox.d.ts +3 -3
- package/dist/forms/Checkbox.js +1 -1
- package/dist/forms/Checkbox.js.map +1 -1
- package/dist/forms/DatePicker.d.ts +14 -9
- package/dist/forms/DatePicker.js +4 -32
- package/dist/forms/DatePicker.js.map +1 -1
- package/dist/forms/DateTimePicker.d.ts +25 -14
- package/dist/forms/DateTimePicker.js +6 -2
- package/dist/forms/DateTimePicker.js.map +1 -1
- package/dist/forms/FileUpload.d.ts +4 -4
- package/dist/forms/FileUpload.js.map +1 -1
- package/dist/forms/Input.d.ts +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/Input.js.map +1 -1
- package/dist/forms/Radio.d.ts +5 -5
- package/dist/forms/Radio.js.map +1 -1
- package/dist/forms/SearchInput.d.ts +2 -2
- package/dist/forms/SearchInput.js.map +1 -1
- package/dist/forms/Select.d.ts +9 -9
- package/dist/forms/Select.js.map +1 -1
- package/dist/forms/Switch.d.ts +3 -3
- package/dist/forms/Switch.js.map +1 -1
- package/dist/forms/Textarea.d.ts +1 -1
- package/dist/forms/Textarea.js.map +1 -1
- package/dist/forms/_internal/CalendarGrid.d.ts +16 -7
- package/dist/forms/_internal/CalendarGrid.js +54 -30
- package/dist/forms/_internal/CalendarGrid.js.map +1 -1
- package/dist/forms/_internal/calendarRange.d.ts +41 -0
- package/dist/forms/_internal/calendarRange.js +45 -0
- package/dist/forms/_internal/calendarRange.js.map +1 -0
- package/dist/forms/_internal/fieldBoxStyle.d.ts +2 -2
- package/dist/forms/_internal/fieldBoxStyle.js +2 -2
- package/dist/forms/_internal/fieldBoxStyle.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/navigation/BottomNav.d.ts +1 -1
- package/dist/navigation/BottomNav.js +1 -1
- package/dist/navigation/BottomNav.js.map +1 -1
- package/dist/navigation/SidebarNav.d.ts +9 -9
- package/dist/navigation/SidebarNav.js +1 -1
- package/dist/navigation/SidebarNav.js.map +1 -1
- package/dist/navigation/Stepper.d.ts +5 -5
- package/dist/navigation/Stepper.js.map +1 -1
- package/dist/navigation/Tabs.d.ts +2 -2
- package/dist/navigation/Tabs.js +11 -11
- package/dist/navigation/Tabs.js.map +1 -1
- package/dist/navigation/TopBar.d.ts +3 -3
- package/dist/navigation/TopBar.js.map +1 -1
- package/dist/styles.css +28 -23
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Sticky page header
|
|
4
|
+
* Sticky page header - a **compound component**. 60px tall, blurred
|
|
5
5
|
* translucent. `Leading` / `Title` / `Actions` are all optional, independent
|
|
6
|
-
* slots
|
|
6
|
+
* slots - use whichever the screen needs.
|
|
7
7
|
*
|
|
8
8
|
* ```tsx
|
|
9
9
|
* <TopBar>
|
|
@@ -32,7 +32,7 @@ interface TopBarActionsProps {
|
|
|
32
32
|
children?: React.ReactNode;
|
|
33
33
|
}
|
|
34
34
|
declare function TopBarRoot({ sticky, transparent, children, style, ...rest }: TopBarProps): React.JSX.Element;
|
|
35
|
-
/** No wrapper of its own
|
|
35
|
+
/** No wrapper of its own - renders exactly what you give it, first in the row. */
|
|
36
36
|
declare function Leading({ children }: TopBarLeadingProps): React.JSX.Element;
|
|
37
37
|
declare function Title({ subtitle, children }: TopBarTitleProps): React.JSX.Element;
|
|
38
38
|
declare function Actions({ children }: TopBarActionsProps): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/navigation/TopBar.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { sx } from '../_internal/style';\n\n/**\n * Sticky page header
|
|
1
|
+
{"version":3,"sources":["../../src/navigation/TopBar.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { sx } from '../_internal/style';\n\n/**\n * Sticky page header - a **compound component**. 60px tall, blurred\n * translucent. `Leading` / `Title` / `Actions` are all optional, independent\n * slots - use whichever the screen needs.\n *\n * ```tsx\n * <TopBar>\n * <TopBar.Leading><IconButton label=\"Back\"><ChevronLeft /></IconButton></TopBar.Leading>\n * <TopBar.Title subtitle=\"Therapy session\">Pick a time</TopBar.Title>\n * <TopBar.Actions><IconButton label=\"Notifications\"><Bell /></IconButton></TopBar.Actions>\n * </TopBar>\n * ```\n */\nexport interface TopBarProps extends React.HTMLAttributes<HTMLElement> {\n sticky?: boolean;\n /** Drops the blur/border for hero headers. */\n transparent?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface TopBarLeadingProps {\n /** Usually a back `IconButton` or the wordmark. */\n children?: React.ReactNode;\n}\n\nexport interface TopBarTitleProps {\n /** Plain string in most cases; accepts nodes for e.g. a `<time>` element or a responsive date. */\n subtitle?: React.ReactNode;\n children?: React.ReactNode;\n}\n\nexport interface TopBarActionsProps {\n children?: React.ReactNode;\n}\n\nfunction TopBarRoot({ sticky = true, transparent = false, children, style, ...rest }: TopBarProps) {\n return (\n <header\n {...rest}\n style={sx({\n display: 'flex',\n alignItems: 'center',\n gap: 'var(--space-3)',\n height: 'var(--topbar-height)',\n padding: '0 var(--gutter-mobile)',\n position: sticky ? 'sticky' : 'relative',\n top: 0,\n zIndex: 20,\n background: transparent ? 'transparent' : 'color-mix(in srgb,var(--bg-surface) 88%,transparent)',\n backdropFilter: transparent ? 'none' : 'blur(12px)',\n borderBottom: transparent ? 'none' : 'var(--border-width-hairline) solid var(--border-default)',\n ...style,\n })}\n >\n {children}\n </header>\n );\n}\n\n/** No wrapper of its own - renders exactly what you give it, first in the row. */\nfunction Leading({ children }: TopBarLeadingProps) {\n return <>{children}</>;\n}\n\nfunction Title({ subtitle, children }: TopBarTitleProps) {\n return (\n <div style={sx({ flex: 1, minWidth: 0, display: 'flex', flexDirection: 'column', gap: 1 })}>\n {children && (\n <span\n style={sx({\n fontFamily: 'var(--font-display)',\n fontSize: 'var(--text-lg)',\n fontWeight: 'var(--weight-bold)',\n letterSpacing: 'var(--tracking-tight)',\n color: 'var(--text-primary)',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n })}\n >\n {children}\n </span>\n )}\n {subtitle && (\n <span\n style={sx({\n fontFamily: 'var(--font-body)',\n fontSize: 'var(--text-xs)',\n color: 'var(--text-muted)',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n })}\n >\n {subtitle}\n </span>\n )}\n </div>\n );\n}\n\nfunction Actions({ children }: TopBarActionsProps) {\n return <div style={sx({ display: 'flex', alignItems: 'center', gap: 'var(--space-2)' })}>{children}</div>;\n}\n\nexport const TopBar = Object.assign(TopBarRoot, { Leading, Title, Actions });\n"],"mappings":";AA0CI,SAwBK,UAxBL,KA6BA,YA7BA;AAvCJ,SAAS,UAAU;AAqCnB,SAAS,WAAW,EAAE,SAAS,MAAM,cAAc,OAAO,UAAU,OAAO,GAAG,KAAK,GAAgB;AACjG,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO,GAAG;AAAA,QACR,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,UAAU,SAAS,WAAW;AAAA,QAC9B,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,YAAY,cAAc,gBAAgB;AAAA,QAC1C,gBAAgB,cAAc,SAAS;AAAA,QACvC,cAAc,cAAc,SAAS;AAAA,QACrC,GAAG;AAAA,MACL,CAAC;AAAA,MAEA;AAAA;AAAA,EACH;AAEJ;AAGA,SAAS,QAAQ,EAAE,SAAS,GAAuB;AACjD,SAAO,gCAAG,UAAS;AACrB;AAEA,SAAS,MAAM,EAAE,UAAU,SAAS,GAAqB;AACvD,SACE,qBAAC,SAAI,OAAO,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,QAAQ,eAAe,UAAU,KAAK,EAAE,CAAC,GACtF;AAAA,gBACC;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,GAAG;AAAA,UACR,YAAY;AAAA,UACZ,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,eAAe;AAAA,UACf,OAAO;AAAA,UACP,UAAU;AAAA,UACV,cAAc;AAAA,UACd,YAAY;AAAA,QACd,CAAC;AAAA,QAEA;AAAA;AAAA,IACH;AAAA,IAED,YACC;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,GAAG;AAAA,UACR,YAAY;AAAA,UACZ,UAAU;AAAA,UACV,OAAO;AAAA,UACP,UAAU;AAAA,UACV,cAAc;AAAA,UACd,YAAY;AAAA,QACd,CAAC;AAAA,QAEA;AAAA;AAAA,IACH;AAAA,KAEJ;AAEJ;AAEA,SAAS,QAAQ,EAAE,SAAS,GAAuB;AACjD,SAAO,oBAAC,SAAI,OAAO,GAAG,EAAE,SAAS,QAAQ,YAAY,UAAU,KAAK,iBAAiB,CAAC,GAAI,UAAS;AACrG;AAEO,MAAM,SAAS,OAAO,OAAO,YAAY,EAAE,SAAS,OAAO,QAAQ,CAAC;","names":[]}
|
package/dist/styles.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
-
@sereno-ds/ui
|
|
2
|
+
@sereno-ds/ui - component stylesheet.
|
|
3
3
|
|
|
4
4
|
The Sereno components are token-driven inline styles, but a handful of things
|
|
5
5
|
can't live in an inline `style`: @keyframes, pseudo-classes (:checked,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import '@sereno-ds/ui/styles.css'; // (today: this file, via app/globals.css)
|
|
11
11
|
|
|
12
|
-
Depends on the design tokens (custom properties) being defined
|
|
12
|
+
Depends on the design tokens (custom properties) being defined - see
|
|
13
13
|
app/styles/tokens/*.css (future @sereno-ds/tokens).
|
|
14
14
|
|
|
15
15
|
Not included here (host-app concerns, not the library):
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
All three need these host rules for their checked / focus states. */
|
|
38
38
|
.sereno-check:checked,
|
|
39
39
|
.sereno-check:indeterminate {
|
|
40
|
-
/* `background-color`, not the `background` shorthand
|
|
40
|
+
/* `background-color`, not the `background` shorthand - the shorthand would
|
|
41
41
|
reset `background-size` and the glyph would stop scaling with the box. */
|
|
42
42
|
background-color: var(--interactive-primary) !important;
|
|
43
43
|
border-color: var(--interactive-primary) !important;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
.sereno-radio[data-size='sm']:checked {
|
|
60
60
|
box-shadow: inset 0 0 0 3px var(--bg-surface) !important;
|
|
61
61
|
}
|
|
62
|
-
/* Switch is a role=switch <span>, not an input
|
|
62
|
+
/* Switch is a role=switch <span>, not an input - give it a keyboard focus ring. */
|
|
63
63
|
.sereno-switch {
|
|
64
64
|
outline: none;
|
|
65
65
|
}
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/* ── Tabs ────────────────────────────────────────────────────────────────────
|
|
71
|
-
The strip scrolls horizontally when it overflows
|
|
71
|
+
The strip scrolls horizontally when it overflows - hide the scrollbar
|
|
72
72
|
(the chevrons are the affordance). */
|
|
73
73
|
.sereno-tab-scroll {
|
|
74
74
|
scrollbar-width: none;
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
.sereno-tab-scroll::-webkit-scrollbar {
|
|
78
78
|
display: none;
|
|
79
79
|
}
|
|
80
|
-
/* Tab's own focus ring (SS-228)
|
|
80
|
+
/* Tab's own focus ring (SS-228) - it used to set outline:none inline with
|
|
81
81
|
nothing to replace it, which (as with DateTimePicker's day grid) always
|
|
82
82
|
beats a class selector's :focus-visible rule no matter what, roving
|
|
83
83
|
tabindex or not. Suppressed here instead, same specificity as the
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/* ── SidebarNav ──────────────────────────────────────────────────────────────
|
|
94
|
-
Thin scroll area, a keyboard ring on its plain <button> rows, and
|
|
95
|
-
collapsed
|
|
94
|
+
Thin scroll area, a keyboard ring on its plain <button> rows, and - when
|
|
95
|
+
collapsed - a hidden scrollbar so a scrollbar gutter can't push the centred
|
|
96
96
|
icons off-axis from the header mark. */
|
|
97
97
|
.sereno-sidenav {
|
|
98
98
|
scrollbar-width: thin;
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
.sereno-sidenav-root[data-collapsed] .sereno-sidenav::-webkit-scrollbar {
|
|
112
112
|
display: none;
|
|
113
113
|
}
|
|
114
|
-
/* The section break
|
|
114
|
+
/* The section break - every `SidebarNav.Section` but the first gets the gap +
|
|
115
115
|
divider; `Section` itself doesn't know its own position among siblings. */
|
|
116
116
|
.sereno-sidenav-section:not(:first-child) {
|
|
117
117
|
margin-top: var(--space-3);
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
/* ── In-field affix button ───────────────────────────────────────────────────
|
|
135
135
|
A bare icon button that sits inside the field frame (Input's password reveal,
|
|
136
136
|
SearchInput's clear, FileUpload / AvatarUpload actions). NOTE: the class is
|
|
137
|
-
`ds-affix-btn` for historical reasons
|
|
137
|
+
`ds-affix-btn` for historical reasons - rename to `sereno-affix-btn` is a
|
|
138
138
|
breaking class-contract change, deferred. */
|
|
139
139
|
.ds-affix-btn {
|
|
140
140
|
display: inline-flex;
|
|
@@ -154,12 +154,12 @@
|
|
|
154
154
|
.ds-affix-btn:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
|
|
155
155
|
|
|
156
156
|
/* ── Table ──────────────────────────────────────────────────────────────────
|
|
157
|
-
Ships with @sereno-ds/ui's compound <Table>. The parts stay thin
|
|
157
|
+
Ships with @sereno-ds/ui's compound <Table>. The parts stay thin - structure,
|
|
158
158
|
density, dividers, hover / focus / sticky / zebra live here, keyed off
|
|
159
159
|
data-* on the <table> root. */
|
|
160
160
|
.sereno-table { width: 100%; border-collapse: collapse; font-family: var(--font-body); }
|
|
161
161
|
/* Visually-hidden <caption>. `top/left: 0` pins it to the (position: relative)
|
|
162
|
-
scroll region
|
|
162
|
+
scroll region - without an anchor a position:absolute caption falls back to its
|
|
163
163
|
static offset against the viewport and stretches the page's scroll height. */
|
|
164
164
|
.sereno-table caption { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
|
|
165
165
|
.sereno-table thead tr { background: var(--bg-subtle); }
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
.sereno-table th button { transition: color var(--duration-fast) var(--ease-standard); }
|
|
195
195
|
.sereno-table th button:hover { color: var(--text-primary); }
|
|
196
196
|
/* `min-width: 0` lets the region shrink below the table's `min-width` when it's a
|
|
197
|
-
flex / grid item
|
|
197
|
+
flex / grid item - without it the wide table forces its ancestors open and the
|
|
198
198
|
*page* scrolls sideways instead of this box. `position: relative` anchors the
|
|
199
199
|
visually-hidden <caption> here (see the caption rule above). */
|
|
200
200
|
.sereno-table-scroll { outline: none; position: relative; min-width: 0; max-width: 100%; }
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
/* ── Dialog ────────────────────────────────────────────────────────────────
|
|
231
|
-
Header ✕ button
|
|
231
|
+
Header ✕ button - hover/focus states that can't be inline. */
|
|
232
232
|
.sereno-dialog-close:hover { background: var(--interactive-ghost-hover); color: var(--text-primary); }
|
|
233
233
|
.sereno-dialog-close:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
|
|
234
234
|
/* Footer `fill`: every action shares each line and grows to fill it, so a wrap never leaves one
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
.sereno-dialog-footer[data-fill] > * { flex: 1 1 auto; }
|
|
237
237
|
|
|
238
238
|
/* ── Dismiss ✕ (Alert / Toast) ─────────────────────────────────────────────
|
|
239
|
-
Ghost icon button on a tinted surface
|
|
239
|
+
Ghost icon button on a tinted surface - tint the hover from currentColor so
|
|
240
240
|
it reads on every tone. */
|
|
241
241
|
.sereno-dismiss { transition: opacity var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard); }
|
|
242
242
|
.sereno-dismiss:hover { opacity: 1; background: color-mix(in srgb, currentColor 14%, transparent); }
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
/* ── Toast viewport (ToastProvider) ────────────────────────────────────────
|
|
246
246
|
Enter/exit per stacked toast + the auto-dismiss countdown bar. Direction
|
|
247
247
|
depends on the anchored edge. The reduced-motion rule below damps all of it
|
|
248
|
-
(the JS timer still dismisses on schedule
|
|
248
|
+
(the JS timer still dismisses on schedule - only the visuals are stilled). */
|
|
249
249
|
.sereno-toast-item { animation: sereno-toast-in var(--duration-normal) var(--ease-out); }
|
|
250
250
|
.sereno-toast-item[data-edge='top'] { animation-name: sereno-toast-in-top; }
|
|
251
251
|
.sereno-toast-item[data-leaving='true'] { animation: sereno-toast-out var(--duration-fast) var(--ease-in) forwards; }
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
inline styles. The header title button lives here too. */
|
|
270
270
|
.sereno-dtp-title:hover { background: var(--interactive-ghost-hover); }
|
|
271
271
|
.sereno-dtp-title:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
|
|
272
|
-
/* fade only
|
|
272
|
+
/* fade only - the box is centred with translateX(-50%), so no transform anim. */
|
|
273
273
|
.sereno-dtp-pop { animation: sereno-fade-in var(--duration-fast) var(--ease-standard); }
|
|
274
274
|
.sereno-dtp-grid button {
|
|
275
275
|
height: 34px;
|
|
@@ -285,25 +285,30 @@
|
|
|
285
285
|
transition: background-color var(--duration-fast) var(--ease-standard);
|
|
286
286
|
}
|
|
287
287
|
.sereno-dtp-grid button:hover { background: var(--interactive-ghost-hover); }
|
|
288
|
+
/* A month / year outside the calendar's `min` .. `max` (SS-331): not pickable, and not focusable either.
|
|
289
|
+
The :hover rule above stays as it was (its specificity decides the [data-current] tie below); the
|
|
290
|
+
disabled one only turns it off for a disabled button. */
|
|
291
|
+
.sereno-dtp-grid button:disabled { color: var(--text-disabled); cursor: not-allowed; }
|
|
292
|
+
.sereno-dtp-grid button:disabled:hover { background: transparent; }
|
|
288
293
|
.sereno-dtp-grid button:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
|
|
289
|
-
/* The day grid's own focus ring (SS-228)
|
|
294
|
+
/* The day grid's own focus ring (SS-228) - was missing entirely: the day
|
|
290
295
|
button used to set outline:none *inline*, which always wins over a class
|
|
291
296
|
selector regardless of :focus-visible, so the roving-tabindex cursor was
|
|
292
|
-
keyboard-functional but completely invisible. Suppressed here instead
|
|
297
|
+
keyboard-functional but completely invisible. Suppressed here instead -
|
|
293
298
|
same specificity as the :focus-visible rule below, so source order
|
|
294
299
|
decides and the override actually takes. Separate from .sereno-dtp-grid
|
|
295
|
-
on purpose
|
|
300
|
+
on purpose - that class is the month/year popover's mini-grid, whose
|
|
296
301
|
:hover / [data-current] rules don't belong on a day cell (it already has
|
|
297
302
|
its own selected/today styling driven from React state, not CSS
|
|
298
303
|
attribute selectors). */
|
|
299
304
|
.sereno-dtp-days button { outline: none; }
|
|
300
305
|
.sereno-dtp-days button:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
|
|
301
|
-
/* Time-slot grid (SS-228 sweep)
|
|
306
|
+
/* Time-slot grid (SS-228 sweep) - same bug, same fix: an inline outline:none
|
|
302
307
|
with nothing to replace it, found auditing every remaining inline
|
|
303
308
|
outline:none in the package after the day-grid and Tabs fixes above. */
|
|
304
309
|
.sereno-dtp-time button { outline: none; }
|
|
305
310
|
.sereno-dtp-time button:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
|
|
306
|
-
/* BottomNav.Item (SS-228 sweep)
|
|
311
|
+
/* BottomNav.Item (SS-228 sweep) - identical bug: outline suppressed inline
|
|
307
312
|
with no substitute at all (no useInteract-style box-shadow ring either). */
|
|
308
313
|
.sereno-bottom-nav-item { outline: none; }
|
|
309
314
|
.sereno-bottom-nav-item:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
|
|
@@ -315,7 +320,7 @@
|
|
|
315
320
|
|
|
316
321
|
/* ── Reduced motion ──────────────────────────────────────────────────────────
|
|
317
322
|
The token layer already zeroes `--duration-*`, but Button's spinner and
|
|
318
|
-
Skeleton's pulse use fixed loop durations
|
|
323
|
+
Skeleton's pulse use fixed loop durations - damp every animation so the
|
|
319
324
|
library honours the preference on its own. */
|
|
320
325
|
@media (prefers-reduced-motion: reduce) {
|
|
321
326
|
* { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Wraps next-themes so it writes `data-theme="light|dark"` on <html>
|
|
4
|
+
* Wraps next-themes so it writes `data-theme="light|dark"` on <html> - the exact
|
|
5
5
|
* hook the Sereno tokens switch on (`[data-theme="dark"]` in colors.css / elevation.css).
|
|
6
6
|
* Defaults to the OS preference; the choice is remembered in localStorage.
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ThemeProvider as NextThemesProvider } from 'next-themes';\n\n/**\n * Wraps next-themes so it writes `data-theme=\"light|dark\"` on <html>
|
|
1
|
+
{"version":3,"sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ThemeProvider as NextThemesProvider } from 'next-themes';\n\n/**\n * Wraps next-themes so it writes `data-theme=\"light|dark\"` on <html> - the exact\n * hook the Sereno tokens switch on (`[data-theme=\"dark\"]` in colors.css / elevation.css).\n * Defaults to the OS preference; the choice is remembered in localStorage.\n */\nexport function ThemeProvider({ children }: { children: React.ReactNode }) {\n return (\n <NextThemesProvider attribute=\"data-theme\" defaultTheme=\"system\" enableSystem enableColorScheme={false} disableTransitionOnChange>\n {children}\n </NextThemesProvider>\n );\n}\n"],"mappings":";AAYI;AATJ,SAAS,iBAAiB,0BAA0B;AAO7C,SAAS,cAAc,EAAE,SAAS,GAAkC;AACzE,SACE,oBAAC,sBAAmB,WAAU,cAAa,cAAa,UAAS,cAAY,MAAC,mBAAmB,OAAO,2BAAyB,MAC9H,UACH;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sereno-ds/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Sereno Design System
|
|
3
|
+
"version": "0.37.0",
|
|
4
|
+
"description": "Sereno Design System: React primitives (token-driven, inline styles, no UI base lib).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sereno",
|
|
7
7
|
"repository": {
|