@hubspot/cms-component-library 0.3.7 → 0.3.9
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/components/componentLibrary/Accordion/AccordionContent/ContentFields.tsx +6 -6
- package/components/componentLibrary/Accordion/AccordionContent/index.tsx +3 -1
- package/components/componentLibrary/Accordion/AccordionContent/types.ts +2 -3
- package/components/componentLibrary/Accordion/AccordionTitle/AccordionTitleBase.tsx +45 -0
- package/components/componentLibrary/Accordion/AccordionTitle/ContentFields.tsx +8 -3
- package/components/componentLibrary/Accordion/AccordionTitle/index.tsx +18 -25
- package/components/componentLibrary/Accordion/AccordionTitle/islands/AccordionTitleIsland.tsx +29 -0
- package/components/componentLibrary/Accordion/AccordionTitle/types.ts +1 -0
- package/components/componentLibrary/Accordion/llm.txt +20 -13
- package/components/componentLibrary/Button/StyleFields.tsx +8 -8
- package/components/componentLibrary/Button/index.module.scss +24 -27
- package/components/componentLibrary/Button/index.tsx +4 -4
- package/components/componentLibrary/Button/llm.txt +51 -64
- package/components/componentLibrary/Button/stories/Button.AsButton.stories.tsx +2 -2
- package/components/componentLibrary/Button/stories/Button.AsLink.stories.tsx +2 -2
- package/components/componentLibrary/Button/stories/ButtonDecorator.module.scss +19 -23
- package/components/componentLibrary/Button/types.ts +2 -2
- package/components/componentLibrary/Card/StyleFields.tsx +9 -14
- package/components/componentLibrary/Card/index.module.scss +7 -7
- package/components/componentLibrary/Card/index.tsx +8 -13
- package/components/componentLibrary/Card/llm.txt +22 -43
- package/components/componentLibrary/Card/stories/Card.stories.tsx +28 -20
- package/components/componentLibrary/Card/stories/CardDecorator.module.scss +28 -5
- package/components/componentLibrary/Card/types.ts +8 -5
- package/components/componentLibrary/Form/StyleFields.tsx +19 -0
- package/components/componentLibrary/Form/index.tsx +7 -1
- package/components/componentLibrary/Form/islands/FormIsland.tsx +3 -1
- package/components/componentLibrary/Form/islands/LegacyFormIsland.tsx +2 -1
- package/components/componentLibrary/Form/islands/legacyForm.module.css +251 -0
- package/components/componentLibrary/Form/islands/v4Form.module.css +95 -0
- package/components/componentLibrary/Form/llm.txt +184 -0
- package/components/componentLibrary/Form/types.ts +6 -0
- package/components/componentLibrary/Link/ContentFields.tsx +11 -3
- package/components/componentLibrary/Link/llm.txt +13 -0
- package/components/componentLibrary/Link/types.ts +6 -4
- package/components/componentLibrary/Logo/ContentFields.tsx +25 -0
- package/components/componentLibrary/Logo/index.tsx +13 -4
- package/components/componentLibrary/Logo/types.tsx +15 -0
- package/components/componentLibrary/Video/ContentFields.tsx +112 -0
- package/components/componentLibrary/Video/StyleFields.tsx +19 -0
- package/components/componentLibrary/Video/index.tsx +47 -0
- package/components/componentLibrary/Video/islands/HSVideoIsland.tsx +53 -0
- package/components/componentLibrary/Video/serverUtils.ts +41 -0
- package/components/componentLibrary/Video/types.ts +74 -0
- package/components/componentLibrary/_patterns/README.md +11 -7
- package/components/componentLibrary/_patterns/checklist-and-examples.md +8 -0
- package/components/componentLibrary/_patterns/component-structure.md +5 -1
- package/components/componentLibrary/_patterns/field-patterns.md +65 -0
- package/components/componentLibrary/_patterns/island-patterns.md +136 -0
- package/components/componentLibrary/utils/index.ts +1 -0
- package/package.json +4 -3
|
@@ -43,8 +43,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
43
43
|
|
|
44
44
|
export const Default: Story = {
|
|
45
45
|
args: {
|
|
46
|
-
variant: '
|
|
47
|
-
borderRadius: 8,
|
|
46
|
+
variant: 'cardStyle1',
|
|
48
47
|
},
|
|
49
48
|
render: args => (
|
|
50
49
|
<Card {...args}>
|
|
@@ -55,34 +54,43 @@ export const Default: Story = {
|
|
|
55
54
|
),
|
|
56
55
|
};
|
|
57
56
|
|
|
58
|
-
export const
|
|
59
|
-
name: '
|
|
57
|
+
export const Variants: Story = {
|
|
58
|
+
name: 'Card Variants',
|
|
60
59
|
render: () => (
|
|
61
60
|
<SBContainer flex direction="column" gap="large">
|
|
62
61
|
<SBContainer addBackground>
|
|
63
|
-
<h4>
|
|
64
|
-
<Card
|
|
65
|
-
<CardHeading>
|
|
62
|
+
<h4>Card Style 1 (Light)</h4>
|
|
63
|
+
<Card variant="cardStyle1">
|
|
64
|
+
<CardHeading>Card Style 1</CardHeading>
|
|
66
65
|
<CardDivider />
|
|
67
|
-
<CardContent>
|
|
66
|
+
<CardContent>Light background with dark text.</CardContent>
|
|
68
67
|
</Card>
|
|
69
68
|
</SBContainer>
|
|
70
69
|
|
|
71
70
|
<SBContainer addBackground>
|
|
72
|
-
<h4>
|
|
73
|
-
<Card
|
|
74
|
-
<CardHeading>
|
|
71
|
+
<h4>Card Style 2 (Subtle)</h4>
|
|
72
|
+
<Card variant="cardStyle2">
|
|
73
|
+
<CardHeading>Card Style 2</CardHeading>
|
|
75
74
|
<CardDivider />
|
|
76
|
-
<CardContent>
|
|
75
|
+
<CardContent>Subtle background with dark text.</CardContent>
|
|
77
76
|
</Card>
|
|
78
77
|
</SBContainer>
|
|
79
78
|
|
|
80
79
|
<SBContainer addBackground>
|
|
81
|
-
<h4>
|
|
82
|
-
<Card
|
|
83
|
-
<CardHeading>
|
|
80
|
+
<h4>Card Style 3 (Dark)</h4>
|
|
81
|
+
<Card variant="cardStyle3">
|
|
82
|
+
<CardHeading>Card Style 3</CardHeading>
|
|
84
83
|
<CardDivider />
|
|
85
|
-
<CardContent>
|
|
84
|
+
<CardContent>Dark background with light text.</CardContent>
|
|
85
|
+
</Card>
|
|
86
|
+
</SBContainer>
|
|
87
|
+
|
|
88
|
+
<SBContainer addBackground>
|
|
89
|
+
<h4>Card Style 4 (Darker)</h4>
|
|
90
|
+
<Card variant="cardStyle4">
|
|
91
|
+
<CardHeading>Card Style 4</CardHeading>
|
|
92
|
+
<CardDivider />
|
|
93
|
+
<CardContent>Darker background with light text.</CardContent>
|
|
86
94
|
</Card>
|
|
87
95
|
</SBContainer>
|
|
88
96
|
</SBContainer>
|
|
@@ -141,7 +149,7 @@ export const ComplexContent: Story = {
|
|
|
141
149
|
<SBContainer flex direction="column" gap="large">
|
|
142
150
|
<SBContainer addBackground>
|
|
143
151
|
<h4>Card with Rich Content</h4>
|
|
144
|
-
<Card
|
|
152
|
+
<Card>
|
|
145
153
|
<CardHeading>Product Launch Announcement</CardHeading>
|
|
146
154
|
<CardDivider />
|
|
147
155
|
<div style={{ margin: 0 }}>
|
|
@@ -163,7 +171,7 @@ export const ComplexContent: Story = {
|
|
|
163
171
|
|
|
164
172
|
<SBContainer addBackground>
|
|
165
173
|
<h4>Card with Multiple Elements</h4>
|
|
166
|
-
<Card
|
|
174
|
+
<Card>
|
|
167
175
|
<CardHeading>Multi-Section Card</CardHeading>
|
|
168
176
|
<CardDivider />
|
|
169
177
|
<div style={{ margin: 0 }}>
|
|
@@ -223,7 +231,7 @@ export const InteractionStates: Story = {
|
|
|
223
231
|
Card wrapped in a link becomes clickable and shows hover/focus states
|
|
224
232
|
</p>
|
|
225
233
|
<a href="https://www.hubspot.com" style={{ textDecoration: 'none' }}>
|
|
226
|
-
<Card
|
|
234
|
+
<Card>
|
|
227
235
|
<CardHeading>Clickable Feature Card</CardHeading>
|
|
228
236
|
<CardDivider />
|
|
229
237
|
<CardContent>
|
|
@@ -243,7 +251,7 @@ export const InteractionStates: Story = {
|
|
|
243
251
|
</p>
|
|
244
252
|
<SBFocusWrapper>
|
|
245
253
|
<a href="https://www.hubspot.com" style={{ textDecoration: 'none' }}>
|
|
246
|
-
<Card
|
|
254
|
+
<Card>
|
|
247
255
|
<CardHeading>Focused Card</CardHeading>
|
|
248
256
|
<CardDivider />
|
|
249
257
|
<CardContent>
|
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
.cardContainer {
|
|
2
|
-
/*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
/* card Variant Styles */
|
|
3
|
+
:global([data-card-variant='cardStyle1']) {
|
|
4
|
+
--hs-card-borderRadius: 10px;
|
|
5
|
+
--hs-card-backgroundColor: rgb(255, 255, 255);
|
|
6
|
+
--hs-card-color: rgb(28, 28, 31);
|
|
7
|
+
--hs-card-border: 1px solid #e0e0e0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:global([data-card-variant='cardStyle2']) {
|
|
11
|
+
--hs-card-borderRadius: 10px;
|
|
12
|
+
--hs-card-backgroundColor: rgb(249, 249, 249);
|
|
13
|
+
--hs-card-color: rgb(28, 28, 31);
|
|
14
|
+
--hs-card-border: 1px solid #e0e0e0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:global([data-card-variant='cardStyle3']) {
|
|
18
|
+
--hs-card-borderRadius: 10px;
|
|
19
|
+
--hs-card-backgroundColor: rgb(28, 28, 31);
|
|
20
|
+
--hs-card-color: rgb(255,255,255);
|
|
21
|
+
--hs-card-border: 1px solid #e0e0e0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:global([data-card-variant='cardStyle4']) {
|
|
25
|
+
--hs-card-borderRadius: 10px;
|
|
26
|
+
--hs-card-backgroundColor: rgb(36, 36, 36);
|
|
27
|
+
--hs-card-color: rgb(255,255,255);
|
|
28
|
+
--hs-card-border: 1px solid #e0e0e0;
|
|
29
|
+
}
|
|
7
30
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
export type CardVariant =
|
|
1
|
+
export type CardVariant =
|
|
2
|
+
| 'cardStyle1'
|
|
3
|
+
| 'cardStyle2'
|
|
4
|
+
| 'cardStyle3'
|
|
5
|
+
| 'cardStyle4';
|
|
2
6
|
|
|
3
7
|
export type CardAs = 'div' | 'article' | 'section';
|
|
4
8
|
|
|
5
9
|
export type CardProps = {
|
|
6
10
|
variant?: CardVariant;
|
|
7
11
|
as?: CardAs;
|
|
8
|
-
borderRadius?: number;
|
|
9
12
|
children?: React.ReactNode;
|
|
10
13
|
className?: string;
|
|
11
14
|
style?: React.CSSProperties;
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
export type StyleFieldsProps = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
cardVariantLabel?: string;
|
|
19
|
+
cardVariantName?: string;
|
|
20
|
+
cardVariantDefault?: { variantName?: string, variant_name?: string };
|
|
18
21
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { VariantSelectionField } from '@hubspot/cms-components/fields';
|
|
2
|
+
import { StyleFieldsProps } from './types.js';
|
|
3
|
+
|
|
4
|
+
const StyleFields = ({
|
|
5
|
+
formVariantLabel = 'Form variant',
|
|
6
|
+
formVariantName = 'formVariant',
|
|
7
|
+
formVariantDefault = { variant_name: 'primaryForm' },
|
|
8
|
+
}: StyleFieldsProps) => {
|
|
9
|
+
return (
|
|
10
|
+
<VariantSelectionField
|
|
11
|
+
label={formVariantLabel}
|
|
12
|
+
name={formVariantName}
|
|
13
|
+
variantDefinitionName="form"
|
|
14
|
+
default={formVariantDefault}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default StyleFields;
|
|
@@ -5,6 +5,7 @@ import LegacyFormIsland from './islands/LegacyFormIsland.js?island';
|
|
|
5
5
|
import { FormProps } from './types.js';
|
|
6
6
|
import { Island } from '@hubspot/cms-components';
|
|
7
7
|
import ContentFields from './ContentFields.js';
|
|
8
|
+
import StyleFields from './StyleFields.js';
|
|
8
9
|
|
|
9
10
|
const FormComponent = ({
|
|
10
11
|
formField,
|
|
@@ -13,16 +14,21 @@ const FormComponent = ({
|
|
|
13
14
|
...rest
|
|
14
15
|
}: FormProps) => {
|
|
15
16
|
const resolvedFormId = formField != null ? formField.form_id : formId;
|
|
16
|
-
const
|
|
17
|
+
const resolvedVersion =
|
|
18
|
+
formField != null ? formField.embed_version : formVersion;
|
|
19
|
+
const isV4 = resolvedVersion === 'v4';
|
|
20
|
+
const FormModule = isV4 ? FormIsland : LegacyFormIsland;
|
|
17
21
|
|
|
18
22
|
return <Island module={FormModule} formId={resolvedFormId} {...rest} />;
|
|
19
23
|
};
|
|
20
24
|
|
|
21
25
|
type FormComponentType = typeof FormComponent & {
|
|
22
26
|
ContentFields: typeof ContentFields;
|
|
27
|
+
StyleFields: typeof StyleFields;
|
|
23
28
|
};
|
|
24
29
|
|
|
25
30
|
const Form = FormComponent as FormComponentType;
|
|
26
31
|
Form.ContentFields = ContentFields;
|
|
32
|
+
Form.StyleFields = StyleFields;
|
|
27
33
|
|
|
28
34
|
export default Form;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import { FormProps } from '../types.js';
|
|
3
3
|
import { getHubID, getHSEnv } from '@hubspot/cms-components';
|
|
4
|
+
import cx from '../../utils/classname.js';
|
|
5
|
+
import styles from './v4Form.module.css';
|
|
4
6
|
|
|
5
7
|
const getScriptSrc = (portalId: number, env: string) => {
|
|
6
8
|
const host = env === 'qa' ? 'js.hsformsqa.net' : 'js.hsforms.net';
|
|
@@ -43,7 +45,7 @@ const FormIsland = ({ formId }: FormProps) => {
|
|
|
43
45
|
|
|
44
46
|
return (
|
|
45
47
|
<div
|
|
46
|
-
className=
|
|
48
|
+
className={cx('hs-form-html', styles.v4FormStyles)}
|
|
47
49
|
data-form-id={formId}
|
|
48
50
|
data-portal-id={portalId}
|
|
49
51
|
data-env={resolvedEnv}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect, useId } from 'react';
|
|
2
2
|
import { FormProps } from '../types.js';
|
|
3
3
|
import { getHubID, getHSEnv } from '@hubspot/cms-components';
|
|
4
|
+
import styles from './legacyForm.module.css';
|
|
4
5
|
|
|
5
6
|
declare global {
|
|
6
7
|
interface Window {
|
|
@@ -71,7 +72,7 @@ const LegacyFormIsland = ({ formId }: FormProps) => {
|
|
|
71
72
|
return null;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
return <div id={containerId} />;
|
|
75
|
+
return <div id={containerId} className={styles.legacyFormStyles} />;
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
export default LegacyFormIsland;
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
.legacyFormStyles {
|
|
2
|
+
/* Form container */
|
|
3
|
+
:global(.hs-form) {
|
|
4
|
+
padding: 32px;
|
|
5
|
+
border-color: #ff00ff;
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
border-style: solid;
|
|
8
|
+
border-width: 4px;
|
|
9
|
+
background: #ffe0f0;
|
|
10
|
+
|
|
11
|
+
/* Form field spacing */
|
|
12
|
+
:global(.hs-form-field) {
|
|
13
|
+
margin-block-end: 24px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Textarea */
|
|
17
|
+
:global(textarea) {
|
|
18
|
+
position: relative;
|
|
19
|
+
height: 160px;
|
|
20
|
+
border-radius: 3px;
|
|
21
|
+
|
|
22
|
+
&::-webkit-resizer {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Textarea drag icon */
|
|
28
|
+
:global(.hs_multi_line_field .input) {
|
|
29
|
+
position: relative;
|
|
30
|
+
|
|
31
|
+
&::after {
|
|
32
|
+
position: absolute;
|
|
33
|
+
right: 8px;
|
|
34
|
+
bottom: 8px;
|
|
35
|
+
content: url("data:image/svg+xml,%3Csvg width='11' height='12' viewBox='0 0 22 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cline y1='-1' x2='29.5206' y2='-1' transform='matrix(-0.666795 0.745241 -0.806754 -0.590888 19.6843 0)' stroke='%23303F59' stroke-width='2'/%3E%3Cpath d='M21.0005 9.99756L10.5005 21.9976' stroke='%23303F59' stroke-width='2'/%3E%3C/svg%3E%0A");
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Select dropdown - remove native appearance */
|
|
41
|
+
:global(select) {
|
|
42
|
+
-webkit-appearance: none;
|
|
43
|
+
-moz-appearance: none;
|
|
44
|
+
appearance: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Select dropdown icon */
|
|
48
|
+
:global(.hs-fieldtype-select .input) {
|
|
49
|
+
position: relative;
|
|
50
|
+
|
|
51
|
+
&::after {
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: 50%;
|
|
54
|
+
right: 16px;
|
|
55
|
+
content: url("data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.9407 19.5595C11.5267 20.1454 12.4782 20.1454 13.0642 19.5595L22.0642 10.5595C22.6501 9.97354 22.6501 9.02197 22.0642 8.43604C21.4782 7.8501 20.5267 7.8501 19.9407 8.43604L12.0001 16.3767L4.05947 8.44072C3.47354 7.85478 2.52197 7.85478 1.93604 8.44072C1.3501 9.02666 1.3501 9.97822 1.93604 10.5642L10.936 19.5642L10.9407 19.5595Z' fill='%2309152B'/%3E%3C/svg%3E%0A");
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
transform: translateY(-50%);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Datepicker icon */
|
|
62
|
+
:global(.hs-dateinput) {
|
|
63
|
+
position: relative;
|
|
64
|
+
|
|
65
|
+
&::before {
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: 50%;
|
|
68
|
+
right: 16px;
|
|
69
|
+
content: url("data:image/svg+xml,%3Csvg width='24' height='29' viewBox='0 0 24 29' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3812_12272)'%3E%3Cpath d='M8.14286 2.07136C8.14286 1.35886 7.56964 0.785645 6.85714 0.785645C6.14464 0.785645 5.57143 1.35886 5.57143 2.07136V4.21422H3.42857C1.5375 4.21422 0 5.75172 0 7.64279V8.49993V11.0714V24.7856C0 26.6767 1.5375 28.2142 3.42857 28.2142H20.5714C22.4625 28.2142 24 26.6767 24 24.7856V11.0714V8.49993V7.64279C24 5.75172 22.4625 4.21422 20.5714 4.21422H18.4286V2.07136C18.4286 1.35886 17.8554 0.785645 17.1429 0.785645C16.4304 0.785645 15.8571 1.35886 15.8571 2.07136V4.21422H8.14286V2.07136ZM2.57143 11.0714H21.4286V24.7856C21.4286 25.2571 21.0429 25.6428 20.5714 25.6428H3.42857C2.95714 25.6428 2.57143 25.2571 2.57143 24.7856V11.0714Z' fill='%2309152B'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3812_12272'%3E%3Crect width='24' height='27.4286' fill='white' transform='translate(0 0.785645)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
|
|
70
|
+
pointer-events: none;
|
|
71
|
+
transform: translateY(-50%);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Placeholder text color */
|
|
76
|
+
:global(::-moz-placeholder) {
|
|
77
|
+
color: #ff6600;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:global(::placeholder) {
|
|
81
|
+
color: #ff6600;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Checkbox and radio list reset */
|
|
85
|
+
:global(.inputs-list) {
|
|
86
|
+
padding: 0;
|
|
87
|
+
margin: 0;
|
|
88
|
+
list-style: none;
|
|
89
|
+
|
|
90
|
+
:global(li) {
|
|
91
|
+
display: block;
|
|
92
|
+
margin-block-end: 16px;
|
|
93
|
+
|
|
94
|
+
&:last-of-type {
|
|
95
|
+
margin-block-end: 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:global(:is(input, span)) {
|
|
100
|
+
vertical-align: middle;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Help text / legend */
|
|
105
|
+
:global(legend) {
|
|
106
|
+
color: #ff6600;
|
|
107
|
+
margin-block-end: 8px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Rich text within form */
|
|
111
|
+
:global(.hs-richtext) {
|
|
112
|
+
color: #9900cc;
|
|
113
|
+
|
|
114
|
+
:global(img) {
|
|
115
|
+
height: auto;
|
|
116
|
+
max-width: 100% !important;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Error state - input border */
|
|
121
|
+
:global(.hs-input.error) {
|
|
122
|
+
border-color: #ff0000;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Error messages */
|
|
126
|
+
:global(.hs-error-msg),
|
|
127
|
+
:global(.hs-error-msgs) {
|
|
128
|
+
color: #ff0000;
|
|
129
|
+
margin-block-start: 4px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* File upload and fieldset max width */
|
|
133
|
+
:global(.hs-form-field.hs-fieldtype-file .hs-input),
|
|
134
|
+
:global(fieldset) {
|
|
135
|
+
max-width: 100% !important;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Labels - targets both form types */
|
|
140
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(label) {
|
|
141
|
+
display: block;
|
|
142
|
+
color: #cc0066;
|
|
143
|
+
font-family: sans-serif;
|
|
144
|
+
font-size: 0.875rem;
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
margin-block-end: 8px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Text inputs, selects, textareas - targets both form types */
|
|
150
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(input[type='text']),
|
|
151
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(input[type='email']),
|
|
152
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(input[type='password']),
|
|
153
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(input[type='tel']),
|
|
154
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(input[type='number']),
|
|
155
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(input[type='search']),
|
|
156
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(select),
|
|
157
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(textarea) {
|
|
158
|
+
width: 100% !important;
|
|
159
|
+
border-radius: 6px;
|
|
160
|
+
border-top: 3px solid #00ccff;
|
|
161
|
+
border-right: 3px solid #00ccff;
|
|
162
|
+
border-bottom: 3px solid #00ccff;
|
|
163
|
+
border-left: 3px solid #00ccff;
|
|
164
|
+
background-color: #e0ffff;
|
|
165
|
+
color: #003300;
|
|
166
|
+
padding-block: 12px;
|
|
167
|
+
padding-inline: 16px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Checkbox and radio sizing + fill - targets both form types */
|
|
171
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(input[type='checkbox']),
|
|
172
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(input[type='radio']) {
|
|
173
|
+
height: 24px;
|
|
174
|
+
width: 24px !important;
|
|
175
|
+
accent-color: #00cc00;
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
margin-inline-end: 12px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Submit button - targets both form types */
|
|
181
|
+
:global(:is(.hs-form, .hs-elevate-system-form)) :global(:is(.hs-button, input[type='submit'])) {
|
|
182
|
+
display: inline-block;
|
|
183
|
+
width: 100%;
|
|
184
|
+
border-color: #ff6600;
|
|
185
|
+
border-radius: 6px;
|
|
186
|
+
border-style: solid;
|
|
187
|
+
border-width: 3px;
|
|
188
|
+
background-color: #ff6600;
|
|
189
|
+
color: #ffffff;
|
|
190
|
+
cursor: pointer;
|
|
191
|
+
font-family: sans-serif;
|
|
192
|
+
font-size: 1rem;
|
|
193
|
+
font-weight: 600;
|
|
194
|
+
padding-block: 12px;
|
|
195
|
+
padding-inline: 24px;
|
|
196
|
+
text-align: center;
|
|
197
|
+
text-decoration: none;
|
|
198
|
+
transition: all 0.15s linear;
|
|
199
|
+
white-space: normal !important;
|
|
200
|
+
|
|
201
|
+
&:hover,
|
|
202
|
+
&:focus {
|
|
203
|
+
border-color: #cc5200;
|
|
204
|
+
background-color: #cc5200;
|
|
205
|
+
color: #ffffff;
|
|
206
|
+
text-decoration: none;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* International phone field layout */
|
|
211
|
+
:global(.hs-input.hs-fieldtype-intl-phone) {
|
|
212
|
+
display: flex;
|
|
213
|
+
width: 100% !important;
|
|
214
|
+
flex-direction: row;
|
|
215
|
+
flex-wrap: wrap;
|
|
216
|
+
align-items: center;
|
|
217
|
+
justify-content: flex-start;
|
|
218
|
+
gap: 8px;
|
|
219
|
+
|
|
220
|
+
> :global(input) {
|
|
221
|
+
flex: 1 0 calc(70% - 8px) !important;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
> :global(select) {
|
|
225
|
+
flex: 1 0 30% !important;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@media (width <= 600px) {
|
|
229
|
+
display: flex;
|
|
230
|
+
width: 100%;
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
gap: 8px;
|
|
233
|
+
|
|
234
|
+
> :global(select),
|
|
235
|
+
> :global(input) {
|
|
236
|
+
min-width: 100%;
|
|
237
|
+
flex: 1 1 100%;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
> :global(select) {
|
|
241
|
+
padding-inline: 16px;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
:global(.grecaptcha-badge) {
|
|
248
|
+
margin-block: 0 !important;
|
|
249
|
+
margin-inline: auto !important;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.v4FormStyles {
|
|
2
|
+
--hsf-global__font-size: 16px;
|
|
3
|
+
--hsf-global__color: #1a0033;
|
|
4
|
+
--hsf-global-error__color: #ff0000;
|
|
5
|
+
|
|
6
|
+
--hsf-background__background-color: #ffe0f0;
|
|
7
|
+
--hsf-background__padding: 32px;
|
|
8
|
+
--hsf-background__border-style: solid;
|
|
9
|
+
--hsf-background__border-color: #ff00ff;
|
|
10
|
+
--hsf-background__border-radius: 8px;
|
|
11
|
+
--hsf-background__border-width: 4px;
|
|
12
|
+
|
|
13
|
+
--hsf-heading__font-family: inherit;
|
|
14
|
+
--hsf-heading__color: #9900cc;
|
|
15
|
+
--hsf-heading__text-shadow: 1px 1px 2px #ff00ff;
|
|
16
|
+
--hsf-richtext__font-family: inherit;
|
|
17
|
+
--hsf-richtext__font-size: 14px;
|
|
18
|
+
--hsf-richtext__color: #9900cc;
|
|
19
|
+
|
|
20
|
+
--hsf-field-label__font-family: inherit;
|
|
21
|
+
--hsf-field-label__font-size: 0.875rem;
|
|
22
|
+
--hsf-field-label__color: #cc0066;
|
|
23
|
+
--hsf-field-label-requiredindicator__color: #ff0000;
|
|
24
|
+
--hsf-field-description__font-family: inherit;
|
|
25
|
+
--hsf-field-description__color: #6600cc;
|
|
26
|
+
--hsf-field-footer__font-family: inherit;
|
|
27
|
+
--hsf-field-footer__color: #6600cc;
|
|
28
|
+
--hsf-erroralert__font-family: inherit;
|
|
29
|
+
--hsf-erroralert__color: #ff0000;
|
|
30
|
+
|
|
31
|
+
--hsf-field-input__font-family: inherit;
|
|
32
|
+
--hsf-field-input__background-color: #e0ffff;
|
|
33
|
+
--hsf-field-input__placeholder-color: #ff6600;
|
|
34
|
+
--hsf-field-input__border-color: #00ccff;
|
|
35
|
+
--hsf-field-input__border-width: 3px;
|
|
36
|
+
--hsf-field-input__border-style: solid;
|
|
37
|
+
--hsf-field-input__border-radius: 6px;
|
|
38
|
+
--hsf-field-input__padding: 12px 16px;
|
|
39
|
+
--hsf-field-input__color: #003300;
|
|
40
|
+
|
|
41
|
+
--hsf-field-textarea__font-family: inherit;
|
|
42
|
+
--hsf-field-textarea__color: #003300;
|
|
43
|
+
--hsf-field-textarea__background-color: #e0ffff;
|
|
44
|
+
--hsf-field-textarea__border-color: #00ccff;
|
|
45
|
+
--hsf-field-textarea__border-style: solid;
|
|
46
|
+
--hsf-field-textarea__border-radius: 6px;
|
|
47
|
+
--hsf-field-textarea__padding: 12px 16px;
|
|
48
|
+
|
|
49
|
+
--hsf-field-checkbox__padding: 12px;
|
|
50
|
+
--hsf-field-checkbox__background-color: #ffffff;
|
|
51
|
+
--hsf-field-checkbox__color: #00cc00;
|
|
52
|
+
--hsf-field-checkbox__border-color: #00ccff;
|
|
53
|
+
--hsf-field-checkbox__border-width: 2px;
|
|
54
|
+
--hsf-field-checkbox__border-style: solid;
|
|
55
|
+
|
|
56
|
+
--hsf-field-radio__padding: 12px;
|
|
57
|
+
--hsf-field-radio__background-color: #ffffff;
|
|
58
|
+
--hsf-field-radio__color: #00cc00;
|
|
59
|
+
--hsf-field-radio__border-color: #00ccff;
|
|
60
|
+
--hsf-field-radio__border-width: 2px;
|
|
61
|
+
--hsf-field-radio__border-style: solid;
|
|
62
|
+
|
|
63
|
+
--hsf-row__vertical-spacing: 24px;
|
|
64
|
+
--hsf-row__horizontal-spacing: 16px;
|
|
65
|
+
--hsf-module__vertical-spacing: 16px;
|
|
66
|
+
|
|
67
|
+
--hsf-button__width: 100%;
|
|
68
|
+
--hsf-button__font-family: inherit;
|
|
69
|
+
--hsf-button__font-size: 1rem;
|
|
70
|
+
--hsf-button__font-weight: 700;
|
|
71
|
+
--hsf-button__color: #ffffff;
|
|
72
|
+
--hsf-button__background-color: #ff6600;
|
|
73
|
+
--hsf-button__background-image: none;
|
|
74
|
+
--hsf-button__border-radius: 6px;
|
|
75
|
+
--hsf-button__border-width: 3px;
|
|
76
|
+
--hsf-button__border-style: solid;
|
|
77
|
+
--hsf-button__border-color: #ff6600;
|
|
78
|
+
--hsf-button__padding: 12px 24px;
|
|
79
|
+
--hsf-button__box-shadow: 0 4px 8px rgba(255, 102, 0, 0.4);
|
|
80
|
+
--hsf-button--hover__color: #ffffff;
|
|
81
|
+
--hsf-button--hover__background-color: #cc5200;
|
|
82
|
+
--hsf-button--hover__border-color: #cc5200;
|
|
83
|
+
--hsf-button--focus__color: #ffffff;
|
|
84
|
+
--hsf-button--focus__background-color: #cc5200;
|
|
85
|
+
--hsf-button--focus__border-color: #ff00ff;
|
|
86
|
+
|
|
87
|
+
--hsf-progressbar__font-family: inherit;
|
|
88
|
+
--hsf-progressbar__font-size: 14px;
|
|
89
|
+
--hsf-progressbar__color: #ffffff;
|
|
90
|
+
--hsf-progressbar__background-color: #00cc00;
|
|
91
|
+
--hsf-progressbar__background: linear-gradient(90deg, #00cc00, #00ffcc);
|
|
92
|
+
--hsf-progressbar__border-color: #009900;
|
|
93
|
+
--hsf-progressbar__border-style: solid;
|
|
94
|
+
--hsf-progressbar__border-width: 2px;
|
|
95
|
+
}
|