@espressif/dashboard-ui-components 1.13.0 → 1.14.1
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/.claude/rules/dashboard-ui-consumption.md +42 -0
- package/.cursor/rules/dashboard-ui-consumption.mdc +40 -1
- package/CHANGELOG.md +272 -0
- package/README.md +68 -6
- package/dist/{alert.props-CcKo49Rb.d.ts → alert.props-BuLuWmXA.d.ts} +3 -3
- package/dist/common/copyright-card/copyright-card.js +1 -1
- package/dist/common/footer-card/footer-card.js +2 -2
- package/dist/common/index.d.ts +3 -0
- package/dist/common/my-account-menu/my-account-menu.js +2 -2
- package/dist/common/page-loader/page-loader.js +4 -1
- package/dist/common/profile-card/profile-card.js +2 -2
- package/dist/components/accordion/accordion.js +6 -11
- package/dist/components/alert/index.d.ts +5 -5
- package/dist/components/anchored-panel/anchored-panel.js +4 -4
- package/dist/components/async-multi-select/async-multi-select.js +8 -8
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/bottom-sheet/_hooks/use-sheet-drag.js +112 -0
- package/dist/components/bottom-sheet/bottom-sheet.js +84 -0
- package/dist/components/bottom-sheet/index.d.ts +50 -0
- package/dist/components/bottom-sheet/index.js +3 -0
- package/dist/components/bubble/bubble.js +1 -1
- package/dist/components/button/button.js +2 -2
- package/dist/components/button/flash-button.js +4 -4
- package/dist/components/calendar/calendar.js +5 -5
- package/dist/components/cards/animated-card/animated-card.js +1 -1
- package/dist/components/cards/basic-details-card.js +2 -2
- package/dist/components/cards/collapsible-card.js +1 -1
- package/dist/components/cards/index.d.ts +2 -2
- package/dist/components/cards/no-data-card/no-data-card.js +2 -2
- package/dist/components/cards/section-card.js +12 -12
- package/dist/components/cards/simple-card.js +2 -5
- package/dist/components/category-card/category-card.js +2 -2
- package/dist/components/chart/chart.js +4 -4
- package/dist/components/chart/donut-chart.js +1 -1
- package/dist/components/chart/treemap-chart.js +1 -1
- package/dist/components/choice-card/choice-card.js +3 -3
- package/dist/components/code-editor/code-editor.js +4 -3
- package/dist/components/data-table/table-header.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +3 -3
- package/dist/components/dynamic-list/dynamic-list.js +14 -13
- package/dist/components/dynamic-list/index.d.ts +1 -1
- package/dist/components/error-display/full-size-error/full-size-error.js +2 -2
- package/dist/components/expandable-text/expandable-text-overlay.js +1 -1
- package/dist/components/facet-filters/filter-group.js +2 -2
- package/dist/components/feature-grid/feature-grid.js +3 -3
- package/dist/components/file-input/file-input.js +8 -8
- package/dist/components/file-upload/file-upload.js +4 -4
- package/dist/components/fullscreen-dialog/fullscreen-dialog.js +1 -1
- package/dist/components/gradient-ring-button/_hooks/use-ring-geometry.js +116 -0
- package/dist/components/gradient-ring-button/gradient-ring-button.js +44 -0
- package/dist/components/gradient-ring-button/gradient-ring.js +77 -0
- package/dist/components/gradient-ring-button/index.d.ts +66 -0
- package/dist/components/gradient-ring-button/index.js +3 -0
- package/dist/components/horizontal-stepper/horizontal-stepper.js +4 -8
- package/dist/components/horizontal-stepper/index.d.ts +1 -1
- package/dist/components/icon-avatar/index.d.ts +3 -3
- package/dist/components/icon-text-action-card/index.d.ts +4 -4
- package/dist/components/index.d.ts +9 -7
- package/dist/components/index.js +5 -1
- package/dist/components/key-value-manager/key-value-manager-add-popover.js +1 -1
- package/dist/components/key-value-manager/key-value-manager-table.js +1 -1
- package/dist/components/link/link.js +7 -7
- package/dist/components/list/list-item.utils.js +5 -4
- package/dist/components/list/list.js +1 -1
- package/dist/components/list-details/index.d.ts +2 -2
- package/dist/components/markdown-content/markdown-content.components.js +2 -2
- package/dist/components/media-card/media-card-reveal.js +2 -2
- package/dist/components/media-card/media-card.js +2 -2
- package/dist/components/monospace-content/index.d.ts +4 -4
- package/dist/components/monospace-content/monospace-content.js +9 -11
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +3 -3
- package/dist/components/nav-bar/nav-bar.js +4 -4
- package/dist/components/notice-strip/notice-strip.js +1 -1
- package/dist/components/option-card-group/option-card-group.js +2 -2
- package/dist/components/overflow-badge-list/index.d.ts +2 -2
- package/dist/components/overflow-badge-list/overflow-badge-list.js +3 -3
- package/dist/components/page-banner/page-banner.js +1 -1
- package/dist/components/page-container/page-container.js +1 -1
- package/dist/components/pagination/pagination.js +1 -1
- package/dist/components/progress-bar/progress-bar.js +2 -2
- package/dist/components/qr-code/qr-code.js +2 -2
- package/dist/components/radio-group/radio-group.js +3 -3
- package/dist/components/range-field/range-field.js +9 -12
- package/dist/components/readout/readout.js +1 -1
- package/dist/components/requirement-list/requirement-list.js +5 -10
- package/dist/components/scrollable-sections/scrollable-sections.js +1 -1
- package/dist/components/search-field-shell.js +8 -8
- package/dist/components/selectable-card-list/selectable-card-list-shared.js +6 -6
- package/dist/components/showcase-card/showcase-card.js +2 -2
- package/dist/components/sidebar/sidebar.js +13 -15
- package/dist/components/simple-clickable-card/index.d.ts +4 -4
- package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +17 -23
- package/dist/components/simple-info-card/index.d.ts +3 -3
- package/dist/components/simple-list/index.d.ts +1 -1
- package/dist/components/simple-list/simple-list.js +8 -8
- package/dist/components/simple-paginated-list/simple-paginated-list.js +1 -4
- package/dist/components/stat-card/stat-card.js +7 -13
- package/dist/components/status-badge/index.d.ts +3 -3
- package/dist/components/status-badge/status-badge.js +4 -4
- package/dist/components/status-card-list/status-card-list.js +6 -6
- package/dist/components/tag/index.d.ts +1 -1
- package/dist/components/tag/tag.js +4 -4
- package/dist/components/tag-input/tag-input.js +12 -12
- package/dist/components/timeline/timeline.js +2 -2
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/toast.js +2 -2
- package/dist/components/toolbar/index.d.ts +5 -2
- package/dist/components/toolbar/toolbar-button.js +1 -1
- package/dist/components/toolbar/toolbar.js +9 -3
- package/dist/components/trace/trace.js +1 -1
- package/dist/components/transfer-list/transfer-list.js +2 -2
- package/dist/components/typography/index.d.ts +12 -3
- package/dist/components/typography/typography-variants.js +98 -13
- package/dist/components/typography/typography.js +4 -2
- package/dist/components/user-type-badge/user-type-badge.js +4 -4
- package/dist/components/vertical-stepper/vertical-stepper.js +11 -7
- package/dist/core/alert.js +3 -3
- package/dist/core/animate-ui/components/animate/code-header.js +1 -1
- package/dist/core/animate-ui/components/animate/code.js +1 -1
- package/dist/core/animate-ui/components/animate/tabs.js +6 -6
- package/dist/core/animate-ui/components/animate/tooltip.js +1 -1
- package/dist/core/animate-ui/components/base/progress.js +2 -2
- package/dist/core/animate-ui/components/radix/accordion.js +2 -2
- package/dist/core/animate-ui/components/radix/dialog.js +2 -2
- package/dist/core/animate-ui/components/radix/dropdown-menu.js +6 -6
- package/dist/core/animate-ui/components/radix/sheet.js +2 -2
- package/dist/core/animate-ui/components/radix/sidebar.js +8 -8
- package/dist/core/animate-ui/components/radix/toggle-group.js +4 -4
- package/dist/core/animate-ui/components/radix/toggle.js +1 -1
- package/dist/core/animate-ui/primitives/animate/tooltip.js +3 -0
- package/dist/core/badge.js +1 -1
- package/dist/core/breadcrumb.js +1 -1
- package/dist/core/button/button.js +2 -2
- package/dist/core/button/craft-button.js +4 -4
- package/dist/core/button-group.js +1 -1
- package/dist/core/button.js +2 -2
- package/dist/core/card.js +2 -2
- package/dist/core/combobox/combobox.js +3 -3
- package/dist/core/command.js +5 -5
- package/dist/core/field-label-row.js +4 -4
- package/dist/core/form.js +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/core/input/input.js +11 -11
- package/dist/core/input-otp/input-otp.js +12 -12
- package/dist/core/label.js +1 -1
- package/dist/core/select.js +6 -6
- package/dist/core/separator.js +1 -1
- package/dist/core/table.js +2 -2
- package/dist/core/textarea/textarea.js +9 -9
- package/dist/{icon-avatar.props-RYtw2eSW.d.ts → icon-avatar.props-BJe0-vva.d.ts} +1 -1
- package/dist/{icon-text-action-card.props-B2ggncUK.d.ts → icon-text-action-card.props-BU7yFi2Q.d.ts} +2 -2
- package/dist/index.d.ts +9 -7
- package/dist/index.js +6 -2
- package/dist/layouts/entry-layout/entry-layout.js +1 -1
- package/dist/layouts/index.d.ts +21 -6
- package/dist/layouts/index.js +1 -1
- package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +10 -18
- package/dist/layouts/minimal-workspace-layout/sidebar-trigger.js +35 -7
- package/dist/layouts/workspace-layout/footer/footer.js +1 -1
- package/dist/markdown/index.d.ts +4 -4
- package/dist/{section-card-B7c5uc08.d.ts → section-card-DqQeQkzU.d.ts} +1 -1
- package/dist/{simple-clickable-card.props-BrPCw7CR.d.ts → simple-clickable-card.props-BhhotZMp.d.ts} +2 -2
- package/dist/{status-badge.props-lKlEOfRt.d.ts → status-badge.props-BVe8CmQZ.d.ts} +1 -1
- package/dist/styles/type-scale.js +153 -0
- package/dist/tailwind-preset.js +120 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/utils/cn.js +16 -5
- package/dist/utils/color.js +10 -1
- package/dist/utils/index.d.ts +37 -3
- package/dist/utils/index.js +2 -1
- package/dist/utils/variant.js +76 -76
- package/dist/{variant-D81RhpbR.d.ts → variant-DjdaxfIA.d.ts} +6 -1
- package/package.json +6 -2
- package/src/styles/colors.css +23 -2
- package/src/styles/theme.css +8 -3
- package/src/styles/type-scale.css +152 -0
- package/tailwind.preset.ts +23 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* GENERATED from src/styles/type-scale.ts by `npm run gen:type-scale`.
|
|
8
|
+
Do not edit by hand: change the table there and run the script.
|
|
9
|
+
|
|
10
|
+
The type scale. A role is what a piece of text is (`body`, `caption`,
|
|
11
|
+
`label`, …); the same role is the same size in every component. Each role
|
|
12
|
+
has three tokens, --espd-type-<role>-size, -line and -weight: phone values
|
|
13
|
+
on :root, and the ones that change from 768px up redefined below. An app
|
|
14
|
+
changes a role by setting the token, in the same two places.
|
|
15
|
+
|
|
16
|
+
Components and apps size text with the `type-<role>` utilities, never a
|
|
17
|
+
raw `text-xs`…`text-9xl`. `leading-*` and `font-*` still win, in any
|
|
18
|
+
class order. */
|
|
19
|
+
|
|
20
|
+
:root {
|
|
21
|
+
--espd-type-display-size: var(--text-display);
|
|
22
|
+
--espd-type-display-line: var(--text-display--line-height);
|
|
23
|
+
--espd-type-display-weight: var(--text-display--font-weight);
|
|
24
|
+
--espd-type-lead-size: var(--text-lead);
|
|
25
|
+
--espd-type-lead-line: var(--text-lead--line-height);
|
|
26
|
+
--espd-type-lead-weight: 400;
|
|
27
|
+
--espd-type-title-size: 1.375rem;
|
|
28
|
+
--espd-type-title-line: 1.75rem;
|
|
29
|
+
--espd-type-title-weight: 700;
|
|
30
|
+
--espd-type-headline-size: 1.125rem;
|
|
31
|
+
--espd-type-headline-line: 1.5rem;
|
|
32
|
+
--espd-type-headline-weight: 600;
|
|
33
|
+
--espd-type-heading-size: 1rem;
|
|
34
|
+
--espd-type-heading-line: 1.375rem;
|
|
35
|
+
--espd-type-heading-weight: 600;
|
|
36
|
+
--espd-type-subheading-size: 0.875rem;
|
|
37
|
+
--espd-type-subheading-line: 1.25rem;
|
|
38
|
+
--espd-type-subheading-weight: 600;
|
|
39
|
+
--espd-type-prose-size: 1rem;
|
|
40
|
+
--espd-type-prose-line: 1.5rem;
|
|
41
|
+
--espd-type-prose-weight: 400;
|
|
42
|
+
--espd-type-body-size: 0.875rem;
|
|
43
|
+
--espd-type-body-line: 1.3125rem;
|
|
44
|
+
--espd-type-body-weight: 400;
|
|
45
|
+
--espd-type-secondary-size: 0.8125rem;
|
|
46
|
+
--espd-type-secondary-line: 1.125rem;
|
|
47
|
+
--espd-type-secondary-weight: 400;
|
|
48
|
+
--espd-type-caption-size: 0.75rem;
|
|
49
|
+
--espd-type-caption-line: 1rem;
|
|
50
|
+
--espd-type-caption-weight: 400;
|
|
51
|
+
--espd-type-label-size: 0.875rem;
|
|
52
|
+
--espd-type-label-line: 1.25rem;
|
|
53
|
+
--espd-type-label-weight: 500;
|
|
54
|
+
--espd-type-input-size: 1rem;
|
|
55
|
+
--espd-type-input-line: 1.5rem;
|
|
56
|
+
--espd-type-input-weight: 400;
|
|
57
|
+
--espd-type-code-size: 0.75rem;
|
|
58
|
+
--espd-type-code-line: 1.125rem;
|
|
59
|
+
--espd-type-code-weight: 400;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (width >= 48rem) {
|
|
63
|
+
:root {
|
|
64
|
+
--espd-type-title-size: 1.625rem;
|
|
65
|
+
--espd-type-title-line: 2rem;
|
|
66
|
+
--espd-type-headline-size: 1.25rem;
|
|
67
|
+
--espd-type-headline-line: 1.75rem;
|
|
68
|
+
--espd-type-prose-line: 1.625rem;
|
|
69
|
+
--espd-type-input-size: 0.875rem;
|
|
70
|
+
--espd-type-input-line: 1.25rem;
|
|
71
|
+
--espd-type-code-size: 0.8125rem;
|
|
72
|
+
--espd-type-code-line: 1.25rem;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@utility type-display {
|
|
77
|
+
font-size: var(--espd-type-display-size, clamp(2.5rem, 7vw, 5.5rem));
|
|
78
|
+
line-height: var(--tw-leading, var(--espd-type-display-line, 1.04));
|
|
79
|
+
font-weight: var(--tw-font-weight, var(--espd-type-display-weight, 800));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@utility type-lead {
|
|
83
|
+
font-size: var(--espd-type-lead-size, clamp(1.0625rem, 1.5vw, 1.3125rem));
|
|
84
|
+
line-height: var(--tw-leading, var(--espd-type-lead-line, 1.6));
|
|
85
|
+
font-weight: var(--tw-font-weight, var(--espd-type-lead-weight, 400));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@utility type-title {
|
|
89
|
+
font-size: var(--espd-type-title-size, 1.375rem);
|
|
90
|
+
line-height: var(--tw-leading, var(--espd-type-title-line, 1.75rem));
|
|
91
|
+
font-weight: var(--tw-font-weight, var(--espd-type-title-weight, 700));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@utility type-headline {
|
|
95
|
+
font-size: var(--espd-type-headline-size, 1.125rem);
|
|
96
|
+
line-height: var(--tw-leading, var(--espd-type-headline-line, 1.5rem));
|
|
97
|
+
font-weight: var(--tw-font-weight, var(--espd-type-headline-weight, 600));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@utility type-heading {
|
|
101
|
+
font-size: var(--espd-type-heading-size, 1rem);
|
|
102
|
+
line-height: var(--tw-leading, var(--espd-type-heading-line, 1.375rem));
|
|
103
|
+
font-weight: var(--tw-font-weight, var(--espd-type-heading-weight, 600));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@utility type-subheading {
|
|
107
|
+
font-size: var(--espd-type-subheading-size, 0.875rem);
|
|
108
|
+
line-height: var(--tw-leading, var(--espd-type-subheading-line, 1.25rem));
|
|
109
|
+
font-weight: var(--tw-font-weight, var(--espd-type-subheading-weight, 600));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@utility type-prose {
|
|
113
|
+
font-size: var(--espd-type-prose-size, 1rem);
|
|
114
|
+
line-height: var(--tw-leading, var(--espd-type-prose-line, 1.5rem));
|
|
115
|
+
font-weight: var(--tw-font-weight, var(--espd-type-prose-weight, 400));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@utility type-body {
|
|
119
|
+
font-size: var(--espd-type-body-size, 0.875rem);
|
|
120
|
+
line-height: var(--tw-leading, var(--espd-type-body-line, 1.3125rem));
|
|
121
|
+
font-weight: var(--tw-font-weight, var(--espd-type-body-weight, 400));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@utility type-secondary {
|
|
125
|
+
font-size: var(--espd-type-secondary-size, 0.8125rem);
|
|
126
|
+
line-height: var(--tw-leading, var(--espd-type-secondary-line, 1.125rem));
|
|
127
|
+
font-weight: var(--tw-font-weight, var(--espd-type-secondary-weight, 400));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@utility type-caption {
|
|
131
|
+
font-size: var(--espd-type-caption-size, 0.75rem);
|
|
132
|
+
line-height: var(--tw-leading, var(--espd-type-caption-line, 1rem));
|
|
133
|
+
font-weight: var(--tw-font-weight, var(--espd-type-caption-weight, 400));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@utility type-label {
|
|
137
|
+
font-size: var(--espd-type-label-size, 0.875rem);
|
|
138
|
+
line-height: var(--tw-leading, var(--espd-type-label-line, 1.25rem));
|
|
139
|
+
font-weight: var(--tw-font-weight, var(--espd-type-label-weight, 500));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@utility type-input {
|
|
143
|
+
font-size: var(--espd-type-input-size, 1rem);
|
|
144
|
+
line-height: var(--tw-leading, var(--espd-type-input-line, 1.5rem));
|
|
145
|
+
font-weight: var(--tw-font-weight, var(--espd-type-input-weight, 400));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@utility type-code {
|
|
149
|
+
font-size: var(--espd-type-code-size, 0.75rem);
|
|
150
|
+
line-height: var(--tw-leading, var(--espd-type-code-line, 1.125rem));
|
|
151
|
+
font-weight: var(--tw-font-weight, var(--espd-type-code-weight, 400));
|
|
152
|
+
}
|
package/tailwind.preset.ts
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
import type { Config } from 'tailwindcss'
|
|
2
|
+
import plugin from 'tailwindcss/plugin'
|
|
3
|
+
import {
|
|
4
|
+
TYPE_ROLES,
|
|
5
|
+
TYPE_SCALE_MD,
|
|
6
|
+
typeScaleMdTokens,
|
|
7
|
+
typeScaleRootTokens,
|
|
8
|
+
typeUtilityDeclarations,
|
|
9
|
+
} from './src/styles/type-scale'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The type scale for apps that use only this preset (no library stylesheet):
|
|
13
|
+
* the same `--espd-type-*` tokens and `type-<role>` utilities as
|
|
14
|
+
* `src/styles/type-scale.css`, from the same table, so every component keeps
|
|
15
|
+
* its text size there too.
|
|
16
|
+
*/
|
|
17
|
+
const typeScale = plugin(({ addBase, addUtilities }) => {
|
|
18
|
+
addBase({
|
|
19
|
+
':root': typeScaleRootTokens(),
|
|
20
|
+
[`@media (width >= ${TYPE_SCALE_MD})`]: { ':root': typeScaleMdTokens() },
|
|
21
|
+
})
|
|
22
|
+
addUtilities(Object.fromEntries(TYPE_ROLES.map((role) => [`.type-${role}`, typeUtilityDeclarations(role)])))
|
|
23
|
+
})
|
|
2
24
|
|
|
3
25
|
const espPreset: Partial<Config> = {
|
|
4
26
|
darkMode: 'class',
|
|
@@ -110,6 +132,7 @@ const espPreset: Partial<Config> = {
|
|
|
110
132
|
},
|
|
111
133
|
},
|
|
112
134
|
},
|
|
135
|
+
plugins: [typeScale],
|
|
113
136
|
}
|
|
114
137
|
|
|
115
138
|
export default espPreset
|