@3ddv/software-division-components 1.0.0-alpha.3.9 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.backup.md +575 -0
- package/README.md +332 -53
- package/dist/README.md +575 -0
- package/dist/backoffice/checkbox/checkbox.component.d.ts +103 -0
- package/dist/backoffice/checkbox/checkbox.component.d.ts.map +1 -0
- package/dist/backoffice/checkbox/index.d.ts.map +1 -0
- package/dist/backoffice/checkbox/public-api.d.ts +2 -0
- package/{backoffice/table → dist/backoffice/checkbox}/public-api.d.ts.map +1 -1
- package/dist/backoffice/datepicker/datepicker.component.d.ts +150 -0
- package/dist/backoffice/datepicker/datepicker.component.d.ts.map +1 -0
- package/dist/backoffice/datepicker/index.d.ts.map +1 -0
- package/dist/backoffice/datepicker/public-api.d.ts +2 -0
- package/dist/backoffice/datepicker/public-api.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-calendar-helm/src/index.d.ts +14 -0
- package/dist/backoffice/datepicker/ui/ui-calendar-helm/src/index.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-calendar-helm/src/lib/hlm-calendar-multi.d.ts +38 -0
- package/dist/backoffice/datepicker/ui/ui-calendar-helm/src/lib/hlm-calendar-multi.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-calendar-helm/src/lib/hlm-calendar.d.ts +34 -0
- package/dist/backoffice/datepicker/ui/ui-calendar-helm/src/lib/hlm-calendar.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-date-picker-helm/src/index.d.ts +15 -0
- package/dist/backoffice/datepicker/ui/ui-date-picker-helm/src/index.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker-multi.d.ts +53 -0
- package/dist/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker-multi.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker-multi.token.d.ts +24 -0
- package/dist/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker-multi.token.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker.d.ts +53 -0
- package/dist/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker.token.d.ts +24 -0
- package/dist/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker.token.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-icon-helm/src/index.d.ts +10 -0
- package/dist/backoffice/datepicker/ui/ui-icon-helm/src/index.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-icon-helm/src/lib/hlm-icon.d.ts +10 -0
- package/dist/backoffice/datepicker/ui/ui-icon-helm/src/lib/hlm-icon.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-icon-helm/src/lib/hlm-icon.token.d.ts +8 -0
- package/dist/backoffice/datepicker/ui/ui-icon-helm/src/lib/hlm-icon.token.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-popover-helm/src/index.d.ts +14 -0
- package/dist/backoffice/datepicker/ui/ui-popover-helm/src/index.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-popover-helm/src/lib/hlm-popover-close.d.ts +9 -0
- package/dist/backoffice/datepicker/ui/ui-popover-helm/src/lib/hlm-popover-close.d.ts.map +1 -0
- package/dist/backoffice/datepicker/ui/ui-popover-helm/src/lib/hlm-popover-content.d.ts +14 -0
- package/dist/backoffice/datepicker/ui/ui-popover-helm/src/lib/hlm-popover-content.d.ts.map +1 -0
- package/dist/backoffice/input/index.d.ts.map +1 -0
- package/dist/backoffice/input/input.component.d.ts +200 -0
- package/dist/backoffice/input/input.component.d.ts.map +1 -0
- package/dist/backoffice/input/public-api.d.ts +2 -0
- package/dist/backoffice/input/public-api.d.ts.map +1 -0
- package/dist/backoffice/public-api.d.ts +6 -0
- package/dist/backoffice/public-api.d.ts.map +1 -0
- package/dist/backoffice/radio/index.d.ts.map +1 -0
- package/dist/backoffice/radio/public-api.d.ts +2 -0
- package/dist/backoffice/radio/public-api.d.ts.map +1 -0
- package/dist/backoffice/radio/radio.component.d.ts +73 -0
- package/dist/backoffice/radio/radio.component.d.ts.map +1 -0
- package/dist/backoffice/table/_components/pagination/pagination.component.d.ts +18 -0
- package/dist/backoffice/table/_components/pagination/pagination.component.d.ts.map +1 -0
- package/dist/backoffice/table/_components/selection-table-head/selection-table-head.component.d.ts +11 -0
- package/dist/backoffice/table/_components/selection-table-head/selection-table-head.component.d.ts.map +1 -0
- package/dist/backoffice/table/_components/selection-table-row/selection-table-row.component.d.ts +8 -0
- package/dist/backoffice/table/_components/selection-table-row/selection-table-row.component.d.ts.map +1 -0
- package/dist/backoffice/table/_components/sort-header-button/sort-header-button.component.d.ts +16 -0
- package/dist/backoffice/table/_components/sort-header-button/sort-header-button.component.d.ts.map +1 -0
- package/dist/backoffice/table/public-api.d.ts +3 -0
- package/dist/backoffice/table/public-api.d.ts.map +1 -0
- package/dist/backoffice/table/table.component.d.ts +111 -0
- package/dist/backoffice/table/table.component.d.ts.map +1 -0
- package/dist/backoffice/table/ui/ui-icon-helm/src/index.d.ts +10 -0
- package/dist/backoffice/table/ui/ui-icon-helm/src/index.d.ts.map +1 -0
- package/dist/backoffice/table/ui/ui-icon-helm/src/lib/hlm-icon.d.ts +10 -0
- package/dist/backoffice/table/ui/ui-icon-helm/src/lib/hlm-icon.d.ts.map +1 -0
- package/dist/backoffice/table/ui/ui-icon-helm/src/lib/hlm-icon.token.d.ts +8 -0
- package/dist/backoffice/table/ui/ui-icon-helm/src/lib/hlm-icon.token.d.ts.map +1 -0
- package/dist/backoffice/table/ui/ui-table-helm/src/index.d.ts +11 -0
- package/dist/backoffice/table/ui/ui-table-helm/src/index.d.ts.map +1 -0
- package/dist/backoffice/table/ui/ui-table-helm/src/lib/hlm-table.d.ts +112 -0
- package/dist/backoffice/table/ui/ui-table-helm/src/lib/hlm-table.d.ts.map +1 -0
- package/{dvm → dist/dvm}/cart/cart.component.d.ts +1 -3
- package/dist/dvm/cart/cart.component.d.ts.map +1 -0
- package/{dvm → dist/dvm}/cart-item/cart-item.component.d.ts +1 -3
- package/dist/dvm/cart-item/cart-item.component.d.ts.map +1 -0
- package/dist/dvm/legend/legend.component.d.ts +17 -0
- package/dist/dvm/legend/legend.component.d.ts.map +1 -0
- package/dist/dvm/legend/public-api.d.ts +4 -0
- package/{dvm → dist/dvm}/legend/public-api.d.ts.map +1 -1
- package/dist/dvm/legend/types.d.ts +6 -0
- package/dist/dvm/legend/types.d.ts.map +1 -0
- package/dist/dvm/legend/ui/legend-elements/index.d.ts +2 -0
- package/dist/dvm/legend/ui/legend-elements/index.d.ts.map +1 -0
- package/dist/dvm/legend/ui/legend-elements/legend-elements.component.d.ts +16 -0
- package/dist/dvm/legend/ui/legend-elements/legend-elements.component.d.ts.map +1 -0
- package/{dvm → dist/dvm}/loader/loader.component.d.ts +1 -3
- package/dist/dvm/loader/loader.component.d.ts.map +1 -0
- package/dist/dvm/map-loader/index.d.ts.map +1 -0
- package/dist/dvm/map-loader/map-loader.component.d.ts +55 -0
- package/dist/dvm/map-loader/map-loader.component.d.ts.map +1 -0
- package/dist/dvm/map-loader/public-api.d.ts +2 -0
- package/dist/dvm/map-loader/public-api.d.ts.map +1 -0
- package/dist/dvm/neighbors/index.d.ts.map +1 -0
- package/dist/dvm/neighbors/neighbors.component.d.ts +45 -0
- package/dist/dvm/neighbors/neighbors.component.d.ts.map +1 -0
- package/dist/dvm/neighbors/public-api.d.ts +3 -0
- package/dist/dvm/neighbors/public-api.d.ts.map +1 -0
- package/dist/dvm/neighbors/types.d.ts +8 -0
- package/dist/dvm/neighbors/types.d.ts.map +1 -0
- package/dist/dvm/popover/popover.component.d.ts +39 -0
- package/dist/dvm/popover/popover.component.d.ts.map +1 -0
- package/dist/dvm/popover/popover.config.d.ts +20 -0
- package/dist/dvm/popover/popover.config.d.ts.map +1 -0
- package/dist/dvm/popover/popover.service.d.ts +85 -0
- package/dist/dvm/popover/popover.service.d.ts.map +1 -0
- package/dist/dvm/popover/public-api.d.ts +5 -0
- package/{dvm → dist/dvm}/popover/public-api.d.ts.map +1 -1
- package/dist/dvm/popover/types.d.ts +33 -0
- package/dist/dvm/popover/types.d.ts.map +1 -0
- package/{dvm → dist/dvm}/public-api.d.ts +2 -0
- package/{dvm → dist/dvm}/public-api.d.ts.map +1 -1
- package/dist/dvm/stepper/index.d.ts +2 -0
- package/dist/dvm/stepper/public-api.d.ts +2 -0
- package/{dvm → dist/dvm}/stepper/public-api.d.ts.map +1 -1
- package/dist/dvm/stepper/stepper.component.d.ts +26 -0
- package/dist/dvm/stepper/stepper.component.d.ts.map +1 -0
- package/dist/dvm/stepper/types.d.ts +9 -0
- package/dist/dvm/stepper/types.d.ts.map +1 -0
- package/dist/dvm/ticket-info-item/index.d.ts +2 -0
- package/{dvm → dist/dvm}/ticket-info-item/ticket-info-item.component.d.ts +1 -3
- package/{dvm → dist/dvm}/ticket-info-item/ticket-info-item.component.d.ts.map +1 -1
- package/dist/fesm2022/3ddv-software-division-components.mjs +5944 -0
- package/dist/fesm2022/3ddv-software-division-components.mjs.map +1 -0
- package/dist/generic/add-digital-wallet/add-digital-wallet.component.d.ts +21 -0
- package/dist/generic/add-digital-wallet/add-digital-wallet.component.d.ts.map +1 -0
- package/dist/generic/add-digital-wallet/index.d.ts +2 -0
- package/dist/generic/add-digital-wallet/index.d.ts.map +1 -0
- package/dist/generic/add-digital-wallet/public-api.d.ts +2 -0
- package/dist/generic/add-digital-wallet/public-api.d.ts.map +1 -0
- package/dist/generic/braintree/braintree.component.d.ts +33 -0
- package/dist/generic/braintree/braintree.component.d.ts.map +1 -0
- package/dist/generic/braintree/index.d.ts +2 -0
- package/dist/generic/braintree/index.d.ts.map +1 -0
- package/dist/generic/braintree/public-api.d.ts +3 -0
- package/dist/generic/braintree/public-api.d.ts.map +1 -0
- package/dist/generic/braintree/types.d.ts +27 -0
- package/dist/generic/braintree/types.d.ts.map +1 -0
- package/dist/generic/button/button.component.d.ts +142 -0
- package/dist/generic/button/button.component.d.ts.map +1 -0
- package/dist/generic/button/index.d.ts +2 -0
- package/dist/generic/button/ui/ui-button-helm/src/index.d.ts +10 -0
- package/dist/generic/button/ui/ui-button-helm/src/index.d.ts.map +1 -0
- package/dist/generic/button/ui/ui-button-helm/src/lib/hlm-button.d.ts +20 -0
- package/dist/generic/button/ui/ui-button-helm/src/lib/hlm-button.d.ts.map +1 -0
- package/dist/generic/button/ui/ui-button-helm/src/lib/hlm-button.token.d.ts +9 -0
- package/dist/generic/button/ui/ui-button-helm/src/lib/hlm-button.token.d.ts.map +1 -0
- package/dist/generic/dialog/dialog.component.d.ts +11 -0
- package/dist/generic/dialog/dialog.component.d.ts.map +1 -0
- package/dist/generic/dialog/index.d.ts +2 -0
- package/dist/generic/dialog/index.d.ts.map +1 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/index.d.ts +25 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/index.d.ts.map +1 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-close.d.ts +9 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-close.d.ts.map +1 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-content.d.ts +15 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-content.d.ts.map +1 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-description.d.ts +10 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-description.d.ts.map +1 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-footer.d.ts +9 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-footer.d.ts.map +1 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-header.d.ts +9 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-header.d.ts.map +1 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-overlay.d.ts +12 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-overlay.d.ts.map +1 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-title.d.ts +10 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-title.d.ts.map +1 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog.d.ts +7 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog.d.ts.map +1 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog.service.d.ts +21 -0
- package/dist/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog.service.d.ts.map +1 -0
- package/dist/generic/dialog/public-api.d.ts +3 -0
- package/dist/generic/dialog/public-api.d.ts.map +1 -0
- package/{generic → dist/generic}/drawer/drawer.component.d.ts +1 -3
- package/dist/generic/drawer/drawer.component.d.ts.map +1 -0
- package/dist/generic/drawer/index.d.ts +2 -0
- package/dist/generic/icon/icon.component.d.ts +21 -0
- package/dist/generic/icon/icon.component.d.ts.map +1 -0
- package/dist/generic/icon/index.d.ts +2 -0
- package/dist/generic/icon/index.d.ts.map +1 -0
- package/dist/generic/icon/lib/ui-icon-helm/src/index.d.ts +10 -0
- package/dist/generic/icon/lib/ui-icon-helm/src/index.d.ts.map +1 -0
- package/dist/generic/icon/lib/ui-icon-helm/src/lib/hlm-icon.d.ts +10 -0
- package/dist/generic/icon/lib/ui-icon-helm/src/lib/hlm-icon.d.ts.map +1 -0
- package/dist/generic/icon/lib/ui-icon-helm/src/lib/hlm-icon.token.d.ts +8 -0
- package/dist/generic/icon/lib/ui-icon-helm/src/lib/hlm-icon.token.d.ts.map +1 -0
- package/dist/generic/icon/public-api.d.ts +2 -0
- package/dist/generic/icon/public-api.d.ts.map +1 -0
- package/dist/generic/index.d.ts +2 -0
- package/dist/generic/public-api.d.ts +8 -0
- package/dist/generic/public-api.d.ts.map +1 -0
- package/dist/generic/select/index.d.ts +2 -0
- package/dist/generic/select/index.d.ts.map +1 -0
- package/dist/generic/select/lib/hlm-select-content.d.ts +13 -0
- package/dist/generic/select/lib/hlm-select-content.d.ts.map +1 -0
- package/dist/generic/select/lib/hlm-select-group.d.ts +10 -0
- package/dist/generic/select/lib/hlm-select-group.d.ts.map +1 -0
- package/dist/generic/select/lib/hlm-select-label.d.ts +12 -0
- package/dist/generic/select/lib/hlm-select-label.d.ts.map +1 -0
- package/dist/generic/select/lib/hlm-select-option.d.ts +12 -0
- package/dist/generic/select/lib/hlm-select-option.d.ts.map +1 -0
- package/dist/generic/select/lib/hlm-select-scroll-down.d.ts +9 -0
- package/dist/generic/select/lib/hlm-select-scroll-down.d.ts.map +1 -0
- package/dist/generic/select/lib/hlm-select-scroll-up.d.ts +9 -0
- package/dist/generic/select/lib/hlm-select-scroll-up.d.ts.map +1 -0
- package/dist/generic/select/lib/hlm-select-trigger.d.ts +17 -0
- package/dist/generic/select/lib/hlm-select-trigger.d.ts.map +1 -0
- package/dist/generic/select/lib/hlm-select-value.d.ts +9 -0
- package/dist/generic/select/lib/hlm-select-value.d.ts.map +1 -0
- package/dist/generic/select/lib/hlm-select.d.ts +9 -0
- package/dist/generic/select/lib/hlm-select.d.ts.map +1 -0
- package/dist/generic/select/lib/index.d.ts +35 -0
- package/dist/generic/select/lib/index.d.ts.map +1 -0
- package/dist/generic/select/public-api.d.ts +3 -0
- package/dist/generic/select/public-api.d.ts.map +1 -0
- package/dist/generic/select/select.component.d.ts +13 -0
- package/dist/generic/select/select.component.d.ts.map +1 -0
- package/dist/generic/select/types.d.ts +5 -0
- package/dist/generic/select/types.d.ts.map +1 -0
- package/dist/public-api.d.ts +8 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/shared/declare-theme-variables/declare-theme-variables.d.ts +5 -0
- package/dist/shared/declare-theme-variables/declare-theme-variables.d.ts.map +1 -0
- package/dist/shared/declare-theme-variables/index.d.ts +2 -0
- package/dist/shared/declare-theme-variables/index.d.ts.map +1 -0
- package/dist/shared/lib-provider/config-token.d.ts +4 -0
- package/dist/shared/lib-provider/config-token.d.ts.map +1 -0
- package/dist/shared/lib-provider/index.d.ts +2 -0
- package/dist/shared/lib-provider/index.d.ts.map +1 -0
- package/dist/shared/lib-provider/provide-sdc.d.ts +10 -0
- package/dist/shared/lib-provider/provide-sdc.d.ts.map +1 -0
- package/dist/shared/lib-provider/public-api.d.ts +2 -0
- package/dist/shared/lib-provider/public-api.d.ts.map +1 -0
- package/dist/shared/screen-observer/index.d.ts +3 -0
- package/dist/shared/screen-observer/index.d.ts.map +1 -0
- package/dist/shared/screen-observer/provide-screen-observer.d.ts +5 -0
- package/dist/shared/screen-observer/provide-screen-observer.d.ts.map +1 -0
- package/dist/shared/screen-observer/screen-observer.d.ts +15 -0
- package/dist/shared/screen-observer/screen-observer.d.ts.map +1 -0
- package/dist/shared/types.d.ts +19 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/tailwind.config.js +19 -0
- package/dist/types/sizes.type.d.ts +3 -0
- package/dist/types/sizes.type.d.ts.map +1 -0
- package/package.json +130 -56
- package/backoffice/public-api.d.ts +0 -2
- package/backoffice/public-api.d.ts.map +0 -1
- package/backoffice/table/components/body-row/body-row.component.d.ts +0 -9
- package/backoffice/table/components/body-row/body-row.component.d.ts.map +0 -1
- package/backoffice/table/components/header-row/header-row.component.d.ts +0 -11
- package/backoffice/table/components/header-row/header-row.component.d.ts.map +0 -1
- package/backoffice/table/public-api.d.ts +0 -3
- package/backoffice/table/table.component.d.ts +0 -25
- package/backoffice/table/table.component.d.ts.map +0 -1
- package/backoffice/table/table.service.d.ts +0 -7
- package/backoffice/table/table.service.d.ts.map +0 -1
- package/backoffice/table/types.d.ts +0 -18
- package/backoffice/table/types.d.ts.map +0 -1
- package/dvm/cart/cart.component.d.ts.map +0 -1
- package/dvm/cart-item/cart-item.component.d.ts.map +0 -1
- package/dvm/legend/legend.component.d.ts +0 -8
- package/dvm/legend/legend.component.d.ts.map +0 -1
- package/dvm/legend/legend.service.d.ts +0 -7
- package/dvm/legend/legend.service.d.ts.map +0 -1
- package/dvm/legend/public-api.d.ts +0 -3
- package/dvm/loader/loader.component.d.ts.map +0 -1
- package/dvm/popover/popover.component.d.ts +0 -8
- package/dvm/popover/popover.component.d.ts.map +0 -1
- package/dvm/popover/popover.service.d.ts +0 -7
- package/dvm/popover/popover.service.d.ts.map +0 -1
- package/dvm/popover/public-api.d.ts +0 -3
- package/dvm/stepper/public-api.d.ts +0 -3
- package/dvm/stepper/stepper.component.d.ts +0 -8
- package/dvm/stepper/stepper.component.d.ts.map +0 -1
- package/dvm/stepper/stepper.service.d.ts +0 -7
- package/dvm/stepper/stepper.service.d.ts.map +0 -1
- package/esm2022/3ddv-software-division-components.mjs +0 -5
- package/esm2022/backoffice/index.mjs +0 -2
- package/esm2022/backoffice/public-api.mjs +0 -2
- package/esm2022/backoffice/table/components/body-row/body-row.component.mjs +0 -32
- package/esm2022/backoffice/table/components/header-row/header-row.component.mjs +0 -67
- package/esm2022/backoffice/table/index.mjs +0 -2
- package/esm2022/backoffice/table/public-api.mjs +0 -3
- package/esm2022/backoffice/table/table.component.mjs +0 -127
- package/esm2022/backoffice/table/table.service.mjs +0 -14
- package/esm2022/backoffice/table/types.mjs +0 -2
- package/esm2022/dvm/cart/cart.component.mjs +0 -24
- package/esm2022/dvm/cart/cart.service.mjs +0 -14
- package/esm2022/dvm/cart/index.mjs +0 -2
- package/esm2022/dvm/cart/public-api.mjs +0 -6
- package/esm2022/dvm/cart-item/cart-item.component.mjs +0 -24
- package/esm2022/dvm/cart-item/cart-item.service.mjs +0 -14
- package/esm2022/dvm/cart-item/index.mjs +0 -2
- package/esm2022/dvm/cart-item/public-api.mjs +0 -6
- package/esm2022/dvm/index.mjs +0 -2
- package/esm2022/dvm/legend/index.mjs +0 -2
- package/esm2022/dvm/legend/legend.component.mjs +0 -24
- package/esm2022/dvm/legend/legend.service.mjs +0 -14
- package/esm2022/dvm/legend/public-api.mjs +0 -6
- package/esm2022/dvm/loader/index.mjs +0 -2
- package/esm2022/dvm/loader/loader.component.mjs +0 -24
- package/esm2022/dvm/loader/loader.service.mjs +0 -14
- package/esm2022/dvm/loader/public-api.mjs +0 -6
- package/esm2022/dvm/popover/index.mjs +0 -2
- package/esm2022/dvm/popover/popover.component.mjs +0 -24
- package/esm2022/dvm/popover/popover.service.mjs +0 -14
- package/esm2022/dvm/popover/public-api.mjs +0 -6
- package/esm2022/dvm/public-api.mjs +0 -8
- package/esm2022/dvm/stepper/index.mjs +0 -2
- package/esm2022/dvm/stepper/public-api.mjs +0 -6
- package/esm2022/dvm/stepper/stepper.component.mjs +0 -24
- package/esm2022/dvm/stepper/stepper.service.mjs +0 -14
- package/esm2022/dvm/ticket-info-item/index.mjs +0 -2
- package/esm2022/dvm/ticket-info-item/public-api.mjs +0 -6
- package/esm2022/dvm/ticket-info-item/ticket-info-item.component.mjs +0 -24
- package/esm2022/dvm/ticket-info-item/ticket-info-item.service.mjs +0 -14
- package/esm2022/generic/button/button.component.mjs +0 -93
- package/esm2022/generic/button/index.mjs +0 -2
- package/esm2022/generic/button/public-api.mjs +0 -5
- package/esm2022/generic/button/types.mjs +0 -2
- package/esm2022/generic/drawer/drawer.component.mjs +0 -24
- package/esm2022/generic/drawer/drawer.service.mjs +0 -14
- package/esm2022/generic/drawer/index.mjs +0 -2
- package/esm2022/generic/drawer/public-api.mjs +0 -6
- package/esm2022/generic/index.mjs +0 -2
- package/esm2022/generic/modal/index.mjs +0 -2
- package/esm2022/generic/modal/modal.component.mjs +0 -24
- package/esm2022/generic/modal/modal.service.mjs +0 -14
- package/esm2022/generic/modal/public-api.mjs +0 -6
- package/esm2022/generic/public-api.mjs +0 -4
- package/esm2022/public-api.mjs +0 -6
- package/esm2022/shared/format-value.pipe.mjs +0 -28
- package/esm2022/shared/theme-provider.directive.mjs +0 -31
- package/esm2022/shared/theme.service.mjs +0 -6
- package/esm2022/shared/types.mjs +0 -2
- package/esm2022/utils/validate-styles-for-component.mjs +0 -15
- package/fesm2022/3ddv-software-division-components.mjs +0 -699
- package/fesm2022/3ddv-software-division-components.mjs.map +0 -1
- package/generic/button/button.component.d.ts +0 -61
- package/generic/button/button.component.d.ts.map +0 -1
- package/generic/button/types.d.ts +0 -2
- package/generic/button/types.d.ts.map +0 -1
- package/generic/drawer/drawer.component.d.ts.map +0 -1
- package/generic/modal/index.d.ts.map +0 -1
- package/generic/modal/modal.component.d.ts +0 -8
- package/generic/modal/modal.component.d.ts.map +0 -1
- package/generic/modal/modal.service.d.ts +0 -7
- package/generic/modal/modal.service.d.ts.map +0 -1
- package/generic/modal/public-api.d.ts +0 -3
- package/generic/modal/public-api.d.ts.map +0 -1
- package/generic/public-api.d.ts +0 -4
- package/generic/public-api.d.ts.map +0 -1
- package/public-api.d.ts +0 -6
- package/public-api.d.ts.map +0 -1
- package/shared/format-value.pipe.d.ts +0 -10
- package/shared/format-value.pipe.d.ts.map +0 -1
- package/shared/theme-provider.directive.d.ts +0 -11
- package/shared/theme-provider.directive.d.ts.map +0 -1
- package/shared/theme.service.d.ts +0 -9
- package/shared/theme.service.d.ts.map +0 -1
- package/shared/types.d.ts +0 -2
- package/shared/types.d.ts.map +0 -1
- package/utils/validate-styles-for-component.d.ts +0 -2
- package/utils/validate-styles-for-component.d.ts.map +0 -1
- /package/{3ddv-software-division-components.d.ts.map → dist/3ddv-software-division-components.d.ts.map} +0 -0
- /package/{backoffice → dist/backoffice/checkbox}/index.d.ts +0 -0
- /package/{backoffice/table → dist/backoffice/datepicker}/index.d.ts +0 -0
- /package/{dvm/cart-item → dist/backoffice}/index.d.ts +0 -0
- /package/{backoffice → dist/backoffice}/index.d.ts.map +0 -0
- /package/{dvm/cart → dist/backoffice/input}/index.d.ts +0 -0
- /package/{dvm → dist/backoffice/radio}/index.d.ts +0 -0
- /package/{dvm/legend → dist/backoffice/table}/index.d.ts +0 -0
- /package/{backoffice → dist/backoffice}/table/index.d.ts.map +0 -0
- /package/{dvm → dist/dvm}/cart/cart.service.d.ts +0 -0
- /package/{dvm → dist/dvm}/cart/cart.service.d.ts.map +0 -0
- /package/{dvm/popover → dist/dvm/cart}/index.d.ts +0 -0
- /package/{dvm → dist/dvm}/cart/index.d.ts.map +0 -0
- /package/{dvm → dist/dvm}/cart/public-api.d.ts +0 -0
- /package/{dvm → dist/dvm}/cart/public-api.d.ts.map +0 -0
- /package/{dvm → dist/dvm}/cart-item/cart-item.service.d.ts +0 -0
- /package/{dvm → dist/dvm}/cart-item/cart-item.service.d.ts.map +0 -0
- /package/{dvm/loader → dist/dvm/cart-item}/index.d.ts +0 -0
- /package/{dvm → dist/dvm}/cart-item/index.d.ts.map +0 -0
- /package/{dvm → dist/dvm}/cart-item/public-api.d.ts +0 -0
- /package/{dvm → dist/dvm}/cart-item/public-api.d.ts.map +0 -0
- /package/{dvm/stepper → dist/dvm}/index.d.ts +0 -0
- /package/{dvm → dist/dvm}/index.d.ts.map +0 -0
- /package/{dvm/ticket-info-item → dist/dvm/legend}/index.d.ts +0 -0
- /package/{dvm → dist/dvm}/legend/index.d.ts.map +0 -0
- /package/{generic/button → dist/dvm/loader}/index.d.ts +0 -0
- /package/{dvm → dist/dvm}/loader/index.d.ts.map +0 -0
- /package/{dvm → dist/dvm}/loader/loader.service.d.ts +0 -0
- /package/{dvm → dist/dvm}/loader/loader.service.d.ts.map +0 -0
- /package/{dvm → dist/dvm}/loader/public-api.d.ts +0 -0
- /package/{dvm → dist/dvm}/loader/public-api.d.ts.map +0 -0
- /package/{generic/drawer → dist/dvm/map-loader}/index.d.ts +0 -0
- /package/{generic → dist/dvm/neighbors}/index.d.ts +0 -0
- /package/{generic/modal → dist/dvm/popover}/index.d.ts +0 -0
- /package/{dvm → dist/dvm}/popover/index.d.ts.map +0 -0
- /package/{dvm → dist/dvm}/stepper/index.d.ts.map +0 -0
- /package/{dvm → dist/dvm}/ticket-info-item/index.d.ts.map +0 -0
- /package/{dvm → dist/dvm}/ticket-info-item/public-api.d.ts +0 -0
- /package/{dvm → dist/dvm}/ticket-info-item/public-api.d.ts.map +0 -0
- /package/{dvm → dist/dvm}/ticket-info-item/ticket-info-item.service.d.ts +0 -0
- /package/{dvm → dist/dvm}/ticket-info-item/ticket-info-item.service.d.ts.map +0 -0
- /package/{generic → dist/generic}/button/index.d.ts.map +0 -0
- /package/{generic → dist/generic}/button/public-api.d.ts +0 -0
- /package/{generic → dist/generic}/button/public-api.d.ts.map +0 -0
- /package/{generic → dist/generic}/drawer/drawer.service.d.ts +0 -0
- /package/{generic → dist/generic}/drawer/drawer.service.d.ts.map +0 -0
- /package/{generic → dist/generic}/drawer/index.d.ts.map +0 -0
- /package/{generic → dist/generic}/drawer/public-api.d.ts +0 -0
- /package/{generic → dist/generic}/drawer/public-api.d.ts.map +0 -0
- /package/{generic → dist/generic}/index.d.ts.map +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,103 +1,266 @@
|
|
|
1
|
-
# Software Division Components
|
|
1
|
+
# **Software Division Components**
|
|
2
2
|
|
|
3
|
-
## Overview
|
|
3
|
+
## **Overview**
|
|
4
4
|
|
|
5
|
-

