@raspberrypifoundation/design-system-react 1.6.0 → 2.0.0-beta.1

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/README.md +63 -10
  3. package/dist/rpf-design-system-react.css +1 -0
  4. package/dist/rpf-design-system-react.js +2744 -0
  5. package/dist/rpf-design-system-react.umd.cjs +35 -0
  6. package/dist/scss/components/accordion.scss +94 -0
  7. package/dist/scss/components/alert.scss +131 -0
  8. package/dist/scss/components/burger-menu.scss +89 -0
  9. package/dist/scss/components/button.scss +321 -0
  10. package/dist/scss/components/forms/error-message.scss +20 -0
  11. package/dist/scss/components/forms/fieldset.scss +42 -0
  12. package/dist/scss/components/forms/input-checkbox.scss +62 -0
  13. package/dist/scss/components/forms/input-label.scss +36 -0
  14. package/dist/scss/components/forms/input-number.scss +61 -0
  15. package/dist/scss/components/forms/input-password.scss +109 -0
  16. package/dist/scss/components/forms/input-radio.scss +63 -0
  17. package/dist/scss/components/forms/input-search.scss +65 -0
  18. package/dist/scss/components/forms/input-select.scss +14 -0
  19. package/dist/scss/components/forms/input-text.scss +5 -0
  20. package/dist/scss/components/forms/input-textarea.scss +12 -0
  21. package/dist/scss/components/forms/inputs.scss +40 -0
  22. package/dist/scss/components/layout/decorative-section.scss +185 -0
  23. package/dist/scss/components/link.scss +51 -0
  24. package/dist/scss/components/menu-item.scss +66 -0
  25. package/dist/scss/components/menu-title.scss +25 -0
  26. package/dist/scss/components/menu.scss +31 -0
  27. package/dist/scss/components/progress-bar.scss +43 -0
  28. package/dist/scss/components/squiggle.scss +46 -0
  29. package/dist/scss/components/table/table-cell.scss +82 -0
  30. package/dist/scss/components/table/table.scss +32 -0
  31. package/dist/scss/components/tag.scss +50 -0
  32. package/dist/scss/design-system-core.scss +37 -0
  33. package/dist/scss/mixins/_inputs.scss +19 -0
  34. package/dist/scss/mixins/_typography.scss +75 -0
  35. package/dist/scss/properties/_border.scss +13 -0
  36. package/dist/scss/properties/_font-size.scss +14 -0
  37. package/dist/scss/properties/_font-weight.scss +4 -0
  38. package/dist/scss/properties/_line-height.scss +15 -0
  39. package/dist/scss/properties/_shadows.scss +7 -0
  40. package/dist/scss/properties/_sizing.scss +6 -0
  41. package/dist/scss/properties/_spacing.scss +16 -0
  42. package/dist/scss/properties/colors/_alert.scss +10 -0
  43. package/dist/scss/properties/colors/_brand.scss +14 -0
  44. package/dist/scss/properties/colors/_decorative.scss +58 -0
  45. package/dist/scss/properties/colors/_greys.scss +18 -0
  46. package/dist/scss/properties/colors/_inputs.scss +13 -0
  47. package/dist/scss/properties/colors/_text.scss +7 -0
  48. package/package.json +59 -84
  49. package/dist/cjs/bundle.js +0 -1809
  50. package/dist/esm/bundle.js +0 -1791
