@pontive/pontkit-core 1.51.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/catalog.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.51.0",
2
+ "version": "1.53.0",
3
3
  "elements": [
4
4
  {
5
5
  "tag": "pont-otp-resend",
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 */
@@ -832,6 +833,14 @@
832
833
 
833
834
  --pont-sem-color-ghost: var(--pont-ref-color-transparent);
834
835
  --pont-sem-color-ghost-hover: var(--pont-sem-color-muted);
836
+
837
+ --pont-sem-color-inverse: var(--pont-sem-color-fg);
838
+ --pont-sem-color-inverse-fg: var(--pont-sem-color-bg);
839
+ --pont-sem-color-inverse-subtle: color-mix(
840
+ in oklab,
841
+ var(--pont-sem-color-bg) 20%,
842
+ var(--pont-ref-color-transparent)
843
+ );
835
844
  }
836
845
  }
837
846
 
@@ -1145,6 +1154,14 @@
1145
1154
  var(--pont-sem-color-muted) 50%,
1146
1155
  var(--pont-ref-color-transparent)
1147
1156
  );
1157
+
1158
+ --pont-sem-color-inverse: var(--pont-sem-color-fg);
1159
+ --pont-sem-color-inverse-fg: var(--pont-sem-color-bg);
1160
+ --pont-sem-color-inverse-subtle: color-mix(
1161
+ in oklab,
1162
+ var(--pont-sem-color-bg) 10%,
1163
+ var(--pont-ref-color-transparent)
1164
+ );
1148
1165
  }
1149
1166
  }
1150
1167
 
@@ -1608,6 +1625,46 @@
1608
1625
  }
1609
1626
  }
1610
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
+
1611
1668
  /* ./motion.css */
1612
1669
  /*
1613
1670
  * ===========================================================================
@@ -2275,35 +2332,6 @@
2275
2332
  }
2276
2333
  }
2277
2334
 
2278
- /* ./sem/mode.css */
2279
- /*
2280
- * sem · mode switches: non-colour values that follow the colour scheme
2281
- * (docs/11-tokens.md §6). They let component CSS react to dark mode without a
2282
- * `.dark` selector of its own. Type `keyword`: they are not themable (the
2283
- * validator rejects them), because they follow the mode, not the brand.
2284
- *
2285
- * mode-blend blend for an overlay that must stay visible on any
2286
- * image (avatar ring: darken / lighten)
2287
- * mode-light-display `display` for content shown only in light mode
2288
- * mode-dark-display `display` for content shown only in dark mode
2289
- */
2290
- @layer pont.tokens {
2291
- :root {
2292
- --pont-sem-mode-blend: darken;
2293
- --pont-sem-mode-light-display: block;
2294
- --pont-sem-mode-dark-display: none;
2295
- }
2296
-
2297
- :root.dark,
2298
- :root[data-theme="dark"],
2299
- .dark,
2300
- [data-theme="dark"] {
2301
- --pont-sem-mode-blend: lighten;
2302
- --pont-sem-mode-light-display: none;
2303
- --pont-sem-mode-dark-display: block;
2304
- }
2305
- }
2306
-
2307
2335
  /* ./base.css */
2308
2336
  /*
2309
2337
  * ===========================================================================
@@ -4057,80 +4085,243 @@
4057
4085
 
4058
4086
  /* ../primitives/kbd/kbd.css */
4059
4087
  /*
4060
- * Kbd. shadcn (Base UI, Vega):
4061
- * kbd: "pointer-events-none inline-flex items-center justify-center select-none" + .cn-kbd
4062
- * 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
4063
4099
  *
4064
- * Tokens (docs/11-tokens.md): `--pont-kbd-*`. Inside a tooltip the kbd
4065
- * switches to the inverted colours (`--pont-kbd-tooltip-bg`, with a dark
4066
- * default for shadcn's `dark:` fill; docs/11-tokens.md §6).
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.
4104
+ *
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).
4067
4111
  */
4112
+
4113
+ /*
4114
+ * ---------------------------------------------------------------------------
4115
+ * TOKENS
4116
+ * ---------------------------------------------------------------------------
4117
+ */
4118
+
4068
4119
  @layer pont.primitives {
4069
- /* ------------------------------------------------------------------ */
4070
- /* Tokens */
4071
- /* ------------------------------------------------------------------ */
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
+ );
4072
4217
 
