@3ddv/software-division-components 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dvm/neighbors/neighbors.component.d.ts +41 -0
- package/dvm/neighbors/neighbors.component.d.ts.map +1 -0
- package/dvm/neighbors/public-api.d.ts +3 -0
- package/{dist/dvm → dvm}/neighbors/public-api.d.ts.map +1 -1
- package/{dist/dvm → dvm}/neighbors/types.d.ts +6 -0
- package/{dist/dvm → dvm}/neighbors/types.d.ts.map +1 -1
- package/dvm/popover/base-popover.component.d.ts +28 -0
- package/dvm/popover/base-popover.component.d.ts.map +1 -0
- package/dvm/popover/popover.component.d.ts +69 -0
- package/dvm/popover/popover.component.d.ts.map +1 -0
- package/{dist/dvm → dvm}/popover/popover.config.d.ts +7 -2
- package/dvm/popover/popover.config.d.ts.map +1 -0
- package/{dist/dvm → dvm}/popover/popover.service.d.ts +57 -2
- package/dvm/popover/popover.service.d.ts.map +1 -0
- package/dvm/popover/public-api.d.ts +11 -0
- package/dvm/popover/public-api.d.ts.map +1 -0
- package/dvm/popover/seat-popover/seat-popover.component.d.ts +21 -0
- package/dvm/popover/seat-popover/seat-popover.component.d.ts.map +1 -0
- package/dvm/popover/section-popover/section-popover.component.d.ts +32 -0
- package/dvm/popover/section-popover/section-popover.component.d.ts.map +1 -0
- package/dvm/popover/services/dvm-popover-positioner.service.d.ts +30 -0
- package/dvm/popover/services/dvm-popover-positioner.service.d.ts.map +1 -0
- package/dvm/popover/services/popover-manager.service.d.ts +29 -0
- package/dvm/popover/services/popover-manager.service.d.ts.map +1 -0
- package/dvm/popover/transformers/base-popover-data-transformer.d.ts +29 -0
- package/dvm/popover/transformers/base-popover-data-transformer.d.ts.map +1 -0
- package/dvm/popover/types.d.ts +79 -0
- package/dvm/popover/types.d.ts.map +1 -0
- package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components.mjs +1009 -356
- package/fesm2022/3ddv-software-division-components.mjs.map +1 -0
- package/package.json +180 -130
- package/{dist/styles.css → styles.css} +1 -1
- package/README.backup.md +0 -575
- package/dist/README.md +0 -575
- package/dist/dvm/neighbors/neighbors.component.d.ts +0 -45
- package/dist/dvm/neighbors/neighbors.component.d.ts.map +0 -1
- package/dist/dvm/neighbors/public-api.d.ts +0 -3
- package/dist/dvm/popover/popover.component.d.ts +0 -39
- package/dist/dvm/popover/popover.component.d.ts.map +0 -1
- package/dist/dvm/popover/popover.config.d.ts.map +0 -1
- package/dist/dvm/popover/popover.service.d.ts.map +0 -1
- package/dist/dvm/popover/public-api.d.ts +0 -5
- package/dist/dvm/popover/public-api.d.ts.map +0 -1
- package/dist/dvm/popover/types.d.ts +0 -33
- package/dist/dvm/popover/types.d.ts.map +0 -1
- package/dist/fesm2022/3ddv-software-division-components.mjs.map +0 -1
- /package/{dist/3ddv-software-division-components.d.ts.map → 3ddv-software-division-components.d.ts.map} +0 -0
- /package/{dist/backoffice → backoffice}/checkbox/checkbox.component.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/checkbox/checkbox.component.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/checkbox/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/checkbox/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/checkbox/public-api.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/checkbox/public-api.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/datepicker.component.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/datepicker.component.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/public-api.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/public-api.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-calendar-helm/src/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-calendar-helm/src/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-calendar-helm/src/lib/hlm-calendar-multi.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-calendar-helm/src/lib/hlm-calendar-multi.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-calendar-helm/src/lib/hlm-calendar.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-calendar-helm/src/lib/hlm-calendar.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-date-picker-helm/src/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-date-picker-helm/src/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker-multi.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker-multi.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker-multi.token.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker-multi.token.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker.token.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker.token.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-icon-helm/src/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-icon-helm/src/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-icon-helm/src/lib/hlm-icon.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-icon-helm/src/lib/hlm-icon.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-icon-helm/src/lib/hlm-icon.token.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-icon-helm/src/lib/hlm-icon.token.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-popover-helm/src/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-popover-helm/src/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-popover-helm/src/lib/hlm-popover-close.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-popover-helm/src/lib/hlm-popover-close.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-popover-helm/src/lib/hlm-popover-content.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/datepicker/ui/ui-popover-helm/src/lib/hlm-popover-content.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/input/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/input/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/input/input.component.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/input/input.component.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/input/public-api.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/input/public-api.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/public-api.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/public-api.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/radio/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/radio/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/radio/public-api.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/radio/public-api.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/radio/radio.component.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/radio/radio.component.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/_components/pagination/pagination.component.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/_components/pagination/pagination.component.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/_components/selection-table-head/selection-table-head.component.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/_components/selection-table-head/selection-table-head.component.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/_components/selection-table-row/selection-table-row.component.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/_components/selection-table-row/selection-table-row.component.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/_components/sort-header-button/sort-header-button.component.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/_components/sort-header-button/sort-header-button.component.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/public-api.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/public-api.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/table.component.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/table.component.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/ui/ui-icon-helm/src/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/ui/ui-icon-helm/src/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/ui/ui-icon-helm/src/lib/hlm-icon.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/ui/ui-icon-helm/src/lib/hlm-icon.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/ui/ui-icon-helm/src/lib/hlm-icon.token.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/ui/ui-icon-helm/src/lib/hlm-icon.token.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/ui/ui-table-helm/src/index.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/ui/ui-table-helm/src/index.d.ts.map +0 -0
- /package/{dist/backoffice → backoffice}/table/ui/ui-table-helm/src/lib/hlm-table.d.ts +0 -0
- /package/{dist/backoffice → backoffice}/table/ui/ui-table-helm/src/lib/hlm-table.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/cart/cart.component.d.ts +0 -0
- /package/{dist/dvm → dvm}/cart/cart.component.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/cart/cart.service.d.ts +0 -0
- /package/{dist/dvm → dvm}/cart/cart.service.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/cart/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/cart/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/cart/public-api.d.ts +0 -0
- /package/{dist/dvm → dvm}/cart/public-api.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/cart-item/cart-item.component.d.ts +0 -0
- /package/{dist/dvm → dvm}/cart-item/cart-item.component.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/cart-item/cart-item.service.d.ts +0 -0
- /package/{dist/dvm → dvm}/cart-item/cart-item.service.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/cart-item/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/cart-item/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/cart-item/public-api.d.ts +0 -0
- /package/{dist/dvm → dvm}/cart-item/public-api.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/legend/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/legend/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/legend/legend.component.d.ts +0 -0
- /package/{dist/dvm → dvm}/legend/legend.component.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/legend/public-api.d.ts +0 -0
- /package/{dist/dvm → dvm}/legend/public-api.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/legend/types.d.ts +0 -0
- /package/{dist/dvm → dvm}/legend/types.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/legend/ui/legend-elements/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/legend/ui/legend-elements/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/legend/ui/legend-elements/legend-elements.component.d.ts +0 -0
- /package/{dist/dvm → dvm}/legend/ui/legend-elements/legend-elements.component.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/loader/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/loader/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/loader/loader.component.d.ts +0 -0
- /package/{dist/dvm → dvm}/loader/loader.component.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/loader/loader.service.d.ts +0 -0
- /package/{dist/dvm → dvm}/loader/loader.service.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/loader/public-api.d.ts +0 -0
- /package/{dist/dvm → dvm}/loader/public-api.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/map-loader/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/map-loader/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/map-loader/map-loader.component.d.ts +0 -0
- /package/{dist/dvm → dvm}/map-loader/map-loader.component.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/map-loader/public-api.d.ts +0 -0
- /package/{dist/dvm → dvm}/map-loader/public-api.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/neighbors/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/neighbors/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/popover/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/popover/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/public-api.d.ts +0 -0
- /package/{dist/dvm → dvm}/public-api.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/stepper/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/stepper/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/stepper/public-api.d.ts +0 -0
- /package/{dist/dvm → dvm}/stepper/public-api.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/stepper/stepper.component.d.ts +0 -0
- /package/{dist/dvm → dvm}/stepper/stepper.component.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/stepper/types.d.ts +0 -0
- /package/{dist/dvm → dvm}/stepper/types.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/ticket-info-item/index.d.ts +0 -0
- /package/{dist/dvm → dvm}/ticket-info-item/index.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/ticket-info-item/public-api.d.ts +0 -0
- /package/{dist/dvm → dvm}/ticket-info-item/public-api.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/ticket-info-item/ticket-info-item.component.d.ts +0 -0
- /package/{dist/dvm → dvm}/ticket-info-item/ticket-info-item.component.d.ts.map +0 -0
- /package/{dist/dvm → dvm}/ticket-info-item/ticket-info-item.service.d.ts +0 -0
- /package/{dist/dvm → dvm}/ticket-info-item/ticket-info-item.service.d.ts.map +0 -0
- /package/{dist/generic → generic}/add-digital-wallet/add-digital-wallet.component.d.ts +0 -0
- /package/{dist/generic → generic}/add-digital-wallet/add-digital-wallet.component.d.ts.map +0 -0
- /package/{dist/generic → generic}/add-digital-wallet/index.d.ts +0 -0
- /package/{dist/generic → generic}/add-digital-wallet/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/add-digital-wallet/public-api.d.ts +0 -0
- /package/{dist/generic → generic}/add-digital-wallet/public-api.d.ts.map +0 -0
- /package/{dist/generic → generic}/braintree/braintree.component.d.ts +0 -0
- /package/{dist/generic → generic}/braintree/braintree.component.d.ts.map +0 -0
- /package/{dist/generic → generic}/braintree/index.d.ts +0 -0
- /package/{dist/generic → generic}/braintree/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/braintree/public-api.d.ts +0 -0
- /package/{dist/generic → generic}/braintree/public-api.d.ts.map +0 -0
- /package/{dist/generic → generic}/braintree/types.d.ts +0 -0
- /package/{dist/generic → generic}/braintree/types.d.ts.map +0 -0
- /package/{dist/generic → generic}/button/button.component.d.ts +0 -0
- /package/{dist/generic → generic}/button/button.component.d.ts.map +0 -0
- /package/{dist/generic → generic}/button/index.d.ts +0 -0
- /package/{dist/generic → generic}/button/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/button/public-api.d.ts +0 -0
- /package/{dist/generic → generic}/button/public-api.d.ts.map +0 -0
- /package/{dist/generic → generic}/button/ui/ui-button-helm/src/index.d.ts +0 -0
- /package/{dist/generic → generic}/button/ui/ui-button-helm/src/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/button/ui/ui-button-helm/src/lib/hlm-button.d.ts +0 -0
- /package/{dist/generic → generic}/button/ui/ui-button-helm/src/lib/hlm-button.d.ts.map +0 -0
- /package/{dist/generic → generic}/button/ui/ui-button-helm/src/lib/hlm-button.token.d.ts +0 -0
- /package/{dist/generic → generic}/button/ui/ui-button-helm/src/lib/hlm-button.token.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/dialog.component.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/dialog.component.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/index.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/index.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-close.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-close.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-content.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-content.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-description.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-description.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-footer.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-footer.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-header.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-header.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-overlay.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-overlay.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-title.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-title.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog.service.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog.service.d.ts.map +0 -0
- /package/{dist/generic → generic}/dialog/public-api.d.ts +0 -0
- /package/{dist/generic → generic}/dialog/public-api.d.ts.map +0 -0
- /package/{dist/generic → generic}/drawer/drawer.component.d.ts +0 -0
- /package/{dist/generic → generic}/drawer/drawer.component.d.ts.map +0 -0
- /package/{dist/generic → generic}/drawer/drawer.service.d.ts +0 -0
- /package/{dist/generic → generic}/drawer/drawer.service.d.ts.map +0 -0
- /package/{dist/generic → generic}/drawer/index.d.ts +0 -0
- /package/{dist/generic → generic}/drawer/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/drawer/public-api.d.ts +0 -0
- /package/{dist/generic → generic}/drawer/public-api.d.ts.map +0 -0
- /package/{dist/generic → generic}/icon/icon.component.d.ts +0 -0
- /package/{dist/generic → generic}/icon/icon.component.d.ts.map +0 -0
- /package/{dist/generic → generic}/icon/index.d.ts +0 -0
- /package/{dist/generic → generic}/icon/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/icon/lib/ui-icon-helm/src/index.d.ts +0 -0
- /package/{dist/generic → generic}/icon/lib/ui-icon-helm/src/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/icon/lib/ui-icon-helm/src/lib/hlm-icon.d.ts +0 -0
- /package/{dist/generic → generic}/icon/lib/ui-icon-helm/src/lib/hlm-icon.d.ts.map +0 -0
- /package/{dist/generic → generic}/icon/lib/ui-icon-helm/src/lib/hlm-icon.token.d.ts +0 -0
- /package/{dist/generic → generic}/icon/lib/ui-icon-helm/src/lib/hlm-icon.token.d.ts.map +0 -0
- /package/{dist/generic → generic}/icon/public-api.d.ts +0 -0
- /package/{dist/generic → generic}/icon/public-api.d.ts.map +0 -0
- /package/{dist/generic → generic}/index.d.ts +0 -0
- /package/{dist/generic → generic}/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/public-api.d.ts +0 -0
- /package/{dist/generic → generic}/public-api.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/index.d.ts +0 -0
- /package/{dist/generic → generic}/select/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-content.d.ts +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-content.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-group.d.ts +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-group.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-label.d.ts +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-label.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-option.d.ts +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-option.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-scroll-down.d.ts +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-scroll-down.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-scroll-up.d.ts +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-scroll-up.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-trigger.d.ts +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-trigger.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-value.d.ts +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select-value.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select.d.ts +0 -0
- /package/{dist/generic → generic}/select/lib/hlm-select.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/lib/index.d.ts +0 -0
- /package/{dist/generic → generic}/select/lib/index.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/public-api.d.ts +0 -0
- /package/{dist/generic → generic}/select/public-api.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/select.component.d.ts +0 -0
- /package/{dist/generic → generic}/select/select.component.d.ts.map +0 -0
- /package/{dist/generic → generic}/select/types.d.ts +0 -0
- /package/{dist/generic → generic}/select/types.d.ts.map +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/public-api.d.ts → public-api.d.ts} +0 -0
- /package/{dist/public-api.d.ts.map → public-api.d.ts.map} +0 -0
- /package/{dist/shared → shared}/declare-theme-variables/declare-theme-variables.d.ts +0 -0
- /package/{dist/shared → shared}/declare-theme-variables/declare-theme-variables.d.ts.map +0 -0
- /package/{dist/shared → shared}/declare-theme-variables/index.d.ts +0 -0
- /package/{dist/shared → shared}/declare-theme-variables/index.d.ts.map +0 -0
- /package/{dist/shared → shared}/lib-provider/config-token.d.ts +0 -0
- /package/{dist/shared → shared}/lib-provider/config-token.d.ts.map +0 -0
- /package/{dist/shared → shared}/lib-provider/index.d.ts +0 -0
- /package/{dist/shared → shared}/lib-provider/index.d.ts.map +0 -0
- /package/{dist/shared → shared}/lib-provider/provide-sdc.d.ts +0 -0
- /package/{dist/shared → shared}/lib-provider/provide-sdc.d.ts.map +0 -0
- /package/{dist/shared → shared}/lib-provider/public-api.d.ts +0 -0
- /package/{dist/shared → shared}/lib-provider/public-api.d.ts.map +0 -0
- /package/{dist/shared → shared}/screen-observer/index.d.ts +0 -0
- /package/{dist/shared → shared}/screen-observer/index.d.ts.map +0 -0
- /package/{dist/shared → shared}/screen-observer/provide-screen-observer.d.ts +0 -0
- /package/{dist/shared → shared}/screen-observer/provide-screen-observer.d.ts.map +0 -0
- /package/{dist/shared → shared}/screen-observer/screen-observer.d.ts +0 -0
- /package/{dist/shared → shared}/screen-observer/screen-observer.d.ts.map +0 -0
- /package/{dist/shared → shared}/types.d.ts +0 -0
- /package/{dist/shared → shared}/types.d.ts.map +0 -0
- /package/{dist/tailwind.config.js → tailwind.config.js} +0 -0
- /package/{dist/types → types}/sizes.type.d.ts +0 -0
- /package/{dist/types → types}/sizes.type.d.ts.map +0 -0
package/README.backup.md
DELETED
|
@@ -1,575 +0,0 @@
|
|
|
1
|
-
# **Software Division Components**
|
|
2
|
-
|
|
3
|
-
## **Overview**
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-