|
|
5
|
+

|
|
7
6
|

|
|
8
7
|
|
|
9
|
-
The Software Division Components library is a wrapper around the [
|
|
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.
|
|
10
9
|
|
|
11
|
-
## Installation
|
|
10
|
+
## **Installation**
|
|
12
11
|
|
|
13
|
-
|
|
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:
|
|
14
25
|
|
|
15
26
|
```bash
|
|
16
|
-
|
|
27
|
+
pnpm storybook
|
|
17
28
|
```
|
|
18
29
|
|
|
19
|
-
|
|
30
|
+
#### 2. Consumer App Integration Testing
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
Use the consumer app for integration testing of components in a real application context. Each component should have its own route for testing.
|
|
22
33
|
|
|
23
|
-
|
|
34
|
+
**Setup requires two terminals:**
|
|
24
35
|
|
|
25
|
-
|
|
36
|
+
**Terminal 1 - Build Library:**
|
|
26
37
|
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
background-color: red;
|
|
30
|
-
}
|
|
38
|
+
```bash
|
|
39
|
+
pnpm run build:watch
|
|
31
40
|
```
|
|
32
41
|
|
|
33
|
-
|
|
34
|
-
<sdc-button
|
|
35
|
-
styleClasses='my-class'
|
|
36
|
-
></sdc-button>
|
|
42
|
+
Watches for changes in the SDC library and rebuilds to the `dist/` folder.
|
|
37
43
|
|
|
44
|
+
**Terminal 2 - Watch and Restart Consumer App:**
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pnpm run start:watch
|
|
38
48
|
```
|
|
39
49
|
|
|
40
|
-
|
|
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**
|
|
41
101
|
|
|
42
102
|
### Importing the library
|
|
43
103
|
|
|
44
|
-
####
|
|
104
|
+
#### Providing the library to the application
|
|
45
105
|
|
|
46
106
|
```ts
|
|
47
107
|
import { ApplicationConfig } from '@angular/core';
|
|
48
|
-
import {
|
|
108
|
+
import { provideSdc } from '@3ddv/software-division-components';
|
|
49
109
|
|
|
50
110
|
export const appConfig: ApplicationConfig = {
|
|
51
|
-
// this
|
|
52
|
-
|
|
111
|
+
// this provides the consuming app with all necessary modules
|
|
112
|
+
// to make it work
|
|
113
|
+
providers: [provideSdc({ theme: 'generic' })],
|
|
53
114
|
};
|
|
54
115
|
```
|
|
55
116
|
|
|
56
117
|
#### Import from main entry
|
|
57
118
|
|
|
58
|
-
```
|
|
119
|
+
```ts
|
|
59
120
|
import { TableComponent, ButtonComponent } from '@3ddv/software-division-components';
|
|
60
121
|
```
|
|
61
122
|
|
|
62
123
|
#### Import from secondary entry
|
|
63
124
|
|
|
64
|
-
```
|
|
125
|
+
```ts
|
|
65
126
|
import { ButtonComponent } from '@3ddv/software-division-components/generic/button';
|
|
66
127
|
```
|
|
67
128
|
|
|
68
|
-
|
|
129
|
+
### Theming and styling
|
|
69
130
|
|
|
70
|
-
|
|
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/).
|
|
71
132
|
|
|
72
|
-
To
|
|
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:
|
|
73
134
|
|
|
74
|
-
|
|
135
|
+
```css
|
|
136
|
+
.my-class {
|
|
137
|
+
--p-button-primary-background: red;
|
|
138
|
+
}
|
|
139
|
+
```
|
|
75
140
|
|
|
76
|
-
|
|
141
|
+
```html
|
|
142
|
+
<sdc-button styleClasses="my-class"></sdc-button>
|
|
143
|
+
```
|
|
77
144
|
|
|
78
|
-
|
|
79
|
-
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`). There are some components in the Generic folder which can also be used in the backoffice, but please do so by passing the `backoffice` theme to the library provider. The `backoffice` parameter tells the system to not apply any styles to the components, keeping the design to the one PrimeNG already has by default.
|
|
145
|
+
#### Specifity issues
|
|
80
146
|
|
|
81
|
-
|
|
82
|
-
This folder contains components that are exclusive to an application that uses DVM. There are a lot of components that are common both in style and functionality, and this module aims to reuse those as much as posible. Some examples of these components are the section navigator buttons or the minimap.
|
|
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:
|
|
83
148
|
|
|
84
|
-
|
|
85
|
-
|
|
149
|
+
```css
|
|
150
|
+
#sdc-button.my-class {
|
|
151
|
+
--p-button-primary-background: red;
|
|
152
|
+
}
|
|
153
|
+
```
|
|
86
154
|
|
|
87
|
-
|
|
88
|
-
This folder contains initialization methods, directives and other methods to aid with the usage and debugging of the library.
|
|
155
|
+
#### Encapsulation issues
|
|
89
156
|
|
|
90
|
-
-
|
|
91
|
-
|
|
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
|
+
}
|
|
92
215
|
|
|
93
|
-
|
|
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';
|
|
94
242
|
|
|
95
|
-
|
|
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
|
+
```
|
|
96
256
|
|
|
97
|
-
|
|
98
|
-
to adhere to a valid format documented in the component.
|
|
257
|
+
And the resulting HTML:
|
|
99
258
|
|
|
100
|
-
|
|
259
|
+
```html
|
|
260
|
+
<sdc-button [props]="{props}" />
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## **How to collaborate to the library as a developer**
|
|
101
264
|
|
|
102
265
|
### Semantic versioning
|
|
103
266
|
|
|
@@ -122,7 +285,7 @@ If the commit message does not adhere to the Conventional Commits format, Commit
|
|
|
122
285
|
|
|
123
286
|
### Development workflow steps
|
|
124
287
|
|
|
125
|
-
- Make sure you have latest master remote changes on your local master branch
|
|
288
|
+
- Make sure you have the latest master remote changes on your local master branch
|
|
126
289
|
|
|
127
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/).
|
|
128
291
|
|
|
@@ -136,8 +299,6 @@ If the commit message does not adhere to the Conventional Commits format, Commit
|
|
|
136
299
|
|
|
137
300
|
- Rinse and repeat.
|
|
138
301
|
|
|
139
|
-
## **How to document your changes**
|
|
140
|
-
|
|
141
302
|
### Documenting component files
|
|
142
303
|
|
|
143
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.
|
|
@@ -146,7 +307,7 @@ We also declare the accessibility scope, parameter types and return types of any
|
|
|
146
307
|
|
|
147
308
|
```typescript
|
|
148
309
|
/**
|
|
149
|
-
* A customizable button component built on
|
|
310
|
+
* A customizable button component built on SpartanNg Button component.
|
|
150
311
|
*
|
|
151
312
|
* This component supports various configurations, such as tooltips, badge values,
|
|
152
313
|
* and theme styles. It uses the `ThemeProviderDirective` to apply theming dynamically.
|
|
@@ -177,12 +338,130 @@ export class ButtonComponent extends Button {
|
|
|
177
338
|
*/
|
|
178
339
|
public handleClick(event: MouseEvent): void {
|
|
179
340
|
// Implementation should document any steps that cannot be easily explained
|
|
180
|
-
// with variable names. Another scenario
|
|
341
|
+
// with variable names. Another scenario on why you would add comments includes documenting why things
|
|
181
342
|
// are done the way they are done (there might be some framework or language limitation).
|
|
182
343
|
}
|
|
183
344
|
}
|
|
184
345
|
```
|
|
185
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
|
+
|
|
186
465
|
### Properly exporting a newly added component
|
|
187
466
|
|
|
188
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:
|
|
@@ -255,7 +534,7 @@ export const Primary: Story = {
|
|
|
255
534
|
};
|
|
256
535
|
```
|
|
257
536
|
|
|
258
|
-
When this is done (or while you are
|
|
537
|
+
When this is done (or while you are developing the component) you can visualize it by booting up Storybook locally. Use this command:
|
|
259
538
|
|
|
260
539
|
```bash
|
|
261
540
|
pnpm run storybook
|