fokus-styles 2.4.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.
Files changed (212) hide show
  1. package/dist/css/components.css +561 -83
  2. package/dist/css/components.min.css +1 -1
  3. package/dist/css/fokus-components.css +561 -83
  4. package/dist/css/fokus-components.min.css +1 -1
  5. package/dist/css/fokus-rtl.css +697 -83
  6. package/dist/css/fokus-rtl.min.css +1 -1
  7. package/dist/css/fokus-utilities.css +136 -0
  8. package/dist/css/fokus-utilities.min.css +1 -1
  9. package/dist/css/fokus.css +996 -258
  10. package/dist/css/fokus.min.css +1 -1
  11. package/dist/css/forms.css +300 -176
  12. package/dist/css/forms.min.css +1 -1
  13. package/dist/css/helpers.css +136 -0
  14. package/dist/css/helpers.min.css +1 -1
  15. package/dist/js/fokus.js +270 -25
  16. package/dist/js/fokus.min.js +18 -18
  17. package/package.json +17 -15
  18. package/packages/fokus-components/scss/components/_alerts.scss +128 -6
  19. package/packages/fokus-components/scss/components/_badges.scss +26 -10
  20. package/packages/fokus-components/scss/components/_index.scss +1 -0
  21. package/packages/fokus-components/scss/components/_popover.scss +131 -21
  22. package/packages/fokus-components/scss/components/_responsive.scss +23 -0
  23. package/packages/fokus-components/scss/components/_tag.scss +37 -14
  24. package/packages/fokus-components/scss/components/_toasts.scss +156 -11
  25. package/packages/fokus-components/scss/components/_tooltips.scss +70 -18
  26. package/packages/fokus-components/scss/forms/_check-radio-switch.scss +313 -215
  27. package/packages/fokus-components/scss/forms/_forms.scss +16 -0
  28. package/packages/fokus-js/js/carousel.d.ts +4 -0
  29. package/packages/fokus-js/js/carousel.js +8 -0
  30. package/packages/fokus-js/js/core/positioning.js +18 -9
  31. package/packages/fokus-js/js/dropdown.d.ts +4 -0
  32. package/packages/fokus-js/js/dropdown.js +7 -0
  33. package/packages/fokus-js/js/popover.js +26 -1
  34. package/packages/fokus-js/js/tabs.d.ts +3 -0
  35. package/packages/fokus-js/js/tabs.js +5 -0
  36. package/packages/fokus-js/js/tag.js +17 -0
  37. package/packages/fokus-js/js/toast.js +77 -3
  38. package/packages/fokus-js/js/tooltip.d.ts +8 -1
  39. package/packages/fokus-js/js/tooltip.js +106 -13
  40. package/packages/fokus-utilities/scss/utilities/_api.scss +48 -0
  41. package/CHANGELOG.md +0 -910
  42. package/dist/css/components.css.map +0 -1
  43. package/dist/css/components.min.css.map +0 -1
  44. package/dist/css/fokus-components.css.map +0 -1
  45. package/dist/css/fokus-components.min.css.map +0 -1
  46. package/dist/css/fokus-core.css.map +0 -1
  47. package/dist/css/fokus-core.min.css.map +0 -1
  48. package/dist/css/fokus-dark.css.map +0 -1
  49. package/dist/css/fokus-dark.min.css.map +0 -1
  50. package/dist/css/fokus-rtl.css.map +0 -1
  51. package/dist/css/fokus-rtl.min.css.map +0 -1
  52. package/dist/css/fokus-utilities.css.map +0 -1
  53. package/dist/css/fokus-utilities.min.css.map +0 -1
  54. package/dist/css/fokus.css.map +0 -1
  55. package/dist/css/fokus.min.css.map +0 -1
  56. package/dist/css/fonts.css.map +0 -1
  57. package/dist/css/fonts.min.css.map +0 -1
  58. package/dist/css/forms.css.map +0 -1
  59. package/dist/css/forms.min.css.map +0 -1
  60. package/dist/css/helpers.css.map +0 -1
  61. package/dist/css/helpers.min.css.map +0 -1
  62. package/dist/css/layout.css.map +0 -1
  63. package/dist/css/layout.min.css.map +0 -1
  64. package/dist/js/fokus.js.map +0 -7
  65. package/dist/js/fokus.min.js.map +0 -7
  66. package/docs/README.md +0 -86
  67. package/docs/comparison.md +0 -124
  68. package/docs/components/accordion.md +0 -104
  69. package/docs/components/alert-dialog.md +0 -99
  70. package/docs/components/alert.md +0 -59
  71. package/docs/components/avatar.md +0 -13
  72. package/docs/components/badge.md +0 -82
  73. package/docs/components/breadcrumb.md +0 -93
  74. package/docs/components/button-group.md +0 -13
  75. package/docs/components/button.md +0 -98
  76. package/docs/components/card.md +0 -111
  77. package/docs/components/carousel.md +0 -167
  78. package/docs/components/checkbox.md +0 -97
  79. package/docs/components/close-button.md +0 -13
  80. package/docs/components/code.md +0 -13
  81. package/docs/components/collapse.md +0 -78
  82. package/docs/components/combobox.md +0 -123
  83. package/docs/components/command-palette.md +0 -131
  84. package/docs/components/datatable.md +0 -173
  85. package/docs/components/datepicker.md +0 -137
  86. package/docs/components/divider.md +0 -57
  87. package/docs/components/dropdown.md +0 -103
  88. package/docs/components/empty-state.md +0 -65
  89. package/docs/components/file-upload-advanced.md +0 -116
  90. package/docs/components/file-upload.md +0 -93
  91. package/docs/components/icon-link.md +0 -13
  92. package/docs/components/input-group.md +0 -73
  93. package/docs/components/input.md +0 -90
  94. package/docs/components/list-group.md +0 -13
  95. package/docs/components/modal.md +0 -120
  96. package/docs/components/navbar.md +0 -74
  97. package/docs/components/nested-menu.md +0 -90
  98. package/docs/components/notification-center.md +0 -116
  99. package/docs/components/offcanvas.md +0 -102
  100. package/docs/components/pagination.md +0 -145
  101. package/docs/components/placeholder.md +0 -13
  102. package/docs/components/popover.md +0 -105
  103. package/docs/components/progress.md +0 -126
  104. package/docs/components/radio.md +0 -70
  105. package/docs/components/range.md +0 -83
  106. package/docs/components/rating.md +0 -91
  107. package/docs/components/ratio.md +0 -13
  108. package/docs/components/scrollspy.md +0 -13
  109. package/docs/components/segmented-control.md +0 -82
  110. package/docs/components/select.md +0 -89
  111. package/docs/components/skeleton.md +0 -70
  112. package/docs/components/stepper.md +0 -107
  113. package/docs/components/switch.md +0 -75
  114. package/docs/components/table.md +0 -90
  115. package/docs/components/tabs.md +0 -104
  116. package/docs/components/tag.md +0 -129
  117. package/docs/components/tile.md +0 -112
  118. package/docs/components/timeline.md +0 -78
  119. package/docs/components/toast.md +0 -95
  120. package/docs/components/tooltip.md +0 -77
  121. package/docs/components/tree-view.md +0 -118
  122. package/docs/contributing/contributing.md +0 -18
  123. package/docs/getting-started/installation.md +0 -70
  124. package/docs/getting-started/usage.md +0 -105
  125. package/docs/guides/accessibility.md +0 -102
  126. package/docs/guides/charts.md +0 -73
  127. package/docs/guides/dark-mode.md +0 -90
  128. package/docs/guides/icons.md +0 -99
  129. package/docs/guides/javascript-api.md +0 -9
  130. package/docs/guides/layout-advanced.md +0 -118
  131. package/docs/guides/migration-clarus-to-fokus.md +0 -48
  132. package/docs/guides/migration-external.md +0 -123
  133. package/docs/guides/migration-v1.md +0 -63
  134. package/docs/guides/print.md +0 -30
  135. package/docs/guides/rtl-and-system-preferences.md +0 -28
  136. package/docs/guides/theming.md +0 -140
  137. package/docs/guides/utility-api.md +0 -9
  138. package/docs/prompts/prompt-plan.md +0 -45
  139. package/docs/reference/accessibility-matrix.md +0 -77
  140. package/docs/reference/browser-support.md +0 -75
  141. package/docs/reference/contrast-report.md +0 -50
  142. package/docs/reference/definitions.md +0 -864
  143. package/docs/reference/design-tokens.md +0 -194
  144. package/docs/reference/scss-architecture.md +0 -227
  145. package/docs/reference/size-baseline.json +0 -34
  146. package/docs/reference/stability.md +0 -89
  147. package/docs/showcase.md +0 -25
  148. package/mockup/README.md +0 -41
  149. package/mockup/assets/carousel-planning.png +0 -0
  150. package/mockup/assets/carousel-workspace.png +0 -0
  151. package/mockup/assets/example-theme.css +0 -8
  152. package/mockup/assets/example-theme.js +0 -11
  153. package/mockup/assets/showcase-contracts.js +0 -84
  154. package/mockup/assets/showcase.css +0 -91
  155. package/mockup/assets/showcase.js +0 -724
  156. package/mockup/content-data.html +0 -9
  157. package/mockup/examples/accordion-tabs-toast.html +0 -149
  158. package/mockup/examples/alert-dialog.html +0 -84
  159. package/mockup/examples/alerts.html +0 -41
  160. package/mockup/examples/badges-alerts.html +0 -77
  161. package/mockup/examples/buttons.html +0 -58
  162. package/mockup/examples/cards.html +0 -132
  163. package/mockup/examples/carousel.html +0 -126
  164. package/mockup/examples/charts.html +0 -102
  165. package/mockup/examples/check-radio-switch.html +0 -144
  166. package/mockup/examples/collapse.html +0 -69
  167. package/mockup/examples/combobox.html +0 -60
  168. package/mockup/examples/command-palette.html +0 -64
  169. package/mockup/examples/datatable.html +0 -113
  170. package/mockup/examples/datepicker.html +0 -62
  171. package/mockup/examples/divider.html +0 -45
  172. package/mockup/examples/dropdown-tooltip.html +0 -77
  173. package/mockup/examples/empty-state.html +0 -56
  174. package/mockup/examples/file-drop.html +0 -74
  175. package/mockup/examples/file-upload-advanced.html +0 -68
  176. package/mockup/examples/forms-advanced.html +0 -77
  177. package/mockup/examples/hover-card.html +0 -86
  178. package/mockup/examples/icons.html +0 -157
  179. package/mockup/examples/input-group.html +0 -74
  180. package/mockup/examples/js-foundation.html +0 -215
  181. package/mockup/examples/layout.html +0 -134
  182. package/mockup/examples/modal-select.html +0 -127
  183. package/mockup/examples/nested-menu.html +0 -73
  184. package/mockup/examples/notification-center.html +0 -86
  185. package/mockup/examples/offcanvas-popover.html +0 -133
  186. package/mockup/examples/pagination-breadcrumbs.html +0 -92
  187. package/mockup/examples/range.html +0 -69
  188. package/mockup/examples/rating.html +0 -103
  189. package/mockup/examples/segmented-control.html +0 -96
  190. package/mockup/examples/skeletons.html +0 -82
  191. package/mockup/examples/spinner-progress.html +0 -130
  192. package/mockup/examples/stepper.html +0 -119
  193. package/mockup/examples/tables-navbar.html +0 -89
  194. package/mockup/examples/tag.html +0 -105
  195. package/mockup/examples/theming.html +0 -68
  196. package/mockup/examples/tile.html +0 -107
  197. package/mockup/examples/timeline.html +0 -108
  198. package/mockup/examples/tree-view.html +0 -68
  199. package/mockup/feedback-actions.html +0 -9
  200. package/mockup/forms.html +0 -13
  201. package/mockup/foundations.html +0 -7
  202. package/mockup/kitchen-sink.html +0 -696
  203. package/mockup/navigation-disclosure.html +0 -11
  204. package/mockup/overlays-commands.html +0 -12
  205. package/mockup/templates/README.md +0 -20
  206. package/mockup/templates/admin.html +0 -334
  207. package/mockup/templates/auth.html +0 -234
  208. package/mockup/templates/dashboard.html +0 -442
  209. package/mockup/templates/landing.html +0 -397
  210. package/packages/fokus-icons/package.json +0 -46
  211. package/scripts/migrate-fokus-map.json +0 -1366
  212. package/scripts/migrate-fokus.mjs +0 -97
