circletone.mjs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. import { NgClass } from '@angular/common';
  2. import * as i0 from '@angular/core';
  3. import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
  4. const tailwindPreset = {
  5. theme: {
  6. extend: {
  7. darkMode: 'class',
  8. fontFamily: {
  9. primary: 'var(--font-primary)',
  10. title: 'var(--font-title)',
  11. },
  12. colors: {
  13. primary: {
  14. DEFAULT: 'rgb(var(--primary) / <alpha-value>)',
  15. dark: 'rgb(var(--priamry-dark) / <alpha-value>)',
  16. variation: 'rgb(var(--primary-variation) / <alpha-value>)',
  17. 'variation-dark': 'rgb(var(--primary-variation-dark) / <alpha-value>)',
  18. },
  19. secondary: {
  20. DEFAULT: 'rgb(var(--secondary) / <alpha-value>)',
  21. dark: 'rgb(var(--secondary-dark) / <alpha-value>)',
  22. },
  23. background: {
  24. DEFAULT: 'rgb(var(--background) / <alpha-value>)',
  25. dark: 'rgb(var(--background-dark) / <alpha-value>)',
  26. },
  27. surface: {
  28. DEFAULT: 'rgb(var(--surface) / <alpha-value>)',
  29. variation: 'rgb(var(--surface-variation) / <alpha-value>)',
  30. dark: 'rgb(var(--surface-dark) / <alpha-value>)',
  31. 'variation-dark': 'rgb(var(--surface-variation-dark) / <alpha-value>)',
  32. },
  33. accent: {
  34. DEFAULT: 'rgb(var(--accent) / <alpha-value>)',
  35. dark: 'rgb(var(--accent-dark) / <alpha-value>)',
  36. },
  37. on: {
  38. primary: 'rgb(var(--on-primary) / <alpha-value>)',
  39. 'primary-variation': 'rgb(var(--on-primary-variation) / <alpha-value>)',
  40. secondary: 'rgb(var(--on-secondary) / <alpha-value>)',
  41. 'secondary-variation': 'rgb(var(--on-secondary-variation) / <alpha-value>)',
  42. accent: 'rgb(var(--on-accent) / <alpha-value>)',
  43. background: 'rgb(var(--on-background) / <alpha-value>)',
  44. 'background-variation': 'rgb(var(--on-background-variation) / <alpha-value>)',
  45. surface: 'rgb(var(--on-surface) / <alpha-value>)',
  46. 'surface-variation': 'rgb(var(--on-surface-variation) / <alpha-value>)',
  47. 'primary-dark': 'rgb(var(--on-primary-dark) / <alpha-value>)',
  48. 'primary-variation-dark': 'rgb(var(--on-primary-variation-dark) / <alpha-value>)',
  49. 'secondary-dark': 'rgb(var(--on-secondary-dark) / <alpha-value>)',
  50. 'secondary-variation-dark': 'rgb(var(--on-secondary-variation-dark) / <alpha-value>)',
  51. 'accent-dark': 'rgb(var(--on-accent-dark) / <alpha-value>)',
  52. 'background-dark': 'rgb(var(--on-background-dark) / <alpha-value>)',
  53. 'background-variation-dark': 'rgb(var(--on-background-variation-dark) / <alpha-value>)',
  54. 'surface-dark': 'rgb(var(--on-surface-dark) / <alpha-value>)',
  55. 'surface-variation-dark': 'rgb(var(--on-surface-variation-dark) / <alpha-value>)',
  56. },
  57. },
  58. },
  59. },
  60. };
  61. class ButtonComponent {
  62. constructor() {
  63. this.text = '';
  64. this.type = 'default';
  65. }
  66. static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
  67. static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: ButtonComponent, isStandalone: true, selector: "ct-button", inputs: { text: "text", type: "type" }, ngImport: i0, template: "<button\n [ngClass]=\"{\n 'bg-primary': type === 'default',\n 'bg-on-primary': type === 'alternate',\n 'bg-yellow-400': type === 'warning',\n 'bg-red-400': type === 'error',\n 'bg-green-400': type === 'success'\n }\"\n class=\"p-4\">\n {{ text }}\n</button>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
  68. }
  69. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ButtonComponent, decorators: [{
  70. type: Component,
  71. args: [{ selector: 'ct-button', standalone: true, imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n [ngClass]=\"{\n 'bg-primary': type === 'default',\n 'bg-on-primary': type === 'alternate',\n 'bg-yellow-400': type === 'warning',\n 'bg-red-400': type === 'error',\n 'bg-green-400': type === 'success'\n }\"\n class=\"p-4\">\n {{ text }}\n</button>\n" }]
  72. }], propDecorators: { text: [{
  73. type: Input,
  74. args: [{ required: true }]
  75. }], type: [{
  76. type: Input
  77. }] } });
  78. /*
  79. * Public API Surface of circletone
  80. */
  81. /**
  82. * Generated bundle index. Do not edit.
  83. */
  84. export { ButtonComponent, tailwindPreset };
  85. //# sourceMappingURL=circletone.mjs.map