@uni-design-system/uni-core 10.3.0 → 11.0.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 +121 -0
- package/dist/cjs/index.cjs +83 -33
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +83 -33
- package/dist/esm/index.js.map +1 -1
- package/dist/types/concepts/component/component.types.d.ts +1 -1
- package/dist/types/concepts/component/component.types.d.ts.map +1 -1
- package/dist/types/concepts/iconography/icon.records.d.ts +4 -0
- package/dist/types/concepts/iconography/icon.records.d.ts.map +1 -1
- package/dist/types/concepts/theme/theme.model.d.ts +18 -0
- package/dist/types/concepts/theme/theme.model.d.ts.map +1 -1
- package/dist/types/concepts/theme/themes/base.theme.d.ts +8 -2
- package/dist/types/concepts/theme/themes/base.theme.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,126 @@
|
|
|
1
1
|
# @uni-design-system/uni-core
|
|
2
2
|
|
|
3
|
+
## 11.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`8fef84f`](https://github.com/uni-design-system/uni/commit/8fef84f25b92c3aea09ca1185304d54acae7e6b7) Thanks [@gaenglish](https://github.com/gaenglish)! - Require Angular 22. `@angular/common`, `@angular/core` and `@angular/forms` move from `^21.2.0` to `^22.0.0`, so 11.x tracks Angular 22 and 10.x remains the Angular 21 line — one major of this package per Angular major, as documented. The old range excluded v22 outright, so an app that had taken Angular 22 could not install this package without a peer override.
|
|
8
|
+
|
|
9
|
+
Two consequences of the framework's own changes:
|
|
10
|
+
|
|
11
|
+
**`touch` output on every form control.** Angular 22 marks a bound field touched through a dedicated `touch` output rather than through the `touched` model, which the `Field` directive now binds inward only. All sixteen controls that track touched state (input, textarea, checkbox, radio, toggle, select, combobox, multi-select, tag-input, calendar, date/date-time/time inputs, number/number-range inputs, quantity-stepper, slider) emit it wherever they already considered the user done with the control. Without it, `touched()` never flips and error display gated on it never appears.
|
|
12
|
+
|
|
13
|
+
**`min` / `max` typing.** The contract now types `min`/`max` as the control's own value type rather than as numbers. Where that still fits, the input was widened (`uni-slider`). Where it does not — a text control's native numeric attributes (`uni-input`), a range control's scalar bounds (`uni-number-range-input`), a tag limit (`uni-tag-input`) — the class member steps aside and the public binding name is preserved by an alias, so **templates are unchanged**. Only code reaching these through a `ViewChild` instance is affected: `min`/`max` are now `minAttr`/`maxAttr` on `uni-input`, `minValue`/`maxValue` on `uni-number-range-input`, and `max` is `maxLength` on `uni-tag-input`. `uni-number-range-input`'s protected `valueOf()` is renamed `partValue()`, since `valueOf` collides with `Object.valueOf`.
|
|
14
|
+
|
|
15
|
+
Angular 22 also makes `OnPush` the default change detection; every component here already set it explicitly.
|
|
16
|
+
|
|
17
|
+
- [`403043a`](https://github.com/uni-design-system/uni/commit/403043a58fa616d13b28a3f563a17fffee76b963) Thanks [@gaenglish](https://github.com/gaenglish)! - Add `uni-inline-button`, and remove the `footer` component name.
|
|
18
|
+
|
|
19
|
+
**`uni-inline-button`** is an action that lives inside a sentence. Every other button in the library owns a box — even `ghost` carries padding and a hit area, so dropping one into a paragraph pushes the words apart and breaks the line's rhythm. This one adds no box: it inherits the surrounding type (family, size, weight, line height, letter spacing and colour) and renders as part of the run of text.
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
Your data is processed under the terms you accepted. You can
|
|
23
|
+
<button inline-button underline link>review them</button> at any time.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
It is always a real `<button>`, so it can _look_ like a link without claiming to be navigation: Enter and Space activate it and assistive tech announces a button rather than an unfollowable link. Reach for an `<a>` when the thing actually goes somewhere.
|
|
27
|
+
|
|
28
|
+
Inputs: `underline` and `link` (both tri-state against the theme's defaults, and both readable as bare attributes), `iconName` / `symbolName` with `iconPosition`, and `disable`. A glyph is sized in `em` rather than px, so the same markup reads correctly in a caption and in a headline and never changes the line height of the paragraph it sits in.
|
|
29
|
+
|
|
30
|
+
It is themed as **`inlineButton`**, with `linkColor`, `underline`, `underlineOnHover`, `underlineOffset`, `gap` and `focusColor`. This replaces the `textButton` name that had sat in `ComponentName` since before there was anything to put behind it — **`ComponentName`'s `'textButton'` is renamed to `'inlineButton'`, and the exported options type `UniTextButtonOptions` to `UniInlineButtonOptions`.** Nothing shipped a `textButton` entry, so a theme only needs the rename if it had reached for the unbacked name.
|
|
31
|
+
|
|
32
|
+
One documented limit: browsers blockify every `<button>` to `inline-block` whatever `display` it asks for, so the control is an atomic inline box. A long label wraps inside it, but the run moves to the next line whole rather than splitting where the surrounding words would. `display: contents` would fix that and cost the button its focusability, so labels should stay to a few words.
|
|
33
|
+
|
|
34
|
+
**`footer` is removed** from `ComponentName` and from the base theme. It was declared and themed but never built, so a theme could set options that reached nothing. Themes that state a `footer` entry now fail to type-check; delete the entry.
|
|
35
|
+
|
|
36
|
+
- [`2e4a6a4`](https://github.com/uni-design-system/uni/commit/2e4a6a4de0fbecad710298e680a504a337cdc02e) Thanks [@gaenglish](https://github.com/gaenglish)! - Put every remaining hardcoded animation duration on the `motion` scale. Seventeen sites across twelve components carried their own literal, so a theme could retime some of the library and not the rest.
|
|
37
|
+
|
|
38
|
+
New `motion` options, each defaulting to the token named: `button`, `iconButton`, `checkbox`, `tabs`, `tooltip`, `dataTable`, `tag`. `uni-sort-header` names `control` directly — it has no theme entry to hang an option on. `combobox`'s chevron now turns with the popup it opens, reading that component's existing `motion` option.
|
|
39
|
+
|
|
40
|
+
Timings move where the literal and the token disagreed:
|
|
41
|
+
|
|
42
|
+
| | before | after | token |
|
|
43
|
+
| ----------------------------------------- | ----------------- | ----------------- | -------------- |
|
|
44
|
+
| button, icon-button, data-table row hover | 280ms ease | 300ms ease | `control` |
|
|
45
|
+
| checkbox box and dash | 200ms ease | 300ms ease | `control` |
|
|
46
|
+
| checkbox tick (drawn, trails the box) | 500ms ease | 350ms ease-in-out | `reveal` |
|
|
47
|
+
| tabs ink and indicator | 150ms ease | 120ms ease | `snap` |
|
|
48
|
+
| combobox chevron | 150ms ease | 100ms linear | `popup` |
|
|
49
|
+
| tag fill and ink | 200ms ease | 300ms ease | `control` |
|
|
50
|
+
| sort-header arrow | 350ms ease-in-out | 300ms ease | `control` |
|
|
51
|
+
| alert, snackbar dismiss | 300ms | 350ms | `notification` |
|
|
52
|
+
| data-table detail expand | 300ms ease | 350ms ease-in-out | `reveal` |
|
|
53
|
+
| tooltip fade, data-table loading overlay | 350ms | unchanged | `notification` |
|
|
54
|
+
|
|
55
|
+
Two of these lived in the theme rather than in a component: `button.fixed` and `tag.fixed` each baked a `transition`, and the button's won over the component that had already been migrated — so the button kept its old timing regardless. Both are gone; the components own their transitions and follow the token at runtime. A spec now fails if any shipped theme states a duration in a style block.
|
|
56
|
+
|
|
57
|
+
`uni-skeleton` still stays out: its shimmer is a loop, not a transition.
|
|
58
|
+
|
|
59
|
+
- [`2dc4fb5`](https://github.com/uni-design-system/uni/commit/2dc4fb538a1eeb1f232bf6b89ad88a623be9db72) Thanks [@gaenglish](https://github.com/gaenglish)! - Move `uni-slider`'s click-to-jump timing onto the `motion` scale. The `slider.transitionMs` theme option is removed; use `slider.motion` — a token name — instead.
|
|
60
|
+
|
|
61
|
+
It was the last duration option outside the scale. The other eight went in 9.0.0, but the slider was rewritten for the numeric family afterwards and reintroduced its own, so a theme could retime every animated component except this one.
|
|
62
|
+
|
|
63
|
+
The scale gains a sixth token for it, `snap` (120ms `ease`), which is the slider's exact previous timing — nothing moves faster or slower than before. It is a separate token rather than a reuse of `control` because the two describe different motion: `control` times a state change in place (a hover fill, a check mark) and runs 300ms, where a slider thumb covers distance to a value the user just chose and at 300ms reads as lagging the input rather than answering it. A drag is still never animated.
|
|
64
|
+
|
|
65
|
+
Themes setting `slider.transitionMs` should set `motion.snap` instead, which also retimes anything else pointed at that token.
|
|
66
|
+
|
|
67
|
+
- [`44feb5d`](https://github.com/uni-design-system/uni/commit/44feb5d47814e152155f7d0541d186eb6b2f7a81) Thanks [@gaenglish](https://github.com/gaenglish)! - Composite components now render their glyphs through `uni-icon` theme tokens instead of `uni-symbol` ligatures, completing the rule set in `AGENTS.md`. Thirteen theme options are renamed and retyped from `string` to `IconName`:
|
|
68
|
+
|
|
69
|
+
| Component | before | after |
|
|
70
|
+
| ---------------------- | --------------------------------- | ------------------------------------- |
|
|
71
|
+
| date-input, time-input | `toggleSymbol` | `toggleIcon` (`calendar`, `clock`) |
|
|
72
|
+
| calendar | `navPrevSymbol` / `navNextSymbol` | `navPrevIcon` / `navNextIcon` |
|
|
73
|
+
| menu-item | `activeSymbol` | `activeIcon` |
|
|
74
|
+
| avatar | `fallbackSymbol` | `fallbackIcon` (`person` → `profile`) |
|
|
75
|
+
| breadcrumb | `separatorSymbol` | `separatorIcon` |
|
|
76
|
+
| search-input | `searchSymbol` / `clearSymbol` | `searchIcon` / `clearIcon` |
|
|
77
|
+
| callout, popover | `closeSymbol` | `closeIcon` |
|
|
78
|
+
|
|
79
|
+
`drawer-header` and `dialog-header` shipped both `closeButtonIcon` and `closeButtonSymbol`; the `*Symbol` half is removed, and since `symbolName` outranked `iconName` inside the icon button, those two headers were still rendering the ligature path until now.
|
|
80
|
+
|
|
81
|
+
Four glyphs join `BaseIcons` (65 total): `arrowUp`/`arrowDown` and `chevronsLeft`/`chevronsRight`, which is what unblocked `uni-sort-header` and `uni-paginator`. `select-input`, `multi-select-dropdown` and `data-search` also stopped hardcoding ligatures.
|
|
82
|
+
|
|
83
|
+
**Migrating:** rename the option in your theme and swap the Material ligature for an icon token — `activeSymbol: 'check'` becomes `activeIcon: 'check'`, `toggleSymbol: 'calendar_month'` becomes `toggleIcon: 'calendar'`. Any glyph you need that `BaseIcons` lacks can be registered through `createTheme({ icons })`.
|
|
84
|
+
|
|
85
|
+
`uni-symbol` is unchanged and still the right tool for app-facing inputs that take arbitrary ligature names — `symbolName` on icon-button, tag, alert, snackbar and menu-item, and `symbolLeft`/`symbolRight` on button. One consequence worth knowing: `uni-icon` has no variable-font axes, so a theme setting `symbol: { options: { weight } }` no longer affects these composites' glyphs — they take the icon set's weight (300). The Wellsourced theme, which sets weight 200, has accepted this.
|
|
86
|
+
|
|
87
|
+
- [`0b1c528`](https://github.com/uni-design-system/uni/commit/0b1c52851188011717b9388298a4b3b3f734e9e5) Thanks [@gaenglish](https://github.com/gaenglish)! - Remove the deprecated `toggle.size` theme option and wire up three component names that were declared but unreachable.
|
|
88
|
+
|
|
89
|
+
`toggle.size` was the last `@deprecated` API in the library — the pre-`sizes` geometry (width 2x, knob 0.8x) that outranked the size block for every instance regardless of a toggle's own `size` input. No shipped theme set it. Use the `toggle.sizes` block, which gives each size token its own `width` / `height` / `padding`.
|
|
90
|
+
|
|
91
|
+
`select`, `buttonGroup` and `progressBar` were listed in `ComponentName` with no theme entry and no `COMPONENT_NAME` provider behind them, so a theme could not dress them however it tried. Each now has an entry whose defaults are exactly what the component previously hardcoded, so nothing moves:
|
|
92
|
+
- **`select`** — `toggleIcon`, `toggleColor`, `toggleSize` for the dropdown affordance, matching `uni-combobox`'s (`chevronDown`, `on-background-variant`, 20).
|
|
93
|
+
- **`buttonGroup`** — `border` and `borderRadius` for the segmented frame, previously a literal `quaternary` border and 4px corners.
|
|
94
|
+
- **`progressBar`** — `trackColor`, `fillColor`, `completeColor`, `borderColor` and `strokeWidth`, previously read straight off the palette.
|
|
95
|
+
|
|
96
|
+
The two remaining names are dealt with separately: `textButton` is renamed `inlineButton` and now backs the new `uni-inline-button`, and `footer` is removed from `ComponentName` altogether.
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- [`85a1ec5`](https://github.com/uni-design-system/uni/commit/85a1ec569446f7a353410e8338ef70d473dc72ae) Thanks [@gaenglish](https://github.com/gaenglish)! - Fix unreadable text in `uni-card` under dark themes. The card's theme entry painted `backgroundColor` without the matching `color`, so any unstyled text inside it fell back to the user-agent default black. On a light theme that happened to read; on every dark theme it rendered black on a near-black surface — 1.11:1 against a 4.5:1 AA requirement, reported from the theme switcher's preview card.
|
|
101
|
+
|
|
102
|
+
The card now states `on-background` alongside its background, as `cardHeader` already did for each of its variants. All six registered themes measure between 13.8:1 and 18.1:1 on that text.
|
|
103
|
+
|
|
104
|
+
Added with the fix: a spec asserting the invariant across every component entry in the shipped themes — anything that paints a `backgroundColor` must also state a `color` — so the next half-painted surface fails a test rather than reaching a consumer.
|
|
105
|
+
|
|
106
|
+
## 10.4.0
|
|
107
|
+
|
|
108
|
+
### Minor Changes
|
|
109
|
+
|
|
110
|
+
- [`cb5f08f`](https://github.com/uni-design-system/uni/commit/cb5f08f7bc7f73492688d33388c905941762ea0b) Thanks [@gaenglish](https://github.com/gaenglish)! - Give `uni-dialog` the drawer's three-row layout: a pinned `[uni-dialog-header]`, a scrolling body, and pinned `[uni-dialog-buttons]`.
|
|
111
|
+
|
|
112
|
+
The surface is now a flex column that is `overflow: clip` on both axes, so it is never the scroll container — previously a long form scrolled the dialog's own title and action buttons off the screen. Unlike the drawer, the dialog declares no height and stays sized by its content, growing until it reaches `calc(100dvh - 2 × inset)` and only then scrolling its body.
|
|
113
|
+
|
|
114
|
+
New theme options: `dialog.inset` (gap from the viewport edge before the body scrolls, default `lg`), `dialog.bodyPadding` (pads the scrolling row alone; `dialog.padding` still insets all three rows), and `divider` on `dialogHeader` / `dialogButtons` for a border between a pinned row and the body — all off or unchanged by default, so existing dialogs keep their appearance.
|
|
115
|
+
|
|
116
|
+
`[uni-dialog-header]` gains the shorter `[dialog-header]` alias, matching `[dialog-buttons]`; the long form keeps working. The `defaultCloseButton` now actually floats in the corner — its `position: absolute` was being lost to the icon button's own class, which left it inline at the top of the surface.
|
|
117
|
+
|
|
118
|
+
The drawer's overlay scrim now fades in and out with the panel instead of snapping. Its `::backdrop` had a background and no animation at all, so the dimming appeared and vanished instantly around a panel that took 250ms to slide. A new `drawer.motion` option (default `panel`) times the slide, the scrim's fade and the side panel's width transition together, replacing the hardcoded 250ms literals. The global reduced-motion rule now also reaches `::backdrop`, so both the drawer's and the dialog's scrim honour the preference (WCAG 2.3.3).
|
|
119
|
+
|
|
120
|
+
Dialog and drawer scrims now come from one token. `UniTheme` gains a `backdrops` scale — open and named like `shadows` and `motion` — and both components' `backdrop` option points at a name (`'scrim'`) instead of carrying its own CSS. They had drifted: the dialog washed the page white and blurred it while the drawer dimmed it dark, and a theme that dressed the dialog left the drawer on the library default. A raw style object is still accepted on either option, so a theme that states one keeps working.
|
|
121
|
+
|
|
122
|
+
The dialog's fade now reads the theme's `motion` token too (new `dialog.motion` option, default `panel`), replacing a hardcoded `350ms ease-in`. It shared the drawer's scrim but not its timing, so the same surface arrived at two speeds; both are now 250ms and a theme retimes them together.
|
|
123
|
+
|
|
3
124
|
## 10.3.0
|
|
4
125
|
|
|
5
126
|
### Minor Changes
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -741,6 +741,10 @@ var BaseIcons = {
|
|
|
741
741
|
chevronRight: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m517.85-480-184-184L376-706.15 602.15-480 376-253.85 333.85-296l184-184Z'/%3e%3c/svg%3e",
|
|
742
742
|
arrowLeft: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m294.92-450 227.85 227.85L480-180 180-480l300-300 42.77 42.15L294.92-510H780v60H294.92Z'/%3e%3c/svg%3e",
|
|
743
743
|
arrowRight: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M665.08-450H180v-60h485.08L437.23-737.85 480-780l300 300-300 300-42.77-42.15L665.08-450Z'/%3e%3c/svg%3e",
|
|
744
|
+
arrowUp: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M450-180v-485.08L222.15-437.23 180-480l300-300 300 300-42.15 42.77L510-665.08V-180h-60Z'/%3e%3c/svg%3e",
|
|
745
|
+
arrowDown: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M450-780v485.08L222.15-522.77 180-480l300 300 300-300-42.15-42.77L510-294.92V-780h-60Z'/%3e%3c/svg%3e",
|
|
746
|
+
chevronsLeft: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M445-253.85 218.85-480 445-706.15 487.15-664 303.77-480l183.38 184L445-253.85Zm254 0L472.85-480 699-706.15 741.15-664 557.77-480l183.38 184L699-253.85Z'/%3e%3c/svg%3e",
|
|
747
|
+
chevronsRight: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M402.23-480 218.85-664 261-706.15 487.15-480 261-253.85 218.85-296l183.38-184Zm254 0L472.85-664 515-706.15 741.15-480 515-253.85 472.85-296l183.38-184Z'/%3e%3c/svg%3e",
|
|
744
748
|
home: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M240-200h133.85v-237.69h212.3V-200H720v-360L480-740.77 240-560v360Zm-60 60v-450l300-225.77L780-590v450H526.15v-237.69h-92.3V-140H180Zm300-330.38Z'/%3e%3c/svg%3e",
|
|
745
749
|
building: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M130-136.92v-540h160v-160h380v320h160v380H530v-160H430v160H130Zm60-60h100v-100H190v100Zm0-160h100v-100H190v100Zm0-160h100v-100H190v100Zm160 160h100v-100H350v100Zm0-160h100v-100H350v100Zm0-160h100v-100H350v100Zm160 320h100v-100H510v100Zm0-160h100v-100H510v100Zm0-160h100v-100H510v100Zm160 480h100v-100H670v100Zm0-160h100v-100H670v100Z'/%3e%3c/svg%3e",
|
|
746
750
|
externalLink: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M212.31-140Q182-140 161-161q-21-21-21-51.31v-535.38Q140-778 161-799q21-21 51.31-21h252.3v60h-252.3q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v535.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h535.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-252.3h60v252.3Q820-182 799-161q-21 21-51.31 21H212.31Zm176.46-206.62-42.15-42.15L717.85-760H560v-60h260v260h-60v-157.85L388.77-346.62Z'/%3e%3c/svg%3e",
|
|
@@ -1029,8 +1033,22 @@ var BaseMotion = {
|
|
|
1029
1033
|
control: {
|
|
1030
1034
|
duration: 300,
|
|
1031
1035
|
easing: "ease"
|
|
1036
|
+
},
|
|
1037
|
+
snap: {
|
|
1038
|
+
duration: 120,
|
|
1039
|
+
easing: "ease"
|
|
1032
1040
|
}
|
|
1033
1041
|
};
|
|
1042
|
+
/**
|
|
1043
|
+
* The one wash every modal surface lays over the page it covers. Dialog and
|
|
1044
|
+
* drawer both point at `scrim` by name, so a theme redresses them together —
|
|
1045
|
+
* before this they owned a `backdrop` blob each and had drifted apart, the
|
|
1046
|
+
* dialog washing the page white and blurred while the drawer dimmed it dark.
|
|
1047
|
+
*/
|
|
1048
|
+
var BaseBackdrops = { scrim: {
|
|
1049
|
+
background: "rgba(255, 255, 255, 0.6)",
|
|
1050
|
+
backdropFilter: "blur(2px)"
|
|
1051
|
+
} };
|
|
1034
1052
|
var BaseRadii = {
|
|
1035
1053
|
none: "none",
|
|
1036
1054
|
xxs: "4px",
|
|
@@ -1105,7 +1123,7 @@ var buildComponents = (c) => ({
|
|
|
1105
1123
|
typeface: "label",
|
|
1106
1124
|
color: "on-background-variant",
|
|
1107
1125
|
currentColor: "on-background",
|
|
1108
|
-
|
|
1126
|
+
separatorIcon: "chevronRight",
|
|
1109
1127
|
gap: "xs"
|
|
1110
1128
|
} },
|
|
1111
1129
|
appBar: { options: {
|
|
@@ -1123,9 +1141,10 @@ var buildComponents = (c) => ({
|
|
|
1123
1141
|
divider: "light",
|
|
1124
1142
|
elevation: "menu",
|
|
1125
1143
|
padding: "md",
|
|
1126
|
-
backdrop:
|
|
1144
|
+
backdrop: "scrim",
|
|
1127
1145
|
scrim: true,
|
|
1128
|
-
background: "solid"
|
|
1146
|
+
background: "solid",
|
|
1147
|
+
motion: "panel"
|
|
1129
1148
|
} },
|
|
1130
1149
|
drawerHeader: { options: {
|
|
1131
1150
|
color: void 0,
|
|
@@ -1152,7 +1171,7 @@ var buildComponents = (c) => ({
|
|
|
1152
1171
|
options: {
|
|
1153
1172
|
borderRadius: "max",
|
|
1154
1173
|
typeface: "subtitle-2",
|
|
1155
|
-
|
|
1174
|
+
fallbackIcon: "profile"
|
|
1156
1175
|
},
|
|
1157
1176
|
variants: {
|
|
1158
1177
|
primary: {
|
|
@@ -1209,8 +1228,8 @@ var buildComponents = (c) => ({
|
|
|
1209
1228
|
ringWidth: 2
|
|
1210
1229
|
} },
|
|
1211
1230
|
searchInput: { options: {
|
|
1212
|
-
|
|
1213
|
-
|
|
1231
|
+
searchIcon: "search",
|
|
1232
|
+
clearIcon: "close",
|
|
1214
1233
|
listColor: "primary-surface",
|
|
1215
1234
|
listShadow: "menu",
|
|
1216
1235
|
listBorderRadius: "xs",
|
|
@@ -1219,6 +1238,7 @@ var buildComponents = (c) => ({
|
|
|
1219
1238
|
} },
|
|
1220
1239
|
checkbox: {
|
|
1221
1240
|
options: {
|
|
1241
|
+
motion: "control",
|
|
1222
1242
|
size: 20,
|
|
1223
1243
|
boxColor: "surface",
|
|
1224
1244
|
borderRadius: 2,
|
|
@@ -1240,17 +1260,18 @@ var buildComponents = (c) => ({
|
|
|
1240
1260
|
color: "primary-surface",
|
|
1241
1261
|
border: "quaternary",
|
|
1242
1262
|
padding: "sm",
|
|
1263
|
+
bodyPadding: void 0,
|
|
1264
|
+
inset: "lg",
|
|
1243
1265
|
elevation: "dialog",
|
|
1244
|
-
backdrop:
|
|
1245
|
-
|
|
1246
|
-
backdropFilter: "blur(2px)"
|
|
1247
|
-
}
|
|
1266
|
+
backdrop: "scrim",
|
|
1267
|
+
motion: "panel"
|
|
1248
1268
|
} },
|
|
1249
1269
|
dialogButtons: { options: {
|
|
1250
1270
|
gap: "md",
|
|
1251
1271
|
padding: "md",
|
|
1252
1272
|
paddingBottom: "lg",
|
|
1253
1273
|
justifyContent: "center",
|
|
1274
|
+
divider: void 0,
|
|
1254
1275
|
confirmButtonVariant: "primary",
|
|
1255
1276
|
cancelButtonVariant: "warn",
|
|
1256
1277
|
buttonSize: "lg",
|
|
@@ -1263,9 +1284,26 @@ var buildComponents = (c) => ({
|
|
|
1263
1284
|
height: 48,
|
|
1264
1285
|
textRole: "title-large",
|
|
1265
1286
|
textAlign: "center",
|
|
1287
|
+
divider: void 0,
|
|
1266
1288
|
closeButtonIcon: "close",
|
|
1267
1289
|
closeButtonSize: "md"
|
|
1268
1290
|
} },
|
|
1291
|
+
select: { options: {
|
|
1292
|
+
toggleIcon: "chevronDown",
|
|
1293
|
+
toggleColor: "on-background-variant",
|
|
1294
|
+
toggleSize: 20
|
|
1295
|
+
} },
|
|
1296
|
+
buttonGroup: { options: {
|
|
1297
|
+
border: "quaternary",
|
|
1298
|
+
borderRadius: 4
|
|
1299
|
+
} },
|
|
1300
|
+
progressBar: { options: {
|
|
1301
|
+
trackColor: "primary-surface",
|
|
1302
|
+
fillColor: "secondary-surface",
|
|
1303
|
+
completeColor: "secondary",
|
|
1304
|
+
borderColor: "on-background-variant",
|
|
1305
|
+
strokeWidth: 1
|
|
1306
|
+
} },
|
|
1269
1307
|
dropdown: { options: {
|
|
1270
1308
|
border: "none",
|
|
1271
1309
|
borderRadius: "xxs",
|
|
@@ -1293,7 +1331,7 @@ var buildComponents = (c) => ({
|
|
|
1293
1331
|
typeface: "label",
|
|
1294
1332
|
textColor: void 0,
|
|
1295
1333
|
hoverColor: "primary-container",
|
|
1296
|
-
|
|
1334
|
+
activeIcon: "check",
|
|
1297
1335
|
motion: "control"
|
|
1298
1336
|
},
|
|
1299
1337
|
variants: {
|
|
@@ -1317,7 +1355,7 @@ var buildComponents = (c) => ({
|
|
|
1317
1355
|
maxWidth: "38ch",
|
|
1318
1356
|
offset: 7,
|
|
1319
1357
|
arrowSize: 8,
|
|
1320
|
-
|
|
1358
|
+
closeIcon: "close",
|
|
1321
1359
|
headerTypeface: "title-small",
|
|
1322
1360
|
tooltipPadding: "4px 8px",
|
|
1323
1361
|
tooltipOpenDelay: 500,
|
|
@@ -1325,12 +1363,6 @@ var buildComponents = (c) => ({
|
|
|
1325
1363
|
motion: "panel"
|
|
1326
1364
|
} },
|
|
1327
1365
|
expand: { options: { motion: "reveal" } },
|
|
1328
|
-
footer: { options: {
|
|
1329
|
-
height: 52,
|
|
1330
|
-
color: "primary",
|
|
1331
|
-
logoHeight: 18.6,
|
|
1332
|
-
logoPadding: "md"
|
|
1333
|
-
} },
|
|
1334
1366
|
input: { options: {
|
|
1335
1367
|
typeface: "input",
|
|
1336
1368
|
color: "primary-surface",
|
|
@@ -1389,6 +1421,7 @@ var buildComponents = (c) => ({
|
|
|
1389
1421
|
}
|
|
1390
1422
|
},
|
|
1391
1423
|
tabs: { options: {
|
|
1424
|
+
motion: "snap",
|
|
1392
1425
|
typeface: "title-small",
|
|
1393
1426
|
textColor: "on-surface-variant",
|
|
1394
1427
|
activeTextColor: "primary",
|
|
@@ -1416,14 +1449,14 @@ var buildComponents = (c) => ({
|
|
|
1416
1449
|
typeface: "tag",
|
|
1417
1450
|
gap: "xs",
|
|
1418
1451
|
removeIcon: "close",
|
|
1419
|
-
selectedIcon: "check"
|
|
1452
|
+
selectedIcon: "check",
|
|
1453
|
+
motion: "control"
|
|
1420
1454
|
},
|
|
1421
1455
|
fixed: {
|
|
1422
1456
|
display: "inline-flex",
|
|
1423
1457
|
alignItems: "center",
|
|
1424
1458
|
maxWidth: "100%",
|
|
1425
|
-
border: "1px solid transparent"
|
|
1426
|
-
transition: "background-color .2s ease, color .2s ease"
|
|
1459
|
+
border: "1px solid transparent"
|
|
1427
1460
|
},
|
|
1428
1461
|
variants: {
|
|
1429
1462
|
...tagVariant(c, "primary"),
|
|
@@ -1489,8 +1522,8 @@ var buildComponents = (c) => ({
|
|
|
1489
1522
|
dayBorderRadius: "max",
|
|
1490
1523
|
typeface: "label",
|
|
1491
1524
|
gap: "xxs",
|
|
1492
|
-
|
|
1493
|
-
|
|
1525
|
+
navPrevIcon: "chevronLeft",
|
|
1526
|
+
navNextIcon: "chevronRight",
|
|
1494
1527
|
weekdayFormat: "short",
|
|
1495
1528
|
showOutsideDays: false,
|
|
1496
1529
|
todayStyle: "outline"
|
|
@@ -1529,13 +1562,13 @@ var buildComponents = (c) => ({
|
|
|
1529
1562
|
descriptionColor: "on-primary-surface-variant"
|
|
1530
1563
|
} },
|
|
1531
1564
|
dateInput: { options: {
|
|
1532
|
-
|
|
1565
|
+
toggleIcon: "calendar",
|
|
1533
1566
|
popupShadow: "menu",
|
|
1534
1567
|
popupBorderRadius: "xs",
|
|
1535
1568
|
popupColor: "primary-surface"
|
|
1536
1569
|
} },
|
|
1537
1570
|
timeInput: { options: {
|
|
1538
|
-
|
|
1571
|
+
toggleIcon: "clock",
|
|
1539
1572
|
listColor: "primary-surface",
|
|
1540
1573
|
listShadow: "menu",
|
|
1541
1574
|
listBorderRadius: "xs",
|
|
@@ -1549,15 +1582,15 @@ var buildComponents = (c) => ({
|
|
|
1549
1582
|
button: {
|
|
1550
1583
|
options: {
|
|
1551
1584
|
borderRadius: "max",
|
|
1552
|
-
typeface: "button"
|
|
1585
|
+
typeface: "button",
|
|
1586
|
+
motion: "control"
|
|
1553
1587
|
},
|
|
1554
1588
|
fixed: {
|
|
1555
1589
|
position: "relative",
|
|
1556
1590
|
overflow: "hidden",
|
|
1557
1591
|
outline: "0",
|
|
1558
1592
|
border: "0",
|
|
1559
|
-
cursor: "pointer"
|
|
1560
|
-
transition: "all 0.28s ease"
|
|
1593
|
+
cursor: "pointer"
|
|
1561
1594
|
},
|
|
1562
1595
|
variantOptions: {
|
|
1563
1596
|
primary: { focusColor: "primary" },
|
|
@@ -1638,7 +1671,10 @@ var buildComponents = (c) => ({
|
|
|
1638
1671
|
}
|
|
1639
1672
|
},
|
|
1640
1673
|
iconButton: {
|
|
1641
|
-
options: {
|
|
1674
|
+
options: {
|
|
1675
|
+
borderRadius: "max",
|
|
1676
|
+
motion: "control"
|
|
1677
|
+
},
|
|
1642
1678
|
variantOptions: {
|
|
1643
1679
|
primary: { focusColor: "primary" },
|
|
1644
1680
|
secondary: { focusColor: "secondary" },
|
|
@@ -1715,6 +1751,13 @@ var buildComponents = (c) => ({
|
|
|
1715
1751
|
}
|
|
1716
1752
|
}
|
|
1717
1753
|
},
|
|
1754
|
+
inlineButton: { options: {
|
|
1755
|
+
linkColor: "primary",
|
|
1756
|
+
underline: false,
|
|
1757
|
+
underlineOnHover: true,
|
|
1758
|
+
underlineOffset: "0.15em",
|
|
1759
|
+
gap: "xxs"
|
|
1760
|
+
} },
|
|
1718
1761
|
progressGauge: {
|
|
1719
1762
|
fixed: { textFill: c["on-background"] },
|
|
1720
1763
|
variants: {
|
|
@@ -1750,7 +1793,8 @@ var buildComponents = (c) => ({
|
|
|
1750
1793
|
options: { borderRadius: "xs" },
|
|
1751
1794
|
fixed: {
|
|
1752
1795
|
overflow: "hidden",
|
|
1753
|
-
backgroundColor: c.background
|
|
1796
|
+
backgroundColor: c.background,
|
|
1797
|
+
color: c["on-background"]
|
|
1754
1798
|
}
|
|
1755
1799
|
},
|
|
1756
1800
|
cardHeader: {
|
|
@@ -1786,6 +1830,7 @@ var buildComponents = (c) => ({
|
|
|
1786
1830
|
placeholderColor: "disabled"
|
|
1787
1831
|
} },
|
|
1788
1832
|
dataTable: { options: {
|
|
1833
|
+
motion: "control",
|
|
1789
1834
|
color: "primary-surface",
|
|
1790
1835
|
border: "light",
|
|
1791
1836
|
borderRadius: "sm",
|
|
@@ -1849,7 +1894,7 @@ var buildComponents = (c) => ({
|
|
|
1849
1894
|
tooltipTextColor: "on-inverse-surface",
|
|
1850
1895
|
tooltipShadow: "menu",
|
|
1851
1896
|
tooltipBorderRadius: "xs",
|
|
1852
|
-
|
|
1897
|
+
motion: "snap"
|
|
1853
1898
|
} },
|
|
1854
1899
|
skeleton: { options: {
|
|
1855
1900
|
color: "surface-variant",
|
|
@@ -1898,6 +1943,7 @@ var buildComponents = (c) => ({
|
|
|
1898
1943
|
}
|
|
1899
1944
|
},
|
|
1900
1945
|
tooltip: { options: {
|
|
1946
|
+
motion: "notification",
|
|
1901
1947
|
border: void 0,
|
|
1902
1948
|
borderRadius: "xs",
|
|
1903
1949
|
shadow: "raised",
|
|
@@ -1912,7 +1958,7 @@ var buildComponents = (c) => ({
|
|
|
1912
1958
|
padding: "16px",
|
|
1913
1959
|
headerTypeface: "title-small",
|
|
1914
1960
|
typeface: "label",
|
|
1915
|
-
|
|
1961
|
+
closeIcon: "close",
|
|
1916
1962
|
arrowSize: 8,
|
|
1917
1963
|
offset: 12,
|
|
1918
1964
|
scrimColor: "rgba(0, 0, 0, 0.45)",
|
|
@@ -1933,7 +1979,7 @@ var deepMerge = (base, override) => {
|
|
|
1933
1979
|
for (const [key, value] of Object.entries(override)) out[key] = isRecord$1(value) && isRecord$1(out[key]) ? deepMerge(out[key], value) : value;
|
|
1934
1980
|
return out;
|
|
1935
1981
|
};
|
|
1936
|
-
var createTheme = ({ id, name, colors, icons = {}, radii = BaseRadii, shadows = BaseShadows, motion, typography, borders, thicknesses, spacing, components }) => ({
|
|
1982
|
+
var createTheme = ({ id, name, colors, icons = {}, radii = BaseRadii, shadows = BaseShadows, motion, backdrops, typography, borders, thicknesses, spacing, components }) => ({
|
|
1937
1983
|
id,
|
|
1938
1984
|
name,
|
|
1939
1985
|
colors,
|
|
@@ -1949,6 +1995,10 @@ var createTheme = ({ id, name, colors, icons = {}, radii = BaseRadii, shadows =
|
|
|
1949
1995
|
...BaseMotion,
|
|
1950
1996
|
...motion
|
|
1951
1997
|
},
|
|
1998
|
+
backdrops: {
|
|
1999
|
+
...BaseBackdrops,
|
|
2000
|
+
...backdrops
|
|
2001
|
+
},
|
|
1952
2002
|
thicknesses: {
|
|
1953
2003
|
...BaseThicknesses,
|
|
1954
2004
|
...thicknesses
|