@codecademy/gamut 71.0.1-alpha.7bf2a2.0 → 71.0.1-alpha.fd68e3.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/dist/Alert/elements.d.ts +2 -2
- package/dist/Anchor/index.d.ts +19 -9
- package/dist/Anchor/index.js +9 -6
- package/dist/BarChart/BarRow/elements.d.ts +47 -45
- package/dist/BarChart/utils/hooks.d.ts +2 -2
- package/dist/BarChart/utils/hooks.js +3 -1
- package/dist/Box/GridBox.d.ts +1 -0
- package/dist/Box/GridBox.js +1 -1
- package/dist/Box/props.d.ts +1 -1
- package/dist/Breadcrumbs/index.d.ts +5 -5
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/Button/CTAButton.d.ts +2 -2
- package/dist/Button/FillButton.d.ts +4 -4
- package/dist/Button/IconButton.d.ts +4 -4
- package/dist/Button/StrokeButton.d.ts +4 -4
- package/dist/Button/TextButton.d.ts +4 -4
- package/dist/Button/shared/InlineIconButton.d.ts +2 -2
- package/dist/Button/shared/styles.d.ts +3 -3
- package/dist/Button/shared/types.d.ts +1 -1
- package/dist/ButtonBase/ButtonBase.d.ts +9 -4
- package/dist/ButtonBase/ButtonBase.js +11 -4
- package/dist/Card/elements.d.ts +109 -103
- package/dist/Card/styles.d.ts +8 -8
- package/dist/Coachmark/index.d.ts +1 -1
- package/dist/ConnectedForm/ConnectedForm.d.ts +1 -1
- package/dist/ConnectedForm/ConnectedFormGroup.js +4 -3
- package/dist/ConnectedForm/utils.d.ts +1 -1
- package/dist/ConnectedForm/utils.js +1 -1
- package/dist/DatePicker/DatePickerInput/index.d.ts +1 -1
- package/dist/Disclosure/elements.d.ts +18 -12
- package/dist/FeatureShimmer/index.js +1 -1
- package/dist/Form/SelectDropdown/SelectDropdown.js +1 -1
- package/dist/Form/SelectDropdown/elements/containers.js +1 -1
- package/dist/Form/SelectDropdown/elements/controls.js +2 -2
- package/dist/Form/SelectDropdown/elements/multi-value.js +2 -2
- package/dist/Form/SelectDropdown/types/internal.d.ts +2 -2
- package/dist/Form/SelectDropdown/utils.js +2 -1
- package/dist/Form/elements/Form.d.ts +15 -15
- package/dist/Form/elements/FormGroup.d.ts +1 -1
- package/dist/Form/styles/Checkbox-styles.d.ts +1 -1
- package/dist/GridForm/GridFormButtons/index.d.ts +4 -4
- package/dist/List/ListProvider.d.ts +1 -1
- package/dist/List/elements.d.ts +44 -42
- package/dist/Menu/MenuItem.js +10 -6
- package/dist/Menu/elements.d.ts +2 -2
- package/dist/Modals/Dialog.js +6 -2
- package/dist/Modals/Modal.js +5 -2
- package/dist/Modals/elements.d.ts +1 -1
- package/dist/Pagination/AnimatedPaginationButtons.d.ts +31 -29
- package/dist/Pagination/EllipsisButton.d.ts +2 -2
- package/dist/Pagination/PaginationButton.d.ts +6 -6
- package/dist/Pagination/utils.d.ts +31 -29
- package/dist/Pagination/utils.js +14 -11
- package/dist/Popover/Popover.js +6 -6
- package/dist/Popover/types.d.ts +4 -3
- package/dist/PopoverContainer/PopoverContainer.js +9 -9
- package/dist/PopoverContainer/hooks.d.ts +16 -4
- package/dist/PopoverContainer/hooks.js +50 -27
- package/dist/PopoverContainer/types.d.ts +2 -1
- package/dist/Tabs/TabButton.d.ts +2 -2
- package/dist/Tabs/TabNavLink.d.ts +2 -2
- package/dist/Tag/elements.d.ts +14 -8
- package/dist/Tag/index.js +1 -1
- package/dist/Tip/InfoTip/InfoTipButton.d.ts +4 -4
- package/dist/Tip/PreviewTip/elements.d.ts +12 -6
- package/dist/Tip/__tests__/helpers.d.ts +1 -1
- package/dist/Tip/shared/FloatingTip.js +2 -2
- package/dist/Tip/shared/types.d.ts +2 -2
- package/dist/Tip/shared/utils.js +1 -1
- package/dist/utils/nullish.d.ts +10 -0
- package/dist/utils/nullish.js +11 -0
- package/dist/utils/react.js +4 -2
- package/package.json +10 -10
- package/dist/AccordionButtonDeprecated/ButtonDeprecated/styles/index.module.scss +0 -104
- package/dist/AccordionButtonDeprecated/ButtonDeprecated/styles/mixins.scss +0 -109
- package/dist/AccordionButtonDeprecated/ButtonDeprecated/styles/variables.scss +0 -54
- package/dist/AccordionButtonDeprecated/styles.module.scss +0 -54
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/gamut",
|
|
3
3
|
"description": "Styleguide & Component library for Codecademy",
|
|
4
|
-
"version": "71.0.1-alpha.
|
|
4
|
+
"version": "71.0.1-alpha.fd68e3.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"bin": "./bin/gamut.mjs",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@codecademy/gamut-icons": "9.57.8-alpha.
|
|
9
|
-
"@codecademy/gamut-illustrations": "0.58.14-alpha.
|
|
10
|
-
"@codecademy/gamut-patterns": "0.10.33-alpha.
|
|
11
|
-
"@codecademy/gamut-styles": "20.0.1-alpha.
|
|
12
|
-
"@codecademy/variance": "0.26.2-alpha.
|
|
8
|
+
"@codecademy/gamut-icons": "9.57.8-alpha.fd68e3.0",
|
|
9
|
+
"@codecademy/gamut-illustrations": "0.58.14-alpha.fd68e3.0",
|
|
10
|
+
"@codecademy/gamut-patterns": "0.10.33-alpha.fd68e3.0",
|
|
11
|
+
"@codecademy/gamut-styles": "20.0.1-alpha.fd68e3.0",
|
|
12
|
+
"@codecademy/variance": "0.26.2-alpha.fd68e3.0",
|
|
13
13
|
"@formatjs/intl-locale": "5.3.1",
|
|
14
14
|
"@react-aria/interactions": "3.25.0",
|
|
15
15
|
"@types/marked": "^4.0.8",
|
|
16
16
|
"@vidstack/react": "^1.12.12",
|
|
17
17
|
"classnames": "^2.2.5",
|
|
18
|
-
"framer-motion": "^
|
|
18
|
+
"framer-motion": "^12.0.0",
|
|
19
19
|
"html-to-react": "^1.6.0",
|
|
20
20
|
"invariant": "^2.2.4",
|
|
21
21
|
"lodash": "^4.17.23",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"polished": "^4.1.2",
|
|
24
24
|
"react-aria-components": "1.7.1",
|
|
25
25
|
"react-focus-on": "3.10.0",
|
|
26
|
-
"react-hook-form": "^7.
|
|
26
|
+
"react-hook-form": "^7.71.2",
|
|
27
27
|
"react-player": "^2.16.0",
|
|
28
28
|
"react-select": "^5.2.2",
|
|
29
29
|
"react-truncate-markup": "^5.1.2",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@emotion/react": "^11.4.0",
|
|
46
46
|
"@emotion/styled": "^11.3.0",
|
|
47
|
-
"react": "^17.0.2 || ^18.3.0",
|
|
48
|
-
"react-dom": "^17.0.2 || ^18.3.0"
|
|
47
|
+
"react": "^17.0.2 || ^18.3.0 || ^19.0.0",
|
|
48
|
+
"react-dom": "^17.0.2 || ^18.3.0 || ^19.0.0"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use "variables";
|
|
3
|
-
@use "mixins";
|
|
4
|
-
//
|
|
5
|
-
// Base styles
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
.btn {
|
|
9
|
-
align-items: center;
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
font-weight: variables.$btn-font-weight;
|
|
13
|
-
-webkit-font-smoothing: antialiased;
|
|
14
|
-
-moz-osx-font-smoothing: grayscale;
|
|
15
|
-
border: 1px solid transparent;
|
|
16
|
-
border-radius: variables.$btn-border-radius;
|
|
17
|
-
user-select: none;
|
|
18
|
-
@include mixins.button-size(
|
|
19
|
-
variables.$btn-padding-y,
|
|
20
|
-
variables.$btn-padding-x,
|
|
21
|
-
variables.$btn-font-size-base,
|
|
22
|
-
variables.$btn-line-height,
|
|
23
|
-
variables.$btn-min-width-sm
|
|
24
|
-
);
|
|
25
|
-
transition: all 0.1s ease-in-out;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Future-proof disabling of clicks on `<a>` elements
|
|
29
|
-
a.btn.disabled,
|
|
30
|
-
fieldset[disabled] a.btn {
|
|
31
|
-
pointer-events: none;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@each $name, $color in variables.$btn-swatches {
|
|
35
|
-
@if $name == "brand-yellow" {
|
|
36
|
-
@include mixins.button-variants($name, variables.$color-black, $color);
|
|
37
|
-
} @else if color.channel(color.to-space($color, hsl), "lightness") > 68 {
|
|
38
|
-
@include mixins.button-variants($name, variables.$color-black, $color);
|
|
39
|
-
} @else {
|
|
40
|
-
@include mixins.button-variants($name, variables.$color-white, $color);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.round {
|
|
45
|
-
border-radius: variables.$btn-round-border-radius;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.square {
|
|
49
|
-
border-radius: 0;
|
|
50
|
-
}
|
|
51
|
-
//
|
|
52
|
-
// Button Sizes
|
|
53
|
-
//
|
|
54
|
-
|
|
55
|
-
.large {
|
|
56
|
-
// line-height: ensure even-numbered height of button next to large input
|
|
57
|
-
@include mixins.button-size(
|
|
58
|
-
variables.$btn-padding-y-lg,
|
|
59
|
-
variables.$btn-padding-x-lg,
|
|
60
|
-
variables.$btn-font-size-lg,
|
|
61
|
-
variables.$btn-line-height-lg,
|
|
62
|
-
variables.$btn-min-width-lg
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.small {
|
|
67
|
-
// line-height: ensure proper height of button next to small input
|
|
68
|
-
@include mixins.button-size(
|
|
69
|
-
variables.$btn-padding-y-sm,
|
|
70
|
-
variables.$btn-padding-x-sm,
|
|
71
|
-
variables.$btn-font-size-sm,
|
|
72
|
-
variables.$btn-line-height-sm,
|
|
73
|
-
variables.$btn-min-width-sm
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
//
|
|
78
|
-
// Block buttovariables.n
|
|
79
|
-
//
|
|
80
|
-
|
|
81
|
-
.block {
|
|
82
|
-
display: flex;
|
|
83
|
-
width: 100%;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.caps {
|
|
87
|
-
text-transform: uppercase;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.underline {
|
|
91
|
-
&:hover,
|
|
92
|
-
&:focus {
|
|
93
|
-
text-decoration: underline;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Specificity overrides
|
|
98
|
-
input[type="submit"],
|
|
99
|
-
input[type="reset"],
|
|
100
|
-
input[type="button"] {
|
|
101
|
-
&.block {
|
|
102
|
-
width: 100%;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
@use "variables";
|
|
3
|
-
|
|
4
|
-
// Button variants
|
|
5
|
-
//
|
|
6
|
-
// Easily pump out default styles, as well as :hover, :focus, :active,
|
|
7
|
-
// and disabled options for all buttons
|
|
8
|
-
|
|
9
|
-
@mixin button-variant($color, $background, $border: transparent) {
|
|
10
|
-
$active-background: color.mix(variables.$color-black, $background);
|
|
11
|
-
|
|
12
|
-
@if $border == transparent {
|
|
13
|
-
$active-border: transparent;
|
|
14
|
-
$active-border-hover: transparent;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
color: $color;
|
|
18
|
-
background-color: $background;
|
|
19
|
-
border-color: $border;
|
|
20
|
-
|
|
21
|
-
&:hover {
|
|
22
|
-
box-shadow: 0 2px 4px variables.$btn-box-shadow-color;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&:focus-visible {
|
|
26
|
-
box-shadow: 0 0 0 2px variables.$color-white, 0 0 0 4px $background;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&:focus-visible,
|
|
30
|
-
&:hover {
|
|
31
|
-
text-decoration: none;
|
|
32
|
-
color: $color;
|
|
33
|
-
|
|
34
|
-
&:active {
|
|
35
|
-
box-shadow: 0 2px 4px variables.$btn-box-shadow-color;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&:active {
|
|
40
|
-
background-color: $active-background;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&:disabled {
|
|
44
|
-
background-color: variables.$btn-disabled-color;
|
|
45
|
-
|
|
46
|
-
&:hover {
|
|
47
|
-
box-shadow: none;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@mixin button-flat-variant($color) {
|
|
53
|
-
color: $color;
|
|
54
|
-
background-color: transparent;
|
|
55
|
-
|
|
56
|
-
&:hover,
|
|
57
|
-
&:active {
|
|
58
|
-
box-shadow: none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&:focus-visible {
|
|
62
|
-
box-shadow: 0 0 0 2px variables.$color-white, 0 0 0 4px $color;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&:disabled {
|
|
66
|
-
color: variables.$btn-disabled-color;
|
|
67
|
-
background-color: transparent;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Button sizes
|
|
72
|
-
@mixin button-size(
|
|
73
|
-
$padding-y,
|
|
74
|
-
$padding-x,
|
|
75
|
-
$font-size,
|
|
76
|
-
$line-height,
|
|
77
|
-
$min-width
|
|
78
|
-
) {
|
|
79
|
-
padding: $padding-y $padding-x;
|
|
80
|
-
font-size: $font-size;
|
|
81
|
-
line-height: $line-height;
|
|
82
|
-
min-width: $min-width;
|
|
83
|
-
|
|
84
|
-
&.fit-text {
|
|
85
|
-
min-width: 0;
|
|
86
|
-
min-height: 0;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
@mixin button-variants($name, $color, $background, $border: transparent) {
|
|
91
|
-
.btn-#{$name} {
|
|
92
|
-
@include button-variant($color, $background, $border);
|
|
93
|
-
&.flat {
|
|
94
|
-
@include button-flat-variant($background);
|
|
95
|
-
}
|
|
96
|
-
@content;
|
|
97
|
-
}
|
|
98
|
-
.link-#{$name} {
|
|
99
|
-
font-weight: bold;
|
|
100
|
-
-webkit-font-smoothing: antialiased;
|
|
101
|
-
-moz-osx-font-smoothing: grayscale;
|
|
102
|
-
color: $background;
|
|
103
|
-
text-decoration: underline;
|
|
104
|
-
|
|
105
|
-
&:disabled {
|
|
106
|
-
color: variables.$btn-disabled-color;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
$btn-padding-x: 1rem !default;
|
|
2
|
-
$btn-padding-y: 0.375rem !default;
|
|
3
|
-
$btn-font-weight: bold !default;
|
|
4
|
-
|
|
5
|
-
$btn-line-height: 1.5 !default;
|
|
6
|
-
$btn-line-height-lg: calc(4 / 3) !default;
|
|
7
|
-
$btn-line-height-sm: 1.5 !default;
|
|
8
|
-
|
|
9
|
-
$btn-font-size-base: 1rem !default;
|
|
10
|
-
$btn-font-size-lg: 1.25rem !default;
|
|
11
|
-
$btn-font-size-sm: 1rem !default;
|
|
12
|
-
$btn-font-size-xs: 0.75rem !default;
|
|
13
|
-
|
|
14
|
-
$btn-padding-x-sm: 0.75rem !default;
|
|
15
|
-
$btn-padding-y-sm: 0.25rem !default;
|
|
16
|
-
$btn-min-width-sm: 8rem !default;
|
|
17
|
-
|
|
18
|
-
$btn-padding-x-lg: 1.25rem !default;
|
|
19
|
-
$btn-padding-y-lg: 0.75rem !default;
|
|
20
|
-
$btn-min-width-lg: 10rem !default;
|
|
21
|
-
|
|
22
|
-
$btn-border-radius: 2px !default;
|
|
23
|
-
$btn-round-border-radius: 50px !default;
|
|
24
|
-
|
|
25
|
-
$btn-state-modifier: 20% !default;
|
|
26
|
-
$btn-color-modifier: 10% !default;
|
|
27
|
-
$btn-outline-hover-state-modifier: 0.9 !default;
|
|
28
|
-
$btn-outline-active-state-modifier: 0.6 !default;
|
|
29
|
-
$btn-box-shadow-focus-modifier: 0.5 !default;
|
|
30
|
-
|
|
31
|
-
$btn-disabled-color: #646466;
|
|
32
|
-
$btn-box-shadow-color: rgba(0, 0, 0, 0.3);
|
|
33
|
-
|
|
34
|
-
$btn-swatches: (
|
|
35
|
-
// Gamut Next
|
|
36
|
-
"hyper": #3a10e5,
|
|
37
|
-
"red": #e91c11,
|
|
38
|
-
"navy": #10162f,
|
|
39
|
-
"white": #ffffff,
|
|
40
|
-
"grey": #c4c3c7,
|
|
41
|
-
// Gamut Classic
|
|
42
|
-
"brand-blue": #3069f0,
|
|
43
|
-
"brand-red": #fd4d3f,
|
|
44
|
-
"brand-yellow": #ffd500,
|
|
45
|
-
"brand-purple": #6400e4,
|
|
46
|
-
"brand-dark-blue": #141c3a,
|
|
47
|
-
// Editor
|
|
48
|
-
"mint": #34b3a0,
|
|
49
|
-
"darkmint": #1a7b72,
|
|
50
|
-
"greyblue": #354551
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
$color-black: #000000;
|
|
54
|
-
$color-white: #ffffff;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
.accordionButton {
|
|
2
|
-
align-items: center;
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
padding: 0.375rem 1rem;
|
|
6
|
-
width: 100%;
|
|
7
|
-
|
|
8
|
-
&.blue {
|
|
9
|
-
color: #a5befa;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&.yellow {
|
|
13
|
-
background-color: #fff2b3;
|
|
14
|
-
border: solid #ffe359;
|
|
15
|
-
border-width: 1px 0;
|
|
16
|
-
font-weight: normal;
|
|
17
|
-
transition: background-color 0.15s ease-in-out;
|
|
18
|
-
|
|
19
|
-
&:focus-visible {
|
|
20
|
-
border-color: #b37620;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&:focus,
|
|
24
|
-
&:hover {
|
|
25
|
-
background-color: #ffec8c;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.large {
|
|
30
|
-
border-radius: 2px;
|
|
31
|
-
font-size: 1.5rem;
|
|
32
|
-
|
|
33
|
-
.children {
|
|
34
|
-
padding-top: 0.2rem;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.expansionIcon {
|
|
38
|
-
margin-left: 1rem;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@media only screen and (min-width: 64rem) {
|
|
42
|
-
font-size: 1.75rem;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.expansionIcon {
|
|
48
|
-
margin-left: 0.75rem;
|
|
49
|
-
transition: transform 0.35s ease-out;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.expansionIconExpanded {
|
|
53
|
-
transform: rotate(-180deg);
|
|
54
|
-
}
|