@royallondon/design-system-component-button 0.0.0-stage → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +54 -0
- package/README.md +46 -2
- package/dist/button.css +1 -0
- package/package.json +38 -3
package/LICENSE.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Authorised Use Licence v1.0
|
|
2
|
+
|
|
3
|
+
Copyright © 2026 Royal London.
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
1. Grant of Licence
|
|
7
|
+
|
|
8
|
+
The Licensor grants a non-exclusive, non-transferable,
|
|
9
|
+
revocable, royalty-free licence to use the Software only where:
|
|
10
|
+
|
|
11
|
+
(a) the individual, organisation, or business has been
|
|
12
|
+
expressly authorised in writing by the Licensor; and
|
|
13
|
+
|
|
14
|
+
(b) such authorisation remains in force.
|
|
15
|
+
|
|
16
|
+
2. Restrictions
|
|
17
|
+
|
|
18
|
+
The Software may not be:
|
|
19
|
+
|
|
20
|
+
(a) used by any unauthorised person or organisation;
|
|
21
|
+
|
|
22
|
+
(b) redistributed, sublicensed, sold, rented or made
|
|
23
|
+
available to third parties;
|
|
24
|
+
|
|
25
|
+
(c) incorporated into another product or service without
|
|
26
|
+
written approval;
|
|
27
|
+
|
|
28
|
+
(d) reverse engineered except where prohibited by law.
|
|
29
|
+
|
|
30
|
+
3. Ownership
|
|
31
|
+
|
|
32
|
+
The Software remains the exclusive property of the Licensor.
|
|
33
|
+
No ownership rights are transferred under this Licence.
|
|
34
|
+
|
|
35
|
+
4. Termination
|
|
36
|
+
|
|
37
|
+
The Licensor may revoke authorisation at any time by
|
|
38
|
+
written notice.
|
|
39
|
+
|
|
40
|
+
Upon termination the Licensee must immediately cease use
|
|
41
|
+
of the Software and destroy all copies.
|
|
42
|
+
|
|
43
|
+
5. No Warranty
|
|
44
|
+
|
|
45
|
+
The Software is provided "as is" without warranty of any kind.
|
|
46
|
+
|
|
47
|
+
6. Limitation of Liability
|
|
48
|
+
|
|
49
|
+
The Licensor shall not be liable for any damages arising
|
|
50
|
+
from use of the Software.
|
|
51
|
+
|
|
52
|
+
7. Governing Law
|
|
53
|
+
|
|
54
|
+
This Licence shall be governed by the laws of England and Wales.
|
package/README.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
### Installation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install the Button package from npm
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @royallondon/design-system-component-button
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Import the required CSS file
|
|
10
|
+
|
|
11
|
+
```css
|
|
12
|
+
@import '@royallondon/design-system-component-button/dist/button';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
[Add the relevant classes to your buttons](https://design.royallondon.com/components/button/#variants)
|
|
16
|
+
|
|
17
|
+
### Support
|
|
18
|
+
|
|
19
|
+
Issues and questions are handled through the [Royal London Design System support page](https://design.royallondon.com/support/).
|
|
20
|
+
|
|
21
|
+
### Licence
|
|
22
|
+
|
|
23
|
+
#### @royallondon/design-system-component-button
|
|
24
|
+
|
|
25
|
+
This package is published primarily for use in Royal London products. It is made available publicly so that partners and suppliers building Royal London experiences can consume it directly.
|
|
26
|
+
|
|
27
|
+
Use of this package is subject to the Royal London Authorised Use Licence. See the `LICENSE.md` file included in this package.
|
|
28
|
+
|
|
29
|
+
The Button component for the [Royal London Design System](https://design.royallondon.com). For design guidance, examples and accessibility notes, see the [Button page](https://design.royallondon.com/components/button/).
|
|
30
|
+
|
|
31
|
+
### Release log
|
|
32
|
+
|
|
33
|
+
| Version | Release notes |
|
|
34
|
+
| ------- | ------------------------------------------------------------------------------------------------------- |
|
|
35
|
+
| 2.4.0 | Prepare for public npm release: add licence, publish `dist` only (`src` removed), remove source maps |
|
|
36
|
+
| 2.3.3 | Move to new feed |
|
|
37
|
+
| 2.3.0 | Apply new icons and latest tokens added to foundations |
|
|
38
|
+
| 2.2.0 | Update button styles to use type tokens |
|
|
39
|
+
| 2.1.0 | Add loading button variant |
|
|
40
|
+
| 2.0.2 | Fix issue with media query processing without postcss |
|
|
41
|
+
| 2.0.1 | Fix secondary ghost button styles |
|
|
42
|
+
| 2.0.0 | Upgrade for compatibility with foundations v2 |
|
|
43
|
+
| 1.2.0 | Update to allow icons to be aligned correctly in a button and add css for destructive button |
|
|
44
|
+
| 1.1.0 | Refactor to use wildcard selector [class*="rl-c-button"], add margins by default across all breakpoints |
|
|
45
|
+
| 1.0.2 | Dist folder incorrectly compiled, ghost button still had white background |
|
|
46
|
+
| 1.0.1 | Removed white background from ghost light button |
|
|
47
|
+
| 1.0.0 | First release |
|
package/dist/button.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@custom-media --mq-xsmall (max-width: 31.9375rem);@custom-media --mq-small (min-width: 32rem);@custom-media --mq-medium (min-width: 48rem);@custom-media --mq-large (min-width: 64rem);@custom-media --mq-medium-max (max-width: 47.9375rem);@custom-media --mq-large-max (max-width: 63.9375rem);@custom-media --mq-xs-max (max-width: 31.9375rem);@custom-media --mq-sm (min-width: 32rem);@custom-media --mq-sm-max (max-width: 47.9375rem);@custom-media --mq-md (min-width: 48rem);@custom-media --mq-md-max (max-width: 63.9375rem);@custom-media --mq-lg (min-width: 64rem);@custom-media --mq-lg-max (max-width: 79.9375rem);@custom-media --mq-xl (min-width: 80rem);@custom-media --mq-xl-max (max-width: 95.9375rem);@custom-media --mq-xxl (min-width: 96rem);.rl-c-button__dark,[class*=rl-c-button]{align-items:center;border-radius:0;-moz-column-gap:var(--spacing-01);column-gap:var(--spacing-01);cursor:pointer;display:inline-flex;font-family:var(--typography-font-family-label-medium);font-size:var(--typography-size-label-medium);font-weight:var(--typography-weight-label-medium);justify-content:center;line-height:var(--type-line-height-single);padding:var(--spacing-03) var(--spacing-04);text-decoration:none;width:100%}@media (min-width:48rem){.rl-c-button__dark,[class*=rl-c-button]{width:auto}}@media (--mq-medium ){.rl-c-button__dark,[class*=rl-c-button]{width:auto}}[class*=rl-c-button]+[class*=rl-c-button]{margin-top:var(--spacing-04)}@media (min-width:48rem){[class*=rl-c-button]+[class*=rl-c-button]{margin-left:var(--spacing-04);margin-top:0}}@media (--mq-medium ){[class*=rl-c-button]+[class*=rl-c-button]{margin-left:var(--spacing-04);margin-top:0}}[class*=rl-c-button]:hover:not([disabled]){background:var(--button-fill-hover);color:var(--button-text)}.rl-c-button__dark:hover:not([disabled]){background:var(--button-fill-hover-inverted);color:var(--button-text-inverted)}.rl-c-button[disabled],[class*=rl-c-button]:disabled{background:var(--button-fill-disabled);color:var(--button-text);cursor:auto}.rl-c-button__dark:disabled,.rl-c-button__dark[disabled]{background:var(--button-fill-disabled-inverted);color:var(--button-text-disabled-inverted)}.rl-c-button--primary{background:var(--button-fill);color:var(--button-text)}.rl-c-button--primary:hover:not([disabled]){background:var(--button-fill-hover);color:var(--button-text)}.rl-c-button--primary__dark{background:var(--button-fill-inverted);color:var(--button-text-inverted)}.rl-c-button--primary__dark:hover:not([disabled]){background:var(--button-fill-hover-inverted);color:var(--button-text-inverted)}.rl-c-button--secondary{background:var(--button-fill-secondary);color:var(--button-text-secondary)}.rl-c-button--secondary:hover:not([disabled]){background:var(--button-fill-secondary-hover);color:var(--button-text-secondary)}.rl-c-button--secondary__dark{background:var(--button-fill-secondary-inverted);color:var(--button-text-secondary-inverted)}.rl-c-button--secondary__dark:hover:not([disabled]){background:var(--button-fill-secondary-hover-inverted);color:var(--button-text-secondary-inverted)}.rl-c-button--ghost,.rl-c-button--ghost__dark{background:transparent;border:2px solid var(--button-stroke-ghost);color:var(--button-text-ghost);padding:calc(var(--spacing-03) - 2px) calc(var(--spacing-04) - 2px)}.rl-c-button--ghost__dark{border-color:var(--button-stroke-ghost-inverted);color:var(--button-text-ghost-inverted)}.rl-c-button--ghost:hover:not([disabled]){background:var(--button-fill-ghost-hover);color:var(--button-text-ghost)}.rl-c-button--ghost__dark:hover:not([disabled]){background:var(--button-fill-ghost-hover-inverted);color:var(--button-text-ghost-inverted)}.rl-c-button--ghost:disabled,.rl-c-button--ghost[disabled]{background:none;border-color:var(--button-stroke-ghost-disabled);color:var(--button-text-ghost-disabled)}.rl-c-button--ghost__dark:disabled{background:none;border-color:var(--button-stroke-ghost-disabled-inverted);color:var(--button-text-ghost-disabled-inverted)}.rl-c-button--text,.rl-c-button--text__dark{border:2px solid transparent}.rl-c-button--text{color:var(--button-text-text)}.rl-c-button--text:hover:not([disabled]){background:var(--button-fill-text-hover);border-color:var(--button-stroke-text-hover);color:var(--button-text-text)}.rl-c-button--text__dark{color:var(--button-text-text-inverted)}.rl-c-button--text__dark:hover:not([disabled]){background:var(--button-fill-text-hover-inverted);border-color:var(--button-stroke-text-inverted);color:var(--button-text-text-inverted)}.rl-c-button--text:disabled,.rl-c-button--text[disabled],.rl-c-button--text__dark:disabled,.rl-c-button--text__dark[disabled]{background:none;border:none}.rl-c-button--text:disabled,.rl-c-button--text[disabled]{color:var(--button-text-text-disabled)}.rl-c-button--text__dark:disabled,.rl-c-button--text__dark[disabled]{color:var(--button-text-text-disabled-inverted)}.rl-c-button--destructive{background:var(--button-fill-destructive);color:var(--button-text-destructive)}.rl-c-button--destructive:hover:not([disabled]){background:var(--button-fill-destructive-hover);color:var(--button-text-destructive)}.rl-c-button--loading .rl-f-icon{display:none}.rl-c-button--loading [class*=rl-icon]:after,.rl-c-button--loading [class*=rl-icon]:before,.rl-c-button--loading span[aria-label]:after,.rl-c-button--loading span[aria-label]:before{aspect-ratio:1;border:.125rem solid transparent;border-radius:50%;border-top-color:currentcolor;content:"";display:block;width:1rem}.rl-c-button--loading [class*=rl-icon]:before,.rl-c-button--loading span[aria-label]:before{border-color:color-mix(in srgb,currentColor 30%,transparent);position:absolute}.rl-c-button--loading [class*=rl-icon]:after,.rl-c-button--loading span[aria-label]:after{animation:spinner 1s ease-out infinite;content:"\00a0"/"loading";font-size:0}.rl-c-button--loaded [class*=rl-icon]:before{content:"\e954"/"loaded"}@keyframes spinner{0%{rotate:0turn}to{rotate:1turn}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royallondon/design-system-component-button",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "Royal London Design System - Button package",
|
|
5
|
+
"homepage": "https://design.royallondon.com/components/button/",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://dev.azure.com/RLG-UK/GTC/_git/design-system",
|
|
9
|
+
"directory": "ds-packages/packages/design-system-component-button"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://design.royallondon.com/support/"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"royal-london-design-system-component-button",
|
|
16
|
+
"rlds-button",
|
|
17
|
+
"royal-london"
|
|
18
|
+
],
|
|
19
|
+
"author": "Design System Squad <DesignSystem@royallondon.com>",
|
|
20
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
|
+
"main": "dist/button.css",
|
|
22
|
+
"style": "dist/button.css",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build:clean": "npx rimraf dist",
|
|
25
|
+
"build:lint": "stylelint src/**/*.{css,pcss} --fix",
|
|
26
|
+
"build:css": "postcss src/**/button.pcss --base src --dir dist/ --ext css",
|
|
27
|
+
"build": "npm-run-all --serial build:clean build:css"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@royallondon/design-system-foundations": "^2.23.0"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@royallondon/design-system-foundations": ">= 2.15.0 < 3"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
}
|
|
6
41
|
}
|