@ng-formworks/daisyui 17.2.7 → 18.0.0

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 (50) hide show
  1. package/LICENSE +21 -0
  2. package/esm2022/lib/daisui-cssframework.mjs +223 -0
  3. package/esm2022/lib/daisyui-framework.component.mjs +53 -0
  4. package/esm2022/lib/daisyui-framework.module.mjs +59 -0
  5. package/esm2022/lib/daisyui-framework.prefixed.component.mjs +53 -0
  6. package/esm2022/lib/daisyui-framework.service.mjs +14 -0
  7. package/esm2022/lib/daisyui.framework.mjs +39 -0
  8. package/esm2022/lib/tokens.defs.mjs +7 -0
  9. package/esm2022/lib/widgets/daisyui-tabs.component.mjs +123 -0
  10. package/esm2022/ng-formworks-daisyui.mjs +5 -0
  11. package/esm2022/public-api.mjs +11 -0
  12. package/fesm2022/ng-formworks-daisyui.mjs +557 -0
  13. package/fesm2022/ng-formworks-daisyui.mjs.map +1 -0
  14. package/index.d.ts +5 -0
  15. package/lib/daisui-cssframework.d.ts +3 -0
  16. package/lib/daisyui-framework.component.d.ts +28 -0
  17. package/lib/daisyui-framework.module.d.ts +12 -0
  18. package/lib/daisyui-framework.prefixed.component.d.ts +28 -0
  19. package/lib/daisyui-framework.service.d.ts +6 -0
  20. package/lib/daisyui.framework.d.ts +11 -0
  21. package/{src/lib/tokens.defs.ts → lib/tokens.defs.d.ts} +6 -10
  22. package/lib/widgets/daisyui-tabs.component.d.ts +20 -0
  23. package/package.json +67 -58
  24. package/{src/public-api.ts → public-api.d.ts} +7 -12
  25. package/css_names_extractor.js +0 -133
  26. package/ng-package.json +0 -14
  27. package/src/daisyui_class_names.css +0 -1
  28. package/src/daisyui_class_names_prefixed_tw.css +0 -1
  29. package/src/daisyui_class_names_prefixed_tw_dui.css +0 -1
  30. package/src/lib/daisui-cssframework.ts +0 -237
  31. package/src/lib/daisyui-framework.component.scss +0 -48
  32. package/src/lib/daisyui-framework.component.spec.ts +0 -21
  33. package/src/lib/daisyui-framework.component.ts +0 -70
  34. package/src/lib/daisyui-framework.module.ts +0 -39
  35. package/src/lib/daisyui-framework.prefixed.component.scss +0 -48
  36. package/src/lib/daisyui-framework.prefixed.component.ts +0 -70
  37. package/src/lib/daisyui-framework.service.spec.ts +0 -16
  38. package/src/lib/daisyui-framework.service.ts +0 -9
  39. package/src/lib/daisyui-ng-formworks-themes-prefixed.scss +0 -61
  40. package/src/lib/daisyui-ng-formworks-themes.scss +0 -61
  41. package/src/lib/daisyui.framework.ts +0 -36
  42. package/src/lib/tailwind-output-prefixed.scss +0 -11772
  43. package/src/lib/tailwind-output.scss +0 -11402
  44. package/src/lib/widgets/daisyui-tabs.component.ts +0 -92
  45. package/tailwind-input.css +0 -3
  46. package/tailwind.config.js +0 -24
  47. package/tailwind.prefixed.config.js +0 -26
  48. package/tsconfig.lib.json +0 -21
  49. package/tsconfig.lib.prod.json +0 -10
  50. package/tsconfig.spec.json +0 -14
