@pontive/pontkit-core 1.52.0 → 1.53.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/dist/styles.css CHANGED
@@ -48,6 +48,8 @@
48
48
  * filter.css the blur unit (--pont-ref-filter-blur) and the blur scale derived from it
49
49
  * layout.css aspect ratios, box-sizing, align-items, align-content and justify-content keywords
50
50
  * (ref) and the items, content and justify roles (sem)
51
+ * mode.css the mode switches (sem): blend and the light/dark display keywords that follow the
52
+ * colour scheme
51
53
  * motion.css durations, easings, transition properties (ref) and the transition/animation roles (sem)
52
54
  * opacity.css the opacity unit (--pont-ref-opacity), none/full, and the disabled role
53
55
  * radius.css the radius knob (--pont-ref-radius) and the ref scale derived from it
@@ -55,7 +57,6 @@
55
57
  * the ring widths and ring shadows (focus, invalid, offset; sem)
56
58
  * typography.css font stacks (ref) and roles (sem), size, weight, tracking and leading scales (ref),
57
59
  * the default weight, tracking and leading (sem)
58
- * sem/ mode switches (mode.css)
59
60
  */
60
61
 
61
62
  /* ./border.css */
@@ -1624,6 +1625,46 @@
1624
1625
  }
1625
1626
  }
1626
1627
 
1628
+ /* ./mode.css */
1629
+ /*
1630
+ * ===========================================================================
1631
+ * MODE TOKENS
1632
+ * ===========================================================================
1633
+ */
1634
+
1635
+ /*
1636
+ * --------------------------------------------------
1637
+ * MODE SEMANTIC TOKENS
1638
+ * --------------------------------------------------
1639
+ *
1640
+ * mode switches: non-colour values that follow the colour scheme
1641
+ * (docs/11-tokens.md §6). They let component CSS react to dark mode without a
1642
+ * `.dark` selector of its own. Type `keyword`: they are not themable (the
1643
+ * validator rejects them), because they follow the mode, not the brand.
1644
+ *
1645
+ * mode-blend blend for an overlay that must stay visible on any
1646
+ * image (avatar ring: darken / lighten)
1647
+ * mode-light-display `display` for content shown only in light mode
1648
+ * mode-dark-display `display` for content shown only in dark mode
1649
+ */
1650
+
1651
+ @layer pont.tokens {
1652
+ :root {
1653
+ --pont-sem-mode-blend: darken;
1654
+ --pont-sem-mode-light-display: block;
1655
+ --pont-sem-mode-dark-display: none;
1656
+ }
1657
+
1658
+ :root.dark,
1659
+ :root[data-theme="dark"],
1660
+ .dark,
1661
+ [data-theme="dark"] {
1662
+ --pont-sem-mode-blend: lighten;
1663
+ --pont-sem-mode-light-display: none;
1664
+ --pont-sem-mode-dark-display: block;
1665
+ }
1666
+ }
1667
+
1627
1668
  /* ./motion.css */
1628
1669
  /*
1629
1670
  * ===========================================================================
@@ -2291,35 +2332,6 @@
2291
2332
  }
2292
2333
  }
2293
2334
 
2294
- /* ./sem/mode.css */
2295
- /*
2296
- * sem · mode switches: non-colour values that follow the colour scheme
2297
- * (docs/11-tokens.md §6). They let component CSS react to dark mode without a
2298
- * `.dark` selector of its own. Type `keyword`: they are not themable (the
2299
- * validator rejects them), because they follow the mode, not the brand.
2300
- *
2301
- * mode-blend blend for an overlay that must stay visible on any
2302
- * image (avatar ring: darken / lighten)
2303
- * mode-light-display `display` for content shown only in light mode
2304
- * mode-dark-display `display` for content shown only in dark mode
2305
- */
2306
- @layer pont.tokens {
2307
- :root {
2308
- --pont-sem-mode-blend: darken;
2309
- --pont-sem-mode-light-display: block;
2310
- --pont-sem-mode-dark-display: none;
2311
- }
2312
-
2313
- :root.dark,
2314
- :root[data-theme="dark"],
2315
- .dark,
2316
- [data-theme="dark"] {
2317
- --pont-sem-mode-blend: lighten;
2318
- --pont-sem-mode-light-display: none;
2319
- --pont-sem-mode-dark-display: block;
2320
- }
2321
- }
2322
-
2323
2335
  /* ./base.css */
