@papillonbits/components 0.17.0 → 0.19.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.
Files changed (29) hide show
  1. package/build/primer/Button/ButtonGroup.scss +96 -0
  2. package/build/primer/Button/misc.scss +65 -38
  3. package/build/primer/Form/FormControl.scss +669 -0
  4. package/build/primer/Form/index.scss +2 -0
  5. package/build/primer/Icon/Icon.js +5 -1
  6. package/build/primer/Icon/Icon.part.js +1042 -1014
  7. package/build/primer/Icon/Icon.prop.js +10 -0
  8. package/build/primer/Layout/index.scss +9 -0
  9. package/build/primer/Layout/layout.scss +183 -0
  10. package/build/primer/Layout/mixins.scss +106 -0
  11. package/build/primer/Layout/page-layout.scss +386 -0
  12. package/build/primer/Layout/stack.scss +219 -0
  13. package/build/primer/Navigation/UnderlineNav/UnderlineNav.scss +0 -1
  14. package/build/primer/SVG/icon/accessibility-inset-16.svg +1 -0
  15. package/build/primer/SVG/icon/cache-16.svg +1 -0
  16. package/build/primer/SVG/icon/checkbox-16.svg +1 -0
  17. package/build/primer/SVG/icon/checkbox-24.svg +1 -0
  18. package/build/primer/SVG/icon/command-palette-16.svg +1 -0
  19. package/build/primer/SVG/icon/command-palette-24.svg +1 -0
  20. package/build/primer/SVG/icon/git-merge-queue-16.svg +1 -0
  21. package/build/primer/SVG/icon/paperclip-16.svg +1 -0
  22. package/build/primer/SVG/icon/paperclip-24.svg +1 -0
  23. package/build/primer/SVG/icon/search-24.svg +1 -1
  24. package/build/primer/SVG/icon/shield-slash-16.svg +1 -0
  25. package/build/primer/SVG/icon/table-16.svg +1 -1
  26. package/build/primer/SVG/icon/tasklist-16.svg +1 -1
  27. package/build/primer/SVG/icon/tasklist-24.svg +1 -1
  28. package/build/primer/SelectMenu/SelectMenu.scss +0 -1
  29. package/package.json +4 -4
@@ -9,6 +9,7 @@ var _propTypes = require("prop-types");
9
9
 
