@charmland/gem 0.0.0-stage → 0.1.1

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 (121) hide show
  1. package/LICENSE +177 -0
  2. package/NOTICE +13 -0
  3. package/README.md +24 -2
  4. package/assets/fonts/Hypography-Italic.woff2 +0 -0
  5. package/assets/fonts/Hypography-Regular.woff2 +0 -0
  6. package/assets/fonts/PPFraktionMono-Variable.ttf +0 -0
  7. package/assets/fonts/PPFraktionMonoItalic-Variable.ttf +0 -0
  8. package/assets/fonts/PPFraktionSans-Variable.ttf +0 -0
  9. package/assets/fonts/PPFraktionSansItalic-Variable.ttf +0 -0
  10. package/bin/gem-elm.js +3 -0
  11. package/dist/browser/boot.d.ts +10 -0
  12. package/dist/browser/boot.js +14 -0
  13. package/dist/browser/color-scheme.d.ts +9 -0
  14. package/dist/browser/color-scheme.js +76 -0
  15. package/dist/browser/ports.d.ts +37 -0
  16. package/dist/browser/ports.js +90 -0
  17. package/dist/browser/router.d.ts +5 -0
  18. package/dist/browser/router.js +35 -0
  19. package/dist/browser/runtime.d.ts +12 -0
  20. package/dist/browser/runtime.js +22 -0
  21. package/dist/browser/tabs.d.ts +9 -0
  22. package/dist/browser/tabs.js +69 -0
  23. package/dist/default/theme.css +4664 -0
  24. package/dist/default/theme.js +13815 -0
  25. package/dist/node/build.d.ts +16 -0
  26. package/dist/node/build.js +48 -0
  27. package/dist/node/cli.d.ts +2 -0
  28. package/dist/node/cli.js +21 -0
  29. package/elm.json +28 -0
  30. package/package.json +86 -4
  31. package/src/app/Gem/App.elm +1268 -0
  32. package/src/app/Gem/CharmSticker.elm +35 -0
  33. package/src/app/Gem/Components.elm +292 -0
  34. package/src/app/Gem/Main.elm +17 -0
  35. package/src/app/Gem/Ports.elm +32 -0
  36. package/src/app/Gem/Shell.elm +957 -0
  37. package/src/browser/theme.d.ts +1 -0
  38. package/src/core/Gem/Node.elm +219 -0
  39. package/src/core/Gem/Page.elm +560 -0
  40. package/src/core/Gem/Render.elm +510 -0
  41. package/src/core/Gem/Slots.elm +11 -0
  42. package/src/styles/docs.scss +1083 -0
  43. package/src/styles/fonts.scss +51 -0
  44. package/src/styles/gem.scss +362 -0
  45. package/src/styles/theme.scss +8 -0
  46. package/src/styles/ui/burger.scss +272 -0
  47. package/src/styles/ui/button.scss +350 -0
  48. package/src/styles/ui/charmtone.scss +70 -0
  49. package/src/styles/ui/controls-extra.scss +316 -0
  50. package/src/styles/ui/controls.scss +110 -0
  51. package/src/styles/ui/display.scss +359 -0
  52. package/src/styles/ui/dropdown.scss +341 -0
  53. package/src/styles/ui/form.scss +314 -0
  54. package/src/styles/ui/menu.scss +200 -0
  55. package/src/styles/ui/meter.scss +124 -0
  56. package/src/styles/ui/modal.scss +545 -0
  57. package/src/styles/ui/oauth.scss +50 -0
  58. package/src/styles/ui/page-nav.scss +63 -0
  59. package/src/styles/ui/reset.scss +111 -0
  60. package/src/styles/ui/scrollbar.scss +39 -0
  61. package/src/styles/ui/search.scss +164 -0
  62. package/src/styles/ui/sidebar.scss +229 -0
  63. package/src/styles/ui/squircle.scss +60 -0
  64. package/src/styles/ui/table.scss +97 -0
  65. package/src/styles/ui/theme.scss +132 -0
  66. package/src/styles/ui/toast.scss +587 -0
  67. package/src/styles/ui/toc.scss +128 -0
  68. package/src/styles/ui/typography.scss +21 -0
  69. package/src/styles/ui/ui.scss +33 -0
  70. package/src/ui/Ui/Badge.elm +51 -0
  71. package/src/ui/Ui/Banner.elm +97 -0
  72. package/src/ui/Ui/Burger.elm +259 -0
  73. package/src/ui/Ui/Button.elm +261 -0
  74. package/src/ui/Ui/Card.elm +32 -0
  75. package/src/ui/Ui/Cards.elm +15 -0
  76. package/src/ui/Ui/ChoiceGroup.elm +62 -0
  77. package/src/ui/Ui/CopyButton.elm +139 -0
  78. package/src/ui/Ui/Divider.elm +16 -0
  79. package/src/ui/Ui/Dropdown.elm +600 -0
  80. package/src/ui/Ui/Empty.elm +41 -0
  81. package/src/ui/Ui/ErrorBubble.elm +34 -0
  82. package/src/ui/Ui/Field.elm +45 -0
  83. package/src/ui/Ui/FormStatus.elm +32 -0
  84. package/src/ui/Ui/Icon.elm +381 -0
  85. package/src/ui/Ui/InlineForm.elm +51 -0
  86. package/src/ui/Ui/Input.elm +113 -0
  87. package/src/ui/Ui/KeyValue.elm +25 -0
  88. package/src/ui/Ui/ListRow.elm +67 -0
  89. package/src/ui/Ui/Loader.elm +32 -0
  90. package/src/ui/Ui/Logo/Charm.elm +21 -0
  91. package/src/ui/Ui/Logo/CharmMark.elm +32 -0
  92. package/src/ui/Ui/Logo/CharmSticker.elm +35 -0
  93. package/src/ui/Ui/Logo/Discord.elm +26 -0
  94. package/src/ui/Ui/Logo/GitHub.elm +21 -0
  95. package/src/ui/Ui/Logo/Google.elm +21 -0
  96. package/src/ui/Ui/Logo/Hexy.elm +29 -0
  97. package/src/ui/Ui/Logo/Hyper.elm +42 -0
  98. package/src/ui/Ui/Logo/Integration.elm +117 -0
  99. package/src/ui/Ui/Logo/Prism.elm +35 -0
  100. package/src/ui/Ui/Logos.elm +115 -0
  101. package/src/ui/Ui/Menu.elm +348 -0
  102. package/src/ui/Ui/Meter.elm +132 -0
  103. package/src/ui/Ui/Modal.elm +247 -0
  104. package/src/ui/Ui/Motion.elm +32 -0
  105. package/src/ui/Ui/NumberBox.elm +86 -0
  106. package/src/ui/Ui/OAuthButton.elm +39 -0
  107. package/src/ui/Ui/PageNav.elm +65 -0
  108. package/src/ui/Ui/Pager.elm +49 -0
  109. package/src/ui/Ui/Search.elm +396 -0
  110. package/src/ui/Ui/SearchBox.elm +78 -0
  111. package/src/ui/Ui/Section.elm +21 -0
  112. package/src/ui/Ui/Sidebar.elm +239 -0
  113. package/src/ui/Ui/Stat.elm +29 -0
  114. package/src/ui/Ui/Switch.elm +34 -0
  115. package/src/ui/Ui/Table.elm +89 -0
  116. package/src/ui/Ui/Tabs.elm +280 -0
  117. package/src/ui/Ui/ToC.elm +120 -0
  118. package/src/ui/Ui/Toast.elm +1145 -0
  119. package/src/ui/Ui/Toolbar.elm +31 -0
  120. package/src/ui/Ui/TwoStepConfirm.elm +159 -0
  121. package/src/ui/Ui/Typography.elm +33 -0
