@jungherz-de/glasskit 1.35.1 → 1.37.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/glasskit.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /* ============================================================
2
2
  GLASSKIT COMPONENT LIBRARY
3
- Jungherz GmbH – v1.35.1
3
+ Jungherz GmbH – v1.37.0
4
4
 
5
5
  Features:
6
6
  - Scoped Reset (box-sizing fix)
@@ -928,7 +928,11 @@ a.glass-btn { display: inline-flex; text-decoration: none; }
928
928
  stroke-linecap: round; stroke-linejoin: round;
929
929
  }
930
930
 
931
+ /* No margin of its own (since 1.36.0): the browser's 1em above and below
932
+ made the card 82px high instead of 54px wherever no page reset reached
933
+ the p — GlassKit's own showcase, the shadow root of <glk-status>. */
931
934
  .glass-status p {
935
+ margin: 0;
932
936
  color: var(--gl-status-color, var(--gl-color-text-muted));
933
937
  font-size: var(--gl-font-size-sm);
934
938
  font-weight: var(--gl-font-weight-normal);
@@ -967,6 +971,17 @@ a.glass-btn { display: inline-flex; text-decoration: none; }
967
971
  .glass-input-group--label-end > .glass-input-group__label-end { grid-column: 2; grid-row: 1; justify-self: end; }
968
972
  .glass-input-group__label-end { font-size: var(--gl-font-size-sm); }
969
973
  .glass-input-group__label-end[hidden] { display: none; }
974
+ /* A character counter at the end of the label row (since 1.37.0): "12/145"
975
+ for a field with a maximum length, in the error colour past it — a value
976
+ set by script may be longer, the limit only stops typing. In
977
+ __label-end, after a link that stands there. */
978
+ .glass-input-group__counter {
979
+ margin-inline-start: var(--gl-space-sm);
980
+ color: var(--gl-color-text-muted);
981
+ font-variant-numeric: tabular-nums;
982
+ }
983
+ .glass-input-group__counter.is-over { color: var(--gl-color-error); }
984
+ .glass-input-group__counter[hidden] { display: none; }
970
985
 
971
986
  .glass-input {
972
987
  width: 100%; height: var(--gl-control-height, 52px);
@@ -1153,6 +1168,11 @@ a.glass-btn { display: inline-flex; text-decoration: none; }
1153
1168
  box-shadow: var(--gl-shadow-focus), var(--gl-inset-medium);
1154
1169
  }
1155
1170
  .glass-select option { background: var(--gl-color-bg-mid); color: var(--gl-color-text); }
1171
+ /* A placeholder (since 1.37.0): a first option with an empty value,
1172
+ disabled and hidden — the native pattern — is chosen while nothing is,
1173
+ and the field says it in the placeholder colour, as an input does. A
1174
+ value that matched no option showed the first real one as chosen. */
1175
+ .glass-select:has(> option:first-child[value=""][disabled]:checked) { color: var(--gl-placeholder); }
1156
1176
  /* Disabled like .glass-input. */
1157
1177
  .glass-select:disabled,
1158
1178
  .glass-textarea:disabled { opacity: 0.4; cursor: not-allowed; }
@@ -2717,7 +2737,7 @@ a.glass-tab-bar__item { text-decoration: none; color: inherit; }
2717
2737
  22. AVATAR
2718
2738
  ============================================================ */
2719
2739
  .glass-avatar {
2720
- width: 44px; height: 44px;
2740
+ width: var(--gl-avatar-size, 44px); height: var(--gl-avatar-size, 44px);
2721
2741
  border-radius: var(--gl-radius-pill);
2722
2742
  background: var(--gl-surface-3);
2723
2743
  backdrop-filter: blur(var(--gl-blur-soft));
@@ -2727,14 +2747,18 @@ a.glass-tab-bar__item { text-decoration: none; color: inherit; }
2727
2747
  overflow: hidden;
2728
2748
  box-shadow: var(--gl-shadow-glow), var(--gl-inset-medium);
2729
2749
  flex-shrink: 0;
2730
- font-size: var(--gl-font-size-btn);
2750
+ font-size: var(--gl-avatar-font-size, var(--gl-font-size-btn));
2731
2751
  font-weight: var(--gl-font-weight-semibold);
2732
2752
  color: var(--gl-color-text);
2733
2753
  }
2734
2754
  .glass-avatar img,
2735
2755
  .glass-avatar ::slotted(img) { width: 100%; height: 100%; object-fit: cover; }
2736
- .glass-avatar--sm { width: 32px; height: 32px; font-size: var(--gl-font-size-xs); }
2737
- .glass-avatar--lg { width: 56px; height: 56px; font-size: var(--gl-font-size-lg); }
2756
+ /* 44px, --sm 32px, --lg 56px. --gl-avatar-size (since 1.37.0) sets any
2757
+ other size, on the avatar or a container around it, and
2758
+ --gl-avatar-font-size the initials' size with it. In the leading box of a
2759
+ list row an avatar takes the box's size (see LIST). */
2760
+ .glass-avatar--sm { width: var(--gl-avatar-size, 32px); height: var(--gl-avatar-size, 32px); font-size: var(--gl-avatar-font-size, var(--gl-font-size-xs)); }
2761
+ .glass-avatar--lg { width: var(--gl-avatar-size, 56px); height: var(--gl-avatar-size, 56px); font-size: var(--gl-avatar-font-size, var(--gl-font-size-lg)); }
2738
2762
 
2739
2763
 
2740
2764
  /* ============================================================
@@ -3078,7 +3102,7 @@ a.glass-tab-bar__item { text-decoration: none; color: inherit; }
3078
3102
  .glass-list__item:not(:last-child)::after {
3079
3103
  content: '';
3080
3104
  position: absolute;
3081
- inset-inline-start: var(--gl-list-item-divider-inset, calc(var(--gl-space-lg) + 28px + var(--gl-space-sm)));
3105
+ inset-inline-start: var(--gl-list-item-divider-inset, calc(var(--gl-space-lg) + var(--gl-list-leading-width, 28px) + var(--gl-space-sm)));
3082
3106
  inset-inline-end: var(--gl-space-lg);
3083
3107
  bottom: 0;
3084
3108
  height: 1px;
@@ -3091,7 +3115,7 @@ a.glass-tab-bar__item { text-decoration: none; color: inherit; }
3091
3115
  inset-inline-start: var(--gl-list-item-divider-inset, var(--gl-space-lg));
3092
3116
  }
3093
3117
  .glass-list__item:has(.glass-list__leading--lg:not([hidden])):not(:last-child)::after {
3094
- inset-inline-start: var(--gl-list-item-divider-inset, calc(var(--gl-space-lg) + 40px + var(--gl-space-sm)));
3118
+ inset-inline-start: var(--gl-list-item-divider-inset, calc(var(--gl-space-lg) + var(--gl-list-leading-width, 40px) + var(--gl-space-sm)));
3095
3119
  }
3096
3120
  /* A drag handle at the start of the row (since 1.34.0): its width is the
3097
3121
  page's, so the line runs from the row's padding, as in a row without an
@@ -3138,7 +3162,9 @@ a.glass-tab-bar__item { text-decoration: none; color: inherit; }
3138
3162
  /* The chosen row of a list beside its detail (since 1.34.0) — the entry an
3139
3163
  editor next to it shows: a pill of raised glass inside the row, as the
3140
3164
  chosen tree row and the active row of a sidebar, with the title in the
3141
- heading colour and the icon in the accent. The state is .is-selected;
3165
+ heading colour (since 1.36.0; before, the title kept its own text colour
3166
+ and only the row took the heading colour) and the icon in the accent.
3167
+ The state is .is-selected;
3142
3168
  aria-current="true" (or aria-selected in a listbox) tells assistive
3143
3169
  technology. Hover and press leave it as it is; the keyboard ring stays
3144
3170
  around the row. While the row is a drop target of a drag, the pill makes
@@ -3157,7 +3183,7 @@ a.glass-tab-bar__item { text-decoration: none; color: inherit; }
3157
3183
  pointer-events: none;
3158
3184
  }
3159
3185
  .glass-list__item--interactive.is-selected:is(:hover, :active, :focus-visible) { background: transparent; }
3160
- .glass-list__item.is-selected .glass-list__title { font-weight: var(--gl-list-item-selected-weight, var(--gl-font-weight-semibold)); }
3186
+ .glass-list__item.is-selected .glass-list__title { color: inherit; font-weight: var(--gl-list-item-selected-weight, var(--gl-font-weight-semibold)); }
3161
3187
  .glass-list__item.is-selected .glass-list__leading { color: var(--gl-color-primary-text); }
3162
3188
 
3163
3189
  .glass-list__item--danger { color: var(--gl-color-error); }
@@ -3168,9 +3194,17 @@ a.glass-tab-bar__item { text-decoration: none; color: inherit; }
3168
3194
  .glass-list__item--accent .glass-list__title,
3169
3195
  .glass-list__item--accent .glass-list__leading { color: inherit; }
3170
3196
 
3197
+ /* --gl-list-leading-width (since 1.36.0) widens the box for more than an
3198
+ icon — a time and a chip before the text; the divider follows it. A
3199
+ length: for anything else set --gl-list-item-divider-inset as well.
3200
+ An avatar in the box takes its size (since 1.37.0): 28px, 40px in --lg —
3201
+ a contact list. A 44px one was cut by the 40px box, a 32px one looked
3202
+ lost in it. --gl-avatar-size on the avatar itself still decides. */
3171
3203
  .glass-list__leading {
3204
+ --gl-avatar-size: 28px;
3205
+ --gl-avatar-font-size: var(--gl-font-size-xs);
3172
3206
  flex-shrink: 0;
3173
- width: 28px;
3207
+ width: var(--gl-list-leading-width, 28px);
3174
3208
  height: 28px;
3175
3209
  display: flex;
3176
3210
  align-items: center;
@@ -3192,7 +3226,9 @@ a.glass-tab-bar__item { text-decoration: none; color: inherit; }
3192
3226
  stroke-linejoin: round;
3193
3227
  }
3194
3228
  .glass-list__leading--lg {
3195
- width: 40px;
3229
+ --gl-avatar-size: 40px;
3230
+ --gl-avatar-font-size: var(--gl-font-size-base);
3231
+ width: var(--gl-list-leading-width, 40px);
3196
3232
  height: 40px;
3197
3233
  border-radius: var(--gl-radius-xs);
3198
3234
  overflow: hidden;
@@ -4189,7 +4225,10 @@ dialog.glass-sheet-overlay::backdrop { background: transparent; }
4189
4225
  usable: no scrim and no blur, and only the panel takes the pointer — for
4190
4226
  a sheet opened with show() instead of showModal(), beside a list whose
4191
4227
  chosen row stays in view. --gl-sheet-z-index (1000) stacks it. */
4192
- /* The inset is the panel's margin: the dialog's own padding is undone. */
4228
+ /* The inset is the panel's margin: the dialog's own padding is undone.
4229
+ --gl-sheet-side-inset-block-start and -block-end (since 1.36.0) set the
4230
+ top and the bottom on their own — below a fixed top bar, say — and fall
4231
+ back to --gl-sheet-side-inset, which stays the side's and the way in. */
4193
4232
  .glass-sheet-overlay--start,
4194
4233
  .glass-sheet-overlay--end { align-items: stretch; }
4195
4234
  .glass-sheet-overlay--start { justify-content: flex-start; }
@@ -4197,6 +4236,7 @@ dialog.glass-sheet-overlay::backdrop { background: transparent; }
4197
4236
  :is(.glass-sheet-overlay--start, .glass-sheet-overlay--end) .glass-sheet {
4198
4237
  width: min(var(--gl-sheet-side-width, 440px), 100% - 2 * var(--gl-sheet-side-inset, 16px)); max-height: none;
4199
4238
  margin: var(--gl-sheet-side-inset, 16px);
4239
+ margin-block: var(--gl-sheet-side-inset-block-start, var(--gl-sheet-side-inset, 16px)) var(--gl-sheet-side-inset-block-end, var(--gl-sheet-side-inset, 16px));
4200
4240
  display: flex; flex-direction: column;
4201
4241
  padding-top: var(--gl-space-lg);
4202
4242
  border-radius: var(--gl-radius-card);
@@ -4229,7 +4269,9 @@ dialog.glass-sheet-overlay::backdrop { background: transparent; }
4229
4269
  (__eyebrow), something before it (__leading, a mark or an icon chip),
4230
4270
  something after it (__trailing, a badge) and a close button (__close) at
4231
4271
  its end. __head takes the title's place and its spacing; a title alone
4232
- in it stands as it did without one. */
4272
+ in it stands as it did without one. __subtitle (since 1.36.0) stands
4273
+ below the title, in the heading — a badge there leaves the title its
4274
+ width, where __trailing beside it squeezed it in a narrow sheet. */
4233
4275
  .glass-sheet__head { display: flex; align-items: center; gap: var(--gl-space-sm); margin: 0 0 8px; }
4234
4276
  .glass-sheet__heading { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
4235
4277
  .glass-sheet__head .glass-sheet__title { margin: 0; }
@@ -4238,17 +4280,30 @@ dialog.glass-sheet-overlay::backdrop { background: transparent; }
4238
4280
  letter-spacing: 0.3px; text-transform: uppercase;
4239
4281
  color: var(--gl-color-text-muted);
4240
4282
  }
4283
+ .glass-sheet__subtitle {
4284
+ display: flex; flex-wrap: wrap; align-items: center; gap: var(--gl-space-xs);
4285
+ margin-top: 2px;
4286
+ font-size: var(--gl-font-size-sm);
4287
+ color: var(--gl-color-text-muted);
4288
+ }
4241
4289
  .glass-sheet__leading,
4242
4290
  .glass-sheet__trailing { flex: none; display: flex; align-items: center; gap: var(--gl-space-xs); }
4291
+ /* An empty head takes no room either (since 1.36.0): display: flex beat
4292
+ the hidden attribute's own rule, and a sheet without a title started its
4293
+ content 8px lower than in 1.34.0. */
4294
+ .glass-sheet__head[hidden],
4243
4295
  .glass-sheet__eyebrow[hidden],
4296
+ .glass-sheet__subtitle[hidden],
4244
4297
  .glass-sheet__leading[hidden],
4245
4298
  .glass-sheet__trailing[hidden],
4246
4299
  .glass-sheet__close[hidden] { display: none; }
4247
- /* A round glass button, 32px, with a 44px target. */
4300
+ /* A round glass button, 32px, with a 44px target. --gl-sheet-close-size,
4301
+ --gl-sheet-close-icon-size (16px) and --gl-sheet-close-icon-stroke (2)
4302
+ resize it and its glyph (since 1.36.0). */
4248
4303
  .glass-sheet__close {
4249
4304
  -webkit-appearance: none; appearance: none;
4250
4305
  flex: none; position: relative;
4251
- width: 32px; height: 32px; margin-inline-end: -4px; padding: 0;
4306
+ width: var(--gl-sheet-close-size, 32px); height: var(--gl-sheet-close-size, 32px); margin-inline-end: -4px; padding: 0;
4252
4307
  display: inline-flex; align-items: center; justify-content: center;
4253
4308
  border: 1px solid var(--gl-border-subtle); border-radius: 50%;
4254
4309
  background: var(--gl-surface-2);
@@ -4262,8 +4317,9 @@ dialog.glass-sheet-overlay::backdrop { background: transparent; }
4262
4317
  .glass-sheet__close:hover { background: var(--gl-surface-3); color: var(--gl-color-text); }
4263
4318
  .glass-sheet__close:focus-visible { box-shadow: var(--gl-shadow-focus), var(--gl-inset-subtle); }
4264
4319
  .glass-sheet__close svg {
4265
- width: 16px; height: 16px; fill: none; stroke: currentColor;
4266
- stroke-width: 2; stroke-linecap: round;
4320
+ width: var(--gl-sheet-close-icon-size, 16px); height: var(--gl-sheet-close-icon-size, 16px);
4321
+ fill: none; stroke: currentColor;
4322
+ stroke-width: var(--gl-sheet-close-icon-stroke, 2); stroke-linecap: round;
4267
4323
  }
4268
4324
  .glass-sheet__body { font-size: var(--gl-font-size-base); line-height: 1.55; }
4269
4325
  .glass-sheet__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }