@deriv-com/dds-marketing 1.1.2 → 1.1.3
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/.llm/components/accordion.md +4 -0
- package/.llm/components/accordionitem.md +4 -0
- package/.llm/components/aspectratio.md +4 -0
- package/.llm/components/awards.md +4 -0
- package/.llm/components/background.md +4 -0
- package/.llm/components/badge.md +7 -3
- package/.llm/components/bottomsheet.md +7 -3
- package/.llm/components/breadcrumb.md +4 -0
- package/.llm/components/breadcrumbitem.md +4 -0
- package/.llm/components/button.md +4 -0
- package/.llm/components/buttonicon.md +10 -6
- package/.llm/components/card.md +5 -1
- package/.llm/components/cardbody.md +5 -1
- package/.llm/components/cardbutton.md +4 -0
- package/.llm/components/checkbox.md +1 -1
- package/.llm/components/comparisoncards.md +4 -0
- package/.llm/components/comparisontable.md +4 -0
- package/.llm/components/ctabanner.md +4 -0
- package/.llm/components/ctabannerslider.md +4 -0
- package/.llm/components/datatable.md +4 -0
- package/.llm/components/divider.md +4 -0
- package/.llm/components/downloadbanner.md +4 -0
- package/.llm/components/dropdownmenu.md +9 -5
- package/.llm/components/estimator.md +336 -0
- package/.llm/components/faqaccordion.md +4 -0
- package/.llm/components/featurebullets.md +4 -0
- package/.llm/components/featurecards.md +5 -1
- package/.llm/components/featurecardscarousel.md +4 -0
- package/.llm/components/featurescroll.md +4 -0
- package/.llm/components/featuresplit.md +4 -0
- package/.llm/components/featurestack.md +4 -0
- package/.llm/components/filterchip.md +5 -1
- package/.llm/components/footer.md +4 -0
- package/.llm/components/footergroup.md +4 -0
- package/.llm/components/grid.md +4 -0
- package/.llm/components/icon.md +9 -5
- package/.llm/components/illustrationcard.md +4 -0
- package/.llm/components/illustrationscene.md +4 -0
- package/.llm/components/imagebanner.md +5 -1
- package/.llm/components/landinghero.md +4 -0
- package/.llm/components/link.md +5 -1
- package/.llm/components/logocolumns.md +4 -0
- package/.llm/components/logorows.md +4 -0
- package/.llm/components/menuitem.md +6 -2
- package/.llm/components/navbar.md +5 -1
- package/.llm/components/navbaritem.md +4 -0
- package/.llm/components/navbarmenu.md +4 -0
- package/.llm/components/navbarmenugroup.md +4 -0
- package/.llm/components/navbarpanel.md +4 -0
- package/.llm/components/navbarswitcher.md +10 -6
- package/.llm/components/navbarswitcheroption.md +4 -0
- package/.llm/components/option.md +5 -1
- package/.llm/components/pageheader.md +4 -0
- package/.llm/components/pagination.md +4 -0
- package/.llm/components/paginationdots.md +4 -0
- package/.llm/components/producthero.md +4 -0
- package/.llm/components/removablechip.md +5 -1
- package/.llm/components/resourcebanner.md +4 -0
- package/.llm/components/row.md +4 -0
- package/.llm/components/scenescroll.md +4 -0
- package/.llm/components/scroller.md +4 -0
- package/.llm/components/searchinput.md +4 -0
- package/.llm/components/segmentedcontrol.md +5 -1
- package/.llm/components/segmentedcontrolitem.md +6 -2
- package/.llm/components/select.md +4 -0
- package/.llm/components/selectchip.md +4 -0
- package/.llm/components/spinner.md +4 -0
- package/.llm/components/stack.md +4 -0
- package/.llm/components/stats.md +4 -0
- package/.llm/components/statusdot.md +4 -0
- package/.llm/components/steps.md +4 -0
- package/.llm/components/stickycards.md +4 -0
- package/.llm/components/subdomainnavbar.md +5 -1
- package/.llm/components/tab.md +6 -2
- package/.llm/components/table.md +4 -0
- package/.llm/components/tablebody.md +4 -0
- package/.llm/components/tablecell.md +4 -0
- package/.llm/components/tablehead.md +4 -0
- package/.llm/components/tableheadercell.md +4 -0
- package/.llm/components/tablerow.md +4 -0
- package/.llm/components/tablist.md +4 -0
- package/.llm/components/teamgrid.md +4 -0
- package/.llm/components/testimonialrow.md +4 -0
- package/.llm/components/testimonialslider.md +4 -0
- package/.llm/components/textarea.md +4 -0
- package/.llm/components/textinput.md +5 -1
- package/.llm/components/textscroll.md +4 -0
- package/.llm/components/tiers.md +4 -0
- package/.llm/components/typography.md +4 -0
- package/.llm/digest/accordion.md +1 -1
- package/.llm/digest/accordionitem.md +1 -1
- package/.llm/digest/aspectratio.md +1 -1
- package/.llm/digest/awards.md +1 -1
- package/.llm/digest/background.md +1 -1
- package/.llm/digest/badge.md +1 -1
- package/.llm/digest/bottomsheet.md +1 -1
- package/.llm/digest/breadcrumb.md +1 -1
- package/.llm/digest/breadcrumbitem.md +1 -1
- package/.llm/digest/button.md +1 -1
- package/.llm/digest/buttonicon.md +1 -1
- package/.llm/digest/card.md +1 -1
- package/.llm/digest/cardbody.md +1 -1
- package/.llm/digest/cardbutton.md +1 -1
- package/.llm/digest/checkbox.md +1 -1
- package/.llm/digest/comparisoncards.md +1 -1
- package/.llm/digest/comparisontable.md +1 -1
- package/.llm/digest/ctabanner.md +1 -1
- package/.llm/digest/ctabannerslider.md +1 -1
- package/.llm/digest/datatable.md +1 -1
- package/.llm/digest/divider.md +1 -1
- package/.llm/digest/downloadbanner.md +1 -1
- package/.llm/digest/dropdownmenu.md +1 -1
- package/.llm/digest/estimator.md +66 -0
- package/.llm/digest/faqaccordion.md +1 -1
- package/.llm/digest/featurebullets.md +1 -1
- package/.llm/digest/featurecards.md +1 -1
- package/.llm/digest/featurecardscarousel.md +1 -1
- package/.llm/digest/featurescroll.md +1 -1
- package/.llm/digest/featuresplit.md +1 -1
- package/.llm/digest/featurestack.md +1 -1
- package/.llm/digest/filterchip.md +1 -1
- package/.llm/digest/footer.md +1 -1
- package/.llm/digest/footergroup.md +1 -1
- package/.llm/digest/grid.md +1 -1
- package/.llm/digest/icon.md +1 -1
- package/.llm/digest/illustrationcard.md +1 -1
- package/.llm/digest/illustrationscene.md +1 -1
- package/.llm/digest/imagebanner.md +2 -2
- package/.llm/digest/landinghero.md +1 -1
- package/.llm/digest/link.md +1 -1
- package/.llm/digest/logocolumns.md +1 -1
- package/.llm/digest/logorows.md +1 -1
- package/.llm/digest/menuitem.md +1 -1
- package/.llm/digest/navbar.md +1 -1
- package/.llm/digest/navbaritem.md +1 -1
- package/.llm/digest/navbarmenu.md +1 -1
- package/.llm/digest/navbarmenugroup.md +1 -1
- package/.llm/digest/navbarpanel.md +1 -1
- package/.llm/digest/navbarswitcher.md +1 -1
- package/.llm/digest/navbarswitcheroption.md +1 -1
- package/.llm/digest/option.md +1 -1
- package/.llm/digest/pageheader.md +1 -1
- package/.llm/digest/pagination.md +1 -1
- package/.llm/digest/paginationdots.md +1 -1
- package/.llm/digest/producthero.md +1 -1
- package/.llm/digest/removablechip.md +1 -1
- package/.llm/digest/resourcebanner.md +1 -1
- package/.llm/digest/row.md +1 -1
- package/.llm/digest/scenescroll.md +1 -1
- package/.llm/digest/scroller.md +1 -1
- package/.llm/digest/searchinput.md +1 -1
- package/.llm/digest/segmentedcontrol.md +1 -1
- package/.llm/digest/segmentedcontrolitem.md +2 -2
- package/.llm/digest/select.md +1 -1
- package/.llm/digest/selectchip.md +1 -1
- package/.llm/digest/spinner.md +1 -1
- package/.llm/digest/stack.md +1 -1
- package/.llm/digest/stats.md +1 -1
- package/.llm/digest/statusdot.md +1 -1
- package/.llm/digest/steps.md +1 -1
- package/.llm/digest/stickycards.md +1 -1
- package/.llm/digest/subdomainnavbar.md +1 -1
- package/.llm/digest/tab.md +1 -1
- package/.llm/digest/table.md +1 -1
- package/.llm/digest/tablebody.md +1 -1
- package/.llm/digest/tablecell.md +1 -1
- package/.llm/digest/tablehead.md +1 -1
- package/.llm/digest/tableheadercell.md +1 -1
- package/.llm/digest/tablerow.md +1 -1
- package/.llm/digest/tablist.md +1 -1
- package/.llm/digest/teamgrid.md +1 -1
- package/.llm/digest/testimonialrow.md +1 -1
- package/.llm/digest/testimonialslider.md +1 -1
- package/.llm/digest/textarea.md +1 -1
- package/.llm/digest/textinput.md +1 -1
- package/.llm/digest/textscroll.md +1 -1
- package/.llm/digest/tiers.md +1 -1
- package/.llm/digest/typography.md +1 -1
- package/.llm/index.md +2 -1
- package/.llm/tokens.md +1 -0
- package/AGENTS.md +1 -0
- package/README.md +28 -3
- package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +0 -12
- package/dist/components/blocks/estimator/Estimator.css +206 -0
- package/dist/components/blocks/estimator/Estimator.d.ts +27 -0
- package/dist/components/blocks/estimator/Estimator.js +61 -0
- package/dist/components/blocks/estimator/Estimator.types.d.ts +63 -0
- package/dist/components/blocks/estimator/Estimator.types.js +25 -0
- package/dist/components/blocks/estimator/estimator-impl.css +159 -0
- package/dist/components/blocks/image-banner/ImageBanner.d.ts +1 -0
- package/dist/components/blocks/image-banner/ImageBanner.js +2 -1
- package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +1 -1
- package/dist/components/blocks/image-banner/image-banner-impl.css +7 -51
- package/dist/components/core/segmented-control-item/SegmentedControlItem.types.d.ts +1 -1
- package/dist/components/core/select/Select.css +2 -0
- package/dist/components/core/select/select-impl.css +58 -0
- package/dist/components/core/text-area/TextArea.css +2 -0
- package/dist/components/core/text-area/text-area-impl.css +54 -0
- package/dist/components/core/text-input/TextInput.css +2 -0
- package/dist/components/core/text-input/text-input-impl.css +63 -0
- package/dist/components/estimator-data.d.ts +29 -0
- package/dist/components/estimator-data.js +12 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +2 -0
- package/dist/icons/accounts.d.ts +1 -0
- package/dist/icons/accounts.js +1 -0
- package/dist/icons/app-stores.d.ts +1 -0
- package/dist/icons/app-stores.js +1 -0
- package/dist/icons/currency.d.ts +1 -0
- package/dist/icons/currency.js +1 -0
- package/dist/icons/flag.d.ts +1 -0
- package/dist/icons/flag.js +1 -0
- package/dist/icons/illustrative.d.ts +1 -0
- package/dist/icons/illustrative.js +1 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +4 -0
- package/dist/icons/markets.d.ts +1 -0
- package/dist/icons/markets.js +1 -0
- package/dist/icons/social.d.ts +1 -0
- package/dist/icons/social.js +1 -0
- package/dist/icons/system.d.ts +1 -0
- package/dist/icons/system.js +1 -0
- package/dist/icons/trade.d.ts +1 -0
- package/dist/icons/trade.js +1 -0
- package/dist/marketing.css +2 -0
- package/package.json +44 -2
|
@@ -10,7 +10,7 @@ export interface SegmentedControlItemOwnProps {
|
|
|
10
10
|
value: string;
|
|
11
11
|
/** Always — it is the segment's accessible name as well as its words, and a radio with no name is announced as a control with nothing in it. One or two words: a row is scanned across, and the segment that needs a phrase is a choice that wanted a list */
|
|
12
12
|
label: string;
|
|
13
|
-
/** The glyph tells the modes apart faster than the words do — a card and a bank beside two payment methods. Import it from @deriv-com/
|
|
13
|
+
/** The glyph tells the modes apart faster than the words do — a card and a bank beside two payment methods. Import it from @deriv-com/dds-marketing/icons and pass the element */
|
|
14
14
|
icon?: ReactNode;
|
|
15
15
|
/** This segment reports its own presses — logging which plan a visitor looked at, say. It is called with this segment's value, and SegmentedControl chains its own handler after it rather than replacing it */
|
|
16
16
|
onSelect?: (value: string) => void;
|
|
@@ -151,6 +151,8 @@
|
|
|
151
151
|
gap: var(--space-gap-xs);
|
|
152
152
|
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
153
153
|
line-height: var(--font-body-sm-line-height);
|
|
154
|
+
transition-duration: var(--motion-duration-fast);
|
|
155
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
154
156
|
}
|
|
155
157
|
|
|
156
158
|
:where([data-dds-context="marketing"]) .dds-select .dds-select__message-icon {
|
|
@@ -112,3 +112,61 @@
|
|
|
112
112
|
animation: none;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
+
|
|
116
|
+
/*
|
|
117
|
+
* The status message fades in when it arrives.
|
|
118
|
+
*
|
|
119
|
+
* A contract binds transitions, and a transition needs a value to move from: the message is not
|
|
120
|
+
* in the DOM until a status is reported, so only a keyframe can bring it in. Opacity alone — the
|
|
121
|
+
* message takes the helper's place rather than pushing the row down, so there is no distance to
|
|
122
|
+
* travel, and moving it would shift the words being read. A status changing while the message is
|
|
123
|
+
* showing keeps the same element, and its colour moves with the transition the contract binds.
|
|
124
|
+
*/
|
|
125
|
+
@keyframes dds-select-message-in {
|
|
126
|
+
from {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__message {
|
|
132
|
+
animation: dds-select-message-in var(--motion-duration-normal) var(--motion-easing-enter);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/*
|
|
136
|
+
* The box shakes once when the field turns to an error, as TextInput's does.
|
|
137
|
+
*
|
|
138
|
+
* Once, on arrival: the animation is attached by the error status, so it plays when the status
|
|
139
|
+
* becomes error and not again while it stays one. Only the box moves; the label and the
|
|
140
|
+
* message hold still, so the words saying what went wrong can be read while it settles.
|
|
141
|
+
*
|
|
142
|
+
* Not while the list is open. The popup is drawn inside the box, so shaking the box would shake
|
|
143
|
+
* the answers being read along with it. A status that arrives while it is open shakes the box
|
|
144
|
+
* as the list closes, which is the moment the answer is handed in.
|
|
145
|
+
*/
|
|
146
|
+
@keyframes dds-select-shake {
|
|
147
|
+
20% {
|
|
148
|
+
translate: calc(var(--motion-distance-shake) * -1) 0;
|
|
149
|
+
}
|
|
150
|
+
40% {
|
|
151
|
+
translate: var(--motion-distance-shake) 0;
|
|
152
|
+
}
|
|
153
|
+
60% {
|
|
154
|
+
translate: calc(var(--motion-distance-shake) * -0.5) 0;
|
|
155
|
+
}
|
|
156
|
+
80% {
|
|
157
|
+
translate: calc(var(--motion-distance-shake) * 0.5) 0;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="error"]:not(:has([aria-expanded="true"])) .dds-select__control {
|
|
162
|
+
animation: dds-select-shake var(--motion-duration-slow) var(--motion-easing-standard);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* The generated reduce block is written from the token bindings and these are not. A reader who
|
|
166
|
+
has asked for less movement has asked for this too. */
|
|
167
|
+
@media (prefers-reduced-motion: reduce) {
|
|
168
|
+
:where([data-dds-context="marketing"]) .dds-select .dds-select__message,
|
|
169
|
+
:where([data-dds-context="marketing"]) .dds-select[data-status="error"]:not(:has([aria-expanded="true"])) .dds-select__control {
|
|
170
|
+
animation: none;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -92,6 +92,8 @@
|
|
|
92
92
|
gap: var(--space-gap-xs);
|
|
93
93
|
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
94
94
|
line-height: var(--font-body-sm-line-height);
|
|
95
|
+
transition-duration: var(--motion-duration-fast);
|
|
96
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
:where([data-dds-context="marketing"]) .dds-textarea .dds-textarea__message-icon {
|
|
@@ -34,3 +34,57 @@
|
|
|
34
34
|
:where([data-dds-context="marketing"]) .dds-textarea__message-icon {
|
|
35
35
|
block-size: calc(var(--font-body-sm-size) * var(--font-body-sm-line-height));
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* The status message fades in when it arrives.
|
|
40
|
+
*
|
|
41
|
+
* A contract binds transitions, and a transition needs a value to move from: the message is not
|
|
42
|
+
* in the DOM until a status is reported, so only a keyframe can bring it in. Opacity alone — the
|
|
43
|
+
* message takes the helper's place rather than pushing the row down, so there is no distance to
|
|
44
|
+
* travel, and moving it would shift the words being read. A status changing while the message is
|
|
45
|
+
* showing keeps the same element, and its colour moves with the transition the contract binds.
|
|
46
|
+
*/
|
|
47
|
+
@keyframes dds-textarea-message-in {
|
|
48
|
+
from {
|
|
49
|
+
opacity: 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where([data-dds-context="marketing"]) .dds-textarea .dds-textarea__message {
|
|
54
|
+
animation: dds-textarea-message-in var(--motion-duration-normal) var(--motion-easing-enter);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/*
|
|
58
|
+
* The box shakes once when the field turns to an error, as TextInput's does.
|
|
59
|
+
*
|
|
60
|
+
* Once, on arrival: the animation is attached by the error status, so it plays when the status
|
|
61
|
+
* becomes error and not again while it stays one. Only the box moves; the label and the
|
|
62
|
+
* message hold still, so the words saying what went wrong can be read while it settles.
|
|
63
|
+
*/
|
|
64
|
+
@keyframes dds-textarea-shake {
|
|
65
|
+
20% {
|
|
66
|
+
translate: calc(var(--motion-distance-shake) * -1) 0;
|
|
67
|
+
}
|
|
68
|
+
40% {
|
|
69
|
+
translate: var(--motion-distance-shake) 0;
|
|
70
|
+
}
|
|
71
|
+
60% {
|
|
72
|
+
translate: calc(var(--motion-distance-shake) * -0.5) 0;
|
|
73
|
+
}
|
|
74
|
+
80% {
|
|
75
|
+
translate: calc(var(--motion-distance-shake) * 0.5) 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:where([data-dds-context="marketing"]) .dds-textarea[data-status="error"] .dds-textarea__control {
|
|
80
|
+
animation: dds-textarea-shake var(--motion-duration-slow) var(--motion-easing-standard);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* The generated reduce block is written from the token bindings and these are not. A reader who
|
|
84
|
+
has asked for less movement has asked for this too. */
|
|
85
|
+
@media (prefers-reduced-motion: reduce) {
|
|
86
|
+
:where([data-dds-context="marketing"]) .dds-textarea .dds-textarea__message,
|
|
87
|
+
:where([data-dds-context="marketing"]) .dds-textarea[data-status="error"] .dds-textarea__control {
|
|
88
|
+
animation: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -118,6 +118,8 @@
|
|
|
118
118
|
gap: var(--space-gap-xs);
|
|
119
119
|
letter-spacing: var(--font-body-sm-letter-spacing);
|
|
120
120
|
line-height: var(--font-body-sm-line-height);
|
|
121
|
+
transition-duration: var(--motion-duration-fast);
|
|
122
|
+
transition-timing-function: var(--motion-easing-standard);
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
:where([data-dds-context="marketing"]) .dds-textinput .dds-textinput__message-icon {
|
|
@@ -34,3 +34,66 @@
|
|
|
34
34
|
:where([data-dds-context="marketing"]) .dds-textinput__message-icon {
|
|
35
35
|
block-size: calc(var(--font-body-sm-size) * var(--font-body-sm-line-height));
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* The status message fades in when it arrives.
|
|
40
|
+
*
|
|
41
|
+
* A contract binds transitions, and a transition needs a value to move from: the message is not
|
|
42
|
+
* in the DOM until a status is reported, so there is nothing to transition and only a keyframe
|
|
43
|
+
* can bring it in. Opacity alone — the message takes the helper's place rather than pushing the
|
|
44
|
+
* row down, so there is no distance to travel, and moving it would shift the words being read.
|
|
45
|
+
*
|
|
46
|
+
* It plays once, on arrival. A status changing while the message is already showing keeps the
|
|
47
|
+
* same element, and its colour moves with the transition the contract binds rather than the
|
|
48
|
+
* whole message blinking out and back.
|
|
49
|
+
*/
|
|
50
|
+
@keyframes dds-textinput-message-in {
|
|
51
|
+
from {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where([data-dds-context="marketing"]) .dds-textinput .dds-textinput__message {
|
|
57
|
+
animation: dds-textinput-message-in var(--motion-duration-normal) var(--motion-easing-enter);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/*
|
|
61
|
+
* The box shakes once when the field turns to an error.
|
|
62
|
+
*
|
|
63
|
+
* Once, on arrival: the animation is attached by the error status, so it plays when the status
|
|
64
|
+
* becomes error and not again while it stays one — typing on in a field that is still wrong does
|
|
65
|
+
* not shake it at every keystroke. Leaving the error and coming back is a new refusal and shakes
|
|
66
|
+
* again. Only the box moves; the label above it and the message below hold still, so the words
|
|
67
|
+
* saying what went wrong can be read while it settles.
|
|
68
|
+
*
|
|
69
|
+
* Each swing is smaller than the last, so it reads as a shake that stops rather than a vibration
|
|
70
|
+
* that is cut off. The swing is symmetric, so it reads the same in either writing direction.
|
|
71
|
+
*/
|
|
72
|
+
@keyframes dds-textinput-shake {
|
|
73
|
+
20% {
|
|
74
|
+
translate: calc(var(--motion-distance-shake) * -1) 0;
|
|
75
|
+
}
|
|
76
|
+
40% {
|
|
77
|
+
translate: var(--motion-distance-shake) 0;
|
|
78
|
+
}
|
|
79
|
+
60% {
|
|
80
|
+
translate: calc(var(--motion-distance-shake) * -0.5) 0;
|
|
81
|
+
}
|
|
82
|
+
80% {
|
|
83
|
+
translate: calc(var(--motion-distance-shake) * 0.5) 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:where([data-dds-context="marketing"]) .dds-textinput[data-status="error"] .dds-textinput__control {
|
|
88
|
+
animation: dds-textinput-shake var(--motion-duration-slow) var(--motion-easing-standard);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* The generated reduce block is written from the token bindings and these are not. A reader who
|
|
92
|
+
has asked for less movement has asked for this too — and a shake is the movement most likely
|
|
93
|
+
to be the reason they asked. */
|
|
94
|
+
@media (prefers-reduced-motion: reduce) {
|
|
95
|
+
:where([data-dds-context="marketing"]) .dds-textinput .dds-textinput__message,
|
|
96
|
+
:where([data-dds-context="marketing"]) .dds-textinput[data-status="error"] .dds-textinput__control {
|
|
97
|
+
animation: none;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The figures an Estimator lays out once a reader has filled its inputs in.
|
|
3
|
+
*
|
|
4
|
+
* Exported from the package for the reason `stats-data.ts` and `comparison-cards-data.ts` are: a
|
|
5
|
+
* block whose content is a list is one whose consumer builds a value before passing it.
|
|
6
|
+
*
|
|
7
|
+
* A record rather than a component per figure, because a result is a number and the words that say
|
|
8
|
+
* what it is — nothing in it is an element a page composes. The page works the figures out, from a
|
|
9
|
+
* live feed, a formula or both; the block only sets them, so the same block serves a margin
|
|
10
|
+
* calculator, a crypto converter and an affiliate's income estimate without knowing which.
|
|
11
|
+
*/
|
|
12
|
+
/** One figure an Estimator shows: what it is, its value, and anything a reader needs to read it. */
|
|
13
|
+
export interface EstimatorResult {
|
|
14
|
+
/** What the figure is, in a few words: 'Margin required', 'You receive', 'Monthly income'. */
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* The figure, written exactly as it is to be read: '1,240.50 USD', '0.0214 BTC', '$2,400'.
|
|
18
|
+
*
|
|
19
|
+
* A string rather than a number, because the way it is written is the page's: its currency, its
|
|
20
|
+
* digits, its grouping, its locale. The block draws it as given and isolates it, so a sign or a
|
|
21
|
+
* currency keeps its place in a right-to-left line.
|
|
22
|
+
*/
|
|
23
|
+
value: string;
|
|
24
|
+
/**
|
|
25
|
+
* A line under the figure, where it needs one to be read correctly: 'Per lot, at 1:500
|
|
26
|
+
* leverage', 'Estimate at the current price'. Optional; most figures need none.
|
|
27
|
+
*/
|
|
28
|
+
note?: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The figures an Estimator lays out once a reader has filled its inputs in.
|
|
3
|
+
*
|
|
4
|
+
* Exported from the package for the reason `stats-data.ts` and `comparison-cards-data.ts` are: a
|
|
5
|
+
* block whose content is a list is one whose consumer builds a value before passing it.
|
|
6
|
+
*
|
|
7
|
+
* A record rather than a component per figure, because a result is a number and the words that say
|
|
8
|
+
* what it is — nothing in it is an element a page composes. The page works the figures out, from a
|
|
9
|
+
* live feed, a formula or both; the block only sets them, so the same block serves a margin
|
|
10
|
+
* calculator, a crypto converter and an affiliate's income estimate without knowing which.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
@@ -44,6 +44,8 @@ export { DownloadBanner, type DownloadBannerProps } from './blocks/download-bann
|
|
|
44
44
|
export { downloadBannerParts, downloadBannerDefaults } from './blocks/download-banner/DownloadBanner.types.js';
|
|
45
45
|
export { DropdownMenu, type DropdownMenuProps } from './core/dropdown-menu/DropdownMenu.js';
|
|
46
46
|
export { dropdownMenuParts, dropdownMenuDefaults } from './core/dropdown-menu/DropdownMenu.types.js';
|
|
47
|
+
export { Estimator, type EstimatorProps } from './blocks/estimator/Estimator.js';
|
|
48
|
+
export { estimatorParts, estimatorDefaults } from './blocks/estimator/Estimator.types.js';
|
|
47
49
|
export { FaqAccordion, type FaqAccordionProps } from './blocks/faq-accordion/FaqAccordion.js';
|
|
48
50
|
export { faqAccordionParts, faqAccordionDefaults } from './blocks/faq-accordion/FaqAccordion.types.js';
|
|
49
51
|
export { FeatureBullets, type FeatureBulletsProps } from './blocks/feature-bullets/FeatureBullets.js';
|
|
@@ -187,6 +189,7 @@ export type { ComparisonCardsCard } from './comparison-cards-data.js';
|
|
|
187
189
|
export type { ComparisonTableColumn, ComparisonTableRow } from './comparison-table-data.js';
|
|
188
190
|
export type { DataTableColumn, DataTableRow } from './data-table-data.js';
|
|
189
191
|
export type { DownloadBannerBadge, DownloadBannerQr } from './download-banner-data.js';
|
|
192
|
+
export type { EstimatorResult } from './estimator-data.js';
|
|
190
193
|
export type { LogoTile } from './logo-data.js';
|
|
191
194
|
export type { ResourceBannerLink } from './resource-banner-data.js';
|
|
192
195
|
export type { SceneScrollScene } from './scene-scroll-data.js';
|
package/dist/components/index.js
CHANGED
|
@@ -45,6 +45,8 @@ export { DownloadBanner } from './blocks/download-banner/DownloadBanner.js';
|
|
|
45
45
|
export { downloadBannerParts, downloadBannerDefaults } from './blocks/download-banner/DownloadBanner.types.js';
|
|
46
46
|
export { DropdownMenu } from './core/dropdown-menu/DropdownMenu.js';
|
|
47
47
|
export { dropdownMenuParts, dropdownMenuDefaults } from './core/dropdown-menu/DropdownMenu.types.js';
|
|
48
|
+
export { Estimator } from './blocks/estimator/Estimator.js';
|
|
49
|
+
export { estimatorParts, estimatorDefaults } from './blocks/estimator/Estimator.types.js';
|
|
48
50
|
export { FaqAccordion } from './blocks/faq-accordion/FaqAccordion.js';
|
|
49
51
|
export { faqAccordionParts, faqAccordionDefaults } from './blocks/faq-accordion/FaqAccordion.types.js';
|
|
50
52
|
export { FeatureBullets } from './blocks/feature-bullets/FeatureBullets.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/accounts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/accounts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/app-stores';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/app-stores';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/currency';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/currency';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/flag';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/flag';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/illustrative';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/illustrative';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Every Quill icon, re-exported so an app installs only @deriv-com/dds-marketing. Prefer a
|
|
2
|
+
// group subpath (`@deriv-com/dds-marketing/icons/system`) where you can: the full index is ~1,850 icons,
|
|
3
|
+
// and a dev server that does not tree-shake loads all of them.
|
|
4
|
+
export * from '@deriv-com/quill-icons-web';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/markets';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/markets';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/social';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/social';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/system';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/system';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/trade';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@deriv-com/quill-icons-web/trade';
|
package/dist/marketing.css
CHANGED
|
@@ -224,6 +224,7 @@
|
|
|
224
224
|
--layer-overlay: 800;
|
|
225
225
|
--layer-popup: 400;
|
|
226
226
|
--motion-distance-drift: 64px;
|
|
227
|
+
--motion-distance-shake: 4px;
|
|
227
228
|
--motion-duration-dramatic: 700ms;
|
|
228
229
|
--motion-duration-drift: 10000ms;
|
|
229
230
|
--motion-duration-dwell: 5000ms;
|
|
@@ -581,6 +582,7 @@
|
|
|
581
582
|
--layer-overlay: 800;
|
|
582
583
|
--layer-popup: 400;
|
|
583
584
|
--motion-distance-drift: 64px;
|
|
585
|
+
--motion-distance-shake: 4px;
|
|
584
586
|
--motion-duration-dramatic: 700ms;
|
|
585
587
|
--motion-duration-drift: 10000ms;
|
|
586
588
|
--motion-duration-dwell: 5000ms;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deriv-com/dds-marketing",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Deriv Design System — components and tokens for marketing sites (landing pages, pricing, sign-up).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -19,6 +19,46 @@
|
|
|
19
19
|
},
|
|
20
20
|
"./marketing.css": "./dist/marketing.css",
|
|
21
21
|
"./fonts.css": "./dist/fonts/fonts.css",
|
|
22
|
+
"./icons": {
|
|
23
|
+
"types": "./dist/icons/index.d.ts",
|
|
24
|
+
"default": "./dist/icons/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./icons/accounts": {
|
|
27
|
+
"types": "./dist/icons/accounts.d.ts",
|
|
28
|
+
"default": "./dist/icons/accounts.js"
|
|
29
|
+
},
|
|
30
|
+
"./icons/app-stores": {
|
|
31
|
+
"types": "./dist/icons/app-stores.d.ts",
|
|
32
|
+
"default": "./dist/icons/app-stores.js"
|
|
33
|
+
},
|
|
34
|
+
"./icons/currency": {
|
|
35
|
+
"types": "./dist/icons/currency.d.ts",
|
|
36
|
+
"default": "./dist/icons/currency.js"
|
|
37
|
+
},
|
|
38
|
+
"./icons/flag": {
|
|
39
|
+
"types": "./dist/icons/flag.d.ts",
|
|
40
|
+
"default": "./dist/icons/flag.js"
|
|
41
|
+
},
|
|
42
|
+
"./icons/illustrative": {
|
|
43
|
+
"types": "./dist/icons/illustrative.d.ts",
|
|
44
|
+
"default": "./dist/icons/illustrative.js"
|
|
45
|
+
},
|
|
46
|
+
"./icons/markets": {
|
|
47
|
+
"types": "./dist/icons/markets.d.ts",
|
|
48
|
+
"default": "./dist/icons/markets.js"
|
|
49
|
+
},
|
|
50
|
+
"./icons/social": {
|
|
51
|
+
"types": "./dist/icons/social.d.ts",
|
|
52
|
+
"default": "./dist/icons/social.js"
|
|
53
|
+
},
|
|
54
|
+
"./icons/system": {
|
|
55
|
+
"types": "./dist/icons/system.d.ts",
|
|
56
|
+
"default": "./dist/icons/system.js"
|
|
57
|
+
},
|
|
58
|
+
"./icons/trade": {
|
|
59
|
+
"types": "./dist/icons/trade.d.ts",
|
|
60
|
+
"default": "./dist/icons/trade.js"
|
|
61
|
+
},
|
|
22
62
|
"./package.json": "./package.json"
|
|
23
63
|
},
|
|
24
64
|
"files": [
|
|
@@ -62,8 +102,10 @@
|
|
|
62
102
|
"promote:marketing": "node --env-file=../../.env --import tsx ../../src/figma/promote-cli.ts marketing --package-root .",
|
|
63
103
|
"ratify": "node --import tsx ../../src/ratify/cli.ts --package-root ."
|
|
64
104
|
},
|
|
105
|
+
"dependencies": {
|
|
106
|
+
"@deriv-com/quill-icons-web": "~2.0.0"
|
|
107
|
+
},
|
|
65
108
|
"peerDependencies": {
|
|
66
|
-
"@deriv-com/quill-icons-web": "~2.0.0",
|
|
67
109
|
"react": ">=19",
|
|
68
110
|
"react-dom": ">=19"
|
|
69
111
|
}
|