10
10
  var iconName = {
11
11
  Accessibility16: 'Accessibility16',
12
+ AccessibilityInset16: 'AccessibilityInset16',
12
13
  Alert16: 'Alert16',
13
14
  Alert24: 'Alert24',
14
15
  AlertFill12: 'AlertFill12',
@@ -59,6 +60,7 @@ var iconName = {
59
60
  Browser24: 'Browser24',
60
61
  Bug16: 'Bug16',
61
62
  Bug24: 'Bug24',
63
+ Cache16: 'Cache16',
62
64
  Calendar16: 'Calendar16',
63
65
  Calendar24: 'Calendar24',
64
66
  Check16: 'Check16',
@@ -68,6 +70,8 @@ var iconName = {
68
70
  CheckCircleFill12: 'CheckCircleFill12',
69
71
  CheckCircleFill16: 'CheckCircleFill16',
70
72
  CheckCircleFill24: 'CheckCircleFill24',
73
+ Checkbox16: 'Checkbox16',
74
+ Checkbox24: 'Checkbox24',
71
75
  Checklist16: 'Checklist16',
72
76
  Checklist24: 'Checklist24',
73
77
  ChevronDown16: 'ChevronDown16',
@@ -104,6 +108,8 @@ var iconName = {
104
108
  Codespaces24: 'Codespaces24',
105
109
  Columns16: 'Columns16',
106
110
  Columns24: 'Columns24',
111
+ CommandPalette16: 'CommandPalette16',
112
+ CommandPalette24: 'CommandPalette24',
107
113
  Comment16: 'Comment16',
108
114
  Comment24: 'Comment24',
109
115
  CommentDiscussion16: 'CommentDiscussion16',
@@ -218,6 +224,7 @@ var iconName = {
218
224
  GitCompare24: 'GitCompare24',
219
225
  GitMerge16: 'GitMerge16',
220
226
  GitMerge24: 'GitMerge24',
227
+ GitMergeQueue16: 'GitMergeQueue16',
221
228
  GitPullRequest16: 'GitPullRequest16',
222
229
  GitPullRequest24: 'GitPullRequest24',
223
230
  GitPullRequestClosed16: 'GitPullRequestClosed16',
@@ -335,6 +342,8 @@ var iconName = {
335
342
  Paintbrush16: 'Paintbrush16',
336
343
  PaperAirplane16: 'PaperAirplane16',
337
344
  PaperAirplane24: 'PaperAirplane24',
345
+ Paperclip16: 'Paperclip16',
346
+ Paperclip24: 'Paperclip24',
338
347
  Paste16: 'Paste16',
339
348
  Paste24: 'Paste24',
340
349
  Pencil16: 'Pencil16',
@@ -408,6 +417,7 @@ var iconName = {
408
417
  ShieldCheck24: 'ShieldCheck24',
409
418
  ShieldLock16: 'ShieldLock16',
410
419
  ShieldLock24: 'ShieldLock24',
420
+ ShieldSlash16: 'ShieldSlash16',
411
421
  ShieldX16: 'ShieldX16',
412
422
  ShieldX24: 'ShieldX24',
413
423
  SidebarCollapse16: 'SidebarCollapse16',
@@ -0,0 +1,9 @@
1
+ @import '../../index.scss';
2
+
3
+ @import './container.scss';
4
+ @import './grid-offset.scss';
5
+ @import './grid.scss';
6
+ @import './layout.scss';
7
+ @import './mixins.scss';
8
+ @import './page-layout.scss';
9
+ @import './stack.scss';
@@ -0,0 +1,183 @@
1
+ // stylelint-disable custom-property-pattern, no-descending-specificity
2
+ // Layout component
3
+
4
+ .Layout {
5
+ display: grid;
6
+
7
+ --Layout-sidebar-width: #{map-get($sidebar-width, 'sm')};
8
+ --Layout-gutter: 16px;
9
+
10
+ @media (max-width: calc(#{$width-sm} - 0.02px)) {
11
+ @include flow-as-row;
12
+ }
13
+
14
+ &.Layout--flowRow-until-md {
15
+ @media (max-width: calc(#{$width-md} - 0.02px)) {
16
+ @include flow-as-row;
17
+ }
18
+ }
19
+
20
+ &.Layout--flowRow-until-lg {
21
+ @media (max-width: calc(#{$width-lg} - 0.02px)) {
22
+ @include flow-as-row;
23
+ }
24
+ }
25
+
26
+ // Flow as column
27
+
28
+ grid-auto-flow: column;
29
+ grid-template-columns: auto 0 minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))); // sidebar column, separator, main column
30
+ grid-gap: var(--Layout-gutter);
31
+
32
+ .Layout-sidebar {
33
+ grid-column: 1;
34
+ }
35
+
36
+ .Layout-divider {
37
+ display: none;
38
+ }
39
+
40
+ .Layout-main {
41
+ grid-column: 2 / span 2;
42
+ }
43
+
44
+ // Gutter spacing
45
+
46
+ @include breakpoint(lg) {
47
+ --Layout-gutter: 24px;
48
+ }
49
+
50
+ &.Layout--gutter-none {
51
+ // stylelint-disable-next-line length-zero-no-unit
52
+ --Layout-gutter: 0px;
53
+ }
54
+
55
+ &.Layout--gutter-condensed {
56
+ --Layout-gutter: 16px;
57
+ }
58
+
59
+ &.Layout--gutter-spacious {
60
+ @include breakpoint(lg) {
61
+ --Layout-gutter: 32px;
62
+ }
63
+
64
+ @include breakpoint(xl) {
65
+ --Layout-gutter: 40px;
66
+ }
67
+ }
68
+
69
+ // Sidebar width
70
+
71
+ @each $breakpoint in map-keys($sidebar-width) {
72
+ @include breakpoint($breakpoint) {
73
+ --Layout-sidebar-width: #{map-get($sidebar-width, $breakpoint)};
74
+ }
75
+ }
76
+
77
+ &.Layout--sidebar-narrow {
78
+ @each $breakpoint in map-keys($sidebar-narrow-width) {
79
+ @include breakpoint($breakpoint) {
80
+ --Layout-sidebar-width: #{map-get($sidebar-narrow-width, $breakpoint)};
81
+ }
82
+ }
83
+ }
84
+
85
+ &.Layout--sidebar-wide {
86
+ @each $breakpoint in map-keys($sidebar-wide-width) {
87
+ @include breakpoint($breakpoint) {
88
+ --Layout-sidebar-width: #{map-get($sidebar-wide-width, $breakpoint)};
89
+ }
90
+ }
91
+ }
92
+
93
+ // Sidebar position
94
+
95
+ &.Layout--sidebarPosition-start {
96
+ .Layout-sidebar {
97
+ grid-column: 1;
98
+ }
99
+
100
+ .Layout-main {
101
+ grid-column: 2 / span 2;
102
+ }
103
+ }
104
+
105
+ &.Layout--sidebarPosition-end {
106
+ grid-template-columns: minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))) 0 auto;
107
+
108
+ .Layout-main {
109
+ grid-column: 1;
110
+ }
111
+
112
+ .Layout-sidebar {
113
+ grid-column: 2 / span 2;
114
+ }
115
+ }
116
+
117
+ // Sidebar divider
118
+
119
+ &.Layout--divided {
120
+ .Layout-divider {
121
+ display: block;
122
+ grid-column: 2;
123
+ width: 1px;
124
+ // stylelint-disable-next-line primer/spacing
125
+ margin-right: -1px;
126
+ background: var(--color-border-default);
127
+ }
128
+
129
+ .Layout-main {
130
+ grid-column: 3 / span 1;
131
+ }
132
+
133
+ &.Layout--sidebarPosition-end {
134
+ .Layout-sidebar {
135
+ grid-column: 3 / span 1;
136
+ }
137
+
138
+ .Layout-main {
139
+ grid-column: 1;
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ .Layout-divider {
146
+ display: none;
147
+ width: 1px;
148
+ }
149
+
150
+ .Layout-sidebar {
151
+ width: var(--Layout-sidebar-width);
152
+ }
153
+
154
+ .Layout-main {
155
+ min-width: 0;
156
+
157
+ // Centered main column
158
+ // FIXME: right-aligned sidebar
159
+ .Layout-main-centered-md,
160
+ .Layout-main-centered-lg,
161
+ .Layout-main-centered-xl {
162
+ margin-right: auto;
163
+ margin-left: auto;
164
+
165
+ > .container-md,
166
+ > .container-lg,
167
+ > .container-xl {
168
+ margin-left: 0;
169
+ }
170
+ }
171
+
172
+ .Layout-main-centered-md {
173
+ max-width: calc(#{$container-md} + var(--Layout-sidebar-width) + var(--Layout-gutter));
174
+ }
175
+
176
+ .Layout-main-centered-lg {
177
+ max-width: calc(#{$container-lg} + var(--Layout-sidebar-width) + var(--Layout-gutter));
178
+ }
179
+
180
+ .Layout-main-centered-xl {
181
+ max-width: calc(#{$container-xl} + var(--Layout-sidebar-width) + var(--Layout-gutter));
182
+ }
183
+ }
@@ -0,0 +1,106 @@
1
+ // stylelint-disable custom-property-pattern
2
+ // Layout alpha mixins
3
+
4
+ @mixin flow-as-row {
5
+ grid-auto-flow: row;
6
+ grid-template-columns: 1fr !important;
7
+
8
+ .Layout-sidebar,
9
+ .Layout-divider,
10
+ .Layout-main {
11
+ width: 100% !important;
12
+ grid-column: 1 !important;
13
+ }
14
+
15
+ &.Layout--sidebarPosition-flowRow-start {
16
+ .Layout-sidebar {
17
+ grid-row: 1;
18
+ }
19
+
20
+ .Layout-main {
21
+ grid-row: 2 / span 2;
22
+ }
23
+ }
24
+
25
+ &.Layout--sidebarPosition-flowRow-end {
26
+ .Layout-sidebar {
27
+ grid-row: 2 / span 2;
28
+ }
29
+
30
+ .Layout-main {
31
+ grid-row: 1;
32
+ }
33
+ }
34
+
35
+ &.Layout--sidebarPosition-flowRow-none {
36
+ .Layout-sidebar {
37
+ display: none;
38
+ }
39
+ }
40
+
41
+ &.Layout--divided {
42
+ @include flow-as-row-divider;
43
+
44
+ .Layout-main {
45
+ grid-row: 3 / span 1;
46
+ }
47
+
48
+ &.Layout--sidebarPosition-flowRow-end {
49
+ .Layout-sidebar {
50
+ grid-row: 3 / span 1;
51
+ }
52
+
53
+ .Layout-main {
54
+ grid-row: 1;
55
+ }
56
+ }
57
+ }
58
+ }
59
+
60
+ @mixin flow-as-row-divider {
61
+ --Layout-gutter: 0;
62
+
63
+ .Layout-divider {
64
+ height: 1px;
65
+ grid-row: 2;
66
+
67
+ &.Layout-divider--flowRow-hidden {
68
+ display: none;
69
+ }
70
+
71
+ &.Layout-divider--flowRow-shallow {
72
+ height: 8px;
73
+ margin-right: 0;
74
+ background: var(--color-canvas-inset);
75
+ border-color: var(--color-border-default);
76
+ border-style: solid;
77
+ border-width: $border-width 0;
78
+ }
79
+ }
80
+ }
81
+
82
+ // Layout beta mixins
83
+
84
+ // responsive region dividers
85
+
86
+ @mixin Layout-line-divider {
87
+ position: absolute;
88
+ left: calc(var(--Layout-outer-spacing-x) * -1);
89
+ display: block;
90
+ width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
91
+ height: 1px;
92
+ content: '';
93
+ background-color: $Layout-divider-color;
94
+ }
95
+
96
+ @mixin Layout-filled-divider {
97
+ position: absolute;
98
+ bottom: calc(#{$spacer-2} * -1); // -8px
99
+ left: calc(var(--Layout-outer-spacing-x) * -1);
100
+ display: block;
101
+ width: calc(100% + (var(--Layout-outer-spacing-x) * 2));
102
+ height: #{$spacer-2}; // 8px
103
+ content: '';
104
+ background-color: var(--color-canvas-inset);
105
+ box-shadow: inset 0 1px $Layout-divider-color, inset 0 -1px $Layout-divider-color;
106
+ }