@papillonbits/components 0.43.0 → 0.45.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/build/primer/Box/box-overlay.scss +42 -0
- package/build/primer/Form/FormControl.scss +1 -0
- package/build/primer/Icon/Icon.part.js +23 -8
- package/build/primer/Icon/Icon.prop.js +5 -0
- package/build/primer/Layout/app-frame.scss +157 -0
- package/build/primer/SVG/icon/alert-fill-16.svg +1 -0
- package/build/primer/SVG/icon/alert-fill-24.svg +1 -0
- package/build/primer/SVG/icon/chevron-down-12.svg +1 -0
- package/build/primer/SVG/icon/chevron-right-12.svg +1 -0
- package/build/primer/SVG/icon/log-24.svg +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.Box--overlay {
|
|
2
|
+
// stylelint-disable-next-line primer/responsive-widths
|
|
3
|
+
width: 448px;
|
|
4
|
+
margin-right: auto;
|
|
5
|
+
margin-left: auto;
|
|
6
|
+
background-color: var(--color-canvas-default);
|
|
7
|
+
background-clip: padding-box;
|
|
8
|
+
border-color: var(--color-border-default);
|
|
9
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
10
|
+
box-shadow: 0 0 18px rgba(0, 0, 0, 0.4);
|
|
11
|
+
|
|
12
|
+
.Box-header {
|
|
13
|
+
margin: 0;
|
|
14
|
+
border-width: 0;
|
|
15
|
+
border-bottom-width: $border-width;
|
|
16
|
+
border-top-left-radius: $border-radius;
|
|
17
|
+
border-top-right-radius: $border-radius;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.Box-overlay--narrow {
|
|
22
|
+
width: 320px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.Box-overlay--wide {
|
|
26
|
+
// stylelint-disable-next-line primer/responsive-widths
|
|
27
|
+
width: 640px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.Box-body {
|
|
31
|
+
&.scrollable-overlay {
|
|
32
|
+
max-height: 400px;
|
|
33
|
+
overflow-y: scroll;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.help {
|
|
37
|
+
padding-top: $spacer-2;
|
|
38
|
+
margin: 0;
|
|
39
|
+
color: var(--color-fg-muted);
|
|
40
|
+
text-align: center;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
// shared among all form control components (input, select, textarea, checkbox, radio)
|
|
51
51
|
@mixin Field {
|
|
52
|
+
color: var(--color-fg-default);
|
|
52
53
|
background-color: var(--color-canvas-default);
|
|
53
54
|
border: solid var(--primer-borderWidth-thin, 1px) var(--color-border-default);
|
|
54
55
|
|
|
@@ -17,6 +17,10 @@ var _alert2 = _interopRequireDefault(require("../SVG/icon/alert-24.svg"));
|
|
|
17
17
|
|
|
18
18
|
var _alertFill = _interopRequireDefault(require("../SVG/icon/alert-fill-12.svg"));
|
|
19
19
|
|
|
20
|
+
var _alertFill2 = _interopRequireDefault(require("../SVG/icon/alert-fill-16.svg"));
|
|
21
|
+
|
|
22
|
+
var _alertFill3 = _interopRequireDefault(require("../SVG/icon/alert-fill-24.svg"));
|
|
23
|
+
|
|
20
24
|
var _apps = _interopRequireDefault(require("../SVG/icon/apps-16.svg"));
|
|
21
25
|
|
|
22
26
|
var _archive = _interopRequireDefault(require("../SVG/icon/archive-16.svg"));
|
|
@@ -139,17 +143,21 @@ var _checklist = _interopRequireDefault(require("../SVG/icon/checklist-16.svg"))
|
|
|
139
143
|
|
|
140
144
|
var _checklist2 = _interopRequireDefault(require("../SVG/icon/checklist-24.svg"));
|
|
141
145
|
|
|
142
|
-
var _chevronDown = _interopRequireDefault(require("../SVG/icon/chevron-down-
|
|
146
|
+
var _chevronDown = _interopRequireDefault(require("../SVG/icon/chevron-down-12.svg"));
|
|
147
|
+
|
|
148
|
+
var _chevronDown2 = _interopRequireDefault(require("../SVG/icon/chevron-down-16.svg"));
|
|
143
149
|
|
|
144
|
-
var
|
|
150
|
+
var _chevronDown3 = _interopRequireDefault(require("../SVG/icon/chevron-down-24.svg"));
|
|
145
151
|
|
|
146
152
|
var _chevronLeft = _interopRequireDefault(require("../SVG/icon/chevron-left-16.svg"));
|
|
147
153
|
|
|
148
154
|
var _chevronLeft2 = _interopRequireDefault(require("../SVG/icon/chevron-left-24.svg"));
|
|
149
155
|
|
|
150
|
-
var _chevronRight = _interopRequireDefault(require("../SVG/icon/chevron-right-
|
|
156
|
+
var _chevronRight = _interopRequireDefault(require("../SVG/icon/chevron-right-12.svg"));
|
|
151
157
|
|
|
152
|
-
var _chevronRight2 = _interopRequireDefault(require("../SVG/icon/chevron-right-
|
|
158
|
+
var _chevronRight2 = _interopRequireDefault(require("../SVG/icon/chevron-right-16.svg"));
|
|
159
|
+
|
|
160
|
+
var _chevronRight3 = _interopRequireDefault(require("../SVG/icon/chevron-right-24.svg"));
|
|
153
161
|
|
|
154
162
|
var _chevronUp = _interopRequireDefault(require("../SVG/icon/chevron-up-16.svg"));
|
|
155
163
|
|
|
@@ -589,6 +597,8 @@ var _lock2 = _interopRequireDefault(require("../SVG/icon/lock-24.svg"));
|
|
|
589
597
|
|
|
590
598
|
var _log = _interopRequireDefault(require("../SVG/icon/log-16.svg"));
|
|
591
599
|
|
|
600
|
+
var _log2 = _interopRequireDefault(require("../SVG/icon/log-24.svg"));
|
|
601
|
+
|
|
592
602
|
var _logoGist = _interopRequireDefault(require("../SVG/icon/logo-gist-16.svg"));
|
|
593
603
|
|
|
594
604
|
var _logoGithub = _interopRequireDefault(require("../SVG/icon/logo-github-16.svg"));
|
|
@@ -1045,6 +1055,8 @@ var iconComponents = {
|
|
|
1045
1055
|
Alert16: _alert["default"],
|
|
1046
1056
|
Alert24: _alert2["default"],
|
|
1047
1057
|
AlertFill12: _alertFill["default"],
|
|
1058
|
+
AlertFill16: _alertFill2["default"],
|
|
1059
|
+
AlertFill24: _alertFill3["default"],
|
|
1048
1060
|
Apps16: _apps["default"],
|
|
1049
1061
|
Archive16: _archive["default"],
|
|
1050
1062
|
Archive24: _archive2["default"],
|
|
@@ -1106,12 +1118,14 @@ var iconComponents = {
|
|
|
1106
1118
|
Checkbox24: _checkbox2["default"],
|
|
1107
1119
|
Checklist16: _checklist["default"],
|
|
1108
1120
|
Checklist24: _checklist2["default"],
|
|
1109
|
-
|
|
1110
|
-
|
|
1121
|
+
ChevronDown12: _chevronDown["default"],
|
|
1122
|
+
ChevronDown16: _chevronDown2["default"],
|
|
1123
|
+
ChevronDown24: _chevronDown3["default"],
|
|
1111
1124
|
ChevronLeft16: _chevronLeft["default"],
|
|
1112
1125
|
ChevronLeft24: _chevronLeft2["default"],
|
|
1113
|
-
|
|
1114
|
-
|
|
1126
|
+
ChevronRight12: _chevronRight["default"],
|
|
1127
|
+
ChevronRight16: _chevronRight2["default"],
|
|
1128
|
+
ChevronRight24: _chevronRight3["default"],
|
|
1115
1129
|
ChevronUp16: _chevronUp["default"],
|
|
1116
1130
|
ChevronUp24: _chevronUp2["default"],
|
|
1117
1131
|
Circle16: _circle["default"],
|
|
@@ -1331,6 +1345,7 @@ var iconComponents = {
|
|
|
1331
1345
|
Lock16: _lock["default"],
|
|
1332
1346
|
Lock24: _lock2["default"],
|
|
1333
1347
|
Log16: _log["default"],
|
|
1348
|
+
Log24: _log2["default"],
|
|
1334
1349
|
LogoGist16: _logoGist["default"],
|
|
1335
1350
|
LogoGithub16: _logoGithub["default"],
|
|
1336
1351
|
Mail16: _mail["default"],
|
|
@@ -13,6 +13,8 @@ var iconName = {
|
|
|
13
13
|
Alert16: 'Alert16',
|
|
14
14
|
Alert24: 'Alert24',
|
|
15
15
|
AlertFill12: 'AlertFill12',
|
|
16
|
+
AlertFill16: 'AlertFill16',
|
|
17
|
+
AlertFill24: 'AlertFill24',
|
|
16
18
|
Apps16: 'Apps16',
|
|
17
19
|
Archive16: 'Archive16',
|
|
18
20
|
Archive24: 'Archive24',
|
|
@@ -74,10 +76,12 @@ var iconName = {
|
|
|
74
76
|
Checkbox24: 'Checkbox24',
|
|
75
77
|
Checklist16: 'Checklist16',
|
|
76
78
|
Checklist24: 'Checklist24',
|
|
79
|
+
ChevronDown12: 'ChevronDown12',
|
|
77
80
|
ChevronDown16: 'ChevronDown16',
|
|
78
81
|
ChevronDown24: 'ChevronDown24',
|
|
79
82
|
ChevronLeft16: 'ChevronLeft16',
|
|
80
83
|
ChevronLeft24: 'ChevronLeft24',
|
|
84
|
+
ChevronRight12: 'ChevronRight12',
|
|
81
85
|
ChevronRight16: 'ChevronRight16',
|
|
82
86
|
ChevronRight24: 'ChevronRight24',
|
|
83
87
|
ChevronUp16: 'ChevronUp16',
|
|
@@ -299,6 +303,7 @@ var iconName = {
|
|
|
299
303
|
Lock16: 'Lock16',
|
|
300
304
|
Lock24: 'Lock24',
|
|
301
305
|
Log16: 'Log16',
|
|
306
|
+
Log24: 'Log24',
|
|
302
307
|
LogoGist16: 'LogoGist16',
|
|
303
308
|
LogoGithub16: 'LogoGithub16',
|
|
304
309
|
Mail16: 'Mail16',
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// stylelint-disable max-nesting-depth
|
|
2
|
+
// stylelint-disable primer/spacing
|
|
3
|
+
// stylelint-disable primer/borders
|
|
4
|
+
// stylelint-disable custom-property-pattern
|
|
5
|
+
// stylelint-disable no-descending-specificity
|
|
6
|
+
|
|
7
|
+
.AppFrame {
|
|
8
|
+
// AppFrame structure
|
|
9
|
+
// ===================
|
|
10
|
+
//
|
|
11
|
+
// .AppFrame
|
|
12
|
+
// ├─ .AppFrame-a11yNav
|
|
13
|
+
// │ ├─ .AppFrame-a11yLink
|
|
14
|
+
// │
|
|
15
|
+
// ├─ .AppFrame-main
|
|
16
|
+
// │ ├─ .AppFrame-header-wrapper
|
|
17
|
+
// │ │ ├─ .AppFrame-header
|
|
18
|
+
// │ │ ├─ .AppFrame-subheader
|
|
19
|
+
// │ │
|
|
20
|
+
// │ ├─ #start-of-content
|
|
21
|
+
// │ ├─ .AppFrame-body
|
|
22
|
+
// │
|
|
23
|
+
// │ .AppFrame-footer
|
|
24
|
+
|
|
25
|
+
// Accessibility navigation
|
|
26
|
+
|
|
27
|
+
.AppFrame-a11yNav {
|
|
28
|
+
position: absolute;
|
|
29
|
+
z-index: 1000;
|
|
30
|
+
display: flex;
|
|
31
|
+
width: 100%;
|
|
32
|
+
padding: var(--base-size-16, 16px);
|
|
33
|
+
background: var(--color-canvas-inset);
|
|
34
|
+
padding-block-end: calc(var(--base-size-16, 16px) - var(--primer-borderWidth-thin, 1px));
|
|
35
|
+
isolation: isolate;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: var(--base-size-8, 8px);
|
|
38
|
+
|
|
39
|
+
&:not(:focus-within) {
|
|
40
|
+
width: 1px;
|
|
41
|
+
height: 1px;
|
|
42
|
+
padding: 0;
|
|
43
|
+
margin: -1px;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
46
|
+
border: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:focus-within {
|
|
50
|
+
top: 0;
|
|
51
|
+
left: 0;
|
|
52
|
+
|
|
53
|
+
// Narrow viewport
|
|
54
|
+
@media (max-width: #{map-get($breakpoints, 'md') - 0.02px}) {
|
|
55
|
+
justify-content: center;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.AppFrame-a11yLink {
|
|
61
|
+
transition: none;
|
|
62
|
+
|
|
63
|
+
&:not(:focus) {
|
|
64
|
+
display: block;
|
|
65
|
+
width: var(--base-size-8, 8px);
|
|
66
|
+
height: var(--base-size-8, 8px);
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
text-indent: var(--base-size-128, 128px);
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
background: var(--color-border-default);
|
|
71
|
+
border-radius: var(--primer-borderRadius-full, 100vh);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:focus {
|
|
75
|
+
z-index: 20;
|
|
76
|
+
display: grid;
|
|
77
|
+
width: auto;
|
|
78
|
+
height: auto;
|
|
79
|
+
min-height: var(--primer-control-medium-size, 32px);
|
|
80
|
+
padding: 0 var(--primer-control-medium-paddingInline-spacious, 16px);
|
|
81
|
+
overflow: auto;
|
|
82
|
+
color: var(--color-fg-on-emphasis);
|
|
83
|
+
background: var(--color-accent-emphasis);
|
|
84
|
+
border-radius: var(--primer-borderRadius-full, 100vh);
|
|
85
|
+
align-items: center;
|
|
86
|
+
|
|
87
|
+
@media (pointer: coarse) {
|
|
88
|
+
&::after {
|
|
89
|
+
@include minTouchTarget(var(--primer-control-minTarget-coarse, 44px));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
94
|
+
animation: AppFrame-a11yLink-focus 200ms ease-out;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@keyframes AppFrame-a11yLink-focus {
|
|
98
|
+
0% {
|
|
99
|
+
color: var(--color-accent-emphasis);
|
|
100
|
+
transform: scale(0.3, 0.25);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
50% {
|
|
104
|
+
color: var(--color-accent-emphasis);
|
|
105
|
+
transform: scale(1, 1);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
55% {
|
|
109
|
+
color: var(--color-fg-on-emphasis);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
100% {
|
|
113
|
+
transform: scaleX(1);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.AppFrame-main {
|
|
120
|
+
display: flex;
|
|
121
|
+
min-height: 100vh;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
|
|
124
|
+
@supports (height: 100dvh) {
|
|
125
|
+
min-height: 100dvh;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.AppFrame-header-wrapper {
|
|
130
|
+
position: relative;
|
|
131
|
+
height: min-content;
|
|
132
|
+
overflow: visible;
|
|
133
|
+
|
|
134
|
+
.AppFrame-header {
|
|
135
|
+
position: sticky;
|
|
136
|
+
top: 0;
|
|
137
|
+
z-index: 1;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.AppFrame-header {
|
|
142
|
+
flex: 0 0 auto;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.AppFrame-subheader {
|
|
146
|
+
flex: 0 0 auto;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.AppFrame-body {
|
|
150
|
+
flex: 1 0;
|
|
151
|
+
height: 100%;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.AppFrame-footer {
|
|
155
|
+
flex: 0 0 auto;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM8 5a.75.75 0 01.75.75v2.5a.75.75 0 01-1.5 0v-2.5A.75.75 0 018 5zm1 6a1 1 0 11-2 0 1 1 0 012 0z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M9.836 3.244c.963-1.665 3.365-1.665 4.328 0l8.967 15.504c.963 1.667-.24 3.752-2.165 3.752H3.034c-1.926 0-3.128-2.085-2.165-3.752L9.836 3.244zM12 8.5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 8.5zm1 9a1 1 0 11-2 0 1 1 0 012 0z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path d="M6 8.8c-.2 0-.4-.1-.5-.2L2.2 5.3c-.3-.3-.3-.8 0-1.1s.8-.3 1.1 0L6 6.9l2.7-2.7c.3-.3.8-.3 1.1 0s.3.8 0 1.1L6.6 8.5c-.2.2-.4.3-.6.3z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path d="M4.7 10c-.2 0-.4-.1-.5-.2-.3-.3-.3-.8 0-1.1L6.9 6 4.2 3.3c-.3-.3-.3-.8 0-1.1s.8-.3 1.1 0l3.3 3.2c.3.3.3.8 0 1.1L5.3 9.7c-.2.2-.4.3-.6.3z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M9.197 10a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5zm-2.382 4a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5zm-1.581 4a.75.75 0 000 1.5h6.5a.75.75 0 000-1.5h-6.5z"/><path fill-rule="evenodd" d="M4.125 0h15.75A4.113 4.113 0 0124 4.125c0 1.384-.476 2.794-1.128 4.16-.652 1.365-1.515 2.757-2.352 4.104l-.008.013c-.849 1.368-1.669 2.691-2.28 3.97-.614 1.283-.982 2.45-.982 3.503a2.625 2.625 0 104.083-2.183.75.75 0 01.834-1.247A4.125 4.125 0 0119.875 24H4.5a4.125 4.125 0 01-4.125-4.125c0-2.234 1.258-4.656 2.59-6.902.348-.586.702-1.162 1.05-1.728.8-1.304 1.567-2.553 2.144-3.738H3.39c-.823 0-1.886-.193-2.567-1.035A3.647 3.647 0 010 4.125 4.125 4.125 0 014.125 0zM1.5 4.125A2.625 2.625 0 014.125 1.5h12.568a4.108 4.108 0 00-.943 2.625c0 .723.185 1.349.499 1.882H3.389c-.662 0-1.148-.166-1.402-.479A2.148 2.148 0 011.5 4.125zm14.25 15.75c0 .997.354 1.912.943 2.625H4.5a2.625 2.625 0 01-2.625-2.625c0-1.766 1.025-3.85 2.38-6.137.314-.529.646-1.068.98-1.612.953-1.55 1.927-3.136 2.577-4.619H18a.75.75 0 00.417-1.373c-.746-.5-1.167-1.144-1.167-2.009A2.625 2.625 0 0119.875 1.5 2.613 2.613 0 0122.5 4.125c0 1.057-.368 2.229-.982 3.514-.611 1.28-1.431 2.605-2.28 3.972l-.017.028c-.834 1.343-1.694 2.728-2.343 4.086-.652 1.364-1.128 2.77-1.128 4.15z"/></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papillonbits/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "Papillon Bits Components",
|
|
5
5
|
"homepage": "https://github.com/papillonbits/papillonbits/tree/master/packages/components",
|
|
6
6
|
"repository": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"build-release": "npm run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@papillonbits/css": "^0.
|
|
33
|
-
"@papillonbits/library": "^0.
|
|
32
|
+
"@papillonbits/css": "^0.45.0",
|
|
33
|
+
"@papillonbits/library": "^0.45.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "7b11ed501700a3a393461f3aa6069dc6c05d6a2c"
|
|
36
36
|
}
|