@pontive/pontkit-core 3.1.0 → 3.2.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
@@ -39,12 +39,168 @@
39
39
  * reads its public tokens with a fallback and resolves them on the element
40
40
  * (11 §4, §5).
41
41
  *
42
+ * cursor.css cursor keywords (ref) and the cursor roles (sem)
43
+ * filter.css the blur unit (--pont-ref-filter-blur) and the blur scale derived from it
44
+ * layout.css aspect ratios (--pont-ref-layout-aspect-auto, -square, -video)
42
45
  * opacity.css the opacity unit (--pont-ref-opacity), none/full, and the disabled role
43
46
  * radius.css the radius knob (--pont-ref-radius) and the ref scale derived from it
44
47
  * ref/ raw values, global only
45
48
  * sem/ design roles; light/dark lives in sem/color.css
46
49
  */
47
50
 
51
+ /* ./cursor.css */
52
+ /*
53
+ * ===========================================================================
54
+ * CURSOR TOKENS
55
+ * ---------------------------------------------------------------------------
56
+ * `cursor`
57
+ * ===========================================================================
58
+ */
59
+
60
+ /*
61
+ * --------------------------------------------------
62
+ * CURSOR REFERENCE TOKENS
63
+ * --------------------------------------------------
64
+ */
65
+
66
+ @layer pont.tokens {
67
+ :root {
68
+ --pont-ref-cursor-auto: auto;
69
+ --pont-ref-cursor-default: default;
70
+ --pont-ref-cursor-pointer: pointer;
71
+ --pont-ref-cursor-wait: wait;
72
+ --pont-ref-cursor-text: text;
73
+ --pont-ref-cursor-move: move;
74
+ --pont-ref-cursor-help: help;
75
+ --pont-ref-cursor-not-allowed: not-allowed;
76
+ --pont-ref-cursor-none: none;
77
+ --pont-ref-cursor-context-menu: context-menu;
78
+ --pont-ref-cursor-progress: progress;
79
+ --pont-ref-cursor-cell: cell;
80
+ --pont-ref-cursor-crosshair: crosshair;
81
+ --pont-ref-cursor-vertical-text: vertical-text;
82
+ --pont-ref-cursor-alias: alias;
83
+ --pont-ref-cursor-copy: copy;
84
+ --pont-ref-cursor-no-drop: no-drop;
85
+ --pont-ref-cursor-grab: grab;
86
+ --pont-ref-cursor-grabbing: grabbing;
87
+ --pont-ref-cursor-all-scroll: all-scroll;
88
+ --pont-ref-cursor-col-resize: col-resize;
89
+ --pont-ref-cursor-row-resize: row-resize;
90
+ --pont-ref-cursor-n-resize: n-resize;
91
+ --pont-ref-cursor-e-resize: e-resize;
92
+ --pont-ref-cursor-s-resize: s-resize;
93
+ --pont-ref-cursor-w-resize: w-resize;
94
+ --pont-ref-cursor-ne-resize: ne-resize;
95
+ --pont-ref-cursor-nw-resize: nw-resize;
96
+ --pont-ref-cursor-se-resize: se-resize;
97
+ --pont-ref-cursor-sw-resize: sw-resize;
98
+ --pont-ref-cursor-ew-resize: ew-resize;
99
+ --pont-ref-cursor-ns-resize: ns-resize;
100
+ --pont-ref-cursor-nesw-resize: nesw-resize;
101
+ --pont-ref-cursor-nwse-resize: nwse-resize;
102
+ --pont-ref-cursor-zoom-in: zoom-in;
103
+ --pont-ref-cursor-zoom-out: zoom-out;
104
+ }
105
+ }
106
+
107
+ /*
108
+ * --------------------------------------------------
109
+ * CURSOR SEMANTIC TOKENS
110
+ * --------------------------------------------------
111
+ */
112
+
113
+ @layer pont.tokens {
114
+ :root {
115
+ /*
116
+ * Roles, not components: a brand that wants the hand cursor on every
117
+ * pressable control sets -interactive once. `default` is shadcn's
118
+ * (Tailwind v4) choice for buttons and controls.
119
+ */
120
+
121
+ /* Pressable controls: button, tabs trigger, checkbox, radio, switch, slider thumb */
122
+ --pont-sem-cursor-interactive: var(--pont-ref-cursor-default);
123
+ /* Options in a list: combobox, dropdown menu and select items */
124
+ --pont-sem-cursor-item: var(--pont-ref-cursor-default);
125
+ /* Areas that focus a text field: input-group addon, OTP slots, combobox chips */
126
+ --pont-sem-cursor-text: var(--pont-ref-cursor-text);
127
+ /* Drag handles: the drawer handle */
128
+ --pont-sem-cursor-grab: var(--pont-ref-cursor-grab);
129
+ /* Every disabled control and its label */
130
+ --pont-sem-cursor-disabled: var(--pont-ref-cursor-not-allowed);
131
+ }
132
+ }
133
+
134
+ /* ./filter.css */
135
+ /*
136
+ * ===========================================================================
137
+ * FILTER TOKENS
138
+ * ---------------------------------------------------------------------------
139
+ * `filter`, `backdrop-filter`
140
+ * ===========================================================================
141
+ */
142
+
143
+ /*
144
+ * ---------------------------------------------------------------------------
145
+ * FILTER BLUR TOKENS
146
+ * length value arg for `blur()`
147
+ * ---------------------------------------------------------------------------
148
+ */
149
+
150
+ /*
151
+ * --------------------------------------------------
152
+ * FILTER BLUR REFERENCE TOKENS
153
+ * --------------------------------------------------
154
+ */
155
+
156
+ @layer pont.tokens {
157
+ :root {
158
+ /* Anchor/seed value */
159
+ --pont-ref-filter-blur: 1px;
160
+
161
+ /* Derived values */
162
+ --pont-ref-filter-blur-xs: calc(var(--pont-ref-filter-blur) * 4);
163
+ --pont-ref-filter-blur-sm: calc(var(--pont-ref-filter-blur) * 8);
164
+ --pont-ref-filter-blur-md: calc(var(--pont-ref-filter-blur) * 12);
165
+ --pont-ref-filter-blur-lg: calc(var(--pont-ref-filter-blur) * 16);
166
+ --pont-ref-filter-blur-xl: calc(var(--pont-ref-filter-blur) * 24);
167
+ --pont-ref-filter-blur-2xl: calc(var(--pont-ref-filter-blur) * 40);
168
+ --pont-ref-filter-blur-3xl: calc(var(--pont-ref-filter-blur) * 64);
169
+
170
+ /* Special values */
171
+ --pont-ref-filter-blur-none: 0;
172
+ }
173
+ }
174
+
175
+ /* ./layout.css */
176
+ /*
177
+ * ===========================================================================
178
+ * LAYOUT TOKENS
179
+ * ===========================================================================
180
+ */
181
+
182
+ /*
183
+ * ---------------------------------------------------------------------------
184
+ * LAYOUT ASPECT TOKENS
185
+ * `aspect-ratio`
186
+ * ---------------------------------------------------------------------------
187
+ */
188
+
189
+ /*
190
+ * --------------------------------------------------
191
+ * LAYOUT ASPECT REFERENCE TOKENS
192
+ * --------------------------------------------------
193
+ */
194
+
195
+ @layer pont.tokens {
196
+ :root {
197
+ --pont-ref-layout-aspect-auto: auto;
198
+
199
+ --pont-ref-layout-aspect-square: 1 / 1;
200
+ --pont-ref-layout-aspect-video: 16 / 9;
201
+ }
202
+ }
203
+
48
204
  /* ./opacity.css */
