@geoit/ui 0.0.2 → 0.0.5
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/AGENTS.md +12 -8
- package/README.md +140 -17
- package/ai/AGENTS.md +43 -32
- package/ai/README.md +36 -2
- package/ai/catalog.json +5585 -437
- package/ai/components/geo-alert.md +75 -21
- package/ai/components/geo-back-button.md +64 -18
- package/ai/components/geo-breadcrumb.md +71 -12
- package/ai/components/geo-button.md +90 -27
- package/ai/components/geo-chart.md +103 -0
- package/ai/components/geo-checkbox.md +67 -20
- package/ai/components/geo-column-picker.md +91 -18
- package/ai/components/geo-confirm-modal.md +92 -27
- package/ai/components/geo-dashboard.md +91 -0
- package/ai/components/geo-date-picker.md +105 -29
- package/ai/components/geo-date-range-picker.md +101 -28
- package/ai/components/geo-empty-state.md +75 -0
- package/ai/components/geo-feedback-form.md +97 -0
- package/ai/components/geo-file-picker.md +99 -26
- package/ai/components/geo-forgot-password.md +78 -0
- package/ai/components/geo-form-modal.md +111 -44
- package/ai/components/geo-icon.md +70 -16
- package/ai/components/geo-input.md +94 -29
- package/ai/components/geo-layout-footer.md +70 -0
- package/ai/components/geo-layout-header-actions.md +82 -0
- package/ai/components/geo-layout-header.md +89 -0
- package/ai/components/geo-layout-sidebar.md +86 -0
- package/ai/components/geo-layout.md +155 -0
- package/ai/components/geo-list-page.md +72 -0
- package/ai/components/geo-login.md +94 -0
- package/ai/components/geo-map-admin-filter.md +80 -0
- package/ai/components/geo-map-basemap-switcher.md +75 -0
- package/ai/components/geo-map-help.md +72 -0
- package/ai/components/geo-map-layer-card.md +73 -0
- package/ai/components/geo-map-layer-panel.md +75 -0
- package/ai/components/geo-map-layers-drawer.md +78 -0
- package/ai/components/geo-map-legend.md +74 -0
- package/ai/components/geo-map-locate.md +75 -0
- package/ai/components/geo-map-location-chip.md +71 -0
- package/ai/components/geo-map-measure.md +74 -0
- package/ai/components/geo-map-opacity.md +75 -0
- package/ai/components/geo-map-parcel-popup.md +79 -0
- package/ai/components/geo-map-search.md +83 -0
- package/ai/components/geo-map-shell.md +110 -0
- package/ai/components/geo-map-snapshot.md +75 -0
- package/ai/components/geo-map-swipe.md +73 -0
- package/ai/components/geo-map-toolbar.md +76 -0
- package/ai/components/geo-map-zoom.md +74 -0
- package/ai/components/geo-map.md +205 -0
- package/ai/components/geo-overlap-result.md +88 -0
- package/ai/components/geo-page-header.md +72 -0
- package/ai/components/geo-page-title.md +62 -16
- package/ai/components/geo-pagination.md +76 -24
- package/ai/components/geo-radio.md +110 -27
- package/ai/components/geo-row-actions.md +87 -19
- package/ai/components/geo-select.md +108 -28
- package/ai/components/geo-slider.md +70 -21
- package/ai/components/geo-stat-card.md +98 -0
- package/ai/components/geo-status-tag.md +67 -15
- package/ai/components/geo-step-form-layout.md +121 -38
- package/ai/components/geo-stepper.md +81 -19
- package/ai/components/geo-table-filter.md +90 -29
- package/ai/components/geo-table-pagination.md +70 -23
- package/ai/components/geo-table-toolbar.md +84 -29
- package/ai/components/geo-table.md +191 -59
- package/ai/components/geo-tabs.md +99 -27
- package/ai/components/geo-textarea.md +84 -23
- package/ai/components/geo-toast.md +138 -27
- package/ai/components/geo-tree.md +94 -22
- package/ai/components/geo-typography.md +70 -19
- package/ai/components/geo-upload.md +109 -39
- package/ai/mockup.html +1194 -0
- package/ai/recipes.md +132 -47
- package/esm2022/lib/figma/geo-alert/geo-alert.component.mjs +19 -36
- package/esm2022/lib/figma/geo-back-button/geo-back-button.component.mjs +14 -24
- package/esm2022/lib/figma/geo-breadcrumb/geo-breadcrumb.component.mjs +8 -11
- package/esm2022/lib/figma/geo-button/geo-button.component.mjs +30 -59
- package/esm2022/lib/figma/geo-chart/geo-chart.component.mjs +88 -0
- package/esm2022/lib/figma/geo-chart/geo-chart.types.mjs +2 -0
- package/esm2022/lib/figma/geo-checkbox/geo-checkbox.component.mjs +11 -22
- package/esm2022/lib/figma/geo-confirm-modal/geo-confirm-modal.component.mjs +22 -54
- package/esm2022/lib/figma/geo-dashboard/geo-dashboard.component.mjs +49 -0
- package/esm2022/lib/figma/geo-dashboard/geo-dashboard.types.mjs +2 -0
- package/esm2022/lib/figma/geo-date-picker/geo-date-picker.component.mjs +48 -78
- package/esm2022/lib/figma/geo-date-range-picker/geo-date-range-picker.component.mjs +47 -75
- package/esm2022/lib/figma/geo-empty-state/geo-empty-state.component.mjs +25 -0
- package/esm2022/lib/figma/geo-feedback-form/geo-feedback-form.component.mjs +75 -0
- package/esm2022/lib/figma/geo-feedback-form/geo-feedback-form.types.mjs +2 -0
- package/esm2022/lib/figma/geo-file-picker/geo-file-picker.component.mjs +59 -81
- package/esm2022/lib/figma/geo-forgot-password/geo-forgot-password.component.mjs +51 -0
- package/esm2022/lib/figma/geo-form-modal/geo-form-modal.component.mjs +45 -112
- package/esm2022/lib/figma/geo-icon/geo-icon.component.mjs +22 -32
- package/esm2022/lib/figma/geo-input/geo-input.component.mjs +41 -70
- package/esm2022/lib/figma/geo-layout/footer/geo-layout-footer.component.mjs +18 -0
- package/esm2022/lib/figma/geo-layout/geo-layout-actions.directive.mjs +15 -0
- package/esm2022/lib/figma/geo-layout/geo-layout.component.mjs +79 -0
- package/esm2022/lib/figma/geo-layout/geo-layout.types.mjs +42 -0
- package/esm2022/lib/figma/geo-layout/header/geo-layout-header.component.mjs +60 -0
- package/esm2022/lib/figma/geo-layout/header-actions/geo-layout-header-actions.component.mjs +70 -0
- package/esm2022/lib/figma/geo-layout/sidebar/geo-layout-sidebar.component.mjs +90 -0
- package/esm2022/lib/figma/geo-list-page/geo-list-page.component.mjs +22 -0
- package/esm2022/lib/figma/geo-login/geo-login.component.mjs +58 -0
- package/esm2022/lib/figma/geo-login/geo-login.types.mjs +2 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-admin-filter/geo-map-admin-filter.component.mjs +52 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-basemap-switcher/geo-map-basemap-switcher.component.mjs +61 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-help/geo-map-help.component.mjs +26 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-layer-card/geo-map-layer-card.component.mjs +24 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-layer-panel/geo-map-layer-panel.component.mjs +146 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-layers-drawer/geo-map-layers-drawer.component.mjs +37 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-legend/geo-map-legend.component.mjs +30 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-locate/geo-map-locate.component.mjs +72 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-location-chip/geo-map-location-chip.component.mjs +21 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-measure/geo-map-measure.component.mjs +375 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-opacity/geo-map-opacity.component.mjs +94 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-parcel-popup/geo-map-parcel-popup.component.mjs +136 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-search/geo-map-search.component.mjs +182 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-shell/geo-map-shell.component.mjs +577 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-snapshot/geo-map-snapshot.component.mjs +93 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-swipe/geo-map-swipe.component.mjs +129 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-toolbar/geo-map-toolbar.component.mjs +64 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-zoom/geo-map-zoom.component.mjs +295 -0
- package/esm2022/lib/figma/geo-map/geo-map-toolbar.icons.mjs +18 -0
- package/esm2022/lib/figma/geo-map/geo-map.component.mjs +144 -0
- package/esm2022/lib/figma/geo-map/geo-map.constants.mjs +497 -0
- package/esm2022/lib/figma/geo-map/geo-map.controller.mjs +71 -0
- package/esm2022/lib/figma/geo-map/geo-map.types.mjs +2 -0
- package/esm2022/lib/figma/geo-map/services/geo-map-layer.service.mjs +368 -0
- package/esm2022/lib/figma/geo-map/services/geo-map-projection.service.mjs +110 -0
- package/esm2022/lib/figma/geo-map/services/geo-map.service.mjs +540 -0
- package/esm2022/lib/figma/geo-map/utils/geo-map-fullscreen-overlay.util.mjs +47 -0
- package/esm2022/lib/figma/geo-map/utils/geo-map-interactions.util.mjs +30 -0
- package/esm2022/lib/figma/geo-overlap-result/geo-overlap-result.component.mjs +25 -0
- package/esm2022/lib/figma/geo-overlap-result/geo-overlap-result.types.mjs +2 -0
- package/esm2022/lib/figma/geo-page-header/geo-page-header.component.mjs +23 -0
- package/esm2022/lib/figma/geo-page-title/geo-page-title.component.mjs +20 -35
- package/esm2022/lib/figma/geo-pagination/geo-pagination.component.mjs +13 -43
- package/esm2022/lib/figma/geo-radio/geo-radio.component.mjs +32 -52
- package/esm2022/lib/figma/geo-select/geo-select.component.mjs +46 -72
- package/esm2022/lib/figma/geo-slider/geo-slider.component.mjs +12 -28
- package/esm2022/lib/figma/geo-stat-card/geo-stat-card.component.mjs +163 -0
- package/esm2022/lib/figma/geo-stat-card/geo-stat-card.types.mjs +2 -0
- package/esm2022/lib/figma/geo-status-tag/geo-status-tag.component.mjs +23 -27
- package/esm2022/lib/figma/geo-step-form-layout/geo-step-form-layout.component.mjs +39 -96
- package/esm2022/lib/figma/geo-stepper/geo-stepper.component.mjs +18 -33
- package/esm2022/lib/figma/geo-table/geo-column-picker/geo-column-picker.component.mjs +14 -24
- package/esm2022/lib/figma/geo-table/geo-row-actions/geo-row-actions.component.mjs +18 -36
- package/esm2022/lib/figma/geo-table/geo-table-filter/geo-table-filter.component.mjs +41 -98
- package/esm2022/lib/figma/geo-table/geo-table-pagination/geo-table-pagination.component.mjs +40 -73
- package/esm2022/lib/figma/geo-table/geo-table-toolbar/geo-table-toolbar.component.mjs +26 -56
- package/esm2022/lib/figma/geo-table/geo-table.component.mjs +110 -210
- package/esm2022/lib/figma/geo-tabs/geo-tabs.component.mjs +33 -63
- package/esm2022/lib/figma/geo-textarea/geo-textarea.component.mjs +28 -44
- package/esm2022/lib/figma/geo-toast/geo-toast.component.mjs +18 -39
- package/esm2022/lib/figma/geo-tree/geo-tree.component.mjs +12 -40
- package/esm2022/lib/figma/geo-typography/geo-typography.component.mjs +49 -64
- package/esm2022/lib/figma/geo-upload/geo-upload.component.mjs +50 -101
- package/esm2022/lib/figma/index.mjs +50 -1
- package/esm2022/lib/styles/tokens.mjs +56 -24
- package/fesm2022/geoit-ui.mjs +5981 -1825
- package/fesm2022/geoit-ui.mjs.map +1 -1
- package/lib/figma/geo-alert/geo-alert.component.d.ts +10 -11
- package/lib/figma/geo-back-button/geo-back-button.component.d.ts +6 -7
- package/lib/figma/geo-breadcrumb/geo-breadcrumb.component.d.ts +2 -2
- package/lib/figma/geo-button/geo-button.component.d.ts +21 -17
- package/lib/figma/geo-chart/geo-chart.component.d.ts +40 -0
- package/lib/figma/geo-chart/geo-chart.types.d.ts +13 -0
- package/lib/figma/geo-checkbox/geo-checkbox.component.d.ts +6 -7
- package/lib/figma/geo-confirm-modal/geo-confirm-modal.component.d.ts +15 -17
- package/lib/figma/geo-dashboard/geo-dashboard.component.d.ts +29 -0
- package/lib/figma/geo-dashboard/geo-dashboard.types.d.ts +7 -0
- package/lib/figma/geo-date-picker/geo-date-picker.component.d.ts +26 -21
- package/lib/figma/geo-date-range-picker/geo-date-range-picker.component.d.ts +25 -20
- package/lib/figma/geo-empty-state/geo-empty-state.component.d.ts +17 -0
- package/lib/figma/geo-feedback-form/geo-feedback-form.component.d.ts +36 -0
- package/lib/figma/geo-feedback-form/geo-feedback-form.types.d.ts +8 -0
- package/lib/figma/geo-file-picker/geo-file-picker.component.d.ts +23 -20
- package/lib/figma/geo-forgot-password/geo-forgot-password.component.d.ts +24 -0
- package/lib/figma/geo-form-modal/geo-form-modal.component.d.ts +33 -35
- package/lib/figma/geo-icon/geo-icon.component.d.ts +7 -7
- package/lib/figma/geo-input/geo-input.component.d.ts +23 -21
- package/lib/figma/geo-layout/footer/geo-layout-footer.component.d.ts +10 -0
- package/lib/figma/geo-layout/geo-layout-actions.directive.d.ts +6 -0
- package/lib/figma/geo-layout/geo-layout.component.d.ts +48 -0
- package/lib/figma/geo-layout/geo-layout.types.d.ts +44 -0
- package/lib/figma/geo-layout/header/geo-layout-header.component.d.ts +31 -0
- package/lib/figma/geo-layout/header-actions/geo-layout-header-actions.component.d.ts +32 -0
- package/lib/figma/geo-layout/sidebar/geo-layout-sidebar.component.d.ts +34 -0
- package/lib/figma/geo-list-page/geo-list-page.component.d.ts +16 -0
- package/lib/figma/geo-login/geo-login.component.d.ts +27 -0
- package/lib/figma/geo-login/geo-login.types.d.ts +6 -0
- package/lib/figma/geo-map/chrome/geo-map-admin-filter/geo-map-admin-filter.component.d.ts +28 -0
- package/lib/figma/geo-map/chrome/geo-map-basemap-switcher/geo-map-basemap-switcher.component.d.ts +26 -0
- package/lib/figma/geo-map/chrome/geo-map-help/geo-map-help.component.d.ts +20 -0
- package/lib/figma/geo-map/chrome/geo-map-layer-card/geo-map-layer-card.component.d.ts +15 -0
- package/lib/figma/geo-map/chrome/geo-map-layer-panel/geo-map-layer-panel.component.d.ts +40 -0
- package/lib/figma/geo-map/chrome/geo-map-layers-drawer/geo-map-layers-drawer.component.d.ts +25 -0
- package/lib/figma/geo-map/chrome/geo-map-legend/geo-map-legend.component.d.ts +18 -0
- package/lib/figma/geo-map/chrome/geo-map-locate/geo-map-locate.component.d.ts +24 -0
- package/lib/figma/geo-map/chrome/geo-map-location-chip/geo-map-location-chip.component.d.ts +14 -0
- package/lib/figma/geo-map/chrome/geo-map-measure/geo-map-measure.component.d.ts +49 -0
- package/lib/figma/geo-map/chrome/geo-map-opacity/geo-map-opacity.component.d.ts +30 -0
- package/lib/figma/geo-map/chrome/geo-map-parcel-popup/geo-map-parcel-popup.component.d.ts +44 -0
- package/lib/figma/geo-map/chrome/geo-map-search/geo-map-search.component.d.ts +56 -0
- package/lib/figma/geo-map/chrome/geo-map-shell/geo-map-shell.component.d.ts +103 -0
- package/lib/figma/geo-map/chrome/geo-map-snapshot/geo-map-snapshot.component.d.ts +21 -0
- package/lib/figma/geo-map/chrome/geo-map-swipe/geo-map-swipe.component.d.ts +33 -0
- package/lib/figma/geo-map/chrome/geo-map-toolbar/geo-map-toolbar.component.d.ts +30 -0
- package/lib/figma/geo-map/chrome/geo-map-zoom/geo-map-zoom.component.d.ts +67 -0
- package/lib/figma/geo-map/geo-map-toolbar.icons.d.ts +17 -0
- package/lib/figma/geo-map/geo-map.component.d.ts +53 -0
- package/lib/figma/geo-map/geo-map.constants.d.ts +73 -0
- package/lib/figma/geo-map/geo-map.controller.d.ts +49 -0
- package/lib/figma/geo-map/geo-map.types.d.ts +224 -0
- package/lib/figma/geo-map/services/geo-map-layer.service.d.ts +42 -0
- package/lib/figma/geo-map/services/geo-map-projection.service.d.ts +32 -0
- package/lib/figma/geo-map/services/geo-map.service.d.ts +99 -0
- package/lib/figma/geo-map/utils/geo-map-fullscreen-overlay.util.d.ts +13 -0
- package/lib/figma/geo-map/utils/geo-map-interactions.util.d.ts +9 -0
- package/lib/figma/geo-overlap-result/geo-overlap-result.component.d.ts +18 -0
- package/lib/figma/geo-overlap-result/geo-overlap-result.types.d.ts +7 -0
- package/lib/figma/geo-page-header/geo-page-header.component.d.ts +16 -0
- package/lib/figma/geo-page-title/geo-page-title.component.d.ts +9 -9
- package/lib/figma/geo-pagination/geo-pagination.component.d.ts +9 -14
- package/lib/figma/geo-radio/geo-radio.component.d.ts +17 -15
- package/lib/figma/geo-select/geo-select.component.d.ts +24 -19
- package/lib/figma/geo-slider/geo-slider.component.d.ts +7 -9
- package/lib/figma/geo-stat-card/geo-stat-card.component.d.ts +50 -0
- package/lib/figma/geo-stat-card/geo-stat-card.types.d.ts +11 -0
- package/lib/figma/geo-status-tag/geo-status-tag.component.d.ts +7 -7
- package/lib/figma/geo-step-form-layout/geo-step-form-layout.component.d.ts +27 -29
- package/lib/figma/geo-stepper/geo-stepper.component.d.ts +6 -8
- package/lib/figma/geo-table/geo-column-picker/geo-column-picker.component.d.ts +6 -7
- package/lib/figma/geo-table/geo-row-actions/geo-row-actions.component.d.ts +11 -12
- package/lib/figma/geo-table/geo-table-filter/geo-table-filter.component.d.ts +21 -28
- package/lib/figma/geo-table/geo-table-pagination/geo-table-pagination.component.d.ts +17 -20
- package/lib/figma/geo-table/geo-table-toolbar/geo-table-toolbar.component.d.ts +17 -18
- package/lib/figma/geo-table/geo-table.component.d.ts +58 -62
- package/lib/figma/geo-tabs/geo-tabs.component.d.ts +14 -17
- package/lib/figma/geo-textarea/geo-textarea.component.d.ts +15 -13
- package/lib/figma/geo-toast/geo-toast.component.d.ts +11 -12
- package/lib/figma/geo-tree/geo-tree.component.d.ts +8 -13
- package/lib/figma/geo-typography/geo-typography.component.d.ts +13 -13
- package/lib/figma/geo-upload/geo-upload.component.d.ts +26 -28
- package/lib/figma/index.d.ts +49 -0
- package/lib/styles/tokens.d.ts +56 -23
- package/package.json +4 -2
- package/src/lib/figma/geo-map/assets/toolbar/fullscreen.svg +8 -0
- package/src/lib/figma/geo-map/assets/toolbar/home.svg +3 -0
- package/src/lib/figma/geo-map/assets/toolbar/layers.svg +3 -0
- package/src/lib/figma/geo-map/assets/toolbar/measure-area.svg +12 -0
- package/src/lib/figma/geo-map/assets/toolbar/measure-distance.svg +5 -0
- package/src/lib/figma/geo-map/assets/toolbar/pan.svg +13 -0
- package/src/lib/figma/geo-map/assets/toolbar/search.svg +3 -0
- package/src/lib/figma/geo-map/assets/toolbar/zoom-in.svg +3 -0
- package/src/lib/figma/geo-map/assets/toolbar/zoom-out.svg +5 -0
- package/src/lib/styles/design-tokens.scss +108 -35
- package/src/lib/styles/scrollbar.scss +2 -2
- package/src/lib/styles/theme.scss +1 -1
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-alert
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoAlertComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
4
6
|
|
|
5
7
|
## Summary
|
|
6
8
|
Inline alert banner (success/error/warning/info).
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoAlertComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoAlertComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-alert`
|
|
@@ -24,33 +31,80 @@ Form-level or page-level status messages that stay in layout.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Transient notifications — use geo-toast / GeoToastService.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Hiển thị banner trạng thái cố định trong layout (form/page). Dùng type success|error|warning|info; đóng qua closable + (closed).
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
Standalone component — drive via Inputs (`input()` / `model()`) and Outputs (`output()`). Banana bindings work for any `model()` fields (e.g. `[(open)]`, `[(pageIndex)]`).
|
|
41
|
+
|
|
27
42
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `type` | `'success' \| 'error' \| 'warning' \| 'info'` | `'info'` | — |
|
|
49
|
+
| `title` | `string` | `''` | — |
|
|
50
|
+
| `message` | `string` | `''` | — |
|
|
51
|
+
| `closable` | `boolean` | `true` | — |
|
|
52
|
+
| `visible` | `boolean` | `true` | Two-way `model()` (supports banana binding). |
|
|
53
|
+
| `showIcon` | `boolean` | `true` | — |
|
|
36
54
|
|
|
37
55
|
## Outputs
|
|
38
|
-
| Output | Notes |
|
|
39
|
-
|--------|-------|
|
|
40
|
-
| `closed` | EventEmitter |
|
|
41
56
|
|
|
42
|
-
|
|
57
|
+
| Output | Payload | Description |
|
|
58
|
+
|--------|---------|-------------|
|
|
59
|
+
| `closed` | `OutputEmitterRef<void>` | — |
|
|
60
|
+
|
|
61
|
+
## Related types
|
|
62
|
+
|
|
63
|
+
From `figma/geo-alert/geo-alert.types.ts`:
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
export type GeoAlertType = 'success' | 'error' | 'warning' | 'info';
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Examples
|
|
70
|
+
|
|
71
|
+
### Basic
|
|
72
|
+
|
|
43
73
|
```html
|
|
44
|
-
<geo-alert type="success" title="Thành công" message="Đã lưu
|
|
74
|
+
<geo-alert type="success" title="Thành công" message="Đã lưu hồ sơ."></geo-alert>
|
|
45
75
|
```
|
|
46
76
|
|
|
77
|
+
### Full options
|
|
78
|
+
|
|
79
|
+
```html
|
|
80
|
+
<geo-alert
|
|
81
|
+
type="warning"
|
|
82
|
+
title="Cảnh báo"
|
|
83
|
+
message="Vui lòng kiểm tra lại thông tin trước khi gửi."
|
|
84
|
+
[closable]="true"
|
|
85
|
+
[visible]="showAlert"
|
|
86
|
+
[showIcon]="true"
|
|
87
|
+
(closed)="showAlert = false"
|
|
88
|
+
></geo-alert>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Tips
|
|
92
|
+
|
|
93
|
+
- Toast tạm thời → GeoToastService / geo-toast; alert là inline persistent.
|
|
94
|
+
- Gắn [visible] nếu cần ẩn/hiện từ component cha.
|
|
95
|
+
- title + message dùng tiếng Việt ngắn gọn.
|
|
96
|
+
## Related components
|
|
97
|
+
|
|
98
|
+
- [`geo-toast`](./geo-toast.md)
|
|
99
|
+
- [`geo-icon`](./geo-icon.md)
|
|
100
|
+
## Package path
|
|
101
|
+
`node_modules/@geoit/ui/ai/components/geo-alert.md`
|
|
102
|
+
|
|
47
103
|
## Source
|
|
48
104
|
`projects/geo-ui/src/lib/figma/geo-alert/geo-alert.component.ts`
|
|
49
105
|
|
|
50
|
-
##
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## Rules for AI
|
|
54
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
106
|
+
## Rules for AI / consumers
|
|
107
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
55
108
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
56
|
-
- Match props to
|
|
109
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
110
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-back-button
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoBackButtonComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
4
6
|
|
|
5
7
|
## Summary
|
|
6
8
|
Back navigation control (history or custom click).
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoBackButtonComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoBackButtonComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-back-button`
|
|
@@ -24,31 +31,70 @@ Detail/edit pages that return to a list.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Primary CTA — use geo-button.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Nút quay lại trên trang chi tiết/sửa. Mặc định historyBack=true; hoặc lắng nghe (clicked) để điều hướng tùy chỉnh.
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
Standalone component — drive via Inputs (`input()` / `model()`) and Outputs (`output()`). Banana bindings work for any `model()` fields (e.g. `[(open)]`, `[(pageIndex)]`).
|
|
41
|
+
|
|
27
42
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `ariaLabel` | `string` | `'Quay lại'` | — |
|
|
49
|
+
| `title` | `string` | `'Quay lại'` | — |
|
|
50
|
+
| `disabled` | `boolean` | `false` | — |
|
|
51
|
+
| `historyBack` | `boolean` | `true` | `true` (mặc định): `Location.back()` — về trang trước trong history. |
|
|
34
52
|
|
|
35
53
|
## Outputs
|
|
36
|
-
| Output | Notes |
|
|
37
|
-
|--------|-------|
|
|
38
|
-
| `clicked` | EventEmitter |
|
|
39
54
|
|
|
40
|
-
|
|
55
|
+
| Output | Payload | Description |
|
|
56
|
+
|--------|---------|-------------|
|
|
57
|
+
| `clicked` | `OutputEmitterRef<MouseEvent>` | — |
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
|
|
62
|
+
### Basic
|
|
63
|
+
|
|
41
64
|
```html
|
|
42
65
|
<geo-back-button (clicked)="goBack()"></geo-back-button>
|
|
43
66
|
```
|
|
44
67
|
|
|
68
|
+
### Full options
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<geo-back-button
|
|
72
|
+
title="Quay lại danh sách"
|
|
73
|
+
ariaLabel="Quay lại danh sách"
|
|
74
|
+
[historyBack]="false"
|
|
75
|
+
[disabled]="saving"
|
|
76
|
+
(clicked)="router.navigate(['/danh-sach'])"
|
|
77
|
+
></geo-back-button>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Tips
|
|
81
|
+
|
|
82
|
+
- CTA chính → geo-button, không dùng back-button.
|
|
83
|
+
- Đặt title/ariaLabel tiếng Việt (mặc định 'Quay lại').
|
|
84
|
+
- Tắt historyBack và xử lý (clicked) khi dùng router.navigate.
|
|
85
|
+
## Related components
|
|
86
|
+
|
|
87
|
+
- [`geo-button`](./geo-button.md)
|
|
88
|
+
- [`geo-page-title`](./geo-page-title.md)
|
|
89
|
+
- [`geo-breadcrumb`](./geo-breadcrumb.md)
|
|
90
|
+
## Package path
|
|
91
|
+
`node_modules/@geoit/ui/ai/components/geo-back-button.md`
|
|
92
|
+
|
|
45
93
|
## Source
|
|
46
94
|
`projects/geo-ui/src/lib/figma/geo-back-button/geo-back-button.component.ts`
|
|
47
95
|
|
|
48
|
-
##
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Rules for AI
|
|
52
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
96
|
+
## Rules for AI / consumers
|
|
97
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
53
98
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
54
|
-
- Match props to
|
|
99
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
100
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-breadcrumb
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoBreadcrumbComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
4
6
|
|
|
5
7
|
## Summary
|
|
6
8
|
Breadcrumb trail; last item active (primary).
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoBreadcrumbComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoBreadcrumbComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-breadcrumb`
|
|
@@ -24,15 +31,47 @@ Page hierarchy under page title.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Primary navigation / sidebar menus.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Đường dẫn phân cấp trang. Truyền [items] dạng { label, link? }; mục cuối là active (không cần link).
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
Standalone component — drive via Inputs (`input()` / `model()`) and Outputs (`output()`). Banana bindings work for any `model()` fields (e.g. `[(open)]`, `[(pageIndex)]`).
|
|
41
|
+
|
|
27
42
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `items` | `GeoBreadcrumbItem[]` | `[]` | — |
|
|
31
49
|
|
|
32
50
|
## Outputs
|
|
51
|
+
|
|
33
52
|
_None_
|
|
34
53
|
|
|
35
|
-
##
|
|
54
|
+
## Related types
|
|
55
|
+
|
|
56
|
+
From `figma/geo-breadcrumb/geo-breadcrumb.types.ts`:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
export interface GeoBreadcrumbItem {
|
|
60
|
+
/** Hiển thị trên breadcrumb. */
|
|
61
|
+
label: string;
|
|
62
|
+
/** Router link (optional) — bỏ trống = không phải link. */
|
|
63
|
+
link?: string | string[];
|
|
64
|
+
/** Query params khi dùng routerLink. */
|
|
65
|
+
queryParams?: Record<string, string | number | boolean>;
|
|
66
|
+
/** Đánh dấu item hiện tại (thường là item cuối). */
|
|
67
|
+
active?: boolean;
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Examples
|
|
72
|
+
|
|
73
|
+
### Basic
|
|
74
|
+
|
|
36
75
|
```html
|
|
37
76
|
<geo-breadcrumb [items]="[
|
|
38
77
|
{ label: 'Trang chủ', link: '/' },
|
|
@@ -40,13 +79,33 @@ _None_
|
|
|
40
79
|
]"></geo-breadcrumb>
|
|
41
80
|
```
|
|
42
81
|
|
|
82
|
+
### Full options
|
|
83
|
+
|
|
84
|
+
```html
|
|
85
|
+
<geo-breadcrumb [items]="[
|
|
86
|
+
{ label: 'Trang chủ', link: '/' },
|
|
87
|
+
{ label: 'Tra cứu hồ sơ', link: '/tra-cuu' },
|
|
88
|
+
{ label: 'Xem chi tiết hồ sơ' }
|
|
89
|
+
]"></geo-breadcrumb>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Tips
|
|
93
|
+
|
|
94
|
+
- Thường đặt trên geo-page-title.
|
|
95
|
+
- Không dùng cho menu sidebar.
|
|
96
|
+
- label tiếng Việt; link là route path.
|
|
97
|
+
## Related components
|
|
98
|
+
|
|
99
|
+
- [`geo-page-title`](./geo-page-title.md)
|
|
100
|
+
- [`geo-back-button`](./geo-back-button.md)
|
|
101
|
+
## Package path
|
|
102
|
+
`node_modules/@geoit/ui/ai/components/geo-breadcrumb.md`
|
|
103
|
+
|
|
43
104
|
## Source
|
|
44
105
|
`projects/geo-ui/src/lib/figma/geo-breadcrumb/geo-breadcrumb.component.ts`
|
|
45
106
|
|
|
46
|
-
##
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## Rules for AI
|
|
50
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
107
|
+
## Rules for AI / consumers
|
|
108
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
51
109
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
52
|
-
- Match props to
|
|
110
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
111
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-button
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoButtonComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
4
6
|
|
|
5
7
|
## Summary
|
|
6
8
|
Primary action button with brand/semantic colors and icons.
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoButtonComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoButtonComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-button`
|
|
@@ -24,40 +31,96 @@ All CTAs, form submit/cancel, toolbar actions.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Do not use raw ant-btn or native button for branded UI.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
CTA chính của GEO UI. appearance primary|secondary|tertiary; color brand|danger|warning|success; icon Ant Design qua [icon].
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
Standalone component — drive via Inputs (`input()` / `model()`) and Outputs (`output()`). Banana bindings work for any `model()` fields (e.g. `[(open)]`, `[(pageIndex)]`).
|
|
41
|
+
|
|
27
42
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `appearance` | `'primary' \| 'secondary' \| 'tertiary'` | `'primary'` | — |
|
|
49
|
+
| `color` | `'brand' \| 'danger' \| 'warning' \| 'success'` | `'brand'` | — |
|
|
50
|
+
| `icon` | `string \| undefined` | `undefined` | — |
|
|
51
|
+
| `iconTheme` | `'outline' \| 'fill' \| 'twotone'` | `'outline'` | — |
|
|
52
|
+
| `iconPlacement` | `'start' \| 'end'` | `'start'` | Vị trí icon: `start` (trái) hoặc `end` (phải). |
|
|
53
|
+
| `iconOnly` | `boolean` | `false` | — |
|
|
54
|
+
| `type` | `'button' \| 'submit'` | `'button'` | — |
|
|
55
|
+
| `disabled` | `boolean` | `false` | — |
|
|
56
|
+
| `tooltip` | `string` | `''` | Tooltip Ant Design (`nz-tooltip`). Ưu tiên hơn `title` native. |
|
|
57
|
+
| `tooltipPlacement` | `'top' \| 'left' \| 'right' \| 'bottom' \| 'topLeft' \| 'topRight' \| 'bottomLeft' \| 'bottomRight' \| 'le…` | `'top'` | — |
|
|
58
|
+
| `active` | `boolean` | `false` | Trạng thái active (vd. toolbar toggle đang bật). |
|
|
59
|
+
| `title` | `string` | `''` | Native `title` — fallback khi không set `tooltip`. |
|
|
42
60
|
|
|
43
61
|
## Outputs
|
|
44
|
-
| Output | Notes |
|
|
45
|
-
|--------|-------|
|
|
46
|
-
| `clicked` | EventEmitter |
|
|
47
62
|
|
|
48
|
-
|
|
63
|
+
| Output | Payload | Description |
|
|
64
|
+
|--------|---------|-------------|
|
|
65
|
+
| `clicked` | `OutputEmitterRef<MouseEvent>` | — |
|
|
66
|
+
|
|
67
|
+
## Related types
|
|
68
|
+
|
|
69
|
+
From `figma/geo-button/geo-button.types.ts`:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
export type GeoButtonAppearance = 'primary' | 'secondary' | 'tertiary';
|
|
73
|
+
|
|
74
|
+
export type GeoButtonColor = 'brand' | 'danger' | 'warning' | 'success';
|
|
75
|
+
|
|
76
|
+
export type GeoButtonTooltipPlacement = 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Examples
|
|
80
|
+
|
|
81
|
+
### Basic
|
|
82
|
+
|
|
49
83
|
```html
|
|
50
84
|
<geo-button appearance="primary" color="brand" icon="plus">Thêm mới</geo-button>
|
|
51
|
-
<geo-button appearance="primary" icon="right" iconPlacement="end">Tiếp theo</geo-button>
|
|
52
85
|
```
|
|
53
86
|
|
|
87
|
+
### Full options
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<geo-button
|
|
91
|
+
appearance="primary"
|
|
92
|
+
color="brand"
|
|
93
|
+
icon="right"
|
|
94
|
+
iconTheme="outline"
|
|
95
|
+
iconPlacement="end"
|
|
96
|
+
type="submit"
|
|
97
|
+
tooltip="Lưu và tiếp tục"
|
|
98
|
+
tooltipPlacement="top"
|
|
99
|
+
[disabled]="saving"
|
|
100
|
+
(clicked)="onSave()"
|
|
101
|
+
>Tiếp theo</geo-button>
|
|
102
|
+
|
|
103
|
+
<geo-button appearance="secondary" color="danger" icon="delete" [iconOnly]="true" tooltip="Xóa"></geo-button>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Tips
|
|
107
|
+
|
|
108
|
+
- Không dùng ant-btn / <button> raw cho UI brand.
|
|
109
|
+
- iconPlacement start|end; iconOnly cho toolbar icon.
|
|
110
|
+
- Dùng tooltip thay title native khi cần hover text.
|
|
111
|
+
## Related components
|
|
112
|
+
|
|
113
|
+
- [`geo-icon`](./geo-icon.md)
|
|
114
|
+
- [`geo-form-modal`](./geo-form-modal.md)
|
|
115
|
+
- [`geo-confirm-modal`](./geo-confirm-modal.md)
|
|
116
|
+
## Package path
|
|
117
|
+
`node_modules/@geoit/ui/ai/components/geo-button.md`
|
|
118
|
+
|
|
54
119
|
## Source
|
|
55
120
|
`projects/geo-ui/src/lib/figma/geo-button/geo-button.component.ts`
|
|
56
121
|
|
|
57
|
-
##
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## Rules for AI
|
|
61
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
122
|
+
## Rules for AI / consumers
|
|
123
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
62
124
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
63
|
-
- Match props to
|
|
125
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
126
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# geo-chart
|
|
2
|
+
|
|
3
|
+
> Complete usage reference for **GeoChartComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
6
|
+
|
|
7
|
+
## Summary
|
|
8
|
+
GeoChartComponent
|
|
9
|
+
|
|
10
|
+
## Import
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { GeoChartComponent } from '@geoit/ui';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoChartComponent]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Selector
|
|
23
|
+
`geo-chart`
|
|
24
|
+
|
|
25
|
+
## Category
|
|
26
|
+
`other`
|
|
27
|
+
|
|
28
|
+
## When to use
|
|
29
|
+
—
|
|
30
|
+
|
|
31
|
+
## Do not use when
|
|
32
|
+
—
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Binding
|
|
36
|
+
|
|
37
|
+
Standalone component — drive via Inputs (`input()` / `model()`) and Outputs (`output()`). Banana bindings work for any `model()` fields (e.g. `[(open)]`, `[(pageIndex)]`).
|
|
38
|
+
|
|
39
|
+
## Inputs
|
|
40
|
+
|
|
41
|
+
Every supported Input (do not invent others):
|
|
42
|
+
|
|
43
|
+
| Input | Type | Default | Description |
|
|
44
|
+
|-------|------|---------|-------------|
|
|
45
|
+
| `type` | `'bar' \| 'donut'` | `'bar'` | — |
|
|
46
|
+
| `title` | `string` | `''` | — |
|
|
47
|
+
| `data` | `GeoChartDatum[]` | `[]` | — |
|
|
48
|
+
| `height` | `number` | `260` | — |
|
|
49
|
+
| `showLegend` | `boolean` | `true` | — |
|
|
50
|
+
| `showSort` | `boolean` | `false` | — |
|
|
51
|
+
| `sort` | `'none' \| 'asc' \| 'desc'` | `'desc'` | Two-way `model()` (supports banana binding). |
|
|
52
|
+
| `emptyText` | `string` | `'Chưa có dữ liệu thống kê.'` | — |
|
|
53
|
+
| `unit` | `string` | `''` | — |
|
|
54
|
+
|
|
55
|
+
## Outputs
|
|
56
|
+
|
|
57
|
+
| Output | Payload | Description |
|
|
58
|
+
|--------|---------|-------------|
|
|
59
|
+
| `segmentClick` | `OutputEmitterRef<GeoChartSegmentClick>` | — |
|
|
60
|
+
| `sortChange` | `OutputEmitterRef<'none' \| 'asc' \| 'desc'>` | — |
|
|
61
|
+
|
|
62
|
+
## Related types
|
|
63
|
+
|
|
64
|
+
From `figma/geo-chart/geo-chart.types.ts`:
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
export interface GeoChartDatum {
|
|
68
|
+
id?: string;
|
|
69
|
+
label: string;
|
|
70
|
+
value: number;
|
|
71
|
+
/** Optional CSS color; prefer design tokens when possible. */
|
|
72
|
+
color?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface GeoChartSegmentClick {
|
|
76
|
+
datum: GeoChartDatum;
|
|
77
|
+
index: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type GeoChartType = 'bar' | 'donut';
|
|
81
|
+
|
|
82
|
+
export type GeoChartSort = 'none' | 'asc' | 'desc';
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Examples
|
|
86
|
+
|
|
87
|
+
### Example
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<geo-chart></geo-chart>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Package path
|
|
94
|
+
`node_modules/@geoit/ui/ai/components/geo-chart.md`
|
|
95
|
+
|
|
96
|
+
## Source
|
|
97
|
+
`projects/geo-ui/src/lib/figma/geo-chart/geo-chart.component.ts`
|
|
98
|
+
|
|
99
|
+
## Rules for AI / consumers
|
|
100
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
101
|
+
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
102
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
103
|
+
- Copy examples and adapt labels/bindings only.
|