@primer/primitives 0.0.0-20260220153432 → 0.0.0-20260220164118
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/css/base/size/size.css +21 -0
- package/dist/css/base/size/z-index.css +9 -0
- package/dist/css/functional/size/border.css +11 -0
- package/dist/css/functional/size/breakpoints.css +8 -0
- package/dist/css/functional/size/radius.css +7 -0
- package/dist/css/functional/size/size-coarse.css +8 -0
- package/dist/css/functional/size/size-fine.css +8 -0
- package/dist/css/functional/size/size.css +73 -0
- package/dist/css/functional/size/viewport.css +6 -0
- package/dist/css/functional/size/z-index.css +10 -0
- package/dist/css/primitives.css +9 -0
- package/dist/docs/base/size/size.json +572 -0
- package/dist/docs/base/size/z-index.json +107 -0
- package/dist/docs/functional/size/border.json +258 -0
- package/dist/docs/functional/size/breakpoints.json +182 -0
- package/dist/docs/functional/size/radius.json +221 -0
- package/dist/docs/functional/size/size-coarse.json +142 -0
- package/dist/docs/functional/size/size-fine.json +142 -0
- package/dist/docs/functional/size/size.json +2000 -0
- package/dist/docs/functional/size/viewport.json +92 -0
- package/dist/docs/functional/size/z-index.json +234 -0
- package/dist/fallbacks/base/size/size.json +21 -0
- package/dist/fallbacks/base/size/z-index.json +9 -0
- package/dist/fallbacks/functional/size/border.json +11 -0
- package/dist/fallbacks/functional/size/breakpoints.json +8 -0
- package/dist/fallbacks/functional/size/radius.json +7 -0
- package/dist/fallbacks/functional/size/size-coarse.json +6 -0
- package/dist/fallbacks/functional/size/size-fine.json +6 -0
- package/dist/fallbacks/functional/size/size.json +73 -0
- package/dist/fallbacks/functional/size/viewport.json +8 -0
- package/dist/fallbacks/functional/size/z-index.json +10 -0
- package/dist/styleLint/base/size/size.json +572 -0
- package/dist/styleLint/base/size/z-index.json +107 -0
- package/dist/styleLint/functional/size/border.json +258 -0
- package/dist/styleLint/functional/size/breakpoints.json +182 -0
- package/dist/styleLint/functional/size/radius.json +221 -0
- package/dist/styleLint/functional/size/size-coarse.json +142 -0
- package/dist/styleLint/functional/size/size-fine.json +142 -0
- package/dist/styleLint/functional/size/size.json +2000 -0
- package/dist/styleLint/functional/size/viewport.json +92 -0
- package/dist/styleLint/functional/size/z-index.json +234 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--base-size-112: 7rem;
|
|
3
|
+
--base-size-12: 0.75rem;
|
|
4
|
+
--base-size-128: 8rem;
|
|
5
|
+
--base-size-16: 1rem;
|
|
6
|
+
--base-size-2: 0.125rem;
|
|
7
|
+
--base-size-20: 1.25rem;
|
|
8
|
+
--base-size-24: 1.5rem;
|
|
9
|
+
--base-size-28: 1.75rem;
|
|
10
|
+
--base-size-32: 2rem;
|
|
11
|
+
--base-size-36: 2.25rem;
|
|
12
|
+
--base-size-4: 0.25rem;
|
|
13
|
+
--base-size-40: 2.5rem;
|
|
14
|
+
--base-size-44: 2.75rem;
|
|
15
|
+
--base-size-48: 3rem;
|
|
16
|
+
--base-size-6: 0.375rem;
|
|
17
|
+
--base-size-64: 4rem;
|
|
18
|
+
--base-size-8: 0.5rem;
|
|
19
|
+
--base-size-80: 5rem;
|
|
20
|
+
--base-size-96: 6rem;
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--borderWidth-thick: 0.125rem; /** Thick 2px border for emphasis. Use for focus indicators, selected states, or to emphasize important boundaries */
|
|
3
|
+
--borderWidth-thicker: 0.25rem; /** Extra thick 4px border for maximum emphasis. Use sparingly for high-contrast focus indicators or critical visual separators */
|
|
4
|
+
--borderWidth-thin: 0.0625rem; /** Standard 1px border width. Use for most borders, dividers, and outlines throughout the interface */
|
|
5
|
+
--outline-focus-offset: -0.125rem; /** Focus outline offset (-2px). Negative value creates an inset outline for keyboard focus indicators, ensuring the focus ring stays within the element bounds */
|
|
6
|
+
--outline-focus-width: 0.125rem; /** Focus outline width (2px). Standard width for keyboard focus indicators to meet WCAG 2.4.7 accessibility requirements */
|
|
7
|
+
--borderWidth-default: var(--borderWidth-thin); /** Default border width for most UI elements. Alias of borderWidth.thin (1px) */
|
|
8
|
+
--boxShadow-thick: inset 0 0 0 var(--borderWidth-thick); /** Thick shadow (2px) used instead of a border for emphasis without layout shift */
|
|
9
|
+
--boxShadow-thicker: inset 0 0 0 var(--borderWidth-thicker); /** Thickest shadow (4px) used for high emphasis borders without layout shift. Use sparingly for maximum visual impact */
|
|
10
|
+
--boxShadow-thin: inset 0 0 0 var(--borderWidth-thin); /** Thin shadow used instead of a border to prevent layout shift */
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--borderRadius-full: 624.9375rem; /** Use this border radius for pill shaped elements */
|
|
3
|
+
--borderRadius-large: 0.75rem; /** Large border radius (12px). Use for larger containers, dialogs, or when more visual softness is desired. */
|
|
4
|
+
--borderRadius-medium: 0.375rem; /** Medium border radius (6px). The default choice for most buttons, cards, and containers */
|
|
5
|
+
--borderRadius-small: 0.1875rem; /** Small border radius (3px). Use for small variants of components or small UI elements like badges, tags, or anything below 16px in height */
|
|
6
|
+
--borderRadius-default: var(--borderRadius-medium); /** Default border radius for most UI elements. Alias of borderRadius.medium (6px). Use when in doubt */
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@media (pointer: coarse) {
|
|
2
|
+
:root {
|
|
3
|
+
--control-minTarget-auto: 2.75rem; /** Minimum touch target size for coarse pointer devices (touch screens) */
|
|
4
|
+
--controlStack-large-gap-auto: 0.75rem; /** Gap between stacked controls in large density layouts for touch devices */
|
|
5
|
+
--controlStack-medium-gap-auto: 0.75rem; /** Gap between stacked controls in medium density layouts for touch devices */
|
|
6
|
+
--controlStack-small-gap-auto: 1rem; /** Gap between stacked controls in small density layouts for touch devices */
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@media (pointer: fine) {
|
|
2
|
+
:root {
|
|
3
|
+
--control-minTarget-auto: 1rem; /** Minimum target size for fine pointer devices (mouse) */
|
|
4
|
+
--controlStack-large-gap-auto: 0.5rem; /** Gap between stacked controls in large density layouts for mouse interfaces */
|
|
5
|
+
--controlStack-medium-gap-auto: 0.5rem; /** Gap between stacked controls in medium density layouts for mouse interfaces */
|
|
6
|
+
--controlStack-small-gap-auto: 0.5rem; /** Gap between stacked controls in small density layouts for mouse interfaces */
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--control-large-paddingBlock: 0.625rem;
|
|
3
|
+
--control-medium-paddingBlock: 0.375rem;
|
|
4
|
+
--control-xlarge-paddingBlock: 0.875rem;
|
|
5
|
+
--control-xsmall-paddingBlock: 0.125rem;
|
|
6
|
+
--overlay-height-large: 27rem;
|
|
7
|
+
--overlay-height-medium: 20rem;
|
|
8
|
+
--overlay-height-small: 16rem;
|
|
9
|
+
--overlay-height-xlarge: 37.5rem;
|
|
10
|
+
--overlay-offset: 0.25rem;
|
|
11
|
+
--overlay-width-large: 40rem;
|
|
12
|
+
--overlay-width-medium: 30rem;
|
|
13
|
+
--overlay-width-small: 20rem;
|
|
14
|
+
--overlay-width-xlarge: 60rem;
|
|
15
|
+
--overlay-width-xsmall: 12rem;
|
|
16
|
+
--spinner-strokeWidth-default: 0.125rem;
|
|
17
|
+
--control-large-gap: 0.5rem;
|
|
18
|
+
--control-large-lineBoxHeight: 1.25rem;
|
|
19
|
+
--control-large-paddingInline-condensed: 0.5rem;
|
|
20
|
+
--control-large-paddingInline-normal: 0.75rem;
|
|
21
|
+
--control-large-paddingInline-spacious: 1rem;
|
|
22
|
+
--control-large-size: 2.5rem;
|
|
23
|
+
--control-medium-gap: 0.5rem;
|
|
24
|
+
--control-medium-lineBoxHeight: 1.25rem;
|
|
25
|
+
--control-medium-paddingInline-condensed: 0.5rem;
|
|
26
|
+
--control-medium-paddingInline-normal: 0.75rem;
|
|
27
|
+
--control-medium-paddingInline-spacious: 1rem;
|
|
28
|
+
--control-medium-size: 2rem;
|
|
29
|
+
--control-minTarget-coarse: 2.75rem;
|
|
30
|
+
--control-minTarget-fine: 1rem;
|
|
31
|
+
--control-small-gap: 0.25rem;
|
|
32
|
+
--control-small-lineBoxHeight: 1.25rem;
|
|
33
|
+
--control-small-paddingBlock: 0.25rem;
|
|
34
|
+
--control-small-paddingInline-condensed: 0.5rem;
|
|
35
|
+
--control-small-paddingInline-normal: 0.75rem;
|
|
36
|
+
--control-small-paddingInline-spacious: 1rem;
|
|
37
|
+
--control-small-size: 1.75rem;
|
|
38
|
+
--control-xlarge-gap: 0.5rem;
|
|
39
|
+
--control-xlarge-lineBoxHeight: 1.25rem;
|
|
40
|
+
--control-xlarge-paddingInline-condensed: 0.5rem;
|
|
41
|
+
--control-xlarge-paddingInline-normal: 0.75rem;
|
|
42
|
+
--control-xlarge-paddingInline-spacious: 1rem;
|
|
43
|
+
--control-xlarge-size: 3rem;
|
|
44
|
+
--control-xsmall-gap: 0.25rem;
|
|
45
|
+
--control-xsmall-lineBoxHeight: 1.25rem;
|
|
46
|
+
--control-xsmall-paddingInline-condensed: 0.25rem;
|
|
47
|
+
--control-xsmall-paddingInline-normal: 0.5rem;
|
|
48
|
+
--control-xsmall-paddingInline-spacious: 0.75rem;
|
|
49
|
+
--control-xsmall-size: 1.5rem;
|
|
50
|
+
--controlStack-large-gap-auto: 0.5rem;
|
|
51
|
+
--controlStack-large-gap-condensed: 0.5rem;
|
|
52
|
+
--controlStack-large-gap-spacious: 0.75rem;
|
|
53
|
+
--controlStack-medium-gap-auto: 0.5rem;
|
|
54
|
+
--controlStack-medium-gap-condensed: 0.5rem;
|
|
55
|
+
--controlStack-medium-gap-spacious: 0.75rem;
|
|
56
|
+
--controlStack-small-gap-auto: 0.5rem;
|
|
57
|
+
--controlStack-small-gap-condensed: 0.5rem;
|
|
58
|
+
--controlStack-small-gap-spacious: 1rem;
|
|
59
|
+
--overlay-borderRadius: 0.375rem;
|
|
60
|
+
--overlay-padding-condensed: 0.5rem;
|
|
61
|
+
--overlay-padding-normal: 1rem;
|
|
62
|
+
--overlay-paddingBlock-condensed: 0.25rem;
|
|
63
|
+
--overlay-paddingBlock-normal: 0.75rem;
|
|
64
|
+
--spinner-size-large: 4rem;
|
|
65
|
+
--spinner-size-medium: 2rem;
|
|
66
|
+
--spinner-size-small: 1rem;
|
|
67
|
+
--stack-gap-condensed: 0.5rem;
|
|
68
|
+
--stack-gap-normal: 1rem;
|
|
69
|
+
--stack-gap-spacious: 1.5rem;
|
|
70
|
+
--stack-padding-condensed: 0.5rem;
|
|
71
|
+
--stack-padding-normal: 1rem;
|
|
72
|
+
--stack-padding-spacious: 1.5rem;
|
|
73
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
@custom-media --viewportRange-landscape (orientation: landscape);
|
|
2
|
+
@custom-media --viewportRange-narrow (max-width: calc(48rem - 0.02px));
|
|
3
|
+
@custom-media --viewportRange-narrowLandscape ((max-width: calc(63.25rem - 0.02px)) and (max-height: calc(34rem - 0.02px)) and (orientation: landscape));
|
|
4
|
+
@custom-media --viewportRange-portrait (orientation: portrait);
|
|
5
|
+
@custom-media --viewportRange-regular (min-width: 48rem);
|
|
6
|
+
@custom-media --viewportRange-wide (min-width: 87.5rem);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--zIndex-behind: -1; /** Place element behind base content. Use for decorative backgrounds or canvas elements. */
|
|
3
|
+
--zIndex-default: 0; /** Default stacking order. No elevation above surrounding content. */
|
|
4
|
+
--zIndex-dropdown: 200; /** Dropdown menus and select panels that appear above page content. */
|
|
5
|
+
--zIndex-modal: 400; /** Modal dialogs and full-screen overlays. */
|
|
6
|
+
--zIndex-overlay: 300; /** Overlay backdrops, side panels, and drawers. */
|
|
7
|
+
--zIndex-popover: 500; /** Tooltips and popovers that appear above all normal UI. */
|
|
8
|
+
--zIndex-skipLink: 600; /** Accessibility skip links. Must always be the topmost layer. */
|
|
9
|
+
--zIndex-sticky: 100; /** Sticky elements that remain visible while scrolling. */
|
|
10
|
+
}
|
package/dist/css/primitives.css
CHANGED
|
@@ -3,5 +3,14 @@
|
|
|
3
3
|
* @rule Never use raw values (hex/px). Use semantic tokens ONLY.
|
|
4
4
|
*/
|
|
5
5
|
@import './base/motion/motion.css';
|
|
6
|
+
@import './base/size/size.css';
|
|
7
|
+
@import './base/size/z-index.css';
|
|
6
8
|
@import './base/typography/typography.css';
|
|
9
|
+
@import './functional/size/border.css';
|
|
10
|
+
@import './functional/size/breakpoints.css';
|
|
11
|
+
@import './functional/size/radius.css';
|
|
12
|
+
@import './functional/size/size-coarse.css';
|
|
13
|
+
@import './functional/size/size-fine.css';
|
|
14
|
+
@import './functional/size/size.css';
|
|
15
|
+
@import './functional/size/z-index.css';
|
|
7
16
|
@import './functional/typography/typography.css';
|