@byline/ui 1.7.0 → 1.7.2

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 (103) hide show
  1. package/dist/components/accordion/accordion_module.css +3 -1
  2. package/dist/components/avatar/avatar_module.css +3 -1
  3. package/dist/components/badge/badge_module.css +3 -1
  4. package/dist/components/button/button-group_module.css +3 -1
  5. package/dist/components/button/button_module.css +3 -1
  6. package/dist/components/button/combo-button_module.css +3 -1
  7. package/dist/components/button/control-buttons_module.css +3 -1
  8. package/dist/components/button/copy-button_module.css +3 -1
  9. package/dist/components/card/card_module.css +3 -1
  10. package/dist/components/chips/chip_module.css +3 -1
  11. package/dist/components/container/container_module.css +3 -1
  12. package/dist/components/dropdown/dropdown_module.css +3 -1
  13. package/dist/components/hamburger/hamburger_module.css +3 -1
  14. package/dist/components/inputs/autocomplete_module.css +3 -1
  15. package/dist/components/inputs/calendar_module.css +3 -1
  16. package/dist/components/inputs/checkbox-group_module.css +3 -1
  17. package/dist/components/inputs/checkbox_module.css +3 -1
  18. package/dist/components/inputs/error-text_module.css +3 -1
  19. package/dist/components/inputs/help-text_module.css +3 -1
  20. package/dist/components/inputs/input-adornment_module.css +3 -1
  21. package/dist/components/inputs/input_module.css +3 -1
  22. package/dist/components/inputs/label_module.css +3 -1
  23. package/dist/components/inputs/radio-group_module.css +3 -1
  24. package/dist/components/inputs/select_module.css +3 -1
  25. package/dist/components/inputs/text-area_module.css +3 -1
  26. package/dist/components/notifications/alert_module.css +3 -1
  27. package/dist/components/notifications/toast_module.css +3 -1
  28. package/dist/components/pager/pagination_module.css +3 -1
  29. package/dist/components/scroll-area/scroll-area_module.css +3 -1
  30. package/dist/components/scroll-to-top/scroll-to-top_module.css +3 -1
  31. package/dist/components/section/section_module.css +3 -1
  32. package/dist/components/shimmer/shimmer_module.css +3 -1
  33. package/dist/components/table/table_module.css +3 -1
  34. package/dist/components/tabs/tabs_module.css +3 -1
  35. package/dist/components/tooltip/tooltip_module.css +3 -1
  36. package/dist/icons/icons_module.css +3 -1
  37. package/dist/loaders/ellipses_module.css +3 -1
  38. package/dist/loaders/ring_module.css +3 -1
  39. package/dist/loaders/spinner_module.css +3 -1
  40. package/dist/styles/reset.css +172 -166
  41. package/dist/styles/styles.css +181 -1506
  42. package/dist/styles/typography.css +243 -237
  43. package/dist/widgets/datepicker/datepicker_module.css +3 -1
  44. package/dist/widgets/drawer/drawer_module.css +3 -1
  45. package/dist/widgets/image-lightbox/image-lightbox_module.css +3 -1
  46. package/dist/widgets/modal/modal_module.css +3 -1
  47. package/dist/widgets/timeline/timeline_module.css +3 -1
  48. package/package.json +4 -4
  49. package/src/components/accordion/accordion.module.css +3 -2
  50. package/src/components/avatar/avatar.module.css +3 -6
  51. package/src/components/badge/badge.module.css +3 -6
  52. package/src/components/button/button-group.module.css +3 -2
  53. package/src/components/button/button.module.css +3 -6
  54. package/src/components/button/combo-button.module.css +3 -2
  55. package/src/components/button/control-buttons.module.css +3 -2
  56. package/src/components/button/copy-button.module.css +3 -6
  57. package/src/components/card/card.module.css +3 -6
  58. package/src/components/chips/chip.module.css +3 -6
  59. package/src/components/container/container.module.css +3 -6
  60. package/src/components/dropdown/dropdown.module.css +3 -6
  61. package/src/components/hamburger/hamburger.module.css +3 -6
  62. package/src/components/inputs/autocomplete.module.css +3 -6
  63. package/src/components/inputs/calendar.module.css +3 -6
  64. package/src/components/inputs/checkbox-group.module.css +3 -6
  65. package/src/components/inputs/checkbox.module.css +3 -6
  66. package/src/components/inputs/error-text.module.css +3 -6
  67. package/src/components/inputs/help-text.module.css +3 -6
  68. package/src/components/inputs/input-adornment.module.css +3 -6
  69. package/src/components/inputs/input.module.css +3 -6
  70. package/src/components/inputs/label.module.css +3 -6
  71. package/src/components/inputs/radio-group.module.css +3 -6
  72. package/src/components/inputs/select.module.css +3 -6
  73. package/src/components/inputs/text-area.module.css +3 -6
  74. package/src/components/notifications/alert.module.css +3 -6
  75. package/src/components/notifications/toast.module.css +3 -6
  76. package/src/components/pager/pagination.module.css +3 -6
  77. package/src/components/scroll-area/scroll-area.module.css +3 -6
  78. package/src/components/scroll-to-top/scroll-to-top.module.css +3 -2
  79. package/src/components/section/section.module.css +3 -6
  80. package/src/components/shimmer/shimmer.module.css +3 -6
  81. package/src/components/table/table.module.css +3 -6
  82. package/src/components/tabs/tabs.module.css +3 -6
  83. package/src/components/tooltip/tooltip.module.css +3 -6
  84. package/src/icons/icons.module.css +3 -2
  85. package/src/loaders/ellipses.module.css +3 -6
  86. package/src/loaders/ring.module.css +3 -6
  87. package/src/loaders/spinner.module.css +3 -6
  88. package/src/styles/components/hamburger.css +3 -6
  89. package/src/styles/reset.css +337 -312
  90. package/src/styles/styles.css +3 -7
  91. package/src/styles/theme/autofill.css +53 -62
  92. package/src/styles/theme/defaults.css +67 -55
  93. package/src/styles/theme/scrollers.css +48 -39
  94. package/src/styles/typography/prose.css +270 -265
  95. package/src/styles/typography.css +20 -14
  96. package/src/widgets/datepicker/datepicker.module.css +3 -2
  97. package/src/widgets/drawer/drawer.module.css +3 -2
  98. package/src/widgets/image-lightbox/image-lightbox.module.css +3 -2
  99. package/src/widgets/modal/modal.module.css +3 -2
  100. package/src/widgets/timeline/timeline.module.css +3 -6
  101. package/src/styles/utils/scroll-layout-shift.css +0 -9
  102. package/src/styles/utils/utility-classes.css +0 -1395
  103. package/src/styles/utils/utils.css +0 -2