@@ -1,92 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { JsonSchemaFormService } from '@ng-formworks/core';
3
-
4
-
5
-
6
- @Component({
7
- // tslint:disable-next-line:component-selector
8
- selector: 'tabs-widget',
9
- template: `
10
- <div
11
- [class]="options?.labelHtmlClass || ''">
12
- <a *ngFor="let item of layoutNode?.items; let i = index"
13
- [class]="(options?.itemLabelHtmlClass || '') + (selectedItem === i ?
14
- (' ' + (options?.activeClass || '') + ' ' + (options?.style?.selected || '')) :
15
- (' ' + options?.style?.unselected))"
16
- >
17
- <span *ngIf="showAddTab || item.type !== '$ref'"
18
- [class]="(selectedItem === i ? (' ' + options?.activeClass + ' ' + options?.style?.selected) :
19
- (' ' + options?.style?.unselected))"
20
- [innerHTML]="setTabTitle(item, i)"
21
- (click)="select(i)"></span>
22
- </a>
23
-
24
- </div>
25
-
26
- <!--
27
- <div class="tabs tabs-boxed">
28
- <a class="tab">Tab 1</a>
29
- <a class="tab tab-active">Tab 2</a>
30
- <a class="tab">Tab 3</a>
31
- </div>
32
- -->
33
-
34
- <div *ngFor="let layoutItem of layoutNode?.items; let i = index"
35
- [class]="options?.htmlClass || ''">
36
-
37
- <select-framework-widget *ngIf="selectedItem === i"
38
- [class]="(options?.fieldHtmlClass || '') +
39
- ' ' + (options?.activeClass || '') +
40
- ' ' + (options?.style?.selected || '')"
41
- [dataIndex]="layoutNode?.dataType === 'array' ? (dataIndex || []).concat(i) : dataIndex"
42
- [layoutIndex]="(layoutIndex || []).concat(i)"
43
- [layoutNode]="layoutItem"></select-framework-widget>
44
-
45
- </div>`,
46
- styles: [` a { cursor: pointer; } `],
47
- })
48
- export class DaisyUITabsComponent implements OnInit {
49
- options: any;
50
- itemCount: number;
51
- selectedItem = 0;
52
- showAddTab = true;
53
- @Input() layoutNode: any;
54
- @Input() layoutIndex: number[];
55
- @Input() dataIndex: number[];
56
-
57
- constructor(
58
- private jsf: JsonSchemaFormService
59
- ) { }
60
-
61
- ngOnInit() {
62
- this.options = this.layoutNode.options || {};
63
- this.itemCount = this.layoutNode.items.length - 1;
64
- this.updateControl();
65
- }
66
-
67
- select(index) {
68
- if (this.layoutNode.items[index].type === '$ref') {
69
- this.itemCount = this.layoutNode.items.length;
70
- this.jsf.addItem({
71
- layoutNode: this.layoutNode.items[index],
72
- layoutIndex: this.layoutIndex.concat(index),
73
- dataIndex: this.dataIndex.concat(index)
74
- });
75
- this.updateControl();
76
- }
77
- this.selectedItem = index;
78
- }
79
-
80
- updateControl() {
81
- const lastItem = this.layoutNode.items[this.layoutNode.items.length - 1];
82
- if (lastItem.type === '$ref' &&
83
- this.itemCount >= (lastItem.options.maxItems || 1000)
84
- ) {
85
- this.showAddTab = false;
86
- }
87
- }
88
-
89
- setTabTitle(item: any, index: number): string {
90
- return this.jsf.setArrayItemTitle(this, item, index);
91
- }
92
- }
@@ -1,3 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
@@ -1,24 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- /** @type {import('tailwindcss').Config} */
3
- module.exports = {
4
- content: [
5
- "./src/**/*.{html,ts}",
6
- "./projects/ng-formworks-daisyui/**/*.{html,ts,css}"
7
- ],
8
- theme: {
9
- extend: {},
10
- },
11
- plugins: [require("daisyui")],
12
- daisyui: {
13
- themes: ["light", "dark", "cupcake", "cmyk", "pastel",
14
- {
15
- daisyui_default: {
16
- ...require("daisyui/src/theming/themes")["light"]
17
- },
18
- daisyui_leaf: {
19
- ...require("daisyui/src/theming/themes")["light"]
20
- }
21
- }
22
- ]
23
- },
24
- }
@@ -1,26 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- /** @type {import('tailwindcss').Config} */
3
- module.exports = {
4
- content: [
5
- "./src/**/*.{html,ts}",
6
- "./projects/ng-formworks-daisyui/**/*.{html,ts,css}"
7
- ],
8
- theme: {
9
- extend: {},
10
- },
11
- plugins: [require("daisyui")],
12
- daisyui: {
13
- themes: ["light", "dark", "cupcake", "cmyk", "pastel",
14
- {
15
- daisyui_default: {
16
- ...require("daisyui/src/theming/themes")["light"]
17
- },
18
- daisyui_leaf: {
19
- ...require("daisyui/src/theming/themes")["light"]
20
- }
21
- }
22
- ],
23
- prefix: "dui-"
24
- },
25
- prefix: "tw-"
26
- }
package/tsconfig.lib.json DELETED
@@ -1,21 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "../../tsconfig.json",
4
- "compilerOptions": {
5
- "outDir": "../../out-tsc/lib",
6
- "declaration": true,
7
- "declarationMap": true,
8
- "inlineSources": true,
9
- "types": []
10
- },
11
- "angularCompilerOptions": {
12
- "skipTemplateCodegen": true,
13
- "strictMetadataEmit": true,
14
- "fullTemplateTypeCheck": true,
15
- "strictInjectionParameters": true,
16
- "enableResourceInlining": true
17
- },
18
- "exclude": [
19
- "**/*.spec.ts"
20
- ]
21
- }
@@ -1,10 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "./tsconfig.lib.json",
4
- "compilerOptions": {
5
- "declarationMap": false
6
- },
7
- "angularCompilerOptions": {
8
- "compilationMode": "partial"
9
- }
10
- }
@@ -1,14 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "../../tsconfig.json",
4
- "compilerOptions": {
5
- "outDir": "../../out-tsc/spec",
6
- "types": [
7
- "jasmine"
8
- ]
9
- },
10
- "include": [
11
- "**/*.spec.ts",
12
- "**/*.d.ts"
13
- ]
14
- }