@featherk/ui

中文文档
0.19.4发布于 2026/11/14MITTypeScriptESM + CJS零依赖近 30 天下载 2485

Vue 3 components built on Kendo UI for Vue and driven by @featherk/composables.

原始使用文档
文档目录10 节
  1. Components Overview
  2. Importing Components
  3. What Gets Installed vs. What Ships
  4. Kendo UI Compatibility
  5. Dependencies
  6. Styling
  7. Testing with Vitest
  8. Build
  9. Maintainer Notes
  10. Changelog

@featherk/ui

Vue 3 components built on Kendo UI for Vue and driven by @featherk/composables.

Components Overview

  • Address: USAddress - Presentational US address renderer driven by a parent-owned useUSAddress view model.
  • Table: ActionCell - Configurable repeatable action-button container driven by a parent-owned shared popup lifecycle.
  • Picker: DateField - Kendo DatePicker with a masked input, driven by a parent-owned useMaskedDateInput.
  • Picker: TimeField - Kendo TimePicker with a masked input, driven by a parent-owned useMaskedTimeInput.
  • Picker: DateRangeField - Masked date range input with a range calendar popup, driven by a parent-owned useMaskedDateRangeInput.

Importing Components

Import from the feature subpath. Each subpath is a separate entry that imports only its own components, styles and peer dependencies at runtime, which also keeps the dev server fast. The package root re-exports every feature; see What Gets Installed vs. What Ships. Don't import internal dist paths.

import { USAddress } from "@featherk/ui/address";
import { ActionCell } from "@featherk/ui/table";
import { DateField, DateRangeField, TimeField } from "@featherk/ui/picker";
import { useUSAddress } from "@featherk/composables/address";

For complete setup, behavior, and examples, use the component guide listed in Components Overview.

What Gets Installed vs. What Ships

FeatherK packages should just work once installed: you should never have to track down a missing dependency or silence a peer warning. When that conflicts with install size, FeatherK accepts a larger node_modules and keeps the browser bundle small.

You importInstalled in node_modulesShipped to the browser (production build)
import { X } from "@featherk/ui/<feature>"All required peers, installed automaticallyX, its styles and the peers it imports
import { X } from "@featherk/ui"SameSame as the subpath import
Nothing from a featureIts peers are still installedNothing from that feature

During vite dev, a root import loads every feature. This affects only the dev server, not what users download.

Kendo UI Compatibility

Built and tested against Kendo UI for Vue 6.4.1. Kendo packages are declared as peer dependencies (^6.4.1), so your application controls the installed Kendo version.

SubpathComponentsKendo packages
addressUSAddresskendo-vue-dropdowns, kendo-vue-inputs, kendo-vue-labels
tableActionCell, useActionCellMenukendo-vue-buttons, kendo-vue-grid
pickerDateField, TimeField, DateRangeFieldkendo-vue-common, kendo-vue-dateinputs, kendo-vue-inputs, kendo-vue-labels, kendo-vue-popup, kendo-vue-tooltip

Dependencies

  • Required peers: vue (3.5+), @featherk/composables, @featherk/icons, @progress/kendo-vue-buttons, @progress/kendo-vue-common, @progress/kendo-vue-dateinputs, @progress/kendo-vue-dropdowns, @progress/kendo-vue-grid, @progress/kendo-vue-inputs, @progress/kendo-vue-labels, @progress/kendo-vue-popup, @progress/kendo-vue-tooltip

    npm and pnpm install these automatically; with Yarn Berry, install them yourself. Each subpath loads only the ones its components use, so an app that never imports @featherk/ui/picker never loads @featherk/icons or @progress/kendo-vue-tooltip.

  • Optional peers:

    • @progress/kendo-vue-layout, for useActionCellMenu — its menuProps are spread onto a shared Kendo <Menu>
    • @progress/kendo-svg-icons (types only) — used by ActionCell icon typings
  • Runtime dependencies: none. Everything is a peer, so your app and FeatherK share one copy of Vue, Kendo and @featherk/composables.

