@ojiepermana/angular 21.3.3 → 22.0.1
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/README.md +10 -6
- package/component/accordion/README.md +195 -0
- package/component/alert/README.md +182 -0
- package/component/alert-dialog/README.md +239 -0
- package/component/aspect-ratio/README.md +112 -0
- package/component/avatar/README.md +176 -0
- package/component/badge/README.md +133 -0
- package/component/breadcrumb/README.md +216 -0
- package/component/button/README.md +139 -0
- package/component/button-group/README.md +208 -0
- package/component/calendar/README.md +132 -0
- package/component/card/README.md +220 -0
- package/component/carousel/README.md +276 -0
- package/component/checkbox/README.md +149 -0
- package/component/collapsible/README.md +195 -0
- package/component/combobox/README.md +198 -0
- package/component/command/README.md +275 -0
- package/component/composer/README.md +235 -0
- package/component/composer/package.json +4 -0
- package/component/context-menu/README.md +267 -0
- package/component/date-picker/README.md +177 -0
- package/component/dialog/README.md +237 -0
- package/component/drawer/README.md +145 -0
- package/component/dropdown-menu/README.md +311 -0
- package/component/editor/README.md +136 -0
- package/component/editor/package.json +4 -0
- package/component/empty/README.md +183 -0
- package/component/empty/package.json +4 -0
- package/component/form/README.md +210 -0
- package/component/hover-card/README.md +146 -0
- package/component/hover-card/package.json +4 -0
- package/component/input/README.md +159 -0
- package/component/input-group/README.md +239 -0
- package/component/input-otp/README.md +278 -0
- package/component/input-otp/package.json +4 -0
- package/component/item/README.md +247 -0
- package/component/kanban/README.md +81 -0
- package/component/kanban/package.json +4 -0
- package/component/kbd/README.md +139 -0
- package/component/kbd/package.json +4 -0
- package/component/label/README.md +136 -0
- package/component/menubar/README.md +269 -0
- package/component/menubar/package.json +4 -0
- package/component/native-select/README.md +176 -0
- package/component/native-select/package.json +4 -0
- package/component/navigation-menu/README.md +160 -0
- package/component/navigation-menu/package.json +4 -0
- package/component/pagination/README.md +144 -0
- package/component/pillbox/README.md +67 -0
- package/component/pillbox/package.json +4 -0
- package/component/popover/README.md +43 -0
- package/component/progress/README.md +160 -0
- package/component/radio/README.md +209 -0
- package/component/resizable/README.md +168 -0
- package/component/resizable/package.json +4 -0
- package/component/scroll-area/README.md +143 -0
- package/component/select/README.md +174 -0
- package/component/separator/README.md +170 -0
- package/component/sheet/README.md +183 -0
- package/component/skeleton/README.md +158 -0
- package/component/slider/README.md +207 -0
- package/component/spinner/README.md +160 -0
- package/component/spinner/package.json +4 -0
- package/component/switch/README.md +166 -0
- package/component/table/README.md +291 -0
- package/component/tabs/README.md +219 -0
- package/component/textarea/README.md +154 -0
- package/component/timeline/README.md +94 -0
- package/component/timeline/package.json +4 -0
- package/component/toast/README.md +321 -0
- package/component/toggle/README.md +131 -0
- package/component/toggle/package.json +4 -0
- package/component/toggle-group/README.md +206 -0
- package/component/toggle-group/package.json +4 -0
- package/component/tooltip/README.md +211 -0
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +45 -30
- package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +95 -61
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-alert.mjs +30 -21
- package/fesm2022/ojiepermana-angular-component-alert.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +11 -7
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +50 -34
- package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-badge.mjs +9 -6
- package/fesm2022/ojiepermana-angular-component-badge.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +49 -35
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +25 -17
- package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-button.mjs +11 -7
- package/fesm2022/ojiepermana-angular-component-button.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +23 -13
- package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-card.mjs +51 -36
- package/fesm2022/ojiepermana-angular-component-card.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +66 -42
- package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-chart.mjs +494 -283
- package/fesm2022/ojiepermana-angular-component-chart.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +23 -13
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +28 -20
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +27 -18
- package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-command.mjs +77 -52
- package/fesm2022/ojiepermana-angular-component-command.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-composer.mjs +352 -0
- package/fesm2022/ojiepermana-angular-component-composer.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +9 -6
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +34 -19
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +55 -38
- package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +108 -74
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-editor.mjs +717 -0
- package/fesm2022/ojiepermana-angular-component-editor.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-empty.mjs +145 -0
- package/fesm2022/ojiepermana-angular-component-empty.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-form.mjs +200 -42
- package/fesm2022/ojiepermana-angular-component-form.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +297 -0
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +48 -33
- package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +514 -0
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-input.mjs +7 -5
- package/fesm2022/ojiepermana-angular-component-input.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-item.mjs +76 -53
- package/fesm2022/ojiepermana-angular-component-item.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +314 -0
- package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +55 -0
- package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-label.mjs +9 -6
- package/fesm2022/ojiepermana-angular-component-label.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +308 -0
- package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +67 -0
- package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +413 -0
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +65 -31
- package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +812 -0
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-popover.mjs +18 -12
- package/fesm2022/ojiepermana-angular-component-popover.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-progress.mjs +17 -10
- package/fesm2022/ojiepermana-angular-component-progress.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-radio.mjs +47 -17
- package/fesm2022/ojiepermana-angular-component-radio.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +481 -0
- package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +15 -9
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-select.mjs +71 -26
- package/fesm2022/ojiepermana-angular-component-select.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-separator.mjs +11 -7
- package/fesm2022/ojiepermana-angular-component-separator.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +91 -42
- package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +7 -5
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-slider.mjs +401 -7
- package/fesm2022/ojiepermana-angular-component-slider.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +60 -0
- package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-switch.mjs +47 -15
- package/fesm2022/ojiepermana-angular-component-switch.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-table.mjs +56 -40
- package/fesm2022/ojiepermana-angular-component-table.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +58 -38
- package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +8 -6
- package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -0
- package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-toast.mjs +28 -4
- package/fesm2022/ojiepermana-angular-component-toast.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +289 -0
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +82 -0
- package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +304 -6
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-component-utils.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-layout-component.mjs +45 -24
- package/fesm2022/ojiepermana-angular-layout-component.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-layout-services.mjs +7 -5
- package/fesm2022/ojiepermana-angular-layout-services.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-layout-shell.mjs +3 -3
- package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +9 -6
- package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-layout-token.mjs.map +1 -1
- package/fesm2022/{ojiepermana-angular-layout-empty.mjs → ojiepermana-angular-layout-type-empty.mjs} +4 -4
- package/fesm2022/ojiepermana-angular-layout-type-empty.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-layout-horizontal.mjs → ojiepermana-angular-layout-type-horizontal.mjs} +26 -17
- package/fesm2022/ojiepermana-angular-layout-type-horizontal.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-layout-vertical.mjs → ojiepermana-angular-layout-type-vertical.mjs} +28 -18
- package/fesm2022/ojiepermana-angular-layout-type-vertical.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout.mjs +74 -50
- package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +11 -7
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-item.mjs +27 -16
- package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +29 -20
- package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +71 -43
- package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +261 -24
- package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-theme-services.mjs +19 -11
- package/fesm2022/ojiepermana-angular-theme-services.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-theme-token.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-theme.mjs +19 -11
- package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
- package/generator/api/README.md +8 -5
- package/generator/api/bin/src/emit/client.js +4 -2
- package/generator/api/bin/src/writer/index.js +47 -5
- package/generator/guide/bin/schematics/build/index.js +3 -2
- package/generator/guide/bin/src/engine/component.js +2 -2
- package/generator/guide/bin/src/engine/index.js +3 -3
- package/generator/guide/bin/src/engine/render.js +10 -5
- package/layout/type/empty/package.json +4 -0
- package/layout/type/horizontal/package.json +4 -0
- package/layout/type/vertical/package.json +4 -0
- package/navigation/topbar/README.md +196 -0
- package/package.json +89 -25
- package/theme/README.md +110 -3
- package/theme/styles/integrations/material/autocomplete.css +178 -0
- package/theme/styles/integrations/material/button.css +468 -0
- package/theme/styles/integrations/material/dialog.css +152 -0
- package/theme/styles/integrations/material/select.css +175 -0
- package/theme/styles/integrations/material/slide-toggle.css +234 -0
- package/theme/styles/integrations/material/slider.css +194 -0
- package/theme/styles/integrations/material/tabs.css +229 -0
- package/theme/styles/integrations/material.css +70 -60
- package/types/ojiepermana-angular-component-combobox.d.ts +1 -2
- package/types/ojiepermana-angular-component-composer.d.ts +90 -0
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +2 -0
- package/types/ojiepermana-angular-component-editor.d.ts +123 -0
- package/types/ojiepermana-angular-component-empty.d.ts +50 -0
- package/types/ojiepermana-angular-component-form.d.ts +52 -3
- package/types/ojiepermana-angular-component-hover-card.d.ts +74 -0
- package/types/ojiepermana-angular-component-input-otp.d.ts +136 -0
- package/types/ojiepermana-angular-component-kanban.d.ts +70 -0
- package/types/ojiepermana-angular-component-kbd.d.ts +16 -0
- package/types/ojiepermana-angular-component-menubar.d.ts +67 -0
- package/types/ojiepermana-angular-component-native-select.d.ts +26 -0
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +96 -0
- package/types/ojiepermana-angular-component-pagination.d.ts +10 -4
- package/types/ojiepermana-angular-component-pillbox.d.ts +157 -0
- package/types/ojiepermana-angular-component-radio.d.ts +7 -1
- package/types/ojiepermana-angular-component-resizable.d.ts +99 -0
- package/types/ojiepermana-angular-component-select.d.ts +17 -5
- package/types/ojiepermana-angular-component-sheet.d.ts +3 -1
- package/types/ojiepermana-angular-component-slider.d.ts +59 -1
- package/types/ojiepermana-angular-component-spinner.d.ts +13 -0
- package/types/ojiepermana-angular-component-switch.d.ts +13 -3
- package/types/ojiepermana-angular-component-timeline.d.ts +63 -0
- package/types/ojiepermana-angular-component-toast.d.ts +12 -3
- package/types/ojiepermana-angular-component-toggle-group.d.ts +89 -0
- package/types/ojiepermana-angular-component-toggle.d.ts +25 -0
- package/types/ojiepermana-angular-component-tooltip.d.ts +72 -5
- package/types/{ojiepermana-angular-layout-horizontal.d.ts → ojiepermana-angular-layout-type-horizontal.d.ts} +3 -3
- package/types/{ojiepermana-angular-layout-vertical.d.ts → ojiepermana-angular-layout-type-vertical.d.ts} +3 -3
- package/types/ojiepermana-angular-layout.d.ts +5 -5
- package/types/ojiepermana-angular-navigation-item.d.ts +1 -1
- package/types/ojiepermana-angular-navigation-service.d.ts +7 -7
- package/types/ojiepermana-angular-navigation-sidebar.d.ts +8 -8
- package/types/ojiepermana-angular-navigation-topbar.d.ts +24 -4
- package/types/ojiepermana-angular-navigation-types.d.ts +14 -8
- package/fesm2022/ojiepermana-angular-layout-empty.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-horizontal.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-vertical.mjs.map +0 -1
- package/layout/empty/package.json +0 -4
- package/layout/horizontal/package.json +0 -4
- package/layout/vertical/package.json +0 -4
- /package/types/{ojiepermana-angular-layout-empty.d.ts → ojiepermana-angular-layout-type-empty.d.ts} +0 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# Topbar
|
|
2
|
+
|
|
3
|
+
Horizontal navigation root for application shells, documentation headers, and flyout-style site navigation.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { TopbarComponent } from '@ojiepermana/angular/navigation/topbar';
|
|
9
|
+
import type { NavigationItem, TopbarVariant } from '@ojiepermana/angular/navigation/types';
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Composition
|
|
13
|
+
|
|
14
|
+
The topbar renders a menubar-style root and projects optional leading and trailing slots around the navigation items.
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
topbar
|
|
18
|
+
├── [items]="NavigationItem[]"
|
|
19
|
+
│ ├── type: 'basic' -> direct link item
|
|
20
|
+
│ ├── type: 'group' -> dropdown trigger + overlay panel
|
|
21
|
+
│ └── type: 'collapsable' -> dropdown trigger + overlay panel
|
|
22
|
+
├── `variant="flyout"` -> descriptive title + subtitle cards in dropdown panels
|
|
23
|
+
├── [topbar-start] projected brand or leading actions
|
|
24
|
+
└── [topbar-end] projected trailing actions
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Basic usage
|
|
28
|
+
|
|
29
|
+
Pass `NavigationItem[]` directly when the page owns its own navigation tree.
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
const navigationItems: NavigationItem[] = [
|
|
33
|
+
{
|
|
34
|
+
id: 'getting-started',
|
|
35
|
+
type: 'group',
|
|
36
|
+
title: 'Getting started',
|
|
37
|
+
children: [
|
|
38
|
+
{
|
|
39
|
+
id: 'introduction',
|
|
40
|
+
type: 'basic',
|
|
41
|
+
title: 'Introduction',
|
|
42
|
+
subtitle: 'Overview and design-system fundamentals.',
|
|
43
|
+
link: '/docs/introduction',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'installation',
|
|
47
|
+
type: 'basic',
|
|
48
|
+
title: 'Installation',
|
|
49
|
+
subtitle: 'Package install and workspace setup steps.',
|
|
50
|
+
link: '/docs/getting-started/installation',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{ id: 'docs', type: 'basic', title: 'Docs', link: '/docs/introduction' },
|
|
55
|
+
];
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<topbar variant="flyout" [items]="navigationItems" [showHamburger]="false" ariaLabel="Primary site navigation">
|
|
60
|
+
<a topbar-start href="/" class="inline-flex items-center rounded-md px-2 py-2 text-sm font-semibold text-foreground">
|
|
61
|
+
Acme UI
|
|
62
|
+
</a>
|
|
63
|
+
|
|
64
|
+
<a
|
|
65
|
+
topbar-end
|
|
66
|
+
href="/docs/introduction"
|
|
67
|
+
class="inline-flex h-9 items-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground">
|
|
68
|
+
Get started
|
|
69
|
+
</a>
|
|
70
|
+
</topbar>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Common patterns
|
|
74
|
+
|
|
75
|
+
### Grouped dropdowns
|
|
76
|
+
|
|
77
|
+
Use `group` or `collapsable` items when the trigger should open a panel of related destinations.
|
|
78
|
+
|
|
79
|
+
Set `variant="flyout"` when those dropdown panels should render descriptive title and subtitle cards in a wider flyout layout.
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
const productItems: NavigationItem[] = [
|
|
83
|
+
{
|
|
84
|
+
id: 'resources',
|
|
85
|
+
type: 'group',
|
|
86
|
+
title: 'Resources',
|
|
87
|
+
children: [
|
|
88
|
+
{
|
|
89
|
+
id: 'guides',
|
|
90
|
+
type: 'basic',
|
|
91
|
+
title: 'Guides',
|
|
92
|
+
subtitle: 'Browse getting started material and implementation notes.',
|
|
93
|
+
link: '/docs/introduction',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: 'api',
|
|
97
|
+
type: 'basic',
|
|
98
|
+
title: 'API reference',
|
|
99
|
+
subtitle: 'Inspect Angular-first component and directive imports by entrypoint.',
|
|
100
|
+
link: '/docs/components/shadcn/button',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 'releases',
|
|
104
|
+
type: 'basic',
|
|
105
|
+
title: 'Releases',
|
|
106
|
+
subtitle: 'Track published changes, migration notes, and newly added primitives.',
|
|
107
|
+
link: '/docs/changelog',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{ id: 'pricing', type: 'basic', title: 'Pricing', link: '/pricing' },
|
|
112
|
+
];
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Direct link items
|
|
116
|
+
|
|
117
|
+
Use `basic` items when the top-level item should navigate immediately instead of opening a panel.
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
const linkItems: NavigationItem[] = [
|
|
121
|
+
{ id: 'documentation', type: 'basic', title: 'Documentation', link: '/docs/introduction' },
|
|
122
|
+
{ id: 'components', type: 'basic', title: 'Components', link: '/ui/shadcn/button' },
|
|
123
|
+
{
|
|
124
|
+
id: 'github',
|
|
125
|
+
type: 'basic',
|
|
126
|
+
title: 'GitHub',
|
|
127
|
+
link: 'https://github.com/shadcn-ui/ui',
|
|
128
|
+
externalLink: true,
|
|
129
|
+
target: '_blank',
|
|
130
|
+
},
|
|
131
|
+
];
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Shared shell state
|
|
135
|
+
|
|
136
|
+
When the shell already uses the navigation registry, let the topbar resolve items from `NavigationService` by `navigationId` instead of passing `items` everywhere.
|
|
137
|
+
|
|
138
|
+
```html
|
|
139
|
+
<topbar navigationId="main" ariaLabel="Primary"></topbar>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## API reference
|
|
143
|
+
|
|
144
|
+
### `TopbarComponent`
|
|
145
|
+
|
|
146
|
+
| Input | Type | Default |
|
|
147
|
+
| ---------------- | ------------------ | ------------------- |
|
|
148
|
+
| `items` | `NavigationItem[]` | `[]` |
|
|
149
|
+
| `navigationId` | `string` | `'main'` |
|
|
150
|
+
| `variant` | `TopbarVariant` | `'default'` |
|
|
151
|
+
| `ariaLabel` | `string` | `'Primary'` |
|
|
152
|
+
| `class` | `string` | `''` |
|
|
153
|
+
| `autoRegister` | `boolean` | `true` |
|
|
154
|
+
| `showHamburger` | `boolean` | `true` |
|
|
155
|
+
| `hamburgerLabel` | `string` | `'Open navigation'` |
|
|
156
|
+
|
|
157
|
+
### Supporting types
|
|
158
|
+
|
|
159
|
+
- `NavigationItem` is the typed data model for `basic`, `group`, `collapsable`, and related navigation branches.
|
|
160
|
+
- `TopbarVariant` is currently `'default' | 'flyout'`.
|
|
161
|
+
- Lower-level item rendering and shell coordination live in `@ojiepermana/angular/navigation/item` and `@ojiepermana/angular/navigation/service`.
|
|
162
|
+
- In `flyout` mode, `basic` child item `subtitle` values render as supporting description copy inside dropdown cards.
|
|
163
|
+
|
|
164
|
+
## Styling and theming
|
|
165
|
+
|
|
166
|
+
The component is sticky by default and uses the shared theme tokens for foreground, accent, focus ring, and dropdown chrome.
|
|
167
|
+
|
|
168
|
+
- Pass `class` to `topbar` when the shell needs custom border, background, width, or spacing utilities.
|
|
169
|
+
- Style projected `[topbar-start]` and `[topbar-end]` content directly on the projected hosts.
|
|
170
|
+
- For documentation or embedded previews, override the sticky positioning locally with `style="position: static; top: auto;"`.
|
|
171
|
+
- The dropdown panel now uses `border-border` and background theme tokens, with a wider card grid when `variant="flyout"`.
|
|
172
|
+
|
|
173
|
+
## Accessibility
|
|
174
|
+
|
|
175
|
+
- The host exposes `role="navigation"`; set `ariaLabel` when multiple navigation landmarks exist on the page.
|
|
176
|
+
- The item list uses `role="menubar"`, and top-level interactive items expose `role="menuitem"`.
|
|
177
|
+
- Direct destinations should stay `basic` items so Angular renders anchors with native link semantics.
|
|
178
|
+
- Keep projected CTA elements keyboard reachable and visually distinct from navigation triggers.
|
|
179
|
+
|
|
180
|
+
## Keyboard interactions
|
|
181
|
+
|
|
182
|
+
- Left and Right Arrow move focus across the top-level items.
|
|
183
|
+
- Home and End jump to the first and last top-level item.
|
|
184
|
+
- Down Arrow moves focus into an already-open dropdown panel.
|
|
185
|
+
- Escape closes the active dropdown and returns focus to the trigger.
|
|
186
|
+
|
|
187
|
+
## Angular notes
|
|
188
|
+
|
|
189
|
+
- Use `NavigationItem` data or projected slot content to compose shell-level navigation.
|
|
190
|
+
- `autoRegister` keeps `NavigationService` in sync with explicit `items`, so active-trail logic still works when the shell uses the shared registry.
|
|
191
|
+
- Prefer `variant="flyout"` plus `subtitle` on child `basic` items when the goal is descriptive dropdown-card content.
|
|
192
|
+
- Prefer `@ojiepermana/angular/component/navigation-menu` when the page needs explicit trigger/content composition rather than a shell-driven data model.
|
|
193
|
+
|
|
194
|
+
## Source parity
|
|
195
|
+
|
|
196
|
+
This entrypoint covers the Angular shell-navigation behavior that matters most for top-level application chrome: a horizontal menubar, grouped dropdown triggers, descriptive dropdown cards in `flyout` mode, direct link items, projected brand and action slots, and shared shell integration. Use the dedicated navigation-menu component entrypoint when the goal is a closer shadcn-style website navigation composition.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ojiepermana/angular",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/ojiepermana/angular.git"
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"url": "https://github.com/ojiepermana/angular/issues"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@angular/common": "
|
|
14
|
-
"@angular/core": "
|
|
15
|
-
"@angular/forms": "
|
|
16
|
-
"@angular/router": "
|
|
17
|
-
"@angular/cdk": "
|
|
18
|
-
"@angular/material": "
|
|
13
|
+
"@angular/common": ">=22.0.0",
|
|
14
|
+
"@angular/core": ">=22.0.0",
|
|
15
|
+
"@angular/forms": ">=22.0.0",
|
|
16
|
+
"@angular/router": ">=22.0.0",
|
|
17
|
+
"@angular/cdk": ">=22.0.0",
|
|
18
|
+
"@angular/material": ">=22.0.0",
|
|
19
19
|
"rxjs": "^7.8.0",
|
|
20
20
|
"tailwindcss": "^4.3.0"
|
|
21
21
|
},
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@angular-devkit/schematics": "^
|
|
37
|
+
"@angular-devkit/schematics": "^22.0.0",
|
|
38
38
|
"class-variance-authority": "^0.7.1",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"d3-array": "^3.2.4",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
},
|
|
53
53
|
"ng-update": {
|
|
54
54
|
"packageGroup": {
|
|
55
|
-
"@angular/common": "
|
|
56
|
-
"@angular/core": "
|
|
57
|
-
"@angular/forms": "
|
|
58
|
-
"@angular/router": "
|
|
59
|
-
"@angular/cdk": "
|
|
60
|
-
"@angular/material": "
|
|
55
|
+
"@angular/common": ">=22.0.0",
|
|
56
|
+
"@angular/core": ">=22.0.0",
|
|
57
|
+
"@angular/forms": ">=22.0.0",
|
|
58
|
+
"@angular/router": ">=22.0.0",
|
|
59
|
+
"@angular/cdk": ">=22.0.0",
|
|
60
|
+
"@angular/material": ">=22.0.0",
|
|
61
61
|
"rxjs": "~7.8.2",
|
|
62
62
|
"tailwindcss": "^4.3.0"
|
|
63
63
|
}
|
|
@@ -175,6 +175,10 @@
|
|
|
175
175
|
"types": "./types/ojiepermana-angular-component-command.d.ts",
|
|
176
176
|
"default": "./fesm2022/ojiepermana-angular-component-command.mjs"
|
|
177
177
|
},
|
|
178
|
+
"./component/composer": {
|
|
179
|
+
"types": "./types/ojiepermana-angular-component-composer.d.ts",
|
|
180
|
+
"default": "./fesm2022/ojiepermana-angular-component-composer.mjs"
|
|
181
|
+
},
|
|
178
182
|
"./component/context-menu": {
|
|
179
183
|
"types": "./types/ojiepermana-angular-component-context-menu.d.ts",
|
|
180
184
|
"default": "./fesm2022/ojiepermana-angular-component-context-menu.mjs"
|
|
@@ -195,10 +199,22 @@
|
|
|
195
199
|
"types": "./types/ojiepermana-angular-component-dropdown-menu.d.ts",
|
|
196
200
|
"default": "./fesm2022/ojiepermana-angular-component-dropdown-menu.mjs"
|
|
197
201
|
},
|
|
202
|
+
"./component/editor": {
|
|
203
|
+
"types": "./types/ojiepermana-angular-component-editor.d.ts",
|
|
204
|
+
"default": "./fesm2022/ojiepermana-angular-component-editor.mjs"
|
|
205
|
+
},
|
|
206
|
+
"./component/empty": {
|
|
207
|
+
"types": "./types/ojiepermana-angular-component-empty.d.ts",
|
|
208
|
+
"default": "./fesm2022/ojiepermana-angular-component-empty.mjs"
|
|
209
|
+
},
|
|
198
210
|
"./component/form": {
|
|
199
211
|
"types": "./types/ojiepermana-angular-component-form.d.ts",
|
|
200
212
|
"default": "./fesm2022/ojiepermana-angular-component-form.mjs"
|
|
201
213
|
},
|
|
214
|
+
"./component/hover-card": {
|
|
215
|
+
"types": "./types/ojiepermana-angular-component-hover-card.d.ts",
|
|
216
|
+
"default": "./fesm2022/ojiepermana-angular-component-hover-card.mjs"
|
|
217
|
+
},
|
|
202
218
|
"./component/input": {
|
|
203
219
|
"types": "./types/ojiepermana-angular-component-input.d.ts",
|
|
204
220
|
"default": "./fesm2022/ojiepermana-angular-component-input.mjs"
|
|
@@ -207,18 +223,46 @@
|
|
|
207
223
|
"types": "./types/ojiepermana-angular-component-input-group.d.ts",
|
|
208
224
|
"default": "./fesm2022/ojiepermana-angular-component-input-group.mjs"
|
|
209
225
|
},
|
|
226
|
+
"./component/input-otp": {
|
|
227
|
+
"types": "./types/ojiepermana-angular-component-input-otp.d.ts",
|
|
228
|
+
"default": "./fesm2022/ojiepermana-angular-component-input-otp.mjs"
|
|
229
|
+
},
|
|
210
230
|
"./component/item": {
|
|
211
231
|
"types": "./types/ojiepermana-angular-component-item.d.ts",
|
|
212
232
|
"default": "./fesm2022/ojiepermana-angular-component-item.mjs"
|
|
213
233
|
},
|
|
234
|
+
"./component/kanban": {
|
|
235
|
+
"types": "./types/ojiepermana-angular-component-kanban.d.ts",
|
|
236
|
+
"default": "./fesm2022/ojiepermana-angular-component-kanban.mjs"
|
|
237
|
+
},
|
|
238
|
+
"./component/kbd": {
|
|
239
|
+
"types": "./types/ojiepermana-angular-component-kbd.d.ts",
|
|
240
|
+
"default": "./fesm2022/ojiepermana-angular-component-kbd.mjs"
|
|
241
|
+
},
|
|
214
242
|
"./component/label": {
|
|
215
243
|
"types": "./types/ojiepermana-angular-component-label.d.ts",
|
|
216
244
|
"default": "./fesm2022/ojiepermana-angular-component-label.mjs"
|
|
217
245
|
},
|
|
246
|
+
"./component/menubar": {
|
|
247
|
+
"types": "./types/ojiepermana-angular-component-menubar.d.ts",
|
|
248
|
+
"default": "./fesm2022/ojiepermana-angular-component-menubar.mjs"
|
|
249
|
+
},
|
|
250
|
+
"./component/native-select": {
|
|
251
|
+
"types": "./types/ojiepermana-angular-component-native-select.d.ts",
|
|
252
|
+
"default": "./fesm2022/ojiepermana-angular-component-native-select.mjs"
|
|
253
|
+
},
|
|
254
|
+
"./component/navigation-menu": {
|
|
255
|
+
"types": "./types/ojiepermana-angular-component-navigation-menu.d.ts",
|
|
256
|
+
"default": "./fesm2022/ojiepermana-angular-component-navigation-menu.mjs"
|
|
257
|
+
},
|
|
218
258
|
"./component/pagination": {
|
|
219
259
|
"types": "./types/ojiepermana-angular-component-pagination.d.ts",
|
|
220
260
|
"default": "./fesm2022/ojiepermana-angular-component-pagination.mjs"
|
|
221
261
|
},
|
|
262
|
+
"./component/pillbox": {
|
|
263
|
+
"types": "./types/ojiepermana-angular-component-pillbox.d.ts",
|
|
264
|
+
"default": "./fesm2022/ojiepermana-angular-component-pillbox.mjs"
|
|
265
|
+
},
|
|
222
266
|
"./component/popover": {
|
|
223
267
|
"types": "./types/ojiepermana-angular-component-popover.d.ts",
|
|
224
268
|
"default": "./fesm2022/ojiepermana-angular-component-popover.mjs"
|
|
@@ -231,6 +275,10 @@
|
|
|
231
275
|
"types": "./types/ojiepermana-angular-component-radio.d.ts",
|
|
232
276
|
"default": "./fesm2022/ojiepermana-angular-component-radio.mjs"
|
|
233
277
|
},
|
|
278
|
+
"./component/resizable": {
|
|
279
|
+
"types": "./types/ojiepermana-angular-component-resizable.d.ts",
|
|
280
|
+
"default": "./fesm2022/ojiepermana-angular-component-resizable.mjs"
|
|
281
|
+
},
|
|
234
282
|
"./component/scroll-area": {
|
|
235
283
|
"types": "./types/ojiepermana-angular-component-scroll-area.d.ts",
|
|
236
284
|
"default": "./fesm2022/ojiepermana-angular-component-scroll-area.mjs"
|
|
@@ -255,6 +303,10 @@
|
|
|
255
303
|
"types": "./types/ojiepermana-angular-component-slider.d.ts",
|
|
256
304
|
"default": "./fesm2022/ojiepermana-angular-component-slider.mjs"
|
|
257
305
|
},
|
|
306
|
+
"./component/spinner": {
|
|
307
|
+
"types": "./types/ojiepermana-angular-component-spinner.d.ts",
|
|
308
|
+
"default": "./fesm2022/ojiepermana-angular-component-spinner.mjs"
|
|
309
|
+
},
|
|
258
310
|
"./component/switch": {
|
|
259
311
|
"types": "./types/ojiepermana-angular-component-switch.d.ts",
|
|
260
312
|
"default": "./fesm2022/ojiepermana-angular-component-switch.mjs"
|
|
@@ -271,10 +323,22 @@
|
|
|
271
323
|
"types": "./types/ojiepermana-angular-component-textarea.d.ts",
|
|
272
324
|
"default": "./fesm2022/ojiepermana-angular-component-textarea.mjs"
|
|
273
325
|
},
|
|
326
|
+
"./component/timeline": {
|
|
327
|
+
"types": "./types/ojiepermana-angular-component-timeline.d.ts",
|
|
328
|
+
"default": "./fesm2022/ojiepermana-angular-component-timeline.mjs"
|
|
329
|
+
},
|
|
274
330
|
"./component/toast": {
|
|
275
331
|
"types": "./types/ojiepermana-angular-component-toast.d.ts",
|
|
276
332
|
"default": "./fesm2022/ojiepermana-angular-component-toast.mjs"
|
|
277
333
|
},
|
|
334
|
+
"./component/toggle": {
|
|
335
|
+
"types": "./types/ojiepermana-angular-component-toggle.d.ts",
|
|
336
|
+
"default": "./fesm2022/ojiepermana-angular-component-toggle.mjs"
|
|
337
|
+
},
|
|
338
|
+
"./component/toggle-group": {
|
|
339
|
+
"types": "./types/ojiepermana-angular-component-toggle-group.d.ts",
|
|
340
|
+
"default": "./fesm2022/ojiepermana-angular-component-toggle-group.mjs"
|
|
341
|
+
},
|
|
278
342
|
"./component/tooltip": {
|
|
279
343
|
"types": "./types/ojiepermana-angular-component-tooltip.d.ts",
|
|
280
344
|
"default": "./fesm2022/ojiepermana-angular-component-tooltip.mjs"
|
|
@@ -295,14 +359,6 @@
|
|
|
295
359
|
"types": "./types/ojiepermana-angular-layout-component.d.ts",
|
|
296
360
|
"default": "./fesm2022/ojiepermana-angular-layout-component.mjs"
|
|
297
361
|
},
|
|
298
|
-
"./layout/empty": {
|
|
299
|
-
"types": "./types/ojiepermana-angular-layout-empty.d.ts",
|
|
300
|
-
"default": "./fesm2022/ojiepermana-angular-layout-empty.mjs"
|
|
301
|
-
},
|
|
302
|
-
"./layout/horizontal": {
|
|
303
|
-
"types": "./types/ojiepermana-angular-layout-horizontal.d.ts",
|
|
304
|
-
"default": "./fesm2022/ojiepermana-angular-layout-horizontal.mjs"
|
|
305
|
-
},
|
|
306
362
|
"./layout/provider": {
|
|
307
363
|
"types": "./types/ojiepermana-angular-layout-provider.d.ts",
|
|
308
364
|
"default": "./fesm2022/ojiepermana-angular-layout-provider.mjs"
|
|
@@ -323,9 +379,17 @@
|
|
|
323
379
|
"types": "./types/ojiepermana-angular-layout-token-directive.d.ts",
|
|
324
380
|
"default": "./fesm2022/ojiepermana-angular-layout-token-directive.mjs"
|
|
325
381
|
},
|
|
326
|
-
"./layout/
|
|
327
|
-
"types": "./types/ojiepermana-angular-layout-
|
|
328
|
-
"default": "./fesm2022/ojiepermana-angular-layout-
|
|
382
|
+
"./layout/type/empty": {
|
|
383
|
+
"types": "./types/ojiepermana-angular-layout-type-empty.d.ts",
|
|
384
|
+
"default": "./fesm2022/ojiepermana-angular-layout-type-empty.mjs"
|
|
385
|
+
},
|
|
386
|
+
"./layout/type/horizontal": {
|
|
387
|
+
"types": "./types/ojiepermana-angular-layout-type-horizontal.d.ts",
|
|
388
|
+
"default": "./fesm2022/ojiepermana-angular-layout-type-horizontal.mjs"
|
|
389
|
+
},
|
|
390
|
+
"./layout/type/vertical": {
|
|
391
|
+
"types": "./types/ojiepermana-angular-layout-type-vertical.d.ts",
|
|
392
|
+
"default": "./fesm2022/ojiepermana-angular-layout-type-vertical.mjs"
|
|
329
393
|
},
|
|
330
394
|
"./navigation/demo-data": {
|
|
331
395
|
"types": "./types/ojiepermana-angular-navigation-demo-data.d.ts",
|
package/theme/README.md
CHANGED
|
@@ -39,12 +39,119 @@ export const appConfig = {
|
|
|
39
39
|
The public import contract stays stable even if the source files inside this
|
|
40
40
|
entrypoint move.
|
|
41
41
|
|
|
42
|
+
## Typography mapping
|
|
43
|
+
|
|
44
|
+
shadcn `Typography` maps to semantic HTML plus this theme entrypoint. There is
|
|
45
|
+
no `@ojiepermana/angular/component/typography` secondary entrypoint.
|
|
46
|
+
|
|
47
|
+
### Import
|
|
48
|
+
|
|
49
|
+
```css
|
|
50
|
+
@import '@ojiepermana/angular/theme/styles';
|
|
51
|
+
@import 'tailwindcss';
|
|
52
|
+
@import '@ojiepermana/angular/theme/tailwind/theme.css';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Composition
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
article
|
|
59
|
+
├── h1
|
|
60
|
+
├── p.lead
|
|
61
|
+
├── h2 / h3 / h4
|
|
62
|
+
├── p + a
|
|
63
|
+
├── blockquote
|
|
64
|
+
├── ul / ol
|
|
65
|
+
├── code
|
|
66
|
+
└── table
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Basic usage
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<article class="max-w-2xl text-foreground">
|
|
73
|
+
<h1 class="scroll-m-20 text-4xl font-extrabold tracking-tight text-balance">
|
|
74
|
+
Taxing Laughter: The Joke Tax Chronicles
|
|
75
|
+
</h1>
|
|
76
|
+
|
|
77
|
+
<p class="text-xl leading-7 text-muted-foreground [&:not(:first-child)]:mt-6">
|
|
78
|
+
Once upon a time, in a far-off land, there was a very lazy king who spent all day lounging on his throne.
|
|
79
|
+
</p>
|
|
80
|
+
|
|
81
|
+
<h2 class="mt-10 scroll-m-20 border-b border-border pb-2 text-3xl font-semibold tracking-tight first:mt-0">
|
|
82
|
+
The King's Plan
|
|
83
|
+
</h2>
|
|
84
|
+
|
|
85
|
+
<p class="leading-7 [&:not(:first-child)]:mt-6">
|
|
86
|
+
The king thought long and hard and came up with
|
|
87
|
+
<a href="#" class="font-medium text-primary underline underline-offset-4">a brilliant plan</a>.
|
|
88
|
+
</p>
|
|
89
|
+
|
|
90
|
+
<blockquote class="mt-6 border-s-2 border-border ps-6 italic">
|
|
91
|
+
"After all," he said, "everyone enjoys a good joke."
|
|
92
|
+
</blockquote>
|
|
93
|
+
</article>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Common patterns
|
|
97
|
+
|
|
98
|
+
- Use `text-xl leading-7 text-muted-foreground` for a lead paragraph below the page title.
|
|
99
|
+
- Use `relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold` for short inline code.
|
|
100
|
+
- Use `border-border`, `text-start`, and real `scope="col"` headers on data tables.
|
|
101
|
+
- Use logical spacing utilities such as `border-s-2`, `ps-6`, and `ms-6` so the same recipe works in RTL.
|
|
102
|
+
|
|
103
|
+
### API reference
|
|
104
|
+
|
|
105
|
+
| Concept | Local surface | Notes |
|
|
106
|
+
| ------------ | ------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
107
|
+
| Theme styles | `@ojiepermana/angular/theme` and CSS imports | Provides the token-backed styles and Tailwind bridge. |
|
|
108
|
+
| Headings | Native `h1`-`h4` elements | Keep the heading hierarchy semantic and style each usage site directly. |
|
|
109
|
+
| Body copy | Native `p`, `blockquote`, `ul`, `ol`, and `table` | Typography stays documentation-first and does not wrap content in custom Angular components. |
|
|
110
|
+
| Inline code | Native `code` | Use a muted surface and mono text for short snippets. |
|
|
111
|
+
| RTL | `dir="rtl"` on a wrapping container | Prefer logical spacing utilities when the layout should mirror. |
|
|
112
|
+
|
|
113
|
+
### Styling and theming
|
|
114
|
+
|
|
115
|
+
Use token-aware utilities such as `border-border`, `bg-muted`,
|
|
116
|
+
`text-foreground`, `text-muted-foreground`, and `text-primary`. Keep the
|
|
117
|
+
typography classes close to the article or page slice that owns the prose
|
|
118
|
+
instead of centralizing them in a rigid wrapper component.
|
|
119
|
+
|
|
120
|
+
### Accessibility
|
|
121
|
+
|
|
122
|
+
- Keep heading levels sequential within an article or documentation page.
|
|
123
|
+
- Preserve native list, table, blockquote, and anchor semantics.
|
|
124
|
+
- Add `scope="col"` to table headers when the table communicates real data.
|
|
125
|
+
- Maintain visible link affordances with contrast and underline offset.
|
|
126
|
+
|
|
127
|
+
### Keyboard interactions
|
|
128
|
+
|
|
129
|
+
- Typography relies on native browser behavior for links, selection, scrolling,
|
|
130
|
+
and table navigation.
|
|
131
|
+
- There is no custom roving-focus or composite widget behavior in this mapping.
|
|
132
|
+
|
|
133
|
+
### Angular notes
|
|
134
|
+
|
|
135
|
+
- No TypeScript import is required for typography itself; the runtime surface is
|
|
136
|
+
semantic HTML plus theme CSS.
|
|
137
|
+
- Keep prose data in component fields, markdown content, or a CMS instead of
|
|
138
|
+
encoding text into a fake typography component API.
|
|
139
|
+
- Use logical spacing utilities when the content may need right-to-left support.
|
|
140
|
+
|
|
141
|
+
### Source parity
|
|
142
|
+
|
|
143
|
+
This entrypoint is the durable Angular-first mapping for shadcn `Typography`.
|
|
144
|
+
It follows the same visual recipes while staying honest about the local API:
|
|
145
|
+
there is no dedicated typography secondary entrypoint, and the authoritative
|
|
146
|
+
consumer guidance lives in the theme entrypoint plus the `ui/shadcn/typography`
|
|
147
|
+
demo page.
|
|
148
|
+
|
|
42
149
|
## Source layout
|
|
43
150
|
|
|
44
151
|
- `public-api.ts` aggregates the granular runtime entrypoints for `@ojiepermana/angular/theme`.
|
|
45
|
-
- `services
|
|
46
|
-
- `provider
|
|
47
|
-
- `token
|
|
152
|
+
- `services` owns `ThemeService` plus its runtime tests.
|
|
153
|
+
- `provider` owns DI provider helpers plus provider-focused tests.
|
|
154
|
+
- `token` owns config types, guards, constants, and token-focused tests.
|
|
48
155
|
- `css/foundation` contains the cascade layer registration, shared semantic tokens, and component-facing global helpers.
|
|
49
156
|
- `css/variants/mode` contains light and dark mode layers.
|
|
50
157
|
- `css/variants/color` contains named color themes.
|