@basis-ng/styles 0.0.1-alpha.13 → 0.0.1-alpha.131

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.
Files changed (69) hide show
  1. package/package.json +26 -36
  2. package/src/components/alert.css +58 -0
  3. package/src/components/badge.css +37 -0
  4. package/src/components/button-group.css +16 -0
  5. package/src/components/button.css +73 -0
  6. package/src/components/card.css +24 -0
  7. package/src/components/checkbox.css +66 -0
  8. package/src/components/command-options.css +17 -0
  9. package/src/components/command.css +20 -0
  10. package/src/components/dialog.css +41 -0
  11. package/src/components/drawer.css +21 -0
  12. package/src/components/input-group.css +92 -0
  13. package/src/components/input.css +49 -0
  14. package/src/components/{label.component.css → label.css} +70 -74
  15. package/src/components/menu.css +159 -0
  16. package/src/components/option.css +37 -0
  17. package/src/components/otp.css +72 -0
  18. package/src/components/range.css +29 -0
  19. package/src/components/{row-item.component.css → row-item.css} +14 -14
  20. package/src/components/{row.component.css → row.css} +48 -56
  21. package/src/components/select-options.css +56 -0
  22. package/src/components/select.css +211 -0
  23. package/src/components/sheet.css +34 -0
  24. package/src/components/spinner.css +3 -0
  25. package/src/components/switch.css +48 -0
  26. package/src/components/tabs.css +52 -0
  27. package/src/components/textarea-group.css +65 -0
  28. package/src/components/textarea.css +39 -0
  29. package/src/components/tooltip.css +37 -0
  30. package/src/components/tree.css +50 -0
  31. package/src/index.css +79 -39
  32. package/src/utilities/general.css +7 -0
  33. package/src/utilities/index.css +2 -0
  34. package/src/utilities/sizes.css +7 -0
  35. package/src/components/alert.component.css +0 -71
  36. package/src/components/attached-box.component.css +0 -84
  37. package/src/components/badge.component.css +0 -58
  38. package/src/components/bottom-sheet.component.css +0 -49
  39. package/src/components/button-group.component.css +0 -20
  40. package/src/components/button.component.css +0 -165
  41. package/src/components/checkbox.component.css +0 -41
  42. package/src/components/color-picker.component.css +0 -34
  43. package/src/components/combobox-options.component.css +0 -41
  44. package/src/components/combobox.component.css +0 -10
  45. package/src/components/command-options.component.css +0 -33
  46. package/src/components/command.component.css +0 -45
  47. package/src/components/icon.component.css +0 -5
  48. package/src/components/input-group.component.css +0 -110
  49. package/src/components/input.component.css +0 -70
  50. package/src/components/menu-group.component.css +0 -18
  51. package/src/components/menu-item-checkbox.component.css +0 -32
  52. package/src/components/menu-item-radio.component.css +0 -32
  53. package/src/components/menu-item.component.css +0 -32
  54. package/src/components/menu-label.component.css +0 -4
  55. package/src/components/menu.component.css +0 -32
  56. package/src/components/option.component.css +0 -26
  57. package/src/components/range.component.css +0 -39
  58. package/src/components/select-options.component.css +0 -41
  59. package/src/components/select.component.css +0 -10
  60. package/src/components/side-sheet.component.css +0 -59
  61. package/src/components/spinner.component.css +0 -13
  62. package/src/components/switch.component.css +0 -68
  63. package/src/components/tab.component.css +0 -41
  64. package/src/components/table.component.css +0 -34
  65. package/src/components/tabs.component.css +0 -18
  66. package/src/components/textarea.component.css +0 -40
  67. package/src/components/tooltip.component.css +0 -45
  68. package/src/components/tree-node.component.css +0 -77
  69. package/src/components/tree.component.css +0 -7
