@digigov/css 1.3.0-dcbd7ded → 2.0.0-0138f8bd

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 (154) hide show
  1. package/dist/base/index.css +1 -1
  2. package/dist/base.js +1 -1
  3. package/dist/components.js +1 -1
  4. package/dist/digigov.css +3 -3
  5. package/dist/utilities/index.css +1 -1
  6. package/dist/utilities.js +1 -1
  7. package/index.js +99 -69
  8. package/package.json +17 -13
  9. package/postcss.config.js +4 -3
  10. package/src/base/base.css +1 -1
  11. package/src/base/index.css +6 -5
  12. package/src/base/index.native.css +0 -0
  13. package/src/base/postcss.config.js +11 -10
  14. package/src/base/tailwind.config.js +4 -11
  15. package/src/components/accordion.common.css +29 -0
  16. package/src/components/accordion.css +86 -61
  17. package/src/components/accordion.native.css +27 -0
  18. package/src/components/admin-header.css +2 -19
  19. package/src/components/admin-layout.css +13 -22
  20. package/src/components/autocomplete.css +93 -48
  21. package/src/components/back-to-top.css +3 -4
  22. package/src/components/blockquote.common.css +14 -0
  23. package/src/components/blockquote.css +9 -0
  24. package/src/components/blockquote.native.css +14 -0
  25. package/src/components/bottom-info.css +2 -1
  26. package/src/components/breadcrumbs.css +17 -8
  27. package/src/components/button.common.css +62 -0
  28. package/src/components/button.css +57 -71
  29. package/src/components/button.native.css +55 -0
  30. package/src/components/card.common.css +33 -0
  31. package/src/components/card.css +65 -52
  32. package/src/components/card.native.css +29 -0
  33. package/src/components/checkboxes.common.css +16 -0
  34. package/src/components/checkboxes.css +26 -31
  35. package/src/components/checkboxes.native.css +27 -0
  36. package/src/components/chip.common.css +19 -0
  37. package/src/components/chip.css +32 -32
  38. package/src/components/chip.native.css +15 -0
  39. package/src/components/code.css +128 -0
  40. package/src/components/components.css +2 -2
  41. package/src/components/copy-to-clipboard.css +27 -26
  42. package/src/components/copy-to-clipboard.native.css +26 -0
  43. package/src/components/details.common.css +26 -0
  44. package/src/components/details.css +18 -15
  45. package/src/components/details.native.css +34 -0
  46. package/src/components/dev-theme.css +2 -3
  47. package/src/components/drawer.css +63 -47
  48. package/src/components/dropdown.common.css +23 -0
  49. package/src/components/dropdown.css +57 -48
  50. package/src/components/dropdown.native.css +27 -0
  51. package/src/components/experimental.css +12 -12
  52. package/src/components/fillable.css +4 -4
  53. package/src/components/filter.css +76 -32
  54. package/src/components/footer.css +36 -21
  55. package/src/components/form.common.css +81 -0
  56. package/src/components/form.css +94 -52
  57. package/src/components/form.native.css +182 -0
  58. package/src/components/full-page-background.css +1 -1
  59. package/src/components/header.common.css +35 -0
  60. package/src/components/header.css +43 -46
  61. package/src/components/header.native.css +29 -0
  62. package/src/components/hidden.css +17 -17
  63. package/src/components/index.css +49 -47
  64. package/src/components/kitchensink.css +33 -33
  65. package/src/components/layout.common.css +36 -0
  66. package/src/components/layout.css +40 -41
  67. package/src/components/layout.native.css +40 -0
  68. package/src/components/loader.common.css +7 -0
  69. package/src/components/loader.css +31 -29
  70. package/src/components/loader.native.css +5 -0
  71. package/src/components/masthead.css +56 -55
  72. package/src/components/misc.css +38 -16
  73. package/src/components/modal.common.css +16 -0
  74. package/src/components/modal.css +33 -22
  75. package/src/components/modal.native.css +18 -0
  76. package/src/components/nav.common.css +22 -0
  77. package/src/components/nav.css +72 -67
  78. package/src/components/nav.native.css +39 -0
  79. package/src/components/notification-banner.common.css +46 -0
  80. package/src/components/notification-banner.css +41 -19
  81. package/src/components/notification-banner.native.css +42 -0
  82. package/src/components/pagination.css +44 -29
  83. package/src/components/panel.common.css +30 -0
  84. package/src/components/panel.css +10 -18
  85. package/src/components/panel.native.css +26 -0
  86. package/src/components/phase-banner.common.css +23 -0
  87. package/src/components/phase-banner.css +11 -10
  88. package/src/components/phase-banner.native.css +30 -0
  89. package/src/components/postcss.config.js +7 -6
  90. package/src/components/radios.common.css +16 -0
  91. package/src/components/radios.css +27 -30
  92. package/src/components/radios.native.css +23 -0
  93. package/src/components/skeleton.common.css +20 -0
  94. package/src/components/skeleton.css +82 -0
  95. package/src/components/skeleton.native.css +53 -0
  96. package/src/components/skiplink.css +2 -2
  97. package/src/components/stack.common.css +67 -0
  98. package/src/components/stack.css +66 -64
  99. package/src/components/stack.native.css +68 -0
  100. package/src/components/stepnav.css +33 -29
  101. package/src/components/summary-list.common.css +102 -0
  102. package/src/components/summary-list.css +114 -31
  103. package/src/components/summary-list.native.css +97 -0
  104. package/src/components/svg-icons.common.css +56 -0
  105. package/src/components/svg-icons.css +78 -74
  106. package/src/components/svg-icons.native.css +54 -0
  107. package/src/components/table.css +198 -178
  108. package/src/components/tabs.css +51 -67
  109. package/src/components/task-list.css +18 -18
  110. package/src/components/test.css +7 -0
  111. package/src/components/timeline.css +4 -3
  112. package/src/components/typography.common.css +135 -0
  113. package/src/components/typography.css +109 -179
  114. package/src/components/typography.native.css +128 -0
  115. package/src/components/warning-text.common.css +23 -0
  116. package/src/components/warning-text.css +15 -13
  117. package/src/components/warning-text.native.css +22 -0
  118. package/src/index.native.css +26 -0
  119. package/src/pages/index.js +1 -1
  120. package/src/utilities/gap.css +141 -0
  121. package/src/utilities/index.css +6 -585
  122. package/src/utilities/index.native.css +6 -0
  123. package/src/utilities/layout.css +231 -0
  124. package/src/utilities/layout.native.css +278 -0
  125. package/src/utilities/margin.css +4299 -0
  126. package/src/utilities/padding.css +4299 -0
  127. package/src/utilities/postcss.config.js +7 -6
  128. package/src/utilities/print.css +11 -0
  129. package/src/utilities/utilities.css +3 -1252
  130. package/tailwind.config.js +102 -104
  131. package/theming.js +121 -0
  132. package/defaultTheme/accordion.json +0 -8
  133. package/defaultTheme/back-to-top.json +0 -27
  134. package/defaultTheme/brandConfig.json +0 -135
  135. package/defaultTheme/breadcrumbs.json +0 -8
  136. package/defaultTheme/button.json +0 -81
  137. package/defaultTheme/card.json +0 -12
  138. package/defaultTheme/footer.json +0 -8
  139. package/defaultTheme/form.json +0 -15
  140. package/defaultTheme/globals.json +0 -71
  141. package/defaultTheme/index.js +0 -27
  142. package/defaultTheme/misc.json +0 -48
  143. package/defaultTheme/panel.json +0 -43
  144. package/defaultTheme/phase-banner.json +0 -8
  145. package/defaultTheme/radios.json +0 -8
  146. package/defaultTheme/summary-list.json +0 -8
  147. package/defaultTheme/typography.json +0 -295
  148. package/src/pages/admin-filtering-data.js +0 -160
  149. package/src/pages/admin.js +0 -61
  150. package/src/pages/dropdown.js +0 -249
  151. package/src/pages/form.js +0 -400
  152. package/src/pages/pagination.js +0 -124
  153. package/src/pages/table.js +0 -308
  154. package/themes.plugin.js +0 -148