2324
2336
  /*
2325
2337
  * ===========================================================================
@@ -4073,75 +4085,243 @@
4073
4085
 
4074
4086
  /* ../primitives/kbd/kbd.css */
4075
4087
  /*
4076
- * Kbd. shadcn (Base UI, Vega):
4077
- * kbd: "pointer-events-none inline-flex items-center justify-center select-none" + .cn-kbd
4078
- * group: "inline-flex items-center" + .cn-kbd-group (gap-1)
4088
+ * ===========================================================================
4089
+ * KBD STYLES
4090
+ * ===========================================================================
4091
+ *
4092
+ * shadcn/ui Base UI x Vega:
4093
+ * root:
4094
+ * pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none
4095
+ * in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10
4096
+ * [&_svg:not([class*='size-'])]:size-3
4097
+ * group:
4098
+ * inline-flex items-center gap-1
4099
+ *
4100
+ * Differences:
4101
+ * - Every svg in a kbd takes the icon size, omitting the
4102
+ * `[&_svg:not([class*='size-'])]:size-*` condition shadcn typically uses
4103
+ * for icons.
4079
4104
  *
4080
- * Tokens (docs/11-tokens.md): `--pont-kbd-*`. Inside a tooltip the kbd
4081
- * switches to the inverted colours (`--pont-kbd-tooltip-bg`, defaulting to
4082
- * `--pont-sem-color-inverse-subtle`; docs/11-tokens.md §6).
4105
+ * Tokens (docs/11-tokens.md): `--pont-kbd-*`, and `--pont-kbd-group-*` for
4106
+ * the group. The base block covers both elements, so it declares every
4107
+ * private this stylesheet owns (11 §4). Inside a tooltip the kbd switches to
4108
+ * the inverted colours (`--pont-kbd-tooltip-color-bg` / `-color-fg`,
4109
+ * defaulting to `--pont-sem-color-inverse-subtle` / `-inverse-fg`, which
4110
+ * carry shadcn's `dark:` fill; docs/11-tokens.md §6).
4111
+ */
4112
+
4113
+ /*
4114
+ * ---------------------------------------------------------------------------
4115
+ * TOKENS
4116
+ * ---------------------------------------------------------------------------
4083
4117
  */
