@design-system-rte/angular 0.1.1-rc7 → 0.1.1-rc8
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.
- package/design-system-rte-angular.d.ts.map +1 -0
- package/esm2022/design-system-rte-angular.mjs +5 -0
- package/esm2022/lib/components/button/button.component.mjs +22 -0
- package/esm2022/public-api.mjs +5 -0
- package/fesm2022/design-system-rte-angular.mjs +33 -0
- package/fesm2022/design-system-rte-angular.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/components/button/button.component.d.ts +13 -0
- package/lib/components/button/button.component.d.ts.map +1 -0
- package/package.json +16 -3
- package/{src/public-api.ts → public-api.d.ts} +1 -4
- package/public-api.d.ts.map +1 -0
- package/ng-package.json +0 -10
- package/src/lib/components/button/button.component.html +0 -7
- package/src/lib/components/button/button.component.scss +0 -156
- package/src/lib/components/button/button.component.spec.ts +0 -23
- package/src/lib/components/button/button.component.stories.ts +0 -102
- package/src/lib/components/button/button.component.ts +0 -25
- package/src/lib/components/grid/col/col.directive.ts +0 -37
- package/src/lib/components/grid/grid.directive.stories.ts +0 -149
- package/src/lib/components/grid/grid.directive.ts +0 -24
- package/src/lib/components/link/link.component.html +0 -5
- package/src/lib/components/link/link.component.scss +0 -108
- package/src/lib/components/link/link.component.stories.ts +0 -61
- package/src/lib/components/link/link.component.ts +0 -19
- package/src/lib/components/radio-button/radio-button.component.html +0 -24
- package/src/lib/components/radio-button/radio-button.component.scss +0 -140
- package/src/lib/components/radio-button/radio-button.component.stories.ts +0 -75
- package/src/lib/components/radio-button/radio-button.component.ts +0 -23
- package/src/lib/components/radio-button-group/radio-button-group.component.html +0 -45
- package/src/lib/components/radio-button-group/radio-button-group.component.scss +0 -82
- package/src/lib/components/radio-button-group/radio-button-group.component.stories.ts +0 -124
- package/src/lib/components/radio-button-group/radio-button-group.component.ts +0 -30
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
@use '@design-system-rte/core/tokens/main.scss' as *;
|
|
2
|
-
|
|
3
|
-
.radio-button-group-container {
|
|
4
|
-
display: flex;
|
|
5
|
-
padding: $positive-spacing_0;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
align-items: flex-start;
|
|
9
|
-
gap: $positive-spacing_100;
|
|
10
|
-
|
|
11
|
-
.radio-button-group-header {
|
|
12
|
-
|
|
13
|
-
.group-title {
|
|
14
|
-
@include typography-heading-s;
|
|
15
|
-
align-self: stretch;
|
|
16
|
-
margin: $positive-spacing_0;
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.group-help-text {
|
|
21
|
-
@include typography-text-m;
|
|
22
|
-
color: var(--content-tertiary);
|
|
23
|
-
align-self: stretch;
|
|
24
|
-
margin: $positive-spacing_0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.group-error-message {
|
|
28
|
-
@include typography-text-m-bold;
|
|
29
|
-
color: var(--content-danger);
|
|
30
|
-
align-self: stretch;
|
|
31
|
-
margin: $positive-spacing_0;
|
|
32
|
-
margin-top: $positive-spacing_050;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&.error {
|
|
36
|
-
.group-title {
|
|
37
|
-
color: var(--content-danger);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&.read-only {
|
|
42
|
-
.group-title {
|
|
43
|
-
color: var(--content-tertiary);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.error{
|
|
47
|
-
.group-title {
|
|
48
|
-
color: var(--content-danger);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&.disabled {
|
|
54
|
-
|
|
55
|
-
pointer-events: none;
|
|
56
|
-
|
|
57
|
-
.group-title {
|
|
58
|
-
color: var(--content-disabled);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.group-help-text {
|
|
62
|
-
color: var(--content-disabled);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
.radio-button-group {
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-direction: row;
|
|
73
|
-
padding: $positive-spacing_0;
|
|
74
|
-
align-items: flex-start;
|
|
75
|
-
gap: $positive-spacing_300;
|
|
76
|
-
|
|
77
|
-
&.vertical {
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
gap: $positive-spacing_100;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/angular";
|
|
2
|
-
import { userEvent, within, expect } from "@storybook/test";
|
|
3
|
-
import { RadioButtonGroupComponent } from "./radio-button-group.component";
|
|
4
|
-
|
|
5
|
-
const meta: Meta<RadioButtonGroupComponent> = {
|
|
6
|
-
title: "RadioButtonGroup",
|
|
7
|
-
component: RadioButtonGroupComponent,
|
|
8
|
-
tags: ["autodocs"],
|
|
9
|
-
argTypes: {
|
|
10
|
-
groupName: {
|
|
11
|
-
control: "text",
|
|
12
|
-
defaultValue: "group1",
|
|
13
|
-
},
|
|
14
|
-
items: {
|
|
15
|
-
control: "object",
|
|
16
|
-
defaultValue: ["Option 1", "Option 2", "Option 3"],
|
|
17
|
-
},
|
|
18
|
-
direction: {
|
|
19
|
-
control: "select",
|
|
20
|
-
options: ["horizontal", "vertical"],
|
|
21
|
-
defaultValue: "horizontal",
|
|
22
|
-
},
|
|
23
|
-
showItemsLabel: {
|
|
24
|
-
control: "boolean",
|
|
25
|
-
defaultValue: true,
|
|
26
|
-
},
|
|
27
|
-
groupTitle: {
|
|
28
|
-
control: "text",
|
|
29
|
-
defaultValue: "Radio Button Group Title",
|
|
30
|
-
},
|
|
31
|
-
showGroupTitle: {
|
|
32
|
-
control: "boolean",
|
|
33
|
-
defaultValue: true,
|
|
34
|
-
},
|
|
35
|
-
groupHelpText: {
|
|
36
|
-
control: "text",
|
|
37
|
-
defaultValue:
|
|
38
|
-
"This is a help text for the radio button group.",
|
|
39
|
-
},
|
|
40
|
-
showHelpText: {
|
|
41
|
-
control: "boolean",
|
|
42
|
-
defaultValue: true,
|
|
43
|
-
},
|
|
44
|
-
errorMessage: {
|
|
45
|
-
control: "text",
|
|
46
|
-
defaultValue:
|
|
47
|
-
'This is an error message. Please select an option.',
|
|
48
|
-
},
|
|
49
|
-
error: {
|
|
50
|
-
control: "boolean",
|
|
51
|
-
defaultValue: false,
|
|
52
|
-
},
|
|
53
|
-
disabled: {
|
|
54
|
-
control: "boolean",
|
|
55
|
-
defaultValue: false,
|
|
56
|
-
},
|
|
57
|
-
readOnly: {
|
|
58
|
-
control: "boolean",
|
|
59
|
-
defaultValue: false,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
export default meta;
|
|
64
|
-
type Story = StoryObj<RadioButtonGroupComponent>;
|
|
65
|
-
|
|
66
|
-
export const Default: Story = {
|
|
67
|
-
args: {
|
|
68
|
-
groupName: "group1",
|
|
69
|
-
items: ["Option 1", "Option 2", "Option 3"],
|
|
70
|
-
direction: "horizontal",
|
|
71
|
-
showItemsLabel: true,
|
|
72
|
-
groupTitle: "Radio Button Group Title",
|
|
73
|
-
showGroupTitle: true,
|
|
74
|
-
groupHelpText:
|
|
75
|
-
"This is a help text for the radio button group.",
|
|
76
|
-
showHelpText: true,
|
|
77
|
-
errorMessage:
|
|
78
|
-
'This is an error message. Please select an option.',
|
|
79
|
-
error: false,
|
|
80
|
-
disabled: false,
|
|
81
|
-
readOnly: false,
|
|
82
|
-
},
|
|
83
|
-
play: async ({ canvasElement }) => {
|
|
84
|
-
const canvas = within(canvasElement);
|
|
85
|
-
const radioButton = canvas.getByLabelText("Option 1");
|
|
86
|
-
await userEvent.click(radioButton);
|
|
87
|
-
expect(radioButton).toBeChecked();
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export const Disabled: Story = {
|
|
92
|
-
args: {
|
|
93
|
-
...Default.args,
|
|
94
|
-
disabled: true,
|
|
95
|
-
},
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export const Error: Story = {
|
|
99
|
-
args: {
|
|
100
|
-
...Default.args,
|
|
101
|
-
error: true,
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export const ReadOnly: Story = {
|
|
106
|
-
args: {
|
|
107
|
-
...Default.args,
|
|
108
|
-
readOnly: true,
|
|
109
|
-
},
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export const Vertical: Story = {
|
|
113
|
-
args: {
|
|
114
|
-
...Default.args,
|
|
115
|
-
direction: "vertical",
|
|
116
|
-
},
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export const Horizontal: Story = {
|
|
120
|
-
args: {
|
|
121
|
-
...Default.args,
|
|
122
|
-
direction: "horizontal",
|
|
123
|
-
},
|
|
124
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Component, computed, input } from "@angular/core";
|
|
2
|
-
import { CommonModule } from "@angular/common";
|
|
3
|
-
import { RadioButtonComponent } from "../radio-button/radio-button.component";
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'rte-radio-button-group',
|
|
7
|
-
standalone: true,
|
|
8
|
-
imports: [CommonModule, RadioButtonComponent],
|
|
9
|
-
templateUrl: './radio-button-group.component.html',
|
|
10
|
-
styleUrls: ['./radio-button-group.component.scss'],
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
export class RadioButtonGroupComponent {
|
|
14
|
-
groupName = input('');
|
|
15
|
-
items = input<string[]>([]);
|
|
16
|
-
direction = input('horizontal');
|
|
17
|
-
showItemsLabel = input(true);
|
|
18
|
-
groupTitle = input('');
|
|
19
|
-
showGroupTitle = input(false);
|
|
20
|
-
groupHelpText = input('');
|
|
21
|
-
showHelpText = input(false);
|
|
22
|
-
errorMessage = input('');
|
|
23
|
-
error = input(false);
|
|
24
|
-
disabled = input(false);
|
|
25
|
-
readOnly = input(false);
|
|
26
|
-
|
|
27
|
-
isDisplayed = computed(() => !(this.disabled() && this.error()));
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
package/tsconfig.lib.json
DELETED
|
@@ -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/lib",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"inlineSources": true,
|
|
9
|
-
"types": []
|
|
10
|
-
},
|
|
11
|
-
"exclude": [
|
|
12
|
-
"**/*.spec.ts"
|
|
13
|
-
]
|
|
14
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
package/tsconfig.spec.json
DELETED
|
@@ -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
|
-
}
|