@utahdts/utah-design-system 0.9.2 → 0.9.5
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/css/1-settings/_settings-index.scss +1 -1
- package/css/4-elements/_elements-index.scss +1 -26
- package/css/6-components/_components-index.scss +2 -0
- package/css/6-components/base-components/containers/_accordion.scss +19 -3
- package/css/6-components/base-components/forms/_fieldset.scss +8 -0
- package/css/6-components/base-components/navigation/_main-menu.scss +6 -3
- package/css/6-components/base-components/templates/_documenation-template.scss +9 -0
- package/css/6-components/base-components/text/_pre-code.scss +38 -0
- package/dist/style.css +72 -37
- package/dist/utah-design-system.es.js +13 -14
- package/dist/utah-design-system.umd.js +13 -14
- package/package.json +2 -10
- package/react/components/containers/accordion/Accordion.jsx +8 -3
- package/react/components/table/TableCell.jsx +0 -1
- package/react/components/table/util/TableContext.jsx +4 -0
|
@@ -59,32 +59,7 @@ elemental html: h1, h2, h3, ul, li, etc.
|
|
|
59
59
|
background: var(--primary-color-light);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
pre
|
|
63
|
-
position: relative;
|
|
64
|
-
font-family: var(--fixed-width-font-family);
|
|
65
|
-
font-size: .95rem;
|
|
66
|
-
white-space: pre-wrap;
|
|
67
|
-
word-wrap: break-word;
|
|
68
|
-
margin: 0 0 var(--spacing) 0;
|
|
69
|
-
&.gray-block {
|
|
70
|
-
background: var(--gray-light-color);
|
|
71
|
-
padding: var(--spacing-s) var(--spacing);
|
|
72
|
-
border-radius: var(--radius-medium);
|
|
73
|
-
}
|
|
74
|
-
&.pre-block {
|
|
75
|
-
&--overflow {
|
|
76
|
-
width: 100%;
|
|
77
|
-
overflow-x: scroll;
|
|
78
|
-
box-sizing: border-box;
|
|
79
|
-
}
|
|
80
|
-
&--padded {
|
|
81
|
-
padding: 0 var(--spacing);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
.pre-block__overflow-content {
|
|
85
|
-
width: max-content;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
62
|
+
// pre --- see _pre-code.scss
|
|
88
63
|
|
|
89
64
|
ul, ol {
|
|
90
65
|
padding: 0 0 0 var(--spacing-2xl);
|
|
@@ -18,6 +18,7 @@ component specific, BEM (Block, Element, Modifier)
|
|
|
18
18
|
@use "base-components/forms/info-box";
|
|
19
19
|
@use "base-components/forms/radio-button";
|
|
20
20
|
@use "base-components/forms/switch";
|
|
21
|
+
@use "base-components/forms/fieldset";
|
|
21
22
|
@use "base-components/navigation/main-menu";
|
|
22
23
|
@use "base-components/navigation/menu-item";
|
|
23
24
|
@use "base-components/navigation/pagination";
|
|
@@ -30,6 +31,7 @@ component specific, BEM (Block, Element, Modifier)
|
|
|
30
31
|
@use "base-components/popups/search-modal";
|
|
31
32
|
@use "base-components/templates/documenation-template";
|
|
32
33
|
@use "base-components/templates/landing-page-template";
|
|
34
|
+
@use "base-components/text/pre-code";
|
|
33
35
|
@use "base-components/forms/input";
|
|
34
36
|
@use "base-components/widgetsInicators/spinner";
|
|
35
37
|
@use "base-components/tablesAndLists/table";
|
|
@@ -2,25 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
#{class-vars.$base-class} {
|
|
4
4
|
.accordion {
|
|
5
|
+
width: 100%;
|
|
6
|
+
|
|
5
7
|
&__header,
|
|
6
8
|
&__header.button {
|
|
7
|
-
border-radius:
|
|
8
|
-
font-size: var(--font-size-
|
|
9
|
+
border-radius: var(--radius-small);
|
|
10
|
+
font-size: var(--font-size-xl);
|
|
9
11
|
font-weight: var(--font-weight-bold);
|
|
10
|
-
padding: var(--spacing);
|
|
12
|
+
padding: var(--spacing-s) var(--spacing);
|
|
11
13
|
border: none;
|
|
12
14
|
display: flex;
|
|
13
15
|
flex-direction: row;
|
|
14
16
|
justify-content: space-between;
|
|
15
17
|
width: 100%;
|
|
16
18
|
box-sizing: border-box;
|
|
19
|
+
|
|
20
|
+
[class*=utds-icon-before-]::before {
|
|
21
|
+
margin-right: 0;
|
|
22
|
+
font-size: 1.5rem;
|
|
23
|
+
}
|
|
17
24
|
}
|
|
25
|
+
&__header {
|
|
26
|
+
&--open {
|
|
27
|
+
border-bottom-left-radius: 0;
|
|
28
|
+
border-bottom-right-radius: 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
18
32
|
&__content {
|
|
19
33
|
background: var(--gray-light-color);
|
|
20
34
|
padding: 0;
|
|
21
35
|
box-sizing: border-box;
|
|
22
36
|
height: 0;
|
|
23
37
|
overflow: hidden;
|
|
38
|
+
border-bottom-left-radius: var(--radius-small);
|
|
39
|
+
border-bottom-right-radius: var(--radius-small);
|
|
24
40
|
|
|
25
41
|
&--open {
|
|
26
42
|
height: auto;
|
|
@@ -52,9 +52,12 @@
|
|
|
52
52
|
min-height: auto;
|
|
53
53
|
line-height: 1.7;
|
|
54
54
|
|
|
55
|
-
.
|
|
56
|
-
font-size:
|
|
57
|
-
margin-
|
|
55
|
+
.menu-item__menu-arrow {
|
|
56
|
+
font-size: .65rem;
|
|
57
|
+
margin-left: var(--spacing-2xs);
|
|
58
|
+
&[class*=utds-icon-before-]::before {
|
|
59
|
+
margin-right: 0;
|
|
60
|
+
}
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
&:hover {
|
|
@@ -61,6 +61,15 @@
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
@media screen and (max-width: 1300px) {
|
|
65
|
+
#{class-vars.$base-class} {
|
|
66
|
+
.documentation-template {
|
|
67
|
+
&__content {
|
|
68
|
+
max-width: calc(100vw - (6 * var(--spacing-xl)) - (var(--documentation-left-width)) - (var(--documentation-right-width)));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
64
73
|
@media screen and (max-width: #{media-size-vars.$media-size-desktop-small}) {
|
|
65
74
|
#{class-vars.$base-class} {
|
|
66
75
|
.documentation-template {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
@use "../../../../../../@utahdts/utah-design-system/css/1-settings/class-vars";
|
|
3
|
+
|
|
4
|
+
#{class-vars.$base-class} {
|
|
5
|
+
.pre-code {
|
|
6
|
+
&__wrapper {
|
|
7
|
+
position: relative;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
pre {
|
|
13
|
+
position: relative;
|
|
14
|
+
font-family: var(--fixed-width-font-family);
|
|
15
|
+
font-size: .95rem;
|
|
16
|
+
white-space: pre-wrap;
|
|
17
|
+
word-wrap: break-word;
|
|
18
|
+
margin: 0 0 var(--spacing) 0;
|
|
19
|
+
&.gray-block {
|
|
20
|
+
background: var(--gray-light-color);
|
|
21
|
+
padding: var(--spacing-s) var(--spacing-xl) var(--spacing-s) var(--spacing);
|
|
22
|
+
border-radius: var(--radius-medium);
|
|
23
|
+
}
|
|
24
|
+
&.pre-code {
|
|
25
|
+
&--overflow {
|
|
26
|
+
width: 100%;
|
|
27
|
+
overflow-x: scroll;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
}
|
|
30
|
+
&--padded {
|
|
31
|
+
padding: 0 var(--spacing);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
.pre-code__overflow-content {
|
|
35
|
+
width: max-content;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
package/dist/style.css
CHANGED
|
@@ -698,7 +698,7 @@ variables and settings
|
|
|
698
698
|
--form-checkbox-medium: 1.125rem;
|
|
699
699
|
--form-checkbox-large: 1.375rem;
|
|
700
700
|
/* content layout sizes */
|
|
701
|
-
--content-width-narrow:
|
|
701
|
+
--content-width-narrow: 808px;
|
|
702
702
|
--content-width: 1224px;
|
|
703
703
|
--content-width-wide: 1432px;
|
|
704
704
|
--documentation-width: 700px;
|
|
@@ -894,35 +894,6 @@ elemental html: h1, h2, h3, ul, li, etc.
|
|
|
894
894
|
background: var(--primary-color-light);
|
|
895
895
|
}
|
|
896
896
|
|
|
897
|
-
.utah-design-system pre {
|
|
898
|
-
position: relative;
|
|
899
|
-
font-family: var(--fixed-width-font-family);
|
|
900
|
-
font-size: 0.95rem;
|
|
901
|
-
white-space: pre-wrap;
|
|
902
|
-
word-wrap: break-word;
|
|
903
|
-
margin: 0 0 var(--spacing) 0;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
.utah-design-system pre.gray-block {
|
|
907
|
-
background: var(--gray-light-color);
|
|
908
|
-
padding: var(--spacing-s) var(--spacing);
|
|
909
|
-
border-radius: var(--radius-medium);
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
.utah-design-system pre.pre-block--overflow {
|
|
913
|
-
width: 100%;
|
|
914
|
-
overflow-x: scroll;
|
|
915
|
-
box-sizing: border-box;
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
.utah-design-system pre.pre-block--padded {
|
|
919
|
-
padding: 0 var(--spacing);
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
.utah-design-system pre .pre-block__overflow-content {
|
|
923
|
-
width: max-content;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
897
|
.utah-design-system ul, .utah-design-system ol {
|
|
927
898
|
padding: 0 0 0 var(--spacing-2xl);
|
|
928
899
|
margin: 0;
|
|
@@ -966,11 +937,15 @@ containers and general design patterns, 2up, 3up, layout grids, etc.
|
|
|
966
937
|
############ _class-vars.scss ############
|
|
967
938
|
CSS Classes - SCSS Variables
|
|
968
939
|
*/
|
|
940
|
+
.utah-design-system .accordion {
|
|
941
|
+
width: 100%;
|
|
942
|
+
}
|
|
943
|
+
|
|
969
944
|
.utah-design-system .accordion__header, .utah-design-system .accordion__header.button {
|
|
970
|
-
border-radius:
|
|
971
|
-
font-size: var(--font-size-
|
|
945
|
+
border-radius: var(--radius-small);
|
|
946
|
+
font-size: var(--font-size-xl);
|
|
972
947
|
font-weight: var(--font-weight-bold);
|
|
973
|
-
padding: var(--spacing);
|
|
948
|
+
padding: var(--spacing-s) var(--spacing);
|
|
974
949
|
border: none;
|
|
975
950
|
display: flex;
|
|
976
951
|
flex-direction: row;
|
|
@@ -979,12 +954,24 @@ CSS Classes - SCSS Variables
|
|
|
979
954
|
box-sizing: border-box;
|
|
980
955
|
}
|
|
981
956
|
|
|
957
|
+
.utah-design-system .accordion__header [class*=utds-icon-before-]::before, .utah-design-system .accordion__header.button [class*=utds-icon-before-]::before {
|
|
958
|
+
margin-right: 0;
|
|
959
|
+
font-size: 1.5rem;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.utah-design-system .accordion__header--open {
|
|
963
|
+
border-bottom-left-radius: 0;
|
|
964
|
+
border-bottom-right-radius: 0;
|
|
965
|
+
}
|
|
966
|
+
|
|
982
967
|
.utah-design-system .accordion__content {
|
|
983
968
|
background: var(--gray-light-color);
|
|
984
969
|
padding: 0;
|
|
985
970
|
box-sizing: border-box;
|
|
986
971
|
height: 0;
|
|
987
972
|
overflow: hidden;
|
|
973
|
+
border-bottom-left-radius: var(--radius-small);
|
|
974
|
+
border-bottom-right-radius: var(--radius-small);
|
|
988
975
|
}
|
|
989
976
|
|
|
990
977
|
.utah-design-system .accordion__content--open {
|
|
@@ -2130,6 +2117,11 @@ base color swatches for the design system
|
|
|
2130
2117
|
color: #699957;
|
|
2131
2118
|
}
|
|
2132
2119
|
|
|
2120
|
+
.utah-design-system fieldset {
|
|
2121
|
+
border: none;
|
|
2122
|
+
padding: 0;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2133
2125
|
.utah-design-system .main-menu__wrapper {
|
|
2134
2126
|
background-color: var(--gray-light-color);
|
|
2135
2127
|
display: flex;
|
|
@@ -2178,9 +2170,13 @@ base color swatches for the design system
|
|
|
2178
2170
|
line-height: 1.7;
|
|
2179
2171
|
}
|
|
2180
2172
|
|
|
2181
|
-
.utah-design-system .horizontal-menu > ul li a[href] .
|
|
2182
|
-
font-size:
|
|
2183
|
-
margin-
|
|
2173
|
+
.utah-design-system .horizontal-menu > ul li a[href] .menu-item__menu-arrow, .utah-design-system .horizontal-menu > ul li button .menu-item__menu-arrow {
|
|
2174
|
+
font-size: 0.65rem;
|
|
2175
|
+
margin-left: var(--spacing-2xs);
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
.utah-design-system .horizontal-menu > ul li a[href] .menu-item__menu-arrow[class*=utds-icon-before-]::before, .utah-design-system .horizontal-menu > ul li button .menu-item__menu-arrow[class*=utds-icon-before-]::before {
|
|
2179
|
+
margin-right: 0;
|
|
2184
2180
|
}
|
|
2185
2181
|
|
|
2186
2182
|
.utah-design-system .horizontal-menu > ul li a[href]:hover, .utah-design-system .horizontal-menu > ul li button:hover {
|
|
@@ -3196,7 +3192,7 @@ variables and settings
|
|
|
3196
3192
|
--form-checkbox-medium: 1.125rem;
|
|
3197
3193
|
--form-checkbox-large: 1.375rem;
|
|
3198
3194
|
/* content layout sizes */
|
|
3199
|
-
--content-width-narrow:
|
|
3195
|
+
--content-width-narrow: 808px;
|
|
3200
3196
|
--content-width: 1224px;
|
|
3201
3197
|
--content-width-wide: 1432px;
|
|
3202
3198
|
--documentation-width: 700px;
|
|
@@ -3641,6 +3637,11 @@ Media Sizes - SCSS Variables
|
|
|
3641
3637
|
min-width: var(--documentation-right-width);
|
|
3642
3638
|
}
|
|
3643
3639
|
|
|
3640
|
+
@media screen and (max-width: 1300px) {
|
|
3641
|
+
.utah-design-system .documentation-template__content {
|
|
3642
|
+
max-width: calc(100vw - 6 * var(--spacing-xl) - (var(--documentation-left-width)) - (var(--documentation-right-width)));
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3644
3645
|
@media screen and (max-width: 1200px) {
|
|
3645
3646
|
.utah-design-system .documentation-template__side-panel-left, .utah-design-system .documentation-template__side-panel-right {
|
|
3646
3647
|
min-width: calc(var(--documentation-left-width) - 50px);
|
|
@@ -3699,6 +3700,40 @@ Media Sizes - SCSS Variables
|
|
|
3699
3700
|
padding: 0 var(--spacing-l);
|
|
3700
3701
|
}
|
|
3701
3702
|
}
|
|
3703
|
+
.utah-design-system .pre-code__wrapper {
|
|
3704
|
+
position: relative;
|
|
3705
|
+
width: 100%;
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
.utah-design-system pre {
|
|
3709
|
+
position: relative;
|
|
3710
|
+
font-family: var(--fixed-width-font-family);
|
|
3711
|
+
font-size: 0.95rem;
|
|
3712
|
+
white-space: pre-wrap;
|
|
3713
|
+
word-wrap: break-word;
|
|
3714
|
+
margin: 0 0 var(--spacing) 0;
|
|
3715
|
+
}
|
|
3716
|
+
|
|
3717
|
+
.utah-design-system pre.gray-block {
|
|
3718
|
+
background: var(--gray-light-color);
|
|
3719
|
+
padding: var(--spacing-s) var(--spacing-xl) var(--spacing-s) var(--spacing);
|
|
3720
|
+
border-radius: var(--radius-medium);
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3723
|
+
.utah-design-system pre.pre-code--overflow {
|
|
3724
|
+
width: 100%;
|
|
3725
|
+
overflow-x: scroll;
|
|
3726
|
+
box-sizing: border-box;
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
.utah-design-system pre.pre-code--padded {
|
|
3730
|
+
padding: 0 var(--spacing);
|
|
3731
|
+
}
|
|
3732
|
+
|
|
3733
|
+
.utah-design-system pre .pre-code__overflow-content {
|
|
3734
|
+
width: max-content;
|
|
3735
|
+
}
|
|
3736
|
+
|
|
3702
3737
|
.utah-design-system input.input--height-small,
|
|
3703
3738
|
.utah-design-system .input--height-small {
|
|
3704
3739
|
min-height: var(--form-ele-small);
|
|
@@ -7,7 +7,7 @@ const index = "";
|
|
|
7
7
|
const name = "@utahdts/utah-design-system";
|
|
8
8
|
const description = "Utah Design System React Library";
|
|
9
9
|
const displayName = "Utah Design System React Library";
|
|
10
|
-
const version$1 = "0.9.
|
|
10
|
+
const version$1 = "0.9.5";
|
|
11
11
|
const exports = {
|
|
12
12
|
".": {
|
|
13
13
|
"development-local": "./index.js",
|
|
@@ -65,7 +65,7 @@ const bugs = {
|
|
|
65
65
|
};
|
|
66
66
|
const homepage = "https://github.com/utahdts/utah-design-system";
|
|
67
67
|
const dependencies = {
|
|
68
|
-
"@utahdts/utah-design-system-header": "0.9.
|
|
68
|
+
"@utahdts/utah-design-system-header": "0.9.5",
|
|
69
69
|
lodash: "4.17.21",
|
|
70
70
|
"prop-types": "15.8.1",
|
|
71
71
|
react: "18.x",
|
|
@@ -79,17 +79,9 @@ const devDependencies = {
|
|
|
79
79
|
"@types/react-dom": "18.2.4",
|
|
80
80
|
"@vitejs/plugin-react": "4.0.0",
|
|
81
81
|
"@vitest/coverage-istanbul": "0.31.2",
|
|
82
|
-
eslint: "8.41.0",
|
|
83
|
-
"eslint-config-airbnb": "19.0.4",
|
|
84
|
-
"eslint-plugin-import": "2.27.5",
|
|
85
|
-
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
86
|
-
"eslint-plugin-react": "7.32.2",
|
|
87
|
-
"eslint-plugin-react-hooks": "4.6.0",
|
|
88
|
-
"eslint-plugin-react-refresh": "0.4.1",
|
|
89
82
|
jsdom: "22.1.0",
|
|
90
83
|
sass: "1.62.1",
|
|
91
84
|
vite: "4.3.9",
|
|
92
|
-
"vite-plugin-eslint": "1.8.1",
|
|
93
85
|
vitest: "0.31.2"
|
|
94
86
|
};
|
|
95
87
|
const type = "module";
|
|
@@ -2642,6 +2634,7 @@ const propTypes$S = {
|
|
|
2642
2634
|
children: PropTypes.node.isRequired,
|
|
2643
2635
|
className: PropTypes.string,
|
|
2644
2636
|
contentClassName: PropTypes.string,
|
|
2637
|
+
headingLevel: PropTypes.number,
|
|
2645
2638
|
headerClassName: PropTypes.string,
|
|
2646
2639
|
headerContent: PropTypes.node.isRequired,
|
|
2647
2640
|
isOpen: PropTypes.bool,
|
|
@@ -2650,6 +2643,7 @@ const propTypes$S = {
|
|
|
2650
2643
|
const defaultProps$S = {
|
|
2651
2644
|
className: void 0,
|
|
2652
2645
|
contentClassName: void 0,
|
|
2646
|
+
headingLevel: 2,
|
|
2653
2647
|
headerClassName: void 0,
|
|
2654
2648
|
isOpen: void 0,
|
|
2655
2649
|
onToggle: void 0
|
|
@@ -2658,6 +2652,7 @@ function Accordion({
|
|
|
2658
2652
|
children,
|
|
2659
2653
|
className,
|
|
2660
2654
|
contentClassName,
|
|
2655
|
+
headingLevel,
|
|
2661
2656
|
headerClassName,
|
|
2662
2657
|
headerContent,
|
|
2663
2658
|
isOpen,
|
|
@@ -2674,16 +2669,17 @@ function Accordion({
|
|
|
2674
2669
|
setStateIsOpen(!stateIsOpen);
|
|
2675
2670
|
}
|
|
2676
2671
|
}
|
|
2672
|
+
const HeadingTag = `h${headingLevel}`;
|
|
2677
2673
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: joinClassNames(["accordion", className]), children: [
|
|
2678
2674
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2679
2675
|
"button",
|
|
2680
2676
|
{
|
|
2681
|
-
className: joinClassNames(["accordion__header", headerClassName]),
|
|
2677
|
+
className: joinClassNames(["accordion__header", headerClassName, stateIsOpen ? "accordion__header--open" : ""]),
|
|
2682
2678
|
type: "button",
|
|
2683
2679
|
onClick: handleEvent(toggleAccordion),
|
|
2684
2680
|
children: [
|
|
2685
|
-
headerContent,
|
|
2686
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `
|
|
2681
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(HeadingTag, { children: headerContent }),
|
|
2682
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `utds-icon-before-circle-chevron-up icon-button__icon ${stateIsOpen ? "" : "icon-button__icon--rotate180"}` })
|
|
2687
2683
|
]
|
|
2688
2684
|
}
|
|
2689
2685
|
),
|
|
@@ -36364,16 +36360,20 @@ const TableBodyDataRowContext = React__default.createContext({});
|
|
|
36364
36360
|
const TableContext = createContext({
|
|
36365
36361
|
allData: [],
|
|
36366
36362
|
filteredData: [],
|
|
36363
|
+
// eslint-disable-next-line no-console
|
|
36367
36364
|
registerSortingRule: (sortingRule) => {
|
|
36368
36365
|
console.error("Context not yet initialized: registerSortingRule", sortingRule);
|
|
36369
36366
|
},
|
|
36370
36367
|
// unregister a rule for sorting, generally when a <TableSortingRule> unmounts
|
|
36368
|
+
// eslint-disable-next-line no-console
|
|
36371
36369
|
unregisterSortingRule: (recordFieldPath) => {
|
|
36372
36370
|
console.error("Context not yet initialized: unregisterSortingRule", recordFieldPath);
|
|
36373
36371
|
},
|
|
36372
|
+
// eslint-disable-next-line no-console
|
|
36374
36373
|
setBodyDataForComponentGuid: (guid, allData, filteredData) => {
|
|
36375
36374
|
console.error("Context not yet initialized: setBodyDataForComponentGuid", guid, allData, filteredData);
|
|
36376
36375
|
},
|
|
36376
|
+
// eslint-disable-next-line no-console
|
|
36377
36377
|
setState: (arg) => {
|
|
36378
36378
|
console.error("Context not yet initialized: setState", arg);
|
|
36379
36379
|
},
|
|
@@ -36502,7 +36502,6 @@ function TableCell({
|
|
|
36502
36502
|
ref: innerRef,
|
|
36503
36503
|
onClick,
|
|
36504
36504
|
onDoubleClick,
|
|
36505
|
-
onKeyPress: () => console.log("what should keypress on td do?"),
|
|
36506
36505
|
role: "gridcell",
|
|
36507
36506
|
...rest,
|
|
36508
36507
|
children
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
const name = "@utahdts/utah-design-system";
|
|
24
24
|
const description = "Utah Design System React Library";
|
|
25
25
|
const displayName = "Utah Design System React Library";
|
|
26
|
-
const version$1 = "0.9.
|
|
26
|
+
const version$1 = "0.9.5";
|
|
27
27
|
const exports$1 = {
|
|
28
28
|
".": {
|
|
29
29
|
"development-local": "./index.js",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
};
|
|
82
82
|
const homepage = "https://github.com/utahdts/utah-design-system";
|
|
83
83
|
const dependencies = {
|
|
84
|
-
"@utahdts/utah-design-system-header": "0.9.
|
|
84
|
+
"@utahdts/utah-design-system-header": "0.9.5",
|
|
85
85
|
lodash: "4.17.21",
|
|
86
86
|
"prop-types": "15.8.1",
|
|
87
87
|
react: "18.x",
|
|
@@ -95,17 +95,9 @@
|
|
|
95
95
|
"@types/react-dom": "18.2.4",
|
|
96
96
|
"@vitejs/plugin-react": "4.0.0",
|
|
97
97
|
"@vitest/coverage-istanbul": "0.31.2",
|
|
98
|
-
eslint: "8.41.0",
|
|
99
|
-
"eslint-config-airbnb": "19.0.4",
|
|
100
|
-
"eslint-plugin-import": "2.27.5",
|
|
101
|
-
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
102
|
-
"eslint-plugin-react": "7.32.2",
|
|
103
|
-
"eslint-plugin-react-hooks": "4.6.0",
|
|
104
|
-
"eslint-plugin-react-refresh": "0.4.1",
|
|
105
98
|
jsdom: "22.1.0",
|
|
106
99
|
sass: "1.62.1",
|
|
107
100
|
vite: "4.3.9",
|
|
108
|
-
"vite-plugin-eslint": "1.8.1",
|
|
109
101
|
vitest: "0.31.2"
|
|
110
102
|
};
|
|
111
103
|
const type = "module";
|
|
@@ -2658,6 +2650,7 @@
|
|
|
2658
2650
|
children: PropTypes.node.isRequired,
|
|
2659
2651
|
className: PropTypes.string,
|
|
2660
2652
|
contentClassName: PropTypes.string,
|
|
2653
|
+
headingLevel: PropTypes.number,
|
|
2661
2654
|
headerClassName: PropTypes.string,
|
|
2662
2655
|
headerContent: PropTypes.node.isRequired,
|
|
2663
2656
|
isOpen: PropTypes.bool,
|
|
@@ -2666,6 +2659,7 @@
|
|
|
2666
2659
|
const defaultProps$S = {
|
|
2667
2660
|
className: void 0,
|
|
2668
2661
|
contentClassName: void 0,
|
|
2662
|
+
headingLevel: 2,
|
|
2669
2663
|
headerClassName: void 0,
|
|
2670
2664
|
isOpen: void 0,
|
|
2671
2665
|
onToggle: void 0
|
|
@@ -2674,6 +2668,7 @@
|
|
|
2674
2668
|
children,
|
|
2675
2669
|
className,
|
|
2676
2670
|
contentClassName,
|
|
2671
|
+
headingLevel,
|
|
2677
2672
|
headerClassName,
|
|
2678
2673
|
headerContent,
|
|
2679
2674
|
isOpen,
|
|
@@ -2690,16 +2685,17 @@
|
|
|
2690
2685
|
setStateIsOpen(!stateIsOpen);
|
|
2691
2686
|
}
|
|
2692
2687
|
}
|
|
2688
|
+
const HeadingTag = `h${headingLevel}`;
|
|
2693
2689
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: joinClassNames(["accordion", className]), children: [
|
|
2694
2690
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2695
2691
|
"button",
|
|
2696
2692
|
{
|
|
2697
|
-
className: joinClassNames(["accordion__header", headerClassName]),
|
|
2693
|
+
className: joinClassNames(["accordion__header", headerClassName, stateIsOpen ? "accordion__header--open" : ""]),
|
|
2698
2694
|
type: "button",
|
|
2699
2695
|
onClick: handleEvent(toggleAccordion),
|
|
2700
2696
|
children: [
|
|
2701
|
-
headerContent,
|
|
2702
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `
|
|
2697
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(HeadingTag, { children: headerContent }),
|
|
2698
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `utds-icon-before-circle-chevron-up icon-button__icon ${stateIsOpen ? "" : "icon-button__icon--rotate180"}` })
|
|
2703
2699
|
]
|
|
2704
2700
|
}
|
|
2705
2701
|
),
|
|
@@ -36380,16 +36376,20 @@
|
|
|
36380
36376
|
const TableContext = React.createContext({
|
|
36381
36377
|
allData: [],
|
|
36382
36378
|
filteredData: [],
|
|
36379
|
+
// eslint-disable-next-line no-console
|
|
36383
36380
|
registerSortingRule: (sortingRule) => {
|
|
36384
36381
|
console.error("Context not yet initialized: registerSortingRule", sortingRule);
|
|
36385
36382
|
},
|
|
36386
36383
|
// unregister a rule for sorting, generally when a <TableSortingRule> unmounts
|
|
36384
|
+
// eslint-disable-next-line no-console
|
|
36387
36385
|
unregisterSortingRule: (recordFieldPath) => {
|
|
36388
36386
|
console.error("Context not yet initialized: unregisterSortingRule", recordFieldPath);
|
|
36389
36387
|
},
|
|
36388
|
+
// eslint-disable-next-line no-console
|
|
36390
36389
|
setBodyDataForComponentGuid: (guid, allData, filteredData) => {
|
|
36391
36390
|
console.error("Context not yet initialized: setBodyDataForComponentGuid", guid, allData, filteredData);
|
|
36392
36391
|
},
|
|
36392
|
+
// eslint-disable-next-line no-console
|
|
36393
36393
|
setState: (arg) => {
|
|
36394
36394
|
console.error("Context not yet initialized: setState", arg);
|
|
36395
36395
|
},
|
|
@@ -36518,7 +36518,6 @@
|
|
|
36518
36518
|
ref: innerRef,
|
|
36519
36519
|
onClick,
|
|
36520
36520
|
onDoubleClick,
|
|
36521
|
-
onKeyPress: () => console.log("what should keypress on td do?"),
|
|
36522
36521
|
role: "gridcell",
|
|
36523
36522
|
...rest,
|
|
36524
36523
|
children
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@utahdts/utah-design-system",
|
|
3
3
|
"description": "Utah Design System React Library",
|
|
4
4
|
"displayName": "Utah Design System React Library",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.5",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"development-local": "./index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"homepage": "https://github.com/utahdts/utah-design-system",
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@utahdts/utah-design-system-header": "0.9.
|
|
63
|
+
"@utahdts/utah-design-system-header": "0.9.5",
|
|
64
64
|
"lodash": "4.17.21",
|
|
65
65
|
"prop-types": "15.8.1",
|
|
66
66
|
"react": "18.x",
|
|
@@ -74,17 +74,9 @@
|
|
|
74
74
|
"@types/react-dom": "18.2.4",
|
|
75
75
|
"@vitejs/plugin-react": "4.0.0",
|
|
76
76
|
"@vitest/coverage-istanbul": "0.31.2",
|
|
77
|
-
"eslint": "8.41.0",
|
|
78
|
-
"eslint-config-airbnb": "19.0.4",
|
|
79
|
-
"eslint-plugin-import": "2.27.5",
|
|
80
|
-
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
81
|
-
"eslint-plugin-react": "7.32.2",
|
|
82
|
-
"eslint-plugin-react-hooks": "4.6.0",
|
|
83
|
-
"eslint-plugin-react-refresh": "0.4.1",
|
|
84
77
|
"jsdom": "22.1.0",
|
|
85
78
|
"sass": "1.62.1",
|
|
86
79
|
"vite": "4.3.9",
|
|
87
|
-
"vite-plugin-eslint": "1.8.1",
|
|
88
80
|
"vitest": "0.31.2"
|
|
89
81
|
},
|
|
90
82
|
"type": "module"
|
|
@@ -7,6 +7,7 @@ const propTypes = {
|
|
|
7
7
|
children: PropTypes.node.isRequired,
|
|
8
8
|
className: PropTypes.string,
|
|
9
9
|
contentClassName: PropTypes.string,
|
|
10
|
+
headingLevel: PropTypes.number,
|
|
10
11
|
headerClassName: PropTypes.string,
|
|
11
12
|
headerContent: PropTypes.node.isRequired,
|
|
12
13
|
isOpen: PropTypes.bool,
|
|
@@ -15,6 +16,7 @@ const propTypes = {
|
|
|
15
16
|
const defaultProps = {
|
|
16
17
|
className: undefined,
|
|
17
18
|
contentClassName: undefined,
|
|
19
|
+
headingLevel: 2,
|
|
18
20
|
headerClassName: undefined,
|
|
19
21
|
isOpen: undefined,
|
|
20
22
|
onToggle: undefined,
|
|
@@ -24,6 +26,7 @@ function Accordion({
|
|
|
24
26
|
children,
|
|
25
27
|
className,
|
|
26
28
|
contentClassName,
|
|
29
|
+
headingLevel,
|
|
27
30
|
headerClassName,
|
|
28
31
|
headerContent,
|
|
29
32
|
isOpen,
|
|
@@ -42,15 +45,17 @@ function Accordion({
|
|
|
42
45
|
setStateIsOpen(!stateIsOpen);
|
|
43
46
|
}
|
|
44
47
|
}
|
|
48
|
+
const HeadingTag = `h${headingLevel}`;
|
|
49
|
+
|
|
45
50
|
return (
|
|
46
51
|
<div className={joinClassNames(['accordion', className])}>
|
|
47
52
|
<button
|
|
48
|
-
className={joinClassNames(['accordion__header', headerClassName])}
|
|
53
|
+
className={joinClassNames(['accordion__header', headerClassName, stateIsOpen ? 'accordion__header--open' : ''])}
|
|
49
54
|
type="button"
|
|
50
55
|
onClick={handleEvent(toggleAccordion)}
|
|
51
56
|
>
|
|
52
|
-
{headerContent}
|
|
53
|
-
<span className={`
|
|
57
|
+
<HeadingTag>{headerContent}</HeadingTag>
|
|
58
|
+
<span className={`utds-icon-before-circle-chevron-up icon-button__icon ${stateIsOpen ? '' : 'icon-button__icon--rotate180'}`} />
|
|
54
59
|
</button>
|
|
55
60
|
|
|
56
61
|
<div className={joinClassNames(['accordion__content', contentClassName, stateIsOpen ? 'accordion__content--open' : ''])}>
|
|
@@ -3,10 +3,14 @@ import { createContext } from 'react';
|
|
|
3
3
|
const TableContext = createContext({
|
|
4
4
|
allData: [],
|
|
5
5
|
filteredData: [],
|
|
6
|
+
// eslint-disable-next-line no-console
|
|
6
7
|
registerSortingRule: (sortingRule) => { console.error('Context not yet initialized: registerSortingRule', sortingRule); },
|
|
7
8
|
// unregister a rule for sorting, generally when a <TableSortingRule> unmounts
|
|
9
|
+
// eslint-disable-next-line no-console
|
|
8
10
|
unregisterSortingRule: (recordFieldPath) => { console.error('Context not yet initialized: unregisterSortingRule', recordFieldPath); },
|
|
11
|
+
// eslint-disable-next-line no-console
|
|
9
12
|
setBodyDataForComponentGuid: (guid, allData, filteredData) => { console.error('Context not yet initialized: setBodyDataForComponentGuid', guid, allData, filteredData); },
|
|
13
|
+
// eslint-disable-next-line no-console
|
|
10
14
|
setState: (arg) => { console.error('Context not yet initialized: setState', arg); },
|
|
11
15
|
state: {},
|
|
12
16
|
});
|