4073
- :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]) {
4074
4218
  /** @token Background */
4075
- --_pont-kbd-bg: var(--pont-kbd-bg, var(--pont-sem-color-muted));
4076
- /** @token Text */
4077
- --_pont-kbd-fg: var(--pont-kbd-fg, var(--pont-sem-color-muted-fg));
4078
- /** @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 */
4079
4227
  --_pont-kbd-radius: var(--pont-kbd-radius, var(--pont-ref-radius-sm));
4080
- /** @token Height */
4081
- --_pont-kbd-height: var(--pont-kbd-height, 1.25rem);
4082
- /** @token Label weight */
4083
- --_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
+ );
4084
4253
  }
4085
4254
 
4086
- /* in-data-[slot=tooltip-content]: the inverted tooltip colours */
4087
4255
  [data-slot="tooltip-content"] :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]) {
4088
4256
  /** @token Background in a tooltip */
4089
- --_pont-kbd-bg: var(--pont-kbd-tooltip-bg, color-mix(in oklab, var(--pont-sem-color-bg) 20%, transparent));
4090
- --_pont-kbd-fg: var(--pont-sem-color-bg);
4091
- }
4092
-
4093
- /* dark default: shadcn's dark:in-data-[slot=tooltip-content]:bg-background/10 */
4094
- :where(.dark, [data-theme="dark"]) [data-slot="tooltip-content"] :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]),
4095
- [data-slot="tooltip-content"] :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]):where(.dark, [data-theme="dark"]) {
4096
- --_pont-kbd-bg: var(--pont-kbd-tooltip-bg, color-mix(in oklab, var(--pont-sem-color-bg) 10%, transparent));
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
+ );
4097
4266
  }
4267
+ }
4098
4268
 
4099
- /* ------------------------------------------------------------------ */
4100
- /* Recipe */
4101
- /* ------------------------------------------------------------------ */
4269
+ /*
4270
+ * ---------------------------------------------------------------------------
4271
+ * RECIPES
4272
+ * ---------------------------------------------------------------------------
4273
+ */
4102
4274
 
4275
+ @layer pont.primitives {
4103
4276
  :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]) {
4104
- box-sizing: border-box;
4105
- margin: 0;
4106
- pointer-events: none;
4277
+ box-sizing: var(--pont-ref-layout-box-border);
4107
4278
  display: inline-flex;
4108
- align-items: center;
4109
- justify-content: center;
4110
- 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);
4111
4293
  height: var(--_pont-kbd-height);
4112
- width: var(--pont-ref-dimension-size-fit);
4113
- min-width: var(--_pont-kbd-height);
4114
- gap: 0.25rem;
4115
- padding: 0 0.25rem;
4116
- border-radius: var(--_pont-kbd-radius);
4117
- background-color: var(--_pont-kbd-bg);
4118
- color: var(--_pont-kbd-fg);
4119
- font-family: var(--pont-sem-typography-font-body);
4120
- font-size: var(--pont-ref-typography-size-xs);
4121
- 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);
4122
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;
4123
4309
  }
4124
4310
 
4125
- :is(pont-prim-kbd, pont-kbd, [data-pont-kbd]) svg:not([class*="size-"]) {
4126
- width: 0.75rem;
4127
- 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);
4128
4314
  }
4129
4315
 
4316
+ /* * -------- KBD GROUP -------- * */
4317
+
4130
4318
  :is(pont-prim-kbd-group, pont-kbd-group, [data-pont-kbd-group]) {
4131
4319
  display: inline-flex;
4132
- align-items: center;
4133
- 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);
4134
4325
  }
4135
4326
  }
4136
4327
 
@@ -8407,9 +8598,9 @@
8407
8598
 
8408
8599
  :is(pont-prim-tooltip-content, [data-pont-tooltip-content]) {
8409
8600
  /** @token Background */
8410
- --_pont-tooltip-bg: var(--pont-tooltip-bg, var(--pont-sem-color-fg));
8601
+ --_pont-tooltip-bg: var(--pont-tooltip-bg, var(--pont-sem-color-inverse));
8411
8602
  /** @token Text */
8412
- --_pont-tooltip-fg: var(--pont-tooltip-fg, var(--pont-sem-color-bg));
8603
+ --_pont-tooltip-fg: var(--pont-tooltip-fg, var(--pont-sem-color-inverse-fg));
8413
8604
  /** @token Corner radius */
8414
8605
  --_pont-tooltip-radius: var(--pont-tooltip-radius, var(--pont-ref-radius-md));
8415
8606
  /** @token Maximum width */