fokus-styles 2.5.0 → 2.6.0
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/package.json +17 -15
- package/CHANGELOG.md +0 -940
- package/dist/css/components.css.map +0 -1
- package/dist/css/components.min.css.map +0 -1
- package/dist/css/fokus-components.css.map +0 -1
- package/dist/css/fokus-components.min.css.map +0 -1
- package/dist/css/fokus-core.css.map +0 -1
- package/dist/css/fokus-core.min.css.map +0 -1
- package/dist/css/fokus-dark.css.map +0 -1
- package/dist/css/fokus-dark.min.css.map +0 -1
- package/dist/css/fokus-rtl.css.map +0 -1
- package/dist/css/fokus-rtl.min.css.map +0 -1
- package/dist/css/fokus-utilities.css.map +0 -1
- package/dist/css/fokus-utilities.min.css.map +0 -1
- package/dist/css/fokus.css.map +0 -1
- package/dist/css/fokus.min.css.map +0 -1
- package/dist/css/fonts.css.map +0 -1
- package/dist/css/fonts.min.css.map +0 -1
- package/dist/css/forms.css.map +0 -1
- package/dist/css/forms.min.css.map +0 -1
- package/dist/css/helpers.css.map +0 -1
- package/dist/css/helpers.min.css.map +0 -1
- package/dist/css/layout.css.map +0 -1
- package/dist/css/layout.min.css.map +0 -1
- package/dist/js/fokus.js.map +0 -7
- package/dist/js/fokus.min.js.map +0 -7
- package/docs/README.md +0 -86
- package/docs/comparison.md +0 -124
- package/docs/components/accordion.md +0 -104
- package/docs/components/alert-dialog.md +0 -99
- package/docs/components/alert.md +0 -104
- package/docs/components/avatar.md +0 -13
- package/docs/components/badge.md +0 -101
- package/docs/components/breadcrumb.md +0 -93
- package/docs/components/button-group.md +0 -13
- package/docs/components/button.md +0 -98
- package/docs/components/card.md +0 -111
- package/docs/components/carousel.md +0 -167
- package/docs/components/checkbox.md +0 -110
- package/docs/components/close-button.md +0 -13
- package/docs/components/code.md +0 -13
- package/docs/components/collapse.md +0 -78
- package/docs/components/combobox.md +0 -123
- package/docs/components/command-palette.md +0 -131
- package/docs/components/datatable.md +0 -173
- package/docs/components/datepicker.md +0 -137
- package/docs/components/divider.md +0 -57
- package/docs/components/dropdown.md +0 -103
- package/docs/components/empty-state.md +0 -65
- package/docs/components/file-upload-advanced.md +0 -116
- package/docs/components/file-upload.md +0 -93
- package/docs/components/icon-link.md +0 -13
- package/docs/components/input-group.md +0 -73
- package/docs/components/input.md +0 -90
- package/docs/components/list-group.md +0 -13
- package/docs/components/modal.md +0 -120
- package/docs/components/navbar.md +0 -74
- package/docs/components/nested-menu.md +0 -90
- package/docs/components/notification-center.md +0 -116
- package/docs/components/offcanvas.md +0 -102
- package/docs/components/pagination.md +0 -145
- package/docs/components/placeholder.md +0 -13
- package/docs/components/popover.md +0 -118
- package/docs/components/progress.md +0 -126
- package/docs/components/radio.md +0 -80
- package/docs/components/range.md +0 -83
- package/docs/components/rating.md +0 -91
- package/docs/components/ratio.md +0 -13
- package/docs/components/responsive.md +0 -19
- package/docs/components/scrollspy.md +0 -13
- package/docs/components/segmented-control.md +0 -82
- package/docs/components/select.md +0 -89
- package/docs/components/skeleton.md +0 -70
- package/docs/components/stepper.md +0 -107
- package/docs/components/switch.md +0 -97
- package/docs/components/table.md +0 -90
- package/docs/components/tabs.md +0 -104
- package/docs/components/tag.md +0 -144
- package/docs/components/tile.md +0 -112
- package/docs/components/timeline.md +0 -78
- package/docs/components/toast.md +0 -108
- package/docs/components/tooltip.md +0 -113
- package/docs/components/tree-view.md +0 -118
- package/docs/contributing/contributing.md +0 -18
- package/docs/getting-started/installation.md +0 -70
- package/docs/getting-started/usage.md +0 -105
- package/docs/guides/accessibility.md +0 -109
- package/docs/guides/charts.md +0 -73
- package/docs/guides/dark-mode.md +0 -90
- package/docs/guides/icons.md +0 -99
- package/docs/guides/javascript-api.md +0 -9
- package/docs/guides/layout-advanced.md +0 -118
- package/docs/guides/migration-clarus-to-fokus.md +0 -48
- package/docs/guides/migration-external.md +0 -123
- package/docs/guides/migration-v1.md +0 -63
- package/docs/guides/print.md +0 -30
- package/docs/guides/rtl-and-system-preferences.md +0 -28
- package/docs/guides/theming.md +0 -140
- package/docs/guides/utility-api.md +0 -9
- package/docs/prompts/prompt-plan.md +0 -45
- package/docs/reference/accessibility-matrix.md +0 -77
- package/docs/reference/browser-support.md +0 -75
- package/docs/reference/contrast-report.md +0 -54
- package/docs/reference/definitions.md +0 -868
- package/docs/reference/design-tokens.md +0 -208
- package/docs/reference/scss-architecture.md +0 -227
- package/docs/reference/size-baseline.json +0 -34
- package/docs/reference/stability.md +0 -89
- package/docs/showcase.md +0 -25
- package/mockup/README.md +0 -41
- package/mockup/assets/carousel-planning.png +0 -0
- package/mockup/assets/carousel-workspace.png +0 -0
- package/mockup/assets/example-theme.css +0 -19
- package/mockup/assets/example-theme.js +0 -11
- package/mockup/assets/showcase-contracts.js +0 -84
- package/mockup/assets/showcase.css +0 -91
- package/mockup/assets/showcase.js +0 -724
- package/mockup/content-data.html +0 -9
- package/mockup/examples/accordion-tabs-toast.html +0 -149
- package/mockup/examples/alert-dialog.html +0 -84
- package/mockup/examples/alerts.html +0 -115
- package/mockup/examples/badges-alerts.html +0 -109
- package/mockup/examples/buttons.html +0 -58
- package/mockup/examples/cards.html +0 -132
- package/mockup/examples/carousel.html +0 -126
- package/mockup/examples/charts.html +0 -102
- package/mockup/examples/check-radio-switch.html +0 -620
- package/mockup/examples/collapse.html +0 -69
- package/mockup/examples/combobox.html +0 -60
- package/mockup/examples/command-palette.html +0 -64
- package/mockup/examples/datatable.html +0 -113
- package/mockup/examples/datepicker.html +0 -62
- package/mockup/examples/divider.html +0 -45
- package/mockup/examples/dropdown-tooltip.html +0 -77
- package/mockup/examples/empty-state.html +0 -56
- package/mockup/examples/file-drop.html +0 -74
- package/mockup/examples/file-upload-advanced.html +0 -68
- package/mockup/examples/forms-advanced.html +0 -77
- package/mockup/examples/hover-card.html +0 -86
- package/mockup/examples/icons.html +0 -157
- package/mockup/examples/input-group.html +0 -74
- package/mockup/examples/js-foundation.html +0 -215
- package/mockup/examples/layout.html +0 -134
- package/mockup/examples/modal-select.html +0 -127
- package/mockup/examples/nested-menu.html +0 -73
- package/mockup/examples/notification-center.html +0 -86
- package/mockup/examples/offcanvas-popover.html +0 -133
- package/mockup/examples/pagination-breadcrumbs.html +0 -92
- package/mockup/examples/popover.html +0 -81
- package/mockup/examples/range.html +0 -69
- package/mockup/examples/rating.html +0 -103
- package/mockup/examples/segmented-control.html +0 -96
- package/mockup/examples/skeletons.html +0 -82
- package/mockup/examples/spinner-progress.html +0 -130
- package/mockup/examples/stepper.html +0 -119
- package/mockup/examples/tables-navbar.html +0 -89
- package/mockup/examples/tag.html +0 -115
- package/mockup/examples/theming.html +0 -68
- package/mockup/examples/tile.html +0 -107
- package/mockup/examples/timeline.html +0 -108
- package/mockup/examples/toast.html +0 -113
- package/mockup/examples/tooltip.html +0 -68
- package/mockup/examples/tree-view.html +0 -68
- package/mockup/feedback-actions.html +0 -9
- package/mockup/forms.html +0 -13
- package/mockup/foundations.html +0 -7
- package/mockup/kitchen-sink.html +0 -696
- package/mockup/navigation-disclosure.html +0 -11
- package/mockup/overlays-commands.html +0 -12
- package/mockup/templates/README.md +0 -20
- package/mockup/templates/admin.html +0 -334
- package/mockup/templates/auth.html +0 -234
- package/mockup/templates/dashboard.html +0 -442
- package/mockup/templates/landing.html +0 -397
- package/packages/fokus-icons/package.json +0 -46
- package/scripts/migrate-fokus-map.json +0 -1366
- package/scripts/migrate-fokus.mjs +0 -97
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Codemod da migração Clarus 1.x → Fokus Styles 2.0. Reescreve, em arquivos
|
|
3
|
-
// HTML/JS consumidores, os identificadores públicos que mudaram no rebranding.
|
|
4
|
-
// Não faz parte do build do framework.
|
|
5
|
-
//
|
|
6
|
-
// Uso:
|
|
7
|
-
// node migrate-fokus.mjs <arquivo-ou-pasta> [...mais] [--dry-run]
|
|
8
|
-
//
|
|
9
|
-
// Sem --dry-run, sobrescreve os arquivos in-place — rode com o working tree
|
|
10
|
-
// limpo (git) para poder revisar o diff depois.
|
|
11
|
-
import fs from "node:fs";
|
|
12
|
-
import path from "node:path";
|
|
13
|
-
import { fileURLToPath } from "node:url";
|
|
14
|
-
|
|
15
|
-
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
16
|
-
const dryRun = process.argv.includes("--dry-run");
|
|
17
|
-
const targets = process.argv.slice(2).filter((a) => !a.startsWith("--"));
|
|
18
|
-
|
|
19
|
-
if (targets.length === 0) {
|
|
20
|
-
console.error(
|
|
21
|
-
"Uso: node migrate-fokus.mjs <arquivo-ou-pasta> [...mais] [--dry-run]",
|
|
22
|
-
);
|
|
23
|
-
process.exitCode = 1;
|
|
24
|
-
process.exit();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const extensions = new Set([".html", ".htm", ".js", ".mjs", ".cjs", ".jsx", ".tsx"]);
|
|
28
|
-
|
|
29
|
-
function collectFiles(target, out) {
|
|
30
|
-
const stat = fs.statSync(target);
|
|
31
|
-
if (stat.isDirectory()) {
|
|
32
|
-
if (path.basename(target) === "node_modules") return;
|
|
33
|
-
for (const entry of fs.readdirSync(target)) {
|
|
34
|
-
collectFiles(path.join(target, entry), out);
|
|
35
|
-
}
|
|
36
|
-
} else if (extensions.has(path.extname(target))) {
|
|
37
|
-
out.push(target);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function replaceClassAttr(html) {
|
|
42
|
-
return html.replace(/class=(["'])([^"']*)\1/g, (full, quote, value) => {
|
|
43
|
-
const tokens = value.split(/(\s+)/).map((tok) => {
|
|
44
|
-
if (/^\s+$/.test(tok) || tok === "") return tok;
|
|
45
|
-
if (tok.startsWith("cl-")) return `fs-${tok.slice(3)}`;
|
|
46
|
-
if (tok.startsWith("u-")) return `fs-u-${tok.slice(2)}`;
|
|
47
|
-
return tok;
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
return `class=${quote}${tokens.join("")}${quote}`;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function replaceAttrsAndEvents(text) {
|
|
55
|
-
return text
|
|
56
|
-
.replace(/data-cl/g, "data-fs")
|
|
57
|
-
.replace(/data-brand/g, "data-fs-brand")
|
|
58
|
-
.replace(/--cl-/g, "--fs-")
|
|
59
|
-
.replace(/(['"`])cl:/g, "$1fs:")
|
|
60
|
-
.replace(/\bClarus\b/g, "FokusStyles")
|
|
61
|
-
.replace(/clarus-css/g, "fokus-styles")
|
|
62
|
-
.replace(/clarus-icons/g, "fokus-styles/icons")
|
|
63
|
-
.replace(/clarus-react/g, "fokus-styles/react")
|
|
64
|
-
.replace(/clarus-cli/g, "fokus-styles");
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function migrate(text) {
|
|
68
|
-
return replaceAttrsAndEvents(replaceClassAttr(text));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const files = [];
|
|
72
|
-
for (const target of targets) collectFiles(target, files);
|
|
73
|
-
|
|
74
|
-
let changed = 0;
|
|
75
|
-
for (const file of files) {
|
|
76
|
-
const original = fs.readFileSync(file, "utf8");
|
|
77
|
-
const updated = migrate(original);
|
|
78
|
-
|
|
79
|
-
if (updated === original) continue;
|
|
80
|
-
changed += 1;
|
|
81
|
-
|
|
82
|
-
if (dryRun) {
|
|
83
|
-
console.log(`[dry-run] mudaria: ${file}`);
|
|
84
|
-
} else {
|
|
85
|
-
fs.writeFileSync(file, updated);
|
|
86
|
-
console.log(`migrado: ${file}`);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
console.log(
|
|
91
|
-
`\n${files.length} arquivo(s) verificado(s), ${changed} ${dryRun ? "seriam alterados" : "alterados"}.`,
|
|
92
|
-
);
|
|
93
|
-
console.log(
|
|
94
|
-
"\nAviso: a substituição de classes é por correspondência exata de token " +
|
|
95
|
-
"(`cl-` → `fs-` e `u-` → `fs-u-`). Se você tem uma classe própria com " +
|
|
96
|
-
"esses prefixos, revise o diff antes de commitar.",
|
|
97
|
-
);
|