49
205
  /*
50
206
  * ===========================================================================
@@ -730,21 +886,6 @@
730
886
  }
731
887
  }
732
888
 
733
- /* ./sem/layout.css */
734
- /*
735
- * ===========================================================================
736
- * LAYOUT SEMANTIC TOKENS
737
- * ===========================================================================
738
- */
739
-
740
- @layer pont.tokens {
741
- :root {
742
- --pont-sem-aspect-square: 1 / 1;
743
- --pont-sem-aspect-video: 16 / 9;
744
- --pont-sem-aspect-auto: auto;
745
- }
746
- }
747
-
748
889
  /* ./sem/mode.css */
749
890
  /*
750
891
  * sem · mode switches: non-colour values that follow the colour scheme
@@ -1163,7 +1304,7 @@
1163
1304
  margin: 0;
1164
1305
  font-family: inherit;
1165
1306
  text-decoration: none;
1166
- cursor: default;
1307
+ cursor: var(--pont-sem-cursor-interactive);
1167
1308
  -webkit-appearance: none;
1168
1309
  appearance: none;
1169
1310
 
@@ -1408,7 +1549,7 @@
1408
1549
  has no box, but it is still the DOM sibling. */
1409
1550
  :is(:disabled, [data-disabled]) ~ [data-pont-label],