4118
+
4084
4119
  @layer pont.primitives {
4085
- /* ------------------------------------------------------------------ */
4086
- /* Tokens */
4087
- /* ------------------------------------------------------------------ */
4120
+ :is(
4121
+ pont-prim-kbd,
4122
+ pont-kbd,
4123
+ [data-pont-kbd],
4124
+ pont-prim-kbd-group,
4125
+ pont-kbd-group,
4126
+ [data-pont-kbd-group]
4127
+ ) {
4128
+ /** @token Align items */
4129
+ --_pont-kbd-items: var(
4130
+ --pont-kbd-items,
4131
+ var(--pont-ref-layout-items-center)
4132
+ );
4133
+ /** @token Justify content */
4134
+ --_pont-kbd-justify: var(
4135
+ --pont-kbd-justify,
4136
+ var(--pont-ref-layout-justify-center)
4137
+ );
4138
+
4139
+ /** @token Gap */
4140
+ --_pont-kbd-gap: var(--pont-kbd-gap, calc(var(--pont-ref-dimension) * 1));
4141
+
4142
+ /** @token Horizontal padding */
4143
+ --_pont-kbd-padding-x: var(
4144
+ --pont-kbd-padding-x,
4145
+ calc(var(--pont-ref-dimension) * 1)
4146
+ );
4147
+ /** @token Vertical padding */
4148
+ --_pont-kbd-padding-y: var(--pont-kbd-padding-y, 0);
4149
+ /** @token Top padding */
4150
+ --_pont-kbd-padding-top: var(
4151
+ --pont-kbd-padding-top,
4152
+ var(--_pont-kbd-padding-y)
4153
+ );
4154
+ /** @token Right padding */
4155
+ --_pont-kbd-padding-right: var(
4156
+ --pont-kbd-padding-right,
4157
+ var(--_pont-kbd-padding-x)
4158
+ );
4159
+ /** @token Bottom padding */
4160
+ --_pont-kbd-padding-bottom: var(
4161
+ --pont-kbd-padding-bottom,
4162
+ var(--_pont-kbd-padding-y)
4163
+ );
4164
+ /** @token Left padding */
4165
+ --_pont-kbd-padding-left: var(
4166
+ --pont-kbd-padding-left,
4167
+ var(--_pont-kbd-padding-x)
4168
+ );
4169
+
4170
+ /** @token Width */
4171
+ --_pont-kbd-width: var(
4172
+ --pont-kbd-width,
4173
+ var(--pont-ref-dimension-size-fit)
4174
+ );
4175
+ /** @token Min width */
4176
+ --_pont-kbd-min-width: var(
4177
+ --pont-kbd-min-width,
4178
+ calc(var(--pont-ref-dimension) * 5)
4179
+ );
4180
+ /** @token Height */
4181
+ --_pont-kbd-height: var(
4182
+ --pont-kbd-height,
4183
+ calc(var(--pont-ref-dimension) * 5)
4184
+ );
4185
+ /** @token Min height */
4186
+ --_pont-kbd-min-height: var(
4187
+ --pont-kbd-min-height,
4188
+ var(--pont-sem-dimension-size-min)
4189
+ );
4190
+
4191
+ /* Typography */
4192
+ /** @token Font */
4193
+ --_pont-kbd-font-family: var(
4194
+ --pont-kbd-font-family,
4195
+ var(--pont-sem-typography-font-body)
4196
+ );
4197
+ /** @token Size */
4198
+ --_pont-kbd-font-size: var(
4199
+ --pont-kbd-font-size,
4200
+ var(--pont-ref-typography-size-xs)
4201
+ );
4202
+ /** @token Weight */
4203
+ --_pont-kbd-font-weight: var(
4204
+ --pont-kbd-font-weight,
4205
+ var(--pont-ref-typography-weight-medium)
4206
+ );
4207
+ /** @token Tracking */
4208
+ --_pont-kbd-letter-spacing: var(
4209
+ --pont-kbd-letter-spacing,
4210
+ var(--pont-sem-typography-tracking)
4211
+ );
4212
+ /** @token Leading */
4213
+ --_pont-kbd-line-height: var(
4214
+ --pont-kbd-line-height,
4215
+ var(--pont-ref-typography-leading-of-xs)
4216
+ );
4088
4217
 
4089
- :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]) {
4090
4218
  /** @token Background */
4091
- --_pont-kbd-bg: var(--pont-kbd-bg, var(--pont-sem-color-muted));
4092
- /** @token Text */
4093
- --_pont-kbd-fg: var(--pont-kbd-fg, var(--pont-sem-color-muted-fg));
4094
- /** @token Corner radius */
4219
+ --_pont-kbd-color-bg: var(--pont-kbd-color-bg, var(--pont-sem-color-muted));
4220
+ /** @token Foreground */
4221
+ --_pont-kbd-color-fg: var(
4222
+ --pont-kbd-color-fg,
4223
+ var(--pont-sem-color-muted-fg)
4224
+ );
4225
+
4226
+ /** @token Radius */
4095
4227
  --_pont-kbd-radius: var(--pont-kbd-radius, var(--pont-ref-radius-sm));
4096
- /** @token Height */
4097
- --_pont-kbd-height: var(--pont-kbd-height, 1.25rem);
4098
- /** @token Label weight */
4099
- --_pont-kbd-font-weight: var(--pont-kbd-font-weight, var(--pont-ref-typography-weight-medium));
4228
+
4229
+ /** @token Icon size */
4230
+ --_pont-kbd-icon-size: var(
4231
+ --pont-kbd-icon-size,
4232
+ calc(var(--pont-ref-dimension) * 3)
4233
+ );
4234
+
4235
+ /* * -------- KBD GROUP -------- * */
4236
+
4237
+ /** @token Align items */
4238
+ --_pont-kbd-group-items: var(
4239
+ --pont-kbd-group-items,
4240
+ var(--pont-ref-layout-items-center)
4241
+ );
4242
+ /** @token Justify content */
4243
+ --_pont-kbd-group-justify: var(
4244
+ --pont-kbd-group-justify,
4245
+ var(--pont-sem-layout-justify)
4246
+ );
4247
+
4248
+ /** @token Gap */
4249
+ --_pont-kbd-group-gap: var(
4250
+ --pont-kbd-group-gap,
4251
+ calc(var(--pont-ref-dimension) * 1)
4252
+ );
4100
4253
  }
4101
4254
 