|
|
7
|
-
|
|
8
|
-
The Software Division Components library is a wrapper around the [SpartanNG](https://spartan.ng/documentation/introduction) component library. It enhances SpartanNG components by providing additional functionality tailored to the common requirements of applications developed within the Software Division department. It also uses [Angular](https://v18.angular.dev/) for application development and [Storybook](https://storybook.js.org/) for interactive component documentation and testing.
|
|
9
|
-
|
|
10
|
-
## **Installation**
|
|
11
|
-
|
|
12
|
-
[Refer to the dedicated docs page](./docs/installation.md)
|
|
13
|
-
|
|
14
|
-
## **Development**
|
|
15
|
-
|
|
16
|
-
### Conventions
|
|
17
|
-
|
|
18
|
-
[Refer to the dedicated docs page](./docs/conventions.md)
|
|
19
|
-
|
|
20
|
-
### Development Workflows
|
|
21
|
-
|
|
22
|
-
#### 1. Storybook Development (Recommended)
|
|
23
|
-
|
|
24
|
-
Use Storybook for isolated component development and testing:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
pnpm storybook
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
#### 2. Consumer App Integration Testing
|
|
31
|
-
|
|
32
|
-
Use the consumer app for integration testing of components in a real application context. Each component should have its own route for testing.
|
|
33
|
-
|
|
34
|
-
**Setup requires two terminals:**
|
|
35
|
-
|
|
36
|
-
**Terminal 1 - Build Library:**
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
pnpm run build:watch
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Watches for changes in the SDC library and rebuilds to the `dist/` folder.
|
|
43
|
-
|
|
44
|
-
**Terminal 2 - Watch and Restart Consumer App:**
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
pnpm run start:watch
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Watches the `dist/` folder and automatically restarts the consumer app when library changes are detected.
|
|
51
|
-
|
|
52
|
-
**Note:** The consumer app uses `file:dist` to link the SDC library locally, allowing real-time testing of library changes.
|
|
53
|
-
|
|
54
|
-
**Note:** This workflow was implemented because we couldn't find a better way to automatically update the library dependencies in the dev server. The current approach ensures fresh dependencies are loaded with each restart.
|
|
55
|
-
|
|
56
|
-
## **Reporting issues**
|
|
57
|
-
|
|
58
|
-
> **Note: This is a temporary workflow for reporting issues. As the usage of the library increases, we will reassess and scale the issue reporting system accordingly.**
|
|
59
|
-
|
|
60
|
-
To report an issue, please visit [the following ticket](https://mmcbcn.atlassian.net/browse/TICKETING-598) and create a **Bug** ticket. Ensure that your report includes a clear and detailed description of the issue you are encountering..
|
|
61
|
-
|
|
62
|
-
## **Project summary**
|
|
63
|
-
|
|
64
|
-
The source folder of this project contains multiple subfolders. Below are the most important ones:
|
|
65
|
-
|
|
66
|
-
- **Backoffice**
|
|
67
|
-
This folder contains components that are **exclusive to the backoffice setting**, such as tables or sidebars. These components do **not** receive any styling from the theme class passed on initialization (be it `generic` or `backoffice`).
|
|
68
|
-
|
|
69
|
-
Some components from the Generic folder can also be used in the backoffice, but in such cases, the backoffice theme must be passed to the library provider. This ensures that no additional styles are applied, keeping the default SpartanNG design intact.
|
|
70
|
-
|
|
71
|
-
- **DVM**
|
|
72
|
-
This folder includes components specific to applications that use **DVM**. Many of these components share both style and functionality, and this module is designed to **maximize reusability**. Examples include the **section navigator buttons** and the **minimap**.
|
|
73
|
-
|
|
74
|
-
- **Generic**
|
|
75
|
-
This folder contains components which can be used in **any** setting. The appearance of these components relies heavily on the parameter that is passed to the library provider (generic or backoffice).
|
|
76
|
-
|
|
77
|
-
- **Shared**
|
|
78
|
-
This folder contains **initialization methods, directives and shared utilities, which are exposed to the library API**, like methods to aid with the usage of the library or debugging of the library.
|
|
79
|
-
|
|
80
|
-
- **Utils**
|
|
81
|
-
This folder contains **internal tools** which can also be shared across the library, but this is more directed to functions used by the developer to **streamline processes and reuse common logic**.
|
|
82
|
-
|
|
83
|
-
## **Common library errors**
|
|
84
|
-
|
|
85
|
-
**❌ Error: `Invalid CSS class string found on ...`**
|
|
86
|
-
|
|
87
|
-
This indicates that the `stylesClasses` input that you provided to the component does not have a valid format.
|
|
88
|
-
|
|
89
|
-
**✅ Solution:**
|
|
90
|
-
Ensure that the value assigned to `styleClasses` follows the correct format as documented in the respective component's guidelines.
|
|
91
|
-
|
|
92
|
-
If the issue persists, refer to the documentation or check for any unintended modifications in the `styleClasses` input.
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
> Any future errors will be documented here
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## **How to use the library from the consuming application**
|
|
101
|
-
|
|
102
|
-
### Importing the library
|
|
103
|
-
|
|
104
|
-
#### Providing the library to the application
|
|
105
|
-
|
|
106
|
-
```ts
|
|
107
|
-
import { ApplicationConfig } from '@angular/core';
|
|
108
|
-
import { provideSdc } from '@3ddv/software-division-components';
|
|
109
|
-
|
|
110
|
-
export const appConfig: ApplicationConfig = {
|
|
111
|
-
// this provides the consuming app with all necessary modules
|
|
112
|
-
// to make it work
|
|
113
|
-
providers: [provideSdc({ theme: 'generic' })],
|
|
114
|
-
};
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
#### Import from main entry
|
|
118
|
-
|
|
119
|
-
```ts
|
|
120
|
-
import { TableComponent, ButtonComponent } from '@3ddv/software-division-components';
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
#### Import from secondary entry
|
|
124
|
-
|
|
125
|
-
```ts
|
|
126
|
-
import { ButtonComponent } from '@3ddv/software-division-components/generic/button';
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Theming and styling
|
|
130
|
-
|
|
131
|
-
This library is a wrapper to an already existing component library (SpartanNG), which means that there are some styles that are already present in all the exported components. These styles are kept intact whenever the `backoffice` theme parameter is passed to the `provideSdc` method. You also have the option of passing the `generic` parameter, which in turn makes the component align to the design that several ticketing applications share. If no parameter is passed, the `generic` is assigned as a fallback option. You can check that design [here](https://xd.adobe.com/view/0ea7033e-8fdf-4fcd-8215-546d1df20d37-5bf4/), [here](https://xd.adobe.com/view/c640d5a1-b5d3-4379-8684-fb860f95f052-9313/grid) and [here](https://xd.adobe.com/view/50a2d5c5-e2e1-413f-b7a5-8f3d61c88026-05f1/screen/65dee679-9942-4a63-b790-40e3b1fec39b/).
|
|
132
|
-
|
|
133
|
-
Styling components consist of passing down CSS classes that consist of SpartanNG variables. Go by as if you were styling a common HTML element. Every component has a `styleClasses` input which accepts a single or several whitespace-separated CSS class/classes declared within the using application. To see the variables that each component has, please check the official PrimeNG documentation per each component. Here you can see an example for the (button component)[https://spartan.ng/components/button]. The column _Variable_ includes every single class that you can use within the your CSS classes which you will later pass into the library button to style it. The result looks as follows:
|
|
134
|
-
|
|
135
|
-
```css
|
|
136
|
-
.my-class {
|
|
137
|
-
--p-button-primary-background: red;
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
```html
|
|
142
|
-
<sdc-button styleClasses="my-class"></sdc-button>
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
#### Specifity issues
|
|
146
|
-
|
|
147
|
-
If you are facing any specifity problems, each component also has an ID reference so you can later add them on your styles composition, giving advantage to the specifity algorithm to prioritize your styles:
|
|
148
|
-
|
|
149
|
-
```css
|
|
150
|
-
#sdc-button.my-class {
|
|
151
|
-
--p-button-primary-background: red;
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
#### Encapsulation issues
|
|
156
|
-
|
|
157
|
-
Most of the time you will be declaring your styles with a CSS file declared within the component scope (my-component.component.css) and later import it with _styleUrl_ or _stylesUrl_ in your component. In that scenario, you will be dealing with the default (component View Encapsulation)[https://angular.dev/guide/components/styling] setting, which does not allow a parent component to apply styles to the child component. This brings a problem when it comes to passing down CSS classes to the library components. Following similar practices from other component librariess, we bring the option to bypass View Encapsulation for a certain CSS class by declaring your classes with a pseudo-class selector:
|
|
158
|
-
|
|
159
|
-
Depending on the Encapsulation option that you are using in your component, some styles will not apply. In that scenario, declare the style as follows:
|
|
160
|
-
|
|
161
|
-
```css
|
|
162
|
-
::ng-deep.my-class {
|
|
163
|
-
--p-button-primary-background: red;
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
You also have the option with SCSS to nest:
|
|
168
|
-
|
|
169
|
-
```css
|
|
170
|
-
::ng-deep {
|
|
171
|
-
&.my-class-1 {
|
|
172
|
-
--p-button-primary-background: red;
|
|
173
|
-
}
|
|
174
|
-
&.my-class-2 {
|
|
175
|
-
--p-button-primary-background: green;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
&.my-class-3 {
|
|
179
|
-
--p-button-primary-background: blue;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
Or declare the style in your root stylesheet to avoid any view encapsulation to affect your custom styles. (not recommended)
|
|
185
|
-
|
|
186
|
-
#### Several styleClasses inputs
|
|
187
|
-
|
|
188
|
-
Some components are composed of several underlying components, so a single `styleClass` input will not be enough. For those scenarios, some components require the `styleClasses` paramater to be composed of an object, with each key targetting different parts of the component:
|
|
189
|
-
|
|
190
|
-
```html
|
|
191
|
-
<sdc-neighbours
|
|
192
|
-
[currentSection]="..."
|
|
193
|
-
[sectionsMmcToTdc]="..."
|
|
194
|
-
[neigboursData]="..."
|
|
195
|
-
[styleClasses]=`{
|
|
196
|
-
sideButtonsClass: 'mock-side-button',
|
|
197
|
-
middleDivClass: 'mock-middle-div'
|
|
198
|
-
}`
|
|
199
|
-
></sdc-neighbours>
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
With this method, we are able to apply certain styles for the buttons on the sides ( with `sideButtonsClass`) and a different one for the `div` on the middle of the component template (with `middleDivClass`).
|
|
203
|
-
|
|
204
|
-
Styles will pierce through the SpartanNG layer and directly style the underlying HTML element. If you are facing any problem styling any component, please check the [official PrimeNG documentation on theming](https://v18.primeng.org/theming) or the individual webpage for styling each component [as in this example for the button component](https://v18.primeng.org/button).
|
|
205
|
-
|
|
206
|
-
### What if I'm using Tailwind in my application?
|
|
207
|
-
|
|
208
|
-
Tailwind does reset most of the styles that any other third party app is applying, so SpartanNG styles will be overriden. In that scenario, the component library exposes several layers to scope this overriding as much as posible. If you are using Tailwind, declare the Tailwind reset as follows in your root stylesheet:
|
|
209
|
-
|
|
210
|
-
```css
|
|
211
|
-
@layer tailwind-base {
|
|
212
|
-
@tailwind base;
|
|
213
|
-
@tailwind components;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
@tailwind utilities;
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Passing inputs to components that have a lot of props
|
|
220
|
-
|
|
221
|
-
Besides all the documented inputs that components have, some components also have the option to pass all components in an object to end up with a more concise template markup, instead of using individual bindings.
|
|
222
|
-
|
|
223
|
-
> The components that provide this functionality are usually the ones that have a more direct representation within SpartanNG, as this is intended to solve the polution that the library creates due to it having so many inputs. An example would be the **ButtonComponent**.
|
|
224
|
-
|
|
225
|
-
This is the old markup:
|
|
226
|
-
|
|
227
|
-
```html
|
|
228
|
-
<sdc-button
|
|
229
|
-
type="button"
|
|
230
|
-
label="Hover to trigger"
|
|
231
|
-
ariaLabel="Hover to trigger"
|
|
232
|
-
tooltip="You triggered the tooltip"
|
|
233
|
-
tooltipPos="right"
|
|
234
|
-
severity="primary"
|
|
235
|
-
styleClasses="tooltip-padding" />
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
And this is the example with the configuration object:
|
|
239
|
-
|
|
240
|
-
```ts
|
|
241
|
-
import { ButtonProps } from '@3ddv/software-division-components';
|
|
242
|
-
|
|
243
|
-
class MyComponent {
|
|
244
|
-
// You can of course declare, this where it better suits your use case
|
|
245
|
-
protected props = {
|
|
246
|
-
type: 'button',
|
|
247
|
-
label: 'Hover to trigger',
|
|
248
|
-
ariaLabel: 'Hover to trigger',
|
|
249
|
-
severity: 'primary',
|
|
250
|
-
tooltip: 'You triggered the tooltip',
|
|
251
|
-
tooltipPos: 'right',
|
|
252
|
-
styleClasses: 'tooltip-padding',
|
|
253
|
-
} satisfies ButtonProps;
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
And the resulting HTML:
|
|
258
|
-
|
|
259
|
-
```html
|
|
260
|
-
<sdc-button [props]="{props}" />
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
## **How to collaborate to the library as a developer**
|
|
264
|
-
|
|
265
|
-
### Semantic versioning
|
|
266
|
-
|
|
267
|
-
This project follows semantic versioning. We release patch versions for critical bugfixes, minor versions for new features or non-essential changes, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our developer colleagues learn about the upcoming changes and get to know to not work on top of that deprecated code.
|
|
268
|
-
|
|
269
|
-
Refer to the [official manifesto](https://semver.org/) for any further information.
|
|
270
|
-
|
|
271
|
-
### Conventional commits
|
|
272
|
-
|
|
273
|
-
For managing our commit history and versioning, we follow the Conventional Commits specification. This structured format for commit messages enables us to handle our release process, making it clear when a commit introduces new features, fixes bugs, or includes breaking changes.
|
|
274
|
-
|
|
275
|
-
Refer to the [official documentation](https://www.conventionalcommits.org/en/v1.0.0/) for any further information.
|
|
276
|
-
|
|
277
|
-
#### Commit hooks
|
|
278
|
-
|
|
279
|
-
To ensure commit messages follow this format, Husky and Commitlint are used:
|
|
280
|
-
|
|
281
|
-
- Husky sets up a Git hook that runs on every commit.
|
|
282
|
-
- Commitlint checks the commit message during the commit-msg hook.
|
|
283
|
-
|
|
284
|
-
If the commit message does not adhere to the Conventional Commits format, Commitlint rejects the commit and displays an error with details on what needs to be fixed.
|
|
285
|
-
|
|
286
|
-
### Development workflow steps
|
|
287
|
-
|
|
288
|
-
- Make sure you have the latest master remote changes on your local master branch
|
|
289
|
-
|
|
290
|
-
- If no release branch is created, create one checking which version is the next one to be developed on, if there is an ongoing release branch , create a branch following the [official Conventional Commits guidelines](https://www.conventionalcommits.org/en/v1.0.0/).
|
|
291
|
-
|
|
292
|
-
- Make sure to develop on small commits which also follow the Conventional Commits guidelines.
|
|
293
|
-
|
|
294
|
-
- When you are done developing in your branch, create a pull request to the desired branch and await for any approval you might need.
|
|
295
|
-
|
|
296
|
-
> **Code that lands in the `master` branch must be compatible with the latest stable release, able to compile and functional. It may contain additional features, but no breaking changes unless a new major version bump is released. We should be able to release a new minor version from the tip of `master` branch at any time.**
|
|
297
|
-
|
|
298
|
-
- Merge the branch, navigate to the destination branch and pull the changes from the remote branch.
|
|
299
|
-
|
|
300
|
-
- Rinse and repeat.
|
|
301
|
-
|
|
302
|
-
### Documenting component files
|
|
303
|
-
|
|
304
|
-
When documenting your code changes, we use JSDoc to ensure that all JavaScript functions and components are described comprehensively. This helps maintain clarity and understandability throughout the codebase.
|
|
305
|
-
|
|
306
|
-
We also declare the accessibility scope, parameter types and return types of any function declared.
|
|
307
|
-
|
|
308
|
-
```typescript
|
|
309
|
-
/**
|
|
310
|
-
* A customizable button component built on SpartanNg Button component.
|
|
311
|
-
*
|
|
312
|
-
* This component supports various configurations, such as tooltips, badge values,
|
|
313
|
-
* and theme styles. It uses the `ThemeProviderDirective` to apply theming dynamically.
|
|
314
|
-
*
|
|
315
|
-
* @class ButtonComponent
|
|
316
|
-
* @extends {Button}
|
|
317
|
-
*/
|
|
318
|
-
@Component({
|
|
319
|
-
standalone: true,
|
|
320
|
-
selector: 'sdc-button',
|
|
321
|
-
styleUrls: ['./button.component.css'],
|
|
322
|
-
templateUrl: './button.component.html',
|
|
323
|
-
})
|
|
324
|
-
export class ButtonComponent extends Button {
|
|
325
|
-
/**
|
|
326
|
-
* Tooltip text for the button.
|
|
327
|
-
*/
|
|
328
|
-
public tooltip = input<string>('');
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Handles the click event for the button with debounce logic.
|
|
332
|
-
*
|
|
333
|
-
* This method prevents multiple rapid clicks by disabling the button
|
|
334
|
-
* for the specified debounce time. If `debounceTime` is set to 0,
|
|
335
|
-
* the button remains interactive without debounce behavior.
|
|
336
|
-
*
|
|
337
|
-
* @param event - The click event triggered by the user.
|
|
338
|
-
*/
|
|
339
|
-
public handleClick(event: MouseEvent): void {
|
|
340
|
-
// Implementation should document any steps that cannot be easily explained
|
|
341
|
-
// with variable names. Another scenario on why you would add comments includes documenting why things
|
|
342
|
-
// are done the way they are done (there might be some framework or language limitation).
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
### Internally overriding SpartanNG styles with component scope
|
|
348
|
-
|
|
349
|
-
> First of all, we would like to clarify that this is a different feature from the previously mentioned `styleClasses` feature. Style classes are thought of as a styling interface for the users of the library. This feature is to be used for developers working on component development and wanting to override any styles of PrimeNG components, so custom components adhere to the styling required.
|
|
350
|
-
|
|
351
|
-
In some cases, specially if we are developing a component placed within the `generic` scope, we will need to override any required native styles from PrimeNG to be able to adhere to the design provided by our design team.
|
|
352
|
-
|
|
353
|
-
PrimeNG provides us with a tool called [Design Tokens](https://v18.primeng.org/theming), which consists of a CSS-in-JS solution that composes a nested object which targets several styles of each component. Here is an example corresponding to the Neighbours component:
|
|
354
|
-
|
|
355
|
-
```ts
|
|
356
|
-
// Import types from PrimeNG module
|
|
357
|
-
import { ButtonDesignTokens } from '@primeng/themes/types/button';
|
|
358
|
-
|
|
359
|
-
// Create an export an object which will later by used in neighbours.components.ts
|
|
360
|
-
export const sideButtonTokens = {
|
|
361
|
-
root: {
|
|
362
|
-
primary: {
|
|
363
|
-
// Overwrite the theme variables with PrimeNG existing variables
|
|
364
|
-
// Button text
|
|
365
|
-
color: '',
|
|
366
|
-
borderColor: '{zinc.50}',
|
|
367
|
-
hoverColor: '',
|
|
368
|
-
activeColor: '',
|
|
369
|
-
// Button background
|
|
370
|
-
background: '{zinc.50}',
|
|
371
|
-
hoverBackground: '{zinc.50}',
|
|
372
|
-
activeBackground: '{zinc.50}',
|
|
373
|
-
// Button border
|
|
374
|
-
activeBorderColor: '{zinc.50}',
|
|
375
|
-
hoverBorderColor: '{zinc.50}',
|
|
376
|
-
},
|
|
377
|
-
},
|
|
378
|
-
} satisfies ButtonDesignTokens;
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
And we pass in the styles within the component template
|
|
382
|
-
|
|
383
|
-
```ts
|
|
384
|
-
import { sideButtonTokens } from './styles/side-button.tokens';
|
|
385
|
-
....
|
|
386
|
-
export class NeighboursComponent {
|
|
387
|
-
...
|
|
388
|
-
protected readonly sideButtonStyle = sideButtonTokens;
|
|
389
|
-
...
|
|
390
|
-
}
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
Template example:
|
|
394
|
-
|
|
395
|
-
```html
|
|
396
|
-
<!-- [dt] is a default input which is present in all components to declare PrimeNG design tokens -->
|
|
397
|
-
<sdc-button [dt]="sideButtonStyle" />
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
This way, we accomplished adhering to the styling that this component needed, which brings this result:
|
|
401
|
-
|
|
402
|
-
<div style="display: flex; align-items: center; gap: 20px;">
|
|
403
|
-
<div style="text-align: center;">
|
|
404
|
-
<p>Before Styling</p>
|
|
405
|
-
<img src="./projects/software-division-components/public/neighbours-before.png" alt="Before styling neighbours." width="300">
|
|
406
|
-
</div>
|
|
407
|
-
<div style="text-align: center;">
|
|
408
|
-
<p>After Styling</p>
|
|
409
|
-
<img src="./projects/software-division-components/public/neighbours-after.png" alt="After styling neighbours." width="300">
|
|
410
|
-
</div>
|
|
411
|
-
</div>
|
|
412
|
-
|
|
413
|
-
### Styling native HTML elements
|
|
414
|
-
|
|
415
|
-
For styling native HTML elements in our project, we adhere to the **Block-Element-Modifier (BEM)** methodology. This ensures that our styles remain modular, maintainable, and predictable.
|
|
416
|
-
|
|
417
|
-
#### Guidelines for Using BEM
|
|
418
|
-
|
|
419
|
-
- **Use BEM for anything that is not a design token.**
|
|
420
|
-
- Design tokens (e.g., colors, typography, spacing) should be handled via variables, custom properties, or a design system, not through BEM class names.
|
|
421
|
-
|
|
422
|
-
- **Use design tokens for everything that involves styling a native PrimeNG component.**
|
|
423
|
-
- PrimeNG components already use design tokens, so we must align with them instead of defining custom BEM classes.
|
|
424
|
-
|
|
425
|
-
- **Native HTML elements must always be styled using BEM classes.**
|
|
426
|
-
- Avoid styling elements directly by tag selectors (e.g., button {} or input {}), as this can lead to specificity conflicts and unintended side effects.
|
|
427
|
-
- **Structure your class names properly:**
|
|
428
|
-
- Use meaningful blocks that represent standalone components.
|
|
429
|
-
- Define elements as child parts of blocks.
|
|
430
|
-
- Use modifiers to indicate variations in style or behavior.
|
|
431
|
-
|
|
432
|
-
By following this approach, we ensure that:
|
|
433
|
-
|
|
434
|
-
- Styles are reusable and scoped properly.
|
|
435
|
-
- We avoid unnecessary global overrides.
|
|
436
|
-
- We maintain consistency across the project.
|
|
437
|
-
- PrimeNG components remain compatible with design tokens.
|
|
438
|
-
|
|
439
|
-
Any further information regarding the BEM methodology can be found through the following links:
|
|
440
|
-
|
|
441
|
-
- https://css-tricks.com/bem-101/
|
|
442
|
-
- https://getbem.com/introduction/
|
|
443
|
-
- https://stackoverflow.com/questions/36703546/what-is-bem-methodology
|
|
444
|
-
- https://gauravmahlawat.github.io/online-bem-generator.html#google_vignette
|
|
445
|
-
|
|
446
|
-
#### Why are we not internally using Tailwind or SCSS?
|
|
447
|
-
|
|
448
|
-
###### Why no Tailwind?
|
|
449
|
-
|
|
450
|
-
We are not internally using Tailwind because this project has the intention of having a long lifespan, we do not want to introduce an extra dependency that could cause compatibility issues among PrimeNG, Angular, and Storybook.
|
|
451
|
-
Since our project already relies on component libraries that define their own styles and classes, Tailwind’s utility-based approach could lead to conflicts and unnecessary complexity. For all we know, Tailwind is more likely to not be that popular in the near future than native CSS :).
|
|
452
|
-
|
|
453
|
-
However, we have included in the roadmap the ability to pass Tailwind classes within the `styleClasses` prop, present in most components so you can use Tailwind from your consuming application.
|
|
454
|
-
|
|
455
|
-
###### Why no SCSS?
|
|
456
|
-
|
|
457
|
-
We are not using SCSS because modern CSS now provides most of SCSS’s features natively.
|
|
458
|
-
With CSS evolving rapidly (e.g., CSS variables, nesting, container queries, @layer, @scope, and :has()), there is little need for a preprocessor like SCSS.
|
|
459
|
-
Additionally, relying on native CSS ensures:
|
|
460
|
-
|
|
461
|
-
- Better browser compatibility.
|
|
462
|
-
- No build-step dependencies.
|
|
463
|
-
- Future-proof styling that aligns with upcoming CSS standards.
|
|
464
|
-
|
|
465
|
-
### Properly exporting a newly added component
|
|
466
|
-
|
|
467
|
-
Whenever a newly added component is added, do not forget to add a secondary entrypoint to be able to uniquely import that component in the consuming app:
|
|
468
|
-
|
|
469
|
-
```json
|
|
470
|
-
"exports": {
|
|
471
|
-
".": {
|
|
472
|
-
"types": "./index.d.ts",
|
|
473
|
-
"default": "./esm2022/3ddv-software-division-components.mjs"
|
|
474
|
-
},
|
|
475
|
-
"./generic/button": {
|
|
476
|
-
"types": "./generic/button/index.d.ts",
|
|
477
|
-
"default": "./esm2022/generic/button/index.mjs"
|
|
478
|
-
},
|
|
479
|
-
"./backoffice/table": {
|
|
480
|
-
"types": "./backoffice/table/index.d.ts",
|
|
481
|
-
"default": "./esm2022/backoffice/table/index.mjs"
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
```
|
|
485
|
-
|
|
486
|
-
### Documenting and testing visual appeareance
|
|
487
|
-
|
|
488
|
-
The project uses [Storybook](https://storybook.js.org/) as a means to document and test the visual appearance of the components throughout various states and parameters combinations.
|
|
489
|
-
Storybook also aids in receiving visual feedback of the component while developing, without relying on an external application to be able to visualize the component changes. For any further information related to Storybook that is not exclusive to this project, please refer to the official documentation.
|
|
490
|
-
|
|
491
|
-
### How to use Storybook
|
|
492
|
-
|
|
493
|
-
Storybook requires a separate file to be declared along the component. When you create a new component or modify the API of any exiting component, it is very likely you will either have to create or modify this file. This contains these relevant variables.
|
|
494
|
-
|
|
495
|
-
- **Meta**:
|
|
496
|
-
This contains metadata about the component. Title declares the folder where Storybook will place the component, following a structure of FolderName/ComponentName. `Component` requires the real component constructor. `argTypes` declares the controls and its parameters used within Storybook page to modify the component in real time.
|
|
497
|
-
|
|
498
|
-
```typescript
|
|
499
|
-
const meta: Meta<ButtonComponent> = {
|
|
500
|
-
title: 'Generic/Button',
|
|
501
|
-
component: ButtonComponent,
|
|
502
|
-
id: 'Button',
|
|
503
|
-
argTypes: {
|
|
504
|
-
label: {
|
|
505
|
-
control: 'text',
|
|
506
|
-
description: 'Label of the button',
|
|
507
|
-
table: {
|
|
508
|
-
type: { summary: 'string' },
|
|
509
|
-
},
|
|
510
|
-
},
|
|
511
|
-
// other properties ...
|
|
512
|
-
},
|
|
513
|
-
};
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
- **Story** :
|
|
517
|
-
Each story represents a combination of parameters that output a different version of the component. Each story represents a combination of parameters that might be useful in common usage. All stories can be navigated and debugged separately.
|
|
518
|
-
|
|
519
|
-
```typescript
|
|
520
|
-
export const Primary: Story = {
|
|
521
|
-
args: {
|
|
522
|
-
label: 'Primary Button',
|
|
523
|
-
type: 'button',
|
|
524
|
-
disabled: false,
|
|
525
|
-
loading: false,
|
|
526
|
-
severity: 'primary',
|
|
527
|
-
rounded: true,
|
|
528
|
-
raised: true,
|
|
529
|
-
outlined: false,
|
|
530
|
-
link: false,
|
|
531
|
-
ariaLabel: 'Primary button',
|
|
532
|
-
size: 'large',
|
|
533
|
-
},
|
|
534
|
-
};
|
|
535
|
-
```
|
|
536
|
-
|
|
537
|
-
When this is done (or while you are developing the component) you can visualize it by booting up Storybook locally. Use this command:
|
|
538
|
-
|
|
539
|
-
```bash
|
|
540
|
-
pnpm run storybook
|
|
541
|
-
```
|
|
542
|
-
|
|
543
|
-
and Storybook will serve a static page to interact with your components.
|
|
544
|
-
|
|
545
|
-
### How Storybook component binding works
|
|
546
|
-
|
|
547
|
-
Define Inputs:
|
|
548
|
-
|
|
549
|
-
Inputs are exposed as arguments (args) in a story.
|
|
550
|
-
These arguments can be controlled through Storybook's UI (via the "Controls" panel).
|
|
551
|
-
Binding Inputs:
|
|
552
|
-
|
|
553
|
-
The args object is passed to the component via the props property.
|
|
554
|
-
The args keys must match the @Input property names of the component.
|
|
555
|
-
|
|
556
|
-
```typescript
|
|
557
|
-
export const WithGridlines: Story = {
|
|
558
|
-
args: {
|
|
559
|
-
value: [
|
|
560
|
-
{ id: 1, name: 'Item A' },
|
|
561
|
-
{ id: 2, name: 'Item B' },
|
|
562
|
-
], // Binds to @Input() value
|
|
563
|
-
columnData: [
|
|
564
|
-
{ field: 'id', header: 'ID' },
|
|
565
|
-
{ field: 'name', header: 'Name' },
|
|
566
|
-
], // Binds to @Input() columnData
|
|
567
|
-
showGridlines: true, // Binds to @Input() showGridlines
|
|
568
|
-
},
|
|
569
|
-
};
|
|
570
|
-
```
|
|
571
|
-
|
|
572
|
-
This will render the TableComponent with value, columnData, and showGridlines set.In the context of Storybook:
|
|
573
|
-
|
|
574
|
-
Inputs (@Input) are controlled via args and Controls.
|
|
575
|
-
Outputs (@Output) are linked to Storybook Actions, allowing you to observe and debug emitted events.
|