aplance-ui 1.2.0 → 1.2.2
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/dist/api.d.ts +2 -0
- package/dist/api.js +4 -0
- package/dist/api.js.map +1 -1
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/package.json +63 -63
- package/registry/components/primitives/modal/modal.tsx +46 -13
- package/registry/components/primitives/popover/popover.tsx +6 -0
- package/registry/components/ui/data-table/data-table.module.css +89 -20
- package/registry/components/ui/data-table/data-table.tsx +193 -111
- package/registry/components/ui/data-table/pagination-bar.tsx +174 -71
- package/registry/components/ui/data-table/types.ts +12 -3
- package/registry/components/ui/input-fields/common/input-field-native.module.css +52 -42
- package/registry/components/ui/input-fields/custom-select/custom-select.tsx +76 -10
- package/registry/components/ui/input-fields/input/input.tsx +69 -51
- package/registry/components/ui/input-fields/media-input/media-input.module.css +29 -0
- package/registry/components/ui/input-fields/media-input/media-preview.tsx +25 -7
- package/registry/hooks/useFocusOutside.tsx +21 -6
- package/registry/registry.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1669,6 +1669,7 @@ var resolveConfig = async (opts, project, registry) => {
|
|
|
1669
1669
|
return { cfg, existed: false };
|
|
1670
1670
|
};
|
|
1671
1671
|
var pickInitialComponents = async (opts, registry) => {
|
|
1672
|
+
if (opts.skipComponents) return [];
|
|
1672
1673
|
if (opts.all) return registry.units.map((u) => u.name);
|
|
1673
1674
|
if (opts.components && opts.components.length > 0) return opts.components;
|
|
1674
1675
|
if (opts.yes) return [];
|
|
@@ -1685,6 +1686,9 @@ var pickInitialComponents = async (opts, registry) => {
|
|
|
1685
1686
|
});
|
|
1686
1687
|
};
|
|
1687
1688
|
var runInit = async (opts) => {
|
|
1689
|
+
if (opts.skipComponents && (opts.all || opts.components && opts.components.length > 0)) {
|
|
1690
|
+
throw new Error("error: --skip-components cannot be combined with --all or --components");
|
|
1691
|
+
}
|
|
1688
1692
|
headline("Scaffold tokens, theme, PostCSS, and optionally copy components.");
|
|
1689
1693
|
const registry = loadRegistry();
|
|
1690
1694
|
const project = detectProject(opts.cwd);
|
|
@@ -2021,12 +2025,24 @@ var require2 = createRequire(import.meta.url);
|
|
|
2021
2025
|
var pkg = require2("../package.json");
|
|
2022
2026
|
var program = new Command();
|
|
2023
2027
|
program.name("aplance-ui").description("Scaffold the aplance-ui design system and copy components into your project.").version(pkg.version);
|
|
2024
|
-
program.command("init").description("Scaffold styles, PostCSS config, theme, and (optionally) an initial set of components.").option("-t, --template <template>", `framework: ${SUPPORTED_TEMPLATES.join(" | ")}`).option("--color <id>", "color palette: default | slate | zinc | stone | rose | blue | green | violet").option("--radius <id>", "radius scale: default | sharp | rounded | pill").option("--spacing <id>", "spacing scale: default | compact | spacious").option("--src-dir <path>", "project source root (overrides template default)").option("--alias <prefix>", "path-alias prefix (default '@')").option("-c, --components <names>", "comma-separated list of components/hooks/libs to copy during init").option("--all", "copy every unit in the registry").option(
|
|
2028
|
+
program.command("init").description("Scaffold styles, PostCSS config, theme, and (optionally) an initial set of components.").option("-t, --template <template>", `framework: ${SUPPORTED_TEMPLATES.join(" | ")}`).option("--color <id>", "color palette: default | slate | zinc | stone | rose | blue | green | violet").option("--radius <id>", "radius scale: default | sharp | rounded | pill").option("--spacing <id>", "spacing scale: default | compact | spacious").option("--src-dir <path>", "project source root (overrides template default)").option("--alias <prefix>", "path-alias prefix (default '@')").option("-c, --components <names>", "comma-separated list of components/hooks/libs to copy during init").option("--all", "copy every unit in the registry").option(
|
|
2029
|
+
"--skip-components",
|
|
2030
|
+
"scaffold only styles, tokens, postcss config and components.json - no components/hooks/libs"
|
|
2031
|
+
).option("-y, --yes", "non-interactive: accept defaults, never prompt").option("-f, --force", "overwrite existing files without prompting").option("-d, --dry-run", "print what would be written without touching the filesystem").option("--skip-styles", "do not write the styles folder").option("--skip-css-config", "do not write postcss.config.* or per-framework CSS configs").option("--with-utilities", "enable postcss-token-utilities in the generated CSS config").option(
|
|
2025
2032
|
"--css-config-placement <placement>",
|
|
2026
2033
|
`css config placement: ${CSS_CONFIG_PLACEMENTS.join(" | ")}`
|
|
2027
2034
|
).option("--pretty-css-modules", "use human-readable CSS Modules class names (Vite-family templates)").option("--overwrite-config", "rewrite components.json even if it already exists").option("--no-install", "skip auto-installing runtime and dev dependencies").option(
|
|
2028
2035
|
"--package-manager <pm>",
|
|
2029
2036
|
`force a package manager: ${PACKAGE_MANAGERS.join(" | ")} (default: auto-detect)`
|
|
2037
|
+
).addHelpText(
|
|
2038
|
+
"after",
|
|
2039
|
+
`
|
|
2040
|
+
Examples:
|
|
2041
|
+
$ aplance-ui init # interactive
|
|
2042
|
+
$ aplance-ui init --skip-components --yes # design system only
|
|
2043
|
+
$ aplance-ui init --components button,input --yes # design system + named components
|
|
2044
|
+
$ aplance-ui init --all --yes # design system + every component
|
|
2045
|
+
`
|
|
2030
2046
|
).action(async (opts) => {
|
|
2031
2047
|
try {
|
|
2032
2048
|
const template = opts.template;
|
|
@@ -2054,6 +2070,7 @@ program.command("init").description("Scaffold styles, PostCSS config, theme, and
|
|
|
2054
2070
|
alias: opts.alias,
|
|
2055
2071
|
components,
|
|
2056
2072
|
all: opts.all,
|
|
2073
|
+
skipComponents: opts.skipComponents,
|
|
2057
2074
|
yes: opts.yes,
|
|
2058
2075
|
force: opts.force,
|
|
2059
2076
|
dryRun: opts.dryRun,
|