@@ -1,86 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Mockup - Hover Card</title>
7
-
8
- <!-- STYLES IMPORT -->
9
- <link rel="stylesheet" href="../../dist/css/fonts.css">
10
- <link rel="stylesheet" href="../../dist/css/components.css">
11
- <link rel="stylesheet" href="../../dist/css/helpers.css">
12
- <style>
13
- .theme-panel {
14
- padding: 48px 24px;
15
- }
16
-
17
- html[data-theme="dark"] .theme-panel {
18
- color: var(--fs-color-text);
19
- background-color: var(--fs-color-surface);
20
- }
21
-
22
- .avatar {
23
- display: flex;
24
- flex-shrink: 0;
25
- align-items: center;
26
- justify-content: center;
27
- width: 40px;
28
- height: 40px;
29
- border-radius: 50%;
30
- color: var(--fs-color-surface);
31
- background-color: var(--fs-color-primary);
32
- font-size: 0.85rem;
33
- font-weight: 600;
34
- }
35
-
36
- .fs-hover-card-name {
37
- margin: 0;
38
- font-weight: 600;
39
- }
40
-
41
- .fs-hover-card-handle {
42
- margin: 0 0 4px;
43
- color: var(--fs-color-muted);
44
- font-size: 0.75rem;
45
- }
46
-
47
- .fs-hover-card-bio {
48
- margin: 4px 0 0;
49
- font-size: 0.8rem;
50
- }
51
-
52
- .hover-card-trigger {
53
- color: var(--fs-alert-primary-text);
54
- font-weight: 600;
55
- }
56
- </style>
57
- <link rel="stylesheet" href="../assets/example-theme.css">
58
- <script src="../assets/example-theme.js"></script>
59
- </head>
60
- <body>
61
-
62
- <div class="theme-panel">
63
- <p>
64
- Passe o mouse sobre
65
- <a href="#" class="hover-card-trigger" data-fs="popover" data-fs-target="#hover-card-claro" data-trigger="hover" data-placement="bottom">@jorgewreis</a>
66
- para ver o cartão.
67
- </p>
68
-
69
- <div class="fs-popover fs-popover-hover-card" id="hover-card-claro">
70
- <div class="fs-popover-arrow"></div>
71
- <div class="fs-popover-body">
72
- <div class="avatar">JR</div>
73
- <div>
74
- <p class="fs-hover-card-name">Jorge Reis</p>
75
- <p class="fs-hover-card-handle">@jorgewreis</p>
76
- <p class="fs-hover-card-bio">Autor do Fokus Styles — framework híbrido, zero dependências em runtime.</p>
77
- </div>
78
- </div>
79
- </div>
80
- </div>
81
-
82
-
83
-
84
- <script src="../../dist/js/fokus.js"></script>
85
- </body>
86
- </html>
@@ -1,157 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Mockup - Icons</title>
7
-
8
- <!-- STYLES IMPORT -->
9
- <link rel="stylesheet" href="../../dist/css/fonts.css">
10
- <link rel="stylesheet" href="../../dist/css/components.css">
11
- <link rel="stylesheet" href="../../dist/css/forms.css">
12
- <link rel="stylesheet" href="../../dist/css/helpers.css">
13
- <style>
14
- .theme-panel {
15
- padding: 24px;
16
- }
17
-
18
- html[data-theme="dark"] .theme-panel {
19
- color: var(--fs-color-text);
20
- background-color: var(--fs-color-surface);
21
- }
22
-
23
- .icon-grid {
24
- display: grid;
25
- grid-template-columns: repeat(6, 1fr);
26
- gap: 16px;
27
- max-width: 480px;
28
- margin-bottom: 24px;
29
- }
30
-
31
- .icon-grid figure {
32
- display: flex;
33
- flex-direction: column;
34
- align-items: center;
35
- gap: 4px;
36
- margin: 0;
37
- font-size: 11px;
38
- text-align: center;
39
- }
40
-
41
- .icon-sizes {
42
- display: flex;
43
- align-items: flex-end;
44
- gap: 16px;
45
- margin-bottom: 24px;
46
- }
47
-
48
- .usage-row {
49
- display: flex;
50
- flex-wrap: wrap;
51
- align-items: center;
52
- gap: 16px;
53
- margin-bottom: 16px;
54
- }
55
-
56
- .usage-row .fs-alert,
57
- .usage-row .fs-input-group {
58
- max-width: 280px;
59
- }
60
- </style>
61
- <link rel="stylesheet" href="../assets/example-theme.css">
62
- <script src="../assets/example-theme.js"></script>
63
- </head>
64
- <body>
65
-
66
- <div class="theme-panel">
67
- <p class="fs-u-fs-sm fs-u-fw-medium fs-u-mb-1">Grade — pacote fokus-styles/icons (Lucide), classe .fs-icon</p>
68
- <div class="icon-grid">
69
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>check</figure>
70
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>x</figure>
71
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>home</figure>
72
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21 21-4.34-4.34"/><circle cx="11" cy="11" r="8"/></svg>search</figure>
73
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"/><circle cx="12" cy="12" r="3"/></svg>settings</figure>
74
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>user</figure>
75
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"/><rect x="2" y="4" width="20" height="16" rx="2"/></svg>mail</figure>
76
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.268 21a2 2 0 0 0 3.464 0"/><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"/></svg>bell</figure>
77
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2v4"/><path d="M16 2v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/></svg>calendar</figure>
78
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 15V3"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5"/></svg>download</figure>
79
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v12"/><path d="m17 8-5-5-5 5"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/></svg>upload</figure>
80
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 11v6"/><path d="M14 11v6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>trash-2</figure>
81
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/></svg>pencil</figure>
82
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/></svg>star</figure>
83
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"/></svg>heart</figure>
84
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>lock</figure>
85
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/></svg>unlock</figure>
86
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>sun</figure>
87
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"/></svg>moon</figure>
88
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>arrow-right</figure>
89
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 19-7-7 7-7"/><path d="M19 12H5"/></svg>arrow-left</figure>
90
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>chevron-down</figure>
91
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>plus</figure>
92
- <figure><svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/></svg>minus</figure>
93
- </div>
94
-
95
- <p class="fs-u-fs-sm fs-u-fw-medium fs-u-mb-1">Tamanhos — .fs-icon-xs/sm/(padrão)/lg/xl</p>
96
- <div class="icon-sizes">
97
- <svg class="fs-icon fs-icon-xs" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
98
- <svg class="fs-icon fs-icon-sm" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
99
- <svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
100
- <svg class="fs-icon fs-icon-lg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
101
- <svg class="fs-icon fs-icon-xl" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
102
- </div>
103
-
104
- <p class="fs-u-fs-sm fs-u-fw-medium fs-u-mb-1">Uso em componentes reais — o ícone é conteúdo comum, colado onde o componente já aceita qualquer HTML</p>
105
-
106
- <div class="usage-row">
107
- <button type="button" class="fs-btn fs-btn-primary">
108
- <svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 15V3"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10 5 5 5-5"/></svg>
109
- Baixar
110
- </button>
111
-
112
- <span class="fs-badge fs-badge-warning">
113
- <svg class="fs-icon fs-icon-xs" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/></svg>
114
- Destaque
115
- </span>
116
- </div>
117
-
118
- <div class="usage-row">
119
- <div class="fs-alert fs-alert-danger">
120
- <svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>
121
- Falha ao salvar as alterações.
122
- </div>
123
-
124
- <div class="fs-input-group">
125
- <span class="fs-input-group-text">
126
- <svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21 21-4.34-4.34"/><circle cx="11" cy="11" r="8"/></svg>
127
- </span>
128
- <input type="search" class="fs-form-control" placeholder="Buscar…" aria-label="Buscar">
129
- </div>
130
- </div>
131
-
132
- <nav aria-label="breadcrumb">
133
- <ol class="fs-breadcrumb">
134
- <li class="fs-breadcrumb-item">
135
- <a href="#">
136
- <svg class="fs-icon fs-icon-sm" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>
137
- Início
138
- </a>
139
- </li>
140
- <li class="fs-breadcrumb-item"><a href="#">Configurações</a></li>
141
- <li class="fs-breadcrumb-item is-active">Perfil</li>
142
- </ol>
143
- </nav>
144
-
145
- <div class="fs-empty-state">
146
- <div class="fs-empty-state-icon" aria-hidden="true">
147
- <svg class="fs-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"/><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"/></svg>
148
- </div>
149
- <h3 class="fs-empty-state-title">Caixa de entrada vazia</h3>
150
- <p class="fs-empty-state-text">Novas mensagens aparecerão aqui — o slot de ícone do Empty State aceita qualquer SVG, incluindo os do fokus-styles/icons.</p>
151
- </div>
152
- </div>
153
-
154
-
155
-
156
- </body>
157
- </html>
@@ -1,74 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Mockup - Input Group</title>
7
-
8
- <!-- STYLES IMPORT -->
9
- <link rel="stylesheet" href="../../dist/css/fonts.css">
10
- <link rel="stylesheet" href="../../dist/css/forms.css">
11
- <link rel="stylesheet" href="../../dist/css/components.css">
12
- <link rel="stylesheet" href="../../dist/css/helpers.css">
13
- <style>
14
- .theme-panel {
15
- display: flex;
16
- flex-direction: column;
17
- gap: 16px;
18
- padding: 24px;
19
- background-color: var(--fs-color-subtle);
20
- }
21
-
22
- html[data-theme="dark"] .theme-panel {
23
- color: var(--fs-color-text);
24
- background-color: var(--fs-color-surface);
25
- }
26
-
27
- .theme-panel > div {
28
- max-width: 360px;
29
- }
30
- </style>
31
- <link rel="stylesheet" href="../assets/example-theme.css">
32
- <script src="../assets/example-theme.js"></script>
33
- </head>
34
- <body>
35
- <div class="theme-panel">
36
- <p class="fs-u-fs-sm fs-u-fw-medium fs-u-mb-0">Sufixo</p>
37
- <div class="fs-input-group">
38
- <input type="text" class="fs-form-control" placeholder="usuario">
39
- <span class="fs-input-group-text">@fokus.dev</span>
40
- </div>
41
-
42
- <p class="fs-u-fs-sm fs-u-fw-medium fs-u-mb-0">Prefixo</p>
43
- <div class="fs-input-group">
44
- <span class="fs-input-group-text">R$</span>
45
- <input type="text" class="fs-form-control" placeholder="0,00">
46
- </div>
47
-
48
- <p class="fs-u-fs-sm fs-u-fw-medium fs-u-mb-0">Prefixo + sufixo, com botão</p>
49
- <div class="fs-input-group">
50
- <span class="fs-input-group-text">https://</span>
51
- <input type="text" class="fs-form-control" placeholder="seusite.com">
52
- <button type="button" class="fs-btn">Verificar</button>
53
- </div>
54
-
55
- <p class="fs-u-fs-sm fs-u-fw-medium fs-u-mb-0">Tamanhos (sm / padrão / lg)</p>
56
- <div class="fs-input-group fs-input-group-sm">
57
- <span class="fs-input-group-text">R$</span>
58
- <input type="text" class="fs-form-control" placeholder="0,00">
59
- </div>
60
- <div class="fs-input-group fs-input-group-lg">
61
- <span class="fs-input-group-text">R$</span>
62
- <input type="text" class="fs-form-control" placeholder="0,00">
63
- </div>
64
-
65
- <p class="fs-u-fs-sm fs-u-fw-medium fs-u-mb-0">Desabilitado</p>
66
- <div class="fs-input-group">
67
- <span class="fs-input-group-text">R$</span>
68
- <input type="text" class="fs-form-control" placeholder="0,00" disabled>
69
- </div>
70
- </div>
71
-
72
-
73
- </body>
74
- </html>
@@ -1,215 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Mockup - Infraestrutura JS (Fase 7)</title>
7
-
8
- <!-- STYLES IMPORT -->
9
- <link rel="stylesheet" href="../../dist/css/fonts.css">
10
- <link rel="stylesheet" href="../../dist/css/components.css">
11
- <link rel="stylesheet" href="../../dist/css/forms.css">
12
- <link rel="stylesheet" href="../../dist/css/helpers.css">
13
- <style>
14
- body {
15
- padding: 24px;
16
- }
17
-
18
- section {
19
- margin-bottom: 320px;
20
- }
21
-
22
- /* Harness manual desta fase: ainda não existe .fs-dropdown-menu (Fase 8)
23
- nem .fs-modal (Fase 9), então o painel flutuante e o painel com focus
24
- trap usam estilo inline sobre os tokens já existentes. */
25
- .floating-panel {
26
- width: 220px;
27
- padding: 12px 16px;
28
- border: 1px solid var(--fs-color-border);
29
- border-radius: var(--fs-radius-md);
30
- color: var(--fs-color-text);
31
- background-color: var(--fs-color-surface);
32
- box-shadow: var(--fs-shadow-md);
33
- }
34
-
35
- .trap-panel {
36
- display: none;
37
- position: fixed;
38
- inset: 0;
39
- align-items: center;
40
- justify-content: center;
41
- background-color: rgb(0 0 0 / 45%);
42
- }
43
-
44
- .trap-panel.is-open {
45
- display: flex;
46
- }
47
-
48
- .trap-panel-body {
49
- width: 320px;
50
- padding: 20px;
51
- border-radius: var(--fs-radius-md);
52
- color: var(--fs-color-text);
53
- background-color: var(--fs-color-surface);
54
- box-shadow: var(--fs-shadow-lg);
55
- }
56
-
57
- .collapse-panel {
58
- padding: 12px 16px;
59
- border: 1px solid var(--fs-color-border);
60
- border-top: none;
61
- border-radius: 0 0 var(--fs-radius-md) var(--fs-radius-md);
62
- color: var(--fs-color-text);
63
- }
64
-
65
- .collapse-trigger {
66
- border-radius: var(--fs-radius-md) var(--fs-radius-md) 0 0;
67
- }
68
- </style>
69
- <link rel="stylesheet" href="../assets/example-theme.css">
70
- <script src="../assets/example-theme.js"></script>
71
- </head>
72
- <body>
73
-
74
- <h1 class="fs-u-fs-lg fs-u-fw-medium fs-u-mb-3">Fase 7 — Infraestrutura JS compartilhada</h1>
75
-
76
- <section>
77
- <h2 class="fs-u-fs-md fs-u-fw-medium fs-u-mb-2">1. Posicionamento (FokusStyles.core.computePosition)</h2>
78
- <p class="fs-u-fs-sm fs-u-mb-3">O painel reposiciona (com flip) relativo ao botão. Role a página para testar o flip perto das bordas.</p>
79
- <button type="button" class="fs-btn fs-btn-primary" id="positioning-trigger">Alternar painel posicionado</button>
80
- <div class="floating-panel" id="positioning-panel" style="display: none;">
81
- Painel posicionado via <code class="fs-u-font-mono">computePosition()</code>, com flip automático quando não cabe no viewport.
82
- </div>
83
- </section>
84
-
85
- <section>
86
- <h2 class="fs-u-fs-md fs-u-fw-medium fs-u-mb-2">4. API declarativa 2.3</h2>
87
- <p class="fs-u-fs-sm fs-u-mb-3">Theme, validação e eventos comuns usam os exports vanilla sem dependências externas.</p>
88
- <div class="fs-form-row">
89
- <button type="button" class="fs-btn" id="theme-toggle">Alternar tema com FokusStyles.Theme</button>
90
- <form class="fs-form-col" data-fs="form-validation" id="api-form" novalidate>
91
- <label class="fs-form-label" for="api-required">Campo obrigatório</label>
92
- <input class="fs-form-control" id="api-required" required aria-describedby="api-feedback">
93
- <div class="fs-invalid-feedback" id="api-feedback">Informe um valor para continuar.</div>
94
- <button class="fs-btn fs-btn-primary" type="submit">Validar formulário</button>
95
- </form>
96
- </div>
97
- <p class="fs-u-fs-xs fs-u-mt-2" id="api-status" role="status" aria-live="polite"></p>
98
- </section>
99
-
100
- <section>
101
- <h2 class="fs-u-fs-md fs-u-fw-medium fs-u-mb-2">2. Foco, teclado e overlay (FokusStyles.core.createFocusTrap / onEscapeKey / lockScroll / onClickOutside)</h2>
102
- <p class="fs-u-fs-sm fs-u-mb-3">Abre um painel com scroll da página bloqueado, foco preso via Tab/Shift+Tab, fecha com Escape ou clique fora.</p>
103
- <button type="button" class="fs-btn fs-btn-primary" id="trap-trigger">Abrir painel com focus trap</button>
104
- <div class="trap-panel" id="trap-panel">
105
- <div class="trap-panel-body" id="trap-panel-body">
106
- <p class="fs-u-fs-md fs-u-fw-medium fs-u-mb-2">Painel com focus trap</p>
107
- <p class="fs-u-fs-sm fs-u-mb-3">Tab/Shift+Tab ciclam apenas entre estes três controles. Escape ou clique fora fecha.</p>
108
- <input type="text" class="fs-form-control fs-u-mb-2" placeholder="Campo de teste">
109
- <button type="button" class="fs-btn fs-u-mr-2">Ação secundária</button>
110
- <button type="button" class="fs-btn fs-btn-primary" id="trap-close">Fechar</button>
111
- </div>
112
- </div>
113
- </section>
114
-
115
- <section>
116
- <h2 class="fs-u-fs-md fs-u-fw-medium fs-u-mb-2">3. Transição / collapse (FokusStyles.core.collapse / expand)</h2>
117
- <p class="fs-u-fs-sm fs-u-mb-3">Expande/recolhe com transição de altura (respeita <code class="fs-u-font-mono">prefers-reduced-motion</code>).</p>
118
- <button type="button" class="fs-btn fs-btn-primary collapse-trigger" id="collapse-trigger" aria-expanded="false">Alternar painel</button>
119
- <div class="collapse-panel" id="collapse-panel" style="display: none;">
120
- Conteúdo revelado via <code class="fs-u-font-mono">expand()</code>/<code class="fs-u-font-mono">collapse()</code>, animando a altura com <code class="fs-u-font-mono">transitionend</code>.
121
- </div>
122
- </section>
123
-
124
- <!-- SCRIPTS IMPORT -->
125
- <script src="../../dist/js/fokus.js"></script>
126
- <script>
127
- const { core } = FokusStyles;
128
-
129
- // 1. Posicionamento
130
- const positioningTrigger = document.getElementById("positioning-trigger");
131
- const positioningPanel = document.getElementById("positioning-panel");
132
- let positioningOpen = false;
133
-
134
- positioningTrigger.addEventListener("click", () => {
135
- positioningOpen = !positioningOpen;
136
-
137
- if (positioningOpen) {
138
- positioningPanel.style.display = "block";
139
- const position = core.computePosition(positioningTrigger, positioningPanel, { placement: "bottom", offset: 8 });
140
- core.applyPosition(positioningPanel, position);
141
- } else {
142
- positioningPanel.style.display = "none";
143
- }
144
- });
145
-
146
- window.addEventListener("resize", () => {
147
- if (!positioningOpen) return;
148
- const position = core.computePosition(positioningTrigger, positioningPanel, { placement: "bottom", offset: 8 });
149
- core.applyPosition(positioningPanel, position);
150
- });
151
-
152
- // 2. Foco, teclado e overlay
153
- const trapTrigger = document.getElementById("trap-trigger");
154
- const trapPanel = document.getElementById("trap-panel");
155
- const trapPanelBody = document.getElementById("trap-panel-body");
156
- const trapClose = document.getElementById("trap-close");
157
-
158
- let focusTrap = null;
159
- let removeEscapeListener = null;
160
- let removeClickOutsideListener = null;
161
-
162
- function openTrapPanel() {
163
- trapPanel.classList.add("is-open");
164
- core.lockScroll();
165
-
166
- focusTrap = core.createFocusTrap(trapPanelBody);
167
- focusTrap.activate();
168
-
169
- removeEscapeListener = core.onEscapeKey(closeTrapPanel);
170
- removeClickOutsideListener = core.onClickOutside(trapPanelBody, closeTrapPanel);
171
- }
172
-
173
- function closeTrapPanel() {
174
- trapPanel.classList.remove("is-open");
175
- core.unlockScroll();
176
-
177
- focusTrap?.deactivate();
178
- removeEscapeListener?.();
179
- removeClickOutsideListener?.();
180
-
181
- trapTrigger.focus();
182
- }
183
-
184
- trapTrigger.addEventListener("click", openTrapPanel);
185
- trapClose.addEventListener("click", closeTrapPanel);
186
-
187
- // 3. Transição / collapse
188
- const collapseTrigger = document.getElementById("collapse-trigger");
189
- const collapsePanel = document.getElementById("collapse-panel");
190
- let collapseOpen = false;
191
-
192
- collapseTrigger.addEventListener("click", () => {
193
- collapseOpen = !collapseOpen;
194
- collapseTrigger.setAttribute("aria-expanded", String(collapseOpen));
195
-
196
- if (collapseOpen) {
197
- core.expand(collapsePanel);
198
- } else {
199
- core.collapse(collapsePanel);
200
- }
201
- });
202
-
203
- const apiStatus = document.getElementById("api-status");
204
- document.getElementById("theme-toggle").addEventListener("click", () => {
205
- const next = FokusStyles.Theme.getOrCreateInstance().get() === "dark" ? "light" : "dark";
206
- FokusStyles.Theme.set(next);
207
- apiStatus.textContent = `Tema ${next} aplicado.`;
208
- });
209
- document.getElementById("api-form").addEventListener("fs:form:validated", (event) => {
210
- apiStatus.textContent = event.detail.valid ? "Formulário válido." : "Formulário precisa de atenção.";
211
- });
212
- </script>
213
-
214
- </body>
215
- </html>