1410
1551
  :is(:disabled, [data-disabled]) ~ [data-pont-shell] > [data-pont-label] {
1411
- cursor: not-allowed;
1552
+ cursor: var(--pont-sem-cursor-disabled);
1412
1553
  opacity: var(--pont-sem-opacity-disabled);
1413
1554
  }
1414
1555
  }
@@ -1501,7 +1642,7 @@
1501
1642
 
1502
1643
  [data-pont-input]:disabled {
1503
1644
  pointer-events: none;
1504
- cursor: not-allowed;
1645
+ cursor: var(--pont-sem-cursor-disabled);
1505
1646
  opacity: var(--pont-sem-opacity-disabled);
1506
1647
  }
1507
1648
  }
@@ -1578,7 +1719,7 @@
1578
1719
  }
1579
1720
 
1580
1721
  [data-pont-textarea]:disabled {
1581
- cursor: not-allowed;
1722
+ cursor: var(--pont-sem-cursor-disabled);
1582
1723
  opacity: var(--pont-sem-opacity-disabled);
1583
1724
  }
1584
1725
  }
@@ -1615,6 +1756,7 @@
1615
1756
  }
1616
1757
 
1617
1758
  :is(pont-prim-checkbox, pont-checkbox, [data-pont-checkbox]) {
1759
+ cursor: var(--pont-sem-cursor-interactive);
1618
1760
  box-sizing: border-box;
1619
1761
  position: relative;
1620
1762
  flex-shrink: 0;
@@ -1662,7 +1804,7 @@
1662
1804
  }
1663
1805
 
1664
1806
  [data-pont-checkbox]:is(:disabled, [data-disabled]) {
1665
- cursor: not-allowed;
1807
+ cursor: var(--pont-sem-cursor-disabled);
1666
1808
  opacity: var(--pont-sem-opacity-disabled);
1667
1809
  }
1668
1810
 
@@ -2187,7 +2329,7 @@
2187
2329
  :is(pont-prim-avatar, [data-pont-avatar]) > img {
2188
2330
  display: none;
2189
2331
  box-sizing: border-box;
2190
- aspect-ratio: var(--pont-sem-aspect-square);
2332
+ aspect-ratio: var(--pont-ref-layout-aspect-square);
2191
2333
  width: 100%;
2192
2334
  height: 100%;
2193
2335
  max-width: none;
@@ -3150,7 +3292,7 @@
3150
3292
  gap: 0.5rem;
3151
3293
  height: auto;
3152
3294
  padding-block: 0.375rem;
3153
- cursor: text;
3295
+ cursor: var(--pont-sem-cursor-text);
3154
3296
  user-select: none;
3155
3297
  color: var(--_pont-input-group-addon-fg);
3156
3298
  font-size: var(--pont-sem-text-sm);
@@ -3617,7 +3759,7 @@
3617
3759
  }
3618
3760
  [data-pont-native-select]:disabled {
3619
3761
  pointer-events: none;
3620
- cursor: not-allowed;
3762
+ cursor: var(--pont-sem-cursor-disabled);
3621
3763
  }
3622
3764
  [data-pont-native-select] :is(option, optgroup) {
3623
3765
  background-color: Canvas;
@@ -3899,7 +4041,7 @@
3899
4041
  width: fit-content;
3900
4042
  align-items: center;
3901
4043
  gap: var(--_pont-input-otp-gap);
3902
- cursor: text;
4044
+ cursor: var(--pont-sem-cursor-text);
3903
4045
  user-select: none;
3904
4046
  }
3905
4047
  :is(pont-prim-input-otp, [data-pont-input-otp]):has(:disabled) {
@@ -3939,7 +4081,7 @@
3939
4081
  background: transparent;
3940
4082
  }
3941
4083
  [data-pont-input-otp-input]:disabled {
3942
- cursor: not-allowed;
4084
+ cursor: var(--pont-sem-cursor-disabled);
3943
4085
  }
3944
4086
 
3945
4087
  :is(pont-prim-input-otp-group, [data-pont-input-otp-group]) {
@@ -4141,11 +4283,12 @@
4141
4283
  }
4142
4284
 
