dasar-ui 1.5.0 → 1.9.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 (67) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +40 -34
  3. package/docs/_config.yml +3 -0
  4. package/docs/getting-started.md +89 -0
  5. package/docs/index.md +9 -0
  6. package/docs/installation.md +46 -0
  7. package/package.json +6 -5
  8. package/projects/dasar-ui/package.json +1 -1
  9. package/projects/dasar-ui/src/lib/components/dasar-modal/dasar-modal.ts +2 -2
  10. package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.spec.ts +8 -0
  11. package/projects/dasar-ui/src/lib/components/dasar-overlay/dasar-overlay.ts +2 -2
  12. package/projects/dasar-ui/src/lib/components/dasar-theme-provider/dasar-theme-provider.spec.ts +89 -0
  13. package/projects/dasar-ui/src/lib/components/dasar-theme-provider/dasar-theme-provider.ts +23 -0
  14. package/projects/dasar-ui/src/lib/models/theme.model.ts +64 -0
  15. package/projects/dasar-ui/src/lib/services/theme.service.spec.ts +65 -0
  16. package/projects/dasar-ui/src/lib/services/theme.service.ts +70 -0
  17. package/projects/dasar-ui/src/public-api.ts +1 -0
  18. package/projects/documentation/src/app/app.html +33 -6
  19. package/projects/documentation/src/app/app.ts +36 -2
  20. package/projects/documentation/src/app/components/doc-customize-modal.component.ts +56 -2
  21. package/projects/documentation/src/app/components/doc-markdown.component.ts +154 -0
  22. package/projects/documentation/src/app/layouts/doc.layout.ts +23 -3
  23. package/projects/documentation/src/app/pages/getting-started/getting-started.page.ts +21 -0
  24. package/projects/documentation/src/app/pages/installation/installation.page.ts +18 -0
  25. package/projects/documentation/src/app/pages/introduction/introduction.page.ts +18 -0
  26. package/projects/documentation/src/app/pages/list/examples/advanced-dynamic/list-advanced-dynamic.example.html +29 -0
  27. package/projects/documentation/src/app/pages/list/examples/advanced-dynamic/list-advanced-dynamic.example.ts +33 -0
  28. package/projects/documentation/src/app/pages/list/examples/advanced-theme/list-advanced-theme.example.html +13 -0
  29. package/projects/documentation/src/app/pages/list/examples/advanced-theme/list-advanced-theme.example.ts +30 -0
  30. package/projects/documentation/src/app/pages/list/examples/basic/list-basic.example.html +5 -0
  31. package/projects/documentation/src/app/pages/list/examples/basic/list-basic.example.ts +12 -0
  32. package/projects/documentation/src/app/pages/list/examples/bordered-divider/list-bordered-divider.example.html +20 -0
  33. package/projects/documentation/src/app/pages/list/examples/bordered-divider/list-bordered-divider.example.ts +12 -0
  34. package/projects/documentation/src/app/pages/list/examples/custom-style/list-custom-style.example.html +11 -0
  35. package/projects/documentation/src/app/pages/list/examples/custom-style/list-custom-style.example.ts +19 -0
  36. package/projects/documentation/src/app/pages/list/examples/header-footer/list-header-footer.example.html +7 -0
  37. package/projects/documentation/src/app/pages/list/examples/header-footer/list-header-footer.example.ts +12 -0
  38. package/projects/documentation/src/app/pages/list/examples/interactive/list-interactive.example.html +20 -0
  39. package/projects/documentation/src/app/pages/list/examples/interactive/list-interactive.example.ts +22 -0
  40. package/projects/documentation/src/app/pages/list/examples/prefix-suffix/list-prefix-suffix.example.html +9 -0
  41. package/projects/documentation/src/app/pages/list/examples/prefix-suffix/list-prefix-suffix.example.ts +16 -0
  42. package/projects/documentation/src/app/pages/list/examples/size/list-size.example.html +20 -0
  43. package/projects/documentation/src/app/pages/list/examples/size/list-size.example.ts +12 -0
  44. package/projects/documentation/src/app/pages/list/list.page.html +95 -0
  45. package/projects/documentation/src/app/pages/list/list.page.ts +238 -0
  46. package/projects/documentation/src/app/pages/modal/modal.page.ts +15 -6
  47. package/projects/documentation/src/app/pages/tabs/tabs.page.ts +7 -0
  48. package/projects/documentation/src/app/pages/theming/examples/component-config/theming-component-config.example.html +13 -0
  49. package/projects/documentation/src/app/pages/theming/examples/component-config/theming-component-config.example.ts +20 -0
  50. package/projects/documentation/src/app/pages/theming/examples/css-override/theming-css-override.example.html +8 -0
  51. package/projects/documentation/src/app/pages/theming/examples/css-override/theming-css-override.example.scss +4 -0
  52. package/projects/documentation/src/app/pages/theming/examples/css-override/theming-css-override.example.ts +11 -0
  53. package/projects/documentation/src/app/pages/theming/examples/custom-tokens/theming-custom-tokens.example.html +13 -0
  54. package/projects/documentation/src/app/pages/theming/examples/custom-tokens/theming-custom-tokens.example.ts +33 -0
  55. package/projects/documentation/src/app/pages/theming/examples/global-theme/theming-global-theme.example.html +6 -0
  56. package/projects/documentation/src/app/pages/theming/examples/global-theme/theming-global-theme.example.ts +20 -0
  57. package/projects/documentation/src/app/pages/theming/examples/light-dark/theming-light-dark.example.html +15 -0
  58. package/projects/documentation/src/app/pages/theming/examples/light-dark/theming-light-dark.example.ts +31 -0
  59. package/projects/documentation/src/app/pages/theming/theming-component-config.page.ts +52 -0
  60. package/projects/documentation/src/app/pages/theming/theming-css-variables.page.ts +71 -0
  61. package/projects/documentation/src/app/pages/theming/theming-tokens.page.ts +56 -0
  62. package/projects/documentation/src/app/pages/theming/theming.data.ts +947 -0
  63. package/projects/documentation/src/app/pages/theming/theming.page.html +56 -0
  64. package/projects/documentation/src/app/pages/theming/theming.page.ts +144 -0
  65. package/projects/documentation/src/app/routes/app.routes.ts +63 -15
  66. package/projects/documentation/src/app/services/doc-customize.service.ts +12 -0
  67. package/projects/documentation/src/styles.scss +12 -0
