mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-19 07:03:42 +08:00
Adds a grid-based icon picker (`DIconGridPicker`) and replaces the old SelectKit `IconPicker` across the codebase. **New component** (`d-icon-grid-picker`): - Grid-based icon picker with search, favorites row, and mobile modal support - Uses `DMenu`/float-kit for desktop dropdown, modal for mobile - Server-side search via `/svg-sprite/picker-search` with client-side caching - API: `@value`, `@onChange`, `@favorites`, `@allowClear`, `@showCaret`, `@btnClass`, `@label`, `@modalForMobile`, `@inline`, `@onShow`, `@onClose`, `@disabled`, `@onlyAvailable`, `@iconColor` - Full integration test suite and `// @ts-check` **Replaces** the old SelectKit `IconPicker` in: - Category editor general tab - Sidebar section form - Badge/group flair inputs - FormKit icon control - Admin site settings icon - Styleguide dropdowns section **Deprecation**: Adds deprecation notice to the old select-kit `IconPicker`. **Test updates**: - New `DIconGridPicker` page object with `expand`, `filter`, `select_icon`, `clear`, etc. - Updated FormKit test helpers and assertions - Fixed sidebar section form page object and system specs - Fixed focus selector in sidebar-section-form component --------- Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
16 lines
292 B
SCSS
Vendored
16 lines
292 B
SCSS
Vendored
.form-kit__control-icon {
|
|
.d-icon-grid-picker {
|
|
width: 100%;
|
|
min-width: var(--form-kit-small-input);
|
|
}
|
|
|
|
.d-icon-grid-picker__caret {
|
|
color: var(--primary-medium);
|
|
}
|
|
|
|
.form-kit__field.has-error & {
|
|
.fk-d-menu__trigger {
|
|
border-color: var(--danger);
|
|
}
|
|
}
|
|
}
|