@@ -1,12 +1,8 @@
1
- @layer byline-base,
2
- byline-functional,
3
- byline-utilities,
4
- byline-theme,
5
- byline-typography,
6
- byline-components;
1
+ @layer base, byline-base, components, byline-components,
2
+ byline-functional, utilities, byline-utilities,
3
+ theme, byline-theme, byline-typography;
7
4
 
8
5
  @import "./base/base.css";
9
6
  @import "./functional/functional.css";
10
- @import "./utils/utils.css";
11
7
  @import "./theme/theme.css";
12
8
  @import "./components/components.css";
@@ -1,67 +1,58 @@
1
1
  @layer byline-theme {
2
- /* input:-webkit-autofill, input:autofill,
3
- input:-webkit-autofill:hover, input:autofill:hover,
4
- input:-webkit-autofill:focus, input:autofill:focus,
5
- textarea:-webkit-autofill, textarea:autofill,
6
- textarea:-webkit-autofill:hover,textarea:autofill:hover,
7
- textarea:-webkit-autofill:focus,textarea:autofill:focus,
8
- select:-webkit-autofill, select:autofill,
9
- select:-webkit-autofill:hover,select:autofill:hover,
10
- select:-webkit-autofill:focus, select:autofill:focus {
11
- border: none;
12
- -webkit-text-fill-color: #ffb74d !important;
13
- -webkit-box-shadow: none !important;
14
- transition: background-color 5000s ease-in-out 0s;
15
- } */
2
+ /* Autofill styling is scoped — without this, host inputs outside the
3
+ admin area would also pick up the byline autofill colors. */
4
+ @scope (.byline-ui) {
5
+ input:autofill,
6
+ input:autofill:hover,
7
+ input:autofill:focus,
8
+ textarea:autofill,
9
+ textarea:autofill:hover,
10
+ textarea:autofill:focus,
11
+ select:autofill,
12
+ select:autofill:hover,
13
+ select:autofill:focus {
14
+ border: 1px solid #d89d3d;
15
+ -webkit-text-fill-color: black;
16
+ -webkit-box-shadow: 0 0 0px 1000px #fff2dc inset;
17
+ box-shadow: 0 0 0px 1000px #fff2dc inset;
18
+ transition: background-color 5000s ease-in-out 0s;
19
+ color: black;
20
+ background-color: rgb(250, 217, 167);
21
+ }
16
22
 
17
- input:autofill,
18
- input:autofill:hover,
19
- input:autofill:focus,
20
- textarea:autofill,
21
- textarea:autofill:hover,
22
- textarea:autofill:focus,
23
- select:autofill,
24
- select:autofill:hover,
25
- select:autofill:focus {
26
- border: 1px solid #d89d3d;
27
- -webkit-text-fill-color: black;
28
- -webkit-box-shadow: 0 0 0px 1000px #fff2dc inset;
29
- box-shadow: 0 0 0px 1000px #fff2dc inset;
30
- transition: background-color 5000s ease-in-out 0s;
31
- color: black;
32
- background-color: rgb(250, 217, 167);
33
- }
34
-
35
- /* 🌙 Dark via `.dark` class or [data-theme="dark"] attribute.
36
- * We rely on the consuming application to detect a user's preferred
37
- * color scheme - either by header or cookie, and set a root html
38
- * class or data attribute accordingly.
39
- */
23
+ /* 🌙 Dark via `.dark` class or [data-theme="dark"] attribute.
24
+ * We rely on the consuming application to detect a user's preferred
25
+ * color scheme - either by header or cookie, and set a root html
26
+ * class or data attribute accordingly. The .dark/[data-theme="dark"]
27
+ * ancestor lives outside the scope (typically on <html>); that's fine
28
+ * because the scope constraint applies to the matched input/textarea/select.
29
+ */
40
30
 
41
- .dark input:autofill,
42
- .dark input:autofill:hover,
43
- .dark input:autofill:focus,
44
- .dark textarea:autofill,
45
- .dark textarea:autofill:hover,
46
- .dark textarea:autofill:focus,
47
- .dark select:autofill,
48
- .dark select:autofill:hover,
49
- .dark select:autofill:focus,
50
- [data-theme="dark"] input:autofill,
51
- [data-theme="dark"] input:autofill:hover,
52
- [data-theme="dark"] input:autofill:focus,
53
- [data-theme="dark"] textarea:autofill,
54
- [data-theme="dark"] textarea:autofill:hover,
55
- [data-theme="dark"] textarea:autofill:focus,
56
- [data-theme="dark"] select:autofill,
57
- [data-theme="dark"] select:autofill:hover,
58
- [data-theme="dark"] select:autofill:focus {
59
- border: 1px solid var(--theme-600);
60
- -webkit-text-fill-color: white;
61
- -webkit-box-shadow: 0 0 0px 1000px var(--theme-600) inset;
62
- box-shadow: 0 0 0px 1000px var(--theme-600) inset;
63
- transition: background-color 5000s ease-in-out 0s;
64
- color: white;
65
- background-color: rgba(100, 100, 100, 0.5);
31
+ .dark input:autofill,
32
+ .dark input:autofill:hover,
33
+ .dark input:autofill:focus,
34
+ .dark textarea:autofill,
35
+ .dark textarea:autofill:hover,
36
+ .dark textarea:autofill:focus,
37
+ .dark select:autofill,
38
+ .dark select:autofill:hover,
39
+ .dark select:autofill:focus,
40
+ [data-theme="dark"] input:autofill,
41
+ [data-theme="dark"] input:autofill:hover,
42
+ [data-theme="dark"] input:autofill:focus,
43
+ [data-theme="dark"] textarea:autofill,
44
+ [data-theme="dark"] textarea:autofill:hover,
45
+ [data-theme="dark"] textarea:autofill:focus,
46
+ [data-theme="dark"] select:autofill,
47
+ [data-theme="dark"] select:autofill:hover,
48
+ [data-theme="dark"] select:autofill:focus {
49
+ border: 1px solid var(--theme-600);
50
+ -webkit-text-fill-color: white;
51
+ -webkit-box-shadow: 0 0 0px 1000px var(--theme-600) inset;
52
+ box-shadow: 0 0 0px 1000px var(--theme-600) inset;
53
+ transition: background-color 5000s ease-in-out 0s;
54
+ color: white;
55
+ background-color: rgba(100, 100, 100, 0.5);
56
+ }
66
57
  }
67
58
  }
@@ -4,72 +4,84 @@
4
4
  * Opinionated starter styles for HTML elements to provide sensible defaults
5
5
  * for new installations. These live in the byline-theme layer and are
6
6
  * easily overridden by consuming applications.
7
+ *
8
+ * Scoped to .byline-ui so the host's bare elements are untouched. The bare
9
+ * element selectors inside @scope match only elements within the boundary;
10
+ * `:scope` alone targets the scope root specifically.
11
+ *
12
+ * Note: `.dark X { ... }` selectors do NOT carry a `:scope` prefix on
13
+ * purpose. The scope constraint applies to the *matched element* (X must
14
+ * be in scope); the ancestor `.dark` can be anywhere — including on
15
+ * <html>, which is outside the scope in admin-only mode. That's exactly
16
+ * the behaviour we want.
7
17
  */
8
18
 
9
19
  @layer byline-theme {
10
- html {
11
- font-size: 1rem;
12
- color: var(--text);
13
- }
20
+ @scope (.byline-ui) {
21
+ :scope {
22
+ font-size: 1rem;
23
+ color: var(--text);
24
+ }
14
25
 
15
- /* Redeclared here to change the specificity and scope of --prose-body */
16
- html .not-dark {
17
- color: var(--text);
18
- }
26
+ /* Redeclared here to change the specificity and scope of --prose-body */
27
+ .not-dark {
28
+ color: var(--text);
29
+ }
19
30
 
20
- /* Default (light mode) */
21
- ::selection {
22
- background-color: var(--theme-600);
23
- color: white;
24
- }
31
+ /* Default (light mode) */
32
+ ::selection {
33
+ background-color: var(--theme-600);
34
+ color: white;
35
+ }
25
36
 
26
- /* Dark mode */
27
- .dark ::selection,
28
- [data-theme="dark"] ::selection {
29
- background-color: var(--theme-200);
30
- color: var(--gray-900);
31
- }
37
+ /* Dark mode — .dark/[data-theme="dark"] is typically on <html>, outside scope */
38
+ .dark ::selection,
39
+ [data-theme="dark"] ::selection {
40
+ background-color: var(--theme-200);
41
+ color: var(--gray-900);
42
+ }
32
43
 
33
- /* Headings */
34
- h1 {
35
- font-size: 1.75rem;
36
- font-weight: 600;
37
- line-height: 1.125;
38
- }
44
+ /* Headings */
45
+ h1 {
46
+ font-size: 1.75rem;
47
+ font-weight: 600;
48
+ line-height: 1.125;
49
+ }
39
50
 
40
- h2 {
41
- font-size: 1.5rem;
42
- font-weight: 600;
43
- line-height: 1.125;
44
- }
51
+ h2 {
52
+ font-size: 1.5rem;
53
+ font-weight: 600;
54
+ line-height: 1.125;
55
+ }
45
56
 
46
- h3 {
47
- font-size: 1.25rem;
48
- font-weight: 600;
49
- line-height: 1.1;
50
- }
57
+ h3 {
58
+ font-size: 1.25rem;
59
+ font-weight: 600;
60
+ line-height: 1.1;
61
+ }
51
62
 
52
- h4 {
53
- font-size: 1rem;
54
- font-weight: 600;
55
- line-height: 1.1;
56
- }
63
+ h4 {
64
+ font-size: 1rem;
65
+ font-weight: 600;
66
+ line-height: 1.1;
67
+ }
57
68
 
58
- /* External link indicator */
59
- .external-link::after {
60
- content: "";
61
- display: inline-block;
62
- background-image: url("/external-link-light.svg");
63
- background-repeat: no-repeat;
64
- background-position: 20% 50%;
65
- background-size: 65% auto;
66
- width: 1.1rem;
67
- height: 1.1rem;
68
- margin-right: -5px;
69
- }
69
+ /* External link indicator */
70
+ .external-link::after {
71
+ content: "";
72
+ display: inline-block;
73
+ background-image: url("/external-link-light.svg");
74
+ background-repeat: no-repeat;
75
+ background-position: 20% 50%;
76
+ background-size: 65% auto;
77
+ width: 1.1rem;
78
+ height: 1.1rem;
79
+ margin-right: -5px;
80
+ }
70
81
 
71
- .dark .external-link::after,
72
- [data-theme="dark"] .external-link::after {
73
- background-image: url("/external-link-dark.svg");
82
+ .dark .external-link::after,
83
+ [data-theme="dark"] .external-link::after {
84
+ background-image: url("/external-link-dark.svg");
85
+ }
74
86
  }
75
87
  }
@@ -1,4 +1,7 @@
1
1
  @layer byline-theme {
2
+ /* Custom property declarations stay on :root so they cascade everywhere.
3
+ They don't conflict with host CSS and are read by .component--scroller
4
+ instances anywhere in the tree. */
2
5
  :root {
3
6
  --scroll-bar-thumb: var(--theme-400);
4
7
  --scroll-bar-track: var(--theme-600);
@@ -11,44 +14,50 @@
11
14
  --scroll-bar-track: var(--canvas-900);
12
15
  }
13
16
 
14
- /* For Google Chrome */
15
- ::-webkit-scrollbar {
16
- width: 0.6em;
17
- height: 0.6em;
18
- }
19
-
20
- ::-webkit-scrollbar-thumb {
21
- background: var(--scroll-bar-thumb);
22
- }
23
-
24
- ::-webkit-scrollbar-track {
25
- background: var(--scroll-bar-track);
26
- }
27
-
28
- ::-webkit-scrollbar-corner {
29
- background: var(--scroll-bar-track);
30
- }
31
-
32
- /* Firefox */
33
- html {
34
- scrollbar-width: thin;
35
- scrollbar-color: var(--scroll-bar-thumb) var(--scroll-bar-track);
36
- }
37
-
38
- .component--scroller {
39
- --scroll-bar-thumb: var(--scroll-bar-thumb);
40
- --scroll-bar-track: var(--scroll-bar-track);
41
- }
42
-
43
- .dark .component--scroller,
44
- [data-theme="dark"] .component--scroller {
45
- --scroll-bar-thumb: var(--scroll-bar-thumb);
46
- --scroll-bar-track: var(--scroll-bar-track);
47
- }
48
-
49
- .component--scroller {
50
- overflow-y: auto;
51
- scrollbar-width: thin;
52
- scrollbar-color: var(--scroll-bar-thumb) var(--scroll-bar-track);
17
+ /* Scrollbar styling itself is scoped to .byline-ui — without this, the
18
+ ::-webkit-scrollbar pseudo-elements would re-style the host page's
19
+ scrollbars too. */
20
+ @scope (.byline-ui) {
21
+ /* For Google Chrome */
22
+ ::-webkit-scrollbar {
23
+ width: 0.6em;
24
+ height: 0.6em;
25
+ }
26
+
27
+ ::-webkit-scrollbar-thumb {
28
+ background: var(--scroll-bar-thumb);
29
+ }
30
+
31
+ ::-webkit-scrollbar-track {
32
+ background: var(--scroll-bar-track);
33
+ }
34
+
35
+ ::-webkit-scrollbar-corner {
36
+ background: var(--scroll-bar-track);
37
+ }
38
+
39
+ /* Firefox — applied to the scope root (html in whole-app mode, the
40
+ wrapper div in admin-only mode) */
41
+ :scope {
42
+ scrollbar-width: thin;
43
+ scrollbar-color: var(--scroll-bar-thumb) var(--scroll-bar-track);
44
+ }
45
+
46
+ .component--scroller {
47
+ --scroll-bar-thumb: var(--scroll-bar-thumb);
48
+ --scroll-bar-track: var(--scroll-bar-track);
49
+ }
50
+
51
+ .dark .component--scroller,
52
+ [data-theme="dark"] .component--scroller {
53
+ --scroll-bar-thumb: var(--scroll-bar-thumb);
54
+ --scroll-bar-track: var(--scroll-bar-track);
55
+ }
56
+
57
+ .component--scroller {
58
+ overflow-y: auto;
59
+ scrollbar-width: thin;
60
+ scrollbar-color: var(--scroll-bar-thumb) var(--scroll-bar-track);
61
+ }
53
62
  }
54
63
  }