@@ -0,0 +1,30 @@
1
+ import { Component } from '@angular/core';
2
+ import {
3
+ DasarComponentConfig,
4
+ DasarThemeProviderComponent,
5
+ DasarThemeConfig,
6
+ DasarListComponent,
7
+ } from 'dasar-ui';
8
+
9
+ @Component({
10
+ templateUrl: './list-advanced-theme.example.html',
11
+ selector: 'app-list-advanced-theme-example',
12
+ imports: [DasarThemeProviderComponent, DasarListComponent],
13
+ standalone: true,
14
+ })
15
+ export class ListAdvancedThemeExample {
16
+ protected items = ['Design', 'Engineering', 'Product'];
17
+
18
+ protected componentConfig: DasarComponentConfig = {
19
+ list: { size: 'sm', bordered: true, showDivider: true },
20
+ };
21
+
22
+ protected tokenConfig: DasarThemeConfig['tokens'] = {
23
+ light: {
24
+ list: {
25
+ radius: '12px',
26
+ headerBackground: 'var(--theme-primary-surface-color)',
27
+ },
28
+ },
29
+ };
30
+ }
@@ -0,0 +1,5 @@
1
+ <dasar-list>
2
+ @for (member of members; track member) {
3
+ <dasar-list-item>{{ member }}</dasar-list-item>
4
+ }
5
+ </dasar-list>
@@ -0,0 +1,12 @@
1
+ import { Component } from '@angular/core';
2
+ import { DasarListComponent } from 'dasar-ui';
3
+
4
+ @Component({
5
+ templateUrl: './list-basic.example.html',
6
+ selector: 'app-list-basic-example',
7
+ imports: [DasarListComponent],
8
+ standalone: true,
9
+ })
10
+ export class ListBasicExample {
11
+ protected members = ['Ada Lovelace', 'Grace Hopper', 'Katherine Johnson'];
12
+ }
@@ -0,0 +1,20 @@
1
+ <p style="font-size: 12px; margin: 8px 0 4px; color: gray">bordered</p>
2
+ <dasar-list bordered>
3
+ @for (item of items; track item) {
4
+ <dasar-list-item>{{ item }}</dasar-list-item>
5
+ }
6
+ </dasar-list>
7
+
8
+ <p style="font-size: 12px; margin: 8px 0 4px; color: gray">show-divider</p>
9
+ <dasar-list show-divider>
10
+ @for (item of items; track item) {
11
+ <dasar-list-item>{{ item }}</dasar-list-item>
12
+ }
13
+ </dasar-list>
14
+
15
+ <p style="font-size: 12px; margin: 8px 0 4px; color: gray">bordered + show-divider</p>
16
+ <dasar-list bordered show-divider>
17
+ @for (item of items; track item) {
18
+ <dasar-list-item>{{ item }}</dasar-list-item>
19
+ }
20
+ </dasar-list>
@@ -0,0 +1,12 @@
1
+ import { Component } from '@angular/core';
2
+ import { DasarListComponent } from 'dasar-ui';
3
+
4
+ @Component({
5
+ templateUrl: './list-bordered-divider.example.html',
6
+ selector: 'app-list-bordered-divider-example',
7
+ imports: [DasarListComponent],
8
+ standalone: true,
9
+ })
10
+ export class ListBorderedDividerExample {
11
+ protected items = ['Design system', 'Component library', 'Documentation'];
12
+ }
@@ -0,0 +1,11 @@
1
+ <dasar-list bordered show-divider container-class="my-list" [container-style]="containerStyle">
2
+ @for (item of items; track item; let i = $index) {
3
+ <dasar-list-item [item-style]="i === 1 ? highlightStyle : null">
4
+ <span class="my-list-label">{{ item }}</span>
5
+ </dasar-list-item>
6
+ }
7
+ </dasar-list>
8
+
9
+ <p style="font-size: 12px; margin-top: 8px; color: gray">
10
+ container-style caps the width at 320px, and the second row uses item-style for a highlight.
11
+ </p>
@@ -0,0 +1,19 @@
1
+ import { Component } from '@angular/core';
2
+ import { DasarListComponent } from 'dasar-ui';
3
+
4
+ @Component({
5
+ templateUrl: './list-custom-style.example.html',
6
+ selector: 'app-list-custom-style-example',
7
+ imports: [DasarListComponent],
8
+ standalone: true,
9
+ })
10
+ export class ListCustomStyleExample {
11
+ protected items = ['Overview', 'Activity', 'Settings'];
12
+
13
+ protected containerStyle = { 'max-width': '320px' };
14
+
15
+ protected highlightStyle = {
16
+ 'background-color': 'var(--theme-primary-surface-color)',
17
+ 'font-weight': '600',
18
+ };
19
+ }
@@ -0,0 +1,7 @@
1
+ <dasar-list bordered show-divider>
2
+ <div header-slot>Team members</div>
3
+ @for (member of members; track member) {
4
+ <dasar-list-item>{{ member }}</dasar-list-item>
5
+ }
6
+ <div footer-slot>{{ members.length }} members</div>
7
+ </dasar-list>
@@ -0,0 +1,12 @@
1
+ import { Component } from '@angular/core';
2
+ import { DasarListComponent } from 'dasar-ui';
3
+
4
+ @Component({
5
+ templateUrl: './list-header-footer.example.html',
6
+ selector: 'app-list-header-footer-example',
7
+ imports: [DasarListComponent],
8
+ standalone: true,
9
+ })
10
+ export class ListHeaderFooterExample {
11
+ protected members = ['Ada Lovelace', 'Grace Hopper', 'Katherine Johnson'];
12
+ }
@@ -0,0 +1,20 @@
1
+ <dasar-list clickable hoverable bordered>
2
+ @for (item of items; track item.id) {
3
+ <dasar-list-item
4
+ (click)="select(item.id)"
5
+ [item-style]="{
6
+ 'background-color': selected() === item.id ? 'var(--theme-primary-surface-color)' : '',
7
+ 'font-weight': selected() === item.id ? '600' : '',
8
+ }"
9
+ >
10
+ <div class="dasar-list-item-body">
11
+ <span>{{ item.name }}</span>
12
+ <span style="font-size: 12px; color: gray">{{ item.role }}</span>
13
+ </div>
14
+ </dasar-list-item>
15
+ }
16
+ </dasar-list>
17
+
18
+ <p style="font-size: 12px; margin-top: 8px; color: gray">
19
+ Selected: {{ selected() ?? 'none' }}. Click the row again to clear it.
20
+ </p>
@@ -0,0 +1,22 @@
1
+ import { Component, signal } from '@angular/core';
2
+ import { DasarListComponent } from 'dasar-ui';
3
+
4
+ @Component({
5
+ templateUrl: './list-interactive.example.html',
6
+ selector: 'app-list-interactive-example',
7
+ imports: [DasarListComponent],
8
+ standalone: true,
9
+ })
10
+ export class ListInteractiveExample {
11
+ protected items = [
12
+ { id: 'ada', name: 'Ada Lovelace', role: 'Analyst' },
13
+ { id: 'grace', name: 'Grace Hopper', role: 'Engineer' },
14
+ { id: 'katherine', name: 'Katherine Johnson', role: 'Mathematician' },
15
+ ];
16
+
17
+ protected selected = signal<string | null>(null);
18
+
19
+ protected select(id: string) {
20
+ this.selected.set(this.selected() === id ? null : id);
21
+ }
22
+ }
@@ -0,0 +1,9 @@
1
+ <dasar-list bordered show-divider hoverable>
2
+ @for (item of items; track item.name) {
3
+ <dasar-list-item>
4
+ <dasar-icon prefix-slot name="user" size="sm" />
5
+ {{ item.name }}
6
+ <dasar-chip suffix-slot size="xs" variant="secondary">{{ item.role }}</dasar-chip>
7
+ </dasar-list-item>
8
+ }
9
+ </dasar-list>
@@ -0,0 +1,16 @@
1
+ import { Component } from '@angular/core';
2
+ import { DasarChipComponent, DasarIconComponent, DasarListComponent } from 'dasar-ui';
3
+
4
+ @Component({
5
+ templateUrl: './list-prefix-suffix.example.html',
6
+ selector: 'app-list-prefix-suffix-example',
7
+ imports: [DasarIconComponent, DasarChipComponent, DasarListComponent],
8
+ standalone: true,
9
+ })
10
+ export class ListPrefixSuffixExample {
11
+ protected items = [
12
+ { name: 'Ada Lovelace', role: 'Admin' },
13
+ { name: 'Grace Hopper', role: 'Editor' },
14
+ { name: 'Katherine Johnson', role: 'Viewer' },
15
+ ];
16
+ }
@@ -0,0 +1,20 @@
1
+ <p style="font-size: 12px; margin: 8px 0 4px; color: gray">sm</p>
2
+ <dasar-list size="sm">
3
+ @for (item of items; track item) {
4
+ <dasar-list-item>{{ item }}</dasar-list-item>
5
+ }
6
+ </dasar-list>
7
+
8
+ <p style="font-size: 12px; margin: 8px 0 4px; color: gray">md</p>
9
+ <dasar-list size="md">
10
+ @for (item of items; track item) {
11
+ <dasar-list-item>{{ item }}</dasar-list-item>
12
+ }
13
+ </dasar-list>
14
+
15
+ <p style="font-size: 12px; margin: 8px 0 4px; color: gray">lg</p>
16
+ <dasar-list size="lg">
17
+ @for (item of items; track item) {
18
+ <dasar-list-item>{{ item }}</dasar-list-item>
19
+ }
20
+ </dasar-list>
@@ -0,0 +1,12 @@
1
+ import { Component } from '@angular/core';
2
+ import { DasarListComponent } from 'dasar-ui';
3
+
4
+ @Component({
5
+ templateUrl: './list-size.example.html',
6
+ selector: 'app-list-size-example',
7
+ imports: [DasarListComponent],
8
+ standalone: true,
9
+ })
10
+ export class ListSizeExample {
11
+ protected items = ['Inbox', 'Sent', 'Drafts'];
12
+ }
@@ -0,0 +1,95 @@
1
+ <docs-layout
2
+ title="List"
3
+ description="A vertical list of items with an optional header, footer, prefix and suffix, plus dividers, borders and hover or click states."
4
+ [apiData]="apiProps"
5
+ >
6
+ <doc-example-component
7
+ [codes]="[
8
+ { label: 'HTML', lang: 'html', value: basicHtml },
9
+ { label: 'TypeScript', lang: 'typescript', value: basicTs },
10
+ ]"
11
+ title="Basic"
12
+ >
13
+ <app-list-basic-example />
14
+ </doc-example-component>
15
+
16
+ <doc-example-component
17
+ [codes]="[
18
+ { label: 'HTML', lang: 'html', value: sizeHtml },
19
+ { label: 'TypeScript', lang: 'typescript', value: sizeTs },
20
+ ]"
21
+ title="Size"
22
+ >
23
+ <app-list-size-example />
24
+ </doc-example-component>
25
+
26
+ <doc-example-component
27
+ [codes]="[
28
+ { label: 'HTML', lang: 'html', value: borderedDividerHtml },
29
+ { label: 'TypeScript', lang: 'typescript', value: borderedDividerTs },
30
+ ]"
31
+ title="Bordered & Divider"
32
+ >
33
+ <app-list-bordered-divider-example />
34
+ </doc-example-component>
35
+
36
+ <doc-example-component
37
+ [codes]="[
38
+ { label: 'HTML', lang: 'html', value: interactiveHtml },
39
+ { label: 'TypeScript', lang: 'typescript', value: interactiveTs },
40
+ ]"
41
+ title="Interactive"
42
+ >
43
+ <app-list-interactive-example />
44
+ </doc-example-component>
45
+
46
+ <doc-example-component
47
+ [codes]="[
48
+ { label: 'HTML', lang: 'html', value: headerFooterHtml },
49
+ { label: 'TypeScript', lang: 'typescript', value: headerFooterTs },
50
+ ]"
51
+ title="Header & Footer"
52
+ >
53
+ <app-list-header-footer-example />
54
+ </doc-example-component>
55
+
56
+ <doc-example-component
57
+ [codes]="[
58
+ { label: 'HTML', lang: 'html', value: prefixSuffixHtml },
59
+ { label: 'TypeScript', lang: 'typescript', value: prefixSuffixTs },
60
+ ]"
61
+ title="Prefix & Suffix"
62
+ >
63
+ <app-list-prefix-suffix-example />
64
+ </doc-example-component>
65
+
66
+ <doc-example-component
67
+ [codes]="[
68
+ { label: 'HTML', lang: 'html', value: customStyleHtml },
69
+ { label: 'TypeScript', lang: 'typescript', value: customStyleTs },
70
+ ]"
71
+ title="Custom Style"
72
+ >
73
+ <app-list-custom-style-example />
74
+ </doc-example-component>
75
+
76
+ <doc-example-component
77
+ [codes]="[
78
+ { label: 'HTML', lang: 'html', value: advancedDynamicHtml },
79
+ { label: 'TypeScript', lang: 'typescript', value: advancedDynamicTs },
80
+ ]"
81
+ title="Advanced: Dynamic List"
82
+ >
83
+ <app-list-advanced-dynamic-example />
84
+ </doc-example-component>
85
+
86
+ <doc-example-component
87
+ [codes]="[
88
+ { label: 'HTML', lang: 'html', value: advancedThemeHtml },
89
+ { label: 'TypeScript', lang: 'typescript', value: advancedThemeTs },
90
+ ]"
91
+ title="Advanced: Theme Defaults"
92
+ >
93
+ <app-list-advanced-theme-example />
94
+ </doc-example-component>
95
+ </docs-layout>
@@ -0,0 +1,238 @@
1
+ import { Component } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { DocsLayoutComponent, DocApiProperty } from '../../layouts/doc.layout';
4
+ import { DocExampleComponent } from '../../components/doc-example.component';
5
+
6
+ import { ListBasicExample } from './examples/basic/list-basic.example';
7
+ import { ListSizeExample } from './examples/size/list-size.example';
8
+ import { ListBorderedDividerExample } from './examples/bordered-divider/list-bordered-divider.example';
9
+ import { ListInteractiveExample } from './examples/interactive/list-interactive.example';
10
+ import { ListHeaderFooterExample } from './examples/header-footer/list-header-footer.example';
11
+ import { ListPrefixSuffixExample } from './examples/prefix-suffix/list-prefix-suffix.example';
12
+ import { ListCustomStyleExample } from './examples/custom-style/list-custom-style.example';
13
+ import { ListAdvancedDynamicExample } from './examples/advanced-dynamic/list-advanced-dynamic.example';
14
+ import { ListAdvancedThemeExample } from './examples/advanced-theme/list-advanced-theme.example';
15
+
16
+ // @ts-ignore
17
+ import basicHtml from './examples/basic/list-basic.example.html' with { loader: 'text' };
18
+ // @ts-ignore
19
+ import basicTs from './examples/basic/list-basic.example.ts' with { loader: 'text' };
20
+
21
+ // @ts-ignore
22
+ import sizeHtml from './examples/size/list-size.example.html' with { loader: 'text' };
23
+ // @ts-ignore
24
+ import sizeTs from './examples/size/list-size.example.ts' with { loader: 'text' };
25
+
26
+ // @ts-ignore
27
+ import borderedDividerHtml from './examples/bordered-divider/list-bordered-divider.example.html' with {
28
+ loader: 'text',
29
+ };
30
+ // @ts-ignore
31
+ import borderedDividerTs from './examples/bordered-divider/list-bordered-divider.example.ts' with {
32
+ loader: 'text',
33
+ };
34
+
35
+ // @ts-ignore
36
+ import interactiveHtml from './examples/interactive/list-interactive.example.html' with {
37
+ loader: 'text',
38
+ };
39
+ // @ts-ignore
40
+ import interactiveTs from './examples/interactive/list-interactive.example.ts' with {
41
+ loader: 'text',
42
+ };
43
+
44
+ // @ts-ignore
45
+ import headerFooterHtml from './examples/header-footer/list-header-footer.example.html' with {
46
+ loader: 'text',
47
+ };
48
+ // @ts-ignore
49
+ import headerFooterTs from './examples/header-footer/list-header-footer.example.ts' with {
50
+ loader: 'text',
51
+ };
52
+
53
+ // @ts-ignore
54
+ import prefixSuffixHtml from './examples/prefix-suffix/list-prefix-suffix.example.html' with {
55
+ loader: 'text',
56
+ };
57
+ // @ts-ignore
58
+ import prefixSuffixTs from './examples/prefix-suffix/list-prefix-suffix.example.ts' with {
59
+ loader: 'text',
60
+ };
61
+
62
+ // @ts-ignore
63
+ import customStyleHtml from './examples/custom-style/list-custom-style.example.html' with {
64
+ loader: 'text',
65
+ };
66
+ // @ts-ignore
67
+ import customStyleTs from './examples/custom-style/list-custom-style.example.ts' with {
68
+ loader: 'text',
69
+ };
70
+
71
+ // @ts-ignore
72
+ import advancedDynamicHtml from './examples/advanced-dynamic/list-advanced-dynamic.example.html' with {
73
+ loader: 'text',
74
+ };
75
+ // @ts-ignore
76
+ import advancedDynamicTs from './examples/advanced-dynamic/list-advanced-dynamic.example.ts' with {
77
+ loader: 'text',
78
+ };
79
+
80
+ // @ts-ignore
81
+ import advancedThemeHtml from './examples/advanced-theme/list-advanced-theme.example.html' with {
82
+ loader: 'text',
83
+ };
84
+ // @ts-ignore
85
+ import advancedThemeTs from './examples/advanced-theme/list-advanced-theme.example.ts' with {
86
+ loader: 'text',
87
+ };
88
+
89
+ @Component({
90
+ imports: [
91
+ CommonModule,
92
+ DocsLayoutComponent,
93
+ DocExampleComponent,
94
+ ListBasicExample,
95
+ ListSizeExample,
96
+ ListBorderedDividerExample,
97
+ ListInteractiveExample,
98
+ ListHeaderFooterExample,
99
+ ListPrefixSuffixExample,
100
+ ListCustomStyleExample,
101
+ ListAdvancedDynamicExample,
102
+ ListAdvancedThemeExample,
103
+ ],
104
+ templateUrl: './list.page.html',
105
+ selector: 'app-list-page',
106
+ standalone: true,
107
+ })
108
+ export class ListDocPage {
109
+ protected basicHtml = basicHtml;
110
+ protected basicTs = basicTs;
111
+
112
+ protected sizeHtml = sizeHtml;
113
+ protected sizeTs = sizeTs;
114
+
115
+ protected borderedDividerHtml = borderedDividerHtml;
116
+ protected borderedDividerTs = borderedDividerTs;
117
+
118
+ protected interactiveHtml = interactiveHtml;
119
+ protected interactiveTs = interactiveTs;
120
+
121
+ protected headerFooterHtml = headerFooterHtml;
122
+ protected headerFooterTs = headerFooterTs;
123
+
124
+ protected prefixSuffixHtml = prefixSuffixHtml;
125
+ protected prefixSuffixTs = prefixSuffixTs;
126
+
127
+ protected customStyleHtml = customStyleHtml;
128
+ protected customStyleTs = customStyleTs;
129
+
130
+ protected advancedDynamicHtml = advancedDynamicHtml;
131
+ protected advancedDynamicTs = advancedDynamicTs;
132
+
133
+ protected advancedThemeHtml = advancedThemeHtml;
134
+ protected advancedThemeTs = advancedThemeTs;
135
+
136
+ protected readonly apiProps: DocApiProperty[] = [
137
+ {
138
+ name: 'size',
139
+ type: "'sm' | 'md' | 'lg'",
140
+ defaultValue: "'md'",
141
+ description:
142
+ 'Sets the font size and the item padding. Uses --list-font-size-sm/md/lg and --list-item-padding.',
143
+ },
144
+ {
145
+ name: 'bordered',
146
+ type: 'boolean',
147
+ defaultValue: 'false',
148
+ description: 'Adds a 1px border around the container using --list-border.',
149
+ },
150
+ {
151
+ name: 'show-divider',
152
+ type: 'boolean',
153
+ defaultValue: 'false',
154
+ description: 'Separates items with a 1px line using --list-divider.',
155
+ },
156
+ {
157
+ name: 'hoverable',
158
+ type: 'boolean',
159
+ defaultValue: 'false',
160
+ description: 'Highlights an item on hover using --list-hover-background.',
161
+ },
162
+ {
163
+ name: 'clickable',
164
+ type: 'boolean',
165
+ defaultValue: 'false',
166
+ description:
167
+ 'Shows a pointer cursor and an active background using --list-active-background. The click event stays on the item, the component does not emit anything.',
168
+ },
169
+ {
170
+ name: 'container-class',
171
+ type: 'string | object',
172
+ defaultValue: "''",
173
+ description: 'Class applied to the list container.',
174
+ },
175
+ {
176
+ name: 'container-style',
177
+ type: 'object',
178
+ defaultValue: 'null',
179
+ description: 'Inline style for the list container.',
180
+ },
181
+ {
182
+ name: 'item-class',
183
+ type: 'string | object',
184
+ defaultValue: "''",
185
+ description: 'On dasar-list-item. Class applied to the item.',
186
+ },
187
+ {
188
+ name: 'item-style',
189
+ type: 'object',
190
+ defaultValue: 'null',
191
+ description: 'On dasar-list-item. Inline style for the item.',
192
+ },
193
+ {
194
+ name: '[header-slot]',
195
+ type: 'Content Slot',
196
+ defaultValue: '-',
197
+ description:
198
+ 'On dasar-list. Renders a sticky-style header above the content. The header and footer wrapper is only rendered when the slot is provided.',
199
+ },
200
+ {
201
+ name: '[footer-slot]',
202
+ type: 'Content Slot',
203
+ defaultValue: '-',
204
+ description: 'On dasar-list. Renders a footer below the content.',
205
+ },
206
+ {
207
+ name: '[prefix-slot]',
208
+ type: 'Content Slot',
209
+ defaultValue: '-',
210
+ description: 'On dasar-list-item. Renders before the item body, for example an icon.',
211
+ },
212
+ {
213
+ name: '[suffix-slot]',
214
+ type: 'Content Slot',
215
+ defaultValue: '-',
216
+ description: 'On dasar-list-item. Renders after the item body, for example a chip.',
217
+ },
218
+ {
219
+ name: 'default slot',
220
+ type: 'Content Slot',
221
+ defaultValue: '-',
222
+ description: 'The list content. dasar-list-item elements are the usual children.',
223
+ },
224
+ {
225
+ name: 'theme tokens',
226
+ type: 'DasarThemeList',
227
+ defaultValue: '-',
228
+ description:
229
+ 'Set through tokens.light.list (or tokens.dark.list) in DasarThemeService.setGlobalTheme, or [tokenConfig] on dasar-theme-provider. Example: hoverBackground -> --list-hover-background.',
230
+ },
231
+ {
232
+ name: 'component config',
233
+ type: 'DasarListConfig / DasarListItemConfig',
234
+ defaultValue: '-',
235
+ description: 'Defaults via components.list and components.listItem in DasarComponentConfig.',
236
+ },
237
+ ];
238
+ }
@@ -192,15 +192,17 @@ export class ModalDocPage {
192
192
  },