4102
- /* in-data-[slot=tooltip-content]: the inverted tooltip colours (shadcn's
4103
- bg-background/20, dark:bg-background/10, which sem-color-inverse-subtle carries) */
4104
4255
  [data-slot="tooltip-content"] :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]) {
4105
4256
  /** @token Background in a tooltip */
4106
- --_pont-kbd-bg: var(--pont-kbd-tooltip-bg, var(--pont-sem-color-inverse-subtle));
4107
- --_pont-kbd-fg: var(--pont-sem-color-inverse-fg);
4257
+ --_pont-kbd-color-bg: var(
4258
+ --pont-kbd-tooltip-color-bg,
4259
+ var(--pont-sem-color-inverse-subtle)
4260
+ );
4261
+ /** @token Foreground in a tooltip */
4262
+ --_pont-kbd-color-fg: var(
4263
+ --pont-kbd-tooltip-color-fg,
4264
+ var(--pont-sem-color-inverse-fg)
4265
+ );
4108
4266
  }
4267
+ }
4109
4268
 
4110
- /* ------------------------------------------------------------------ */
4111
- /* Recipe */
4112
- /* ------------------------------------------------------------------ */
4269
+ /*
4270
+ * ---------------------------------------------------------------------------
4271
+ * RECIPES
4272
+ * ---------------------------------------------------------------------------
4273
+ */
4113
4274
 
4275
+ @layer pont.primitives {
4114
4276
  :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]) {
4115
- box-sizing: border-box;
4116
- margin: 0;
4117
- pointer-events: none;
4277
+ box-sizing: var(--pont-ref-layout-box-border);
4118
4278
  display: inline-flex;
4119
- align-items: center;
4120
- justify-content: center;
4121
- user-select: none;
4279
+
4280
+ align-items: var(--_pont-kbd-items);
4281
+ justify-content: var(--_pont-kbd-justify);
4282
+ gap: var(--_pont-kbd-gap);
4283
+
4284
+ padding-top: var(--_pont-kbd-padding-top);
4285
+ padding-right: var(--_pont-kbd-padding-right);
4286
+ padding-bottom: var(--_pont-kbd-padding-bottom);
4287
+ padding-left: var(--_pont-kbd-padding-left);
4288
+
4289
+ margin: 0;
4290
+
4291
+ width: var(--_pont-kbd-width);
4292
+ min-width: var(--_pont-kbd-min-width);
4122
4293
  height: var(--_pont-kbd-height);
4123
- width: var(--pont-ref-dimension-size-fit);
4124
- min-width: var(--_pont-kbd-height);
4125
- gap: 0.25rem;
4126
- padding: 0 0.25rem;
4127
- border-radius: var(--_pont-kbd-radius);
4128
- background-color: var(--_pont-kbd-bg);
4129
- color: var(--_pont-kbd-fg);
4130
- font-family: var(--pont-sem-typography-font-body);
4131
- font-size: var(--pont-ref-typography-size-xs);
4132
- line-height: var(--pont-ref-typography-leading-of-xs);
4294
+ min-height: var(--_pont-kbd-min-height);
4295
+
4296
+ font-family: var(--_pont-kbd-font-family);
4297
+ font-size: var(--_pont-kbd-font-size);
4133
4298
  font-weight: var(--_pont-kbd-font-weight);
4299
+ letter-spacing: var(--_pont-kbd-letter-spacing);
4300
+ line-height: var(--_pont-kbd-line-height);
4301
+
4302
+ background-color: var(--_pont-kbd-color-bg);
4303
+ color: var(--_pont-kbd-color-fg);
4304
+
4305
+ border-radius: var(--_pont-kbd-radius);
4306
+
4307
+ pointer-events: none;
4308
+ user-select: none;
4134
4309
  }
4135
4310
 
4136
- :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]) svg:not([class*="size-"]) {
4137
- width: 0.75rem;
4138
- height: 0.75rem;
4311
+ :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]) svg {
4312
+ width: var(--_pont-kbd-icon-size);
4313
+ height: var(--_pont-kbd-icon-size);
4139
4314
  }
4140
4315
 
4316
+ /* * -------- KBD GROUP -------- * */
4317
+
4141
4318
  :is(pont-prim-kbd-group, pont-kbd-group, [data-pont-kbd-group]) {
4142
4319
  display: inline-flex;
4143
- align-items: center;
4144
- gap: 0.25rem;
4320
+
4321
+ align-items: var(--_pont-kbd-group-items);
4322
+ justify-content: var(--_pont-kbd-group-justify);
4323
+
4324
+ gap: var(--_pont-kbd-group-gap);
4145
4325
  }
4146
4326
  }
4147
4327