@quilltap/theme-storybook 1.0.36 → 1.0.38

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to `@quilltap/theme-storybook` will be documented in this file.
4
4
 
5
+ ## [1.0.38] - 2026-06-04
6
+
7
+ ### Added
8
+ - `.qt-checkbox` and `.qt-radio` component classes (previously referenced by the Inputs story but undefined here, so they rendered as bare native controls). Token-driven via new `--qt-checkbox-*` / `--qt-radio-*` variables; `accent-color` recolors the native fill/check.
9
+ - `--qt-select-arrow` variable holding the full `url()` data URI for the `<select>` chevron; `.qt-select` now references it so themes can swap the glyph wholesale.
10
+
11
+ ### Changed
12
+ - `.qt-button-success` now uses the token-driven button base (`--qt-button-radius`/padding/font) and gains the standard disabled handling, matching the other variants instead of hardcoding `0.5rem 1rem` / `font-weight: 600`.
13
+
5
14
  ## [1.0.35] - 2026-05-17
6
15
 
7
16
  ### Added
package/dist/index.css CHANGED
@@ -220,6 +220,16 @@ body {
220
220
  --qt-input-placeholder: var(--color-muted-foreground);
221
221
  --qt-input-focus-ring: var(--color-ring);
222
222
  --qt-input-transition: colors 150ms cubic-bezier(0.4, 0, 0.2, 1);
223
+ --qt-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
224
+ --qt-checkbox-size: 1rem;
225
+ --qt-checkbox-radius: var(--radius-sm);
226
+ --qt-checkbox-border: var(--color-border);
227
+ --qt-checkbox-accent: var(--color-primary);
228
+ --qt-checkbox-focus-ring: var(--color-ring);
229
+ --qt-radio-size: 1rem;
230
+ --qt-radio-border: var(--color-border);
231
+ --qt-radio-accent: var(--color-primary);
232
+ --qt-radio-focus-ring: var(--color-ring);
223
233
  --qt-navbar-height: 3.5rem;
224
234
  --qt-navbar-bg: var(--color-background);
225
235
  --qt-navbar-border: var(--color-border);
@@ -621,16 +631,22 @@ body {
621
631
  align-items: center;
622
632
  justify-content: center;
623
633
  gap: 0.5rem;
624
- padding: 0.5rem 1rem;
625
- border-radius: 0.5rem;
626
- font-size: 0.875rem;
627
- font-weight: 600;
628
- box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
629
- transition: all 150ms;
634
+ padding: var(--qt-button-padding-y) var(--qt-button-padding-x);
635
+ border-radius: var(--qt-button-radius);
636
+ font-size: var(--qt-button-font-size);
637
+ font-weight: var(--qt-button-font-weight);
638
+ line-height: 1.25;
639
+ border: 1px solid transparent;
640
+ box-shadow: var(--qt-button-primary-shadow);
641
+ transition: var(--qt-button-transition);
630
642
  cursor: pointer;
631
643
  background-color: var(--qt-button-success-bg);
632
644
  color: var(--qt-button-success-fg);
633
645
  }
646
+ .qt-button-success:disabled {
647
+ opacity: 0.5;
648
+ cursor: not-allowed;
649
+ }
634
650
  .qt-button-success:hover:not(:disabled) {
635
651
  background-color: var(--qt-button-success-hover-bg);
636
652
  }
@@ -768,12 +784,36 @@ body {
768
784
  -webkit-appearance: none;
769
785
  -moz-appearance: none;
770
786
  appearance: none;
771
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
787
+ background-image: var(--qt-select-arrow);
772
788
  background-repeat: no-repeat;
773
789
  background-position: right 0.75rem center;
774
790
  background-size: 1rem;
775
791
  padding-right: 2.5rem;
776
792
  }
793
+ .qt-checkbox {
794
+ width: var(--qt-checkbox-size);
795
+ height: var(--qt-checkbox-size);
796
+ border-radius: var(--qt-checkbox-radius);
797
+ border: 1px solid var(--qt-checkbox-border);
798
+ accent-color: var(--qt-checkbox-accent);
799
+ cursor: pointer;
800
+ }
801
+ .qt-checkbox:focus {
802
+ outline: none;
803
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--qt-checkbox-focus-ring) 35%, transparent);
804
+ }
805
+ .qt-radio {
806
+ width: var(--qt-radio-size);
807
+ height: var(--qt-radio-size);
808
+ border-radius: 9999px;
809
+ border: 1px solid var(--qt-radio-border);
810
+ accent-color: var(--qt-radio-accent);
811
+ cursor: pointer;
812
+ }
813
+ .qt-radio:focus {
814
+ outline: none;
815
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--qt-radio-focus-ring) 35%, transparent);
816
+ }
777
817
  .qt-badge {
778
818
  display: inline-flex;
779
819
  align-items: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quilltap/theme-storybook",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "Storybook preset and stories for developing Quilltap theme plugins",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -43,10 +43,10 @@
43
43
  "storybook": ">=8.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@storybook/react": "^10.4.0",
46
+ "@storybook/react": "^10.4.1",
47
47
  "@types/react": "^19.2.15",
48
48
  "react": "^19.2.6",
49
- "storybook": "^10.4.0",
49
+ "storybook": "^10.4.1",
50
50
  "tsup": "^8.5.1",
51
51
  "typescript": "^5.9.3"
52
52
  },
