circletone.mjs 6.8 KB

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