@hmscodes/honey-core 1.0.9 → 1.0.12
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/.editorconfig +17 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/README.md +14 -18
- package/angular.json +61 -0
- package/package.json +42 -23
- package/projects/honey-core/.storybook/main.ts +18 -0
- package/projects/honey-core/.storybook/preview.ts +14 -0
- package/projects/honey-core/.storybook/tsconfig.json +11 -0
- package/projects/honey-core/.storybook/typings.d.ts +4 -0
- package/projects/honey-core/README.md +63 -0
- package/projects/honey-core/ng-package.json +8 -0
- package/projects/honey-core/package.json +20 -0
- package/projects/honey-core/src/lib/components/button/button.component.html +8 -0
- package/projects/honey-core/src/lib/components/button/button.component.scss +1 -0
- package/projects/honey-core/src/lib/components/button/button.component.spec.ts +23 -0
- package/projects/honey-core/src/lib/components/button/button.component.ts +44 -0
- package/projects/honey-core/src/lib/components/input/input-floating-label.component.html +10 -0
- package/projects/honey-core/src/lib/components/input/input-floating-label.component.scss +37 -0
- package/projects/honey-core/src/lib/components/input/input-floating-label.component.spec.ts +22 -0
- package/projects/honey-core/src/lib/components/input/input-floating-label.component.ts +18 -0
- package/projects/honey-core/src/lib/honey-core.component.spec.ts +23 -0
- package/projects/honey-core/src/lib/honey-core.component.ts +15 -0
- package/projects/honey-core/src/lib/honey-core.service.spec.ts +16 -0
- package/projects/honey-core/src/lib/honey-core.service.ts +9 -0
- package/{public-api.d.ts → projects/honey-core/src/public-api.ts} +5 -0
- package/projects/honey-core/src/stories/.eslintrc.json +5 -0
- package/projects/honey-core/src/stories/Colors.mdx +40 -0
- package/projects/honey-core/src/stories/Presentation.mdx +7 -0
- package/projects/honey-core/src/stories/button.component.stories.ts +73 -0
- package/projects/honey-core/src/stories/button.css +30 -0
- package/projects/honey-core/src/stories/input-floating-label.component.stories.ts +23 -0
- package/projects/honey-core/src/stories/user.ts +3 -0
- package/projects/honey-core/styles/hc-button.scss +174 -0
- package/{styles → projects/honey-core/styles}/variables.css +6 -3
- package/projects/honey-core/tsconfig.lib.json +15 -0
- package/projects/honey-core/tsconfig.lib.prod.json +11 -0
- package/projects/honey-core/tsconfig.spec.json +15 -0
- package/tsconfig.json +32 -0
- package/fesm2022/hmscodes-honey-core.mjs +0 -84
- package/fesm2022/hmscodes-honey-core.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/button/button.component.d.ts +0 -25
- package/lib/honey-core.component.d.ts +0 -5
- package/lib/honey-core.service.d.ts +0 -6
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Meta, ColorPalette, ColorItem } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title="Colors" />
|
|
4
|
+
|
|
5
|
+
<ColorPalette>
|
|
6
|
+
<ColorItem
|
|
7
|
+
title="theme.color.primary"
|
|
8
|
+
subtitle="Honey Core"
|
|
9
|
+
colors={{
|
|
10
|
+
'--hc-primary-500': '#FF7A00',
|
|
11
|
+
'--hc-primary-600': '#E86B00',
|
|
12
|
+
'--hc-primary-700': '#CC5D00',
|
|
13
|
+
}}
|
|
14
|
+
/>
|
|
15
|
+
<ColorItem
|
|
16
|
+
title="theme.color.secondary"
|
|
17
|
+
subtitle="Honey Core Secondary"
|
|
18
|
+
colors={{
|
|
19
|
+
'--hc-secondary-500': '#FFC857',
|
|
20
|
+
'--hc-secondary-600': '#f7a838',
|
|
21
|
+
'--hc-secondary-700': '#d68d2a',
|
|
22
|
+
}}
|
|
23
|
+
/>
|
|
24
|
+
<ColorItem
|
|
25
|
+
title="theme.color.brown"
|
|
26
|
+
subtitle="Honey Core Secondary"
|
|
27
|
+
colors={{
|
|
28
|
+
'--hc-brown-500': '#95570e',
|
|
29
|
+
'--hc-brown-600': '#753c00',
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
<ColorItem
|
|
33
|
+
title="theme.color.greyscale"
|
|
34
|
+
subtitle="Some of the greys"
|
|
35
|
+
colors={{
|
|
36
|
+
'--hc-text-strong': '#2E282A',
|
|
37
|
+
'--hc-text-light': '#6C757D',
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
</ColorPalette>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta } from "@storybook/blocks";
|
|
2
|
+
|
|
3
|
+
<Meta title="Apresentação" />
|
|
4
|
+
|
|
5
|
+
# Configure your project
|
|
6
|
+
|
|
7
|
+
HoneyCore is a reusable component library for Angular, crafted to bring consistency, efficiency, and style to personal projects. Inspired by the elegant structure of honeycombs, it’s built to scale and sweeten your workflow. 🐝
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { argsToTemplate, type Meta, type StoryObj } from '@storybook/angular';
|
|
2
|
+
import { fn } from '@storybook/test';
|
|
3
|
+
import { HcButtonComponent } from '../lib/components/button/button.component';
|
|
4
|
+
|
|
5
|
+
type ButtonInputsAndCustomArgs = HcButtonComponent & { text: string };
|
|
6
|
+
|
|
7
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
8
|
+
const meta: Meta<ButtonInputsAndCustomArgs> = {
|
|
9
|
+
title: 'Example/Button',
|
|
10
|
+
component: HcButtonComponent,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
args: {
|
|
13
|
+
text: 'Button',
|
|
14
|
+
},
|
|
15
|
+
render: ({ text, ...buttonArgs }) => ({
|
|
16
|
+
props: buttonArgs,
|
|
17
|
+
template: `
|
|
18
|
+
<hc-button ${argsToTemplate(buttonArgs)}>
|
|
19
|
+
${text}
|
|
20
|
+
</hc-button>
|
|
21
|
+
`,
|
|
22
|
+
}),
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<HcButtonComponent>;
|
|
27
|
+
|
|
28
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
29
|
+
export const Primary: Story = {
|
|
30
|
+
args: {
|
|
31
|
+
style: 's-solid',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const PrimaryDisabled: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
...Primary.args,
|
|
38
|
+
disabled: true,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const SecondarySolid: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
style: 's-solid',
|
|
45
|
+
color: 'c-secondary',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const Hollow: Story = {
|
|
50
|
+
args: {
|
|
51
|
+
style: 's-hollow',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const Plain: Story = {
|
|
56
|
+
args: {
|
|
57
|
+
style: 's-plain',
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const Small: Story = {
|
|
62
|
+
args: {
|
|
63
|
+
...Primary.args,
|
|
64
|
+
size: 'h-small',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const Stretch: Story = {
|
|
69
|
+
args: {
|
|
70
|
+
...Primary.args,
|
|
71
|
+
size: 'w-stretch',
|
|
72
|
+
},
|
|
73
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.storybook-button {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
border: 0;
|
|
5
|
+
border-radius: 3em;
|
|
6
|
+
font-weight: 700;
|
|
7
|
+
line-height: 1;
|
|
8
|
+
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
9
|
+
}
|
|
10
|
+
.storybook-button--primary {
|
|
11
|
+
background-color: #555ab9;
|
|
12
|
+
color: white;
|
|
13
|
+
}
|
|
14
|
+
.storybook-button--secondary {
|
|
15
|
+
box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
color: #333;
|
|
18
|
+
}
|
|
19
|
+
.storybook-button--small {
|
|
20
|
+
padding: 10px 16px;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
}
|
|
23
|
+
.storybook-button--medium {
|
|
24
|
+
padding: 11px 20px;
|
|
25
|
+
font-size: 14px;
|
|
26
|
+
}
|
|
27
|
+
.storybook-button--large {
|
|
28
|
+
padding: 12px 24px;
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { InputFloatingLabelComponent } from '../lib/components/input/input-floating-label.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<InputFloatingLabelComponent> = {
|
|
5
|
+
title: 'Form/Input Floating Label',
|
|
6
|
+
component: InputFloatingLabelComponent,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
render: (args: InputFloatingLabelComponent) => ({
|
|
9
|
+
props: args,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<InputFloatingLabelComponent>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
args: {
|
|
19
|
+
label: 'Nome completo',
|
|
20
|
+
id: 'nome',
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
$hcButtonBorderRadius : 12px !default;
|
|
2
|
+
$hcButtonFontSize : 14px !default;
|
|
3
|
+
$hcButtonFontWeight : normal !default;
|
|
4
|
+
$hcButtonPadding : 24px !default;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Applies colors to the button
|
|
8
|
+
*/
|
|
9
|
+
@mixin colorButton($color, $background, $border) {
|
|
10
|
+
color : $color;
|
|
11
|
+
background : $background;
|
|
12
|
+
border-color : $border;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
@mixin hcTypography($size, $color, $weight: normal) {
|
|
19
|
+
font-size : $size;
|
|
20
|
+
color : $color;
|
|
21
|
+
font-weight : $weight;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
@mixin flex($justify, $align: center) {
|
|
28
|
+
display : flex;
|
|
29
|
+
align-items : $align;
|
|
30
|
+
justify-content : $justify;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Base shared properties for hc-button styles
|
|
35
|
+
*/
|
|
36
|
+
%hc-button {
|
|
37
|
+
--color-button : var(--color);
|
|
38
|
+
--color-button-hover : var(--hover-color);
|
|
39
|
+
--width : fit-content;
|
|
40
|
+
--height : 36px;
|
|
41
|
+
--h-padding : #{$hcButtonPadding};
|
|
42
|
+
|
|
43
|
+
@include flex(center);
|
|
44
|
+
@include hcTypography($hcButtonFontSize, var(--color-button), $hcButtonFontWeight);
|
|
45
|
+
gap : 8px;
|
|
46
|
+
box-sizing : border-box;
|
|
47
|
+
width : var(--width);
|
|
48
|
+
height : var(--height);
|
|
49
|
+
padding : 0px var(--h-padding);
|
|
50
|
+
white-space : nowrap;
|
|
51
|
+
outline : none;
|
|
52
|
+
border : 1px solid transparent;
|
|
53
|
+
border-radius : $hcButtonBorderRadius;
|
|
54
|
+
transition : background .2s, color .2s, box-shadow .2s;
|
|
55
|
+
cursor : pointer;
|
|
56
|
+
|
|
57
|
+
&:disabled {
|
|
58
|
+
@include colorButton(var(--hc-disabled-text), var(--hc-disabled-bg), var(--hc-disabled-bg));
|
|
59
|
+
cursor : not-allowed;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Base colors
|
|
65
|
+
*/
|
|
66
|
+
.hc-button {
|
|
67
|
+
&.c-initial {
|
|
68
|
+
--color-button : var(--hc-text-strong);
|
|
69
|
+
--color-button-hover : var(--hc-text-strong);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.c-primary {
|
|
73
|
+
--color-button : var(--hc-background-primary);
|
|
74
|
+
--color-button-hover : var(--hc-background-primary-hover);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.c-secondary {
|
|
78
|
+
color : var(--hc-brown-600) !important;
|
|
79
|
+
--color-button : var(--hc-background-secondary);
|
|
80
|
+
--color-button-hover : var(--hc-background-secondary-hover);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Solid colored background button
|
|
87
|
+
*/
|
|
88
|
+
.hc-button.s-solid {
|
|
89
|
+
@extend %hc-button;
|
|
90
|
+
@include colorButton(var(--hc-background-main), var(--color-button), transparent);
|
|
91
|
+
|
|
92
|
+
&:not(:disabled):hover {
|
|
93
|
+
background : var(--color-button-hover);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Hollow button with colored border and text
|
|
99
|
+
*/
|
|
100
|
+
.hc-button.s-hollow {
|
|
101
|
+
@extend %hc-button;
|
|
102
|
+
@include colorButton(var(--color-button), transparent, var(--color-button));
|
|
103
|
+
|
|
104
|
+
&:not(:disabled):hover {
|
|
105
|
+
@include colorButton(var(--hc-background-main), var(--color-button), transparent);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:disabled {
|
|
109
|
+
background : transparent;
|
|
110
|
+
color : var(--cds-text-light)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Text button
|
|
116
|
+
*/
|
|
117
|
+
.hc-button.s-plain {
|
|
118
|
+
--height : 28px;
|
|
119
|
+
--h-padding : 16px;
|
|
120
|
+
|
|
121
|
+
@extend %hc-button;
|
|
122
|
+
@include colorButton(var(--color-button), transparent, transparent);
|
|
123
|
+
|
|
124
|
+
&:not(:disabled):hover {
|
|
125
|
+
@include colorButton(var(--color-button-hover), transparent, transparent);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&:disabled {
|
|
129
|
+
@include colorButton(var(--hc-button-disabled-foreground), transparent, transparent);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* hc-button width classes
|
|
135
|
+
*/
|
|
136
|
+
.hc-button {
|
|
137
|
+
&.v-underlined {
|
|
138
|
+
text-decoration : underline;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&.h-small {
|
|
142
|
+
--height : 32px;
|
|
143
|
+
--h-padding : 16px;
|
|
144
|
+
font-size : 12px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&.w-stretch {
|
|
148
|
+
--width : 100%;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Overwrite buttons style on dark mode
|
|
154
|
+
*/
|
|
155
|
+
:root body[cds-theme='dark'] {
|
|
156
|
+
.s-solid {
|
|
157
|
+
&:disabled {
|
|
158
|
+
background : hsla(var(--cds-primary-500-hsl), 0.5);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.hc-primary {
|
|
163
|
+
&:disabled {
|
|
164
|
+
@include colorButton(hsla(var(--cds-primary-400-hsl), 0.5), transparent, hsla(var(--cds-primary-400-hsl), 0.5));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.hc-button.s-solid {
|
|
169
|
+
&:disabled {
|
|
170
|
+
background : hsla(var(--color-button-hsl), 0.5);
|
|
171
|
+
border-color : transparent;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--hc-primary-500 : #
|
|
3
|
-
--hc-primary-600 : #
|
|
4
|
-
--hc-primary-700 : #
|
|
2
|
+
--hc-primary-500 : #FF7A00;
|
|
3
|
+
--hc-primary-600 : #E86B00;
|
|
4
|
+
--hc-primary-700 : #CC5D00;
|
|
5
5
|
--hc-secondary-500 : #FFC857;
|
|
6
6
|
--hc-secondary-600 : #f7a838;
|
|
7
7
|
--hc-secondary-700 : #d68d2a;
|
|
@@ -10,9 +10,12 @@
|
|
|
10
10
|
--hc-text-strong : #2E282A;
|
|
11
11
|
--hc-text-light : #6C757D;
|
|
12
12
|
|
|
13
|
+
--hc-background-main : #FFFFFF;
|
|
13
14
|
--hc-disabled-bg : #c7c7c7;
|
|
14
15
|
--hc-disabled-text : #6C757D;
|
|
15
16
|
--hc-background-primary : var(--hc-primary-500);
|
|
16
17
|
--hc-background-primary-hover : var(--hc-primary-600);
|
|
18
|
+
--hc-background-secondary : var(--hc-secondary-500);
|
|
19
|
+
--hc-background-secondary-hover : var(--hc-secondary-600);
|
|
17
20
|
}
|
|
18
21
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "../../tsconfig.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "../../out-tsc/lib",
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"declarationMap": true,
|
|
9
|
+
"inlineSources": true,
|
|
10
|
+
"types": []
|
|
11
|
+
},
|
|
12
|
+
"exclude": [
|
|
13
|
+
"**/*.spec.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "./tsconfig.lib.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"declarationMap": false
|
|
7
|
+
},
|
|
8
|
+
"angularCompilerOptions": {
|
|
9
|
+
"compilationMode": "partial"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "../../tsconfig.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "../../out-tsc/spec",
|
|
7
|
+
"types": [
|
|
8
|
+
"jasmine"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"include": [
|
|
12
|
+
"**/*.spec.ts",
|
|
13
|
+
"**/*.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"compileOnSave": false,
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "./dist/out-tsc",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"paths": {
|
|
9
|
+
"honey-core": [
|
|
10
|
+
"./dist/honey-core"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"noImplicitOverride": true,
|
|
14
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
15
|
+
"noImplicitReturns": true,
|
|
16
|
+
"noFallthroughCasesInSwitch": true,
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"isolatedModules": true,
|
|
19
|
+
"esModuleInterop": true,
|
|
20
|
+
"experimentalDecorators": true,
|
|
21
|
+
"moduleResolution": "bundler",
|
|
22
|
+
"importHelpers": true,
|
|
23
|
+
"target": "ES2022",
|
|
24
|
+
"module": "ES2022"
|
|
25
|
+
},
|
|
26
|
+
"angularCompilerOptions": {
|
|
27
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
28
|
+
"strictInjectionParameters": true,
|
|
29
|
+
"strictInputAccessModifiers": true,
|
|
30
|
+
"strictTemplates": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, EventEmitter, Output, Input } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
class HoneyCoreService {
|
|
5
|
-
constructor() { }
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HoneyCoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HoneyCoreService, providedIn: 'root' });
|
|
8
|
-
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HoneyCoreService, decorators: [{
|
|
10
|
-
type: Injectable,
|
|
11
|
-
args: [{
|
|
12
|
-
providedIn: 'root'
|
|
13
|
-
}]
|
|
14
|
-
}], ctorParameters: () => [] });
|
|
15
|
-
|
|
16
|
-
class HoneyCoreComponent {
|
|
17
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HoneyCoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: HoneyCoreComponent, isStandalone: true, selector: "lib-honey-core", ngImport: i0, template: `
|
|
19
|
-
<p>
|
|
20
|
-
honey-core works!
|
|
21
|
-
</p>
|
|
22
|
-
`, isInline: true, styles: [""] });
|
|
23
|
-
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HoneyCoreComponent, decorators: [{
|
|
25
|
-
type: Component,
|
|
26
|
-
args: [{ selector: 'lib-honey-core', imports: [], template: `
|
|
27
|
-
<p>
|
|
28
|
-
honey-core works!
|
|
29
|
-
</p>
|
|
30
|
-
` }]
|
|
31
|
-
}] });
|
|
32
|
-
|
|
33
|
-
class HcButtonComponent {
|
|
34
|
-
/** Is this the principal call to action on the page? */
|
|
35
|
-
variant = 'primary';
|
|
36
|
-
/** What background color to use */
|
|
37
|
-
backgroundColor;
|
|
38
|
-
/** How large should the button be? */
|
|
39
|
-
size = 'medium';
|
|
40
|
-
/**
|
|
41
|
-
* Button contents
|
|
42
|
-
*
|
|
43
|
-
* @required
|
|
44
|
-
*/
|
|
45
|
-
label = 'Button';
|
|
46
|
-
/**
|
|
47
|
-
* Disabled state of the button
|
|
48
|
-
*/
|
|
49
|
-
disabled = false;
|
|
50
|
-
/** Optional click handler */
|
|
51
|
-
onClick = new EventEmitter();
|
|
52
|
-
get classes() {
|
|
53
|
-
return ['hc-button', `hc-${this.size}`, `hc-${this.variant}`];
|
|
54
|
-
}
|
|
55
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HcButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: HcButtonComponent, isStandalone: true, selector: "hc-button", inputs: { variant: "variant", backgroundColor: "backgroundColor", size: "size", label: "label", disabled: "disabled" }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<button\n type=\"button\"\n [class]=\"classes\"\n [disabled]=\"disabled\"\n (click)=\"onClick.emit($event)\"\n>\n <ng-content />\n</button>", styles: [".hc-button{display:inline-block;cursor:pointer;border:0;border-radius:4px;font-weight:700;line-height:1;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.hc-button:disabled{cursor:not-allowed;background:var(--hc-disabled-bg);color:var(--hc-disabled-text)}.hc-button:disabled:hover{background:var(--hc-disabled-bg);color:var(--hc-disabled-text)}.hc-primary{background-color:var(--hc-background-primary);color:#fff}.hc-primary:hover{background-color:var(--hc-background-primary-hover)}.hc-secondary{background-color:var(--hc-secondary-500);color:#fff}.hc-small{padding:10px 16px;font-size:12px}.hc-medium{padding:10px 20px;font-size:14px}.hc-large{padding:12px 24px;font-size:16px}\n"] });
|
|
57
|
-
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HcButtonComponent, decorators: [{
|
|
59
|
-
type: Component,
|
|
60
|
-
args: [{ selector: 'hc-button', imports: [], standalone: true, template: "<button\n type=\"button\"\n [class]=\"classes\"\n [disabled]=\"disabled\"\n (click)=\"onClick.emit($event)\"\n>\n <ng-content />\n</button>", styles: [".hc-button{display:inline-block;cursor:pointer;border:0;border-radius:4px;font-weight:700;line-height:1;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.hc-button:disabled{cursor:not-allowed;background:var(--hc-disabled-bg);color:var(--hc-disabled-text)}.hc-button:disabled:hover{background:var(--hc-disabled-bg);color:var(--hc-disabled-text)}.hc-primary{background-color:var(--hc-background-primary);color:#fff}.hc-primary:hover{background-color:var(--hc-background-primary-hover)}.hc-secondary{background-color:var(--hc-secondary-500);color:#fff}.hc-small{padding:10px 16px;font-size:12px}.hc-medium{padding:10px 20px;font-size:14px}.hc-large{padding:12px 24px;font-size:16px}\n"] }]
|
|
61
|
-
}], propDecorators: { variant: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}], backgroundColor: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}], size: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}], label: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], disabled: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}], onClick: [{
|
|
72
|
-
type: Output
|
|
73
|
-
}] } });
|
|
74
|
-
|
|
75
|
-
/*
|
|
76
|
-
* Public API Surface of honey-core
|
|
77
|
-
*/
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Generated bundle index. Do not edit.
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
export { HcButtonComponent, HoneyCoreComponent, HoneyCoreService };
|
|
84
|
-
//# sourceMappingURL=hmscodes-honey-core.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hmscodes-honey-core.mjs","sources":["../../../projects/honey-core/src/lib/honey-core.service.ts","../../../projects/honey-core/src/lib/honey-core.component.ts","../../../projects/honey-core/src/lib/components/button/button.component.ts","../../../projects/honey-core/src/lib/components/button/button.component.html","../../../projects/honey-core/src/public-api.ts","../../../projects/honey-core/src/hmscodes-honey-core.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class HoneyCoreService {\n\n constructor() { }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-honey-core',\n imports: [],\n template: `\n <p>\n honey-core works!\n </p>\n `,\n styles: ``\n})\nexport class HoneyCoreComponent {\n\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'hc-button',\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n imports: [],\n standalone: true,\n})\nexport class HcButtonComponent {\n /** Is this the principal call to action on the page? */\n @Input()\n variant: 'primary' | 'secondary' = 'primary';\n\n /** What background color to use */\n @Input()\n backgroundColor?: string;\n\n /** How large should the button be? */\n @Input()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Button contents\n *\n * @required\n */\n @Input()\n label = 'Button';\n\n /**\n * Disabled state of the button\n */\n @Input()\n disabled = false;\n\n /** Optional click handler */\n @Output()\n onClick = new EventEmitter<Event>();\n\n public get classes(): string[] {\n return ['hc-button', `hc-${this.size}`, `hc-${this.variant}`];\n }\n}\n","<button\n type=\"button\"\n [class]=\"classes\"\n [disabled]=\"disabled\"\n (click)=\"onClick.emit($event)\"\n>\n <ng-content />\n</button>","/*\n * Public API Surface of honey-core\n */\n\nexport * from './lib/honey-core.service';\nexport * from './lib/honey-core.component';\nexport * from './lib/components/button/button.component';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,gBAAgB,CAAA;AAE3B,IAAA,WAAA,GAAA;uGAFW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCQY,kBAAkB,CAAA;uGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,EAPnB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGU,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAV9B,SAAS;+BACE,gBAAgB,EAAA,OAAA,EACjB,EAAE,EACD,QAAA,EAAA;;;;AAIT,EAAA,CAAA,EAAA;;;MCAU,iBAAiB,CAAA;;IAG5B,OAAO,GAA6B,SAAS;;AAI7C,IAAA,eAAe;;IAIf,IAAI,GAAiC,QAAQ;AAE7C;;;;AAIG;IAEH,KAAK,GAAG,QAAQ;AAEhB;;AAEG;IAEH,QAAQ,GAAG,KAAK;;AAIhB,IAAA,OAAO,GAAG,IAAI,YAAY,EAAS;AAEnC,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,CAAC,WAAW,EAAE,CAAA,GAAA,EAAM,IAAI,CAAC,IAAI,CAAE,CAAA,EAAE,MAAM,IAAI,CAAC,OAAO,CAAA,CAAE,CAAC;;uGAhCpD,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,8NCT9B,kJAOS,EAAA,MAAA,EAAA,CAAA,4rBAAA,CAAA,EAAA,CAAA;;2FDEI,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;+BACE,WAAW,EAAA,OAAA,EAGZ,EAAE,EAAA,UAAA,EACC,IAAI,EAAA,QAAA,EAAA,kJAAA,EAAA,MAAA,EAAA,CAAA,4rBAAA,CAAA,EAAA;8BAKhB,OAAO,EAAA,CAAA;sBADN;gBAKD,eAAe,EAAA,CAAA;sBADd;gBAKD,IAAI,EAAA,CAAA;sBADH;gBASD,KAAK,EAAA,CAAA;sBADJ;gBAOD,QAAQ,EAAA,CAAA;sBADP;gBAKD,OAAO,EAAA,CAAA;sBADN;;;AErCH;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class HcButtonComponent {
|
|
4
|
-
/** Is this the principal call to action on the page? */
|
|
5
|
-
variant: 'primary' | 'secondary';
|
|
6
|
-
/** What background color to use */
|
|
7
|
-
backgroundColor?: string;
|
|
8
|
-
/** How large should the button be? */
|
|
9
|
-
size: 'small' | 'medium' | 'large';
|
|
10
|
-
/**
|
|
11
|
-
* Button contents
|
|
12
|
-
*
|
|
13
|
-
* @required
|
|
14
|
-
*/
|
|
15
|
-
label: string;
|
|
16
|
-
/**
|
|
17
|
-
* Disabled state of the button
|
|
18
|
-
*/
|
|
19
|
-
disabled: boolean;
|
|
20
|
-
/** Optional click handler */
|
|
21
|
-
onClick: EventEmitter<Event>;
|
|
22
|
-
get classes(): string[];
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HcButtonComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HcButtonComponent, "hc-button", never, { "variant": { "alias": "variant"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onClick": "onClick"; }, never, ["*"], true, never>;
|
|
25
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class HoneyCoreComponent {
|
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HoneyCoreComponent, never>;
|
|
4
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HoneyCoreComponent, "lib-honey-core", never, {}, {}, never, never, true, never>;
|
|
5
|
-
}
|