@fairfox/polly 0.25.0 → 0.26.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.
@@ -55,6 +55,282 @@
55
55
  }
56
56
  }
57
57
 
58
+ /* src/polly-ui/Badge.module.css */
59
+ @layer polly-components {
60
+ .badge_cZd0Aw {
61
+ display: inline-block;
62
+ padding: 0 var(--polly-space-sm);
63
+ border-radius: var(--polly-radius-full);
64
+ font-family: inherit;
65
+ font-size: var(--polly-text-xs);
66
+ font-weight: var(--polly-weight-medium);
67
+ white-space: nowrap;
68
+ background-color: var(--polly-surface-sunken);
69
+ color: var(--polly-text-muted);
70
+ line-height: 1.5;
71
+ }
72
+
73
+ .info_cZd0Aw {
74
+ background-color: var(--polly-status-info-bg);
75
+ color: var(--polly-status-info-text);
76
+ }
77
+
78
+ .success_cZd0Aw {
79
+ background-color: var(--polly-status-success-bg);
80
+ color: var(--polly-status-success-text);
81
+ }
82
+
83
+ .warning_cZd0Aw {
84
+ background-color: var(--polly-status-warning-bg);
85
+ color: var(--polly-status-warning-text);
86
+ }
87
+
88
+ .danger_cZd0Aw {
89
+ background-color: var(--polly-status-danger-bg);
90
+ color: var(--polly-status-danger-text);
91
+ }
92
+ }
93
+
94
+ /* src/polly-ui/Button.module.css */
95
+ @layer polly-components {
96
+ .btn_c4HKfA {
97
+ display: inline-block;
98
+ padding: var(--polly-space-sm) var(--polly-space-lg);
99
+ border: var(--polly-border-width-default) solid transparent;
100
+ border-radius: var(--polly-radius-sm);
101
+ font-family: inherit;
102
+ font-size: var(--polly-text-md);
103
+ font-weight: var(--polly-weight-medium);
104
+ text-align: center;
105
+ text-decoration: none;
106
+ cursor: pointer;
107
+ user-select: none;
108
+ box-sizing: border-box;
109
+ transition: background-color var(--polly-motion-fast), border-color var(--polly-motion-fast), color var(--polly-motion-fast);
110
+ line-height: 1.2;
111
+ }
112
+
113
+ .btn_c4HKfA:disabled, .btn_c4HKfA[aria-disabled="true"] {
114
+ opacity: var(--polly-opacity-disabled);
115
+ cursor: not-allowed;
116
+ }
117
+
118
+ .tierPrimary_c4HKfA {
119
+ background-color: var(--polly-accent);
120
+ color: var(--polly-accent-contrast);
121
+ border-color: var(--polly-accent);
122
+ }
123
+
124
+ .tierPrimary_c4HKfA:hover:not(:disabled) {
125
+ background-color: var(--polly-accent-hover);
126
+ border-color: var(--polly-accent-hover);
127
+ }
128
+
129
+ .tierSecondary_c4HKfA {
130
+ background-color: var(--polly-surface-sunken);
131
+ color: var(--polly-text);
132
+ border-color: var(--polly-border);
133
+ }
134
+
135
+ .tierSecondary_c4HKfA:hover:not(:disabled) {
136
+ background-color: color-mix(in srgb, var(--polly-surface-sunken) 80%, var(--polly-text));
137
+ }
138
+
139
+ .tierTertiary_c4HKfA {
140
+ color: var(--polly-text);
141
+ background-color: #0000;
142
+ border-color: #0000;
143
+ }
144
+
145
+ .tierTertiary_c4HKfA:hover:not(:disabled) {
146
+ background-color: var(--polly-surface-sunken);
147
+ }
148
+
149
+ .colorInfo_c4HKfA {
150
+ --btn-accent: var(--polly-accent);
151
+ --btn-accent-text: var(--polly-accent-contrast);
152
+ }
153
+
154
+ .colorSuccess_c4HKfA {
155
+ --btn-accent: var(--polly-success);
156
+ --btn-accent-text: var(--polly-success-contrast);
157
+ }
158
+
159
+ .colorWarning_c4HKfA {
160
+ --btn-accent: var(--polly-warning);
161
+ --btn-accent-text: var(--polly-warning-contrast);
162
+ }
163
+
164
+ .colorDanger_c4HKfA {
165
+ --btn-accent: var(--polly-danger);
166
+ --btn-accent-text: var(--polly-danger-contrast);
167
+ }
168
+
169
+ .tierPrimary_c4HKfA.colorInfo_c4HKfA, .tierPrimary_c4HKfA.colorSuccess_c4HKfA, .tierPrimary_c4HKfA.colorWarning_c4HKfA, .tierPrimary_c4HKfA.colorDanger_c4HKfA {
170
+ background-color: var(--btn-accent);
171
+ border-color: var(--btn-accent);
172
+ color: var(--btn-accent-text);
173
+ }
174
+
175
+ .tierSecondary_c4HKfA.colorInfo_c4HKfA, .tierSecondary_c4HKfA.colorSuccess_c4HKfA, .tierSecondary_c4HKfA.colorWarning_c4HKfA, .tierSecondary_c4HKfA.colorDanger_c4HKfA {
176
+ color: var(--btn-accent);
177
+ border-color: var(--btn-accent);
178
+ }
179
+
180
+ .tierTertiary_c4HKfA.colorInfo_c4HKfA, .tierTertiary_c4HKfA.colorSuccess_c4HKfA, .tierTertiary_c4HKfA.colorWarning_c4HKfA, .tierTertiary_c4HKfA.colorDanger_c4HKfA {
181
+ color: var(--btn-accent);
182
+ }
183
+
184
+ .btnSmall_c4HKfA {
185
+ padding: var(--polly-space-xs) var(--polly-space-md);
186
+ font-size: var(--polly-text-sm);
187
+ }
188
+
189
+ .btnLarge_c4HKfA {
190
+ padding: var(--polly-space-md) var(--polly-space-xl);
191
+ font-size: var(--polly-text-lg);
192
+ }
193
+
194
+ .btnCircle_c4HKfA {
195
+ border-radius: var(--polly-radius-full);
196
+ aspect-ratio: 1;
197
+ width: var(--polly-control-height-md);
198
+ padding: 0;
199
+ }
200
+
201
+ .btnFullWidth_c4HKfA {
202
+ width: 100%;
203
+ }
204
+ }
205
+
206
+ /* src/polly-ui/Layout.module.css */
207
+ @layer polly-components {
208
+ .layout_QgwWPg {
209
+ --l-cols: none;
210
+ --l-rows: none;
211
+ --l-gap: 0;
212
+ --l-p: 0;
213
+ --l-h: auto;
214
+ --l-mh: auto;
215
+ --l-ji: stretch;
216
+ --l-ai: start;
217
+ --l-jc: normal;
218
+ --l-ac: normal;
219
+ --l-js: auto;
220
+ --l-as: auto;
221
+ --l-flow: row;
222
+ --l-arows: auto;
223
+ --l-acols: auto;
224
+ --l-col: auto;
225
+ display: grid;
226
+ grid-template-columns: var(--l-cols);
227
+ grid-template-rows: var(--l-rows);
228
+ gap: var(--l-gap);
229
+ padding: var(--l-p);
230
+ height: var(--l-h);
231
+ min-height: var(--l-mh);
232
+ justify-items: var(--l-ji);
233
+ align-items: var(--l-ai);
234
+ justify-content: var(--l-jc);
235
+ align-content: var(--l-ac);
236
+ justify-self: var(--l-js);
237
+ align-self: var(--l-as);
238
+ grid-auto-flow: var(--l-flow);
239
+ grid-auto-rows: var(--l-arows);
240
+ grid-auto-columns: var(--l-acols);
241
+ grid-column: var(--l-col);
242
+ inline-size: 100%;
243
+ }
244
+
245
+ .inline_QgwWPg {
246
+ display: inline-grid;
247
+ inline-size: auto;
248
+ }
249
+
250
+ @media (max-width: 640px) {
251
+ .stackOnMobile_QgwWPg {
252
+ grid-template-columns: 1fr;
253
+ grid-auto-flow: row;
254
+ grid-column: auto;
255
+ }
256
+ }
257
+ }
258
+
259
+ /* src/polly-ui/Checkbox.module.css */
260
+ @layer polly-components {
261
+ .checkbox_EKE5sg {
262
+ display: inline-block;
263
+ cursor: pointer;
264
+ font-family: inherit;
265
+ font-size: var(--polly-text-md);
266
+ color: var(--polly-text);
267
+ user-select: none;
268
+ }
269
+
270
+ .disabled_EKE5sg {
271
+ opacity: var(--polly-opacity-disabled);
272
+ cursor: not-allowed;
273
+ }
274
+
275
+ .input_EKE5sg {
276
+ accent-color: var(--polly-accent);
277
+ vertical-align: middle;
278
+ cursor: inherit;
279
+ margin: 0;
280
+ }
281
+
282
+ .label_EKE5sg {
283
+ margin-left: var(--polly-space-sm);
284
+ vertical-align: middle;
285
+ }
286
+ }
287
+
288
+ /* src/polly-ui/Collapsible.module.css */
289
+ @layer polly-components {
290
+ .collapsible_sEhnPw {
291
+ border: var(--polly-border-width-default) solid var(--polly-border);
292
+ border-radius: var(--polly-radius-md);
293
+ overflow: hidden;
294
+ }
295
+
296
+ .summary_sEhnPw {
297
+ padding: var(--polly-space-sm) var(--polly-space-md);
298
+ cursor: pointer;
299
+ font-family: inherit;
300
+ font-size: var(--polly-text-md);
301
+ font-weight: var(--polly-weight-medium);
302
+ color: var(--polly-text);
303
+ background-color: var(--polly-surface-sunken);
304
+ user-select: none;
305
+ list-style: none;
306
+ }
307
+
308
+ .summary_sEhnPw::-webkit-details-marker {
309
+ display: none;
310
+ }
311
+
312
+ .summary_sEhnPw:before {
313
+ content: "▶";
314
+ display: inline-block;
315
+ margin-right: var(--polly-space-sm);
316
+ font-size: var(--polly-text-xs);
317
+ transition: transform var(--polly-motion-fast);
318
+ }
319
+
320
+ .collapsible_sEhnPw[open] > .summary_sEhnPw:before {
321
+ transform: rotate(90deg);
322
+ }
323
+
324
+ .summary_sEhnPw:hover {
325
+ background-color: var(--polly-surface-raised);
326
+ }
327
+
328
+ .content_sEhnPw {
329
+ padding: var(--polly-space-md);
330
+ color: var(--polly-text);
331
+ }
332
+ }
333
+
58
334
  /* src/polly-ui/ConfirmDialog.module.css */
