@ptsecurity/mosaic 13.6.2 → 13.8.4

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.
Files changed (197) hide show
  1. package/_theming.scss +289 -59
  2. package/_visual.scss +85 -14
  3. package/design-tokens/legacy-2017/tokens/components/checkbox.json5 +4 -0
  4. package/design-tokens/legacy-2017/tokens/components/loader-overlay.json5 +23 -0
  5. package/design-tokens/legacy-2017/tokens/components/radio.json5 +11 -10
  6. package/design-tokens/legacy-2017/tokens/components/toast.json5 +54 -0
  7. package/design-tokens/legacy-2017/tokens/properties/globals.json5 +18 -18
  8. package/design-tokens/legacy-2017/tokens.d.ts +78 -8
  9. package/design-tokens/pt-2022/tokens/components/badge.json5 +1 -1
  10. package/design-tokens/pt-2022/tokens/components/button.json5 +1 -1
  11. package/design-tokens/pt-2022/tokens/components/checkbox.json5 +4 -0
  12. package/design-tokens/pt-2022/tokens/components/link.json5 +3 -3
  13. package/design-tokens/pt-2022/tokens/components/loader-overlay.json5 +23 -0
  14. package/design-tokens/pt-2022/tokens/components/radio.json5 +6 -3
  15. package/design-tokens/pt-2022/tokens/components/tags.json5 +1 -1
  16. package/design-tokens/pt-2022/tokens/components/toast.json5 +54 -0
  17. package/design-tokens/pt-2022/tokens/properties/colors.json5 +1 -1
  18. package/design-tokens/pt-2022/tokens/properties/globals.json5 +18 -18
  19. package/design-tokens/pt-2022/tokens.d.ts +85 -14
  20. package/design-tokens/style-dictionary/build.js +13 -0
  21. package/design-tokens/style-dictionary/configs/figma.js +11 -0
  22. package/design-tokens/style-dictionary/configs/index.js +3 -3
  23. package/design-tokens/style-dictionary/figma-types.js +41 -0
  24. package/design-tokens/style-dictionary/formats/figma.js +104 -0
  25. package/design-tokens/style-dictionary/transformGroups/figma.js +21 -0
  26. package/design-tokens/style-dictionary/transforms/attribute/figma-border.js +18 -0
  27. package/design-tokens/style-dictionary/transforms/attribute/figma-color.js +25 -0
  28. package/design-tokens/style-dictionary/transforms/attribute/figma-default.js +10 -0
  29. package/design-tokens/style-dictionary/transforms/attribute/figma-font.js +31 -0
  30. package/design-tokens/style-dictionary/transforms/attribute/figma-group.js +17 -0
  31. package/design-tokens/style-dictionary/transforms/attribute/figma-opacity.js +10 -0
  32. package/design-tokens/style-dictionary/transforms/attribute/figma-shadow.js +66 -0
  33. package/design-tokens/style-dictionary/transforms/attribute/figma-sizing.js +16 -0
  34. package/design-tokens/style-dictionary/transforms/attribute/figma-spacing.js +15 -0
  35. package/design-tokens/style-dictionary/transforms/attribute/figma-typography.js +24 -0
  36. package/design-tokens/style-dictionary/transforms/value/figma-values.js +7 -0
  37. package/esm2020/button/button.component.mjs +2 -2
  38. package/esm2020/design-tokens/legacy-2017/tokens.mjs +79 -9
  39. package/esm2020/design-tokens/pt-2022/tokens.mjs +86 -15
  40. package/esm2020/form-field/hint.mjs +18 -7
  41. package/esm2020/list/list-selection.component.mjs +4 -1
  42. package/esm2020/loader-overlay/index.mjs +2 -0
  43. package/esm2020/loader-overlay/loader-overlay.component.mjs +99 -0
  44. package/esm2020/loader-overlay/loader-overlay.module.mjs +50 -0
  45. package/esm2020/loader-overlay/ptsecurity-mosaic-loader-overlay.mjs +5 -0
  46. package/esm2020/loader-overlay/public-api.mjs +3 -0
  47. package/esm2020/modal/modal.component.mjs +11 -3
  48. package/esm2020/modal/modal.type.mjs +1 -1
  49. package/esm2020/navbar/navbar-item.component.mjs +29 -6
  50. package/esm2020/navbar/navbar.component.mjs +6 -4
  51. package/esm2020/navbar/vertical-navbar.component.mjs +3 -3
  52. package/esm2020/progress-spinner/progress-spinner.component.mjs +2 -2
  53. package/esm2020/radio/radio.component.mjs +3 -3
  54. package/esm2020/select/select.component.mjs +3 -3
  55. package/esm2020/toast/index.mjs +2 -0
  56. package/esm2020/toast/ptsecurity-mosaic-toast.mjs +5 -0
  57. package/esm2020/toast/public-api.mjs +6 -0
  58. package/esm2020/toast/toast-animations.mjs +9 -0
  59. package/esm2020/toast/toast-container.component.mjs +44 -0
  60. package/esm2020/toast/toast.component.mjs +89 -0
  61. package/esm2020/toast/toast.module.mjs +42 -0
  62. package/esm2020/toast/toast.service.mjs +178 -0
  63. package/esm2020/toast/toast.type.mjs +15 -0
  64. package/esm2020/tooltip/tooltip.component.mjs +2 -1
  65. package/esm2020/tree/tree-option.component.mjs +3 -2
  66. package/esm2020/tree/tree-selection.component.mjs +4 -2
  67. package/esm2020/tree-select/tree-select.component.mjs +12 -11
  68. package/fesm2015/ptsecurity-mosaic-button.mjs +2 -2
  69. package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -1
  70. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs +235 -24
  71. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
  72. package/fesm2015/ptsecurity-mosaic-form-field.mjs +16 -6
  73. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
  74. package/fesm2015/ptsecurity-mosaic-list.mjs +3 -0
  75. package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -1
  76. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs +155 -0
  77. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs.map +1 -0
  78. package/fesm2015/ptsecurity-mosaic-modal.mjs +11 -2
  79. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -1
  80. package/fesm2015/ptsecurity-mosaic-navbar.mjs +37 -11
  81. package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -1
  82. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +2 -2
  83. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  84. package/fesm2015/ptsecurity-mosaic-radio.mjs +2 -2
  85. package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -1
  86. package/fesm2015/ptsecurity-mosaic-select.mjs +2 -2
  87. package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -1
  88. package/fesm2015/ptsecurity-mosaic-toast.mjs +363 -0
  89. package/fesm2015/ptsecurity-mosaic-toast.mjs.map +1 -0
  90. package/fesm2015/ptsecurity-mosaic-tooltip.mjs +1 -0
  91. package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  92. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +11 -10
  93. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  94. package/fesm2015/ptsecurity-mosaic-tree.mjs +5 -2
  95. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -1
  96. package/fesm2020/ptsecurity-mosaic-button.mjs +2 -2
  97. package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -1
  98. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +235 -24
  99. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
  100. package/fesm2020/ptsecurity-mosaic-form-field.mjs +16 -6
  101. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
  102. package/fesm2020/ptsecurity-mosaic-list.mjs +3 -0
  103. package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -1
  104. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs +153 -0
  105. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs.map +1 -0
  106. package/fesm2020/ptsecurity-mosaic-modal.mjs +10 -2
  107. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -1
  108. package/fesm2020/ptsecurity-mosaic-navbar.mjs +34 -9
  109. package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -1
  110. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +2 -2
  111. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  112. package/fesm2020/ptsecurity-mosaic-radio.mjs +2 -2
  113. package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -1
  114. package/fesm2020/ptsecurity-mosaic-select.mjs +2 -2
  115. package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -1
  116. package/fesm2020/ptsecurity-mosaic-toast.mjs +361 -0
  117. package/fesm2020/ptsecurity-mosaic-toast.mjs.map +1 -0
  118. package/fesm2020/ptsecurity-mosaic-tooltip.mjs +1 -0
  119. package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  120. package/fesm2020/ptsecurity-mosaic-tree-select.mjs +11 -10
  121. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  122. package/fesm2020/ptsecurity-mosaic-tree.mjs +5 -2
  123. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -1
  124. package/form-field/hint.d.ts +10 -2
  125. package/loader-overlay/README.md +0 -0
  126. package/loader-overlay/index.d.ts +1 -0
  127. package/loader-overlay/loader-overlay.component.d.ts +33 -0
  128. package/loader-overlay/loader-overlay.module.d.ts +11 -0
  129. package/loader-overlay/package.json +10 -0
  130. package/loader-overlay/ptsecurity-mosaic-loader-overlay.d.ts +5 -0
  131. package/loader-overlay/public-api.d.ts +2 -0
  132. package/modal/modal.component.d.ts +3 -1
  133. package/modal/modal.type.d.ts +1 -0
  134. package/navbar/navbar-item.component.d.ts +9 -3
  135. package/package.json +20 -4
  136. package/prebuilt-themes/dark-theme.css +1 -1
  137. package/prebuilt-themes/default-theme.css +1 -1
  138. package/toast/index.d.ts +1 -0
  139. package/toast/package.json +10 -0
  140. package/toast/ptsecurity-mosaic-toast.d.ts +5 -0
  141. package/toast/public-api.d.ts +5 -0
  142. package/toast/toast-animations.d.ts +4 -0
  143. package/toast/toast-container.component.d.ts +15 -0
  144. package/toast/toast.component.d.ts +35 -0
  145. package/toast/toast.module.d.ts +13 -0
  146. package/toast/toast.service.d.ts +49 -0
  147. package/toast/toast.type.d.ts +27 -0
  148. package/tooltip/tooltip.component.d.ts +1 -1
  149. package/tree/tree-selection.component.d.ts +1 -0
  150. package/schematics/collection.json +0 -4
  151. package/schematics/migration.json +0 -10
  152. package/schematics/ng-update/data/attribute-selectors.d.ts +0 -2
  153. package/schematics/ng-update/data/attribute-selectors.js +0 -5
  154. package/schematics/ng-update/data/attribute-selectors.js.map +0 -1
  155. package/schematics/ng-update/data/class-names.d.ts +0 -2
  156. package/schematics/ng-update/data/class-names.js +0 -5
  157. package/schematics/ng-update/data/class-names.js.map +0 -1
  158. package/schematics/ng-update/data/constructor-checks.d.ts +0 -2
  159. package/schematics/ng-update/data/constructor-checks.js +0 -5
  160. package/schematics/ng-update/data/constructor-checks.js.map +0 -1
  161. package/schematics/ng-update/data/css-selectors.d.ts +0 -2
  162. package/schematics/ng-update/data/css-selectors.js +0 -5
  163. package/schematics/ng-update/data/css-selectors.js.map +0 -1
  164. package/schematics/ng-update/data/element-selectors.d.ts +0 -2
  165. package/schematics/ng-update/data/element-selectors.js +0 -5
  166. package/schematics/ng-update/data/element-selectors.js.map +0 -1
  167. package/schematics/ng-update/data/index.d.ts +0 -10
  168. package/schematics/ng-update/data/index.js +0 -14
  169. package/schematics/ng-update/data/index.js.map +0 -1
  170. package/schematics/ng-update/data/input-names.d.ts +0 -2
  171. package/schematics/ng-update/data/input-names.js +0 -35
  172. package/schematics/ng-update/data/input-names.js.map +0 -1
  173. package/schematics/ng-update/data/method-call-checks.d.ts +0 -2
  174. package/schematics/ng-update/data/method-call-checks.js +0 -5
  175. package/schematics/ng-update/data/method-call-checks.js.map +0 -1
  176. package/schematics/ng-update/data/output-names.d.ts +0 -2
  177. package/schematics/ng-update/data/output-names.js +0 -5
  178. package/schematics/ng-update/data/output-names.js.map +0 -1
  179. package/schematics/ng-update/data/property-names.d.ts +0 -2
  180. package/schematics/ng-update/data/property-names.js +0 -5
  181. package/schematics/ng-update/data/property-names.js.map +0 -1
  182. package/schematics/ng-update/data/symbol-removal.d.ts +0 -2
  183. package/schematics/ng-update/data/symbol-removal.js +0 -5
  184. package/schematics/ng-update/data/symbol-removal.js.map +0 -1
  185. package/schematics/ng-update/index.d.ts +0 -2
  186. package/schematics/ng-update/index.js +0 -23
  187. package/schematics/ng-update/index.js.map +0 -1
  188. package/schematics/ng-update/update-9.0.0/mosaic-symbols.json +0 -255
  189. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.d.ts +0 -7
  190. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js +0 -154
  191. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js.map +0 -1
  192. package/schematics/ng-update/upgrade-data.d.ts +0 -2
  193. package/schematics/ng-update/upgrade-data.js +0 -17
  194. package/schematics/ng-update/upgrade-data.js.map +0 -1
  195. package/schematics/tsconfig.json +0 -29
  196. package/schematics/tsconfig.lib-test.json +0 -8
  197. package/schematics/tsconfig.lib.json +0 -17
