@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
package/dist/utils/variant.js
CHANGED
|
@@ -48,13 +48,13 @@ var VARIANT_GRADIENT_BACKDROP_BASE = "pointer-events-none absolute inset-0 -z-10
|
|
|
48
48
|
var VARIANT_GRADIENT_HOVER_OVERLAY_CLASS = cn("opacity-0 transition-opacity ease-in-out group-hover:opacity-100", VARIANT_GRADIENT_DURATION_CLASS);
|
|
49
49
|
/** Transparent frame + text/icon tint — gradients paint on {@link PRESET_GRADIENT_BACKDROP} layers. */
|
|
50
50
|
var PRESET_GRADIENT_FRAME = {
|
|
51
|
-
primary: "border border-primary/20 bg-transparent text-primary [&>svg]:text-primary",
|
|
51
|
+
primary: "border border-primary/20 bg-transparent text-primary-text [&>svg]:text-primary-text",
|
|
52
52
|
secondary: "border border-secondary/20 bg-transparent text-secondary [&>svg]:text-secondary",
|
|
53
53
|
info: "border border-info/20 bg-transparent text-info [&>svg]:text-info",
|
|
54
|
-
warning: "border border-warning/20 bg-transparent text-warning [&>svg]:text-warning",
|
|
54
|
+
warning: "border border-warning/20 bg-transparent text-warning-text [&>svg]:text-warning-text",
|
|
55
55
|
error: "border border-error/20 bg-transparent text-error [&>svg]:text-error",
|
|
56
56
|
success: "border border-success/20 bg-transparent text-success [&>svg]:text-success",
|
|
57
|
-
disabled: "border border-disabled/20 bg-transparent text-disabled [&>svg]:text-disabled",
|
|
57
|
+
disabled: "border border-disabled/20 bg-transparent text-disabled-text [&>svg]:text-disabled-text",
|
|
58
58
|
gray: "border border-gray/20 bg-transparent text-gray [&>svg]:text-gray",
|
|
59
59
|
mist: "border border-mist-border bg-transparent text-mist-foreground [&>svg]:text-mist-foreground"
|
|
60
60
|
};
|
|
@@ -123,218 +123,218 @@ function arbitraryGradientBackgroundImage(color, emphasis) {
|
|
|
123
123
|
var PRESET_VARIANT_STYLES = {
|
|
124
124
|
primary: {
|
|
125
125
|
soft: {
|
|
126
|
-
container: "border border-primary/10 bg-primary/5 text-primary [&>svg]:text-primary",
|
|
127
|
-
foreground: "text-primary",
|
|
128
|
-
description: "text-primary
|
|
126
|
+
container: "border border-primary/10 bg-primary/5 text-primary-text [&>svg]:text-primary-text",
|
|
127
|
+
foreground: "text-primary-text",
|
|
128
|
+
description: "text-primary-text"
|
|
129
129
|
},
|
|
130
130
|
outline: {
|
|
131
|
-
container: "bg-transparent border border-primary/50 dark:border-primary/30 text-primary [&>svg]:text-primary",
|
|
132
|
-
foreground: "text-primary",
|
|
133
|
-
description: "text-primary
|
|
131
|
+
container: "bg-transparent border border-primary/50 dark:border-primary/30 text-primary-text [&>svg]:text-primary-text",
|
|
132
|
+
foreground: "text-primary-text",
|
|
133
|
+
description: "text-primary-text"
|
|
134
134
|
},
|
|
135
135
|
solid: {
|
|
136
136
|
container: "border border-transparent bg-primary text-primary-foreground [&>svg]:text-primary-foreground",
|
|
137
137
|
foreground: "text-primary-foreground",
|
|
138
|
-
description: "text-primary-foreground
|
|
138
|
+
description: "text-primary-foreground"
|
|
139
139
|
},
|
|
140
140
|
gradient: {
|
|
141
141
|
container: "",
|
|
142
|
-
foreground: "text-primary",
|
|
143
|
-
description: "text-primary
|
|
142
|
+
foreground: "text-primary-text",
|
|
143
|
+
description: "text-primary-text"
|
|
144
144
|
},
|
|
145
145
|
glow: {
|
|
146
|
-
container: "border border-primary/15 bg-primary/4 text-primary shadow-glow shadow-primary/45 [&>svg]:text-primary",
|
|
147
|
-
foreground: "text-primary",
|
|
148
|
-
description: "text-primary
|
|
146
|
+
container: "border border-primary/15 bg-primary/4 text-primary-text shadow-glow shadow-primary/45 [&>svg]:text-primary-text",
|
|
147
|
+
foreground: "text-primary-text",
|
|
148
|
+
description: "text-primary-text"
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
151
|
secondary: {
|
|
152
152
|
soft: {
|
|
153
153
|
container: "border border-secondary/10 bg-secondary/5 text-secondary [&>svg]:text-secondary",
|
|
154
154
|
foreground: "text-secondary",
|
|
155
|
-
description: "text-secondary
|
|
155
|
+
description: "text-secondary"
|
|
156
156
|
},
|
|
157
157
|
outline: {
|
|
158
158
|
container: "bg-transparent border border-secondary/50 dark:border-secondary/30 text-secondary [&>svg]:text-secondary",
|
|
159
159
|
foreground: "text-secondary",
|
|
160
|
-
description: "text-secondary
|
|
160
|
+
description: "text-secondary"
|
|
161
161
|
},
|
|
162
162
|
solid: {
|
|
163
163
|
container: "border border-transparent bg-secondary text-secondary-foreground [&>svg]:text-secondary-foreground",
|
|
164
164
|
foreground: "text-secondary-foreground",
|
|
165
|
-
description: "text-secondary-foreground
|
|
165
|
+
description: "text-secondary-foreground"
|
|
166
166
|
},
|
|
167
167
|
gradient: {
|
|
168
168
|
container: "",
|
|
169
169
|
foreground: "text-secondary",
|
|
170
|
-
description: "text-secondary
|
|
170
|
+
description: "text-secondary"
|
|
171
171
|
},
|
|
172
172
|
glow: {
|
|
173
173
|
container: "border border-secondary/15 bg-secondary/4 text-secondary shadow-glow shadow-secondary/45 [&>svg]:text-secondary",
|
|
174
174
|
foreground: "text-secondary",
|
|
175
|
-
description: "text-secondary
|
|
175
|
+
description: "text-secondary"
|
|
176
176
|
}
|
|
177
177
|
},
|
|
178
178
|
info: {
|
|
179
179
|
soft: {
|
|
180
180
|
container: "border border-info/10 bg-info/5 text-info [&>svg]:text-info",
|
|
181
181
|
foreground: "text-info",
|
|
182
|
-
description: "text-info
|
|
182
|
+
description: "text-info"
|
|
183
183
|
},
|
|
184
184
|
outline: {
|
|
185
185
|
container: "bg-transparent border border-info/50 dark:border-info/30 text-info [&>svg]:text-info",
|
|
186
186
|
foreground: "text-info",
|
|
187
|
-
description: "text-info
|
|
187
|
+
description: "text-info"
|
|
188
188
|
},
|
|
189
189
|
solid: {
|
|
190
190
|
container: "border border-transparent bg-info text-info-foreground [&>svg]:text-info-foreground",
|
|
191
191
|
foreground: "text-info-foreground",
|
|
192
|
-
description: "text-info-foreground
|
|
192
|
+
description: "text-info-foreground"
|
|
193
193
|
},
|
|
194
194
|
gradient: {
|
|
195
195
|
container: "",
|
|
196
196
|
foreground: "text-info",
|
|
197
|
-
description: "text-info
|
|
197
|
+
description: "text-info"
|
|
198
198
|
},
|
|
199
199
|
glow: {
|
|
200
200
|
container: "border border-info/15 bg-info/4 text-info shadow-glow shadow-info/45 [&>svg]:text-info",
|
|
201
201
|
foreground: "text-info",
|
|
202
|
-
description: "text-info
|
|
202
|
+
description: "text-info"
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
205
|
warning: {
|
|
206
206
|
soft: {
|
|
207
|
-
container: "border border-warning/10 bg-warning/5 text-warning [&>svg]:text-warning",
|
|
208
|
-
foreground: "text-warning",
|
|
209
|
-
description: "text-warning"
|
|
207
|
+
container: "border border-warning/10 bg-warning/5 text-warning-text [&>svg]:text-warning-text",
|
|
208
|
+
foreground: "text-warning-text",
|
|
209
|
+
description: "text-warning-text"
|
|
210
210
|
},
|
|
211
211
|
outline: {
|
|
212
|
-
container: "bg-transparent border border-warning/50 dark:border-warning/30 text-warning [&>svg]:text-warning",
|
|
213
|
-
foreground: "text-warning",
|
|
214
|
-
description: "text-warning"
|
|
212
|
+
container: "bg-transparent border border-warning/50 dark:border-warning/30 text-warning-text [&>svg]:text-warning-text",
|
|
213
|
+
foreground: "text-warning-text",
|
|
214
|
+
description: "text-warning-text"
|
|
215
215
|
},
|
|
216
216
|
solid: {
|
|
217
|
-
container: "border border-transparent bg-warning text-warning-foreground [&>svg]:text-warning-foreground",
|
|
217
|
+
container: "border border-transparent bg-warning-solid text-warning-foreground [&>svg]:text-warning-foreground",
|
|
218
218
|
foreground: "text-warning-foreground",
|
|
219
|
-
description: "text-warning-foreground
|
|
219
|
+
description: "text-warning-foreground"
|
|
220
220
|
},
|
|
221
221
|
gradient: {
|
|
222
222
|
container: "",
|
|
223
|
-
foreground: "text-warning",
|
|
224
|
-
description: "text-warning
|
|
223
|
+
foreground: "text-warning-text",
|
|
224
|
+
description: "text-warning-text"
|
|
225
225
|
},
|
|
226
226
|
glow: {
|
|
227
|
-
container: "border border-warning/15 bg-warning/4 text-warning shadow-glow shadow-warning/45 [&>svg]:text-warning",
|
|
228
|
-
foreground: "text-warning",
|
|
229
|
-
description: "text-warning"
|
|
227
|
+
container: "border border-warning/15 bg-warning/4 text-warning-text shadow-glow shadow-warning/45 [&>svg]:text-warning-text",
|
|
228
|
+
foreground: "text-warning-text",
|
|
229
|
+
description: "text-warning-text"
|
|
230
230
|
}
|
|
231
231
|
},
|
|
232
232
|
error: {
|
|
233
233
|
soft: {
|
|
234
234
|
container: "border border-error/10 bg-error/5 text-error [&>svg]:text-error",
|
|
235
235
|
foreground: "text-error",
|
|
236
|
-
description: "text-error
|
|
236
|
+
description: "text-error"
|
|
237
237
|
},
|
|
238
238
|
outline: {
|
|
239
239
|
container: "bg-transparent border border-error/50 dark:border-error/30 text-error [&>svg]:text-error",
|
|
240
240
|
foreground: "text-error",
|
|
241
|
-
description: "text-error
|
|
241
|
+
description: "text-error"
|
|
242
242
|
},
|
|
243
243
|
solid: {
|
|
244
244
|
container: "border border-transparent bg-error text-error-foreground [&>svg]:text-error-foreground",
|
|
245
245
|
foreground: "text-error-foreground",
|
|
246
|
-
description: "text-error-foreground
|
|
246
|
+
description: "text-error-foreground"
|
|
247
247
|
},
|
|
248
248
|
gradient: {
|
|
249
249
|
container: "",
|
|
250
250
|
foreground: "text-error",
|
|
251
|
-
description: "text-error
|
|
251
|
+
description: "text-error"
|
|
252
252
|
},
|
|
253
253
|
glow: {
|
|
254
254
|
container: "border border-error/15 bg-error/4 text-error shadow-glow shadow-error/45 [&>svg]:text-error",
|
|
255
255
|
foreground: "text-error",
|
|
256
|
-
description: "text-error
|
|
256
|
+
description: "text-error"
|
|
257
257
|
}
|
|
258
258
|
},
|
|
259
259
|
success: {
|
|
260
260
|
soft: {
|
|
261
261
|
container: "border border-success/10 bg-success/5 text-success [&>svg]:text-success",
|
|
262
262
|
foreground: "text-success",
|
|
263
|
-
description: "text-success
|
|
263
|
+
description: "text-success"
|
|
264
264
|
},
|
|
265
265
|
outline: {
|
|
266
266
|
container: "bg-transparent border border-success/50 dark:border-success/30 text-success [&>svg]:text-success",
|
|
267
267
|
foreground: "text-success",
|
|
268
|
-
description: "text-success
|
|
268
|
+
description: "text-success"
|
|
269
269
|
},
|
|
270
270
|
solid: {
|
|
271
271
|
container: "border border-transparent bg-success text-success-foreground [&>svg]:text-success-foreground",
|
|
272
272
|
foreground: "text-success-foreground",
|
|
273
|
-
description: "text-success-foreground
|
|
273
|
+
description: "text-success-foreground"
|
|
274
274
|
},
|
|
275
275
|
gradient: {
|
|
276
276
|
container: "",
|
|
277
277
|
foreground: "text-success",
|
|
278
|
-
description: "text-success
|
|
278
|
+
description: "text-success"
|
|
279
279
|
},
|
|
280
280
|
glow: {
|
|
281
281
|
container: "border border-success/15 bg-success/4 text-success shadow-glow shadow-success/45 [&>svg]:text-success",
|
|
282
282
|
foreground: "text-success",
|
|
283
|
-
description: "text-success
|
|
283
|
+
description: "text-success"
|
|
284
284
|
}
|
|
285
285
|
},
|
|
286
286
|
disabled: {
|
|
287
287
|
soft: {
|
|
288
|
-
container: "border border-disabled/10 bg-disabled/5 text-disabled [&>svg]:text-disabled",
|
|
289
|
-
foreground: "text-disabled",
|
|
290
|
-
description: "text-disabled
|
|
288
|
+
container: "border border-disabled/10 bg-disabled/5 text-disabled-text [&>svg]:text-disabled-text",
|
|
289
|
+
foreground: "text-disabled-text",
|
|
290
|
+
description: "text-disabled-text"
|
|
291
291
|
},
|
|
292
292
|
outline: {
|
|
293
|
-
container: "bg-transparent border border-disabled/50 dark:border-disabled/30 text-disabled [&>svg]:text-disabled",
|
|
294
|
-
foreground: "text-disabled",
|
|
295
|
-
description: "text-disabled
|
|
293
|
+
container: "bg-transparent border border-disabled/50 dark:border-disabled/30 text-disabled-text [&>svg]:text-disabled-text",
|
|
294
|
+
foreground: "text-disabled-text",
|
|
295
|
+
description: "text-disabled-text"
|
|
296
296
|
},
|
|
297
297
|
solid: {
|
|
298
|
-
container: "border border-transparent bg-disabled text-disabled-foreground [&>svg]:text-disabled-foreground",
|
|
298
|
+
container: "border border-transparent bg-disabled-solid text-disabled-foreground [&>svg]:text-disabled-foreground",
|
|
299
299
|
foreground: "text-disabled-foreground",
|
|
300
|
-
description: "text-disabled-foreground
|
|
300
|
+
description: "text-disabled-foreground"
|
|
301
301
|
},
|
|
302
302
|
gradient: {
|
|
303
303
|
container: "",
|
|
304
|
-
foreground: "text-disabled",
|
|
305
|
-
description: "text-disabled
|
|
304
|
+
foreground: "text-disabled-text",
|
|
305
|
+
description: "text-disabled-text"
|
|
306
306
|
},
|
|
307
307
|
glow: {
|
|
308
|
-
container: "border border-disabled/15 bg-disabled/4 text-disabled shadow-glow shadow-disabled/45 [&>svg]:text-disabled",
|
|
309
|
-
foreground: "text-disabled",
|
|
310
|
-
description: "text-disabled
|
|
308
|
+
container: "border border-disabled/15 bg-disabled/4 text-disabled-text shadow-glow shadow-disabled/45 [&>svg]:text-disabled-text",
|
|
309
|
+
foreground: "text-disabled-text",
|
|
310
|
+
description: "text-disabled-text"
|
|
311
311
|
}
|
|
312
312
|
},
|
|
313
313
|
gray: {
|
|
314
314
|
soft: {
|
|
315
315
|
container: "border border-gray/10 bg-gray/5 text-gray [&>svg]:text-gray",
|
|
316
316
|
foreground: "text-gray",
|
|
317
|
-
description: "text-gray
|
|
317
|
+
description: "text-gray"
|
|
318
318
|
},
|
|
319
319
|
outline: {
|
|
320
320
|
container: "bg-transparent border border-gray/50 dark:border-gray/30 text-gray [&>svg]:text-gray",
|
|
321
321
|
foreground: "text-gray",
|
|
322
|
-
description: "text-gray
|
|
322
|
+
description: "text-gray"
|
|
323
323
|
},
|
|
324
324
|
solid: {
|
|
325
325
|
container: "border border-transparent bg-gray text-gray-foreground [&>svg]:text-gray-foreground",
|
|
326
326
|
foreground: "text-gray-foreground",
|
|
327
|
-
description: "text-gray-foreground
|
|
327
|
+
description: "text-gray-foreground"
|
|
328
328
|
},
|
|
329
329
|
gradient: {
|
|
330
330
|
container: "",
|
|
331
331
|
foreground: "text-gray",
|
|
332
|
-
description: "text-gray
|
|
332
|
+
description: "text-gray"
|
|
333
333
|
},
|
|
334
334
|
glow: {
|
|
335
335
|
container: "border border-gray/15 bg-gray/4 text-gray shadow-glow shadow-gray/45 [&>svg]:text-gray",
|
|
336
336
|
foreground: "text-gray",
|
|
337
|
-
description: "text-gray
|
|
337
|
+
description: "text-gray"
|
|
338
338
|
}
|
|
339
339
|
},
|
|
340
340
|
mist: {
|
|
@@ -374,29 +374,29 @@ var SILVER_VARIANT_ROWS = {
|
|
|
374
374
|
soft: {
|
|
375
375
|
container: "border border-gray/5 bg-gray/2 text-gray [&>svg]:text-gray",
|
|
376
376
|
foreground: "text-gray",
|
|
377
|
-
description: "text-gray
|
|
377
|
+
description: "text-gray"
|
|
378
378
|
},
|
|
379
379
|
outline: {
|
|
380
380
|
/** No `border-*` here — the metallic ring is painted by `SilverMetallicBorderOverlay`. */
|
|
381
381
|
container: "bg-transparent border-0 text-gray [&>svg]:text-gray",
|
|
382
382
|
foreground: "text-gray",
|
|
383
|
-
description: "text-gray
|
|
383
|
+
description: "text-gray"
|
|
384
384
|
},
|
|
385
385
|
solid: {
|
|
386
386
|
/** Metallic surface gradient layered on top of `bg-gray` via `SILVER_SOLID_SURFACE_STYLE`. */
|
|
387
387
|
container: "border border-transparent bg-gray text-gray-foreground [&>svg]:text-gray-foreground",
|
|
388
388
|
foreground: "text-gray-foreground",
|
|
389
|
-
description: "text-gray-foreground
|
|
389
|
+
description: "text-gray-foreground"
|
|
390
390
|
},
|
|
391
391
|
gradient: {
|
|
392
392
|
container: "",
|
|
393
393
|
foreground: "text-gray",
|
|
394
|
-
description: "text-gray
|
|
394
|
+
description: "text-gray"
|
|
395
395
|
},
|
|
396
396
|
glow: {
|
|
397
397
|
container: "border border-gray/15 bg-gray/4 text-gray shadow-glow shadow-gray/45 [&>svg]:text-gray",
|
|
398
398
|
foreground: "text-gray",
|
|
399
|
-
description: "text-gray
|
|
399
|
+
description: "text-gray"
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
/**
|
|
@@ -411,7 +411,7 @@ function getArbitraryVariantStyles(variant, color) {
|
|
|
411
411
|
container: cn("border [&>svg]:text-current", text.className),
|
|
412
412
|
foreground: text.className ?? "",
|
|
413
413
|
foregroundStyle: text.style,
|
|
414
|
-
description: "text-current
|
|
414
|
+
description: "text-current",
|
|
415
415
|
containerStyle: {
|
|
416
416
|
backgroundColor: `color-mix(in srgb, ${color} 5%, transparent)`,
|
|
417
417
|
borderColor: `color-mix(in srgb, ${color} 10%, transparent)`,
|
|
@@ -422,7 +422,7 @@ function getArbitraryVariantStyles(variant, color) {
|
|
|
422
422
|
container: cn("bg-transparent border [&>svg]:text-current", border.className, text.className),
|
|
423
423
|
foreground: text.className ?? "",
|
|
424
424
|
foregroundStyle: text.style,
|
|
425
|
-
description: "text-current
|
|
425
|
+
description: "text-current",
|
|
426
426
|
containerStyle: {
|
|
427
427
|
borderColor: `light-dark(
|
|
428
428
|
color-mix(in srgb, ${color} 50%, transparent),
|
|
@@ -435,7 +435,7 @@ function getArbitraryVariantStyles(variant, color) {
|
|
|
435
435
|
container: cn("border [&>svg]:text-current", text.className),
|
|
436
436
|
foreground: text.className ?? "",
|
|
437
437
|
foregroundStyle: text.style,
|
|
438
|
-
description: "text-current
|
|
438
|
+
description: "text-current",
|
|
439
439
|
containerStyle: {
|
|
440
440
|
backgroundColor: `color-mix(in oklab, ${color} 4%, transparent)`,
|
|
441
441
|
borderColor: `color-mix(in oklab, ${color} 15%, transparent)`,
|
|
@@ -447,7 +447,7 @@ function getArbitraryVariantStyles(variant, color) {
|
|
|
447
447
|
container: "border border-transparent text-[color:var(--espd-on-solid-foreground,#fff)] [&>svg]:text-[color:var(--espd-on-solid-foreground,#fff)]",
|
|
448
448
|
foreground: "text-[color:var(--espd-on-solid-foreground,#fff)]",
|
|
449
449
|
foregroundStyle: { color: ON_SOLID_FOREGROUND },
|
|
450
|
-
description: "text-[color:var(--espd-on-solid-foreground,#fff)]
|
|
450
|
+
description: "text-[color:var(--espd-on-solid-foreground,#fff)]",
|
|
451
451
|
containerStyle: {
|
|
452
452
|
backgroundColor: color,
|
|
453
453
|
color: ON_SOLID_FOREGROUND
|
|
@@ -457,7 +457,7 @@ function getArbitraryVariantStyles(variant, color) {
|
|
|
457
457
|
container: cn("relative isolate overflow-hidden group border [&>svg]:text-current", text.className),
|
|
458
458
|
foreground: text.className ?? "",
|
|
459
459
|
foregroundStyle: text.style,
|
|
460
|
-
description: "text-current
|
|
460
|
+
description: "text-current",
|
|
461
461
|
containerStyle: {
|
|
462
462
|
borderColor: `color-mix(in srgb, ${color} 20%, transparent)`,
|
|
463
463
|
...text.style
|
|
@@ -62,7 +62,12 @@ interface VariantStyles {
|
|
|
62
62
|
/** Foreground/text classes (use on labels, icons not living inside the container). */
|
|
63
63
|
foreground: string;
|
|
64
64
|
foregroundStyle?: React.CSSProperties;
|
|
65
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Description/secondary text classes. Built-in variants draw it at the full
|
|
67
|
+
* strength of the variant's text colour (an alpha such as `/60` or `/80`
|
|
68
|
+
* dropped the text under WCAG AA's 4.5:1 on the tinted surfaces); it reads as
|
|
69
|
+
* secondary through its lighter weight, not a fainter colour.
|
|
70
|
+
*/
|
|
66
71
|
description: string;
|
|
67
72
|
descriptionStyle?: React.CSSProperties;
|
|
68
73
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@espressif/dashboard-ui-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"description": "Reusable React UI components, page layouts, and utilities — Espressif's dashboard design system.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
"files": [
|
|
117
117
|
"dist",
|
|
118
118
|
"src/styles",
|
|
119
|
+
"!src/styles/**/*.ts",
|
|
119
120
|
"src/assets",
|
|
120
121
|
"tailwind.preset.ts",
|
|
121
122
|
"LICENSE",
|
|
@@ -130,6 +131,7 @@
|
|
|
130
131
|
"build": "node scripts/gen-entries.mjs && vite build --config vite.lib.config.ts && npm run build:types",
|
|
131
132
|
"build:types": "node --max-old-space-size=4096 node_modules/tsup/dist/cli-default.js",
|
|
132
133
|
"gen:entries": "node scripts/gen-entries.mjs",
|
|
134
|
+
"gen:type-scale": "node scripts/gen-type-scale.mjs",
|
|
133
135
|
"dev:lib": "node scripts/gen-entries.mjs && npm run build:types && vite build --config vite.lib.config.ts --watch",
|
|
134
136
|
"prepublishOnly": "npm run build",
|
|
135
137
|
"typecheck": "tsc --noEmit",
|
|
@@ -143,7 +145,9 @@
|
|
|
143
145
|
"dev:demo": "cd demo && npm run dev",
|
|
144
146
|
"build:demo": "cd demo && npm run build",
|
|
145
147
|
"deploy:demo": "bash scripts/deploy-demo.sh",
|
|
146
|
-
"release": "bash scripts/release.sh"
|
|
148
|
+
"release": "bash scripts/release.sh",
|
|
149
|
+
"release:active": "node scripts/active-release-branch.mjs",
|
|
150
|
+
"task:start": "node scripts/task-start.mjs"
|
|
147
151
|
},
|
|
148
152
|
"overrides": {
|
|
149
153
|
"esbuild": "^0.28.1"
|
package/src/styles/colors.css
CHANGED
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
--color-primary-light: #b9ebff;
|
|
12
12
|
--color-primary-dark: #000064;
|
|
13
13
|
--color-primary-foreground: #ffffff;
|
|
14
|
+
/* Text in primary on light surfaces and primary tints: the brand blue itself
|
|
15
|
+
is 4.0:1 on a /5 tint, under WCAG AA's 4.5:1. Fills keep --color-primary. */
|
|
16
|
+
--color-primary-text: #0065d6;
|
|
14
17
|
|
|
15
18
|
/* ─── Brand: Secondary ─── */
|
|
16
19
|
--color-secondary: #2a5a9a;
|
|
@@ -47,6 +50,13 @@
|
|
|
47
50
|
--color-warning-light: #fef9c3;
|
|
48
51
|
--color-warning-dark: #854d0e;
|
|
49
52
|
--color-warning-foreground: #ffffff;
|
|
53
|
+
/* Text in warning on light surfaces and warning tints (the amber itself is
|
|
54
|
+
2.4:1 there). Fills keep --color-warning. */
|
|
55
|
+
--color-warning-text: #8d6700;
|
|
56
|
+
/* A solid warning fill that carries text (solid variant, Button, Avatar…):
|
|
57
|
+
a deeper gold, so white text on it reaches 4.6:1 (2.7:1 on the amber).
|
|
58
|
+
Tints, borders, bars and charts keep --color-warning. */
|
|
59
|
+
--color-warning-solid: #956f00;
|
|
50
60
|
|
|
51
61
|
/* ─── Status: Success ─── */
|
|
52
62
|
--color-success: #007406;
|
|
@@ -63,6 +73,11 @@
|
|
|
63
73
|
/* ─── Status: Disabled ─── */
|
|
64
74
|
--color-disabled: #9e9e9e;
|
|
65
75
|
--color-disabled-foreground: #ffffff;
|
|
76
|
+
/* Text in disabled (a "Disabled" status, an outside-month day) on light
|
|
77
|
+
surfaces and disabled tints (the grey itself is 2.4:1 there). */
|
|
78
|
+
--color-disabled-text: #6d6d6d;
|
|
79
|
+
/* A solid disabled fill that carries text: white on it reaches 4.6:1. */
|
|
80
|
+
--color-disabled-solid: #757575;
|
|
66
81
|
|
|
67
82
|
/* ─── Neutral: Gray (darker than disabled for non-disabled UI) ─── */
|
|
68
83
|
--color-gray: #333333;
|
|
@@ -71,7 +86,7 @@
|
|
|
71
86
|
/* ─── Neutral: Mist ─── */
|
|
72
87
|
--color-mist: #F3F5F7;
|
|
73
88
|
--color-mist-foreground: #1F2937;
|
|
74
|
-
--color-mist-secondary: #
|
|
89
|
+
--color-mist-secondary: #5a616f;
|
|
75
90
|
--color-mist-border: #D9DEE5;
|
|
76
91
|
|
|
77
92
|
/* ─── Destructive (alias → error) ─── */
|
|
@@ -233,6 +248,7 @@
|
|
|
233
248
|
--color-primary-light: #b9ebff;
|
|
234
249
|
--color-primary-dark: #000064;
|
|
235
250
|
--color-primary-foreground: #000071;
|
|
251
|
+
--color-primary-text: var(--color-primary);
|
|
236
252
|
|
|
237
253
|
/* Brand: Secondary */
|
|
238
254
|
--color-secondary: #a5dbff;
|
|
@@ -260,7 +276,9 @@
|
|
|
260
276
|
--color-warning-light: #fef08a;
|
|
261
277
|
--color-warning-dark: #a16207;
|
|
262
278
|
--color-warning-foreground: #422006;
|
|
263
|
-
|
|
279
|
+
--color-warning-text: var(--color-warning);
|
|
280
|
+
--color-warning-solid: var(--color-warning);
|
|
281
|
+
|
|
264
282
|
--color-success: #69f991;
|
|
265
283
|
--color-success-light: #b5fcc3;
|
|
266
284
|
--color-success-dark: #002100;
|
|
@@ -273,6 +291,9 @@
|
|
|
273
291
|
/* Disabled */
|
|
274
292
|
--color-disabled: #616161;
|
|
275
293
|
--color-disabled-foreground: #e0e0e0;
|
|
294
|
+
/* The fill grey is 3.2:1 as text on dark tints. */
|
|
295
|
+
--color-disabled-text: #7b7b7b;
|
|
296
|
+
--color-disabled-solid: var(--color-disabled);
|
|
276
297
|
|
|
277
298
|
/* Neutral: Gray (lighter than disabled fill for contrast on dark surfaces) */
|
|
278
299
|
--color-gray: #b0b0b0;
|
package/src/styles/theme.css
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
@import "./colors.css";
|
|
19
19
|
@import "./style-axes.css";
|
|
20
|
+
@import "./type-scale.css";
|
|
20
21
|
|
|
21
22
|
@source "../../dist";
|
|
22
23
|
/* Utilities the components generated before 1.12 and no longer use since
|
|
@@ -37,6 +38,9 @@
|
|
|
37
38
|
@source inline("bg-black/50 bg-black/80");
|
|
38
39
|
/* The NavBar details panel's shadow, now on the navbar elevation token (1.12). */
|
|
39
40
|
@source inline("shadow-lg");
|
|
41
|
+
/* The raw text sizes (and the leading / weight classes that only went with
|
|
42
|
+
them) the components generated before they moved onto the type roles (1.14). */
|
|
43
|
+
@source inline("text-base text-lg text-[0.8rem] text-[11px] text-[16px] md:text-sm md:text-xs md:text-[13px] @[12rem]:text-base @[12rem]:text-sm @md:text-lg [&>div]:text-sm [&>span]:text-xs [&_[cmdk-group-heading]]:text-xs [&_code]:!text-[13px] [&_p]:leading-relaxed peer-focus:text-xs peer-placeholder-shown:text-sm file:text-sm file:font-medium data-[active=true]:font-medium leading-4 leading-[var(--tw-leading,var(--text-sm--line-height))]");
|
|
40
44
|
/* Footer heights and the AppLogo cap before the shell / workspace-layout
|
|
41
45
|
token names (1.12). */
|
|
42
46
|
@source inline("h-[var(--espd-footer-height)] h-[var(--espd-hidden-footer-height)] max-h-[calc(var(--espd-header-height)-16px)]");
|
|
@@ -595,11 +599,12 @@
|
|
|
595
599
|
--text-sm: 0.875rem;
|
|
596
600
|
--text-sm--line-height: 1.25rem;
|
|
597
601
|
|
|
598
|
-
/** Every sidebar nav row: group labels and menu item labels share one scale
|
|
599
|
-
|
|
602
|
+
/** Every sidebar nav row: group labels and menu item labels share one scale,
|
|
603
|
+
the `label` role's size by default. */
|
|
604
|
+
--espd-sidebar-item-font-size: var(--espd-type-label-size);
|
|
600
605
|
/** Collapsed-sidebar flyout: group title row. Matches the rows above by default;
|
|
601
606
|
raise it if you want the flyout title to stand out from its submenu items. */
|
|
602
|
-
--espd-sidebar-flyout-group-label-font-size:
|
|
607
|
+
--espd-sidebar-flyout-group-label-font-size: var(--espd-type-label-size);
|
|
603
608
|
|
|
604
609
|
/* ─── Semantic tokens beyond colour ───
|
|
605
610
|
Each default reproduces the value the components used before it existed,
|