Компоненти
Діалогове вікно
Модальний шар для завдань, що потребують уваги, і підтверджень.
Використання
Основне
Edit profile
Make changes to your profile here, then save when you are done.
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Edit profile" trigger_variant="outline" />
<bs:bsui-dialog-backdrop />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Edit profile" />
<bs:bsui-dialog-description content="Make changes to your profile here, then save when you are done." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-content>
<bs:bsui-field>
<bs:bsui-field-label text="Name" />
<bs:bsui-input defaultValue="Pedro Duarte" />
</bs:bsui-field>
</bs:bsui-dialog-content>
<bs:bsui-dialog-footer>
<bs:bsui-dialog-close label="Cancel" variant="outline" />
<bs:bsui-dialog-close label="Save changes" variant="default" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>Вкладені діалоги
Другий діалог відкривається всередині першого: батьківський залишається змонтованим і зменшується позаду дочірнього.
Workspace settings
Renaming a workspace updates every invite link that points at it.
Delete Northwind?
Nine projects and their build history go with it.
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Workspace settings" trigger_variant="outline" />
<bs:bsui-dialog-backdrop />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Workspace settings" />
<bs:bsui-dialog-description content="Renaming a workspace updates every invite link that points at it." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-content>
<bs:bsui-field>
<bs:bsui-field-label text="Workspace name" />
<bs:bsui-input defaultValue="Northwind" />
</bs:bsui-field>
</bs:bsui-dialog-content>
<bs:bsui-dialog-footer>
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Delete" trigger_variant="destructive" />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Delete Northwind?" />
<bs:bsui-dialog-description content="Nine projects and their build history go with it." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-footer>
<bs:bsui-dialog-close label="Keep workspace" variant="outline" />
<bs:bsui-dialog-close label="Delete forever" variant="destructive" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>
<bs:bsui-dialog-close label="Save changes" variant="default" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>Три рівні вкладеності
Тло відображає лише найзовнішній діалог; кожен відкритий рівень зменшує розташований позаду, а Escape закриває лише верхній елемент стека.
Publish 2.4.0
Fourteen commits landed since the last tag.
Changes in this release
Two of them touch the public API.
Two breaking changes
Anyone still on 2.3 has to update their config before upgrading.
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Publish release" />
<bs:bsui-dialog-backdrop />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Publish 2.4.0" />
<bs:bsui-dialog-description content="Fourteen commits landed since the last tag." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-footer>
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Review changes" trigger_variant="outline" />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Changes in this release" />
<bs:bsui-dialog-description content="Two of them touch the public API." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-footer>
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="Breaking changes" trigger_variant="destructive" />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Two breaking changes" />
<bs:bsui-dialog-description content="Anyone still on 2.3 has to update their config before upgrading." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-footer>
<bs:bsui-dialog-close label="Understood" variant="default" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>
<bs:bsui-dialog-close label="Back" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>
<bs:bsui-dialog-close label="Publish" variant="default" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>Форма зі списком вибору
Справжня форма створення в тілі діалогу; список варіантів відкривається всередині спливного вікна, а не позаду нього.
New project
Projects inherit the plan of the workspace they belong to.
<bs:bsui-dialog>
<bs:bsui-dialog-trigger trigger_label="New project" />
<bs:bsui-dialog-backdrop />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="New project" />
<bs:bsui-dialog-description content="Projects inherit the plan of the workspace they belong to." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-content>
<bs:bsui-stack direction="column" gap="4" align="stretch">
<bs:bsui-field>
<bs:bsui-field-label text="Project name" />
<bs:bsui-input placeholder="Northwind API" />
<bs:bsui-field-description text="Lowercase letters, numbers and dashes." />
</bs:bsui-field>
<bs:bsui-field>
<bs:bsui-field-label text="Region" />
<bs:bsui-select placeholder="Pick a region" defaultValue="eu">
<bs:bsui-select-trigger />
<bs:bsui-select-popup>
<bs:bsui-select-option value="eu" label="Europe" />
<bs:bsui-select-option value="us" label="United States" />
<bs:bsui-select-option value="ap" label="Asia Pacific" />
</bs:bsui-select-popup>
</bs:bsui-select>
</bs:bsui-field>
<bs:bsui-checkbox label="Seed the project with sample data" defaultChecked="true" />
</bs:bsui-stack>
</bs:bsui-dialog-content>
<bs:bsui-dialog-footer>
<bs:bsui-dialog-close label="Cancel" variant="outline" />
<bs:bsui-dialog-close label="Create project" variant="default" />
</bs:bsui-dialog-footer>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>Не можна закрити натисканням поза діалогом
Коли закриття натисканням поза діалогом вимкнено, він ігнорує Escape та клацання на тлі, тож вийти можна лише кнопкою закриття в куті.
Migration in progress
Closing this window does not stop the migration.
<bs:bsui-dialog dismissable="false">
<bs:bsui-dialog-trigger trigger_label="Migrate database" />
<bs:bsui-dialog-backdrop />
<bs:bsui-dialog-popup>
<bs:bsui-dialog-close x="true" />
<bs:bsui-dialog-header>
<bs:bsui-dialog-title content="Migration in progress" />
<bs:bsui-dialog-description content="Closing this window does not stop the migration." />
</bs:bsui-dialog-header>
<bs:bsui-dialog-content>
<bs:bsui-progress value="62" max="100" label="Rewriting indexes" />
</bs:bsui-dialog-content>
</bs:bsui-dialog-popup>
</bs:bsui-dialog>Структура
Діалогове вікно складається з блоків нижче. Кожен із них є окремим блоком, який відображається лише всередині батьківського.
bsui/dialogbsui/dialog-backdropbsui/dialog-popupbsui/dialog-closebsui/dialog-contentbsui/dialog-footerbsui/dialog-headerbsui/dialog-descriptionbsui/dialog-titlebsui/dialog-trigger
Атрибути
| Атрибут | Тип | За замовчуванням |
|---|---|---|
dismissable | toggle | true |
bsui/dialog-backdrop
Цей блок не приймає атрибутів.
bsui/dialog-popup
Цей блок не приймає атрибутів.
bsui/dialog-close
| Атрибут | Тип | За замовчуванням |
|---|---|---|
label | richtext | — |
variant | outline | |
x | toggle | false |
bsui/dialog-content
Цей блок не приймає атрибутів.
bsui/dialog-footer
Цей блок не приймає атрибутів.
bsui/dialog-header
Цей блок не приймає атрибутів.
bsui/dialog-description
| Атрибут | Тип | За замовчуванням |
|---|---|---|
content | richtext | — |
bsui/dialog-title
| Атрибут | Тип | За замовчуванням |
|---|---|---|
content | richtext | — |
bsui/dialog-trigger
| Атрибут | Тип | За замовчуванням |
|---|---|---|
trigger | text | — |
trigger_block | text | bsui/button |
trigger_label | richtext | — |
trigger_icon | icon | — |
trigger_iconPosition | left | |
trigger_href | text | — |
trigger_variant | default | |
trigger_size | default | |
trigger_disabled | toggle | false |