@fleetbase/ember-ui

中文文档
0.4.6发布于 2026/10/14AGPL-3.0-or-later近 30 天下载 5011

Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.

原始使用文档
文档目录9 节
  1. Documentation
  2. Installation
  3. Usage
  4. Components
  5. Playground
  6. Development
  7. Testing and coverage
  8. Contributing
  9. License

Fleetbase

Fleetbase Ember UI

The component library behind the Fleetbase console — layout, data, forms, calendars and modals for Ember applications and Fleetbase extensions.

npm CI Coverage Downloads License

Documentation · Playground · Playground guide · Contributing


Documentation

The reference documentation lives at fleetbase.io/docs/ui — every argument, every yielded block, and the guidance on when to reach for which component.

The playground is its interactive companion: each documented component has a page where you change arguments and watch the real component react.

Installation

pnpm add @fleetbase/ember-ui

Requires Node 18 or newer. The addon brings its own styles; no additional CSS import is needed.

Usage

Components resolve like any other Ember component once the addon is installed:

<Layout::Container>
    <Layout::Header />
    <Layout::Sidebar />
    <Layout::Main>
        <ContentPanel @title="Orders" @open={{true}}>
            <Table @columns={{this.columns}} @rows={{this.orders}} @selectable={{true}} />
        </ContentPanel>

        <Button @type="primary" @text="New order" @icon="plus" @onClick={{this.createOrder}} />
    </Layout::Main>
</Layout::Container>

Services are injected the usual way:

import { inject as service } from '@ember/service';

export default class OrdersController extends Controller {
    @service modalsManager;

    @action confirmDelete(order) {
        return this.modalsManager.confirm({
            title: 'Delete this order?',
            body: `${order.reference} will be removed permanently.`,
            confirm: () => order.destroyRecord(),
        });
    }
}

Components

The documented surface is 63 components. Each links to its reference page and to a live, editable example.

Layout & Structure — 17 components
ComponentDocsPlayground
<Layout::Container />docstry it
<Layout::Header />docstry it
<Layout::Sidebar />docstry it
<Layout::Main />docstry it
<Layout::Section />docstry it
<Layout::MobileNavbar />docstry it
<ContentPanel />docstry it
<Overlay />docstry it
<Drawer />docstry it
<Layout::Resource::Tabular />docstry it
<Layout::Resource::Card />docstry it
<Layout::Resource::CardsGrid />docstry it
<Layout::Resource::Panel />docstry it
<Floating />docstry it
<Attach::Tooltip />docstry it
<Attach::Popover />docstry it
<Spacer />docstry it
Navigation — 3 components
ComponentDocsPlayground
<TabNavigation />docstry it
<Tabs />docstry it
<DropdownButton />docstry it
Buttons & Actions — 3 components
ComponentDocsPlayground
<Button />docstry it
<ClickToCopy />docstry it
<ClickToReveal />docstry it
Forms & Inputs — 15 components
ComponentDocsPlayground
<InputGroup />docstry it
<Checkbox />docstry it
<Toggle />docstry it
<Select />docstry it
<MultiSelect />docstry it
<ComboBox />docstry it
<ModelSelect />docstry it
<DatePicker />docstry it
<DateTimeInput />docstry it
<PhoneInput />docstry it
<CoordinatesInput />docstry it
<ModelCoordinatesInput />docstry it
<UnitInput />docstry it
<MoneyInput />docstry it
<FileUpload />docstry it
Data Display — 9 components
ComponentDocsPlayground
<Table />docstry it
<Badge />docstry it
<Pill />docstry it
<ProgressBar />docstry it
<Spinner />docstry it
<Timeline />docstry it
<ActivityLog />docstry it
<File />docstry it
<CommentThread />docstry it
Calendars & Boards — 3 components
ComponentDocsPlayground
<FullCalendar />docstry it
<EventCalendar />docstry it
<Kanban />docstry it
Modals — 9 components
ComponentDocsPlayground
<Modal::Default />docstry it
<Modal::Layouts::Confirm />docstry it
<Modal::Layouts::Alert />docstry it
<Modal::Layouts::Prompt />docstry it
<Modal::Layouts::BulkAction />docstry it
<Modal::Layouts::Progress />docstry it
<Modal::Layouts::Process />docstry it
<Modal::Layouts::Loading />docstry it
<Modal::Layouts::OptionPrompt />docstry it
Dashboard — 1 component
ComponentDocsPlayground
<Dashboard />docstry it
Builders — 2 components
ComponentDocsPlayground
<ReportBuilder />docstry it
<TemplateBuilder />docstry it
Registry & Slots — 1 component
ComponentDocsPlayground
<RegistryYield />docstry it