@@ -0,0 +1,111 @@
1
+ @layer reset {
2
+ html {
3
+ font-size: 100%;
4
+ }
5
+
6
+ body,
7
+ form,
8
+ fieldset,
9
+ legend,
10
+ p,
11
+ h1,
12
+ h2,
13
+ h3,
14
+ h4,
15
+ h5,
16
+ h6,
17
+ ol,
18
+ ul,
19
+ dl,
20
+ dt,
21
+ dd,
22
+ pre,
23
+ blockquote,
24
+ th,
25
+ td,
26
+ address,
27
+ input,
28
+ textarea,
29
+ figure,
30
+ figcaption {
31
+ margin: 0;
32
+ padding: 0;
33
+ font-weight: normal;
34
+ font-style: normal;
35
+ text-align: left;
36
+ }
37
+
38
+ ol,
39
+ ul {
40
+ list-style-type: none;
41
+ }
42
+
43
+ img,
44
+ fieldset {
45
+ border-width: 0;
46
+ }
47
+
48
+ table {
49
+ border-collapse: collapse;
50
+ }
51
+
52
+ hr {
53
+ display: none;
54
+ }
55
+
56
+ sup {
57
+ vertical-align: top;
58
+ }
59
+
60
+ input[type="text"],
61
+ input[type="password"],
62
+ input[type="email"],
63
+ textarea {
64
+ -webkit-appearance: none;
65
+ border-radius: 0;
66
+ }
67
+
68
+ input[type="checkbox"],
69
+ input[type="radio"] {
70
+ cursor: pointer;
71
+ }
72
+
73
+ input[type="text"],
74
+ input[type="password"],
75
+ input[type="email"],
76
+ input[type="submit"],
77
+ textarea {
78
+ border-width: 0;
79
+ }
80
+
81
+ input:focus,
82
+ textarea:focus {
83
+ outline: none;
84
+ }
85
+
86
+ button,
87
+ input[type="submit"] {
88
+ border: none;
89
+ }
90
+
91
+ /* Remove grey highlight on tap */
92
+ body {
93
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
94
+ }
95
+
96
+ /* Mozilla dotted-border fix */
97
+ :focus {
98
+ outline-style: none;
99
+ -moz-outline-style: none;
100
+ outline: 0;
101
+ }
102
+
103
+ /* Border-box is way easier to work with than the W3C default box model. */
104
+ *,
105
+ *:before,
106
+ *:after {
107
+ -moz-box-sizing: border-box;
108
+ -webkit-box-sizing: border-box;
109
+ box-sizing: border-box;
110
+ }
111
+ }
@@ -0,0 +1,39 @@
1
+ @use "charmtone";
2
+
3
+ // Scrollbars drawn by the Meter's recipe: a rounded thumb carrying
4
+ // the Meter's charple-to-dolly gradient over a recessed track, in both
5
+ // themes. The light theme used to take the Meter's light stops
6
+ // (zest-to-bok), but a yellow thumb reads as a stray highlight on salt;
7
+ // the purple stays the brand mark either way. Two specs, both declared
8
+ // — engines that don't know a property ignore it. Chromium/WebKit render
9
+ // the gradient on the thumb directly; Firefox's scrollbar-color takes
10
+ // flat colors only, so there the thumb is the gradient's charple start.
11
+
12
+ * {
13
+ scrollbar-width: thin;
14
+ scrollbar-color: charmtone.$charple var(--well);
15
+ }
16
+
17
+ *::-webkit-scrollbar {
18
+ width: 0.625rem;
19
+ height: 0.625rem;
20
+ }
21
+
22
+ *::-webkit-scrollbar-track {
23
+ border-radius: 9999px;
24
+ background: var(--well);
25
+ }
26
+
27
+ *::-webkit-scrollbar-thumb {
28
+ border-radius: 9999px;
29
+ background: linear-gradient(90deg, charmtone.$charple, charmtone.$dolly);
30
+ border: 1px solid var(--bg);
31
+
32
+ &:hover {
33
+ background: linear-gradient(90deg, charmtone.$hazy, charmtone.$mauve);
34
+ }
35
+ }
36
+
37
+ *::-webkit-scrollbar-corner {
38
+ background: var(--well);
39
+ }
@@ -0,0 +1,164 @@
1
+ @use "charmtone";
2
+ @use "controls" as *;
3
+
4
+ // The search combobox: the recessed field with the fading clear
5
+ // button, and a results menu pinned beneath it in the dropdown's
6
+ // language — a charple surface with inset option rows.
7
+
8
+ .search {
9
+ position: relative;
10
+ flex: 1;
11
+ min-width: 0;
12
+ display: flex;
13
+
14
+ .search-input {
15
+ flex: 1;
16
+ width: 100%;
17
+ height: $control-height;
18
+ padding: 0.6rem 3rem 0.6rem 0.75rem;
19
+ border: $control-border solid transparent;
20
+ border-radius: calc(0.75rem * var(--squircle-scale, 1));
21
+ background: $control-fill;
22
+ color: var(--fg);
23
+ font-family: inherit;
24
+ font-size: 1rem;
25
+ transition: border-color 125ms ease;
26
+
27
+ &::placeholder {
28
+ color: var(--tertiary);
29
+ }
30
+
31
+ &::-webkit-search-cancel-button,
32
+ &::-webkit-search-decoration {
33
+ appearance: none;
34
+ }
35
+
36
+ &:focus-visible {
37
+ @include control-focus;
38
+ }
39
+ }
40
+
41
+ .clear {
42
+ position: absolute;
43
+ top: 50%;
44
+ right: 0.45rem;
45
+ translate: 0 -50%;
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ width: 2.25rem;
50
+ height: 2.25rem;
51
+ padding: 0;
52
+ border: none;
53
+ border-radius: 50%;
54
+ background: transparent;
55
+ color: var(--tertiary);
56
+ opacity: 0;
57
+ pointer-events: none;
58
+ transition:
59
+ color 125ms ease,
60
+ opacity 150ms ease;
61
+
62
+ svg {
63
+ width: 1.1rem;
64
+ height: 1.1rem;
65
+ }
66
+
67
+ &.visible {
68
+ opacity: 1;
69
+ pointer-events: auto;
70
+ }
71
+
72
+ &:hover {
73
+ color: charmtone.$coral;
74
+ }
75
+ }
76
+
77
+ // The results menu: the dropdown's open treatment, sized to the
78
+ // field's width.
79
+ .search-menu {
80
+ position: absolute;
81
+ top: calc(100% + 0.25rem);
82
+ left: 0;
83
+ right: 0;
84
+ z-index: 30;
85
+ display: flex;
86
+ flex-direction: column;
87
+ padding: 0.25rem;
88
+ border-radius: calc(0.75rem * var(--squircle-scale, 1));
89
+ background: charmtone.$charple;
90
+ color: charmtone.$salt;
91
+ box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
92
+ max-height: 18rem;
93
+ overflow-y: auto;
94
+ }
95
+
96
+ .search-item {
97
+ display: flex;
98
+ flex-direction: column;
99
+ gap: 0.15rem;
100
+ padding: 0.5rem 0.75rem;
101
+ border-radius: calc(0.5rem * var(--squircle-scale, 1));
102
+ cursor: pointer;
103
+
104
+ .search-item-head {
105
+ display: flex;
106
+ align-items: baseline;
107
+ justify-content: space-between;
108
+ gap: 1rem;
109
+ }
110
+
111
+ .label {
112
+ font-weight: 580;
113
+ line-height: 1.35;
114
+ }
115
+
116
+ .detail {
117
+ font-size: 0.75rem;
118
+ font-weight: 520;
119
+ line-height: 1.35;
120
+ color: rgba(charmtone.$salt, 0.7);
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ white-space: nowrap;
124
+ flex-shrink: 0;
125
+ }
126
+
127
+ // The matched line under the title, with the query words marked —
128
+ // the docus pattern: hit text in the house pink on a translucent
129
+ // chip.
130
+ .search-snippet {
131
+ font-size: 0.75rem;
132
+ line-height: 1.45;
133
+ color: rgba(charmtone.$salt, 0.85);
134
+ display: -webkit-box;
135
+ -webkit-line-clamp: 2;
136
+ -webkit-box-orient: vertical;
137
+ overflow: hidden;
138
+
139
+ .search-hit {
140
+ background: rgb(255 255 255 / 22%);
141
+ color: charmtone.$salt;
142
+ font-weight: 620;
143
+ border-radius: calc(0.25rem * var(--squircle-scale, 1));
144
+ padding: 0 0.15em;
145
+ }
146
+ }
147
+
148
+ &:hover,
149
+ &.selected {
150
+ background: charmtone.$blush;
151
+
152
+ .search-hit {
153
+ background: rgb(255 255 255 / 35%);
154
+ }
155
+ }
156
+ }
157
+
158
+ .search-empty {
159
+ padding: 0.5rem 0.75rem;
160
+ border-radius: calc(0.5rem * var(--squircle-scale, 1));
161
+ color: rgba(charmtone.$salt, 0.75);
162
+ font-weight: 520;
163
+ }
164
+ }
@@ -0,0 +1,229 @@
1
+ @use "charmtone";
2
+ @use "controls" as *;
3
+
4
+ // The navigation rail, carried over from the Hyper dashboard: fixed
5
+ // items with the house hover sweep — a charple fill with salt ink,
6
+ // wiped in from the left via a two-cell mask position animation — and
7
+ // the blush edge on the active item.
8
+
9
+ .sidebar {
10
+ display: flex;
11
+ flex-direction: column;
12
+ width: 16rem;
13
+ flex-shrink: 0;
14
+
15
+ .sidebar-items {
16
+ flex: 1;
17
+ min-height: 0;
18
+ overflow-y: auto;
19
+
20
+ // Scroll shadows: a soft dark fade shows at the inner top edge
21
+ // while content hides above, and at the inner bottom edge while
22
+ // content hides below. Pure CSS (Lea Verou's scrolling shadows):
23
+ // the two cover gradients ride the content (background-attachment:
24
+ // local) and hide their shadow when scrolled to that edge, so a
25
+ // short, unscrolled list shows neither.
26
+ background:
27
+ linear-gradient(var(--bg) 33%, rgb(255 255 255 / 0%)) local center top,
28
+ linear-gradient(rgb(255 255 255 / 0%), var(--bg) 67%) local center bottom,
29
+ radial-gradient(
30
+ farthest-side at 50% 0%,
31
+ rgb(0 0 0 / 30%),
32
+ rgb(0 0 0 / 0%)
33
+ )
34
+ scroll center top,
35
+ radial-gradient(
36
+ farthest-side at 50% 100%,
37
+ rgb(0 0 0 / 30%),
38
+ rgb(0 0 0 / 0%)
39
+ )
40
+ scroll center bottom;
41
+ background-repeat: no-repeat;
42
+ background-size:
43
+ 100% 4rem,
44
+ 100% 4rem,
45
+ 100% 1rem,
46
+ 100% 1rem;
47
+ background-attachment: local, local, scroll, scroll;
48
+ }
49
+
50
+ ul {
51
+ list-style: none;
52
+ display: flex;
53
+ flex-direction: column;
54
+ gap: 0;
55
+ padding: 0;
56
+ margin: 0;
57
+ }
58
+
59
+ // Nested categories step in from their parent, keeping the row inset.
60
+ ul ul {
61
+ padding-left: 0.75rem;
62
+ }
63
+
64
+ li.section {
65
+ margin-top: 1rem;
66
+
67
+ &:first-child {
68
+ margin-top: 0;
69
+ }
70
+
71
+ // The group heading is the loud row: a step above the page titles in
72
+ // size and in full-strength ink, so the sections read as the structure
73
+ // and the pages as their contents.
74
+ .section-label {
75
+ padding: 0.35rem 1.5rem;
76
+ font-weight: 620;
77
+ letter-spacing: -0.01em;
78
+ color: var(--fg);
79
+ }
80
+
81
+ // Collapsible groups: the header is a toggle button wearing the
82
+ // same quiet label, with a chevron that folds when collapsed. A
83
+ // collapsed group holding the active page lights the label, so
84
+ // the current location stays findable.
85
+ .section-toggle {
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: space-between;
89
+ width: 100%;
90
+ padding: 0.35rem 1.5rem;
91
+ border: none;
92
+ background: none;
93
+ cursor: pointer;
94
+ font: inherit;
95
+
96
+ .section-label {
97
+ padding: 0;
98
+ text-align: left;
99
+ }
100
+
101
+ .chevron {
102
+ display: flex;
103
+ color: var(--muted);
104
+ transition: transform 150ms ease;
105
+ }
106
+
107
+ &.collapsed .chevron {
108
+ transform: rotate(-90deg);
109
+ }
110
+
111
+ &:hover .section-label {
112
+ color: charmtone.$blush;
113
+ }
114
+
115
+ &.active .section-label {
116
+ color: charmtone.$blush;
117
+ }
118
+ }
119
+ }
120
+
121
+ li a {
122
+ position: relative;
123
+ display: flex;
124
+ align-items: center;
125
+ gap: 0.5rem;
126
+ padding: 0.5rem 1.5rem;
127
+ text-decoration: none;
128
+ color: var(--muted);
129
+ font-size: 0.9375rem;
130
+ font-weight: 520;
131
+ cursor: pointer;
132
+ --active-border: 0.375rem;
133
+
134
+ .icon {
135
+ display: flex;
136
+ align-items: center;
137
+ justify-content: center;
138
+ width: 1.125rem;
139
+ height: 1.125rem;
140
+ flex-shrink: 0;
141
+
142
+ svg {
143
+ width: 1rem;
144
+ height: 1rem;
145
+ }
146
+ }
147
+
148
+ // The sweep: an overlay span painting the item charple with salt
149
+ // ink, wiped in from the left. The mask is two cells wide and the
150
+ // position animates between them, so the sweep eases rather than
151
+ // fades.
152
+ > span.sweep {
153
+ position: absolute;
154
+ inset: 0;
155
+ padding: inherit;
156
+ display: flex;
157
+ align-items: center;
158
+ gap: inherit;
159
+ color: charmtone.$salt;
160
+ background: charmtone.$charple;
161
+ pointer-events: none;
162
+ -webkit-mask-image: linear-gradient(to right, black 50%, transparent 50%);
163
+ mask-image: linear-gradient(to right, black 50%, transparent 50%);
164
+ -webkit-mask-size: 200% 100%;
165
+ mask-size: 200% 100%;
166
+ -webkit-mask-position: 100% 0;
167
+ mask-position: 100% 0;
168
+ transition:
169
+ -webkit-mask-position 125ms ease,
170
+ mask-position 125ms ease;
171
+ }
172
+
173
+ &:hover > span.sweep {
174
+ -webkit-mask-position: 0% 0;
175
+ mask-position: 0% 0;
176
+ }
177
+ }
178
+
179
+ // A group's rows indent once, so the hierarchy still reads when the
180
+ // heading is the loud row. A labeled group is one list: the header's
181
+ // `li.section` followed by its rows, hence the sibling combinator.
182
+ ul > li.section ~ li > a {
183
+ padding-left: 2.25rem;
184
+ }
185
+
186
+ li.active a {
187
+ border-left: var(--active-border) solid charmtone.$blush;
188
+ padding-left: calc(1.5rem - var(--active-border));
189
+ color: var(--fg);
190
+ font-weight: 620;
191
+ }
192
+
193
+ ul > li.section ~ li.active > a {
194
+ padding-left: calc(2.25rem - var(--active-border));
195
+ }
196
+
197
+ .sidebar-footer {
198
+ padding-top: 0.75rem;
199
+ border-top: 1px solid var(--frame);
200
+ }
201
+
202
+ // The narrow, icon-only rail: no sweep overlay to keep the glyphs
203
+ // quiet; the active item becomes a recessed pill.
204
+ &.narrow {
205
+ width: 4rem;
206
+
207
+ .label,
208
+ li.section .section-label {
209
+ display: none;
210
+ }
211
+
212
+ li a {
213
+ justify-content: center;
214
+ padding: 0.6rem 0;
215
+ }
216
+
217
+ li a > span.sweep {
218
+ display: none;
219
+ }
220
+
221
+ li.active a {
222
+ border-left-width: 0;
223
+ border-radius: calc(0.5rem * var(--squircle-scale, 1));
224
+ background: var(--well);
225
+ padding-left: 0.6rem;
226
+ padding-right: 0.6rem;
227
+ }
228
+ }
229
+ }
@@ -0,0 +1,60 @@
1
+ // Squircles.
2
+ //
3
+ // `border-radius` draws a circular arc at each corner; `corner-shape`
4
+ // (CSS Borders 4) swaps that arc for a superellipse — the continuous
5
+ // corner Apple's hardware uses. It ships in Chromium and is behind
6
+ // flags in the other engines, so the block is gated: a browser without
7
+ // it keeps the circular corner, which is the same shape at these
8
+ // radii.
9
+ //
10
+ // It goes on every rounded corner, because the property only acts
11
+ // where there is a radius to shape — an element with none is
12
+ // untouched. The exceptions are the shapes whose radius *is* the shape
13
+ // rather than a corner arc: the true circles and the pills, which a
14
+ // superellipse would flatten into rounded squares.
15
+ //
16
+ // The radius scaling: a squircle reads squarer than the circular arc
17
+ // it replaces at the same radius (it fills more of the corner, and a
18
+ // 44px field spends a quarter of its height on the corner).
19
+ // `--squircle-scale` is the answer: every radius in the library is
20
+ // multiplied by it while the continuous corner is on, so the corner
21
+ // reads as round as the legacy one. Measured, a squircle needs about
22
+ // 1.8x the radius to match the circular arc's 45-degree cut; the eye
23
+ // calls it a good deal less than that, so this is a knob, not a
24
+ // derivation. At 1 it is the legacy geometry exactly.
25
+ //
26
+ // The host opts in by putting the scope class on the app's root —
27
+ // `.layout`, `.shell`, or the landing's `.home-landing`. Without it
28
+ // the circular radii stand, so the host chooses when the continuous
29
+ // corners arrive.
30
+
31
+ // How much a radius grows while the continuous corner is on, so the
32
+ // squircle reads as round as the circular arc it replaces.
33
+ $squircle-scale: 2;
34
+
35
+ @supports (corner-shape: squircle) {
36
+ .layout,
37
+ .shell,
38
+ .home-landing {
39
+ --squircle-scale: #{$squircle-scale};
40
+
41
+ * {
42
+ corner-shape: squircle;
43
+ }
44
+
45
+ // Their radius is the whole shape, so there is no squircle to
46
+ // compensate for and the legacy value stands.
47
+ .loader,
48
+ .switch,
49
+ .badge,
50
+ .toast-count,
51
+ .search-box .clear,
52
+ .dropdown .search .clear,
53
+ .nav-close,
54
+ .close,
55
+ .burger-close {
56
+ corner-shape: round;
57
+ --squircle-scale: 1;
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,97 @@
1
+ @use "charmtone";
2
+ @use "controls" as *;
3
+
4
+ // The table shell: a hairline frame on the page color. The header
5
+ // band is the recessed step, the same channel the tab track uses.
6
+
7
+ .table-wrap {
8
+ border: 1px solid var(--frame);
9
+ border-radius: calc(0.75rem * var(--squircle-scale, 1));
10
+ background: var(--bg);
11
+ overflow: auto;
12
+ }
13
+
14
+ table {
15
+ width: 100%;
16
+ border-collapse: separate;
17
+ border-spacing: 0;
18
+ font-size: 0.9rem;
19
+ }
20
+
21
+ th,
22
+ td {
23
+ padding: 0.85rem 1rem;
24
+ text-align: left;
25
+ vertical-align: middle;
26
+ }
27
+
28
+ thead th {
29
+ border-bottom: 1px solid var(--frame);
30
+ font-size: 0.75rem;
31
+ font-weight: 650;
32
+ letter-spacing: 0.06em;
33
+ color: var(--muted);
34
+ white-space: nowrap;
35
+ }
36
+
37
+ tbody tr {
38
+ transition: background 125ms ease;
39
+
40
+ &:hover {
41
+ background: rgba(charmtone.$salt, 0.04);
42
+ }
43
+ }
44
+
45
+ tbody td {
46
+ border-bottom: 1px solid var(--rule);
47
+ }
48
+
49
+ tbody tr:last-child td {
50
+ border-bottom: none;
51
+ }
52
+
53
+ td.num,
54
+ th.num {
55
+ text-align: right;
56
+ font-variant-numeric: tabular-nums;
57
+ }
58
+
59
+ tfoot td {
60
+ font-size: 0.8125rem;
61
+ font-weight: 650;
62
+ color: var(--muted);
63
+ border-top: 1px solid var(--frame);
64
+ }
65
+
66
+ table a {
67
+ color: inherit;
68
+ font-weight: 650;
69
+ text-decoration: none;
70
+
71
+ &:hover {
72
+ color: charmtone.$blush;
73
+ }
74
+ }
75
+
76
+ .date-cell {
77
+ white-space: nowrap;
78
+ font-variant-numeric: tabular-nums;
79
+ color: var(--muted);
80
+ font-size: 0.875rem;
81
+ }
82
+
83
+ .status-cell {
84
+ white-space: nowrap;
85
+ }
86
+
87
+ .actions-cell {
88
+ width: 1%;
89
+ white-space: nowrap;
90
+ text-align: right;
91
+
92
+ button {
93
+ @include control-size($control-height-sm);
94
+ padding-inline: 0.75rem;
95
+ font-size: 0.875rem;
96
+ }
97
+ }