Keep all @featherk/* packages on the same version. They release together, and each @featherk/ui release requires at least the matching @featherk/composables and @featherk/icons. With Renovate or Dependabot, group them into one update.

Styling

Component styles ship with @featherk/ui. Each ES entry imports the styles for its own components, so nothing needs to be imported separately. The CommonJS build (require) does not import CSS. Theme styles for the Kendo components come from @featherk/styles.

Testing with Vitest

Vitest leaves installed packages to Node, and Node can't load the stylesheets each entry imports. Without this setting, tests that import @featherk/ui fail with Unknown file extension ".css":

// vitest.config.ts
export default defineConfig({
  test: {
    server: { deps: { inline: ["@featherk/ui"] } },
  },
});

To mock a composable, mock its subpath, not the package root. Each subpath is a separate module, and a mock replaces only the module it names. FeatherK components import composables from their subpaths, so a root mock never reaches them. For example, TimeField imports usePopupTrap from @featherk/composables/trap:

// Before 0.18.0 every subpath was one module, so this also reached TimeField.
vi.mock("@featherk/composables", …);

// Now: mock the subpath.
vi.mock("@featherk/composables/trap", …);

Import from the same subpath in your own code too. A subpath mock doesn't reach code that imports from the root.

Build

Run from repository root:

npm run build -- --filter=@featherk/ui

Or run package-local:

npm run build

Maintainer Notes

  • Every feature folder has an index.ts barrel, is re-exported from src/index.ts, and has a matching exports subpath.
  • vite.config.ts builds one ES and one CommonJS entry for the root and for each package.json exports subpath (address, table, picker). A new feature folder only needs its subpath added to exports.
  • Scoped component styles are split per feature, and a small Vite plugin imports each chunk's CSS from its ES module. New components get their styles with no extra step.
  • package.json lists only CSS in sideEffects, so a root import tree-shakes to the same code and styles as the subpath. Keep other modules free of import-time side effects, or add them to sideEffects.
  • Keep shared state out of module scope: no module-level refs, Maps or provide/inject keys. An app can load both the ES and CommonJS builds, and the two copies don't share state. Create state in the component or composable and pass the instance, as useActionCellMenu does.
  • Add each new component and composable to coverage.include in vitest.config.ts, unless a glob such as src/picker/*.vue already covers it. The list is explicit, so a file left out is missing from the coverage report, even when it has its own tests.
  • The repo's scripts/check-entries.mjs runs at the end of the build. It fails if an export target is missing, an entry imports an undeclared peer, any entry imports an optional peer (npm doesn't install those), or a stylesheet is not imported.
  • The repo's scripts/check-peers.mjs runs after it. It fails unless each @featherk/* peer range is >=x.y.z with a minimum of at least that sibling's current version, so npm never pairs this release with an older sibling that lacks what it imports. Packages release in lockstep, so the root version:patch|minor|major scripts run scripts/sync-peers.mjs, which raises these minimums to the new version in package.json and package-lock.json.
  • For new component documentation, follow the docs authoring template in docs/README.md.

Changelog

Release history for all @featherk/* packages is maintained in a single CHANGELOG.md.

版本与发布记录

@featherk/ui 共发布 61 个版本,首次发布于 2026/08/05;过去 12 个月发布了 61 个版本。

版本发布日期距今
0.19.4latest2026/11/14今天
0.19.32026/11/113 天前
0.19.22026/11/058 天前
0.19.12026/10/3114 天前
0.19.02026/10/2717 天前
0.18.12026/10/2421 天前

关于 @featherk/ui 的常见问题

@featherk/ui 是什么?

Vue 3 components built on Kendo UI for Vue and driven by @featherk/composables.

如何安装 @featherk/ui?

在项目目录运行 npm install @featherk/ui,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(^3.5.0)、@featherk/icons(>=0.19.4)、@featherk/composables(>=0.19.4)、@progress/kendo-vue-grid(^6.4.1)、@progress/kendo-vue-popup(^6.4.1)、@progress/kendo-vue-common(^6.4.1)、@progress/kendo-vue-inputs(^6.4.1)、@progress/kendo-vue-labels(^6.4.1)、@progress/kendo-vue-buttons(^6.4.1)、@progress/kendo-vue-tooltip(^6.4.1)、@progress/kendo-vue-dropdowns(^6.4.1)、@progress/kendo-vue-dateinputs(^6.4.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@featherk/ui 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@featherk/ui 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@featherk/ui 可以商用吗?

@featherk/ui 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@featherk/ui 的下载量有多少?

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

@featherk/ui 还在维护吗?

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