The addon exports more components than this — table cells, chat internals, builder sub-components and other implementation details. Those are deliberately undocumented: they are internal to the components above and are not covered by the documentation, the playground, or any compatibility promise.

Playground

Built from this addon's own dummy application, so it renders the real components through normal Ember resolution with the real addon styles.

pnpm start                    # http://localhost:4200
pnpm run build:playground     # static GitHub Pages artifact into playground-dist/
RoutePurpose
/componentsSearchable, categorized catalog
/components/:slugFull page: controls, presets, event log, usage snippet
/embed/:slugMinimal iframe view, embedded by the documentation site

Argument state is carried in one encoded query parameter, so a configured example is a shareable link and the embed shows exactly what the full page shows.

See PLAYGROUND.md for the architecture, the registry schema, how to add an example, iframe integration and resize messaging, and how to update the documented allowlist when fleetbase.io/docs/ui changes.

Development

pnpm install --frozen-lockfile

pnpm start                # serve the playground / dummy app
pnpm test                 # lint + the full suite
pnpm run test:ember       # the suite on its own
pnpm run lint             # eslint, ember-template-lint, stylelint
pnpm run build            # production build

Run a subset while working on one component:

pnpm exec ember test --filter="Integration | Component | button"

Testing and coverage

The suite runs in headless Chrome through Testem. Coverage is gated at 100% of first-party addon/ source — statements, branches, functions and lines — and enforced in CI:

pnpm run test:coverage       # run the suite with coverage
pnpm run coverage:check      # enforce the gate

Contributing

See the Contributing guide.

License

Licensed under the GNU Affero General Public License v3.0 or later.

版本与发布记录

@fleetbase/ember-ui 共发布 107 个版本,首次发布于 2023/05/17;过去 12 个月发布了 38 个版本。

版本发布日期距今
0.4.6latest2026/10/141 个月前
0.4.52026/10/051 个月前
0.4.42026/09/281 个月前
0.4.32026/09/231 个月前
0.4.22026/09/161 个月前
0.4.12026/09/161 个月前

关于 @fleetbase/ember-ui 的常见问题

@fleetbase/ember-ui 是什么?

Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.

如何安装 @fleetbase/ember-ui?

在项目目录运行 npm install @fleetbase/ember-ui,或使用 pnpm add / yarn add / bun add。

@fleetbase/ember-ui 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/fleetbase__ember-ui 是否存在。

@fleetbase/ember-ui 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >= 18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@fleetbase/ember-ui 可以商用吗?

@fleetbase/ember-ui 使用 AGPL-3.0-or-later 许可。最严格的 Copyleft:除分发外,通过网络向用户提供基于它的服务也需要开源对应源码。闭源 SaaS 使用前务必评估。以上为概括,不构成法律意见,请以许可原文为准。

@fleetbase/ember-ui 的下载量有多少?

根据 npm 官方下载统计,@fleetbase/ember-ui 在 2026/10/15 – 2026/11/13 这 30 天内被下载 5,011 次,日均约 167 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fleetbase/ember-ui 还在维护吗?

最新版本 0.4.6 发布于 2026/10/14(1 个月前);至今共发布 107 个版本,其中过去 12 个月发布了 38 个;首次发布于 2023/05/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。