@@ -0,0 +1,82 @@
1
+ .rpf-table-cell {
2
+ border-bottom: var(--table-border-width) solid var(--rpf-grey-100);
3
+
4
+ & > * {
5
+ align-items: center;
6
+ box-sizing: border-box;
7
+ display: flex;
8
+ gap: var(--space-1);
9
+ line-height: var(--line-height-1-5);
10
+ padding-block: var(--space-1);
11
+ padding-inline: var(--space-2);
12
+ }
13
+
14
+ &--header {
15
+ background-color: var(--rpf-grey-50);
16
+
17
+ & > * {
18
+ min-height: var(--space-7);
19
+ min-width: var(--space-7);
20
+ }
21
+ }
22
+
23
+ &--sortable-header {
24
+ @extend .rpf-table-cell--header;
25
+
26
+ .rpf-table-cell__sort-header {
27
+ display: flex;
28
+ width: 100%;
29
+ gap: var(--space-1);
30
+ min-height: var(--min-target-size);
31
+ align-items: center;
32
+ border-radius: var(--border-radius);
33
+
34
+ &:focus-visible {
35
+ outline: 2px solid var(--rpf-raspberry-800);
36
+ outline-offset: 3px;
37
+ }
38
+ }
39
+
40
+ // disable all default button styles
41
+ button {
42
+ all: unset;
43
+ cursor: pointer;
44
+ }
45
+
46
+ // disable necessary default link styles
47
+ a {
48
+ color: inherit;
49
+ text-decoration: none;
50
+ }
51
+ }
52
+
53
+ &--body {
54
+ background-color: var(--rpf-white);
55
+
56
+ .rpf-table-cell__content {
57
+ min-height: var(--space-8);
58
+ min-width: var(--space-8);
59
+
60
+ & > * {
61
+ margin-block: auto;
62
+ }
63
+
64
+ a {
65
+ color: var(--rpf-brand-500);
66
+ font-weight: var(--font-weight-bold);
67
+ }
68
+
69
+ &:has(> .rpf-button) {
70
+ justify-content: end;
71
+ padding: var(--space-1);
72
+ }
73
+
74
+ &--truncated {
75
+ display: inline-block;
76
+ overflow: hidden;
77
+ text-overflow: ellipsis;
78
+ white-space: nowrap;
79
+ }
80
+ }
81
+ }
82
+ }
@@ -0,0 +1,32 @@
1
+ .rpf-table{
2
+ border: 1px solid var(--rpf-grey-100);
3
+ border-radius: var(--border-radius);
4
+ overflow: auto;
5
+ // overflow-x: scroll;
6
+ top: 0;
7
+ // max-width: 600px;
8
+ width: fit-content;
9
+
10
+ &--full-width {
11
+ width: 100%;
12
+ }
13
+
14
+
15
+ &__table {
16
+ border-collapse: collapse;
17
+ // min-width: 100%;
18
+ width: max-content;
19
+
20
+ &--full-width {
21
+ width: 100%;
22
+ }
23
+
24
+ thead th,
25
+ thead td {
26
+ // make header row sticky
27
+ position: sticky;
28
+ top: 0;
29
+ z-index: 1;
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,50 @@
1
+ @forward '../properties/font-weight';
2
+ @forward '../properties/spacing';
3
+
4
+ @mixin rpf-tag-variant($variant) {
5
+ background-color: var(--rpf-alert-#{$variant});
6
+ border-color: var(--rpf-alert-#{$variant});
7
+ }
8
+
9
+ @mixin rpf-tag-secondary-variant($variant) {
10
+ border-color: var(--rpf-alert-#{$variant});
11
+ color: var(--rpf-alert-#{$variant});
12
+ }
13
+
14
+ .rpf-tag {
15
+ --tag-color: var(--rpf-text-primary);
16
+ --tag-color-secondary: color-mix(in srgb, var(--tag-color), white 95%);
17
+ --tag-text-color: var(--rpf-white);
18
+ --tag-text-color-secondary: var(--tag-color);
19
+
20
+ align-items: center;
21
+ border: solid 1px var(--tag-color);
22
+ background-color: var(--tag-color);
23
+ border-radius: 2rem;
24
+ color: var(--tag-text-color);
25
+ display: flex;
26
+ font-weight: var(--font-weight-bold);
27
+ gap: var(--space-0-5);
28
+ line-height: 1.5rem;
29
+ padding: var(--space-0-5) var(--space-1);
30
+ inline-size: max-content;
31
+
32
+ $variants: information, success, warning, error;
33
+
34
+ @each $variant in $variants {
35
+ &--#{$variant} {
36
+ @include rpf-tag-variant($variant);
37
+ }
38
+ }
39
+
40
+ &--secondary {
41
+ background-color: var(--tag-color-secondary);
42
+ color: var(--tag-text-color-secondary);
43
+
44
+ @each $variant in $variants {
45
+ &.rpf-tag--#{$variant} {
46
+ @include rpf-tag-secondary-variant($variant);
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,37 @@
1
+ @use 'properties/_border';
2
+ @use 'properties/_font-size';
3
+ @use 'properties/_font-weight';
4
+ @use 'properties/_line-height';
5
+ @use 'properties/_spacing';
6
+ @use 'properties/_shadows';
7
+ @use 'properties/colors/_alert' as alert_colors;
8
+ @use 'properties/colors/_brand';
9
+ @use 'properties/colors/_decorative';
10
+ @use 'properties/colors/_greys';
11
+ @use 'properties/colors/_inputs' as inputs_colors;
12
+ @use 'properties/colors/_text';
13
+
14
+ @use 'components/alert';
15
+ @use 'components/accordion';
16
+ @use 'components/button';
17
+ @use 'components/progress-bar';
18
+ @use 'components/squiggle';
19
+ @use 'components/tag';
20
+ @use 'components/menu';
21
+ @use 'components/link';
22
+ @use 'components/burger-menu';
23
+
24
+ @use 'components/forms/error-message';
25
+ @use 'components/forms/fieldset';
26
+ @use 'components/forms/inputs';
27
+ @use 'components/forms/input-checkbox';
28
+ @use 'components/forms/input-label';
29
+ @use 'components/forms/input-radio';
30
+ @use 'components/forms/input-select';
31
+ @use 'components/forms/input-text';
32
+ @use 'components/forms/input-textarea';
33
+ @use 'components/forms/input-search';
34
+ @use 'components/forms/input-password';
35
+
36
+ @use 'components/table/table';
37
+ @use 'components/table/table-cell';
@@ -0,0 +1,19 @@
1
+ @forward '../properties/colors/inputs';
2
+
3
+ @mixin readonly {
4
+ &:read-only,
5
+ &--read-only,
6
+ &--readonly {
7
+ border-color: var(--rpf-input-background-color-readonly);
8
+ background-color: var(--rpf-input-background-color-readonly);
9
+ }
10
+ }
11
+
12
+ @mixin disabled {
13
+ &:disabled,
14
+ &--disabled {
15
+ border-color: var(--rpf-input-background-color-disabled);
16
+ background-color: var(--rpf-input-background-color-disabled);
17
+ }
18
+ }
19
+
@@ -0,0 +1,75 @@
1
+ @forward '../properties/font-size';
2
+ @forward '../properties/font-weight';
3
+ @forward '../properties/line-height';
4
+
5
+ @mixin style-0-5($weight: regular) {
6
+ font-size: var(--font-size-0-5);
7
+ font-weight: var(--font-weight-#{$weight});
8
+ line-height: var(--line-height-0-75);
9
+ }
10
+
11
+ @mixin style-0-75($weight: regular) {
12
+ font-size: var(--font-size-0-75);
13
+ font-weight: var(--font-weight-#{$weight});
14
+ line-height: var(--line-height-1);
15
+ }
16
+
17
+ @mixin style-1($weight: regular) {
18
+ font-size: var(--font-size-1);
19
+ font-weight: var(--font-weight-#{$weight});
20
+ line-height: var(--line-height-1-5);
21
+ }
22
+
23
+ @mixin style-1-5($weight: regular) {
24
+ font-size: var(--font-size-1-5);
25
+ font-weight: var(--font-weight-#{$weight});
26
+ line-height: var(--line-height-1-5);
27
+ }
28
+
29
+ @mixin style-2($weight: regular) {
30
+ font-size: var(--font-size-2);
31
+ font-weight: var(--font-weight-#{$weight});
32
+ line-height: var(--line-height-2);
33
+ }
34
+
35
+ @mixin style-3($weight: regular) {
36
+ font-size: var(--font-size-3);
37
+ font-weight: var(--font-weight-#{$weight});
38
+ line-height: var(--line-height-2-5);
39
+ }
40
+
41
+ @mixin style-4($weight: regular) {
42
+ font-size: var(--font-size-4);
43
+ font-weight: var(--font-weight-#{$weight});
44
+ line-height: var(--line-height-3-5);
45
+ }
46
+
47
+ @mixin style-5($weight: regular) {
48
+ font-size: var(--font-size-5);
49
+ font-weight: var(--font-weight-#{$weight});
50
+ line-height: var(--line-height-4);
51
+ }
52
+
53
+ @mixin style-6($weight: regular) {
54
+ font-size: var(--font-size-6);
55
+ font-weight: var(--font-weight-#{$weight});
56
+ line-height: var(--line-height-4-5);
57
+ }
58
+
59
+ @mixin style-7($weight: regular) {
60
+ font-size: var(--font-size-7);
61
+ font-weight: var(--font-weight-#{$weight});
62
+ line-height: var(--line-height-5);
63
+ }
64
+
65
+ @mixin style-8($weight: regular) {
66
+ font-size: var(--font-size-8);
67
+ font-weight: var(--font-weight-#{$weight});
68
+ line-height: var(--line-height-6);
69
+ }
70
+
71
+ @mixin style-9($weight: regular) {
72
+ font-size: var(--font-size-9);
73
+ font-weight: var(--font-weight-#{$weight});
74
+ line-height: var(--line-height-6-5);
75
+ }
@@ -0,0 +1,13 @@
1
+ :root, :host {
2
+ --border-radius: var(--space-1);
3
+ --border-radius-sm: var(--space-0-5);
4
+ --border-width-sm: 1px;
5
+ --border-width-md: 2px;
6
+ --border-width-lg: 3px;
7
+
8
+ --alert-border-width: var(--border-width-md);
9
+ --fieldset-border-width: var(--border-width-md);
10
+ --input-border-width: var(--border-width-md);
11
+
12
+ --table-border-width: var(--border-width-sm);
13
+ }
@@ -0,0 +1,14 @@
1
+ :root, :host {
2
+ --font-size-0-5: 0.5rem;
3
+ --font-size-0-75: 0.75rem;
4
+ --font-size-1: 1rem;
5
+ --font-size-1-5: 1.25rem;
6
+ --font-size-2: 1.5rem;
7
+ --font-size-3: 2rem;
8
+ --font-size-4: 2.5rem;
9
+ --font-size-5: 3rem;
10
+ --font-size-6: 3.5rem;
11
+ --font-size-7: 4rem;
12
+ --font-size-8: 4.5rem;
13
+ --font-size-9: 5rem;
14
+ }
@@ -0,0 +1,4 @@
1
+ :root, :host {
2
+ --font-weight-regular: 400;
3
+ --font-weight-bold: 700;
4
+ }
@@ -0,0 +1,15 @@
1
+ :root, :host {
2
+ --line-height-0-75: 0.75rem;
3
+ --line-height-1: 1rem;
4
+ --line-height-1-5: 1.5rem;
5
+ --line-height-2: 2rem;
6
+ --line-height-2-5: 2.5rem;
7
+ --line-height-3: 3rem;
8
+ --line-height-3-5: 3.5rem;
9
+ --line-height-4: 4rem;
10
+ --line-height-4-5: 4.5rem;
11
+ --line-height-5: 5rem;
12
+ --line-height-5-5: 5.5rem;
13
+ --line-height-6: 6rem;
14
+ --line-height-6-5: 6.5rem;
15
+ }
@@ -0,0 +1,7 @@
1
+ :root,
2
+ :host {
3
+ // To be used with box-shadow
4
+ --rpf-shadow-top: 0px -12px 24px 0px rgba(0, 0, 0, 0.04);
5
+ --rpf-shadow-centre: 0px 0px 8px 0px rgba(0, 0, 0, 0.08);
6
+ --rpf-shadow-bottom: 0px 12px 24px 0px rgba(0, 0, 0, 0.04);
7
+ }
@@ -0,0 +1,6 @@
1
+ :root, :host {
2
+ /* 44px min-height to meet WCAG AAA target size requirements */
3
+ --min-target-size: 44px;
4
+ --sm-target-size: 32px;
5
+ --lg-target-size: 48px;
6
+ }
@@ -0,0 +1,16 @@
1
+ :root, :host {
2
+ --space-0-125: 0.0625rem;
3
+ --space-0-25: 0.125rem;
4
+ --space-0-5: 0.25rem;
5
+ --space-1: 0.5rem;
6
+ --space-1-5: 0.75rem;
7
+ --space-2: 1rem;
8
+ --space-3: 1.5rem;
9
+ --space-4: 2rem;
10
+ --space-5: 2.5rem;
11
+ --space-6: 3rem;
12
+ --space-7: 3.5rem;
13
+ --space-8: 4rem;
14
+ --space-9: 4.5rem;
15
+ --space-10: 5rem;
16
+ }
@@ -0,0 +1,10 @@
1
+ :root, :host {
2
+ --rpf-alert-error-highlight: hsla(0, 88%, 99%, 1);
3
+ --rpf-alert-error: hsla(0, 88%, 33%, 1);
4
+ --rpf-alert-information-highlight: hsla(225, 64%, 99%, 1);
5
+ --rpf-alert-information: hsla(225, 64%, 33%, 1);
6
+ --rpf-alert-success-highlight: hsla(136, 90%, 99%, 1);
7
+ --rpf-alert-success: hsla(136, 90%, 20%, 1);
8
+ --rpf-alert-warning-highlight: hsla(26, 70%, 99%, 1);
9
+ --rpf-alert-warning: hsla(26, 70%, 29%, 1);
10
+ }
@@ -0,0 +1,14 @@
1
+ :root, :host {
2
+ --rpf-brand-black: hsla(60, 4%, 11%, 1);
3
+ --rpf-brand-leaf: hsla(123, 43%, 48%, 1);
4
+ --rpf-brand-raspberry: hsla(342, 71%, 47%, 1);
5
+
6
+ --rpf-raspberry-50: hsla(338, 57%, 97%, 1);
7
+ --rpf-raspberry-100: hsla(342, 62%, 96%, 1);
8
+ --rpf-raspberry-200: hsla(344, 73%, 93%, 1);
9
+ --rpf-raspberry-400: hsla(341, 63%, 84%, 1);
10
+ --rpf-raspberry-500: hsla(343, 62%, 68%, 1);
11
+ --rpf-raspberry-600: hsla(343, 64%, 58%, 1);
12
+ --rpf-raspberry-800: hsla(342, 71%, 47%, 1);
13
+ --rpf-raspberry-900: hsla(340, 78%, 36%, 1);
14
+ }
@@ -0,0 +1,58 @@
1
+ :root, :host {
2
+ --rpf-red-100: hsla(4, 89%, 96%, 1);
3
+ --rpf-red-200: hsla(1, 87%, 91%, 1);
4
+ --rpf-red-400: hsla(1, 87%, 82%, 1);
5
+ --rpf-red-600: hsla(1, 87%, 72%, 1);
6
+ --rpf-red-800: hsla(1, 87%, 63%, 1);
7
+ --rpf-red-900: hsla(1, 52%, 50%, 1);
8
+
9
+ --rpf-green-100: hsla(125, 41%, 95%, 1);
10
+ --rpf-green-200: hsla(122, 39%, 87%, 1);
11
+ --rpf-green-400: hsla(123, 40%, 74%, 1);
12
+ --rpf-green-600: hsla(123, 40%, 61%, 1);
13
+ --rpf-green-800: hsla(123, 43%, 48%, 1);
14
+ --rpf-green-900: hsla(123, 43%, 34%, 1);
15
+
16
+ --rpf-teal-100: hsla(176, 55%, 94%, 1);
17
+ --rpf-teal-200: hsla(174, 55%, 85%, 1);
18
+ --rpf-teal-400: hsla(174, 55%, 70%, 1);
19
+ --rpf-teal-600: hsla(174, 56%, 56%, 1);
20
+ --rpf-teal-800: hsla(174, 81%, 41%, 1);
21
+ --rpf-teal-900: hsla(174, 81%, 27%, 1);
22
+ --rpf-teal-950: hsla(174, 80%, 20%, 1);
23
+
24
+ --rpf-orange-100: hsla(31, 100%, 95%, 1);
25
+ --rpf-orange-200: hsla(32, 100%, 88%, 1);
26
+ --rpf-orange-400: hsla(31, 100%, 77%, 1);
27
+ --rpf-orange-600: hsla(31, 99%, 65%, 1);
28
+ --rpf-orange-800: hsla(31, 99%, 54%, 1);
29
+ --rpf-orange-900: hsla(31, 85%, 35%, 1);
30
+
31
+ --rpf-yellow-100: hsla(51, 100%, 95%, 1);
32
+ --rpf-yellow-200: hsla(52, 100%, 87%, 1);
33
+ --rpf-yellow-400: hsla(51, 100%, 75%, 1);
34
+ --rpf-yellow-600: hsla(52, 100%, 63%, 1);
35
+ --rpf-yellow-800: hsla(52, 100%, 50%, 1);
36
+ --rpf-yellow-900: hsla(52, 100%, 26%, 1);
37
+
38
+ --rpf-purple-100: hsla(282, 36%, 95%, 1);
39
+ --rpf-purple-200: hsla(279, 38%, 87%, 1);
40
+ --rpf-purple-400: hsla(279, 38%, 73%, 1);
41
+ --rpf-purple-600: hsla(279, 37%, 60%, 1);
42
+ --rpf-purple-800: hsla(279, 43%, 47%, 1);
43
+ --rpf-purple-900: hsla(280, 43%, 37%, 1);
44
+
45
+ --rpf-navy-100: hsla(235, 38%, 94%, 1);
46
+ --rpf-navy-200: hsla(234, 38%, 84%, 1);
47
+ --rpf-navy-400: hsla(235, 38%, 69%, 1);
48
+ --rpf-navy-600: hsla(235, 38%, 53%, 1);
49
+ --rpf-navy-800: hsla(235, 63%, 37%, 1);
50
+ --rpf-navy-900: hsla(234, 63%, 30%, 1);
51
+
52
+ --rpf-blue-100: hsla(203, 86%, 95%, 1);
53
+ --rpf-blue-200: hsla(204, 88%, 87%, 1);
54
+ --rpf-blue-400: hsla(204, 88%, 74%, 1);
55
+ --rpf-blue-600: hsla(204, 89%, 60%, 1);
56
+ --rpf-blue-800: hsla(204, 100%, 47%, 1);
57
+ --rpf-blue-900: hsla(204, 99%, 37%, 1);
58
+ }
@@ -0,0 +1,18 @@
1
+ :root, :host {
2
+ --rpf-white: hsla(0, 0%, 100%, 1);
3
+ --rpf-off-white: hsla(225, 25%, 97%, 1);
4
+ --rpf-grey-50: hsla(210, 8%, 95%, 1);
5
+ --rpf-grey-100: hsla(228, 10%, 90%, 1);
6
+ --rpf-grey-150: hsla(223, 9%, 85%, 1);
7
+ --rpf-grey-200: hsla(228, 10%, 80%, 1);
8
+ --rpf-grey-300: hsla(229, 9%, 75%, 1);
9
+ --rpf-grey-400: hsla(229, 8%, 61%, 1);
10
+ --rpf-grey-500: hsla(229, 9%, 42%, 1);
11
+ --rpf-grey-600: hsla(228, 9%, 32%, 1);
12
+ --rpf-grey-700: hsla(228, 9%, 22%, 1);
13
+ --rpf-grey-800: hsla(232, 9%, 18%, 1);
14
+ --rpf-grey-850: hsla(228, 9%, 15%, 1);
15
+ --rpf-grey-900: hsla(228, 9%, 10%, 1);
16
+ --rpf-grey-950: hsla(228, 8%, 5%, 1);
17
+ --rpf-black: hsla(0, 0%, 0%, 1);
18
+ }
@@ -0,0 +1,13 @@
1
+ @forward 'alert';
2
+ @forward 'greys';
3
+ @forward 'decorative';
4
+ @forward 'text';
5
+
6
+ :root, :host {
7
+ --rpf-input-background-color: var(--rpf-white);
8
+ --rpf-input-background-color-disabled: var(--rpf-grey-50);
9
+ --rpf-input-background-color-readonly: var(--rpf-grey-50);
10
+ --rpf-input-color-error: var(--rpf-alert-error);
11
+ --rpf-input-color: var(--rpf-text-primary);
12
+ --rpf-input-outline-color: var(--rpf-blue-800);
13
+ }
@@ -0,0 +1,7 @@
1
+ :root, :host {
2
+ --rpf-text-primary: hsla(0, 0%, 13%, 1);
3
+ --rpf-text-primary-darkmode: var(--rpf-white);
4
+ --rpf-text-secondary: hsla(200, 9%, 33%, 1);
5
+ --rpf-text-secondary-darkmode: hsla(0, 0%, 80%, 1);
6
+ --rpf-link-text: var(--rpf-navy-800);
7
+ }
package/package.json CHANGED
@@ -1,100 +1,75 @@
1
1
  {
2
2
  "name": "@raspberrypifoundation/design-system-react",
3
- "packageManager": "yarn@4.5.0",
4
- "version": "1.6.0",
5
- "description": "",
3
+ "version": "2.0.0-beta.1",
6
4
  "type": "module",
7
- "exports": {
8
- "import": "./dist/esm/bundle.js",
9
- "require": "./dist/cjs/bundle.js"
10
- },
5
+ "main": "./dist/rpf-design-system-react.umd.cjs",
11
6
  "files": [
12
7
  "dist"
13
8
  ],
14
- "scripts": {
15
- "build-css": "sass --load-path=./ --load-path=./node_modules/@raspberrypifoundation/design-system-core --quiet src:src",
16
- "build-storybook": "npm install && npm run build-css && storybook build",
17
- "lint": "eslint \"src/**/*.{js,jsx,json}\"",
18
- "lint:fix": "eslint --fix \"src/**/*.{js,jsx,json}\"",
19
- "rollup": "npm run build-css && rollup -c",
20
- "storybook": "npm run watch-css & storybook dev -p 6006",
21
- "test": "jest",
22
- "watch-css": "npm run build-css && sass --load-path=./ --load-path=./node_modules/@raspberrypifoundation/design-system-core -q --watch src:src"
23
- },
24
- "jest": {
25
- "setupFilesAfterEnv": [
26
- "<rootDir>/node_modules/@testing-library/jest-dom"
27
- ],
28
- "testEnvironment": "jsdom",
29
- "moduleNameMapper": {
30
- "material-symbols": "<rootDir>/mocks/material-symbols.js",
31
- "\\.(css|scss)$": "identity-obj-proxy"
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/rpf-design-system-react.js",
12
+ "require": "./dist/rpf-design-system-react.umd.cjs"
32
13
  }
33
14
  },
34
- "repository": {
35
- "type": "git",
36
- "url": "https://github.com/RaspberryPiFoundation/design-system-react.git"
37
- },
38
- "keywords": [],
39
- "author": "",
40
- "license": "",
41
- "devDependencies": {
42
- "@babel/preset-env": "^7.22.20",
43
- "@babel/preset-react": "^7.18.6",
44
- "@newhighsco/storybook-addon-svgr": "^1.0.1",
45
- "@raspberrypifoundation/design-system-core": "^1.4.0",
46
- "@rollup/plugin-babel": "^6.0.3",
47
- "@rollup/plugin-commonjs": "^25.0.2",
48
- "@rollup/plugin-node-resolve": "^15.1.0",
49
- "@rollup/plugin-replace": "^5.0.2",
50
- "@storybook/addon-essentials": "^7.4.0",
51
- "@storybook/addon-interactions": "^7.4.0",
52
- "@storybook/addon-links": "^7.4.0",
53
- "@storybook/addon-mdx-gfm": "^7.4.0",
54
- "@storybook/blocks": "^7.4.0",
55
- "@storybook/react": "^7.4.0",
56
- "@storybook/react-webpack5": "^7.4.0",
57
- "@storybook/testing-library": "^0.1.0",
58
- "@testing-library/jest-dom": "^6.4.2",
59
- "@testing-library/react": "^15.0.2",
60
- "babel-eslint": "^10.1.0",
61
- "css-loader": "^6.8.1",
62
- "eslint": "^7.11.0",
63
- "eslint-config-prettier": "^8.8.0",
64
- "eslint-config-react-app": "^6.0.0",
65
- "eslint-plugin-flowtype": "^5.2.0",
66
- "eslint-plugin-import": "^2.22.1",
67
- "eslint-plugin-jest": "^24.1.0",
68
- "eslint-plugin-jsx-a11y": "^6.3.1",
69
- "eslint-plugin-prettier": "^4.2.1",
70
- "eslint-plugin-react": "^7.21.5",
71
- "eslint-plugin-react-hooks": "^4.2.0",
72
- "eslint-plugin-testing-library": "^3.9.2",
73
- "eslint-webpack-plugin": "^2.5.2",
74
- "identity-obj-proxy": "^3.0.0",
75
- "jest": "^29.7.0",
76
- "jest-environment-jsdom": "^29.7.0",
77
- "jest-github-actions-reporter": "^1.0.3",
78
- "jest-junit": "^14.0.1",
79
- "jsdom": "^24.0.0",
80
- "prettier": "^2.8.8",
81
- "rollup": "^3.26.1",
82
- "rollup-plugin-postcss": "^4.0.0",
83
- "sass": "^1.69.5",
84
- "sass-loader": "^13.3.2",
85
- "storybook": "^7.4.0",
86
- "storybook-addon-pseudo-states": "^2.1.2",
87
- "storybook-addon-sass-postcss": "^0.1.3"
15
+ "scripts": {
16
+ "dev": "vite",
17
+ "build": "yarn run build-core-scss && vite build",
18
+ "lint": "eslint .",
19
+ "format": "prettier . --write",
20
+ "preview": "vite preview",
21
+ "storybook": "storybook dev -p 6006",
22
+ "build-core-scss": "rm -r public/scss/* && cp -R node_modules/@raspberrypifoundation/design-system-core/scss/* public/scss",
23
+ "build-storybook": "storybook build",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest"
88
26
  },
89
27
  "dependencies": {
90
- "classnames": "^2.3.2",
91
- "material-symbols": "^0.14.5",
28
+ "@raspberrypifoundation/design-system-core": "^2.0.0",
29
+ "classnames": "^2.5.1",
30
+ "material-symbols": "^0.27.2",
31
+ "react": "^18.3.1",
32
+ "react-dom": "^18.3.1",
33
+ "react-router-dom": "^7.0.2"
34
+ },
35
+ "devDependencies": {
36
+ "@eslint/js": "^9.15.0",
37
+ "@storybook/addon-essentials": "^8.4.7",
38
+ "@storybook/addon-interactions": "^8.4.7",
39
+ "@storybook/addon-onboarding": "^8.4.7",
40
+ "@storybook/blocks": "^8.4.7",
41
+ "@storybook/preview-api": "^8.4.7",
42
+ "@storybook/react": "^8.4.7",
43
+ "@storybook/react-vite": "^8.4.7",
44
+ "@storybook/test": "^8.4.7",
45
+ "@testing-library/jest-dom": "^6.6.3",
46
+ "@testing-library/react": "^16.1.0",
47
+ "@types/react": "^18.3.12",
48
+ "@types/react-dom": "^18.3.1",
49
+ "@vitejs/plugin-react": "^4.3.4",
50
+ "@vitest/coverage-v8": "^2.1.9",
51
+ "eslint": "^9.15.0",
52
+ "eslint-plugin-react": "^7.37.2",
53
+ "eslint-plugin-react-hooks": "^5.0.0",
54
+ "eslint-plugin-react-refresh": "^0.4.14",
55
+ "eslint-plugin-storybook": "^0.11.1",
56
+ "eslint-plugin-vitest-globals": "^1.5.0",
57
+ "globals": "^15.12.0",
58
+ "jsdom": "^25.0.1",
59
+ "prettier": "^3.4.2",
92
60
  "prop-types": "^15.8.1",
93
- "react": "^18.2.0",
94
- "react-dom": "^18.2.0",
95
- "react-router-dom": "^6.24.0"
61
+ "sass-embedded": "^1.83.1",
62
+ "storybook": "^8.4.7",
63
+ "vite": "^6.1.0",
64
+ "vitest": "^2.1.9"
96
65
  },
97
66
  "peerDependencies": {
98
67
  "react-router-dom": "^6.24.0"
68
+ },
69
+ "packageManager": "yarn@4.5.1",
70
+ "eslintConfig": {
71
+ "extends": [
72
+ "plugin:storybook/recommended"
73
+ ]
99
74
  }
100
75
  }