@espressif/dashboard-ui-components 1.1.2 → 1.2.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 +125 -1
- package/dist/assets/entry-layout-bg-JPI7GJ42.webp +0 -0
- package/dist/{chunk-J7YNQMAC.js → chunk-742PUXQ6.js} +1 -1
- package/dist/{chunk-MOYKF2ZC.js → chunk-KF3NDMZW.js} +18455 -986
- package/dist/chunk-TRTQSARU.js +31 -0
- package/dist/chunk-W2L5GRI2.js +488 -0
- package/dist/common/index.js +3 -2
- package/dist/components/index.d.ts +154 -2
- package/dist/components/index.js +2 -1
- package/dist/core/index.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -3
- package/dist/layouts/index.js +2 -1
- package/dist/tailwind-preset.js +2 -0
- package/dist/utils/index.js +1 -0
- package/package.json +6 -3
- package/src/styles/globals.css +6 -0
- package/dist/chunk-WK4PTIOA.js +0 -488
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,131 @@ All notable changes to this project are documented here. The format is based on
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres
|
|
5
5
|
to [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [1.2.0] - 2026-08-26
|
|
8
|
+
|
|
9
|
+
A minor release that adds two new components (`Carousel`, `InputOTP`), extends
|
|
10
|
+
localisation on `KeyValueManager`, and reworks how solid-surface icon cards
|
|
11
|
+
render their inner disc so the glyph stays legible.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **`Carousel`** — new component. Built on Embla Carousel with the autoplay
|
|
15
|
+
plugin. Slides are supplied as `data` (each with a stable `id`); `orientation`
|
|
16
|
+
chooses `horizontal` / `vertical`; `navigation` selects between built-in
|
|
17
|
+
`dots`, `arrows`, or a `custom` renderer that receives a
|
|
18
|
+
`CarouselNavigationState` (`canScrollPrev` / `canScrollNext`,
|
|
19
|
+
`selectedIndex`, `scrollSnaps`, `scrollPrev` / `scrollNext` / `scrollTo`).
|
|
20
|
+
`maxDots` caps the pagination row at a sliding window (clamped to `[1, 10]`,
|
|
21
|
+
default `5`). `autoplay` + `delay` (clamped to `[1000, 10000]` ms, default
|
|
22
|
+
`3000`) drive automatic advancement; `loop` wraps at the ends. `onNext` /
|
|
23
|
+
`onPrevious` fire after every direction change (user, keyboard, autoplay or
|
|
24
|
+
custom). `className` / `itemClassName` style the wrapper and each slide.
|
|
25
|
+
Exports: `Carousel`, `CarouselItem`, `CarouselNavigationState`,
|
|
26
|
+
`CarouselNavigationStyle`, `CarouselOrientation`, `CarouselProps`. Adds
|
|
27
|
+
`embla-carousel-react` and `embla-carousel-autoplay` as dependencies.
|
|
28
|
+
- **`InputOTP`** — new component, alongside `InputOTPSeparator`. Built on the
|
|
29
|
+
`input-otp` package. Numeric by default; `allowAlphaNumeric` widens the
|
|
30
|
+
accepted characters to `[a-zA-Z0-9]`, and `regex` accepts a custom JS regex
|
|
31
|
+
source (which overrides `allowAlphaNumeric`). Slot count is clamped to
|
|
32
|
+
`[2, 12]` (default `6`). `separators` (e.g. `[3, 3]`) inserts group
|
|
33
|
+
boundaries between slot runs — ignored with a `console.warn` when the sum
|
|
34
|
+
does not equal `length`. Controlled or uncontrolled (`value` /
|
|
35
|
+
`defaultValue`); `onChange` fires on every keystroke, `onComplete` once the
|
|
36
|
+
final slot is filled. Composes with the standard input shell (`label`,
|
|
37
|
+
`required`, `size`, `rounded`, `disabled`, `startHelperContent` /
|
|
38
|
+
`endHelperContent`, `hintContent`, `error` / `errorContent`). Adds
|
|
39
|
+
`input-otp` as a dependency.
|
|
40
|
+
- `KeyValueManager`: five new label overrides on the existing `labels` prop —
|
|
41
|
+
`keyLabel`, `valueLabel`, `actionLabel` (used for the column headers *and*
|
|
42
|
+
the add-popover field labels), `emptyItems` (message when the list is
|
|
43
|
+
empty) and `emptySearch` (message when a search returns no results). The
|
|
44
|
+
`search` placeholder is now derived at resolve time from `keyLabel` /
|
|
45
|
+
`valueLabel` when no explicit `search` is passed, so renaming the columns
|
|
46
|
+
updates the placeholder automatically. Backwards compatible — omitted
|
|
47
|
+
labels fall back to the existing defaults.
|
|
48
|
+
- `IconAvatar`: `discClassName` and `discStyle` — extra classes and inline
|
|
49
|
+
style applied to the inner disc after the variant/legacy styling. Enables
|
|
50
|
+
the new solid-surface icon-disc treatment below without callers rebuilding
|
|
51
|
+
the avatar from scratch.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
- **Solid-surface icon cards** (`SimpleClickableCard`, `SimpleInfoCard`,
|
|
55
|
+
`IconTextActionCard`, and `Alert` when it renders an `IconAvatar`): when
|
|
56
|
+
the outer variant is `solid`, the inner icon disc now renders as a
|
|
57
|
+
translucent-foreground bubble on the same-color surface — a ≈15 %
|
|
58
|
+
foreground fill with a ≈30 % foreground border, glyph painted in the
|
|
59
|
+
color's `-foreground` token — instead of resolving the avatar to the
|
|
60
|
+
surface's opposite color. Reads as an inverted-fill circle enclosing the
|
|
61
|
+
glyph, restoring contrast against the same-color card. Non-solid variants
|
|
62
|
+
are unchanged and each consumer keeps its previous default (`Alert` still
|
|
63
|
+
opts into a solid avatar disc; the card components still fall through to
|
|
64
|
+
`IconAvatar`'s `legacy` tinted disc). Explicit `iconAvatarVariant` /
|
|
65
|
+
`iconAvatarColor` props always win. Internal only: `SOLID_ICON_AVATAR_COLOR`
|
|
66
|
+
is removed and `resolveIconAvatarColor` becomes `resolveIconAvatarDefaults`.
|
|
67
|
+
|
|
68
|
+
### Fixed
|
|
69
|
+
- Display issues on solid-variant `Alert` and card components where the icon
|
|
70
|
+
glyph could wash out against a same-color background. The redesign in
|
|
71
|
+
*Changed* restores contrast without any prop change on the caller side.
|
|
72
|
+
|
|
73
|
+
### Internal
|
|
74
|
+
Nothing in this section affects the published package.
|
|
75
|
+
|
|
76
|
+
- Removed a stray tracked `todo.md` from the repository root.
|
|
77
|
+
|
|
78
|
+
## [1.1.3] - 2026-08-08
|
|
79
|
+
|
|
80
|
+
### Fixed
|
|
81
|
+
- **Vite 8 compatibility**: `LottieAnimationContainer` and everything built on it
|
|
82
|
+
(`VerificationInProgress`, `AnimatedRainmakerLogo`, `AppLogo` when using the
|
|
83
|
+
Rainmaker preset) no longer crash with *"Element type is invalid … got: object"*
|
|
84
|
+
under Vite 8 / React 19 consumer apps. The library's built chunk left
|
|
85
|
+
`lottie-react` and its CJS-only transitive `lottie-web` as externals, and Vite
|
|
86
|
+
8's stricter CJS↔ESM interop resolved `Lottie`'s default export as a namespace
|
|
87
|
+
object at the JSX call site. Both packages are now bundled into the library's
|
|
88
|
+
own chunk so the interop is settled once, at library-build time. No API change.
|
|
89
|
+
- **Vite 8 compatibility**: `DynamicList` would have hit the same interop trap
|
|
90
|
+
next (`lodash/startCase` is default-imported from pure-CJS `lodash`). Swapped
|
|
91
|
+
to `lodash-es` — native ESM, identical output, one line changed. `lodash` and
|
|
92
|
+
`@types/lodash` are no longer dependencies of the library.
|
|
93
|
+
|
|
94
|
+
### Changed
|
|
95
|
+
- **`Code` / `MarkdownContent` fenced code blocks now ship a curated Shiki
|
|
96
|
+
language + theme bundle** instead of registering every one of Shiki's
|
|
97
|
+
~180 grammars. The library uses Shiki's fine-grained `createHighlighterCore`
|
|
98
|
+
API with a lazy singleton, and bundles:
|
|
99
|
+
- **Languages (20):** `javascript`, `typescript`, `jsx`, `tsx`, `json`, `yaml`,
|
|
100
|
+
`bash`, `html`, `css`, `markdown`, `python`, `go`, `rust`, `c`, `cpp`,
|
|
101
|
+
`csharp`, `java`, `sql`, `xml`, `dockerfile` — plus common aliases so
|
|
102
|
+
existing fences keep working (`js`, `ts`, `sh`, `shell`, `zsh`, `md`, `py`,
|
|
103
|
+
`yml`, `c++`, `c#`, `docker` all resolve to their canonical grammar).
|
|
104
|
+
- **Themes (4):** `everforest-light` / `everforest-dark` (defaults, unchanged)
|
|
105
|
+
and `github-light` / `github-dark`.
|
|
106
|
+
|
|
107
|
+
Fences that request a language or theme outside the curated set now render as
|
|
108
|
+
escaped plain text inside `<pre><code>` — with a `console.warn` for visibility —
|
|
109
|
+
instead of leaving the block empty on error. Consumer bundle savings are
|
|
110
|
+
substantial: a typical app that highlights any markdown drops **~5 MB of
|
|
111
|
+
unminified JS / ~1 MB gzip** of otherwise-lazy grammar chunks from its build
|
|
112
|
+
output. To widen support, add another `import('shiki/langs/<name>.mjs')` /
|
|
113
|
+
`import('shiki/themes/<name>.mjs')` and list the id in `SUPPORTED_LANGS` /
|
|
114
|
+
`SUPPORTED_THEMES`.
|
|
115
|
+
- `EntryLayout`'s default background `.webp` now ships as an emitted asset file
|
|
116
|
+
next to the ESM chunk instead of an inlined data URL. Removes the ~33 % base64
|
|
117
|
+
overhead, restores parallel download, and lets browsers cache the image
|
|
118
|
+
independently of code changes. `.svg` / `.png` / `.jpg` continue to inline as
|
|
119
|
+
data URLs — this change only affects `.webp`.
|
|
120
|
+
|
|
121
|
+
### Internal
|
|
122
|
+
Nothing in this section affects the published package — it covers the demo app,
|
|
123
|
+
which does not ship to consumers.
|
|
124
|
+
|
|
125
|
+
- Demo: new `Code` component page under **Data Display**. Interactive prop
|
|
126
|
+
controls for `lang`, `theme`, `fileName`, `copyButton`; a gallery of examples
|
|
127
|
+
that walk through the curated bundle: a Python sample, the `sh` → `bash` alias
|
|
128
|
+
round-trip, the plain-text fallback for an unbundled language (`haskell`), and
|
|
129
|
+
the `github-light` / `github-dark` theme override.
|
|
130
|
+
|
|
131
|
+
## [1.1.2] - 2026-08-06
|
|
8
132
|
|
|
9
133
|
### Added
|
|
10
134
|
- `DataTable`: `noResultsAction` renders a call-to-action (e.g. an "Add device"
|
|
Binary file
|