@3ddv/software-division-components 2.0.0 → 2.0.2
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/fesm2022/3ddv-software-division-components-generic-carousel.mjs +354 -0
- package/fesm2022/3ddv-software-division-components-generic-carousel.mjs.map +1 -0
- package/package.json +47 -67
- package/styles.css +2 -46
- package/types/3ddv-software-division-components-generic-carousel.d.ts +53 -0
- package/.postcssrc.json +0 -5
- package/.storybook/main.ts +0 -78
- package/.storybook/manager-head.html +0 -1
- package/.storybook/preview.ts +0 -30
- package/.storybook/tsconfig.json +0 -25
- package/.storybook/typings.d.ts +0 -4
- package/CHANGELOG.md +0 -8
- package/LICENSE.md +0 -21
- package/backoffice/checkbox/checkbox.component.css +0 -193
- package/backoffice/checkbox/checkbox.component.html +0 -23
- package/backoffice/checkbox/checkbox.component.ts +0 -252
- package/backoffice/checkbox/index.ts +0 -1
- package/backoffice/checkbox/ng-package.json +0 -1
- package/backoffice/checkbox/public-api.ts +0 -1
- package/backoffice/checkbox/story/checkbox.stories.ts +0 -304
- package/backoffice/datepicker/datepicker.component.css +0 -262
- package/backoffice/datepicker/datepicker.component.html +0 -40
- package/backoffice/datepicker/datepicker.component.ts +0 -366
- package/backoffice/datepicker/index.ts +0 -1
- package/backoffice/datepicker/ng-package.json +0 -1
- package/backoffice/datepicker/public-api.ts +0 -2
- package/backoffice/datepicker/story/datepicker.stories.ts +0 -32
- package/backoffice/datepicker/ui/ui-calendar-helm/src/index.ts +0 -14
- package/backoffice/datepicker/ui/ui-calendar-helm/src/lib/hlm-calendar-multi.ts +0 -183
- package/backoffice/datepicker/ui/ui-calendar-helm/src/lib/hlm-calendar.ts +0 -171
- package/backoffice/datepicker/ui/ui-date-picker-helm/src/index.ts +0 -16
- package/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker-multi.token.ts +0 -43
- package/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker-multi.ts +0 -177
- package/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker.token.ts +0 -43
- package/backoffice/datepicker/ui/ui-date-picker-helm/src/lib/hlm-date-picker.ts +0 -167
- package/backoffice/datepicker/ui/ui-icon-helm/src/index.ts +0 -11
- package/backoffice/datepicker/ui/ui-icon-helm/src/lib/hlm-icon.token.ts +0 -20
- package/backoffice/datepicker/ui/ui-icon-helm/src/lib/hlm-icon.ts +0 -35
- package/backoffice/datepicker/ui/ui-popover-helm/src/index.ts +0 -15
- package/backoffice/datepicker/ui/ui-popover-helm/src/lib/hlm-popover-close.ts +0 -19
- package/backoffice/datepicker/ui/ui-popover-helm/src/lib/hlm-popover-content.ts +0 -30
- package/backoffice/index.ts +0 -1
- package/backoffice/input/index.ts +0 -1
- package/backoffice/input/input.component.css +0 -319
- package/backoffice/input/input.component.html +0 -51
- package/backoffice/input/input.component.ts +0 -497
- package/backoffice/input/ng-package.json +0 -1
- package/backoffice/input/public-api.ts +0 -2
- package/backoffice/input/story/input.stories.ts +0 -243
- package/backoffice/radio/index.ts +0 -1
- package/backoffice/radio/ng-package.json +0 -1
- package/backoffice/radio/public-api.ts +0 -1
- package/backoffice/radio/radio.component.css +0 -143
- package/backoffice/radio/radio.component.html +0 -15
- package/backoffice/radio/radio.component.ts +0 -154
- package/backoffice/radio/story/radio.stories.ts +0 -287
- package/backoffice/table/_components/pagination/pagination.component.css +0 -117
- package/backoffice/table/_components/pagination/pagination.component.html +0 -55
- package/backoffice/table/_components/pagination/pagination.component.ts +0 -79
- package/backoffice/table/_components/selection-table-head/selection-table-head.component.css +0 -0
- package/backoffice/table/_components/selection-table-head/selection-table-head.component.html +0 -6
- package/backoffice/table/_components/selection-table-head/selection-table-head.component.ts +0 -36
- package/backoffice/table/_components/selection-table-row/selection-table-row.component.css +0 -0
- package/backoffice/table/_components/selection-table-row/selection-table-row.component.html +0 -5
- package/backoffice/table/_components/selection-table-row/selection-table-row.component.ts +0 -12
- package/backoffice/table/_components/sort-header-button/sort-header-button.component.css +0 -14
- package/backoffice/table/_components/sort-header-button/sort-header-button.component.html +0 -11
- package/backoffice/table/_components/sort-header-button/sort-header-button.component.ts +0 -55
- package/backoffice/table/index.ts +0 -1
- package/backoffice/table/ng-package.json +0 -1
- package/backoffice/table/public-api.ts +0 -6
- package/backoffice/table/story/table.stories.ts +0 -364
- package/backoffice/table/table.component.css +0 -172
- package/backoffice/table/table.component.html +0 -53
- package/backoffice/table/table.component.ts +0 -347
- package/backoffice/table/ui/ui-icon-helm/src/index.ts +0 -11
- package/backoffice/table/ui/ui-icon-helm/src/lib/hlm-icon.token.ts +0 -20
- package/backoffice/table/ui/ui-icon-helm/src/lib/hlm-icon.ts +0 -35
- package/backoffice/table/ui/ui-table-helm/src/index.ts +0 -13
- package/backoffice/table/ui/ui-table-helm/src/lib/hlm-table.ts +0 -220
- package/components.json +0 -3
- package/dist/styles.css +0 -2
- package/documentation.json +0 -30473
- package/dvm/cart/cart.component.css +0 -103
- package/dvm/cart/cart.component.html +0 -31
- package/dvm/cart/cart.component.ts +0 -49
- package/dvm/cart/cart.stories.ts +0 -370
- package/dvm/cart/cart.types.ts +0 -8
- package/dvm/cart/index.ts +0 -2
- package/dvm/cart/ng-package.json +0 -1
- package/dvm/cart/public-api.ts +0 -8
- package/dvm/cart/seat-list.component.css +0 -281
- package/dvm/cart/seat-list.component.html +0 -85
- package/dvm/cart/seat-list.component.ts +0 -76
- package/dvm/cart/seat-list.stories.ts +0 -337
- package/dvm/cart-item/cart-item.component.html +0 -1
- package/dvm/cart-item/cart-item.component.ts +0 -8
- package/dvm/cart-item/cart-item.service.ts +0 -8
- package/dvm/cart-item/cart.stories.ts +0 -31
- package/dvm/cart-item/index.ts +0 -1
- package/dvm/cart-item/ng-package.json +0 -1
- package/dvm/cart-item/public-api.ts +0 -6
- package/dvm/index.ts +0 -1
- package/dvm/legend/index.ts +0 -1
- package/dvm/legend/legend.component.css +0 -49
- package/dvm/legend/legend.component.html +0 -8
- package/dvm/legend/legend.component.ts +0 -41
- package/dvm/legend/legend.stories.ts +0 -16
- package/dvm/legend/ng-package.json +0 -1
- package/dvm/legend/public-api.ts +0 -7
- package/dvm/legend/types.ts +0 -6
- package/dvm/legend/ui/legend-elements/index.ts +0 -1
- package/dvm/legend/ui/legend-elements/legend-elements.component.css +0 -49
- package/dvm/legend/ui/legend-elements/legend-elements.component.html +0 -8
- package/dvm/legend/ui/legend-elements/legend-elements.component.ts +0 -41
- package/dvm/loader/index.ts +0 -1
- package/dvm/loader/loader.component.html +0 -1
- package/dvm/loader/loader.component.ts +0 -8
- package/dvm/loader/loader.service.ts +0 -8
- package/dvm/loader/loader.stories.ts +0 -31
- package/dvm/loader/ng-package.json +0 -1
- package/dvm/loader/public-api.ts +0 -6
- package/dvm/map-loader/index.ts +0 -1
- package/dvm/map-loader/map-loader.component.css +0 -91
- package/dvm/map-loader/map-loader.component.html +0 -23
- package/dvm/map-loader/map-loader.component.ts +0 -187
- package/dvm/map-loader/map-loader.stories.ts +0 -16
- package/dvm/map-loader/ng-package.json +0 -1
- package/dvm/map-loader/public-api.ts +0 -5
- package/dvm/neighbors/index.ts +0 -1
- package/dvm/neighbors/neighbors.component.css +0 -158
- package/dvm/neighbors/neighbors.component.html +0 -45
- package/dvm/neighbors/neighbors.component.ts +0 -218
- package/dvm/neighbors/ng-package.json +0 -1
- package/dvm/neighbors/public-api.ts +0 -2
- package/dvm/neighbors/story/arrow-left-black-icon.svg +0 -3
- package/dvm/neighbors/story/mock-data.ts +0 -15
- package/dvm/neighbors/story/neighbours.stories.css +0 -12
- package/dvm/neighbors/story/neighbours.stories.ts +0 -117
- package/dvm/neighbors/types.ts +0 -14
- package/dvm/popover/base-popover.component.ts +0 -70
- package/dvm/popover/index.ts +0 -1
- package/dvm/popover/ng-package.json +0 -1
- package/dvm/popover/popover.component.css +0 -227
- package/dvm/popover/popover.component.html +0 -27
- package/dvm/popover/popover.component.ts +0 -236
- package/dvm/popover/popover.config.ts +0 -30
- package/dvm/popover/popover.service.ts +0 -627
- package/dvm/popover/popover.stories.ts +0 -873
- package/dvm/popover/public-api.ts +0 -14
- package/dvm/popover/seat-popover/seat-popover.component.css +0 -89
- package/dvm/popover/seat-popover/seat-popover.component.html +0 -40
- package/dvm/popover/seat-popover/seat-popover.component.ts +0 -74
- package/dvm/popover/section-popover/section-popover.component.css +0 -157
- package/dvm/popover/section-popover/section-popover.component.html +0 -58
- package/dvm/popover/section-popover/section-popover.component.ts +0 -106
- package/dvm/popover/services/dvm-popover-positioner.service.ts +0 -73
- package/dvm/popover/services/popover-manager.service.ts +0 -88
- package/dvm/popover/transformers/base-popover-data-transformer.ts +0 -36
- package/dvm/popover/types.ts +0 -104
- package/dvm/stepper/index.ts +0 -1
- package/dvm/stepper/ng-package.json +0 -1
- package/dvm/stepper/public-api.ts +0 -5
- package/dvm/stepper/stepper.component.css +0 -142
- package/dvm/stepper/stepper.component.html +0 -9
- package/dvm/stepper/stepper.component.ts +0 -101
- package/dvm/stepper/types.ts +0 -6
- package/dvm/ticket-info-item/index.ts +0 -1
- package/dvm/ticket-info-item/ng-package.json +0 -1
- package/dvm/ticket-info-item/public-api.ts +0 -6
- package/dvm/ticket-info-item/ticket-info-item.component.html +0 -1
- package/dvm/ticket-info-item/ticket-info-item.component.ts +0 -8
- package/dvm/ticket-info-item/ticket-info-item.service.ts +0 -8
- package/dvm/ticket-info-item/ticket-info-item.stories.ts +0 -31
- package/generic/add-digital-wallet/add-digital-wallet.component.css +0 -76
- package/generic/add-digital-wallet/add-digital-wallet.component.html +0 -46
- package/generic/add-digital-wallet/add-digital-wallet.component.ts +0 -44
- package/generic/add-digital-wallet/index.ts +0 -1
- package/generic/add-digital-wallet/ng-package.json +0 -1
- package/generic/add-digital-wallet/public-api.ts +0 -1
- package/generic/braintree/braintree.component.css +0 -7
- package/generic/braintree/braintree.component.ts +0 -134
- package/generic/braintree/index.ts +0 -1
- package/generic/braintree/ng-package.json +0 -1
- package/generic/braintree/public-api.ts +0 -6
- package/generic/braintree/story/braintree.stories.css +0 -3
- package/generic/braintree/story/braintree.stories.ts +0 -27
- package/generic/braintree/types.ts +0 -28
- package/generic/button/button.component.css +0 -305
- package/generic/button/button.component.html +0 -10
- package/generic/button/button.component.ts +0 -353
- package/generic/button/index.ts +0 -1
- package/generic/button/ng-package.json +0 -1
- package/generic/button/public-api.ts +0 -6
- package/generic/button/story/button.stories.ts +0 -384
- package/generic/button/ui/ui-button-helm/src/index.ts +0 -10
- package/generic/button/ui/ui-button-helm/src/lib/hlm-button.token.ts +0 -22
- package/generic/button/ui/ui-button-helm/src/lib/hlm-button.ts +0 -62
- package/generic/carousel/carousel-item.component.ts +0 -15
- package/generic/carousel/carousel-item.directive.ts +0 -14
- package/generic/carousel/carousel.component.css +0 -90
- package/generic/carousel/carousel.component.html +0 -13
- package/generic/carousel/carousel.component.ts +0 -44
- package/generic/carousel/index.ts +0 -1
- package/generic/carousel/public-api.ts +0 -2
- package/generic/carousel/ui/ui-carousel-helm/src/index.ts +0 -29
- package/generic/carousel/ui/ui-carousel-helm/src/lib/hlm-carousel-content.ts +0 -23
- package/generic/carousel/ui/ui-carousel-helm/src/lib/hlm-carousel-item.ts +0 -25
- package/generic/carousel/ui/ui-carousel-helm/src/lib/hlm-carousel-next.ts +0 -58
- package/generic/carousel/ui/ui-carousel-helm/src/lib/hlm-carousel-previous.ts +0 -61
- package/generic/carousel/ui/ui-carousel-helm/src/lib/hlm-carousel-slide-display.ts +0 -36
- package/generic/carousel/ui/ui-carousel-helm/src/lib/hlm-carousel.ts +0 -105
- package/generic/dialog/dialog.component.css +0 -5
- package/generic/dialog/dialog.component.html +0 -3
- package/generic/dialog/dialog.component.ts +0 -20
- package/generic/dialog/dialog.stories.ts +0 -14
- package/generic/dialog/index.ts +0 -1
- package/generic/dialog/libs/ui-dialog-helm/src/index.ts +0 -37
- package/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-close.ts +0 -20
- package/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-content.ts +0 -56
- package/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-description.ts +0 -17
- package/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-footer.ts +0 -19
- package/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-header.ts +0 -19
- package/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-overlay.ts +0 -23
- package/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog-title.ts +0 -19
- package/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog.service.ts +0 -59
- package/generic/dialog/libs/ui-dialog-helm/src/lib/hlm-dialog.ts +0 -31
- package/generic/dialog/ng-package.json +0 -1
- package/generic/dialog/public-api.ts +0 -7
- package/generic/dialog/tsconfig.json +0 -7
- package/generic/dialog/ui/dialog-close-button/dialog-close-button.component.css +0 -0
- package/generic/dialog/ui/dialog-close-button/dialog-close-button.component.html +0 -1
- package/generic/dialog/ui/dialog-close-button/dialog-close-button.component.ts +0 -17
- package/generic/dialog/ui/dialog-footer/dialog-footer.component.css +0 -0
- package/generic/dialog/ui/dialog-footer/dialog-footer.component.html +0 -3
- package/generic/dialog/ui/dialog-footer/dialog-footer.component.ts +0 -11
- package/generic/dialog/ui/dialog-header/dialog-header.component.css +0 -0
- package/generic/dialog/ui/dialog-header/dialog-header.component.html +0 -8
- package/generic/dialog/ui/dialog-header/dialog-header.component.ts +0 -18
- package/generic/drawer/drawer.component.html +0 -1
- package/generic/drawer/drawer.component.ts +0 -8
- package/generic/drawer/drawer.service.ts +0 -8
- package/generic/drawer/drawer.stories.ts +0 -31
- package/generic/drawer/index.ts +0 -1
- package/generic/drawer/ng-package.json +0 -1
- package/generic/drawer/public-api.ts +0 -6
- package/generic/icon/icon.component.css +0 -7
- package/generic/icon/icon.component.html +0 -3
- package/generic/icon/icon.component.ts +0 -86
- package/generic/icon/icon.stories.ts +0 -16
- package/generic/icon/index.ts +0 -1
- package/generic/icon/lib/ui-icon-helm/src/index.ts +0 -11
- package/generic/icon/lib/ui-icon-helm/src/lib/hlm-icon.token.ts +0 -20
- package/generic/icon/lib/ui-icon-helm/src/lib/hlm-icon.ts +0 -36
- package/generic/icon/ng-package.json +0 -1
- package/generic/icon/public-api.ts +0 -6
- package/generic/icon/tsconfig.json +0 -7
- package/generic/index.ts +0 -1
- package/generic/select/index.ts +0 -1
- package/generic/select/lib/hlm-select-content.ts +0 -29
- package/generic/select/lib/hlm-select-group.ts +0 -17
- package/generic/select/lib/hlm-select-label.ts +0 -26
- package/generic/select/lib/hlm-select-option.ts +0 -37
- package/generic/select/lib/hlm-select-scroll-down.ts +0 -24
- package/generic/select/lib/hlm-select-scroll-up.ts +0 -23
- package/generic/select/lib/hlm-select-trigger.ts +0 -53
- package/generic/select/lib/hlm-select-value.ts +0 -17
- package/generic/select/lib/hlm-select.ts +0 -15
- package/generic/select/lib/index.ts +0 -38
- package/generic/select/ng-package.json +0 -1
- package/generic/select/public-api.ts +0 -3
- package/generic/select/select.component.css +0 -65
- package/generic/select/select.component.html +0 -19
- package/generic/select/select.component.ts +0 -25
- package/generic/select/types.ts +0 -4
- package/ng-package.json +0 -10
- package/public/3ddv-logo.jpg +0 -0
- package/public/neighbours-after.png +0 -0
- package/public/neighbours-before.png +0 -0
- package/shared/apply-theme-variables/apply-theme-variables.ts +0 -35
- package/shared/apply-theme-variables/index.ts +0 -1
- package/shared/format-value.pipe.ts +0 -23
- package/shared/index.ts +0 -1
- package/shared/lib-provider/config-token.ts +0 -4
- package/shared/lib-provider/index.ts +0 -1
- package/shared/lib-provider/provide-sdc.ts +0 -24
- package/shared/lib-provider/public-api.ts +0 -1
- package/shared/ng-package.json +0 -1
- package/shared/public-api.ts +0 -6
- package/shared/screen-observer/index.ts +0 -2
- package/shared/screen-observer/provide-screen-observer.ts +0 -17
- package/shared/screen-observer/screen-observer.ts +0 -56
- package/shared/screen-observer/sizable-base.ts +0 -70
- package/shared/theme-provider/generic-theme.ts +0 -1
- package/shared/theme-provider/index.ts +0 -1
- package/shared/theme-provider/public-api.ts +0 -1
- package/shared/theme-provider/theme-provider.directive.ts +0 -17
- package/shared/themes/sdc.css +0 -153
- package/shared/types.ts +0 -18
- package/src/private-exports.ts +0 -1
- package/src/public-api.ts +0 -20
- package/tsconfig.json +0 -50
- package/tsconfig.lib.prod.json +0 -6
- package/tsconfig.spec.json +0 -15
- package/tsconfig.temp.json +0 -1
- package/utils/index.ts +0 -1
- package/utils/ng-package.json +0 -1
- package/utils/public-api.ts +0 -1
- package/utils/validate-styles-for-component.ts +0 -39
- /package/{dist/README.md → README.md} +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-backoffice-checkbox.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-backoffice-checkbox.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-backoffice-datepicker.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-backoffice-datepicker.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-backoffice-input.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-backoffice-input.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-backoffice-radio.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-backoffice-radio.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-backoffice-table.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-backoffice-table.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-cart-item.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-cart-item.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-cart.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-cart.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-legend.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-legend.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-loader.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-loader.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-map-loader.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-map-loader.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-neighbors.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-neighbors.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-popover.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-popover.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-stepper.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-stepper.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-ticket-info-item.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-dvm-ticket-info-item.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-add-digital-wallet.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-add-digital-wallet.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-braintree.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-braintree.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-button.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-button.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-dialog.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-dialog.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-drawer.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-drawer.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-icon.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-icon.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-select.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-generic-select.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-shared.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-shared.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-utils.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components-utils.mjs.map +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components.mjs +0 -0
- /package/{dist/fesm2022 → fesm2022}/3ddv-software-division-components.mjs.map +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-backoffice-checkbox.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-backoffice-datepicker.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-backoffice-input.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-backoffice-radio.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-backoffice-table.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-dvm-cart-item.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-dvm-cart.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-dvm-legend.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-dvm-loader.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-dvm-map-loader.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-dvm-neighbors.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-dvm-popover.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-dvm-stepper.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-dvm-ticket-info-item.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-generic-add-digital-wallet.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-generic-braintree.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-generic-button.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-generic-dialog.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-generic-drawer.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-generic-icon.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-generic-select.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-shared.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components-utils.d.ts +0 -0
- /package/{dist/types → types}/3ddv-software-division-components.d.ts +0 -0
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
-
import { ButtonComponent } from '../button.component';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<ButtonComponent> = {
|
|
5
|
-
title: 'Generic/Button',
|
|
6
|
-
component: ButtonComponent,
|
|
7
|
-
id: 'Button',
|
|
8
|
-
argTypes: {
|
|
9
|
-
theme: {
|
|
10
|
-
control: 'select',
|
|
11
|
-
options: ['theme-sdc', 'theme-backoffice'],
|
|
12
|
-
description: 'Theme class to apply to the button component',
|
|
13
|
-
table: {
|
|
14
|
-
type: { summary: 'ThemeClass' },
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
styleClass: {
|
|
18
|
-
control: 'select',
|
|
19
|
-
options: [
|
|
20
|
-
// Variants
|
|
21
|
-
'variant-primary',
|
|
22
|
-
'variant-secondary',
|
|
23
|
-
'variant-alternative',
|
|
24
|
-
'variant-success',
|
|
25
|
-
'variant-warning',
|
|
26
|
-
'variant-danger',
|
|
27
|
-
// Sizes
|
|
28
|
-
'size-sm',
|
|
29
|
-
'size-md',
|
|
30
|
-
'size-lg',
|
|
31
|
-
'size-xl',
|
|
32
|
-
// Radius
|
|
33
|
-
'radius-default',
|
|
34
|
-
'radius-sm',
|
|
35
|
-
'radius-md',
|
|
36
|
-
'radius-lg',
|
|
37
|
-
'radius-xl',
|
|
38
|
-
'radius-2xl',
|
|
39
|
-
'radius-full',
|
|
40
|
-
// Border
|
|
41
|
-
'border-0',
|
|
42
|
-
'border-default',
|
|
43
|
-
'border-2',
|
|
44
|
-
'border-4',
|
|
45
|
-
'border-8',
|
|
46
|
-
// Empty option
|
|
47
|
-
'',
|
|
48
|
-
],
|
|
49
|
-
description: 'Predefined style class to apply (variant, size, radius, or border)',
|
|
50
|
-
table: {
|
|
51
|
-
type: { summary: 'string' },
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
className: {
|
|
55
|
-
control: 'text',
|
|
56
|
-
description: 'Additional CSS classes to apply to the button',
|
|
57
|
-
table: {
|
|
58
|
-
type: { summary: 'string' },
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
disabled: {
|
|
62
|
-
control: 'boolean',
|
|
63
|
-
description: 'Whether the button is disabled',
|
|
64
|
-
table: {
|
|
65
|
-
type: { summary: 'boolean' },
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
debounce: {
|
|
69
|
-
control: 'number',
|
|
70
|
-
description: 'Debounce time in milliseconds. When null, no debounce is applied.',
|
|
71
|
-
table: {
|
|
72
|
-
type: { summary: 'number | null' },
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
ripple: {
|
|
76
|
-
control: 'boolean',
|
|
77
|
-
description: 'Whether to enable the ripple effect on the button',
|
|
78
|
-
table: {
|
|
79
|
-
type: { summary: 'boolean' },
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
onClick: {
|
|
83
|
-
action: 'clicked',
|
|
84
|
-
description: 'Event emitted when the button is clicked',
|
|
85
|
-
table: {
|
|
86
|
-
type: { summary: 'EventEmitter<MouseEvent>' },
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
onFocus: {
|
|
90
|
-
action: 'focused',
|
|
91
|
-
description: 'Event emitted when the button receives focus',
|
|
92
|
-
table: {
|
|
93
|
-
type: { summary: 'EventEmitter<FocusEvent>' },
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
onBlur: {
|
|
97
|
-
action: 'blurred',
|
|
98
|
-
description: 'Event emitted when the button loses focus',
|
|
99
|
-
table: {
|
|
100
|
-
type: { summary: 'EventEmitter<FocusEvent>' },
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
isDebounced: {
|
|
104
|
-
action: 'debounceStateChanged',
|
|
105
|
-
description:
|
|
106
|
-
'Event emitted to notify the debounce state. Returns true while the button is debounced, false when not.',
|
|
107
|
-
table: {
|
|
108
|
-
type: { summary: 'EventEmitter<boolean>' },
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
export default meta;
|
|
115
|
-
|
|
116
|
-
type Story = StoryObj<ButtonComponent>;
|
|
117
|
-
|
|
118
|
-
export const Default: Story = {
|
|
119
|
-
args: {
|
|
120
|
-
theme: 'theme-sdc',
|
|
121
|
-
},
|
|
122
|
-
render: args => ({
|
|
123
|
-
props: args,
|
|
124
|
-
template: `
|
|
125
|
-
<div style="margin: 0.5rem 0">
|
|
126
|
-
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem">
|
|
127
|
-
<sdc-button [theme]="theme">
|
|
128
|
-
Default Button
|
|
129
|
-
</sdc-button>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
`,
|
|
133
|
-
}),
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export const WithDebounce: Story = {
|
|
137
|
-
args: {
|
|
138
|
-
theme: 'theme-sdc',
|
|
139
|
-
debounce: 2000,
|
|
140
|
-
},
|
|
141
|
-
render: args => ({
|
|
142
|
-
props: args,
|
|
143
|
-
template: `
|
|
144
|
-
<div style="margin: 0.5rem 0">
|
|
145
|
-
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem">
|
|
146
|
-
<sdc-button
|
|
147
|
-
[theme]="theme"
|
|
148
|
-
[debounce]="debounce"
|
|
149
|
-
(onClick)="onClick($event)"
|
|
150
|
-
(isDebounced)="isDebounced($event)">
|
|
151
|
-
Click with 2s Debounce
|
|
152
|
-
</sdc-button>
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
`,
|
|
156
|
-
}),
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
export const Circle: Story = {
|
|
160
|
-
args: {
|
|
161
|
-
theme: 'theme-sdc',
|
|
162
|
-
},
|
|
163
|
-
render: args => ({
|
|
164
|
-
props: args,
|
|
165
|
-
template: `
|
|
166
|
-
<div class="space-y-4">
|
|
167
|
-
<div class="flex items-center gap-4">
|
|
168
|
-
<sdc-button [theme]="theme" [styleClass]="['size-circle-sm']">
|
|
169
|
-
👤
|
|
170
|
-
</sdc-button>
|
|
171
|
-
<sdc-button [theme]="theme" [styleClass]="['size-circle-md']">
|
|
172
|
-
👤
|
|
173
|
-
</sdc-button>
|
|
174
|
-
<sdc-button [theme]="theme" [styleClass]="['size-circle-lg']">
|
|
175
|
-
👤
|
|
176
|
-
</sdc-button>
|
|
177
|
-
<sdc-button [theme]="theme" [styleClass]="['size-circle-xl']">
|
|
178
|
-
👤
|
|
179
|
-
</sdc-button>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
`,
|
|
183
|
-
}),
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
export const RippleEffect: Story = {
|
|
187
|
-
args: {
|
|
188
|
-
theme: 'theme-sdc',
|
|
189
|
-
ripple: true,
|
|
190
|
-
},
|
|
191
|
-
render: args => ({
|
|
192
|
-
props: args,
|
|
193
|
-
template: `
|
|
194
|
-
<div style="margin: 0.5rem 0">
|
|
195
|
-
<p class="text-sm text-gray-600">Click the button below to see the ripple effect:</p>
|
|
196
|
-
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem">
|
|
197
|
-
<sdc-button [theme]="theme" [ripple]="ripple" [styleClass]="['variant-primary', 'size-md']">
|
|
198
|
-
Small Primary
|
|
199
|
-
</sdc-button>
|
|
200
|
-
</div>
|
|
201
|
-
</div>
|
|
202
|
-
`,
|
|
203
|
-
}),
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
export const AllVariants: Story = {
|
|
207
|
-
args: {
|
|
208
|
-
theme: 'theme-sdc',
|
|
209
|
-
},
|
|
210
|
-
render: args => ({
|
|
211
|
-
props: args,
|
|
212
|
-
template: `
|
|
213
|
-
<div style="margin: 0.5rem 0">
|
|
214
|
-
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem">
|
|
215
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-primary']">
|
|
216
|
-
Primary
|
|
217
|
-
</sdc-button>
|
|
218
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-secondary']">
|
|
219
|
-
Secondary
|
|
220
|
-
</sdc-button>
|
|
221
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-alternative']">
|
|
222
|
-
Alternative
|
|
223
|
-
</sdc-button>
|
|
224
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-success']">
|
|
225
|
-
Success
|
|
226
|
-
</sdc-button>
|
|
227
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-warning']">
|
|
228
|
-
Warning
|
|
229
|
-
</sdc-button>
|
|
230
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-destructive']">
|
|
231
|
-
Danger
|
|
232
|
-
</sdc-button>
|
|
233
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-outline']">
|
|
234
|
-
Outline
|
|
235
|
-
</sdc-button>
|
|
236
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-link']">
|
|
237
|
-
Link
|
|
238
|
-
</sdc-button>
|
|
239
|
-
</div>
|
|
240
|
-
</div>
|
|
241
|
-
`,
|
|
242
|
-
}),
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
export const AllSizes: Story = {
|
|
246
|
-
args: {
|
|
247
|
-
theme: 'theme-sdc',
|
|
248
|
-
},
|
|
249
|
-
render: args => ({
|
|
250
|
-
props: args,
|
|
251
|
-
template: `
|
|
252
|
-
<div style="margin: 0.5rem 0">
|
|
253
|
-
<div style="width: 33%; display: flex; flex-direction: column; gap: 1rem">
|
|
254
|
-
<sdc-button [theme]="theme" [styleClass]="['size-sm']">
|
|
255
|
-
Small
|
|
256
|
-
</sdc-button>
|
|
257
|
-
<sdc-button [theme]="theme" [styleClass]="['size-md']">
|
|
258
|
-
Medium
|
|
259
|
-
</sdc-button>
|
|
260
|
-
<sdc-button [theme]="theme" [styleClass]="['size-lg']">
|
|
261
|
-
Large
|
|
262
|
-
</sdc-button>
|
|
263
|
-
<sdc-button [theme]="theme" [styleClass]="['size-xl']">
|
|
264
|
-
Extra Large
|
|
265
|
-
</sdc-button>
|
|
266
|
-
</div>
|
|
267
|
-
</div>
|
|
268
|
-
`,
|
|
269
|
-
}),
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
export const AllRadius: Story = {
|
|
273
|
-
args: {
|
|
274
|
-
theme: 'theme-sdc',
|
|
275
|
-
},
|
|
276
|
-
render: args => ({
|
|
277
|
-
props: args,
|
|
278
|
-
template: `
|
|
279
|
-
<div style="margin: 0.5rem 0">
|
|
280
|
-
<div style="width: 33%; display: flex; flex-direction: column; gap: 1rem">
|
|
281
|
-
<sdc-button [theme]="theme" [styleClass]="['radius-default']">
|
|
282
|
-
Default Radius
|
|
283
|
-
</sdc-button>
|
|
284
|
-
<sdc-button [theme]="theme" [styleClass]="['radius-sm']">
|
|
285
|
-
Small Radius
|
|
286
|
-
</sdc-button>
|
|
287
|
-
<sdc-button [theme]="theme" [styleClass]="['radius-md']">
|
|
288
|
-
Medium Radius
|
|
289
|
-
</sdc-button>
|
|
290
|
-
<sdc-button [theme]="theme" [styleClass]="['radius-lg']">
|
|
291
|
-
Large Radius
|
|
292
|
-
</sdc-button>
|
|
293
|
-
<sdc-button [theme]="theme" [styleClass]="['radius-xl']">
|
|
294
|
-
Extra Large Radius
|
|
295
|
-
</sdc-button>
|
|
296
|
-
<sdc-button [theme]="theme" [styleClass]="['radius-2xl']">
|
|
297
|
-
2XL Radius
|
|
298
|
-
</sdc-button>
|
|
299
|
-
<sdc-button [theme]="theme" [styleClass]="['radius-full']">
|
|
300
|
-
Full Radius
|
|
301
|
-
</sdc-button>
|
|
302
|
-
</div>
|
|
303
|
-
</div>
|
|
304
|
-
`,
|
|
305
|
-
}),
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
export const AllBorders: Story = {
|
|
309
|
-
args: {
|
|
310
|
-
theme: 'theme-sdc',
|
|
311
|
-
},
|
|
312
|
-
render: args => ({
|
|
313
|
-
props: args,
|
|
314
|
-
template: `
|
|
315
|
-
<div style="margin: 0.5rem 0">
|
|
316
|
-
<div style="width: 33%; display: flex; flex-direction: column; gap: 1rem">
|
|
317
|
-
<sdc-button [theme]="theme" [styleClass]="['border-0']">
|
|
318
|
-
No Border
|
|
319
|
-
</sdc-button>
|
|
320
|
-
<sdc-button [theme]="theme" [styleClass]="['border-default']">
|
|
321
|
-
Default Border
|
|
322
|
-
</sdc-button>
|
|
323
|
-
<sdc-button [theme]="theme" [styleClass]="['border-2']">
|
|
324
|
-
Border 2px
|
|
325
|
-
</sdc-button>
|
|
326
|
-
<sdc-button [theme]="theme" [styleClass]="['border-4']">
|
|
327
|
-
Border 4px
|
|
328
|
-
</sdc-button>
|
|
329
|
-
<sdc-button [theme]="theme" [styleClass]="['border-8']">
|
|
330
|
-
Border 8px
|
|
331
|
-
</sdc-button>
|
|
332
|
-
</div>
|
|
333
|
-
</div>
|
|
334
|
-
`,
|
|
335
|
-
}),
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
export const Disabled: Story = {
|
|
339
|
-
args: {
|
|
340
|
-
theme: 'theme-sdc',
|
|
341
|
-
disabled: true,
|
|
342
|
-
},
|
|
343
|
-
render: args => ({
|
|
344
|
-
props: args,
|
|
345
|
-
template: `
|
|
346
|
-
<div style="margin: 0.5rem 0">
|
|
347
|
-
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem">
|
|
348
|
-
<sdc-button
|
|
349
|
-
[theme]="theme"
|
|
350
|
-
[disabled]="disabled">
|
|
351
|
-
Disabled Button
|
|
352
|
-
</sdc-button>
|
|
353
|
-
</div>
|
|
354
|
-
</div>
|
|
355
|
-
`,
|
|
356
|
-
}),
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
export const StyleClassCombinations: Story = {
|
|
360
|
-
args: {
|
|
361
|
-
theme: 'theme-sdc',
|
|
362
|
-
},
|
|
363
|
-
render: args => ({
|
|
364
|
-
props: args,
|
|
365
|
-
template: `
|
|
366
|
-
<div style="margin: 0.5rem 0">
|
|
367
|
-
<div style="width: 33%; display: flex; flex-direction: column; gap: 1rem">
|
|
368
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-success', 'size-lg']">
|
|
369
|
-
Large Success
|
|
370
|
-
</sdc-button>
|
|
371
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-warning', 'size-sm']">
|
|
372
|
-
Small Warning
|
|
373
|
-
</sdc-button>
|
|
374
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-destructive', 'size-lg', 'radius-full']">
|
|
375
|
-
Large Danger Rounded
|
|
376
|
-
</sdc-button>
|
|
377
|
-
<sdc-button [theme]="theme" [styleClass]="['variant-alternative', 'size-sm', 'border-4']">
|
|
378
|
-
Small Alternative Thick Border
|
|
379
|
-
</sdc-button>
|
|
380
|
-
</div>
|
|
381
|
-
</div>
|
|
382
|
-
`,
|
|
383
|
-
}),
|
|
384
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { HlmButton } from './lib/hlm-button';
|
|
3
|
-
export * from './lib/hlm-button';
|
|
4
|
-
export * from './lib/hlm-button.token';
|
|
5
|
-
|
|
6
|
-
@NgModule({
|
|
7
|
-
imports: [HlmButton],
|
|
8
|
-
exports: [HlmButton],
|
|
9
|
-
})
|
|
10
|
-
export class HlmButtonModule {}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, ValueProvider, inject } from '@angular/core';
|
|
2
|
-
import type { ButtonVariants } from './hlm-button';
|
|
3
|
-
|
|
4
|
-
export interface BrnButtonConfig {
|
|
5
|
-
variant: ButtonVariants['variant'];
|
|
6
|
-
size: ButtonVariants['size'];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const defaultConfig: BrnButtonConfig = {
|
|
10
|
-
variant: 'default',
|
|
11
|
-
size: 'default',
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const BrnButtonConfigToken = new InjectionToken<BrnButtonConfig>('BrnButtonConfig');
|
|
15
|
-
|
|
16
|
-
export function provideBrnButtonConfig(config: Partial<BrnButtonConfig>): ValueProvider {
|
|
17
|
-
return { provide: BrnButtonConfigToken, useValue: { ...defaultConfig, ...config } };
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function injectBrnButtonConfig(): BrnButtonConfig {
|
|
21
|
-
return inject(BrnButtonConfigToken, { optional: true }) ?? defaultConfig;
|
|
22
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Directive, computed, input, signal } from '@angular/core';
|
|
2
|
-
import { hlm } from '@spartan-ng/brain/core';
|
|
3
|
-
import { type VariantProps, cva } from 'class-variance-authority';
|
|
4
|
-
import type { ClassValue } from 'clsx';
|
|
5
|
-
import { injectBrnButtonConfig } from './hlm-button.token';
|
|
6
|
-
|
|
7
|
-
export const buttonVariants = cva(
|
|
8
|
-
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_ng-icon]:pointer-events-none shrink-0 [&_ng-icon]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-default',
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
13
|
-
destructive:
|
|
14
|
-
'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
15
|
-
outline: 'border bg-background shadow-xs dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
|
16
|
-
secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
|
|
17
|
-
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
|
18
|
-
link: 'text-primary underline-offset-4 hover:underline',
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
default: 'h-9 px-4 py-2 has-[>ng-icon]:px-3',
|
|
22
|
-
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>ng-icon]:px-2.5',
|
|
23
|
-
lg: 'h-10 rounded-md px-6 has-[>ng-icon]:px-4',
|
|
24
|
-
icon: 'size-9',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
defaultVariants: {
|
|
28
|
-
variant: 'default',
|
|
29
|
-
size: 'default',
|
|
30
|
-
},
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
35
|
-
|
|
36
|
-
@Directive({
|
|
37
|
-
selector: '[hlmBtn]',
|
|
38
|
-
standalone: true,
|
|
39
|
-
exportAs: 'hlmBtn',
|
|
40
|
-
host: {
|
|
41
|
-
'[class]': '_computedClass()',
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
export class HlmButton {
|
|
45
|
-
private readonly _config = injectBrnButtonConfig();
|
|
46
|
-
|
|
47
|
-
private readonly _additionalClasses = signal<ClassValue>('');
|
|
48
|
-
|
|
49
|
-
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
50
|
-
|
|
51
|
-
protected readonly _computedClass = computed(() =>
|
|
52
|
-
hlm(buttonVariants({ variant: this.variant(), size: this.size() }), this.userClass(), this._additionalClasses())
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
public readonly variant = input<ButtonVariants['variant']>(this._config.variant);
|
|
56
|
-
|
|
57
|
-
public readonly size = input<ButtonVariants['size']>(this._config.size);
|
|
58
|
-
|
|
59
|
-
setClass(classes: string): void {
|
|
60
|
-
this._additionalClasses.set(classes);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, TemplateRef, ViewChild } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
standalone: true,
|
|
5
|
-
selector: 'sdc-carousel-item',
|
|
6
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7
|
-
template: `
|
|
8
|
-
<ng-template #content>
|
|
9
|
-
<ng-content></ng-content>
|
|
10
|
-
</ng-template>
|
|
11
|
-
`,
|
|
12
|
-
})
|
|
13
|
-
export class CarouselItemComponent {
|
|
14
|
-
@ViewChild('content', { static: true }) template!: TemplateRef<void>;
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Directive, TemplateRef } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export interface CarouselItemContext<T> {
|
|
4
|
-
$implicit: T;
|
|
5
|
-
index: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
@Directive({
|
|
9
|
-
standalone: true,
|
|
10
|
-
selector: '[sdcCarouselItem]',
|
|
11
|
-
})
|
|
12
|
-
export class CarouselItemDirective<T> {
|
|
13
|
-
constructor(public template: TemplateRef<CarouselItemContext<T>>) {}
|
|
14
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
--carousel-gap: 16px;
|
|
3
|
-
--carousel-arrow-color: var(--color-alternative, #f45f10);
|
|
4
|
-
--carousel-arrow-size: 2.5rem;
|
|
5
|
-
--carousel-arrow-icon-size: 1.5rem;
|
|
6
|
-
display: block;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.sdc-carousel {
|
|
10
|
-
--sdc-carousel-max-width: 100%;
|
|
11
|
-
display: block;
|
|
12
|
-
position: relative;
|
|
13
|
-
width: 100%;
|
|
14
|
-
max-width: var(--sdc-carousel-max-width);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.sdc-carousel-content {
|
|
18
|
-
justify-content: flex-start;
|
|
19
|
-
gap: var(--carousel-gap);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.sdc-carousel-item {
|
|
23
|
-
flex: 0 0 auto;
|
|
24
|
-
min-width: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Navigation arrow buttons */
|
|
28
|
-
.sdc-carousel :global(button[hlm-carousel-previous]),
|
|
29
|
-
.sdc-carousel :global(button[hlm-carousel-next]) {
|
|
30
|
-
width: var(--carousel-arrow-size);
|
|
31
|
-
height: var(--carousel-arrow-size);
|
|
32
|
-
background-color: transparent;
|
|
33
|
-
border: none;
|
|
34
|
-
color: var(--carousel-arrow-color);
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
transition:
|
|
37
|
-
opacity 0.2s ease,
|
|
38
|
-
transform 0.2s ease;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Override hlm positioning - place arrows at the padding edges */
|
|
42
|
-
.sdc-carousel :global(button[hlm-carousel-previous]) {
|
|
43
|
-
left: 0;
|
|
44
|
-
right: auto;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.sdc-carousel :global(button[hlm-carousel-next]) {
|
|
48
|
-
right: 0;
|
|
49
|
-
left: auto;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.sdc-carousel :global(button[hlm-carousel-previous]:hover),
|
|
53
|
-
.sdc-carousel :global(button[hlm-carousel-next]:hover) {
|
|
54
|
-
opacity: 0.8;
|
|
55
|
-
transform: translateY(-50%) scale(1.1);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.sdc-carousel :global(button[hlm-carousel-previous]:disabled),
|
|
59
|
-
.sdc-carousel :global(button[hlm-carousel-next]:disabled) {
|
|
60
|
-
opacity: 0.3;
|
|
61
|
-
cursor: not-allowed;
|
|
62
|
-
color: var(--color-alternative, #f45f10);
|
|
63
|
-
background-color: transparent;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.sdc-carousel :global(button[hlm-carousel-previous]:disabled:hover),
|
|
67
|
-
.sdc-carousel :global(button[hlm-carousel-next]:disabled:hover) {
|
|
68
|
-
transform: translateY(-50%);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.sdc-carousel :global(button[hlm-carousel-previous] ng-icon),
|
|
72
|
-
.sdc-carousel :global(button[hlm-carousel-next] ng-icon) {
|
|
73
|
-
width: var(--carousel-arrow-icon-size);
|
|
74
|
-
height: var(--carousel-arrow-icon-size);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/* Responsive arrow sizes */
|
|
78
|
-
@media (width >= 768px) {
|
|
79
|
-
:host {
|
|
80
|
-
--carousel-arrow-size: 3rem;
|
|
81
|
-
--carousel-arrow-icon-size: 1.75rem;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@media (width >= 1024px) {
|
|
86
|
-
:host {
|
|
87
|
-
--carousel-arrow-size: 3.5rem;
|
|
88
|
-
--carousel-arrow-icon-size: 2rem;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<hlm-carousel class="sdc-carousel" [options]="emblaOptions()">
|
|
2
|
-
<hlm-carousel-content class="pl-1 sdc-carousel-content">
|
|
3
|
-
@for (item of carouselItems(); track $index) {
|
|
4
|
-
<hlm-carousel-item class="-ml-1 sdc-carousel-item">
|
|
5
|
-
<ng-container *ngTemplateOutlet="item.template"></ng-container>
|
|
6
|
-
</hlm-carousel-item>
|
|
7
|
-
}
|
|
8
|
-
</hlm-carousel-content>
|
|
9
|
-
@if (canScroll()) {
|
|
10
|
-
<button class="bg-transparent text-primary" hlm-carousel-previous></button>
|
|
11
|
-
<button class="bg-transparent text-primary" hlm-carousel-next></button>
|
|
12
|
-
}
|
|
13
|
-
</hlm-carousel>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, computed, contentChildren, input, viewChild } from '@angular/core';
|
|
3
|
-
import { CarouselItemComponent } from './carousel-item.component';
|
|
4
|
-
import {
|
|
5
|
-
HlmCarousel,
|
|
6
|
-
HlmCarouselContent,
|
|
7
|
-
HlmCarouselItem,
|
|
8
|
-
HlmCarouselNext,
|
|
9
|
-
HlmCarouselPrevious,
|
|
10
|
-
} from './ui/ui-carousel-helm/src';
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
standalone: true,
|
|
14
|
-
selector: 'sdc-carousel',
|
|
15
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
-
imports: [NgTemplateOutlet, HlmCarousel, HlmCarouselContent, HlmCarouselItem, HlmCarouselNext, HlmCarouselPrevious],
|
|
17
|
-
templateUrl: './carousel.component.html',
|
|
18
|
-
styleUrls: ['./carousel.component.css'],
|
|
19
|
-
host: {
|
|
20
|
-
'[style.--carousel-gap.px]': 'gap()',
|
|
21
|
-
},
|
|
22
|
-
})
|
|
23
|
-
export class CarouselComponent {
|
|
24
|
-
public carouselItems = contentChildren(CarouselItemComponent);
|
|
25
|
-
|
|
26
|
-
/** Reference to the underlying HlmCarousel */
|
|
27
|
-
protected hlmCarousel = viewChild(HlmCarousel);
|
|
28
|
-
|
|
29
|
-
/** Gap between slides in pixels */
|
|
30
|
-
public gap = input<number>(16);
|
|
31
|
-
|
|
32
|
-
/** Computed Embla options based on inputs */
|
|
33
|
-
protected emblaOptions = computed(() => ({
|
|
34
|
-
align: 'start' as const,
|
|
35
|
-
containScroll: 'trimSnaps' as const,
|
|
36
|
-
}));
|
|
37
|
-
|
|
38
|
-
/** Whether scrolling is possible (show navigation only when true) */
|
|
39
|
-
protected canScroll = computed(() => {
|
|
40
|
-
const carousel = this.hlmCarousel();
|
|
41
|
-
if (!carousel) return false;
|
|
42
|
-
return carousel.canScrollPrev() || carousel.canScrollNext();
|
|
43
|
-
});
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './public-api';
|