@@ -1,81 +1,65 @@
1
1
  .ds-tabs {
2
2
  scroll-behavior: smooth;
3
- .ds-tabs__title {
4
- @apply block md:hidden lg:hidden;
5
- }
6
- .ds-tabs__list {
7
- @apply list-none m-0 p-0;
8
- &:after {
9
- content: "";
10
- display: block;
11
- clear: both;
12
- }
13
- .ds-tabs__list-item {
14
- @apply relative px-4 py-2 m-0 shadow-none cursor-pointer;
15
- @apply md:float-left md:border md:border-base-300 md:bg-base-300 md:rounded-t-sm md:mr-2;
16
- @apply print:hidden;
17
- &.ds-tabs__list-item-selected {
18
- @apply no-underline md:border-base-400 md:border bg-base-100 md:border-b-0 md:px-5 md:py-4 md:-mt-1;
19
- margin-bottom: -1px;
20
- &:hover {
21
- text-decoration-thickness: 2px;
22
- }
23
- }
24
- }
25
- .ds-tabs__tab {
26
- @apply text-lg no-underline hover:underline focus:underline;
27
- text-underline-offset: 0.1em;
28
- &:after {
29
- content: "";
30
- @apply absolute top-0 right-0 bottom-0 left-0;
31
- }
32
- &:focus {
33
- background-color: var(--color-focus);
34
- outline: 3px solid transparent;
35
- -webkit-box-shadow: inset 0 0 0 3px var(--color-focus);
36
- box-shadow: inset 0 0 0 3px var(--color-focus);
37
- outline-offset: 0px;
38
- text-decoration-thickness: 0.2rem;
39
- }
40
- }
41
- }
42
- .ds-tabs__panel {
43
- @apply bg-base-100 md:hidden block md:px-4 py-4 pt-8 md:border md:border-base-400 mb-0
44
- print:block print:border-0 print:py-3;
45
- &.ds-tabs__panel--visible {
46
- @apply block;
47
- }
48
- }
49
- &.ds-tabs--dense, .ds-dense & {
3
+ &.ds-tabs--dense,
4
+ .ds-dense & {
50
5
  .ds-tabs__list {
51
- .ds-tabs__list-item {
52
- @apply px-3 py-1;
6
+ .ds-tabs__list-item {
7
+ @apply md:px-3 md:py-1;
53
8
  &.ds-tabs__list-item-selected {
54
- @apply md:px-4 md:pb-3 md:pt-2;
55
- }
9
+ @apply md:px-4 md:pb-3 md:pt-2;
56
10
  }
11
+ }
57
12
  }
58
13
  .ds-tabs__panel {
59
- @apply pb-2 pt-3;
14
+ @apply pb-2 pt-3;
60
15
  }
61
16
  }
62
17
  }
63
-
64
- .ds-tabs--vertical {
65
- .ds-tabs__panel {
66
- @apply min-h-full pt-4 pl-6;
18
+ .ds-tabs__title {
19
+ @apply block md:hidden;
20
+ }
21
+ .ds-tabs__list {
22
+ @apply list-none m-0 p-0
23
+ md:flex md:flex-nowrap md:w-full md:items-start;
24
+ &::after {
25
+ content: '';
26
+ display: block;
27
+ clear: both;
67
28
  }
68
- .ds-tabs__list {
69
- .ds-tabs__list-item {
70
- @apply w-full rounded-none mb-1 md:bg-base-200 border-base-200;
71
- width: calc(100% - 0.25rem);
72
- &.ds-tabs__list-item-selected {
73
- @apply md:border-b md:border-r-0 mb-1 mt-0 px-4 py-2;
74
- /* margin-right: -1px; */
75
- width: calc(100% + 1px);
76
- /* margin-top: 0px; */
77
- }
29
+ }
30
+ .ds-tabs__list-item {
31
+ @apply relative px-4 py-1 md:py-2 m-0 shadow-none cursor-pointer text-link
32
+ md:float-left md:border md:border-base-300 md:bg-base-300 md:rounded-t-sm md:mr-2 md:text-base-content
33
+ print:hidden;
34
+ word-break: break-word;
35
+ &.ds-tabs__list-item-selected {
36
+ @apply no-underline md:border-base-400 md:border bg-base-100 md:border-b-0 md:px-5 md:py-4 md:-mt-1;
37
+ margin-bottom: -1px;
38
+ &:hover {
39
+ text-decoration-thickness: 2px;
78
40
  }
79
41
  }
80
-
42
+ }
43
+ .ds-tabs__tab {
44
+ @apply text-lg no-underline hover:underline;
45
+ &::before {
46
+ @apply absolute top-0 left-0 text-base-content;
47
+ @apply md:content-[''] !important;
48
+ content: '_';
49
+ }
50
+ &:focus {
51
+ @apply bg-focus underline text-link-active;
52
+ outline: 3px solid transparent;
53
+ box-shadow: inset 0 0 0 3px var(--color-focus);
54
+ outline-offset: 0;
55
+ text-decoration-thickness: 0.2rem;
56
+ }
57
+ }
58
+ .ds-tabs__panel {
59
+ @apply bg-base-100 md:hidden block md:px-4 py-4 pt-8 md:border md:border-base-400 mb-0
60
+ print:block print:border-0 print:py-3;
61
+ border-radius: var(--tabs__panel-border-radius);
62
+ &.ds-tabs__panel--visible {
63
+ @apply block;
64
+ }
81
65
  }
@@ -6,36 +6,36 @@
6
6
  }
7
7
  .ds-task-list__heading {
8
8
  @apply md:text-3xl text-2xl font-bold mx-0 md:mb-4 mb-2;
9
- }
10
- .ds-task-list__heading--md {
11
- @apply md:text-2xl text-xl md:mb-4 mb-2;
12
- }
13
- .ds-task-list__heading--sm {
14
- @apply md:text-lg text-base md:mb-3 mb-1;
9
+ &.ds-task-list__heading--md {
10
+ @apply md:text-2xl text-xl md:mb-4 mb-2;
11
+ }
12
+ &.ds-task-list__heading--sm {
13
+ @apply md:text-lg text-base md:mb-3 mb-1;
14
+ }
15
15
  }
16
16
  .ds-task-list__content {
17
17
  @apply mb-4;
18
18
  }
19
19
  .ds-task-list__content__tag {
20
20
  @apply px-2 py-1 mr-2 inline-block font-sans text-sm uppercase tracking-widest print:border-2 print:bg-white print:mr-4;
21
- }
22
- .ds-task-list__content__tag--info {
23
- @apply bg-info text-white print:border-info-hover print:text-info-hover;
24
- }
25
- .ds-task-list__content__tag--primary {
26
- @apply bg-secondary text-base-content print:border-info print:text-info;
27
- }
28
- .ds-task-list__content__tag--secondary {
29
- @apply bg-base-300 print:border-base-800 print:text-base-800;
21
+ &.ds-task-list__content__tag--info {
22
+ @apply bg-info text-white print:border-info-hover print:text-info-hover;
23
+ }
24
+ &.ds-task-list__content__tag--primary {
25
+ @apply bg-secondary text-base-content print:border-info print:text-info;
26
+ }
27
+ &.ds-task-list__content__tag--secondary {
28
+ @apply bg-base-300 print:border-base-800 print:text-base-800;
29
+ }
30
30
  }
31
31
 
32
32
  /* overrides */
33
33
 
34
- .ds-task-list--dense{
34
+ .ds-task-list--dense {
35
35
  .ds-task-list__item {
36
36
  @apply mb-4 md:mb-6;
37
- .ds-summary-list{
38
- @apply mb-4 md:mb-6;
37
+ .ds-summary-list {
38
+ @apply mb-4 md:mb-6;
39
39
  }
40
40
  }
41
41
  }
@@ -0,0 +1,7 @@
1
+ .ds-underline {
2
+ text-decoration-line: underline;
3
+ }
4
+
5
+ .ds-button:focus {
6
+ @apply ds-underline;
7
+ }
@@ -1,6 +1,7 @@
1
1
  .ds-timeline {
2
2
  @apply mb-4 pl-6 pb-2 border-l-4 border-secondary;
3
- &.ds-timeline--dense, .ds-dense & {
3
+ &.ds-timeline--dense,
4
+ .ds-dense & {
4
5
  @apply pb-0 border-l-3;
5
6
  .ds-timeline__item {
6
7
  @apply mb-4 md:mb-6;
@@ -8,8 +9,8 @@
8
9
  .ds-timeline__heading {
9
10
  @apply mb-2;
10
11
  &::before {
11
- content: "";
12
12
  @apply border-b-3;
13
+ content: '';
13
14
  }
14
15
  }
15
16
  }
@@ -21,9 +22,9 @@
21
22
  .ds-timeline__heading {
22
23
  @apply md:text-3xl text-2xl font-bold mx-0 md:mb-4 mb-2 relative;
23
24
  &::before {
24
- content: "";
25
25
  @apply block absolute top-4 -left-6 w-4
26
26
  border-b-4 border-secondary;
27
+ content: '';
27
28
  }
28
29
  }
29
30
  .ds-timeline__heading-md {
@@ -0,0 +1,135 @@
1
+ /* stylelint-disable digigov/enforce-class-selector-namespace */
2
+ @tailwind utilities;
3
+
4
+ @layer utilities {
5
+ .util-font-weight-bold-text {
6
+ @apply font-bold !important;
7
+ }
8
+
9
+ .util-heading-xl {
10
+ @apply mx-0 max-w-2xl;
11
+ }
12
+ .util-heading-xl-text {
13
+ font-size: var(--heading-xl-font-size);
14
+ line-height: var(--heading-xl-line-height);
15
+ font-weight: var(--heading-xl-font-weight);
16
+ }
17
+ .util-heading-lg-text {
18
+ font-size: var(--heading-lg-font-size);
19
+ line-height: var(--heading-lg-line-height);
20
+ font-weight: var(--heading-lg-font-weight);
21
+ }
22
+ .util-heading-md-text {
23
+ font-size: var(--heading-md-font-size);
24
+ line-height: var(--heading-md-line-height);
25
+ font-weight: var(--heading-md-font-weight);
26
+ }
27
+ .util-heading-sm-text {
28
+ font-size: var(--heading-sm-font-size);
29
+ line-height: var(--heading-sm-line-height);
30
+ font-weight: var(--heading-sm-font-weight);
31
+ }
32
+ .util-heading-xs-text {
33
+ font-size: var(--heading-xs-font-size);
34
+ line-height: var(--heading-xs-line-height);
35
+ font-weight: var(--heading-xs-font-weight);
36
+ }
37
+
38
+ .util-body-text {
39
+ font-size: var(--body-font-size);
40
+ line-height: var(--body-line-height);
41
+ margin-bottom: var(--body-margin-bottom);
42
+ color: var(--body-color);
43
+ }
44
+ .util-body-lg-text {
45
+ font-size: var(--body--lg-font-size);
46
+ line-height: var(--body--lg-line-height);
47
+ }
48
+ .util-body-sm-text {
49
+ font-size: var(--body--sm-font-size);
50
+ line-height: var(--body--sm-line-height);
51
+ }
52
+ .util-link {
53
+ @apply focus:bg-focus;
54
+ padding: var(--link-padding-y) var(--link-padding-x);
55
+ }
56
+ .util-link-text {
57
+ /* @apply focus:text-link-active underline; */
58
+ @apply underline;
59
+ color: var(--link-color);
60
+ font-size: var(--link-font-size);
61
+ line-height: var(--link-line-height);
62
+ }
63
+
64
+ .util-caption-xl {
65
+ @apply mx-0 font-normal;
66
+ }
67
+ .util-caption-xl-text {
68
+ color: var(--caption-xl-color);
69
+ font-size: var(--caption-xl-font-size);
70
+ margin-bottom: var(--caption-xl-margin-bottom);
71
+ font-weight: var(--caption-xl-font-weight);
72
+ line-height: var(--caption-xl-line-height);
73
+ }
74
+ .util-caption-lg {
75
+ @apply mx-0 font-normal;
76
+ }
77
+ .util-caption-lg-text {
78
+ color: var(--caption-lg-color);
79
+ font-size: var(--caption-lg-font-size);
80
+ margin-bottom: var(--caption-lg-margin-bottom);
81
+ font-weight: var(--caption-lg-font-weight);
82
+ line-height: var(--caption-lg-line-height);
83
+ }
84
+ .util-caption-md {
85
+ @apply mx-0 font-normal;
86
+ }
87
+ .util-caption-md-text {
88
+ color: var(--caption-md-color);
89
+ font-size: var(--caption-md-font-size);
90
+ margin-bottom: var(--caption-md-margin-bottom);
91
+ font-weight: var(--caption-md-font-weight);
92
+ line-height: var(--caption-md-line-height);
93
+ }
94
+
95
+ /* Hint */
96
+ .util-hint {
97
+ margin-bottom: var(--hint-margin-bottom);
98
+ }
99
+ .util-hint-text {
100
+ font-size: var(--hint-font-size);
101
+ line-height: var(--hint-line-height);
102
+ color: var(--hint-color);
103
+ }
104
+ .util-hint-lg-text {
105
+ font-size: var(--hint--lg-font-size);
106
+ line-height: var(--hint--lg-line-height);
107
+ }
108
+ .util-hint-sm-text {
109
+ font-size: var(--hint--sm-font-size);
110
+ line-height: var(--hint--sm-line-height);
111
+ }
112
+
113
+ /* List */
114
+ .util-list {
115
+ @apply md:mb-8 mb-4 mt-4 text-base-content;
116
+ }
117
+ .util-list-bullet {
118
+ @apply pl-4;
119
+ }
120
+ .util-list-number {
121
+ @apply pl-4;
122
+ }
123
+ .util-list-horizontal {
124
+ @apply flex flex-wrap gap-x-6 gap-y-3;
125
+ }
126
+ .util-list-spaced {
127
+ @apply gap-x-10 gap-y-5;
128
+ }
129
+ .util-list-item {
130
+ @apply mb-2 last:mb-0;
131
+ }
132
+ .util-list-item-horizontal {
133
+ @apply w-full;
134
+ }
135
+ }