package/package.json CHANGED
@@ -1,46 +1,36 @@
1
1
  {
2
2
  "name": "@basis-ng/styles",
3
- "version": "0.0.1-alpha.13",
3
+ "version": "0.0.1-alpha.131",
4
4
  "description": "CSS foundation for @basis-ng/primitives components",
5
5
  "main": "src/index.css",
6
6
  "exports": {
7
7
  ".": "./src/index.css",
8
- "./alert": "./src/components/alert.component.css",
9
- "./attached-box": "./src/components/attached-box.component.css",
10
- "./badge": "./src/components/badge.component.css",
11
- "./bottom-sheet": "./src/components/bottom-sheet.component.css",
12
- "./button-group": "./src/components/button-group.component.css",
13
- "./button": "./src/components/button.component.css",
14
- "./checkbox": "./src/components/checkbox.component.css",
15
- "./color-picker": "./src/components/color-picker.component.css",
16
- "./icon": "./src/components/icon.component.css",
17
- "./input-group": "./src/components/input-group.component.css",
18
- "./input": "./src/components/input.component.css",
19
- "./label": "./src/components/label.component.css",
20
- "./menu-group": "./src/components/menu-group.component.css",
21
- "./menu-item-checkbox": "./src/components/menu-item-checkbox.component.css",
22
- "./menu-item-radio": "./src/components/menu-item-radio.component.css",
23
- "./menu-item": "./src/components/menu-item.component.css",
24
- "./menu-label": "./src/components/menu-label.component.css",
25
- "./menu": "./src/components/menu.component.css",
26
- "./option": "./src/components/option.component.css",
27
- "./range": "./src/components/range.component.css",
28
- "./row-item": "./src/components/row-item.component.css",
29
- "./row": "./src/components/row.component.css",
8
+ "./alert": "./src/components/alert.css",
9
+ "./badge": "./src/components/badge.css",
10
+ "./drawer": "./src/components/drawer.css",
11
+ "./button-group": "./src/components/button-group.css",
12
+ "./button": "./src/components/button.css",
13
+ "./checkbox": "./src/components/checkbox.css",
14
+ "./input-group": "./src/components/input-group.css",
15
+ "./textarea-group": "./src/components/textarea-group.css",
16
+ "./input": "./src/components/input.css",
17
+ "./label": "./src/components/label.css",
18
+ "./menu": "./src/components/menu.css",
19
+ "./option": "./src/components/option.css",
20
+ "./range": "./src/components/range.css",
21
+ "./row-item": "./src/components/row-item.css",
22
+ "./row": "./src/components/row.css",
30
23
  "./search": "./src/components/search.component.css",
31
- "./select": "./src/components/select.component.css",
32
- "./select-content": "./src/components/select-content.component.css",
33
- "./select-option": "./src/components/select-option.component.css",
34
- "./side-sheet": "./src/components/side-sheet.component.css",
35
- "./spinner": "./src/components/spinner.component.css",
36
- "./switch": "./src/components/switch.component.css",
37
- "./tab": "./src/components/tab.component.css",
38
- "./table": "./src/components/table.component.css",
39
- "./tabs": "./src/components/tabs.component.css",
40
- "./textarea": "./src/components/textarea.component.css",
41
- "./tooltip": "./src/components/tooltip.component.css",
42
- "./tree-node": "./src/components/tree-node.component.css",
43
- "./tree": "./src/components/tree.component.css"
24
+ "./select": "./src/components/select.css",
25
+ "./select-option": "./src/components/select-option.css",
26
+ "./sheet": "./src/components/sheet.css",
27
+ "./spinner": "./src/components/spinner.css",
28
+ "./switch": "./src/components/switch.css",
29
+ "./tabs": "./src/components/tabs.css",
30
+ "./textarea": "./src/components/textarea.css",
31
+ "./tooltip": "./src/components/tooltip.css",
32
+ "./tree": "./src/components/tree.css",
33
+ "./dialog": "./src/components/dialog.css"
44
34
  },
45
35
  "files": [
46
36
  "src/**/*.css"
@@ -0,0 +1,58 @@
1
+ /* Alert styles — Base / Types / Sizes / Close */
2
+
3
+ /* Use the same selector the primitive exposes: `b-alert` */
4
+
5
+ b-alert {
6
+ @apply flex items-start gap-4 p-4 rounded-size-md w-full box-border max-w-full font-sans;
7
+
8
+ .icon {
9
+ @apply flex-shrink-0 self-start;
10
+ }
11
+
12
+ .content {
13
+ @apply flex-1 flex flex-col gap-1;
14
+
15
+ .title {
16
+ @apply font-semibold;
17
+ }
18
+
19
+ .body {
20
+ @apply text-sm;
21
+ }
22
+ }
23
+
24
+ /* Default: info */
25
+ @apply bg-info/20 text-info-foreground dark:bg-info-dark/20 dark:text-info-foreground-dark;
26
+
27
+ /* Types (match primitive's `type` input): use `b-type-` prefix to avoid classname collisions */
28
+ &.b-type-success {
29
+ @apply bg-success/20 inset-ring-1 text-success-foreground dark:bg-success-dark/20 dark:text-success-foreground-dark inset-ring-success/90 dark:inset-ring-success-dark/30;
30
+ }
31
+
32
+ &.b-type-error {
33
+ @apply bg-destructive/20 inset-ring-1 text-destructive dark:bg-destructive-dark/20 dark:text-destructive-dark inset-ring-destructive/30 dark:inset-ring-destructive-dark/30;
34
+ }
35
+
36
+ &.b-type-warning {
37
+ @apply bg-warning/20 inset-ring-1 text-warning-foreground dark:bg-warning-dark/20 dark:text-warning-foreground-dark inset-ring-warning/90 dark:inset-ring-warning-dark/30;
38
+ }
39
+
40
+ &.b-type-info {
41
+ @apply bg-info/20 inset-ring-1 text-info-foreground dark:bg-info-dark/20 dark:text-info-foreground-dark inset-ring-info/90 dark:inset-ring-info-dark/30;
42
+ }
43
+
44
+ /* Sizes */
45
+ &.b-size-sm {
46
+ @apply p-2 text-sm;
47
+ }
48
+ &.b-size-md {
49
+ @apply p-4 text-base;
50
+ }
51
+ &.b-size-lg {
52
+ @apply p-6 text-lg;
53
+ }
54
+
55
+ .close-btn {
56
+ @apply ml-auto bg-transparent border-0 cursor-pointer p-1 rounded;
57
+ }
58
+ }
@@ -0,0 +1,37 @@
1
+ span[b-badge] {
2
+ /* Base */
3
+ @apply inline-flex items-center gap-2 px-2 py-1 font-medium text-sm rounded-size-md;
4
+ @apply bg-primary text-primary-foreground dark:bg-primary-dark dark:text-primary-foreground-dark;
5
+
6
+ /* Variants */
7
+ &.b-variant-primary {
8
+ @apply bg-primary text-primary-foreground dark:bg-primary-dark dark:text-primary-foreground-dark;
9
+ }
10
+
11
+ &.b-variant-secondary {
12
+ @apply bg-secondary text-secondary-foreground dark:bg-secondary-dark dark:text-secondary-foreground-dark;
13
+ }
14
+
15
+ &.b-variant-ghost {
16
+ @apply bg-transparent text-secondary-foreground dark:text-secondary-foreground-dark;
17
+ }
18
+
19
+ &.b-variant-outlined {
20
+ @apply bg-transparent inset-ring-1 inset-ring-ring text-secondary-foreground dark:inset-ring-ring-dark dark:text-secondary-foreground-dark;
21
+ }
22
+
23
+ &.b-variant-destructive {
24
+ @apply bg-destructive text-destructive-foreground dark:bg-destructive-dark dark:text-destructive-foreground-dark;
25
+ }
26
+
27
+ /* Sizes */
28
+ &.b-size-sm {
29
+ @apply px-1.5 py-0.5 text-xs rounded-size-sm;
30
+ }
31
+ &.b-size-md {
32
+ @apply px-2 py-1 text-sm rounded-size-md;
33
+ }
34
+ &.b-size-lg {
35
+ @apply px-2.5 py-1 text-base rounded-size-lg;
36
+ }
37
+ }
@@ -0,0 +1,16 @@
1
+ b-button-group {
2
+ @apply flex;
3
+
4
+ &:not(.spaced) {
5
+ button:not(:last-child) {
6
+ @apply rounded-tr-none rounded-br-none -mr-[1px];
7
+ }
8
+ button:not(:first-child) {
9
+ @apply rounded-tl-none rounded-bl-none;
10
+ }
11
+ }
12
+
13
+ &.spaced {
14
+ @apply gap-2;
15
+ }
16
+ }
@@ -0,0 +1,73 @@
1
+ /* Button styles — grouped sections: Base / Variants / Sizes / States / Squared */
2
+ button[b-button] {
3
+ /* Base */
4
+ @apply transition-colors duration-150 flex items-center justify-center gap-x-1.5 disabled:opacity-50 disabled:cursor-not-allowed;
5
+
6
+ /* Default spacing/typography applied when no explicit size is present */
7
+ @apply px-3 py-0 text-sm h-8 rounded-size-md;
8
+
9
+ /* Default visual (primary) applied when no explicit variant is present */
10
+ @apply bg-primary text-primary-foreground hover:bg-primary/80;
11
+ @apply dark:bg-primary-dark dark:text-primary-foreground-dark dark:hover:bg-primary-dark/80;
12
+
13
+ /* Variants */
14
+ &.b-variant-primary {
15
+ @apply bg-primary text-primary-foreground hover:bg-primary/80;
16
+ @apply dark:bg-primary-dark dark:text-primary-foreground-dark dark:hover:bg-primary-dark/80;
17
+ }
18
+ &.b-variant-secondary {
19
+ @apply bg-secondary text-secondary-foreground hover:bg-secondary/80;
20
+ @apply dark:bg-secondary-dark dark:text-secondary-foreground-dark dark:hover:bg-secondary-dark/80;
21
+ }
22
+ &.b-variant-ghost {
23
+ /* Ghost is transparent with a subtle hover; text uses secondary foreground */
24
+ @apply bg-transparent text-secondary-foreground hover:bg-secondary;
25
+ @apply dark:text-secondary-foreground-dark dark:hover:bg-secondary-dark;
26
+ }
27
+ &.b-variant-outlined {
28
+ /* Outlined keeps a transparent background and an inset ring */
29
+ @apply bg-secondary/10 text-secondary-foreground inset-ring inset-ring-ring hover:bg-primary/5 shadow-xs;
30
+ @apply dark:bg-secondary-dark/40 dark:text-secondary-foreground-dark dark:inset-ring-ring-dark dark:hover:bg-primary-dark/5 shadow-xs;
31
+ }
32
+ &.b-variant-destructive {
33
+ @apply bg-destructive text-destructive-foreground inset-ring-1 inset-ring-destructive hover:bg-destructive/90 hover:inset-ring-destructive/80;
34
+ @apply dark:bg-destructive-dark dark:text-destructive-foreground-dark dark:inset-ring-destructive-dark dark:hover:bg-destructive-dark/90 dark:hover:inset-ring-destructive-dark/80;
35
+ }
36
+
37
+ /* Sizes */
38
+ &.b-size-sm {
39
+ @apply px-2 py-0 text-xs h-6 rounded-size-sm gap-1;
40
+ }
41
+ &.b-size-md {
42
+ @apply px-3 py-0 text-sm h-8 rounded-size-md gap-1.5;
43
+ }
44
+ &.b-size-lg {
45
+ @apply px-4 py-0 text-base h-10 rounded-size-lg gap-2;
46
+ }
47
+
48
+ /* States */
49
+ &.b-active,
50
+ &:focus-visible {
51
+ @apply outline-2 outline-offset-4 outline-primary;
52
+ @apply dark:outline-primary-dark;
53
+ }
54
+ &.b-variant-destructive.b-active,
55
+ &.b-variant-destructive:focus-visible {
56
+ @apply outline-2 outline-offset-4 outline-destructive;
57
+ @apply dark:outline-destructive-dark;
58
+ }
59
+
60
+ /* Squared */
61
+ &.b-squared {
62
+ @apply aspect-square p-0 flex items-center justify-center;
63
+ }
64
+ &.b-squared.b-size-sm {
65
+ @apply size-6;
66
+ }
67
+ &.b-squared.b-size-md {
68
+ @apply size-9;
69
+ }
70
+ &.b-squared.b-size-lg {
71
+ @apply size-12;
72
+ }
73
+ }
@@ -0,0 +1,24 @@
1
+ b-card {
2
+ @apply flex flex-col gap-4 p-6 bg-background inset-ring-1 inset-ring-ring rounded-size-lg;
3
+ @apply dark:bg-background-dark dark:inset-ring-ring-dark;
4
+
5
+ b-card-header {
6
+ @apply flex flex-col gap-1;
7
+
8
+ b-card-title {
9
+ @apply text-base font-semibold opacity-100;
10
+ }
11
+
12
+ b-card-description {
13
+ @apply text-sm opacity-70;
14
+ }
15
+ }
16
+
17
+ b-card-content {
18
+ @apply flex flex-col gap-2;
19
+ }
20
+
21
+ b-card-footer {
22
+ @apply flex justify-end gap-2;
23
+ }
24
+ }
@@ -0,0 +1,66 @@
1
+ button[b-checkbox] {
2
+ /* Base */
3
+ @apply inline-flex items-center justify-center align-middle select-none text-secondary-foreground bg-background inset-ring-1 inset-ring-ring shadow-xs;
4
+ @apply dark:bg-background-dark dark:text-secondary-foreground-dark dark:inset-ring-ring-dark;
5
+ @apply size-5 rounded-size-sm;
6
+
7
+ &:not([data-disabled]) {
8
+ @apply cursor-pointer hover:bg-secondary/20;
9
+ @apply dark:hover:bg-secondary-dark/30;
10
+ }
11
+
12
+ &[data-disabled] {
13
+ @apply opacity-50 cursor-not-allowed;
14
+ }
15
+
16
+ &[data-state='checked'] {
17
+ @apply bg-primary text-primary-foreground inset-ring-primary;
18
+ @apply dark:bg-primary-dark dark:text-primary-foreground-dark dark:inset-ring-primary-dark;
19
+ }
20
+
21
+ &[data-state='checked']:not([data-disabled]) {
22
+ @apply hover:bg-primary/80;
23
+ @apply dark:hover:bg-primary-dark/80;
24
+ }
25
+
26
+ &:focus-visible {
27
+ @apply outline-2 outline-offset-4 outline-primary;
28
+ @apply dark:outline-primary-dark;
29
+ }
30
+
31
+ /* Sizes */
32
+ &.b-size-sm {
33
+ @apply size-4 rounded-size-xs;
34
+ }
35
+ &.b-size-lg {
36
+ @apply size-6 rounded-size-md;
37
+ }
38
+
39
+ .b-checkbox-indicator {
40
+ @apply pointer-events-none flex items-center justify-center text-current;
41
+ }
42
+
43
+ &.b-size-sm .b-checkbox-indicator svg {
44
+ @apply h-2.5 w-2.5;
45
+ }
46
+
47
+ &.b-size-md .b-checkbox-indicator svg {
48
+ @apply h-3 w-3;
49
+ }
50
+
51
+ &.b-size-lg .b-checkbox-indicator svg {
52
+ @apply h-3.5 w-3.5;
53
+ }
54
+
55
+ &[data-state='unchecked'] .b-checkbox-indicator {
56
+ @apply opacity-0 scale-75;
57
+ }
58
+
59
+ &[data-state='checked'] .b-checkbox-indicator {
60
+ @apply opacity-100 scale-100;
61
+ }
62
+
63
+ svg {
64
+ @apply block;
65
+ }
66
+ }
@@ -0,0 +1,17 @@
1
+ ul[b-command-options] {
2
+ list-style: none;
3
+ box-sizing: border-box;
4
+ margin: 0;
5
+ position: relative;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 0.25rem;
9
+ width: 100%;
10
+ overflow-y: auto;
11
+ padding: 0;
12
+ scrollbar-width: thin;
13
+
14
+ .no-options-message {
15
+ padding: 0.5rem 0.75rem;
16
+ }
17
+ }
@@ -0,0 +1,20 @@
1
+ b-command {
2
+ padding: 0.25rem;
3
+ box-sizing: border-box;
4
+ margin: 0;
5
+ position: relative;
6
+ background: var(--background, #ffffff);
7
+ box-shadow: 0 0 0.25rem 0.125rem rgba(1, 1, 1, 0.01);
8
+ border-radius: clamp(0rem, var(--radius, 0.5rem), 0.5rem);
9
+ border: 1px solid color-mix(in srgb, var(--foreground, #798194) 10%, var(--background, #ffffff));
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 0.25rem;
13
+ width: 100%;
14
+
15
+ input {
16
+ &:focus-visible {
17
+ outline: none !important;
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,41 @@
1
+ b-dialog-content {
2
+ animation: b-dialog-enter 150ms ease-in-out;
3
+
4
+ &.leaving {
5
+ transform: scale(0.9);
6
+ opacity: 0;
7
+ transition:
8
+ transform 150ms ease-in-out,
9
+ opacity 150ms ease-in-out;
10
+ }
11
+ }
12
+
13
+ .b-dialog-backdrop {
14
+ background-color: rgba(0, 0, 0, 0.08);
15
+ animation: b-dialog-backdrop-enter 150ms ease-in-out;
16
+ }
17
+
18
+ :has(b-dialog-content.leaving) .b-dialog-backdrop {
19
+ opacity: 0;
20
+ transition: opacity 150ms ease-in-out;
21
+ }
22
+
23
+ @keyframes b-dialog-enter {
24
+ 0% {
25
+ opacity: 0;
26
+ transform: scale(0.9);
27
+ }
28
+ 100% {
29
+ opacity: 1;
30
+ transform: scale(1);
31
+ }
32
+ }
33
+
34
+ @keyframes b-dialog-backdrop-enter {
35
+ 0% {
36
+ opacity: 0;
37
+ }
38
+ 100% {
39
+ opacity: 1;
40
+ }
41
+ }
@@ -0,0 +1,21 @@
1
+ b-drawer {
2
+ @apply fixed bottom-0 left-0 right-0 bg-background dark:bg-background-dark rounded-t-lg border border-secondary dark:border-secondary-dark border-b-0 flex flex-col z-[1001] will-change-transform shadow-2xl touch-none select-none pt-10 box-border overflow-hidden h-1/2;
3
+ transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
4
+ transform: translateY(100%);
5
+
6
+ &.dragging {
7
+ transition: none;
8
+ }
9
+
10
+ .drag-section {
11
+ @apply w-full h-10 flex items-center justify-center cursor-grab touch-none absolute top-0;
12
+
13
+ .drag-indicator {
14
+ @apply w-1/5 h-1 bg-secondary dark:bg-secondary-dark rounded;
15
+ }
16
+ }
17
+ }
18
+
19
+ html:has(b-drawer.open) {
20
+ overflow: hidden;
21
+ }
@@ -0,0 +1,92 @@
1
+ b-input-group {
2
+ /* Base */
3
+ @apply flex overflow-hidden items-center;
4
+ @apply bg-secondary/10 text-secondary-foreground inset-ring-1 inset-ring-ring shadow-xs;
5
+ @apply dark:bg-secondary-dark/40 dark:text-secondary-foreground-dark dark:inset-ring-ring-dark;
6
+
7
+ /* Base md by default */
8
+ @apply px-2.5 py-0 text-sm h-8 rounded-size-md gap-1.5;
9
+
10
+ &:has(> button[b-button]:first-child) {
11
+ @apply !pl-1;
12
+ }
13
+
14
+ &:has(> button[b-button]:last-child) {
15
+ @apply !pr-1;
16
+ }
17
+
18
+ /* Internal input adjustments when placed inside group */
19
+ input[b-input] {
20
+ @apply !outline-0 !px-0 inset-ring-0 !w-full !rounded-none bg-transparent hover:bg-transparent shadow-none;
21
+ }
22
+
23
+ /* Focus state when any inner input is focused (and not readonly) */
24
+ &:has(input[b-input]:focus-visible:not(:read-only)) {
25
+ @apply outline-2 outline-offset-2 outline-primary dark:outline-primary-dark;
26
+
27
+ /* Override outline color if invalid while focused */
28
+ &:has(.ng-invalid.ng-touched),
29
+ &:has(.ng-invalid.ng-dirty) {
30
+ @apply outline-destructive dark:outline-destructive-dark;
31
+ }
32
+ }
33
+
34
+ /* Disabled inner input visual tweak */
35
+ input[b-input]:disabled {
36
+ @apply opacity-60 pointer-events-none;
37
+ }
38
+
39
+ /* Invalid state styles (group reflects error) */
40
+ &:has(input[b-input].ng-invalid.ng-touched),
41
+ &:has(input[b-input].ng-invalid.ng-dirty) {
42
+ @apply text-destructive placeholder:text-destructive bg-destructive/20 inset-ring-1 inset-ring-destructive/20;
43
+ @apply dark:text-destructive-dark dark:placeholder:text-destructive-dark dark:bg-destructive-dark/20 dark:inset-ring-destructive-dark/20;
44
+
45
+ button[b-button] {
46
+ @apply text-destructive placeholder:text-destructive bg-destructive/20 inset-ring-1 inset-ring-destructive/20;
47
+ @apply dark:text-destructive-dark dark:placeholder:text-destructive-dark dark:bg-destructive-dark/20 dark:inset-ring-destructive-dark/20;
48
+ }
49
+
50
+ /* Icon strokes inside when error */
51
+ i svg {
52
+ stroke: var(--color-destructive-foreground, currentColor);
53
+ }
54
+ }
55
+
56
+ /* Size variants (normalized to Tailwind scale, matching input sizes) */
57
+ &:has(input[b-input].b-size-sm) {
58
+ /* small */
59
+ @apply px-2 py-0 text-xs h-6 rounded-size-sm gap-1;
60
+ }
61
+
62
+ &:has(input[b-input].b-size-md) {
63
+ /* medium */
64
+ @apply px-2.5 py-0 text-sm h-8 rounded-size-md gap-1.5;
65
+
66
+ &:has(> button[b-button]:first-child) {
67
+ @apply !pl-1;
68
+ }
69
+
70
+ &:has(> button[b-button]:last-child) {
71
+ @apply !pr-1;
72
+ }
73
+ }
74
+
75
+ &:has(input[b-input].b-size-lg) {
76
+ /* large */
77
+ @apply px-3 py-0 text-base h-10 rounded-size-lg gap-2;
78
+
79
+ &:has(> button[b-button]:first-child) {
80
+ @apply !pl-1;
81
+ }
82
+
83
+ &:has(> button[b-button]:last-child) {
84
+ @apply !pr-1;
85
+ }
86
+ }
87
+
88
+ /* Prevent icons from shrinking inside the group */
89
+ > ng-icon {
90
+ @apply flex-shrink-0;
91
+ }
92
+ }
@@ -0,0 +1,49 @@
1
+ /* Input styles — Base / Sizes / States */
2
+ input[b-input] {
3
+ /* Base */
4
+ @apply bg-transparent text-secondary-foreground inset-ring-1 inset-ring-ring shadow-xs;
5
+ @apply dark:bg-secondary-dark/40 dark:text-secondary-foreground-dark dark:inset-ring-ring-dark;
6
+
7
+ /* Base md by default */
8
+ @apply px-2.5 py-0 text-sm h-8 rounded-size-md;
9
+
10
+ /* Disabled */
11
+ @apply disabled:opacity-50 disabled:cursor-not-allowed;
12
+
13
+ &:focus-visible:not(:read-only) {
14
+ @apply outline-2 outline-offset-4 outline-primary;
15
+ @apply dark:outline-primary-dark;
16
+ }
17
+
18
+ &::placeholder {
19
+ @apply opacity-50;
20
+ @apply dark:opacity-70 dark:text-font-dark;
21
+ }
22
+
23
+ &.ng-invalid.ng-touched,
24
+ &.ng-invalid.ng-dirty {
25
+ @apply text-destructive placeholder:text-destructive bg-destructive/20 inset-ring-1 inset-ring-destructive/20;
26
+ @apply dark:text-destructive-dark dark:placeholder:text-destructive-dark dark:bg-destructive-dark/20 dark:inset-ring-destructive-dark/20;
27
+ &:focus-visible {
28
+ @apply outline-2 outline-offset-4 outline-destructive;
29
+ @apply dark:outline-destructive-dark;
30
+ }
31
+ &::placeholder {
32
+ @apply text-destructive;
33
+ @apply dark:text-destructive-foreground;
34
+ }
35
+ }
36
+
37
+ &:disabled {
38
+ @apply opacity-60 pointer-events-none;
39
+ }
40
+
41
+ /* Sizes */
42
+ &.b-size-sm {
43
+ @apply px-2 py-0 text-xs h-6 rounded-size-sm;
44
+ }
45
+
46
+ &.b-size-lg {
47
+ @apply px-3 py-0 text-base h-10 rounded-size-lg;
48
+ }
49
+ }