@ifsworld/granite-components 4.4.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -4
- package/esm2020/ifsworld-granite-components.mjs +5 -0
- package/esm2020/index.mjs +48 -0
- package/esm2020/lib/arrange-grid/arrange-grid-item.component.mjs +44 -0
- package/esm2020/lib/arrange-grid/arrange-grid.component.mjs +125 -0
- package/esm2020/lib/arrange-grid/arrange-grid.module.mjs +19 -0
- package/esm2020/lib/badge/badge.component.mjs +39 -0
- package/esm2020/lib/badge/badge.module.mjs +18 -0
- package/esm2020/lib/badge/testing/badge.harness.mjs +25 -0
- package/esm2020/lib/button/button.component.mjs +89 -0
- package/esm2020/lib/button/button.module.mjs +16 -0
- package/esm2020/lib/checkbox/checkbox-group.component.mjs +17 -0
- package/esm2020/lib/checkbox/checkbox.component.mjs +96 -0
- package/esm2020/lib/checkbox/checkbox.module.mjs +17 -0
- package/esm2020/lib/core/animation.mjs +34 -0
- package/esm2020/lib/core/client-environment.mjs +20 -0
- package/esm2020/lib/core/common-behaviors/disabled.mjs +27 -0
- package/esm2020/lib/core/core.module.mjs +36 -0
- package/esm2020/lib/core/devices/client-input-desktop.directive.mjs +29 -0
- package/esm2020/lib/core/devices/client-input-touch.directive.mjs +29 -0
- package/esm2020/lib/core/devices/client-output-desktop.directive.mjs +29 -0
- package/esm2020/lib/core/devices/client-output-touch.directive.mjs +29 -0
- package/esm2020/lib/core/pipes/pure-pipes.module.mjs +16 -0
- package/esm2020/lib/core/pipes/title.pipe.mjs +21 -0
- package/esm2020/lib/core/radio-checkbox-base.mjs +19 -0
- package/esm2020/lib/core/theme.library.mjs +59 -0
- package/esm2020/lib/core/types.mjs +2 -0
- package/esm2020/lib/grid/grid.component.mjs +128 -0
- package/esm2020/lib/grid/grid.module.mjs +18 -0
- package/esm2020/lib/icon/icon.component.mjs +43 -0
- package/esm2020/lib/icon/icon.module.mjs +16 -0
- package/esm2020/lib/input-field/input-field.component.mjs +160 -0
- package/esm2020/lib/input-field/input-field.module.mjs +20 -0
- package/esm2020/lib/menu/divider.directive.mjs +23 -0
- package/esm2020/lib/menu/menu-base.mjs +347 -0
- package/esm2020/lib/menu/menu-desktop-animations.mjs +23 -0
- package/esm2020/lib/menu/menu-errors.mjs +37 -0
- package/esm2020/lib/menu/menu-item.component.mjs +91 -0
- package/esm2020/lib/menu/menu-panel.mjs +7 -0
- package/esm2020/lib/menu/menu-positions.mjs +9 -0
- package/esm2020/lib/menu/menu-touch-animations.mjs +137 -0
- package/esm2020/lib/menu/menu-touch-close.component.mjs +13 -0
- package/esm2020/lib/menu/menu-touch-title.component.mjs +59 -0
- package/esm2020/lib/menu/menu-trigger-for.directive.mjs +702 -0
- package/esm2020/lib/menu/menu.component.mjs +30 -0
- package/esm2020/lib/menu/menu.module.mjs +55 -0
- package/esm2020/lib/menu/testing/menu.harness.mjs +109 -0
- package/esm2020/lib/menu/title.directive.mjs +17 -0
- package/esm2020/lib/radio-button/radio-button.component.mjs +118 -0
- package/esm2020/lib/radio-button/radio-button.module.mjs +17 -0
- package/esm2020/lib/radio-button/radio-group.component.mjs +17 -0
- package/esm2020/lib/table/cell/cell.mjs +15 -0
- package/esm2020/lib/table/cell/table-data-cell.component.mjs +26 -0
- package/esm2020/lib/table/cell/table-header-cell.component.mjs +12 -0
- package/esm2020/lib/table/column/table-column.directive.mjs +23 -0
- package/esm2020/lib/table/table-constants.library.mjs +4 -0
- package/esm2020/lib/table/table.component.mjs +36 -0
- package/esm2020/lib/table/table.module.mjs +32 -0
- package/esm2020/lib/toggle-switch/toggle-switch.component.mjs +96 -0
- package/esm2020/lib/toggle-switch/toggle-switch.module.mjs +16 -0
- package/fesm2015/ifsworld-granite-components.mjs +3145 -0
- package/fesm2015/ifsworld-granite-components.mjs.map +1 -0
- package/fesm2020/ifsworld-granite-components.mjs +3103 -0
- package/fesm2020/ifsworld-granite-components.mjs.map +1 -0
- package/ifsworld-granite-components.d.ts +1 -8
- package/lib/arrange-grid/arrange-grid-item.component.d.ts +3 -0
- package/lib/arrange-grid/arrange-grid.component.d.ts +3 -0
- package/lib/arrange-grid/arrange-grid.module.d.ts +7 -0
- package/lib/badge/badge.component.d.ts +3 -0
- package/lib/badge/badge.module.d.ts +6 -0
- package/lib/button/button.component.d.ts +5 -0
- package/lib/button/button.module.d.ts +5 -0
- package/lib/checkbox/checkbox-group.component.d.ts +3 -0
- package/lib/checkbox/checkbox.component.d.ts +3 -0
- package/lib/checkbox/checkbox.module.d.ts +6 -0
- package/lib/core/core.module.d.ts +8 -0
- package/lib/core/devices/client-input-desktop.directive.d.ts +3 -0
- package/lib/core/devices/client-input-touch.directive.d.ts +3 -0
- package/lib/core/devices/client-output-desktop.directive.d.ts +3 -0
- package/lib/core/devices/client-output-touch.directive.d.ts +3 -0
- package/lib/core/pipes/pure-pipes.module.d.ts +5 -0
- package/lib/core/pipes/title.pipe.d.ts +3 -0
- package/lib/core/radio-checkbox-base.d.ts +3 -0
- package/lib/grid/grid.component.d.ts +5 -0
- package/lib/grid/grid.module.d.ts +6 -0
- package/lib/icon/icon.component.d.ts +3 -0
- package/lib/icon/icon.module.d.ts +5 -0
- package/lib/input-field/input-field.component.d.ts +3 -0
- package/lib/input-field/input-field.module.d.ts +8 -0
- package/lib/menu/divider.directive.d.ts +3 -0
- package/lib/menu/menu-base.d.ts +190 -0
- package/lib/menu/menu-item.component.d.ts +3 -0
- package/lib/menu/menu-touch-close.component.d.ts +3 -0
- package/lib/menu/menu-touch-title.component.d.ts +4 -1
- package/lib/menu/menu-trigger-for.directive.d.ts +4 -1
- package/lib/menu/menu.component.d.ts +4 -187
- package/lib/menu/menu.module.d.ts +15 -0
- package/lib/menu/title.directive.d.ts +3 -0
- package/lib/radio-button/radio-button.component.d.ts +4 -1
- package/lib/radio-button/radio-button.module.d.ts +6 -0
- package/lib/radio-button/radio-group.component.d.ts +3 -0
- package/lib/table/cell/cell.d.ts +3 -0
- package/lib/table/cell/table-data-cell.component.d.ts +3 -0
- package/lib/table/cell/table-header-cell.component.d.ts +3 -0
- package/lib/table/column/table-column.directive.d.ts +3 -0
- package/lib/table/table.component.d.ts +3 -0
- package/lib/table/table.module.d.ts +12 -0
- package/lib/toggle-switch/toggle-switch.component.d.ts +3 -0
- package/lib/toggle-switch/toggle-switch.module.d.ts +5 -0
- package/package.json +26 -13
- package/bundles/ifsworld-granite-components.umd.js +0 -3649
- package/bundles/ifsworld-granite-components.umd.js.map +0 -1
- package/bundles/ifsworld-granite-components.umd.min.js +0 -10
- package/bundles/ifsworld-granite-components.umd.min.js.map +0 -1
- package/esm2015/ifsworld-granite-components.js +0 -13
- package/esm2015/ifsworld-granite-components.js.map +0 -1
- package/esm2015/ifsworld-granite-components.metadata.json +0 -1
- package/esm2015/index.js +0 -48
- package/esm2015/index.js.map +0 -1
- package/esm2015/index.metadata.json +0 -1
- package/esm2015/lib/arrange-grid/arrange-grid-item.component.js +0 -48
- package/esm2015/lib/arrange-grid/arrange-grid-item.component.js.map +0 -1
- package/esm2015/lib/arrange-grid/arrange-grid-item.component.metadata.json +0 -1
- package/esm2015/lib/arrange-grid/arrange-grid.component.js +0 -123
- package/esm2015/lib/arrange-grid/arrange-grid.component.js.map +0 -1
- package/esm2015/lib/arrange-grid/arrange-grid.component.metadata.json +0 -1
- package/esm2015/lib/arrange-grid/arrange-grid.module.js +0 -14
- package/esm2015/lib/arrange-grid/arrange-grid.module.js.map +0 -1
- package/esm2015/lib/arrange-grid/arrange-grid.module.metadata.json +0 -1
- package/esm2015/lib/badge/badge.component.js +0 -44
- package/esm2015/lib/badge/badge.component.js.map +0 -1
- package/esm2015/lib/badge/badge.component.metadata.json +0 -1
- package/esm2015/lib/badge/badge.module.js +0 -13
- package/esm2015/lib/badge/badge.module.js.map +0 -1
- package/esm2015/lib/badge/badge.module.metadata.json +0 -1
- package/esm2015/lib/badge/testing/badge.harness.js +0 -30
- package/esm2015/lib/badge/testing/badge.harness.js.map +0 -1
- package/esm2015/lib/badge/testing/badge.harness.metadata.json +0 -1
- package/esm2015/lib/button/button.component.js +0 -108
- package/esm2015/lib/button/button.component.js.map +0 -1
- package/esm2015/lib/button/button.component.metadata.json +0 -1
- package/esm2015/lib/button/button.module.js +0 -11
- package/esm2015/lib/button/button.module.js.map +0 -1
- package/esm2015/lib/button/button.module.metadata.json +0 -1
- package/esm2015/lib/checkbox/checkbox-group.component.js +0 -19
- package/esm2015/lib/checkbox/checkbox-group.component.js.map +0 -1
- package/esm2015/lib/checkbox/checkbox-group.component.metadata.json +0 -1
- package/esm2015/lib/checkbox/checkbox.component.js +0 -89
- package/esm2015/lib/checkbox/checkbox.component.js.map +0 -1
- package/esm2015/lib/checkbox/checkbox.component.metadata.json +0 -1
- package/esm2015/lib/checkbox/checkbox.module.js +0 -12
- package/esm2015/lib/checkbox/checkbox.module.js.map +0 -1
- package/esm2015/lib/checkbox/checkbox.module.metadata.json +0 -1
- package/esm2015/lib/core/animation.js +0 -34
- package/esm2015/lib/core/animation.js.map +0 -1
- package/esm2015/lib/core/animation.metadata.json +0 -1
- package/esm2015/lib/core/client-environment.js +0 -20
- package/esm2015/lib/core/client-environment.js.map +0 -1
- package/esm2015/lib/core/client-environment.metadata.json +0 -1
- package/esm2015/lib/core/common-behaviors/disabled.js +0 -25
- package/esm2015/lib/core/common-behaviors/disabled.js.map +0 -1
- package/esm2015/lib/core/common-behaviors/disabled.metadata.json +0 -1
- package/esm2015/lib/core/core.module.js +0 -25
- package/esm2015/lib/core/core.module.js.map +0 -1
- package/esm2015/lib/core/core.module.metadata.json +0 -1
- package/esm2015/lib/core/devices/client-input-desktop.directive.js +0 -22
- package/esm2015/lib/core/devices/client-input-desktop.directive.js.map +0 -1
- package/esm2015/lib/core/devices/client-input-desktop.directive.metadata.json +0 -1
- package/esm2015/lib/core/devices/client-input-touch.directive.js +0 -22
- package/esm2015/lib/core/devices/client-input-touch.directive.js.map +0 -1
- package/esm2015/lib/core/devices/client-input-touch.directive.metadata.json +0 -1
- package/esm2015/lib/core/devices/client-output-desktop.directive.js +0 -22
- package/esm2015/lib/core/devices/client-output-desktop.directive.js.map +0 -1
- package/esm2015/lib/core/devices/client-output-desktop.directive.metadata.json +0 -1
- package/esm2015/lib/core/devices/client-output-touch.directive.js +0 -22
- package/esm2015/lib/core/devices/client-output-touch.directive.js.map +0 -1
- package/esm2015/lib/core/devices/client-output-touch.directive.metadata.json +0 -1
- package/esm2015/lib/core/pipes/pure-pipes.module.js +0 -11
- package/esm2015/lib/core/pipes/pure-pipes.module.js.map +0 -1
- package/esm2015/lib/core/pipes/pure-pipes.module.metadata.json +0 -1
- package/esm2015/lib/core/pipes/title.pipe.js +0 -17
- package/esm2015/lib/core/pipes/title.pipe.js.map +0 -1
- package/esm2015/lib/core/pipes/title.pipe.metadata.json +0 -1
- package/esm2015/lib/core/radio-checkbox-base.js +0 -15
- package/esm2015/lib/core/radio-checkbox-base.js.map +0 -1
- package/esm2015/lib/core/radio-checkbox-base.metadata.json +0 -1
- package/esm2015/lib/core/theme.library.js +0 -59
- package/esm2015/lib/core/theme.library.js.map +0 -1
- package/esm2015/lib/core/theme.library.metadata.json +0 -1
- package/esm2015/lib/core/types.js +0 -2
- package/esm2015/lib/core/types.js.map +0 -1
- package/esm2015/lib/core/types.metadata.json +0 -1
- package/esm2015/lib/grid/grid.component.js +0 -131
- package/esm2015/lib/grid/grid.component.js.map +0 -1
- package/esm2015/lib/grid/grid.component.metadata.json +0 -1
- package/esm2015/lib/grid/grid.module.js +0 -13
- package/esm2015/lib/grid/grid.module.js.map +0 -1
- package/esm2015/lib/grid/grid.module.metadata.json +0 -1
- package/esm2015/lib/icon/icon.component.js +0 -48
- package/esm2015/lib/icon/icon.component.js.map +0 -1
- package/esm2015/lib/icon/icon.component.metadata.json +0 -1
- package/esm2015/lib/icon/icon.module.js +0 -11
- package/esm2015/lib/icon/icon.module.js.map +0 -1
- package/esm2015/lib/icon/icon.module.metadata.json +0 -1
- package/esm2015/lib/input-field/input-field.component.js +0 -144
- package/esm2015/lib/input-field/input-field.component.js.map +0 -1
- package/esm2015/lib/input-field/input-field.component.metadata.json +0 -1
- package/esm2015/lib/input-field/input-field.module.js +0 -15
- package/esm2015/lib/input-field/input-field.module.js.map +0 -1
- package/esm2015/lib/input-field/input-field.module.metadata.json +0 -1
- package/esm2015/lib/menu/divider.directive.js +0 -20
- package/esm2015/lib/menu/divider.directive.js.map +0 -1
- package/esm2015/lib/menu/divider.directive.metadata.json +0 -1
- package/esm2015/lib/menu/menu-desktop-animations.js +0 -23
- package/esm2015/lib/menu/menu-desktop-animations.js.map +0 -1
- package/esm2015/lib/menu/menu-desktop-animations.metadata.json +0 -1
- package/esm2015/lib/menu/menu-errors.js +0 -37
- package/esm2015/lib/menu/menu-errors.js.map +0 -1
- package/esm2015/lib/menu/menu-errors.metadata.json +0 -1
- package/esm2015/lib/menu/menu-item.component.js +0 -82
- package/esm2015/lib/menu/menu-item.component.js.map +0 -1
- package/esm2015/lib/menu/menu-item.component.metadata.json +0 -1
- package/esm2015/lib/menu/menu-panel.js +0 -7
- package/esm2015/lib/menu/menu-panel.js.map +0 -1
- package/esm2015/lib/menu/menu-panel.metadata.json +0 -1
- package/esm2015/lib/menu/menu-positions.js +0 -9
- package/esm2015/lib/menu/menu-positions.js.map +0 -1
- package/esm2015/lib/menu/menu-positions.metadata.json +0 -1
- package/esm2015/lib/menu/menu-touch-animations.js +0 -137
- package/esm2015/lib/menu/menu-touch-animations.js.map +0 -1
- package/esm2015/lib/menu/menu-touch-animations.metadata.json +0 -1
- package/esm2015/lib/menu/menu-touch-close.component.js +0 -16
- package/esm2015/lib/menu/menu-touch-close.component.js.map +0 -1
- package/esm2015/lib/menu/menu-touch-close.component.metadata.json +0 -1
- package/esm2015/lib/menu/menu-touch-title.component.js +0 -45
- package/esm2015/lib/menu/menu-touch-title.component.js.map +0 -1
- package/esm2015/lib/menu/menu-touch-title.component.metadata.json +0 -1
- package/esm2015/lib/menu/menu-trigger-for.directive.js +0 -684
- package/esm2015/lib/menu/menu-trigger-for.directive.js.map +0 -1
- package/esm2015/lib/menu/menu-trigger-for.directive.metadata.json +0 -1
- package/esm2015/lib/menu/menu.component.js +0 -362
- package/esm2015/lib/menu/menu.component.js.map +0 -1
- package/esm2015/lib/menu/menu.component.metadata.json +0 -1
- package/esm2015/lib/menu/menu.module.js +0 -38
- package/esm2015/lib/menu/menu.module.js.map +0 -1
- package/esm2015/lib/menu/menu.module.metadata.json +0 -1
- package/esm2015/lib/menu/testing/menu.harness.js +0 -133
- package/esm2015/lib/menu/testing/menu.harness.js.map +0 -1
- package/esm2015/lib/menu/testing/menu.harness.metadata.json +0 -1
- package/esm2015/lib/menu/title.directive.js +0 -13
- package/esm2015/lib/menu/title.directive.js.map +0 -1
- package/esm2015/lib/menu/title.directive.metadata.json +0 -1
- package/esm2015/lib/radio-button/radio-button.component.js +0 -110
- package/esm2015/lib/radio-button/radio-button.component.js.map +0 -1
- package/esm2015/lib/radio-button/radio-button.component.metadata.json +0 -1
- package/esm2015/lib/radio-button/radio-button.module.js +0 -12
- package/esm2015/lib/radio-button/radio-button.module.js.map +0 -1
- package/esm2015/lib/radio-button/radio-button.module.metadata.json +0 -1
- package/esm2015/lib/radio-button/radio-group.component.js +0 -19
- package/esm2015/lib/radio-button/radio-group.component.js.map +0 -1
- package/esm2015/lib/radio-button/radio-group.component.metadata.json +0 -1
- package/esm2015/lib/table/cell/cell.js +0 -12
- package/esm2015/lib/table/cell/cell.js.map +0 -1
- package/esm2015/lib/table/cell/cell.metadata.json +0 -1
- package/esm2015/lib/table/cell/table-data-cell.component.js +0 -21
- package/esm2015/lib/table/cell/table-data-cell.component.js.map +0 -1
- package/esm2015/lib/table/cell/table-data-cell.component.metadata.json +0 -1
- package/esm2015/lib/table/cell/table-header-cell.component.js +0 -13
- package/esm2015/lib/table/cell/table-header-cell.component.js.map +0 -1
- package/esm2015/lib/table/cell/table-header-cell.component.metadata.json +0 -1
- package/esm2015/lib/table/column/table-column.directive.js +0 -16
- package/esm2015/lib/table/column/table-column.directive.js.map +0 -1
- package/esm2015/lib/table/column/table-column.directive.metadata.json +0 -1
- package/esm2015/lib/table/table-constants.library.js +0 -4
- package/esm2015/lib/table/table-constants.library.js.map +0 -1
- package/esm2015/lib/table/table-constants.library.metadata.json +0 -1
- package/esm2015/lib/table/table.component.js +0 -28
- package/esm2015/lib/table/table.component.js.map +0 -1
- package/esm2015/lib/table/table.component.metadata.json +0 -1
- package/esm2015/lib/table/table.module.js +0 -24
- package/esm2015/lib/table/table.module.js.map +0 -1
- package/esm2015/lib/table/table.module.metadata.json +0 -1
- package/esm2015/lib/toggle-switch/toggle-switch.component.js +0 -89
- package/esm2015/lib/toggle-switch/toggle-switch.component.js.map +0 -1
- package/esm2015/lib/toggle-switch/toggle-switch.component.metadata.json +0 -1
- package/esm2015/lib/toggle-switch/toggle-switch.module.js +0 -11
- package/esm2015/lib/toggle-switch/toggle-switch.module.js.map +0 -1
- package/esm2015/lib/toggle-switch/toggle-switch.module.metadata.json +0 -1
- package/fesm2015/ifsworld-granite-components.js +0 -2992
- package/fesm2015/ifsworld-granite-components.js.map +0 -1
- package/ifsworld-granite-components.metadata.json +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.library.js","sourceRoot":"","sources":["../../../../../../libs/granite-components/src/lib/core/theme.library.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AACvC,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,CAAC,kEAAkE;AAE1G;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,MAAe,EAAE,EAAU;IACtD,MAAM,KAAK,GACT,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEjE,OAAO,KAAK,CAAC;AACf,CAAC;AAED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Tokens } from '@ifsworld/granite-tokens';\n\nexport const TOKEN_PREFIX = 'granite-';\nexport const TOKEN_PREFIX_OLD = 'fnd-'; // TODO: Remove this when all tokens have 'granite-' as the prefix\n\n/**\n * Get the theme that corresponds to a given ID\n */\nexport function getThemeById(themes: Theme[], id: string): Theme | undefined {\n const theme: Theme | undefined =\n id !== undefined ? themes.find((t) => t.id === id) : undefined;\n\n return theme;\n}\n\n/**\n * Apply a theme to a DOM element by iterating though all tokens,\n * setting a CSS variable for each one.\n *\n * @param theme Theme to set\n * @param element Target element\n */\nexport function applyTheme(theme: Theme, element: HTMLElement): void {\n applyTokens(theme.tokens, element);\n}\n\n/**\n * Set a CSS variable for each token on the specified element.\n *\n * @param theme Theme to set\n * @param element Target element\n */\nexport function applyTokens(tokens: Tokens, element: HTMLElement): void {\n for (const token of Object.keys(tokens)) {\n element.style.setProperty(token, tokens[token]);\n }\n}\n\n/**\n * Remove theme token CSS variables from an element using the specified keys\n *\n * @param theme Theme with tokens to clear\n * @param element Target element\n */\nexport function clearTheme(theme: Theme, element: HTMLElement): void {\n clearTokens(Object.keys(theme.tokens), element);\n}\n\n/**\n * Remove token CSS variables from an element using the specified keys.\n *\n * @param keys Token keys\n * @param element Target element\n */\nexport function clearTokens(keys: string[], element: HTMLElement): void {\n for (const token of keys) {\n element.style.removeProperty(token);\n }\n}\n\nexport function isValidToken(key: string): boolean {\n return (\n key && (key.startsWith(TOKEN_PREFIX) || key.startsWith(TOKEN_PREFIX_OLD))\n );\n}\n\nexport function setPropertyValue(\n name: string,\n value: string,\n element: HTMLElement\n): void {\n if (element && element.style && value != null) {\n element.style.setProperty(\n name,\n isValidToken(value) ? `var(--${value})` : value\n );\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"TOKEN_PREFIX":"granite-","TOKEN_PREFIX_OLD":"fnd-","getThemeById":{"__symbolic":"function"},"applyTheme":{"__symbolic":"function"},"applyTokens":{"__symbolic":"function"},"clearTheme":{"__symbolic":"function"},"clearTokens":{"__symbolic":"function"},"isValidToken":{"__symbolic":"function","parameters":["key"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"reference","name":"key"},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"key"},"member":"startsWith"},"arguments":["granite-"]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"key"},"member":"startsWith"},"arguments":["fnd-"]}}}},"setPropertyValue":{"__symbolic":"function"}}}]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../libs/granite-components/src/lib/core/types.ts"],"names":[],"mappings":"","sourcesContent":["export type Position = 'before' | 'after';\nexport type Layout = 'horizontal' | 'vertical';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"Position":{"__symbolic":"interface"},"Layout":{"__symbolic":"interface"}}}]
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ElementRef, Input, Renderer2, } from '@angular/core';
|
|
2
|
-
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
3
|
-
/**
|
|
4
|
-
* Grid item component
|
|
5
|
-
*
|
|
6
|
-
* Merely a wrapper for CSS Grid items, accepting item style as input parameters.
|
|
7
|
-
*/
|
|
8
|
-
export class GraniteGridItemComponent {
|
|
9
|
-
constructor(element, renderer) {
|
|
10
|
-
this.element = element;
|
|
11
|
-
this.renderer = renderer;
|
|
12
|
-
}
|
|
13
|
-
ngOnChanges() {
|
|
14
|
-
this.updateStyles();
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Update element styles
|
|
18
|
-
*/
|
|
19
|
-
updateStyles() {
|
|
20
|
-
this.setStyle('gridColumnStart', this.columnStart);
|
|
21
|
-
this.setStyle('gridColumnEnd', this.columnEnd);
|
|
22
|
-
this.setStyle('gridRowStart', this.rowStart);
|
|
23
|
-
this.setStyle('gridRowEnd', this.rowEnd);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Sets the element style. Needs to be set manually to avoid "Changed after
|
|
27
|
-
* checked" errors that would occur with HostBinding.
|
|
28
|
-
*/
|
|
29
|
-
setStyle(property, value) {
|
|
30
|
-
this.renderer.setStyle(this.element.nativeElement, property, value || '');
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
GraniteGridItemComponent.decorators = [
|
|
34
|
-
{ type: Component, args: [{
|
|
35
|
-
selector: 'granite-grid-item',
|
|
36
|
-
template: '<ng-content></ng-content>',
|
|
37
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
38
|
-
},] }
|
|
39
|
-
];
|
|
40
|
-
GraniteGridItemComponent.ctorParameters = () => [
|
|
41
|
-
{ type: ElementRef },
|
|
42
|
-
{ type: Renderer2 }
|
|
43
|
-
];
|
|
44
|
-
GraniteGridItemComponent.propDecorators = {
|
|
45
|
-
columnStart: [{ type: Input }],
|
|
46
|
-
columnEnd: [{ type: Input }],
|
|
47
|
-
rowStart: [{ type: Input }],
|
|
48
|
-
rowEnd: [{ type: Input }]
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Grid
|
|
52
|
-
*
|
|
53
|
-
* A wrapper around a native CSS Grid. Anything can be used for grid items, but
|
|
54
|
-
* `GridItemComponent` is recommended for common cases.
|
|
55
|
-
*/
|
|
56
|
-
export class GraniteGridComponent {
|
|
57
|
-
constructor(element) {
|
|
58
|
-
this.element = element;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Number of grid columns, unless set via styling (grid-template-columns)
|
|
62
|
-
*
|
|
63
|
-
* Setting this value will produce equally sized columns
|
|
64
|
-
*/
|
|
65
|
-
set cols(value) {
|
|
66
|
-
this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));
|
|
67
|
-
}
|
|
68
|
-
get cols() {
|
|
69
|
-
return this._cols;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Number of grid rows, unless set via styling (grid-template-rows)
|
|
73
|
-
*
|
|
74
|
-
* Setting this value will produce equally sized rows
|
|
75
|
-
*/
|
|
76
|
-
set rows(value) {
|
|
77
|
-
this._rows = Math.max(1, Math.round(coerceNumberProperty(value)));
|
|
78
|
-
}
|
|
79
|
-
get rows() {
|
|
80
|
-
return this._rows;
|
|
81
|
-
}
|
|
82
|
-
ngAfterContentInit() {
|
|
83
|
-
this.updateStyles();
|
|
84
|
-
}
|
|
85
|
-
ngOnChanges(changes) {
|
|
86
|
-
if ((changes.cols && !changes.cols.isFirstChange()) ||
|
|
87
|
-
(changes.rows && !changes.rows.isFirstChange())) {
|
|
88
|
-
this.updateStyles();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
/** Update element styles */
|
|
92
|
-
updateStyles() {
|
|
93
|
-
this.updateColumnStyles();
|
|
94
|
-
this.updateRowStyles();
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Set CSS variable value or remove it if a null value is given.
|
|
98
|
-
* Would of course rather have used property binding but that is not
|
|
99
|
-
* supported until (perhaps) Angular 9.
|
|
100
|
-
* See: https://github.com/angular/angular/issues/9343
|
|
101
|
-
*
|
|
102
|
-
* TODO: Replace with property binding with Angular 9 upgrade
|
|
103
|
-
*/
|
|
104
|
-
setCssProperty(variable, value) {
|
|
105
|
-
this.element.nativeElement.style.setProperty(variable, value);
|
|
106
|
-
}
|
|
107
|
-
/** Update grid column template style */
|
|
108
|
-
updateColumnStyles() {
|
|
109
|
-
this.setCssProperty('--cols', (this._cols && this._cols.toString()) || null);
|
|
110
|
-
}
|
|
111
|
-
/** Update grid row template style */
|
|
112
|
-
updateRowStyles() {
|
|
113
|
-
this.setCssProperty('--rows', (this._rows && this._rows.toString()) || null);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
GraniteGridComponent.decorators = [
|
|
117
|
-
{ type: Component, args: [{
|
|
118
|
-
selector: 'granite-grid',
|
|
119
|
-
template: '<ng-content></ng-content>',
|
|
120
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
121
|
-
styles: [":host{--cols:1;--rows:1;display:grid;grid-template-columns:repeat(var(--cols,1),1fr);grid-template-rows:repeat(var(--rows,1),1fr)}"]
|
|
122
|
-
},] }
|
|
123
|
-
];
|
|
124
|
-
GraniteGridComponent.ctorParameters = () => [
|
|
125
|
-
{ type: ElementRef }
|
|
126
|
-
];
|
|
127
|
-
GraniteGridComponent.propDecorators = {
|
|
128
|
-
cols: [{ type: Input }],
|
|
129
|
-
rows: [{ type: Input }]
|
|
130
|
-
};
|
|
131
|
-
//# sourceMappingURL=grid.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid.component.js","sourceRoot":"","sources":["../../../../../../libs/granite-components/src/lib/grid/grid.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,KAAK,EAEL,SAAS,GAEV,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;GAIG;AAMH,MAAM,OAAO,wBAAwB;IAanC,YACU,OAAgC,EAChC,QAAmB;QADnB,YAAO,GAAP,OAAO,CAAyB;QAChC,aAAQ,GAAR,QAAQ,CAAW;IAC1B,CAAC;IAEJ,WAAW;QACT,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,YAAY;QACV,IAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACnD,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAC/C,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,CAAC,YAAY,EA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EAAE,CAAC;YAC/C,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,EAC/C;YACA,IAAI,CAAC,YAAY,EAAE,CAAC;SACrB;IACH,CAAC;IAED,4BAA4B;IAC5B,YAAY;QACV,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAED;;;;;;;OAOG;IACO,cAAc,CAAC,QAAgB,EAAE,KAAoB;QAC7D,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,yCAAyC;IAC/B,kBAAkB;QAC1B,IAAI,CAAC,cAAc,CACjB,QAAQ,EACR,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,IAAI,CAC9C,CAAC;IACJ,CAAC;IAED,sCAAsC;IAC5B,eAAe;QACvB,IAAI,CAAC,cAAc,CACjB,QAAQ,EACR,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,IAAI,CAC9C,CAAC;IACJ,CAAC;;;YAxFF,SAAS,SAAC;gBACT,QAAQ,EAAE,cAAc;gBACxB,QAAQ,EAAE,2BAA2B;gBAErC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAChD;;;YAvEC,UAAU;;;mBA8ET,KAAK;mBAiBL,KAAK","sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n Renderer2,\n SimpleChanges,\n} from '@angular/core';\n\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\n\n/**\n * Grid item component\n *\n * Merely a wrapper for CSS Grid items, accepting item style as input parameters.\n */\n@Component({\n selector: 'granite-grid-item',\n template: '<ng-content></ng-content>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteGridItemComponent implements OnChanges {\n @Input()\n columnStart: number;\n\n @Input()\n columnEnd: number;\n\n @Input()\n rowStart: number;\n\n @Input()\n rowEnd: number;\n\n constructor(\n private element: ElementRef<HTMLElement>,\n private renderer: Renderer2\n ) {}\n\n ngOnChanges(): void {\n this.updateStyles();\n }\n\n /**\n * Update element styles\n */\n updateStyles(): void {\n this.setStyle('gridColumnStart', this.columnStart);\n this.setStyle('gridColumnEnd', this.columnEnd);\n this.setStyle('gridRowStart', this.rowStart);\n this.setStyle('gridRowEnd', this.rowEnd);\n }\n\n /**\n * Sets the element style. Needs to be set manually to avoid \"Changed after\n * checked\" errors that would occur with HostBinding.\n */\n private setStyle(property: string, value: any): void {\n this.renderer.setStyle(this.element.nativeElement, property, value || '');\n }\n}\n\n/**\n * Grid\n *\n * A wrapper around a native CSS Grid. Anything can be used for grid items, but\n * `GridItemComponent` is recommended for common cases.\n */\n@Component({\n selector: 'granite-grid',\n template: '<ng-content></ng-content>',\n styleUrls: ['grid.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteGridComponent implements AfterContentInit, OnChanges {\n /**\n * Number of grid columns, unless set via styling (grid-template-columns)\n *\n * Setting this value will produce equally sized columns\n */\n @Input()\n set cols(value: number) {\n this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));\n }\n\n get cols(): number {\n return this._cols;\n }\n\n /** Number of columns to render */\n protected _cols: number;\n\n /**\n * Number of grid rows, unless set via styling (grid-template-rows)\n *\n * Setting this value will produce equally sized rows\n */\n @Input()\n set rows(value: number) {\n this._rows = Math.max(1, Math.round(coerceNumberProperty(value)));\n }\n\n get rows(): number {\n return this._rows;\n }\n\n /** Number of rows to render */\n protected _rows: number;\n\n constructor(private element: ElementRef<HTMLElement>) {}\n\n ngAfterContentInit(): void {\n this.updateStyles();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (\n (changes.cols && !changes.cols.isFirstChange()) ||\n (changes.rows && !changes.rows.isFirstChange())\n ) {\n this.updateStyles();\n }\n }\n\n /** Update element styles */\n updateStyles(): void {\n this.updateColumnStyles();\n this.updateRowStyles();\n }\n\n /**\n * Set CSS variable value or remove it if a null value is given.\n * Would of course rather have used property binding but that is not\n * supported until (perhaps) Angular 9.\n * See: https://github.com/angular/angular/issues/9343\n *\n * TODO: Replace with property binding with Angular 9 upgrade\n */\n protected setCssProperty(variable: string, value: string | null): void {\n this.element.nativeElement.style.setProperty(variable, value);\n }\n\n /** Update grid column template style */\n protected updateColumnStyles(): void {\n this.setCssProperty(\n '--cols',\n (this._cols && this._cols.toString()) || null\n );\n }\n\n /** Update grid row template style */\n protected updateRowStyles(): void {\n this.setCssProperty(\n '--rows',\n (this._rows && this._rows.toString()) || null\n );\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GraniteGridItemComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":18,"character":1},"arguments":[{"selector":"granite-grid-item","template":"<ng-content></ng-content>","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":21,"character":19},"member":"OnPush"}}]}],"members":{"columnStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"columnEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"rowStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"rowEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":37,"character":21,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":111,"character":42,"context":{"typeName":"HTMLElement"}}]},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":38,"character":22}]}],"ngOnChanges":[{"__symbolic":"method"}],"updateStyles":[{"__symbolic":"method"}],"setStyle":[{"__symbolic":"method"}]}},"GraniteGridComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":70,"character":1},"arguments":[{"selector":"granite-grid","template":"<ng-content></ng-content>","changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":74,"character":19},"member":"OnPush"},"styles":[":host{--cols:1;--rows:1;display:grid;grid-template-columns:repeat(var(--cols,1),1fr);grid-template-rows:repeat(var(--rows,1),1fr)}"]}]}],"members":{"cols":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":82,"character":3}}]}],"rows":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":99,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":37,"character":21,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":111,"character":42,"context":{"typeName":"HTMLElement"}}]}]}],"ngAfterContentInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"updateStyles":[{"__symbolic":"method"}],"setCssProperty":[{"__symbolic":"method"}],"updateColumnStyles":[{"__symbolic":"method"}],"updateRowStyles":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { GraniteGridComponent, GraniteGridItemComponent, } from './grid.component';
|
|
4
|
-
export class GraniteGridModule {
|
|
5
|
-
}
|
|
6
|
-
GraniteGridModule.decorators = [
|
|
7
|
-
{ type: NgModule, args: [{
|
|
8
|
-
declarations: [GraniteGridComponent, GraniteGridItemComponent],
|
|
9
|
-
imports: [CommonModule],
|
|
10
|
-
exports: [GraniteGridComponent, GraniteGridItemComponent],
|
|
11
|
-
},] }
|
|
12
|
-
];
|
|
13
|
-
//# sourceMappingURL=grid.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid.module.js","sourceRoot":"","sources":["../../../../../../libs/granite-components/src/lib/grid/grid.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EACL,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAO1B,MAAM,OAAO,iBAAiB;;;YAL7B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;gBAC9D,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,OAAO,EAAE,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;aAC1D","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport {\n GraniteGridComponent,\n GraniteGridItemComponent,\n} from './grid.component';\n\n@NgModule({\n declarations: [GraniteGridComponent, GraniteGridItemComponent],\n imports: [CommonModule],\n exports: [GraniteGridComponent, GraniteGridItemComponent],\n})\nexport class GraniteGridModule {}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GraniteGridModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./grid.component","name":"GraniteGridComponent","line":9,"character":17},{"__symbolic":"reference","module":"./grid.component","name":"GraniteGridItemComponent","line":9,"character":39}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":10,"character":12}],"exports":[{"__symbolic":"reference","module":"./grid.component","name":"GraniteGridComponent","line":11,"character":12},{"__symbolic":"reference","module":"./grid.component","name":"GraniteGridItemComponent","line":11,"character":34}]}]}]}}}]
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Attribute, ChangeDetectionStrategy, Component, ElementRef, Input, Renderer2, } from '@angular/core';
|
|
2
|
-
export class GraniteIconComponent {
|
|
3
|
-
constructor(_elementRef, renderer, ariaHidden) {
|
|
4
|
-
this._elementRef = _elementRef;
|
|
5
|
-
this.renderer = renderer;
|
|
6
|
-
// aria-hidden will be set to true by default, unless it's overridden by the developer
|
|
7
|
-
if (!ariaHidden) {
|
|
8
|
-
this.renderer.setAttribute(_elementRef.nativeElement, 'aria-hidden', 'true');
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
ngOnChanges(changes) {
|
|
12
|
-
if (changes.fontIcon) {
|
|
13
|
-
this._updateFontIcon();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
_updateFontIcon() {
|
|
17
|
-
if (this.fontIcon !== this._previousFontIconClass) {
|
|
18
|
-
if (this._previousFontIconClass) {
|
|
19
|
-
this.renderer.removeClass(this._elementRef.nativeElement, this._previousFontIconClass);
|
|
20
|
-
}
|
|
21
|
-
if (this.fontIcon) {
|
|
22
|
-
this.renderer.addClass(this._elementRef.nativeElement, this.fontIcon);
|
|
23
|
-
}
|
|
24
|
-
this._previousFontIconClass = this.fontIcon;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
GraniteIconComponent.decorators = [
|
|
29
|
-
{ type: Component, args: [{
|
|
30
|
-
selector: 'granite-icon',
|
|
31
|
-
template: '<ng-content></ng-content>',
|
|
32
|
-
host: {
|
|
33
|
-
role: 'img',
|
|
34
|
-
class: 'granite-icon',
|
|
35
|
-
},
|
|
36
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
37
|
-
styles: [":host.granite-icon{background-repeat:no-repeat;display:inline-block;padding:0 calc(var(--granite-spacing-xs) / 2);font-size:1em;line-height:1em;position:relative;top:.1em}"]
|
|
38
|
-
},] }
|
|
39
|
-
];
|
|
40
|
-
GraniteIconComponent.ctorParameters = () => [
|
|
41
|
-
{ type: ElementRef },
|
|
42
|
-
{ type: Renderer2 },
|
|
43
|
-
{ type: String, decorators: [{ type: Attribute, args: ['aria-hidden',] }] }
|
|
44
|
-
];
|
|
45
|
-
GraniteIconComponent.propDecorators = {
|
|
46
|
-
fontIcon: [{ type: Input }]
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=icon.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.component.js","sourceRoot":"","sources":["../../../../../../libs/granite-components/src/lib/icon/icon.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,KAAK,EAEL,SAAS,GAEV,MAAM,eAAe,CAAC;AAYvB,MAAM,OAAO,oBAAoB;IAM/B,YACS,WAAuB,EACtB,QAAmB,EACD,UAAkB;QAFrC,gBAAW,GAAX,WAAW,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAW;QAG3B,sFAAsF;QACtF,IAAI,CAAC,UAAU,EAAE;YACf,IAAI,CAAC,QAAQ,CAAC,YAAY,CACxB,WAAW,CAAC,aAAa,EACzB,aAAa,EACb,MAAM,CACP,CAAC;SACH;IACH,CAAC;IAED,WAAW,CAAC,OAAsB;QAChC,IAAI,OAAO,CAAC,QAAQ,EAAE;YACpB,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;IACH,CAAC;IAEO,eAAe;QACrB,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,sBAAsB,EAAE;YACjD,IAAI,IAAI,CAAC,sBAAsB,EAAE;gBAC/B,IAAI,CAAC,QAAQ,CAAC,WAAW,CACvB,IAAI,CAAC,WAAW,CAAC,aAAa,EAC9B,IAAI,CAAC,sBAAsB,CAC5B,CAAC;aACH;YACD,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;aACvE;YACD,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,QAAQ,CAAC;SAC7C;IACH,CAAC;;;YAlDF,SAAS,SAAC;gBACT,QAAQ,EAAE,cAAc;gBACxB,QAAQ,EAAE,2BAA2B;gBAErC,IAAI,EAAE;oBACJ,IAAI,EAAE,KAAK;oBACX,KAAK,EAAE,cAAc;iBACtB;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAChD;;;YAhBC,UAAU;YAGV,SAAS;yCAuBN,SAAS,SAAC,aAAa;;;uBARzB,KAAK","sourcesContent":["import {\n Attribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n Renderer2,\n SimpleChanges,\n} from '@angular/core';\n\n@Component({\n selector: 'granite-icon',\n template: '<ng-content></ng-content>',\n styleUrls: ['./icon.component.scss'],\n host: {\n role: 'img',\n class: 'granite-icon',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteIconComponent implements OnChanges {\n @Input()\n fontIcon: string;\n\n private _previousFontIconClass: string;\n\n constructor(\n public _elementRef: ElementRef,\n private renderer: Renderer2,\n @Attribute('aria-hidden') ariaHidden: string\n ) {\n // aria-hidden will be set to true by default, unless it's overridden by the developer\n if (!ariaHidden) {\n this.renderer.setAttribute(\n _elementRef.nativeElement,\n 'aria-hidden',\n 'true'\n );\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.fontIcon) {\n this._updateFontIcon();\n }\n }\n\n private _updateFontIcon(): void {\n if (this.fontIcon !== this._previousFontIconClass) {\n if (this._previousFontIconClass) {\n this.renderer.removeClass(\n this._elementRef.nativeElement,\n this._previousFontIconClass\n );\n }\n if (this.fontIcon) {\n this.renderer.addClass(this._elementRef.nativeElement, this.fontIcon);\n }\n this._previousFontIconClass = this.fontIcon;\n }\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GraniteIconComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"granite-icon","template":"<ng-content></ng-content>","host":{"role":"img","class":"granite-icon"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":19,"character":19},"member":"OnPush"},"styles":[":host.granite-icon{background-repeat:no-repeat;display:inline-block;padding:0 calc(var(--granite-spacing-xs) / 2);font-size:1em;line-height:1em;position:relative;top:.1em}"]}]}],"members":{"fontIcon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Attribute","line":30,"character":5},"arguments":["aria-hidden"]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":28,"character":24},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":29,"character":22},{"__symbolic":"reference","name":"string"}]}],"ngOnChanges":[{"__symbolic":"method"}],"_updateFontIcon":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { GraniteIconComponent } from './icon.component';
|
|
3
|
-
export class GraniteIconModule {
|
|
4
|
-
}
|
|
5
|
-
GraniteIconModule.decorators = [
|
|
6
|
-
{ type: NgModule, args: [{
|
|
7
|
-
declarations: [GraniteIconComponent],
|
|
8
|
-
exports: [GraniteIconComponent],
|
|
9
|
-
},] }
|
|
10
|
-
];
|
|
11
|
-
//# sourceMappingURL=icon.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.module.js","sourceRoot":"","sources":["../../../../../../libs/granite-components/src/lib/icon/icon.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAMxD,MAAM,OAAO,iBAAiB;;;YAJ7B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;gBACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;aAChC","sourcesContent":["import { NgModule } from '@angular/core';\nimport { GraniteIconComponent } from './icon.component';\n\n@NgModule({\n declarations: [GraniteIconComponent],\n exports: [GraniteIconComponent],\n})\nexport class GraniteIconModule {}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GraniteIconModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./icon.component","name":"GraniteIconComponent","line":4,"character":17}],"exports":[{"__symbolic":"reference","module":"./icon.component","name":"GraniteIconComponent","line":5,"character":12}]}]}]}}}]
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
2
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
3
|
-
import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Output, ViewChild, } from '@angular/core';
|
|
4
|
-
const GRANITE_INPUT_INCLUDES = ['text', 'number', 'password', 'textarea'];
|
|
5
|
-
export class GraniteInputFieldComponent {
|
|
6
|
-
constructor(_focusMonitor) {
|
|
7
|
-
this._focusMonitor = _focusMonitor;
|
|
8
|
-
this.id = null;
|
|
9
|
-
this.name = null;
|
|
10
|
-
this.type = 'text';
|
|
11
|
-
this.value = '';
|
|
12
|
-
this.required = false;
|
|
13
|
-
this.readonly = false;
|
|
14
|
-
this.invalid = false;
|
|
15
|
-
this.disabled = false;
|
|
16
|
-
this.placeholder = '';
|
|
17
|
-
this.maxlength = 255;
|
|
18
|
-
this.countcharacters = false;
|
|
19
|
-
this.ariaLabel = null;
|
|
20
|
-
this.ariaLabelledby = null;
|
|
21
|
-
this.valueChange = new EventEmitter();
|
|
22
|
-
this._supported = true;
|
|
23
|
-
this._empty = false;
|
|
24
|
-
this._passwordFieldIcon = 'view';
|
|
25
|
-
this._passwordField = false;
|
|
26
|
-
this._currentCharCount = 0;
|
|
27
|
-
this._passwordToggled = false;
|
|
28
|
-
}
|
|
29
|
-
ngOnInit() {
|
|
30
|
-
this._validateType();
|
|
31
|
-
this._passwordField = this.type == 'password';
|
|
32
|
-
this._empty = this.value == null || this.value === '';
|
|
33
|
-
}
|
|
34
|
-
ngOnChanges(changes) {
|
|
35
|
-
if (changes.required) {
|
|
36
|
-
this.required = coerceBooleanProperty(changes.required.currentValue);
|
|
37
|
-
}
|
|
38
|
-
if (changes.readonly) {
|
|
39
|
-
this.readonly = coerceBooleanProperty(changes.readonly.currentValue);
|
|
40
|
-
}
|
|
41
|
-
if (changes.invalid) {
|
|
42
|
-
this.invalid = coerceBooleanProperty(changes.invalid.currentValue);
|
|
43
|
-
}
|
|
44
|
-
if (changes.disabled) {
|
|
45
|
-
this.disabled = coerceBooleanProperty(changes.disabled.currentValue);
|
|
46
|
-
}
|
|
47
|
-
if (changes.countcharacters) {
|
|
48
|
-
this.countcharacters = coerceBooleanProperty(changes.countcharacters.currentValue);
|
|
49
|
-
}
|
|
50
|
-
if (changes.value) {
|
|
51
|
-
this._empty = this.value == null || this.value === '';
|
|
52
|
-
}
|
|
53
|
-
if (changes.type) {
|
|
54
|
-
this._validateType();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
focus(origin = 'program', options) {
|
|
58
|
-
if (this.type === 'text') {
|
|
59
|
-
this._focusMonitor.focusVia(this._getInputElement(), origin, options);
|
|
60
|
-
}
|
|
61
|
-
else if (this.type === 'textarea') {
|
|
62
|
-
this._focusMonitor.focusVia(this._getTextareaElement(), origin, options);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
_togglePassword() {
|
|
66
|
-
if (this._passwordToggled) {
|
|
67
|
-
this._passwordToggled = false;
|
|
68
|
-
this.type = 'password';
|
|
69
|
-
this._passwordFieldIcon = 'view';
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
this._passwordToggled = true;
|
|
73
|
-
this.type = 'text';
|
|
74
|
-
this._passwordFieldIcon = 'view-disabled';
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
_onKeyUp(event) {
|
|
78
|
-
const inputEvent = event.target;
|
|
79
|
-
this._applyCharacterCount(inputEvent.value);
|
|
80
|
-
this._empty = inputEvent.value == null || inputEvent.value === '';
|
|
81
|
-
this.valueChange.emit(inputEvent.value);
|
|
82
|
-
}
|
|
83
|
-
_onInput(event) {
|
|
84
|
-
const inputEvent = event.target;
|
|
85
|
-
this._empty = inputEvent.value == null || inputEvent.value === '';
|
|
86
|
-
this.valueChange.emit(inputEvent.value);
|
|
87
|
-
}
|
|
88
|
-
_validateType() {
|
|
89
|
-
if (GRANITE_INPUT_INCLUDES.indexOf(this.type) < 0) {
|
|
90
|
-
this._supported = false;
|
|
91
|
-
throw Error(`Input type "${this.type}" isn't supported by graniteInputField.`);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
_applyCharacterCount(inputString) {
|
|
95
|
-
if (this.countcharacters) {
|
|
96
|
-
this._currentCharCount = inputString.length;
|
|
97
|
-
if (this._currentCharCount > this.maxlength) {
|
|
98
|
-
inputString = inputString.slice(0, this.maxlength);
|
|
99
|
-
this._currentCharCount = this.maxlength;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
_getInputElement() {
|
|
104
|
-
return this._inputElement.nativeElement;
|
|
105
|
-
}
|
|
106
|
-
_getTextareaElement() {
|
|
107
|
-
return this._textareaElement.nativeElement;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
GraniteInputFieldComponent.decorators = [
|
|
111
|
-
{ type: Component, args: [{
|
|
112
|
-
selector: 'granite-input-field',
|
|
113
|
-
exportAs: 'graniteInputField',
|
|
114
|
-
template: "<div\n *ngIf=\"_supported\"\n class=\"granite-input-container\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n>\n <div\n class=\"granite-input-top-row\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n >\n <div\n *ngIf=\"prefixicon\"\n class=\"granite-input-prepend\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n >\n <granite-icon class=\"granite-input-prepend-icon\">\n {{ prefixicon }}\n </granite-icon>\n </div>\n\n <ng-container\n *ngIf=\"type != 'textarea'; then inputElement; else textareaElement\"\n ></ng-container>\n\n <ng-template #inputElement>\n <input\n #input\n [id]=\"id\"\n class=\"granite-input-base\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxlength\"\n [value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-invalid]=\"invalid\"\n (keyup)=\"_onKeyUp($event)\"\n (input)=\"_onInput($event)\"\n />\n </ng-template>\n\n <button\n *ngIf=\"_passwordField\"\n class=\"granite-input-append\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n (click)=\"_togglePassword()\"\n >\n <granite-icon class=\"granite-input-password-toggle-icon\">\n {{ _passwordFieldIcon }}\n </granite-icon>\n </button>\n\n <ng-template #textareaElement>\n <textarea\n #textarea\n [id]=\"id\"\n class=\"granite-input-base granite-text-area\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n rows=\"1\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [value]=\"value\"\n [attr.maxlength]=\"maxlength\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-required]=\"required\"\n [attr.aria-invalid]=\"invalid\"\n (keyup)=\"_onKeyUp($event)\"\n (input)=\"_onInput($event)\"\n ></textarea>\n </ng-template>\n\n <div\n class=\"granite-input-hover-bar\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n ></div>\n </div>\n\n <div *ngIf=\"countcharacters\" class=\"granite-input-bottom-row\">\n <div class=\"granite-input-char-count\">\n {{ _currentCharCount }}/{{ maxlength }}\n </div>\n </div>\n</div>\n",
|
|
115
|
-
host: {
|
|
116
|
-
class: 'granite-input-field',
|
|
117
|
-
},
|
|
118
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
119
|
-
styles: [":host{transition:all .2s ease-out;width:14.5rem;box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}.granite-input-container{width:inherit;font-size:var(--granite-font-size-body-small)}.granite-input-container .granite-input-top-row{display:inline-flex;width:inherit;position:relative;background:var(--granite-color-background)}.granite-input-container .granite-input-top-row:hover .granite-input-hover-bar{height:.125rem}.granite-input-container .granite-input-top-row:hover .granite-input-hover-bar.granite-input-invalid.granite-input-empty{background-color:var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-text-area{min-width:14.5rem;min-height:2rem}.granite-input-container .granite-input-top-row.granite-input-disabled,.granite-input-container .granite-input-top-row.granite-input-readonly{background-color:transparent;box-shadow:none}.granite-input-container .granite-input-top-row.granite-input-disabled .granite-input-hover-bar,.granite-input-container .granite-input-top-row.granite-input-readonly .granite-input-hover-bar{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);padding:var(--granite-spacing-s);width:inherit;color:var(--granite-color-text);font:inherit;font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-regular)}.granite-input-container .granite-input-top-row .granite-input-base:required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-top-row .granite-input-base:required::-moz-placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:required::placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:-moz-read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:disabled{opacity:.3}.granite-input-container .granite-input-top-row .granite-input-base::-moz-placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base::placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base:hover::-moz-placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:hover::placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus.granite-input-invalid{box-shadow:inset 0 -.125rem var(--granite-color-signal-failure),inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus::-moz-placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:focus::placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-hover-bar{height:.0625rem;background-color:var(--granite-color-border-hard);position:absolute;width:inherit;bottom:0}.granite-input-container .granite-input-top-row .granite-input-hover-bar.granite-input-invalid{background-color:var(--granite-color-signal-failure)}.granite-input-container .granite-input-top-row:focus-within .granite-input-hover-bar{background-color:transparent}.granite-input-container .granite-input-prepend{display:flex;align-items:center;padding:0 var(--granite-spacing-s);background:var(--granite-color-background-input)}.granite-input-container .granite-input-prepend .granite-input-prepend-icon{width:1rem;height:1rem;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-prepend.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-append{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);position:relative}.granite-input-container .granite-input-append:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-append .granite-input-password-toggle-icon{width:-webkit-max-content;width:-moz-max-content;width:max-content;height:-webkit-max-content;height:-moz-max-content;height:max-content;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-append.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-bottom-row{box-shadow:none}.granite-input-container .granite-input-char-count{background:var(--granite-color-background-warning);border-radius:0 0 .25rem .25rem;padding:var(--granite-spacing-s);background-size:contain;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;box-shadow:none}.granite-input-container.granite-input-disabled,.granite-input-container.granite-input-readonly{background-color:transparent}"]
|
|
120
|
-
},] }
|
|
121
|
-
];
|
|
122
|
-
GraniteInputFieldComponent.ctorParameters = () => [
|
|
123
|
-
{ type: FocusMonitor }
|
|
124
|
-
];
|
|
125
|
-
GraniteInputFieldComponent.propDecorators = {
|
|
126
|
-
id: [{ type: Input }],
|
|
127
|
-
name: [{ type: Input }],
|
|
128
|
-
type: [{ type: Input }],
|
|
129
|
-
value: [{ type: Input }],
|
|
130
|
-
required: [{ type: Input }],
|
|
131
|
-
readonly: [{ type: Input }],
|
|
132
|
-
invalid: [{ type: Input }],
|
|
133
|
-
disabled: [{ type: Input }],
|
|
134
|
-
placeholder: [{ type: Input }],
|
|
135
|
-
prefixicon: [{ type: Input }],
|
|
136
|
-
maxlength: [{ type: Input }],
|
|
137
|
-
countcharacters: [{ type: Input }],
|
|
138
|
-
ariaLabel: [{ type: Input, args: ['aria-label',] }],
|
|
139
|
-
ariaLabelledby: [{ type: Input, args: ['aria-labelledby',] }],
|
|
140
|
-
valueChange: [{ type: Output }],
|
|
141
|
-
_inputElement: [{ type: ViewChild, args: ['input',] }],
|
|
142
|
-
_textareaElement: [{ type: ViewChild, args: ['textarea',] }]
|
|
143
|
-
};
|
|
144
|
-
//# sourceMappingURL=input-field.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-field.component.js","sourceRoot":"","sources":["../../../../../../libs/granite-components/src/lib/input-field/input-field.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,EAGL,MAAM,EAEN,SAAS,GACV,MAAM,eAAe,CAAC;AAEvB,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAY1E,MAAM,OAAO,0BAA0B;IA2DrC,YAAoB,aAA2B;QAA3B,kBAAa,GAAb,aAAa,CAAc;QAzD/C,OAAE,GAAkB,IAAI,CAAC;QAGzB,SAAI,GAAkB,IAAI,CAAC;QAG3B,SAAI,GAAW,MAAM,CAAC;QAGtB,UAAK,GAAoB,EAA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AAC;IAC7C,CAAC;;;YA1KF,SAAS,SAAC;gBACT,QAAQ,EAAE,qBAAqB;gBAC/B,QAAQ,EAAE,mBAAmB;gBAC7B,uoGAA2C;gBAE3C,IAAI,EAAE;oBACJ,KAAK,EAAE,qBAAqB;iBAC7B;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAChD;;;YA1BQ,YAAY;;;iBA4BlB,KAAK;mBAGL,KAAK;mBAGL,KAAK;oBAGL,KAAK;uBAGL,KAAK;uBAGL,KAAK;sBAGL,KAAK;uBAGL,KAAK;0BAGL,KAAK;yBAGL,KAAK;wBAGL,KAAK;8BAGL,KAAK;wBAGL,KAAK,SAAC,YAAY;6BAGlB,KAAK,SAAC,iBAAiB;0BAGvB,MAAM;4BAGN,SAAS,SAAC,OAAO;+BAGjB,SAAS,SAAC,UAAU","sourcesContent":["import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\n\nconst GRANITE_INPUT_INCLUDES = ['text', 'number', 'password', 'textarea'];\n\n@Component({\n selector: 'granite-input-field',\n exportAs: 'graniteInputField',\n templateUrl: './input-field.component.html',\n styleUrls: ['./input-field.component.scss'],\n host: {\n class: 'granite-input-field',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GraniteInputFieldComponent implements OnInit, OnChanges {\n @Input()\n id: string | null = null;\n\n @Input()\n name: string | null = null;\n\n @Input()\n type: string = 'text';\n\n @Input()\n value: string | number = '';\n\n @Input()\n required: boolean = false;\n\n @Input()\n readonly: boolean = false;\n\n @Input()\n invalid: boolean = false;\n\n @Input()\n disabled: boolean = false;\n\n @Input()\n placeholder: string = '';\n\n @Input()\n prefixicon: string;\n\n @Input()\n maxlength: number = 255;\n\n @Input()\n countcharacters: boolean = false;\n\n @Input('aria-label')\n ariaLabel: string | null = null;\n\n @Input('aria-labelledby')\n ariaLabelledby: string | null = null;\n\n @Output()\n readonly valueChange: EventEmitter<string> = new EventEmitter<string>();\n\n @ViewChild('input')\n private _inputElement: ElementRef<HTMLInputElement>;\n\n @ViewChild('textarea')\n private _textareaElement: ElementRef<HTMLTextAreaElement>;\n\n _supported: boolean = true;\n _empty: boolean = false;\n _passwordFieldIcon: string = 'view';\n _passwordField: boolean = false;\n _currentCharCount = 0;\n private _passwordToggled: boolean = false;\n\n constructor(private _focusMonitor: FocusMonitor) {}\n\n ngOnInit(): void {\n this._validateType();\n\n this._passwordField = this.type == 'password';\n\n this._empty = this.value == null || this.value === '';\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.required) {\n this.required = coerceBooleanProperty(changes.required.currentValue);\n }\n\n if (changes.readonly) {\n this.readonly = coerceBooleanProperty(changes.readonly.currentValue);\n }\n\n if (changes.invalid) {\n this.invalid = coerceBooleanProperty(changes.invalid.currentValue);\n }\n\n if (changes.disabled) {\n this.disabled = coerceBooleanProperty(changes.disabled.currentValue);\n }\n\n if (changes.countcharacters) {\n this.countcharacters = coerceBooleanProperty(\n changes.countcharacters.currentValue\n );\n }\n\n if (changes.value) {\n this._empty = this.value == null || this.value === '';\n }\n\n if (changes.type) {\n this._validateType();\n }\n }\n\n focus(origin: FocusOrigin = 'program', options?: FocusOptions): void {\n if (this.type === 'text') {\n this._focusMonitor.focusVia(this._getInputElement(), origin, options);\n } else if (this.type === 'textarea') {\n this._focusMonitor.focusVia(this._getTextareaElement(), origin, options);\n }\n }\n\n _togglePassword(): void {\n if (this._passwordToggled) {\n this._passwordToggled = false;\n this.type = 'password';\n this._passwordFieldIcon = 'view';\n } else {\n this._passwordToggled = true;\n this.type = 'text';\n this._passwordFieldIcon = 'view-disabled';\n }\n }\n\n _onKeyUp(event: KeyboardEvent): void {\n const inputEvent = event.target as HTMLInputElement;\n this._applyCharacterCount(inputEvent.value);\n this._empty = inputEvent.value == null || inputEvent.value === '';\n this.valueChange.emit(inputEvent.value);\n }\n\n _onInput(event: Event): void {\n const inputEvent = event.target as HTMLInputElement;\n this._empty = inputEvent.value == null || inputEvent.value === '';\n this.valueChange.emit(inputEvent.value);\n }\n\n protected _validateType(): void {\n if (GRANITE_INPUT_INCLUDES.indexOf(this.type) < 0) {\n this._supported = false;\n throw Error(\n `Input type \"${this.type}\" isn't supported by graniteInputField.`\n );\n }\n }\n\n private _applyCharacterCount(inputString: string): void {\n if (this.countcharacters) {\n this._currentCharCount = inputString.length;\n\n if (this._currentCharCount > this.maxlength) {\n inputString = inputString.slice(0, this.maxlength);\n this._currentCharCount = this.maxlength;\n }\n }\n }\n\n private _getInputElement(): HTMLInputElement {\n return this._inputElement.nativeElement;\n }\n\n private _getTextareaElement(): HTMLTextAreaElement {\n return this._textareaElement.nativeElement;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GraniteInputFieldComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":17,"character":1},"arguments":[{"selector":"granite-input-field","exportAs":"graniteInputField","host":{"class":"granite-input-field"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":25,"character":19},"member":"OnPush"},"template":"<div\n *ngIf=\"_supported\"\n class=\"granite-input-container\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n>\n <div\n class=\"granite-input-top-row\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n [class.granite-input-disabled]=\"disabled\"\n [class.granite-input-readonly]=\"readonly\"\n >\n <div\n *ngIf=\"prefixicon\"\n class=\"granite-input-prepend\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n >\n <granite-icon class=\"granite-input-prepend-icon\">\n {{ prefixicon }}\n </granite-icon>\n </div>\n\n <ng-container\n *ngIf=\"type != 'textarea'; then inputElement; else textareaElement\"\n ></ng-container>\n\n <ng-template #inputElement>\n <input\n #input\n [id]=\"id\"\n class=\"granite-input-base\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxlength\"\n [value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-invalid]=\"invalid\"\n (keyup)=\"_onKeyUp($event)\"\n (input)=\"_onInput($event)\"\n />\n </ng-template>\n\n <button\n *ngIf=\"_passwordField\"\n class=\"granite-input-append\"\n [class.granite-input-required]=\"required\"\n [class.granite-input-empty]=\"_empty\"\n (click)=\"_togglePassword()\"\n >\n <granite-icon class=\"granite-input-password-toggle-icon\">\n {{ _passwordFieldIcon }}\n </granite-icon>\n </button>\n\n <ng-template #textareaElement>\n <textarea\n #textarea\n [id]=\"id\"\n class=\"granite-input-base granite-text-area\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n rows=\"1\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [value]=\"value\"\n [attr.maxlength]=\"maxlength\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-required]=\"required\"\n [attr.aria-invalid]=\"invalid\"\n (keyup)=\"_onKeyUp($event)\"\n (input)=\"_onInput($event)\"\n ></textarea>\n </ng-template>\n\n <div\n class=\"granite-input-hover-bar\"\n [class.granite-input-invalid]=\"invalid\"\n [class.granite-input-empty]=\"_empty\"\n ></div>\n </div>\n\n <div *ngIf=\"countcharacters\" class=\"granite-input-bottom-row\">\n <div class=\"granite-input-char-count\">\n {{ _currentCharCount }}/{{ maxlength }}\n </div>\n </div>\n</div>\n","styles":[":host{transition:all .2s ease-out;width:14.5rem;box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}.granite-input-container{width:inherit;font-size:var(--granite-font-size-body-small)}.granite-input-container .granite-input-top-row{display:inline-flex;width:inherit;position:relative;background:var(--granite-color-background)}.granite-input-container .granite-input-top-row:hover .granite-input-hover-bar{height:.125rem}.granite-input-container .granite-input-top-row:hover .granite-input-hover-bar.granite-input-invalid.granite-input-empty{background-color:var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-text-area{min-width:14.5rem;min-height:2rem}.granite-input-container .granite-input-top-row.granite-input-disabled,.granite-input-container .granite-input-top-row.granite-input-readonly{background-color:transparent;box-shadow:none}.granite-input-container .granite-input-top-row.granite-input-disabled .granite-input-hover-bar,.granite-input-container .granite-input-top-row.granite-input-readonly .granite-input-hover-bar{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);padding:var(--granite-spacing-s);width:inherit;color:var(--granite-color-text);font:inherit;font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-regular)}.granite-input-container .granite-input-top-row .granite-input-base:required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-top-row .granite-input-base:required::-moz-placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:required::placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:-moz-read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:disabled{opacity:.3}.granite-input-container .granite-input-top-row .granite-input-base::-moz-placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base::placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base:hover::-moz-placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:hover::placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus.granite-input-invalid{box-shadow:inset 0 -.125rem var(--granite-color-signal-failure),inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus::-moz-placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:focus::placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-hover-bar{height:.0625rem;background-color:var(--granite-color-border-hard);position:absolute;width:inherit;bottom:0}.granite-input-container .granite-input-top-row .granite-input-hover-bar.granite-input-invalid{background-color:var(--granite-color-signal-failure)}.granite-input-container .granite-input-top-row:focus-within .granite-input-hover-bar{background-color:transparent}.granite-input-container .granite-input-prepend{display:flex;align-items:center;padding:0 var(--granite-spacing-s);background:var(--granite-color-background-input)}.granite-input-container .granite-input-prepend .granite-input-prepend-icon{width:1rem;height:1rem;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-prepend.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-append{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);position:relative}.granite-input-container .granite-input-append:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-append .granite-input-password-toggle-icon{width:-webkit-max-content;width:-moz-max-content;width:max-content;height:-webkit-max-content;height:-moz-max-content;height:max-content;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-append.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-bottom-row{box-shadow:none}.granite-input-container .granite-input-char-count{background:var(--granite-color-background-warning);border-radius:0 0 .25rem .25rem;padding:var(--granite-spacing-s);background-size:contain;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;box-shadow:none}.granite-input-container.granite-input-disabled,.granite-input-container.granite-input-readonly{background-color:transparent}"]}]}],"members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}}]}],"invalid":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":52,"character":3}}]}],"prefixicon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":55,"character":3}}]}],"maxlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":58,"character":3}}]}],"countcharacters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":3}}]}],"ariaLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":3},"arguments":["aria-label"]}]}],"ariaLabelledby":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":3},"arguments":["aria-labelledby"]}]}],"valueChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":70,"character":3}}]}],"_inputElement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":73,"character":3},"arguments":["input"]}]}],"_textareaElement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":76,"character":3},"arguments":["textarea"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"FocusMonitor","line":86,"character":37}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"focus":[{"__symbolic":"method"}],"_togglePassword":[{"__symbolic":"method"}],"_onKeyUp":[{"__symbolic":"method"}],"_onInput":[{"__symbolic":"method"}],"_validateType":[{"__symbolic":"method"}],"_applyCharacterCount":[{"__symbolic":"method"}],"_getInputElement":[{"__symbolic":"method"}],"_getTextareaElement":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { GraniteInputFieldComponent } from './input-field.component';
|
|
4
|
-
import { GraniteIconModule } from '../icon/icon.module';
|
|
5
|
-
import { GraniteButtonModule } from '../button/button.module';
|
|
6
|
-
export class GraniteInputFieldModule {
|
|
7
|
-
}
|
|
8
|
-
GraniteInputFieldModule.decorators = [
|
|
9
|
-
{ type: NgModule, args: [{
|
|
10
|
-
imports: [CommonModule, GraniteIconModule, GraniteButtonModule],
|
|
11
|
-
declarations: [GraniteInputFieldComponent],
|
|
12
|
-
exports: [GraniteInputFieldComponent],
|
|
13
|
-
},] }
|
|
14
|
-
];
|
|
15
|
-
//# sourceMappingURL=input-field.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-field.module.js","sourceRoot":"","sources":["../../../../../../libs/granite-components/src/lib/input-field/input-field.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAO9D,MAAM,OAAO,uBAAuB;;;YALnC,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,CAAC;gBAC/D,YAAY,EAAE,CAAC,0BAA0B,CAAC;gBAC1C,OAAO,EAAE,CAAC,0BAA0B,CAAC;aACtC","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GraniteInputFieldComponent } from './input-field.component';\nimport { GraniteIconModule } from '../icon/icon.module';\nimport { GraniteButtonModule } from '../button/button.module';\n\n@NgModule({\n imports: [CommonModule, GraniteIconModule, GraniteButtonModule],\n declarations: [GraniteInputFieldComponent],\n exports: [GraniteInputFieldComponent],\n})\nexport class GraniteInputFieldModule {}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GraniteInputFieldModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":12},{"__symbolic":"reference","module":"../icon/icon.module","name":"GraniteIconModule","line":7,"character":26},{"__symbolic":"reference","module":"../button/button.module","name":"GraniteButtonModule","line":7,"character":45}],"declarations":[{"__symbolic":"reference","module":"./input-field.component","name":"GraniteInputFieldComponent","line":8,"character":17}],"exports":[{"__symbolic":"reference","module":"./input-field.component","name":"GraniteInputFieldComponent","line":9,"character":12}]}]}]}}}]
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Directive, Input } from '@angular/core';
|
|
2
|
-
export class GraniteDividerDirective {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.dividerDirection = 'top';
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
GraniteDividerDirective.decorators = [
|
|
8
|
-
{ type: Directive, args: [{
|
|
9
|
-
selector: '[graniteDivider]',
|
|
10
|
-
exportAs: 'graniteDivider',
|
|
11
|
-
host: {
|
|
12
|
-
'[class.granite-divider-top]': 'dividerDirection === "top"',
|
|
13
|
-
'[class.granite-divider-bottom]': 'dividerDirection === "bottom"',
|
|
14
|
-
},
|
|
15
|
-
},] }
|
|
16
|
-
];
|
|
17
|
-
GraniteDividerDirective.propDecorators = {
|
|
18
|
-
dividerDirection: [{ type: Input }]
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=divider.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divider.directive.js","sourceRoot":"","sources":["../../../../../../libs/granite-components/src/lib/menu/divider.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAUjD,MAAM,OAAO,uBAAuB;IARpC;QAUE,qBAAgB,GAAW,KAAK,CAAC;IACnC,CAAC;;;YAXA,SAAS,SAAC;gBACT,QAAQ,EAAE,kBAAkB;gBAC5B,QAAQ,EAAE,gBAAgB;gBAC1B,IAAI,EAAE;oBACJ,6BAA6B,EAAE,4BAA4B;oBAC3D,gCAAgC,EAAE,+BAA+B;iBAClE;aACF;;;+BAEE,KAAK","sourcesContent":["import { Directive, Input } from '@angular/core';\n\n@Directive({\n selector: '[graniteDivider]',\n exportAs: 'graniteDivider',\n host: {\n '[class.granite-divider-top]': 'dividerDirection === \"top\"',\n '[class.granite-divider-bottom]': 'dividerDirection === \"bottom\"',\n },\n})\nexport class GraniteDividerDirective {\n @Input()\n dividerDirection: string = 'top';\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GraniteDividerDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":2,"character":1},"arguments":[{"selector":"[graniteDivider]","exportAs":"graniteDivider","host":{"[class.granite-divider-top]":"dividerDirection === \"top\"","[class.granite-divider-bottom]":"dividerDirection === \"bottom\"","$quoted$":["[class.granite-divider-top]","[class.granite-divider-bottom]"]}}]}],"members":{"dividerDirection":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}]}}}}]
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { trigger, state, style, animate, group, query, transition, } from '@angular/animations';
|
|
2
|
-
import { getEaseLinear, getEaseOutSteep } from '../core/animation';
|
|
3
|
-
const easeOut120 = getEaseOutSteep(120);
|
|
4
|
-
/**
|
|
5
|
-
* Animations used by the `granite-menu` component, showing the desktop interface.
|
|
6
|
-
* @docs-private
|
|
7
|
-
*/
|
|
8
|
-
export const graniteMenuDesktopAnimations = {
|
|
9
|
-
transformMenuDesktop: trigger('transformMenuDesktop', [
|
|
10
|
-
state('void', style({
|
|
11
|
-
opacity: 0,
|
|
12
|
-
transform: 'scale(0.9)',
|
|
13
|
-
})),
|
|
14
|
-
transition('void => enter', group([
|
|
15
|
-
query('.granite-menu-content', animate(getEaseLinear(100), style({
|
|
16
|
-
opacity: 1,
|
|
17
|
-
}))),
|
|
18
|
-
animate(easeOut120, style({ transform: 'scale(1)' })),
|
|
19
|
-
])),
|
|
20
|
-
transition('* => void', animate(getEaseLinear(100, 25), style({ opacity: 0 }))),
|
|
21
|
-
]),
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=menu-desktop-animations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"menu-desktop-animations.js","sourceRoot":"","sources":["../../../../../../libs/granite-components/src/lib/menu/menu-desktop-animations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,KAAK,EACL,KAAK,EAEL,OAAO,EACP,KAAK,EACL,KAAK,EACL,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEnE,MAAM,UAAU,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;AAExC;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAMrC;IACF,oBAAoB,EAAE,OAAO,CAAC,sBAAsB,EAAE;QACpD,KAAK,CACH,MAAM,EACN,KAAK,CAAC;YACJ,OAAO,EAAE,CAAC;YACV,SAAS,EAAE,YAAY;SACxB,CAAC,CACH;QACD,UAAU,CACR,eAAe,EACf,KAAK,CAAC;YACJ,KAAK,CACH,uBAAuB,EACvB,OAAO,CACL,aAAa,CAAC,GAAG,CAAC,EAClB,KAAK,CAAC;gBACJ,OAAO,EAAE,CAAC;aACX,CAAC,CACH,CACF;YACD,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;SACtD,CAAC,CACH;QACD,UAAU,CACR,WAAW,EACX,OAAO,CAAC,aAAa,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CACvD;KACF,CAAC;CACH,CAAC","sourcesContent":["import {\n trigger,\n state,\n style,\n AnimationTriggerMetadata,\n animate,\n group,\n query,\n transition,\n} from '@angular/animations';\nimport { getEaseLinear, getEaseOutSteep } from '../core/animation';\n\nconst easeOut120 = getEaseOutSteep(120);\n\n/**\n * Animations used by the `granite-menu` component, showing the desktop interface.\n * @docs-private\n */\nexport const graniteMenuDesktopAnimations: {\n /**\n * This animation trigger controls the menu panel's entry and exit from the\n * stage on desktop output devices.\n */\n readonly transformMenuDesktop: AnimationTriggerMetadata;\n} = {\n transformMenuDesktop: trigger('transformMenuDesktop', [\n state(\n 'void',\n style({\n opacity: 0,\n transform: 'scale(0.9)',\n })\n ),\n transition(\n 'void => enter',\n group([\n query(\n '.granite-menu-content',\n animate(\n getEaseLinear(100),\n style({\n opacity: 1,\n })\n )\n ),\n animate(easeOut120, style({ transform: 'scale(1)' })),\n ])\n ),\n transition(\n '* => void',\n animate(getEaseLinear(100, 25), style({ opacity: 0 }))\n ),\n ]),\n};\n"]}
|