@@ -0,0 +1,21 @@
1
+ module.exports = (StyleDictionary) => {
2
+
3
+ StyleDictionary.registerTransformGroup({
4
+ name: 'mc/figma',
5
+ transforms: [
6
+ 'attribute/cti',
7
+ "name/cti/kebab",
8
+ 'mc-attribute/figma-group',
9
+ 'mc-attribute/figma-border',
10
+ 'mc-attribute/figma-typography',
11
+ 'mc-attribute/figma-font',
12
+ 'mc-attribute/figma-opacity',
13
+ 'mc-attribute/figma-spacing',
14
+ 'mc-attribute/figma-sizing',
15
+ 'mc-attribute/figma-shadow',
16
+ 'mc-attribute/figma-color',
17
+ 'mc-attribute/figma-default',
18
+ 'mc-value/figma-values',
19
+ ]
20
+ });
21
+ };
@@ -0,0 +1,18 @@
1
+ const { figmaTypes } = require('../../figma-types');
2
+
3
+ module.exports = (styleDictionary) => {
4
+ styleDictionary.registerTransform({
5
+ name: 'mc-attribute/figma-border',
6
+ type: 'attribute',
7
+ matcher: ({ name, attributes }) => name.includes('border') && !attributes.figmaPropType,
8
+ transformer: ({ name, attributes }) => {
9
+ const props = {
10
+ width: figmaTypes.borderWidth,
11
+ radius: figmaTypes.borderRadius
12
+ };
13
+ const entry = Object.entries(props).find(([key]) => name.includes(key));
14
+
15
+ return entry ? { figmaPropType: entry[1] } : attributes;
16
+ }
17
+ });
18
+ };
@@ -0,0 +1,25 @@
1
+ const { figmaTypes } = require('../../figma-types');
2
+
3
+ const COLOR_MAX_PARTS = 4;
4
+
5
+ module.exports = (styleDictionary) => {
6
+ styleDictionary.registerTransform({
7
+ name: 'mc-attribute/figma-color',
8
+ type: 'attribute',
9
+ matcher: ({name, value, attributes: { category, figmaPropType }}) => {
10
+ if (figmaPropType) {
11
+ return false;
12
+ }
13
+
14
+ const stringValue = value.toString();
15
+ const isColorValue = (
16
+ stringValue.startsWith('#') ||
17
+ stringValue.startsWith('rgba') ||
18
+ name.includes('color')
19
+ ) && stringValue.split(' ').length <= COLOR_MAX_PARTS;
20
+
21
+ return isColorValue || category === 'palette';
22
+ },
23
+ transformer: () => ({ figmaPropType: figmaTypes.color })
24
+ });
25
+ };
@@ -0,0 +1,10 @@
1
+ const { figmaTypes } = require('../../figma-types');
2
+
3
+ module.exports = (styleDictionary) => {
4
+ styleDictionary.registerTransform({
5
+ name: 'mc-attribute/figma-default',
6
+ type: 'attribute',
7
+ matcher: ({ attributes }) => !attributes.figmaPropType,
8
+ transformer: () => ({ figmaPropType: figmaTypes.other })
9
+ });
10
+ };
@@ -0,0 +1,31 @@
1
+ const { figmaTypes } = require('../../figma-types');
2
+
3
+ module.exports = (styleDictionary) => {
4
+ styleDictionary.registerTransform({
5
+ name: 'mc-attribute/figma-font',
6
+ type: 'attribute',
7
+ matcher: ({ name, attributes }) => name.includes('font') && !attributes.figmaPropType,
8
+ transformer: ({ name, value }) => {
9
+ const props = {
10
+ family: figmaTypes.fontFamilies,
11
+ size: figmaTypes.fontSizes,
12
+ weight: figmaTypes.fontWeights,
13
+ height: figmaTypes.lineHeights,
14
+ spacing: figmaTypes.letterSpacing,
15
+ transform: figmaTypes.textCase,
16
+ settings: figmaTypes.fontFeatureSettings
17
+ };
18
+ const [, typeName] = Object.entries(props).find(([key]) => name.includes(key)) ?? [];
19
+
20
+ if (!typeName) {
21
+ return {
22
+ figmaPropType: 'typography',
23
+ figmaValue: `typography.${value}`,
24
+ figmaLink: true
25
+ };
26
+ }
27
+
28
+ return { figmaPropType: typeName };
29
+ }
30
+ });
31
+ };
@@ -0,0 +1,17 @@
1
+ const path = require('path');
2
+
3
+ const GROUP_BACK_STEP_INDEX = 2;
4
+
5
+ module.exports = (styleDictionary) => {
6
+ styleDictionary.registerTransform({
7
+ name: 'mc-attribute/figma-group',
8
+ type: 'attribute',
9
+ transformer: (prop) => {
10
+ const filePathParts = prop.filePath.split('/');
11
+ const group = filePathParts[filePathParts.length - GROUP_BACK_STEP_INDEX];
12
+ const subgroup = path.parse(prop.filePath).name;
13
+
14
+ return { group, subgroup };
15
+ }
16
+ });
17
+ };
@@ -0,0 +1,10 @@
1
+ const { figmaTypes } = require('../../figma-types');
2
+
3
+ module.exports = (styleDictionary) => {
4
+ styleDictionary.registerTransform({
5
+ name: 'mc-attribute/figma-opacity',
6
+ type: 'attribute',
7
+ matcher: ({ name, attributes }) => name.includes('opacity') && !attributes.figmaPropType,
8
+ transformer: () => ({ figmaPropType: figmaTypes.opacity })
9
+ });
10
+ };
@@ -0,0 +1,66 @@
1
+ const { figmaTypes } = require('../../figma-types');
2
+
3
+ const BLUR_SHADOW_INDEX = 2;
4
+ const SPREAD_SHADOW_INDEX = 3;
5
+ const X_SHADOW_INDEX = 0;
6
+ const Y_SHADOW_INDEX = 1;
7
+ const SHADOW_MIN_PARTS = 4;
8
+
9
+ function transformShadow(value) {
10
+ const isInnerShadow = value.includes('inset');
11
+ const valueParts = value.split(' ');
12
+
13
+ if (isInnerShadow) {
14
+ valueParts.shift();
15
+ }
16
+
17
+ return {
18
+ color: valueParts.pop(),
19
+ type: isInnerShadow ? 'innerShadow' : 'dropShadow',
20
+ x: valueParts[X_SHADOW_INDEX] ?? 0,
21
+ y: valueParts[Y_SHADOW_INDEX] ?? 0,
22
+ blur: valueParts[BLUR_SHADOW_INDEX] ?? 0,
23
+ spread: valueParts[SPREAD_SHADOW_INDEX] ?? 0
24
+ };
25
+ }
26
+
27
+ module.exports = (styleDictionary) => {
28
+ styleDictionary.registerTransform({
29
+ name: 'mc-attribute/figma-shadow',
30
+ type: 'attribute',
31
+ matcher: ({name, value, attributes }) => (
32
+ name.includes('shadow') &&
33
+ value.split(' ').length > SHADOW_MIN_PARTS &&
34
+ !attributes.figmaPropType
35
+ ),
36
+ transformer: ({ value }) => {
37
+ const rgbaGroups = [];
38
+ let figmaValue = value;
39
+
40
+ const check = figmaValue.match(/(rgba\([\w\d\. \,]+\))/) ?? [];
41
+
42
+ for (let i = 1; i < check.length; i++) {
43
+ figmaValue = figmaValue.replace(check[i], `rgba${i - 1}`);
44
+ rgbaGroups.push(check[i]);
45
+ }
46
+
47
+ const shadowParts = figmaValue.split(',');
48
+ figmaValue = shadowParts.length > 1
49
+ ? shadowParts.map(transformShadow)
50
+ : transformShadow(figmaValue);
51
+
52
+ rgbaGroups.forEach((rgbaValue, rgbaIndex) => {
53
+ if (Array.isArray(figmaValue)) {
54
+ figmaValue.forEach((shadow) => {
55
+ shadow.color = shadow.color.replace(`rgba${rgbaIndex}`, rgbaValue);
56
+ });
57
+
58
+ return;
59
+ }
60
+ figmaValue.color = figmaValue.color.replace(`rgba${rgbaIndex}`, rgbaValue);
61
+ });
62
+
63
+ return { figmaPropType: figmaTypes.boxShadow, figmaValue };
64
+ }
65
+ });
66
+ };
@@ -0,0 +1,16 @@
1
+ const { figmaTypes } = require('../../figma-types');
2
+
3
+ module.exports = (styleDictionary) => {
4
+ styleDictionary.registerTransform({
5
+ name: 'mc-attribute/figma-sizing',
6
+ type: 'attribute',
7
+ matcher: ({name, attributes}) => (
8
+ (
9
+ name.includes('height') ||
10
+ name.includes('width') ||
11
+ name.includes('size')
12
+ ) && !attributes.figmaPropType
13
+ ),
14
+ transformer: () => ({ figmaPropType: figmaTypes.sizing })
15
+ });
16
+ };
@@ -0,0 +1,15 @@
1
+ const { figmaTypes } = require('../../figma-types');
2
+
3
+ module.exports = (styleDictionary) => {
4
+ styleDictionary.registerTransform({
5
+ name: 'mc-attribute/figma-spacing',
6
+ type: 'attribute',
7
+ matcher: ({name, attributes}) => (
8
+ (
9
+ name.includes('padding') ||
10
+ name.includes('margin')
11
+ ) && !attributes.figmaPropType
12
+ ),
13
+ transformer: (() => ({ figmaPropType: figmaTypes.spacing }))
14
+ });
15
+ };
@@ -0,0 +1,24 @@
1
+ const { figmaTypes } = require('../../figma-types');
2
+
3
+ module.exports = (styleDictionary) => {
4
+ styleDictionary.registerTransform({
5
+ name: 'mc-attribute/figma-typography',
6
+ type: 'attribute',
7
+ matcher: ({ name, attributes}) => name.includes('typography') && !attributes.figmaPropType,
8
+ transformer: ({ name, attributes }) => {
9
+ const props = {
10
+ spacing: figmaTypes.letterSpacing,
11
+ transform: figmaTypes.textCase,
12
+ settings: figmaTypes.fontFeatureSettings,
13
+ family: figmaTypes.fontFamily,
14
+ size: figmaTypes.fontSize,
15
+ weight: figmaTypes.fontWeight,
16
+ height: figmaTypes.lineHeight
17
+ };
18
+
19
+ const entry = Object.entries(props).find(([key]) => name.includes(key));
20
+
21
+ return entry ? { figmaPropType: entry[1] } : attributes;
22
+ }
23
+ });
24
+ };
@@ -0,0 +1,7 @@
1
+ module.exports = (styleDictionary) => {
2
+ styleDictionary.registerTransform({
3
+ name: 'mc-value/figma-values',
4
+ type: 'value',
5
+ transformer: ({ value }) => value === 'null' ? 'none' : value
6
+ });
7
+ };
@@ -122,7 +122,7 @@ export class McButton extends McButtonMixinBase {
122
122
  }