59
335
  @layer polly-components {
60
336
  .actions_ZfTX4A {
@@ -183,51 +459,209 @@
183
459
  }
184
460
  }
185
461
 
186
- /* src/polly-ui/Layout.module.css */
462
+ /* src/polly-ui/Dropdown.module.css */
187
463
  @layer polly-components {
188
- .layout_QgwWPg {
189
- --l-cols: none;
190
- --l-rows: none;
191
- --l-gap: 0;
192
- --l-p: 0;
193
- --l-h: auto;
194
- --l-mh: auto;
195
- --l-ji: stretch;
196
- --l-ai: start;
197
- --l-jc: normal;
198
- --l-ac: normal;
199
- --l-js: auto;
200
- --l-as: auto;
201
- --l-flow: row;
202
- --l-arows: auto;
203
- --l-acols: auto;
204
- --l-col: auto;
205
- display: grid;
206
- grid-template-columns: var(--l-cols);
207
- grid-template-rows: var(--l-rows);
208
- gap: var(--l-gap);
209
- padding: var(--l-p);
210
- height: var(--l-h);
211
- min-height: var(--l-mh);
212
- justify-items: var(--l-ji);
213
- align-items: var(--l-ai);
214
- justify-content: var(--l-jc);
215
- align-content: var(--l-ac);
216
- justify-self: var(--l-js);
217
- align-self: var(--l-as);
218
- grid-auto-flow: var(--l-flow);
219
- grid-auto-rows: var(--l-arows);
220
- grid-auto-columns: var(--l-acols);
221
- grid-column: var(--l-col);
222
- inline-size: 100%;
464
+ .dropdown_HX48zA {
465
+ position: relative;
466
+ display: inline-block;
223
467
  }
224
468
 
225
- @media (max-width: 640px) {
226
- .stackOnMobile_QgwWPg {
227
- grid-template-columns: 1fr;
228
- grid-auto-flow: row;
229
- grid-column: auto;
469
+ .trigger_HX48zA {
470
+ display: inline-block;
471
+ }
472
+
473
+ .menu_HX48zA {
474
+ position: absolute;
475
+ inset: unset;
476
+ z-index: var(--polly-z-raised);
477
+ margin: var(--polly-space-xs) 0 0;
478
+ padding: var(--polly-space-xs) 0;
479
+ border: var(--polly-border-width-default) solid var(--polly-border);
480
+ border-radius: var(--polly-radius-md);
481
+ background-color: var(--polly-surface);
482
+ box-shadow: var(--polly-shadow-md);
483
+ box-sizing: border-box;
484
+ overflow-y: auto;
485
+ min-width: 160px;
486
+ max-height: 280px;
487
+ top: 100%;
488
+ left: 0;
489
+ }
490
+
491
+ .alignRight_HX48zA {
492
+ left: auto;
493
+ right: 0;
494
+ }
495
+ }
496
+
497
+ /* src/polly-ui/Select.module.css */
498
+ @layer polly-components {
499
+ .select_daofbw {
500
+ display: inline-block;
501
+ }
502
+
503
+ .label_daofbw {
504
+ display: block;
505
+ margin-bottom: var(--polly-space-xs);
506
+ font-size: var(--polly-text-sm);
507
+ font-weight: var(--polly-weight-medium);
508
+ color: var(--polly-text-muted);
509
+ }
510
+
511
+ .trigger_daofbw {
512
+ display: inline-block;
513
+ padding: var(--polly-space-sm) var(--polly-space-md);
514
+ border: var(--polly-border-width-default) solid var(--polly-border);
515
+ border-radius: var(--polly-radius-sm);
516
+ background-color: var(--polly-surface);
517
+ font-family: inherit;
518
+ font-size: var(--polly-text-md);
519
+ color: var(--polly-text);
520
+ text-align: left;
521
+ cursor: pointer;
522
+ white-space: nowrap;
523
+ overflow: hidden;
524
+ text-overflow: ellipsis;
525
+ min-width: 140px;
526
+ }
527
+
528
+ .trigger_daofbw:disabled {
529
+ opacity: var(--polly-opacity-disabled);
530
+ cursor: not-allowed;
531
+ }
532
+
533
+ .placeholder_daofbw {
534
+ color: var(--polly-text-muted);
535
+ }
536
+
537
+ .actions_daofbw {
538
+ padding: var(--polly-space-xs) var(--polly-space-sm);
539
+ border-bottom: var(--polly-border-width-default) solid var(--polly-border);
540
+ }
541
+
542
+ .actionBtn_daofbw {
543
+ display: inline-block;
544
+ padding: var(--polly-space-xs) var(--polly-space-sm);
545
+ border-radius: var(--polly-radius-sm);
546
+ font-family: inherit;
547
+ font-size: var(--polly-text-xs);
548
+ color: var(--polly-accent);
549
+ cursor: pointer;
550
+ text-align: center;
551
+ background: none;
552
+ border: none;
553
+ width: 100%;
554
+ }
555
+
556
+ .actionBtn_daofbw:hover {
557
+ background-color: var(--polly-surface-sunken);
558
+ }
559
+
560
+ .option_daofbw {
561
+ display: block;
562
+ padding: var(--polly-space-sm) var(--polly-space-md);
563
+ font-family: inherit;
564
+ font-size: var(--polly-text-sm);
565
+ color: var(--polly-text);
566
+ text-align: left;
567
+ cursor: pointer;
568
+ background: none;
569
+ border: none;
570
+ width: 100%;
571
+ }
572
+
573
+ .option_daofbw:hover {
574
+ background-color: var(--polly-surface-sunken);
575
+ }
576
+
577
+ .optionSelected_daofbw {
578
+ background-color: color-mix(in srgb, var(--polly-accent) 8%, var(--polly-surface));
579
+ }
580
+
581
+ .optionCheck_daofbw {
582
+ accent-color: var(--polly-accent);
583
+ margin-right: var(--polly-space-sm);
584
+ vertical-align: middle;
585
+ pointer-events: none;
586
+ }
587
+ }
588
+
589
+ /* src/polly-ui/Skeleton.module.css */
590
+ @layer polly-components {
591
+ @keyframes pollyShimmer_gpBHJA {
592
+ 0% {
593
+ background-position: -200% 0;
230
594
  }
595
+
596
+ 100% {
597
+ background-position: 200% 0;
598
+ }
599
+ }
600
+
601
+ .skeleton_Jrgo0g {
602
+ display: inline-block;
603
+ background: linear-gradient(90deg, var(--polly-surface-sunken) 25%, var(--polly-surface-raised) 50%, var(--polly-surface-sunken) 75%);
604
+ animation: pollyShimmer 1.5s infinite linear;
605
+ border-radius: var(--polly-radius-sm);
606
+ background-size: 200% 100%;
607
+ }
608
+
609
+ .text_Jrgo0g {
610
+ width: 100%;
611
+ height: 1em;
612
+ }
613
+
614
+ .rect_Jrgo0g {
615
+ width: 100%;
616
+ height: 100px;
617
+ }
618
+
619
+ .circle_Jrgo0g {
620
+ border-radius: var(--polly-radius-full);
621
+ width: 40px;
622
+ height: 40px;
623
+ }
624
+ }
625
+
626
+ /* src/polly-ui/Tabs.module.css */
627
+ @layer polly-components {
628
+ .tabs_xKO6GA {
629
+ overflow-x: auto;
630
+ scrollbar-width: none;
631
+ border-bottom: var(--polly-border-width-default) solid var(--polly-border);
632
+ }
633
+
634
+ .tabs_xKO6GA::-webkit-scrollbar {
635
+ display: none;
636
+ }
637
+
638
+ .tab_xKO6GA {
639
+ display: inline-block;
640
+ padding: var(--polly-space-sm) var(--polly-space-lg);
641
+ border: none;
642
+ border-bottom: var(--polly-border-width-medium) solid transparent;
643
+ font-family: inherit;
644
+ font-size: var(--polly-text-sm);
645
+ font-weight: var(--polly-weight-medium);
646
+ color: var(--polly-text-muted);
647
+ cursor: pointer;
648
+ white-space: nowrap;
649
+ transition: color var(--polly-motion-fast), border-color var(--polly-motion-fast);
650
+ background: none;
651
+ }
652
+
653
+ .tab_xKO6GA:hover:not(:disabled) {
654
+ color: var(--polly-text);
655
+ }
656
+
657
+ .tab_xKO6GA:disabled {
658
+ opacity: var(--polly-opacity-disabled);
659
+ cursor: not-allowed;
660
+ }
661
+
662
+ .active_xKO6GA {
663
+ color: var(--polly-accent);
664
+ border-bottom-color: var(--polly-accent);
231
665
  }
232
666
  }
233
667
 
@@ -317,3 +751,69 @@
317
751
  background: var(--polly-surface-sunken);
318
752
  }
319
753
  }
754
+
755
+ /* src/polly-ui/Toggle.module.css */
756
+ @layer polly-components {
757
+ .toggle_rnf-SQ {
758
+ display: inline-block;
759
+ cursor: pointer;
760
+ font-family: inherit;
761
+ font-size: var(--polly-text-md);
762
+ color: var(--polly-text);
763
+ user-select: none;
764
+ vertical-align: middle;
765
+ }
766
+
767
+ .disabled_rnf-SQ {
768
+ opacity: var(--polly-opacity-disabled);
769
+ cursor: not-allowed;
770
+ }
771
+
772
+ .input_rnf-SQ {
773
+ position: absolute;
774
+ overflow: hidden;
775
+ clip: rect(0, 0, 0, 0);
776
+ white-space: nowrap;
777
+ border: 0;
778
+ width: 1px;
779
+ height: 1px;
780
+ margin: -1px;
781
+ padding: 0;
782
+ }
783
+
784
+ .track_rnf-SQ {
785
+ display: inline-block;
786
+ position: relative;
787
+ border-radius: var(--polly-radius-full);
788
+ background-color: var(--polly-border);
789
+ vertical-align: middle;
790
+ transition: background-color var(--polly-motion-fast);
791
+ width: 36px;
792
+ height: 20px;
793
+ }
794
+
795
+ .trackChecked_rnf-SQ {
796
+ background-color: var(--polly-accent);
797
+ }
798
+
799
+ .thumb_rnf-SQ {
800
+ display: block;
801
+ position: absolute;
802
+ border-radius: var(--polly-radius-full);
803
+ background-color: var(--polly-accent-contrast);
804
+ transition: transform var(--polly-motion-fast);
805
+ width: 16px;
806
+ height: 16px;
807
+ top: 2px;
808
+ left: 2px;
809
+ }
810
+
811
+ .thumbChecked_rnf-SQ {
812
+ transform: translateX(16px);
813
+ }
814
+
815
+ .label_rnf-SQ {
816
+ margin-left: var(--polly-space-sm);
817
+ vertical-align: middle;
818
+ }
819
+ }
@@ -9,9 +9,18 @@
9
9
  */
10
10
  export { ActionForm, type ActionFormProps } from "./ActionForm.tsx";
11
11
  export { ActionInput, type ActionInputProps, type ActionInputSaveOn, type ActionInputVariant, } from "./ActionInput.tsx";
12
+ export { Badge, type BadgeProps, type BadgeVariant } from "./Badge.tsx";
13
+ export { Button, type ButtonColor, type ButtonProps, type ButtonSize, type ButtonTier, } from "./Button.tsx";
14
+ export { Checkbox, type CheckboxProps } from "./Checkbox.tsx";
15
+ export { Collapsible, type CollapsibleProps } from "./Collapsible.tsx";
12
16
  export { ConfirmDialog, type ConfirmOptions, confirm } from "./ConfirmDialog.tsx";
17
+ export { Dropdown, type DropdownProps } from "./Dropdown.tsx";
13
18
  export { Layout, type LayoutProps } from "./Layout.tsx";
14
19
  export { Modal } from "./Modal.tsx";
15
20
  export { getOverlayRootNode, OverlayRoot } from "./OverlayRoot.tsx";
21
+ export { Select, type SelectOption, type SelectProps } from "./Select.tsx";
22
+ export { Skeleton, type SkeletonProps, type SkeletonVariant } from "./Skeleton.tsx";
23
+ export { type Tab, Tabs, type TabsProps } from "./Tabs.tsx";
16
24
  export { TextInput, type TextInputProps } from "./TextInput.tsx";
17
25
  export { Toast, type ToastViewportProps } from "./Toast.tsx";
26
+ export { Toggle, type ToggleProps } from "./Toggle.tsx";