193
193
  {
194
194
  name: 'overlay-blur',
195
- type: 'string',
196
- defaultValue: "'4px'",
197
- description: 'Backdrop blur radius, forwarded to the underlying dasar-overlay.',
195
+ type: 'string | null',
196
+ defaultValue: 'null',
197
+ description:
198
+ 'Backdrop blur radius, forwarded to the underlying dasar-overlay. Falls back to the --overlay-blur theme token, then 4px.',
198
199
  },
199
200
  {
200
201
  name: 'overlay-background',
201
- type: 'string',
202
- defaultValue: "'rgba(0, 0, 0, 0.45)'",
203
- description: 'Backdrop color, forwarded to the underlying dasar-overlay.',
202
+ type: 'string | null',
203
+ defaultValue: 'null',
204
+ description:
205
+ 'Backdrop color, forwarded to the underlying dasar-overlay. Falls back to the --overlay-background theme token, then rgba(0, 0, 0, 0.45).',
204
206
  },
205
207
  {
206
208
  name: 'fluid / ...-fluid',
@@ -247,6 +249,13 @@ export class ModalDocPage {
247
249
  description:
248
250
  'Injects footer action elements. The actions stay visible while the body scrolls.',
249
251
  },
252
+ {
253
+ name: 'theme tokens',
254
+ type: 'DasarThemeModal',
255
+ defaultValue: '-',
256
+ description:
257
+ 'Set through tokens.light.modal (or tokens.dark.modal) in DasarThemeService.setGlobalTheme, or [tokenConfig] on dasar-theme-provider. Each key writes one CSS variable, for example widthMd -> --modal-width-md.',
258
+ },
250
259
  {
251
260
  name: 'default slot',
252
261
  type: 'Content Slot',
@@ -322,6 +322,13 @@ export class TabsDocPage {
322
322
  defaultValue: '-',
323
323
  description: 'Replaces the content of the right arrow button.',
324
324
  },
325
+ {
326
+ name: 'theme tokens',
327
+ type: 'DasarThemeTabs',
328
+ defaultValue: '-',
329
+ description:
330
+ 'Set through tokens.light.tabs (or tokens.dark.tabs) in DasarThemeService.setGlobalTheme, or [tokenConfig] on dasar-theme-provider. Each key writes one CSS variable, for example gapNormal -> --tabs-gap-normal and scrollFade -> --tabs-scroll-fade.',
331
+ },
325
332
  {
326
333
  name: '[tab-item-slot]',
327
334
  type: 'Content Slot',
@@ -0,0 +1,13 @@
1
+ <dasar-theme-provider [componentConfig]="componentConfig">
2
+ <dasar-card label="From component config">
3
+ <div style="display: flex; gap: 12px; align-items: center; flex-wrap: wrap">
4
+ <dasar-button variant="primary">Outline sm</dasar-button>
5
+ <dasar-button variant="secondary">Outline sm</dasar-button>
6
+ </div>
7
+ </dasar-card>
8
+ </dasar-theme-provider>
9
+
10
+ <p style="font-size: 12px; margin-top: 8px; color: gray">
11
+ components.button sets appearance and size. components.card sets the elevated look and compact
12
+ spacing. Explicit inputs on a component always win over these defaults.
13
+ </p>
@@ -0,0 +1,20 @@
1
+ import { Component } from '@angular/core';
2
+ import {
3
+ DasarButtonComponent,
4
+ DasarCardComponent,
5
+ DasarComponentConfig,
6
+ DasarThemeProviderComponent,
7
+ } from 'dasar-ui';
8
+
9
+ @Component({
10
+ templateUrl: './theming-component-config.example.html',
11
+ selector: 'app-theming-component-config-example',
12
+ imports: [DasarThemeProviderComponent, DasarButtonComponent, DasarCardComponent],
13
+ standalone: true,
14
+ })
15
+ export class ThemingComponentConfigExample {
16
+ protected componentConfig: DasarComponentConfig = {
17
+ button: { appearance: 'outline', size: 'sm' },
18
+ card: { appearance: 'elevated', spacing: 'compact' },
19
+ };
20
+ }