4143
4285
  :is(pont-prim-radio-group-item, [data-pont-radio-group-item]) {
4286
+ cursor: var(--pont-sem-cursor-interactive);
4144
4287
  box-sizing: border-box;
4145
4288
  position: relative;
4146
4289
  display: flex;
4147
4290
  flex-shrink: 0;
4148
- aspect-ratio: var(--pont-sem-aspect-square);
4291
+ aspect-ratio: var(--pont-ref-layout-aspect-square);
4149
4292
  width: 1rem;
4150
4293
  height: 1rem;
4151
4294
  border: var(--pont-sem-border-width) solid var(--_pont-radio-group-item-border-color);
@@ -4184,7 +4327,7 @@
4184
4327
  }
4185
4328
 
4186
4329
  [data-pont-radio-group-item]:is(:disabled, [data-disabled]) {
4187
- cursor: not-allowed;
4330
+ cursor: var(--pont-sem-cursor-disabled);
4188
4331
  opacity: var(--pont-sem-opacity-disabled);
4189
4332
  }
4190
4333
 
@@ -4319,6 +4462,7 @@
4319
4462
  }
4320
4463
 
4321
4464
  [data-pont-slider-thumb] {
4465
+ cursor: var(--pont-sem-cursor-interactive);
4322
4466
  box-sizing: border-box;
4323
4467
  position: absolute;
4324
4468
  display: block;
@@ -4388,6 +4532,7 @@
4388
4532
  }
4389
4533
 
4390
4534
  :is(pont-prim-switch, pont-switch, [data-pont-switch]) {
4535
+ cursor: var(--pont-sem-cursor-interactive);
4391
4536
  box-sizing: border-box;
4392
4537
  position: relative;
4393
4538
  display: inline-flex;
@@ -4432,7 +4577,7 @@
4432
4577
  }
4433
4578
 
4434
4579
  [data-pont-switch][data-disabled] {
4435
- cursor: not-allowed;
4580
+ cursor: var(--pont-sem-cursor-disabled);
4436
4581
  opacity: var(--pont-sem-opacity-disabled);
4437
4582
  }
4438
4583
 
@@ -4584,7 +4729,7 @@
4584
4729
  font-size: var(--pont-sem-text-sm);
4585
4730
  line-height: var(--pont-sem-text-sm--line-height);
4586
4731
  font-weight: var(--_pont-tabs-trigger-font-weight, var(--pont-sem-font-weight-medium));
4587
- cursor: default;
4732
+ cursor: var(--pont-sem-cursor-interactive);
4588
4733
  user-select: none;
4589
4734
  outline: none;
4590
4735
  box-shadow: var(--pont-ring-shadow), var(--pont-shadow);
@@ -4971,7 +5116,7 @@
4971
5116
  border-radius: var(--_pont-dropdown-menu-item-radius);
4972
5117
  font-size: var(--pont-sem-text-sm);
4973
5118
  line-height: var(--pont-sem-text-sm--line-height);
4974
- cursor: default;
5119
+ cursor: var(--pont-sem-cursor-item);
4975
5120
  outline: none;
4976
5121
  user-select: none;
4977
5122
  }
@@ -5167,7 +5312,7 @@
5167
5312
  --pont-ring-shadow: 0 0 0 var(--pont-sem-ring-width) var(--pont-sem-color-destructive-ring);
5168
5313
  }
5169
5314
  [data-pont-select-trigger]:disabled {
5170
- cursor: not-allowed;
5315
+ cursor: var(--pont-sem-cursor-disabled);
5171
5316
  opacity: var(--pont-sem-opacity-disabled);
5172
5317
  }
5173
5318
  [data-pont-select-trigger] svg {
@@ -5251,7 +5396,7 @@
5251
5396
  font-size: var(--pont-sem-text-sm);
5252
5397
  line-height: var(--pont-sem-text-sm--line-height);
5253
5398
  white-space: nowrap;
5254
- cursor: default;
5399
+ cursor: var(--pont-sem-cursor-item);
5255
5400
  outline: none;
5256
5401
  user-select: none;
5257
5402
  }
@@ -5403,7 +5548,7 @@
5403
5548
  opacity: 1;
5404
5549
  }
5405
5550
  [data-pont-combobox-input-control]:disabled {
5406
- cursor: not-allowed;
5551
+ cursor: var(--pont-sem-cursor-disabled);
5407
5552
  opacity: var(--pont-sem-opacity-disabled);
5408
5553
  }
5409
5554
 
@@ -5420,7 +5565,7 @@
5420
5565
  font-size: var(--pont-sem-text-sm);
5421
5566
  line-height: var(--pont-sem-text-sm--line-height);
5422
5567
  font-weight: var(--pont-sem-font-weight-medium);
5423
- cursor: text;
5568
+ cursor: var(--pont-sem-cursor-text);
5424
5569
  user-select: none;