@@ -68,6 +68,21 @@
68
68
  --qt-input-focus-ring: var(--color-ring);
69
69
  --qt-input-transition: colors 150ms cubic-bezier(0.4, 0, 0.2, 1);
70
70
 
71
+ /* Select dropdown arrow — a full data URI so themes can swap the glyph. */
72
+ --qt-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
73
+
74
+ /* Checkbox & radio variables (accent-color is the fill/check hook) */
75
+ --qt-checkbox-size: 1rem;
76
+ --qt-checkbox-radius: var(--radius-sm);
77
+ --qt-checkbox-border: var(--color-border);
78
+ --qt-checkbox-accent: var(--color-primary);
79
+ --qt-checkbox-focus-ring: var(--color-ring);
80
+
81
+ --qt-radio-size: 1rem;
82
+ --qt-radio-border: var(--color-border);
83
+ --qt-radio-accent: var(--color-primary);
84
+ --qt-radio-focus-ring: var(--color-ring);
85
+
71
86
  /* Navbar variables */
72
87
  --qt-navbar-height: 3.5rem;
73
88
  --qt-navbar-bg: var(--color-background);
@@ -573,22 +588,31 @@
573
588
  background-color: var(--qt-button-warning-hover-bg);
574
589
  }
575
590
 
591
+ /* Success is used standalone (without .qt-button), so it carries the full
592
+ base — but token-driven, matching the other variants' metrics. */
576
593
  .qt-button-success {
577
594
  display: inline-flex;
578
595
  align-items: center;
579
596
  justify-content: center;
580
597
  gap: 0.5rem;
581
- padding: 0.5rem 1rem;
582
- border-radius: 0.5rem;
583
- font-size: 0.875rem;
584
- font-weight: 600;
585
- box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
586
- transition: all 150ms;
598
+ padding: var(--qt-button-padding-y) var(--qt-button-padding-x);
599
+ border-radius: var(--qt-button-radius);
600
+ font-size: var(--qt-button-font-size);
601
+ font-weight: var(--qt-button-font-weight);
602
+ line-height: 1.25;
603
+ border: 1px solid transparent;
604
+ box-shadow: var(--qt-button-primary-shadow);
605
+ transition: var(--qt-button-transition);
587
606
  cursor: pointer;
588
607
  background-color: var(--qt-button-success-bg);
589
608
  color: var(--qt-button-success-fg);
590
609
  }
591
610
 
611
+ .qt-button-success:disabled {
612
+ opacity: 0.5;
613
+ cursor: not-allowed;
614
+ }
615
+
592
616
  .qt-button-success:hover:not(:disabled) {
593
617
  background-color: var(--qt-button-success-hover-bg);
594
618
  }
@@ -752,13 +776,47 @@
752
776
 
753
777
  .qt-select {
754
778
  appearance: none;
755
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
779
+ background-image: var(--qt-select-arrow);
756
780
  background-repeat: no-repeat;
757
781
  background-position: right 0.75rem center;
758
782
  background-size: 1rem;
759
783
  padding-right: 2.5rem;
760
784
  }
761
785
 
786
+ /* ==========================================================================
787
+ CHECKBOX & RADIO COMPONENTS
788
+ accent-color recolors the native fill/check; size/border/radius tokens
789
+ take effect for appearance:none themes.
790
+ ========================================================================== */
791
+
792
+ .qt-checkbox {
793
+ width: var(--qt-checkbox-size);
794
+ height: var(--qt-checkbox-size);
795
+ border-radius: var(--qt-checkbox-radius);
796
+ border: 1px solid var(--qt-checkbox-border);
797
+ accent-color: var(--qt-checkbox-accent);
798
+ cursor: pointer;
799
+ }
800
+
801
+ .qt-checkbox:focus {
802
+ outline: none;
803
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--qt-checkbox-focus-ring) 35%, transparent);
804
+ }
805
+
806
+ .qt-radio {
807
+ width: var(--qt-radio-size);
808
+ height: var(--qt-radio-size);
809
+ border-radius: 9999px;
810
+ border: 1px solid var(--qt-radio-border);
811
+ accent-color: var(--qt-radio-accent);
812
+ cursor: pointer;
813
+ }
814
+
815
+ .qt-radio:focus {
816
+ outline: none;
817
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--qt-radio-focus-ring) 35%, transparent);
818
+ }
819
+
762
820
  /* ==========================================================================
763
821
  BADGE COMPONENTS
764
822
  ========================================================================== */