@uni-design-system/uni-core 10.4.0 → 11.1.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 +126 -0
- package/dist/cjs/index.cjs +103 -34
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +103 -34
- 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/themes/base.theme.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,131 @@
|
|
|
1
1
|
# @uni-design-system/uni-core
|
|
2
2
|
|
|
3
|
+
## 11.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`d00b2fe`](https://github.com/uni-design-system/uni/commit/d00b2fee1ef456c546f4d2b0a479cb695962d7c9) Thanks [@gaenglish](https://github.com/gaenglish)! - Selection, hover and density become theme decisions on `uni-tag`, and add `uni-tag-group`.
|
|
8
|
+
|
|
9
|
+
`uni-tag` had the right axes but made the app do the work. `selected` painted nothing — it set `aria-pressed` and swapped the lead glyph — so every toggle chip in app markup carried a `[tone]="on() ? 'solid' : 'soft'"` of its own. Interactive chips had no hover state at all. The selected check was added rather than reserved, so picking a chip reflowed the whole row.
|
|
10
|
+
|
|
11
|
+
**Selection paints itself.** A selected chip adds a `tag-selected` class and an interactive one adds `tag-interactive`, both as much public theme contract as `&.tone-*` already was. The base theme's `tag` variants use them: selection promotes a chip to its role's solid pair at every tone (`solid` deepens instead of refilling), and `&.tag-interactive:hover` is a `brightness(0.95)` wash that darkens fill, ink and edge together. A theme restyling either writes the rules per variant, beside the colours they belong to.
|
|
12
|
+
|
|
13
|
+
**A toggle chip holds the check's place.** Bind `selected` and the chip reserves the glyph's footprint while unselected, so picking one never resizes it. A chip that already has a lead needs no slot — the check replaces the avatar or icon at identical width.
|
|
14
|
+
|
|
15
|
+
**`uni-tag-group`** is a row of chips the user picks from. It renders its own chips from `items` and owns the two things an app was otherwise wiring per chip: which one is selected (`value`, plus `multiple`) and which one holds the tab stop. Keyboard model is the toolbar pattern — one tab stop for the whole row, arrow keys within it, on both axes because the row wraps. `layout="justify"` stretches each filled row flush to both edges and leaves the last row at its natural widths, the way justified text leaves its last line alone. It is themed as **`tagGroup`** (`gap`, `rowGap`, `chipSize`, `chipTone`, `chipVariant`), layout only — every colour decision stays on the chips, so a group restyles with them.
|
|
16
|
+
|
|
17
|
+
**Visual changes to every existing chip**, including the chips inside `uni-tag-input`:
|
|
18
|
+
- A lead element and the remove control now **tuck into the rounded end** instead of starting where the radius ends — each sits concentric with the curve it is in, so a small status dot sits further in than a full lead box. A lead is balanced against, so the **label sits centred**; the tuck costs less than the old gutter did, so that balance is largely paid for rather than added. A remove control is not balanced against on its own, since it reads as an affordance rather than as content — a chip with nothing but a remove button keeps its gutter and simply tucks the glyph. A chip whose ends are too square to flow into (`borderRadius: 'xs'`) keeps the size token's gutter at both ends.
|
|
19
|
+
- The `tag` typeface drops from **weight 600 to 500**. Geometry is unchanged; what made these chips read louder than the ones they replaced was the weight, not the size.
|
|
20
|
+
- `border-color` and `filter` join the transition list, so an outline↔solid change fades its edge instead of snapping while the fill animates, and the hover wash fades in.
|
|
21
|
+
|
|
22
|
+
New `tag` theme option **`endInset`** (`number | 'auto'`) sets how far that tuck goes; `auto` derives it from the chip so the lead sits concentric with the cap. The `tag` size tokens now state `paddingInline` rather than a `padding` shorthand, since the chip reads that number back to balance the label — a theme still stating the shorthand is parsed as before.
|
|
23
|
+
|
|
24
|
+
`UniTagComponent` is now generic in its value (`UniTagComponent<T extends UniTagValue = UniTagValue>`), so `value`, `removed` and `activated` carry an app's own type and `$event` flows without a closure. The default type parameter leaves every existing use compiling unchanged.
|
|
25
|
+
|
|
26
|
+
## 11.0.0
|
|
27
|
+
|
|
28
|
+
### Major Changes
|
|
29
|
+
|
|
30
|
+
- [`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.
|
|
31
|
+
|
|
32
|
+
Two consequences of the framework's own changes:
|
|
33
|
+
|
|
34
|
+
**`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.
|
|
35
|
+
|
|
36
|
+
**`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`.
|
|
37
|
+
|
|
38
|
+
Angular 22 also makes `OnPush` the default change detection; every component here already set it explicitly.
|
|
39
|
+
|
|
40
|
+
- [`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.
|
|
41
|
+
|
|
42
|
+
**`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.
|
|
43
|
+
|
|
44
|
+
```html
|
|
45
|
+
Your data is processed under the terms you accepted. You can
|
|
46
|
+
<button inline-button underline link>review them</button> at any time.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
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.
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
|
|
53
|
+
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.
|
|
54
|
+
|
|
55
|
+
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.
|
|
56
|
+
|
|
57
|
+
**`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.
|
|
58
|
+
|
|
59
|
+
- [`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.
|
|
60
|
+
|
|
61
|
+
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.
|
|
62
|
+
|
|
63
|
+
Timings move where the literal and the token disagreed:
|
|
64
|
+
|
|
65
|
+
| | before | after | token |
|
|
66
|
+
| ----------------------------------------- | ----------------- | ----------------- | -------------- |
|
|
67
|
+
| button, icon-button, data-table row hover | 280ms ease | 300ms ease | `control` |
|
|
68
|
+
| checkbox box and dash | 200ms ease | 300ms ease | `control` |
|
|
69
|
+
| checkbox tick (drawn, trails the box) | 500ms ease | 350ms ease-in-out | `reveal` |
|
|
70
|
+
| tabs ink and indicator | 150ms ease | 120ms ease | `snap` |
|
|
71
|
+
| combobox chevron | 150ms ease | 100ms linear | `popup` |
|
|
72
|
+
| tag fill and ink | 200ms ease | 300ms ease | `control` |
|
|
73
|
+
| sort-header arrow | 350ms ease-in-out | 300ms ease | `control` |
|
|
74
|
+
| alert, snackbar dismiss | 300ms | 350ms | `notification` |
|
|
75
|
+
| data-table detail expand | 300ms ease | 350ms ease-in-out | `reveal` |
|
|
76
|
+
| tooltip fade, data-table loading overlay | 350ms | unchanged | `notification` |
|
|
77
|
+
|
|
78
|
+
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.
|
|
79
|
+
|
|
80
|
+
`uni-skeleton` still stays out: its shimmer is a loop, not a transition.
|
|
81
|
+
|
|
82
|
+
- [`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.
|
|
83
|
+
|
|
84
|
+
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.
|
|
85
|
+
|
|
86
|
+
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.
|
|
87
|
+
|
|
88
|
+
Themes setting `slider.transitionMs` should set `motion.snap` instead, which also retimes anything else pointed at that token.
|
|
89
|
+
|
|
90
|
+
- [`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`:
|
|
91
|
+
|
|
92
|
+
| Component | before | after |
|
|
93
|
+
| ---------------------- | --------------------------------- | ------------------------------------- |
|
|
94
|
+
| date-input, time-input | `toggleSymbol` | `toggleIcon` (`calendar`, `clock`) |
|
|
95
|
+
| calendar | `navPrevSymbol` / `navNextSymbol` | `navPrevIcon` / `navNextIcon` |
|
|
96
|
+
| menu-item | `activeSymbol` | `activeIcon` |
|
|
97
|
+
| avatar | `fallbackSymbol` | `fallbackIcon` (`person` → `profile`) |
|
|
98
|
+
| breadcrumb | `separatorSymbol` | `separatorIcon` |
|
|
99
|
+
| search-input | `searchSymbol` / `clearSymbol` | `searchIcon` / `clearIcon` |
|
|
100
|
+
| callout, popover | `closeSymbol` | `closeIcon` |
|
|
101
|
+
|
|
102
|
+
`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.
|
|
103
|
+
|
|
104
|
+
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.
|
|
105
|
+
|
|
106
|
+
**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 })`.
|
|
107
|
+
|
|
108
|
+
`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.
|
|
109
|
+
|
|
110
|
+
- [`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.
|
|
111
|
+
|
|
112
|
+
`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`.
|
|
113
|
+
|
|
114
|
+
`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:
|
|
115
|
+
- **`select`** — `toggleIcon`, `toggleColor`, `toggleSize` for the dropdown affordance, matching `uni-combobox`'s (`chevronDown`, `on-background-variant`, 20).
|
|
116
|
+
- **`buttonGroup`** — `border` and `borderRadius` for the segmented frame, previously a literal `quaternary` border and 4px corners.
|
|
117
|
+
- **`progressBar`** — `trackColor`, `fillColor`, `completeColor`, `borderColor` and `strokeWidth`, previously read straight off the palette.
|
|
118
|
+
|
|
119
|
+
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.
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- [`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.
|
|
124
|
+
|
|
125
|
+
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.
|
|
126
|
+
|
|
127
|
+
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.
|
|
128
|
+
|
|
3
129
|
## 10.4.0
|
|
4
130
|
|
|
5
131
|
### 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",
|
|
@@ -965,7 +969,7 @@ var BaseTypography = {
|
|
|
965
969
|
fontFamily: "Red Hat Display",
|
|
966
970
|
fontSize: 15,
|
|
967
971
|
lineHeight: 20,
|
|
968
|
-
fontWeight:
|
|
972
|
+
fontWeight: 500
|
|
969
973
|
},
|
|
970
974
|
input: {
|
|
971
975
|
fontFamily: "Red Hat Display",
|
|
@@ -1029,6 +1033,10 @@ 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
|
};
|
|
1034
1042
|
/**
|
|
@@ -1094,14 +1102,26 @@ var SELECTION_ACCENTS = {
|
|
|
1094
1102
|
var tagVariant = (c, role) => ({ [role]: {
|
|
1095
1103
|
backgroundColor: c[`${role}-container`],
|
|
1096
1104
|
color: c[`on-${role}-container`],
|
|
1097
|
-
"&.
|
|
1105
|
+
"&.tag-selected": {
|
|
1098
1106
|
backgroundColor: c[role],
|
|
1099
1107
|
color: c[`on-${role}`]
|
|
1100
1108
|
},
|
|
1109
|
+
"&.tag-interactive:hover": { filter: "brightness(0.95)" },
|
|
1110
|
+
"&.tone-solid": {
|
|
1111
|
+
backgroundColor: c[role],
|
|
1112
|
+
color: c[`on-${role}`],
|
|
1113
|
+
"&.tag-selected": { filter: "brightness(0.9)" },
|
|
1114
|
+
"&.tag-selected.tag-interactive:hover": { filter: "brightness(0.85)" }
|
|
1115
|
+
},
|
|
1101
1116
|
"&.tone-outline": {
|
|
1102
1117
|
backgroundColor: "transparent",
|
|
1103
1118
|
color: c[role],
|
|
1104
|
-
borderColor: c[`on-${role}-container-border`] ?? c[role]
|
|
1119
|
+
borderColor: c[`on-${role}-container-border`] ?? c[role],
|
|
1120
|
+
"&.tag-selected": {
|
|
1121
|
+
backgroundColor: c[role],
|
|
1122
|
+
color: c[`on-${role}`],
|
|
1123
|
+
borderColor: c[role]
|
|
1124
|
+
}
|
|
1105
1125
|
}
|
|
1106
1126
|
} });
|
|
1107
1127
|
var buildComponents = (c) => ({
|
|
@@ -1115,7 +1135,7 @@ var buildComponents = (c) => ({
|
|
|
1115
1135
|
typeface: "label",
|
|
1116
1136
|
color: "on-background-variant",
|
|
1117
1137
|
currentColor: "on-background",
|
|
1118
|
-
|
|
1138
|
+
separatorIcon: "chevronRight",
|
|
1119
1139
|
gap: "xs"
|
|
1120
1140
|
} },
|
|
1121
1141
|
appBar: { options: {
|
|
@@ -1163,7 +1183,7 @@ var buildComponents = (c) => ({
|
|
|
1163
1183
|
options: {
|
|
1164
1184
|
borderRadius: "max",
|
|
1165
1185
|
typeface: "subtitle-2",
|
|
1166
|
-
|
|
1186
|
+
fallbackIcon: "profile"
|
|
1167
1187
|
},
|
|
1168
1188
|
variants: {
|
|
1169
1189
|
primary: {
|
|
@@ -1220,8 +1240,8 @@ var buildComponents = (c) => ({
|
|
|
1220
1240
|
ringWidth: 2
|
|
1221
1241
|
} },
|
|
1222
1242
|
searchInput: { options: {
|
|
1223
|
-
|
|
1224
|
-
|
|
1243
|
+
searchIcon: "search",
|
|
1244
|
+
clearIcon: "close",
|
|
1225
1245
|
listColor: "primary-surface",
|
|
1226
1246
|
listShadow: "menu",
|
|
1227
1247
|
listBorderRadius: "xs",
|
|
@@ -1230,6 +1250,7 @@ var buildComponents = (c) => ({
|
|
|
1230
1250
|
} },
|
|
1231
1251
|
checkbox: {
|
|
1232
1252
|
options: {
|
|
1253
|
+
motion: "control",
|
|
1233
1254
|
size: 20,
|
|
1234
1255
|
boxColor: "surface",
|
|
1235
1256
|
borderRadius: 2,
|
|
@@ -1279,6 +1300,22 @@ var buildComponents = (c) => ({
|
|
|
1279
1300
|
closeButtonIcon: "close",
|
|
1280
1301
|
closeButtonSize: "md"
|
|
1281
1302
|
} },
|
|
1303
|
+
select: { options: {
|
|
1304
|
+
toggleIcon: "chevronDown",
|
|
1305
|
+
toggleColor: "on-background-variant",
|
|
1306
|
+
toggleSize: 20
|
|
1307
|
+
} },
|
|
1308
|
+
buttonGroup: { options: {
|
|
1309
|
+
border: "quaternary",
|
|
1310
|
+
borderRadius: 4
|
|
1311
|
+
} },
|
|
1312
|
+
progressBar: { options: {
|
|
1313
|
+
trackColor: "primary-surface",
|
|
1314
|
+
fillColor: "secondary-surface",
|
|
1315
|
+
completeColor: "secondary",
|
|
1316
|
+
borderColor: "on-background-variant",
|
|
1317
|
+
strokeWidth: 1
|
|
1318
|
+
} },
|
|
1282
1319
|
dropdown: { options: {
|
|
1283
1320
|
border: "none",
|
|
1284
1321
|
borderRadius: "xxs",
|
|
@@ -1306,7 +1343,7 @@ var buildComponents = (c) => ({
|
|
|
1306
1343
|
typeface: "label",
|
|
1307
1344
|
textColor: void 0,
|
|
1308
1345
|
hoverColor: "primary-container",
|
|
1309
|
-
|
|
1346
|
+
activeIcon: "check",
|
|
1310
1347
|
motion: "control"
|
|
1311
1348
|
},
|
|
1312
1349
|
variants: {
|
|
@@ -1330,7 +1367,7 @@ var buildComponents = (c) => ({
|
|
|
1330
1367
|
maxWidth: "38ch",
|
|
1331
1368
|
offset: 7,
|
|
1332
1369
|
arrowSize: 8,
|
|
1333
|
-
|
|
1370
|
+
closeIcon: "close",
|
|
1334
1371
|
headerTypeface: "title-small",
|
|
1335
1372
|
tooltipPadding: "4px 8px",
|
|
1336
1373
|
tooltipOpenDelay: 500,
|
|
@@ -1338,12 +1375,6 @@ var buildComponents = (c) => ({
|
|
|
1338
1375
|
motion: "panel"
|
|
1339
1376
|
} },
|
|
1340
1377
|
expand: { options: { motion: "reveal" } },
|
|
1341
|
-
footer: { options: {
|
|
1342
|
-
height: 52,
|
|
1343
|
-
color: "primary",
|
|
1344
|
-
logoHeight: 18.6,
|
|
1345
|
-
logoPadding: "md"
|
|
1346
|
-
} },
|
|
1347
1378
|
input: { options: {
|
|
1348
1379
|
typeface: "input",
|
|
1349
1380
|
color: "primary-surface",
|
|
@@ -1402,6 +1433,7 @@ var buildComponents = (c) => ({
|
|
|
1402
1433
|
}
|
|
1403
1434
|
},
|
|
1404
1435
|
tabs: { options: {
|
|
1436
|
+
motion: "snap",
|
|
1405
1437
|
typeface: "title-small",
|
|
1406
1438
|
textColor: "on-surface-variant",
|
|
1407
1439
|
activeTextColor: "primary",
|
|
@@ -1429,14 +1461,15 @@ var buildComponents = (c) => ({
|
|
|
1429
1461
|
typeface: "tag",
|
|
1430
1462
|
gap: "xs",
|
|
1431
1463
|
removeIcon: "close",
|
|
1432
|
-
selectedIcon: "check"
|
|
1464
|
+
selectedIcon: "check",
|
|
1465
|
+
motion: "control",
|
|
1466
|
+
endInset: "auto"
|
|
1433
1467
|
},
|
|
1434
1468
|
fixed: {
|
|
1435
1469
|
display: "inline-flex",
|
|
1436
1470
|
alignItems: "center",
|
|
1437
1471
|
maxWidth: "100%",
|
|
1438
|
-
border: "1px solid transparent"
|
|
1439
|
-
transition: "background-color .2s ease, color .2s ease"
|
|
1472
|
+
border: "1px solid transparent"
|
|
1440
1473
|
},
|
|
1441
1474
|
variants: {
|
|
1442
1475
|
...tagVariant(c, "primary"),
|
|
@@ -1447,13 +1480,25 @@ var buildComponents = (c) => ({
|
|
|
1447
1480
|
ghost: {
|
|
1448
1481
|
backgroundColor: "transparent",
|
|
1449
1482
|
color: c["on-background"],
|
|
1450
|
-
"&.
|
|
1483
|
+
"&.tag-selected": {
|
|
1451
1484
|
backgroundColor: c["surface-variant"],
|
|
1452
1485
|
color: c["on-surface-variant"]
|
|
1453
1486
|
},
|
|
1487
|
+
"&.tag-interactive:hover": { filter: "brightness(0.95)" },
|
|
1488
|
+
"&.tone-solid": {
|
|
1489
|
+
backgroundColor: c["surface-variant"],
|
|
1490
|
+
color: c["on-surface-variant"],
|
|
1491
|
+
"&.tag-selected": { filter: "brightness(0.9)" },
|
|
1492
|
+
"&.tag-selected.tag-interactive:hover": { filter: "brightness(0.85)" }
|
|
1493
|
+
},
|
|
1454
1494
|
"&.tone-outline": {
|
|
1455
1495
|
backgroundColor: "transparent",
|
|
1456
|
-
borderColor: c.outline
|
|
1496
|
+
borderColor: c.outline,
|
|
1497
|
+
"&.tag-selected": {
|
|
1498
|
+
backgroundColor: c["surface-variant"],
|
|
1499
|
+
color: c["on-surface-variant"],
|
|
1500
|
+
borderColor: c.outline
|
|
1501
|
+
}
|
|
1457
1502
|
}
|
|
1458
1503
|
},
|
|
1459
1504
|
disabled: {
|
|
@@ -1473,20 +1518,31 @@ var buildComponents = (c) => ({
|
|
|
1473
1518
|
sm: {
|
|
1474
1519
|
height: 20,
|
|
1475
1520
|
fontSize: 12,
|
|
1476
|
-
|
|
1521
|
+
paddingInline: 8
|
|
1477
1522
|
},
|
|
1478
1523
|
md: {
|
|
1479
1524
|
height: 24,
|
|
1480
1525
|
fontSize: 13,
|
|
1481
|
-
|
|
1526
|
+
paddingInline: 10
|
|
1482
1527
|
},
|
|
1483
1528
|
lg: {
|
|
1484
1529
|
height: 32,
|
|
1485
1530
|
fontSize: 15,
|
|
1486
|
-
|
|
1531
|
+
paddingInline: 12
|
|
1487
1532
|
}
|
|
1488
1533
|
}
|
|
1489
1534
|
},
|
|
1535
|
+
tagGroup: {
|
|
1536
|
+
options: {
|
|
1537
|
+
gap: "xs",
|
|
1538
|
+
rowGap: "xs"
|
|
1539
|
+
},
|
|
1540
|
+
fixed: {
|
|
1541
|
+
display: "flex",
|
|
1542
|
+
flexWrap: "wrap",
|
|
1543
|
+
alignItems: "center"
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1490
1546
|
tagInput: { options: {
|
|
1491
1547
|
chipGap: "xs",
|
|
1492
1548
|
chipSize: "md",
|
|
@@ -1502,8 +1558,8 @@ var buildComponents = (c) => ({
|
|
|
1502
1558
|
dayBorderRadius: "max",
|
|
1503
1559
|
typeface: "label",
|
|
1504
1560
|
gap: "xxs",
|
|
1505
|
-
|
|
1506
|
-
|
|
1561
|
+
navPrevIcon: "chevronLeft",
|
|
1562
|
+
navNextIcon: "chevronRight",
|
|
1507
1563
|
weekdayFormat: "short",
|
|
1508
1564
|
showOutsideDays: false,
|
|
1509
1565
|
todayStyle: "outline"
|
|
@@ -1542,13 +1598,13 @@ var buildComponents = (c) => ({
|
|
|
1542
1598
|
descriptionColor: "on-primary-surface-variant"
|
|
1543
1599
|
} },
|
|
1544
1600
|
dateInput: { options: {
|
|
1545
|
-
|
|
1601
|
+
toggleIcon: "calendar",
|
|
1546
1602
|
popupShadow: "menu",
|
|
1547
1603
|
popupBorderRadius: "xs",
|
|
1548
1604
|
popupColor: "primary-surface"
|
|
1549
1605
|
} },
|
|
1550
1606
|
timeInput: { options: {
|
|
1551
|
-
|
|
1607
|
+
toggleIcon: "clock",
|
|
1552
1608
|
listColor: "primary-surface",
|
|
1553
1609
|
listShadow: "menu",
|
|
1554
1610
|
listBorderRadius: "xs",
|
|
@@ -1562,15 +1618,15 @@ var buildComponents = (c) => ({
|
|
|
1562
1618
|
button: {
|
|
1563
1619
|
options: {
|
|
1564
1620
|
borderRadius: "max",
|
|
1565
|
-
typeface: "button"
|
|
1621
|
+
typeface: "button",
|
|
1622
|
+
motion: "control"
|
|
1566
1623
|
},
|
|
1567
1624
|
fixed: {
|
|
1568
1625
|
position: "relative",
|
|
1569
1626
|
overflow: "hidden",
|
|
1570
1627
|
outline: "0",
|
|
1571
1628
|
border: "0",
|
|
1572
|
-
cursor: "pointer"
|
|
1573
|
-
transition: "all 0.28s ease"
|
|
1629
|
+
cursor: "pointer"
|
|
1574
1630
|
},
|
|
1575
1631
|
variantOptions: {
|
|
1576
1632
|
primary: { focusColor: "primary" },
|
|
@@ -1651,7 +1707,10 @@ var buildComponents = (c) => ({
|
|
|
1651
1707
|
}
|
|
1652
1708
|
},
|
|
1653
1709
|
iconButton: {
|
|
1654
|
-
options: {
|
|
1710
|
+
options: {
|
|
1711
|
+
borderRadius: "max",
|
|
1712
|
+
motion: "control"
|
|
1713
|
+
},
|
|
1655
1714
|
variantOptions: {
|
|
1656
1715
|
primary: { focusColor: "primary" },
|
|
1657
1716
|
secondary: { focusColor: "secondary" },
|
|
@@ -1728,6 +1787,13 @@ var buildComponents = (c) => ({
|
|
|
1728
1787
|
}
|
|
1729
1788
|
}
|
|
1730
1789
|
},
|
|
1790
|
+
inlineButton: { options: {
|
|
1791
|
+
linkColor: "primary",
|
|
1792
|
+
underline: false,
|
|
1793
|
+
underlineOnHover: true,
|
|
1794
|
+
underlineOffset: "0.15em",
|
|
1795
|
+
gap: "xxs"
|
|
1796
|
+
} },
|
|
1731
1797
|
progressGauge: {
|
|
1732
1798
|
fixed: { textFill: c["on-background"] },
|
|
1733
1799
|
variants: {
|
|
@@ -1763,7 +1829,8 @@ var buildComponents = (c) => ({
|
|
|
1763
1829
|
options: { borderRadius: "xs" },
|
|
1764
1830
|
fixed: {
|
|
1765
1831
|
overflow: "hidden",
|
|
1766
|
-
backgroundColor: c.background
|
|
1832
|
+
backgroundColor: c.background,
|
|
1833
|
+
color: c["on-background"]
|
|
1767
1834
|
}
|
|
1768
1835
|
},
|
|
1769
1836
|
cardHeader: {
|
|
@@ -1799,6 +1866,7 @@ var buildComponents = (c) => ({
|
|
|
1799
1866
|
placeholderColor: "disabled"
|
|
1800
1867
|
} },
|
|
1801
1868
|
dataTable: { options: {
|
|
1869
|
+
motion: "control",
|
|
1802
1870
|
color: "primary-surface",
|
|
1803
1871
|
border: "light",
|
|
1804
1872
|
borderRadius: "sm",
|
|
@@ -1862,7 +1930,7 @@ var buildComponents = (c) => ({
|
|
|
1862
1930
|
tooltipTextColor: "on-inverse-surface",
|
|
1863
1931
|
tooltipShadow: "menu",
|
|
1864
1932
|
tooltipBorderRadius: "xs",
|
|
1865
|
-
|
|
1933
|
+
motion: "snap"
|
|
1866
1934
|
} },
|
|
1867
1935
|
skeleton: { options: {
|
|
1868
1936
|
color: "surface-variant",
|
|
@@ -1911,6 +1979,7 @@ var buildComponents = (c) => ({
|
|
|
1911
1979
|
}
|
|
1912
1980
|
},
|
|
1913
1981
|
tooltip: { options: {
|
|
1982
|
+
motion: "notification",
|
|
1914
1983
|
border: void 0,
|
|
1915
1984
|
borderRadius: "xs",
|
|
1916
1985
|
shadow: "raised",
|
|
@@ -1925,7 +1994,7 @@ var buildComponents = (c) => ({
|
|
|
1925
1994
|
padding: "16px",
|
|
1926
1995
|
headerTypeface: "title-small",
|
|
1927
1996
|
typeface: "label",
|
|
1928
|
-
|
|
1997
|
+
closeIcon: "close",
|
|
1929
1998
|
arrowSize: 8,
|
|
1930
1999
|
offset: 12,
|
|
1931
2000
|
scrimColor: "rgba(0, 0, 0, 0.45)",
|