5425
5570
  }
5426
5571
  [data-pont-combobox-input-addon]:has(> button) {
@@ -5497,7 +5642,7 @@
5497
5642
  border-radius: var(--_pont-combobox-item-radius);
5498
5643
  font-size: var(--pont-sem-text-sm);
5499
5644
  line-height: var(--pont-sem-text-sm--line-height);
5500
- cursor: default;
5645
+ cursor: var(--pont-sem-cursor-item);
5501
5646
  outline: none;
5502
5647
  user-select: none;
5503
5648
  }
@@ -5585,7 +5730,7 @@
5585
5730
  background-clip: padding-box;
5586
5731
  font-size: var(--pont-sem-text-sm);
5587
5732
  line-height: var(--pont-sem-text-sm--line-height);
5588
- cursor: text;
5733
+ cursor: var(--pont-sem-cursor-text);
5589
5734
  }
5590
5735
  [data-pont-combobox-chips]:has(> [data-slot="combobox-chip"]) {
5591
5736
  padding-inline: 0.375rem;
@@ -5596,7 +5741,7 @@
5596
5741
  }
5597
5742
  [data-pont-combobox-chips][data-disabled],
5598
5743
  [data-pont-combobox][data-disabled] [data-pont-combobox-chips] {
5599
- cursor: not-allowed;
5744
+ cursor: var(--pont-sem-cursor-disabled);
5600
5745
  opacity: var(--pont-sem-opacity-disabled);
5601
5746
  }
5602
5747
 
@@ -5658,7 +5803,7 @@
5658
5803
  opacity: 1;
5659
5804
  }
5660
5805
  [data-pont-combobox-chip-input]:disabled {
5661
- cursor: not-allowed;
5806
+ cursor: var(--pont-sem-cursor-disabled);
5662
5807
  }
5663
5808
  }
5664
5809
 
@@ -5890,7 +6035,7 @@
5890
6035
 
5891
6036
  /* supports-backdrop-filter:backdrop-blur-xs; fade-in-0 / fade-out-0 with the popup. */
5892
6037
  :is([data-pont-dialog-content], [data-pont-alert-dialog-content], [data-pont-sheet-content], [data-pont-drawer-content])::backdrop {
5893
- backdrop-filter: blur(4px);
6038
+ backdrop-filter: blur(var(--pont-ref-filter-blur-xs));
5894
6039
  }
5895
6040
  :is([data-pont-dialog-content], [data-pont-alert-dialog-content], [data-pont-sheet-content], [data-pont-drawer-content])[data-open]::backdrop {
5896
6041
  animation: pont-backdrop-enter var(--_pont-popup-duration) var(--pont-sem-ease-in-out);
@@ -6320,7 +6465,7 @@
6320
6465
  justify-content: center;
6321
6466
  align-items: flex-end;
6322
6467
  height: 0.75rem;
6323
- cursor: grab;
6468
+ cursor: var(--pont-sem-cursor-grab);
6324
6469
  }
6325
6470
  [data-pont-drawer-swipe-handle]::after {
6326
6471
  content: "";
@@ -7722,7 +7867,7 @@
7722
7867
  */
7723
7868
  @layer pont.kit {
7724
7869
  pont-pagination[data-disabled] {
7725
- cursor: not-allowed;
7870
+ cursor: var(--pont-sem-cursor-disabled);
7726
7871
  }
7727
7872
  }
7728
7873
 
@@ -1,8 +1,10 @@
1
1
  import { FontEntry } from './fonts';
2
2
  /** What kind of CSS value a token holds. Decides how theme values are validated. */
3
3
  export type TokenType = "color" | "dimension" | "number" | "fontFamily" | "fontWeight" | "shadow" | "duration" | "cubicBezier"
4
- /** An aspect ratio (`sem-aspect-*`): `auto`, a number, or `<number> / <number>`. */
4
+ /** An aspect ratio (`ref-layout-aspect-*`): `auto`, a number, or `<number> / <number>`. */
5
5
  | "ratio"
6
+ /** A cursor (`sem-cursor-*` roles; the `ref-cursor-*` keywords are fixed): a CSS cursor keyword. */
7
+ | "cursor"
6
8
  /** Animation structure (`*-animate-*` names, iteration counts, shorthands): fixed, never themed; theme the `-duration` / `-function` parts. */
7
9
  | "animation"
8
10
  /** A mode switch (`sem-mode-*`): follows the colour scheme, never themed. */