123
123
  }
124
124
  /** @nocollapse */ /** @nocollapse */ McButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McButton, deps: [{ token: i0.ElementRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
125
- /** @nocollapse */ /** @nocollapse */ McButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McButton, selector: "[mc-button]", inputs: { color: "color", tabIndex: "tabIndex", disabled: "disabled" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur()" }, properties: { "attr.disabled": "disabled || null", "attr.tabIndex": "tabIndex" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"mc-button-wrapper\">\n <ng-content></ng-content>\n</div>\n<div class=\"mc-button-overlay\" (click)=\"haltDisabledEvents($event)\"></div>\n", styles: [".mc-icon-button,.mc-light-button,.mc-button{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;position:relative;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;margin:0;white-space:nowrap;text-decoration:none;text-align:center;vertical-align:baseline;height:var(--mc-button-size-height, 32px);border:var(--mc-button-size-border-width, 1px) solid transparent;border-radius:var(--mc-button-size-border-radius, 4px)}.mc-icon-button::-moz-focus-inner,.mc-light-button::-moz-focus-inner,.mc-button::-moz-focus-inner{border:0}.mc-icon-button:focus,.mc-light-button:focus,.mc-button:focus{outline:none}[disabled].mc-icon-button,[disabled].mc-light-button,[disabled].mc-button{cursor:default}.cdk-focused.mc-icon-button,.cdk-focused.mc-light-button,.cdk-focused.mc-button{z-index:1}.mc-icon-button .mc-button-wrapper,.mc-light-button .mc-button-wrapper,.mc-button .mc-button-wrapper{display:flex;align-items:center}.mc-icon-button .mc-icon_left,.mc-light-button .mc-icon_left,.mc-button .mc-icon_left{margin-right:var(--mc-icon-button-size-left-icon-padding, 6px)}.mc-button{padding-left:var(--mc-button-size-horizontal-padding, 12px);padding-right:var(--mc-button-size-horizontal-padding, 12px)}.mc-icon-button{padding-left:var(--mc-icon-button-size-horizontal-padding, 8px);padding-right:var(--mc-icon-button-size-horizontal-padding, 8px)}.mc-button-overlay{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:inherit}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
125
+ /** @nocollapse */ /** @nocollapse */ McButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: McButton, selector: "[mc-button]", inputs: { color: "color", tabIndex: "tabIndex", disabled: "disabled" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur()" }, properties: { "attr.disabled": "disabled || null", "attr.tabIndex": "tabIndex" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"mc-button-wrapper\">\n <ng-content></ng-content>\n</div>\n<div class=\"mc-button-overlay\" (click)=\"haltDisabledEvents($event)\"></div>\n", styles: [".mc-icon-button,.mc-light-button,.mc-button{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;position:relative;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;margin:0;white-space:nowrap;text-decoration:none;text-align:center;vertical-align:baseline;height:var(--mc-button-size-height, 32px);border:var(--mc-button-size-border-width, 1px) solid transparent;border-radius:var(--mc-button-size-border-radius, 4px)}.mc-icon-button::-moz-focus-inner,.mc-light-button::-moz-focus-inner,.mc-button::-moz-focus-inner{border:0}.mc-icon-button:focus,.mc-light-button:focus,.mc-button:focus{outline:none}[disabled].mc-icon-button,[disabled].mc-light-button,[disabled].mc-button{cursor:default}.cdk-focused.mc-icon-button,.cdk-focused.mc-light-button,.cdk-focused.mc-button{z-index:1}.mc-icon-button .mc-button-wrapper,.mc-light-button .mc-button-wrapper,.mc-button .mc-button-wrapper{display:flex;align-items:center}.mc-icon-button .mc-icon_left,.mc-light-button .mc-icon_left,.mc-button .mc-icon_left{margin-right:var(--mc-icon-button-size-left-icon-padding, 6px)}.mc-button{padding-left:var(--mc-button-size-horizontal-padding, 12px);padding-right:var(--mc-button-size-horizontal-padding, 12px)}.mc-icon-button{padding-left:calc(var(--mc-icon-button-size-horizontal-padding, 8px) - var(--mc-button-size-border-width, 1px));padding-right:calc(var(--mc-icon-button-size-horizontal-padding, 8px) - var(--mc-button-size-border-width, 1px))}.mc-button-overlay{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:inherit}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
126
126
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: McButton, decorators: [{
127
127
  type: Component,
128
128
  args: [{ selector: '[mc-button]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, inputs: ['color', 'tabIndex'], host: {
@@ -130,7 +130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
130
130
  '[attr.tabIndex]': 'tabIndex',
131
131
  '(focus)': 'onFocus($event)',
132
132
  '(blur)': 'onBlur()'
133
- }, template: "<div class=\"mc-button-wrapper\">\n <ng-content></ng-content>\n</div>\n<div class=\"mc-button-overlay\" (click)=\"haltDisabledEvents($event)\"></div>\n", styles: [".mc-icon-button,.mc-light-button,.mc-button{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;position:relative;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;margin:0;white-space:nowrap;text-decoration:none;text-align:center;vertical-align:baseline;height:var(--mc-button-size-height, 32px);border:var(--mc-button-size-border-width, 1px) solid transparent;border-radius:var(--mc-button-size-border-radius, 4px)}.mc-icon-button::-moz-focus-inner,.mc-light-button::-moz-focus-inner,.mc-button::-moz-focus-inner{border:0}.mc-icon-button:focus,.mc-light-button:focus,.mc-button:focus{outline:none}[disabled].mc-icon-button,[disabled].mc-light-button,[disabled].mc-button{cursor:default}.cdk-focused.mc-icon-button,.cdk-focused.mc-light-button,.cdk-focused.mc-button{z-index:1}.mc-icon-button .mc-button-wrapper,.mc-light-button .mc-button-wrapper,.mc-button .mc-button-wrapper{display:flex;align-items:center}.mc-icon-button .mc-icon_left,.mc-light-button .mc-icon_left,.mc-button .mc-icon_left{margin-right:var(--mc-icon-button-size-left-icon-padding, 6px)}.mc-button{padding-left:var(--mc-button-size-horizontal-padding, 12px);padding-right:var(--mc-button-size-horizontal-padding, 12px)}.mc-icon-button{padding-left:var(--mc-icon-button-size-horizontal-padding, 8px);padding-right:var(--mc-icon-button-size-horizontal-padding, 8px)}.mc-button-overlay{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:inherit}\n"] }]
133
+ }, template: "<div class=\"mc-button-wrapper\">\n <ng-content></ng-content>\n</div>\n<div class=\"mc-button-overlay\" (click)=\"haltDisabledEvents($event)\"></div>\n", styles: [".mc-icon-button,.mc-light-button,.mc-button{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;position:relative;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;margin:0;white-space:nowrap;text-decoration:none;text-align:center;vertical-align:baseline;height:var(--mc-button-size-height, 32px);border:var(--mc-button-size-border-width, 1px) solid transparent;border-radius:var(--mc-button-size-border-radius, 4px)}.mc-icon-button::-moz-focus-inner,.mc-light-button::-moz-focus-inner,.mc-button::-moz-focus-inner{border:0}.mc-icon-button:focus,.mc-light-button:focus,.mc-button:focus{outline:none}[disabled].mc-icon-button,[disabled].mc-light-button,[disabled].mc-button{cursor:default}.cdk-focused.mc-icon-button,.cdk-focused.mc-light-button,.cdk-focused.mc-button{z-index:1}.mc-icon-button .mc-button-wrapper,.mc-light-button .mc-button-wrapper,.mc-button .mc-button-wrapper{display:flex;align-items:center}.mc-icon-button .mc-icon_left,.mc-light-button .mc-icon_left,.mc-button .mc-icon_left{margin-right:var(--mc-icon-button-size-left-icon-padding, 6px)}.mc-button{padding-left:var(--mc-button-size-horizontal-padding, 12px);padding-right:var(--mc-button-size-horizontal-padding, 12px)}.mc-icon-button{padding-left:calc(var(--mc-icon-button-size-horizontal-padding, 8px) - var(--mc-button-size-border-width, 1px));padding-right:calc(var(--mc-icon-button-size-horizontal-padding, 8px) - var(--mc-button-size-border-width, 1px))}.mc-button-overlay{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:inherit}\n"] }]
134
134
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }]; }, propDecorators: { disabled: [{
135
135
  type: Input
136
136
  }] } });