@ibis-design/css 0.8.2 → 1.0.0-alpha.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.
Files changed (35) hide show
  1. package/README.md +46 -14
  2. package/dist/bootstrap-overrides.css +81 -0
  3. package/dist/components/authLayout.css +124 -0
  4. package/dist/components/banner.css +13 -17
  5. package/dist/components/button.css +13 -13
  6. package/dist/components/card.css +55 -0
  7. package/dist/components/cardLayout.css +71 -0
  8. package/dist/components/checkbox.css +29 -11
  9. package/dist/components/chips.css +8 -8
  10. package/dist/components/dashboardLayout.css +92 -0
  11. package/dist/components/dropdown.css +34 -16
  12. package/dist/components/dropdownButton.css +42 -28
  13. package/dist/components/formLayout.css +88 -0
  14. package/dist/components/navBottom.css +32 -0
  15. package/dist/components/navButton.css +233 -0
  16. package/dist/components/navDrawer.css +168 -0
  17. package/dist/components/navRail.css +135 -0
  18. package/dist/components/navShell.css +314 -0
  19. package/dist/components/pillTab.css +7 -12
  20. package/dist/components/radio.css +14 -13
  21. package/dist/components/switch.css +5 -8
  22. package/dist/components/textInput.css +12 -15
  23. package/dist/components/textarea.css +7 -13
  24. package/dist/components/textlink.css +6 -14
  25. package/dist/components/tipIndicator.css +4 -10
  26. package/dist/components/toaster.css +21 -27
  27. package/dist/components/topBar.css +52 -0
  28. package/dist/design-tokens.css +210 -86
  29. package/dist/tailwind.preset.js +1 -1
  30. package/dist/tailwind.theme.js +42 -2
  31. package/package.json +34 -31
  32. package/src/lib/assemble-bootstrap-overrides.ts +23 -0
  33. package/src/lib/assemble-design-tokens.ts +22 -0
  34. package/src/lib/set-theme.ts +79 -0
  35. package/src/lib/themes.ts +74 -0
@@ -3,9 +3,9 @@
3
3
  font-weight: var(--font-weight-normal);
4
4
  border-radius: var(--border-radius-sm);
5
5
  padding: var(--spacing-1) var(--spacing-3);
6
- background-color: var(--color-white);
6
+ background-color: var(--color-surface-default);
7
7
  color: var(--color-text-primary);
8
- border: var(--border-width-thin) solid var(--color-neutral-200);
8
+ border: var(--border-width-thin) solid var(--border-color-default);
9
9
  cursor: pointer;
10
10
  }
11
11
 
@@ -47,7 +47,7 @@
47
47
  }
48
48
 
49
49
  .ibis-chips--skeleton {
50
- background-color: var(--color-neutral-200);
50
+ background-color: var(--color-surface-muted);
51
51
  color: transparent;
52
52
  pointer-events: none;
53
53
  }
@@ -62,15 +62,15 @@
62
62
  }
63
63
 
64
64
  .ibis-chips:not(:disabled):hover {
65
- background-color: var(--color-neutral-200);
65
+ background-color: var(--color-interactive-neutral-bg-hover);
66
66
  }
67
67
 
68
68
  .ibis-chips--selected {
69
- background-color: var(--color-primary-100);
70
- color: var(--color-primary-800);
71
- border-color: var(--color-primary-800);
69
+ background-color: var(--color-interactive-primary-bg-selected);
70
+ color: var(--color-interactive-primary-indicator);
71
+ border-color: var(--color-interactive-primary-border-selected);
72
72
  }
73
73
 
74
74
  .ibis-chips--selected:not(:disabled):hover {
75
- background-color: var(--color-primary-200);
75
+ background-color: var(--color-interactive-primary-bg-hover);
76
76
  }
@@ -0,0 +1,92 @@
1
+ /* Dashboard Layout — import via @ibis-design/css/components/dashboardLayout.css */
2
+
3
+ .ib-dashboard-layout {
4
+ position: relative;
5
+ display: flex;
6
+ flex-direction: row;
7
+ height: 100dvh;
8
+ width: 100%;
9
+ overflow: hidden;
10
+ background-color: var(--color-surface-muted);
11
+ }
12
+
13
+ /* Rail wrapper */
14
+ .ib-dashboard-layout__rail-wrapper {
15
+ position: fixed;
16
+ top: 0;
17
+ left: 0;
18
+ height: 100dvh;
19
+ z-index: var(--z-index-sticky);
20
+ transition: transform var(--transition-duration-slow) var(--transition-timing-in-out);
21
+ }
22
+
23
+ .ib-dashboard-layout__rail-wrapper--hidden {
24
+ transform: translateX(-100%);
25
+ }
26
+
27
+ /* Drawer wrapper */
28
+ .ib-dashboard-layout__drawer-wrapper {
29
+ position: fixed;
30
+ top: 0;
31
+ left: 0;
32
+ height: 100dvh;
33
+ z-index: var(--z-index-sticky);
34
+ transform: translateX(-100%);
35
+ transition: transform var(--transition-duration-slow) var(--transition-timing-in-out);
36
+ }
37
+
38
+ .ib-dashboard-layout__drawer-wrapper--visible {
39
+ transform: translateX(0);
40
+ }
41
+
42
+ /* Content area */
43
+ .ib-dashboard-layout__content {
44
+ display: flex;
45
+ flex-direction: column;
46
+ flex: 1;
47
+ min-width: 0;
48
+ height: 100dvh;
49
+ overflow: hidden;
50
+ margin-left: 72px;
51
+ transition: margin-left var(--transition-duration-slow) var(--transition-timing-in-out);
52
+ }
53
+
54
+ .ib-dashboard-layout__content--expanded {
55
+ margin-left: 360px;
56
+ }
57
+
58
+ /* Main content */
59
+ .ib-dashboard-layout__main {
60
+ flex: 1;
61
+ overflow-y: auto;
62
+ padding: var(--spacing-6);
63
+ box-sizing: border-box;
64
+ }
65
+
66
+ /* Bottom nav — hidden by default */
67
+ .ib-dashboard-layout__bottom {
68
+ display: none;
69
+ }
70
+
71
+ /* Mobile */
72
+ @media (max-width: 768px) {
73
+ .ib-dashboard-layout__rail-wrapper {
74
+ display: none;
75
+ }
76
+
77
+ .ib-dashboard-layout__drawer-wrapper {
78
+ display: none;
79
+ }
80
+
81
+ .ib-dashboard-layout__content {
82
+ margin-left: 0;
83
+ }
84
+
85
+ .ib-dashboard-layout__bottom {
86
+ display: block;
87
+ }
88
+
89
+ .ib-dashboard-layout__main {
90
+ padding-bottom: calc(var(--spacing-6) + 64px);
91
+ }
92
+ }
@@ -11,11 +11,7 @@
11
11
  cursor: pointer;
12
12
  }
13
13
 
14
- /* Override TextInput styles inside trigger */
15
- .ibis-dropdown__trigger .ibis-input {
16
- gap: var(--spacing-0);
17
- }
18
-
14
+ /* Hide TextInput's label, help, and error inside the trigger */
19
15
  .ibis-dropdown__trigger .ibis-input__label-wrapper {
20
16
  display: none;
21
17
  }
@@ -25,13 +21,36 @@
25
21
  display: none;
26
22
  }
27
23
 
24
+ .ibis-dropdown__trigger .ibis-input {
25
+ gap: var(--spacing-0);
26
+ }
27
+
28
+ /* Prevent TextInput's field from capturing pointer/focus events */
29
+ .ibis-dropdown__trigger .ibis-input__field {
30
+ pointer-events: none;
31
+ }
32
+
33
+ /* Suppress TextInput's own hover/focus border changes inside the trigger */
34
+ .ibis-dropdown__trigger
35
+ .ibis-input:not(.ibis-input--disabled):not(.ibis-input--invalid)
36
+ .ibis-input__field-wrapper:not(:focus-within):hover {
37
+ border-color: var(--border-color-default);
38
+ }
39
+
40
+ .ibis-dropdown__trigger .ibis-input__field-wrapper:focus-within {
41
+ border-color: var(--border-color-default);
42
+ box-shadow: none;
43
+ }
44
+
28
45
  /* Default field wrapper radius */
29
46
  .ibis-dropdown__trigger .ibis-input__field-wrapper {
30
47
  border-radius: var(--border-radius-lg);
31
- transition: border-radius var(--transition-duration-fast) var(--transition-timing-default);
48
+ transition:
49
+ border-radius var(--transition-duration-fast) var(--transition-timing-default),
50
+ border-color var(--transition-duration-fast) var(--transition-timing-default);
32
51
  }
33
52
 
34
- /* ADDED — remove bottom radius on input when open so it connects to menu */
53
+ /* Remove bottom radius and border when open so it connects to the menu */
35
54
  .ibis-dropdown--open .ibis-dropdown__trigger .ibis-input__field-wrapper {
36
55
  border-bottom-left-radius: 0;
37
56
  border-bottom-right-radius: 0;
@@ -43,11 +62,11 @@
43
62
  position: absolute;
44
63
  width: 100%;
45
64
  background-color: var(--color-white);
46
- border: 2px solid var(--color-primary-950);
65
+ border: 2px solid var(--color-interactive-primary-indicator);
47
66
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
48
67
  border-top: none;
49
68
  margin-top: 0;
50
- z-index: 10; /* TODO: replace with token */
69
+ z-index: var(--z-index-dropdown);
51
70
  list-style: none;
52
71
  padding: var(--spacing-0);
53
72
  overflow: hidden;
@@ -55,7 +74,7 @@
55
74
 
56
75
  /* Dividers between items */
57
76
  .ibis-dropdown__menu li + li {
58
- border-top: 1px solid var(--color-neutral-200);
77
+ border-top: 1px solid var(--color-interactive-neutral-bg-hover);
59
78
  }
60
79
 
61
80
  /* Menu items */
@@ -71,31 +90,30 @@
71
90
  font-family: var(--font-family-sans);
72
91
  font-size: var(--font-size-body-md);
73
92
  font-weight: var(--font-weight-medium);
74
- color: var(--color-neutral-900);
93
+ color: var(--color-surface-inverse);
75
94
  text-align: center;
76
95
  transition: background-color var(--transition-duration-fast) var(--transition-timing-default);
77
96
  }
78
97
 
79
98
  .ibis-dropdown__item:hover {
80
- background-color: var(--color-primary-400);
99
+ background-color: var(--color-interactive-primary-bg-menu-hover);
81
100
  color: var(--color-white);
82
101
  }
83
102
 
84
- /* ↓ CHANGED — scoped to li aria-selected for correct specificity */
85
103
  li[aria-selected="true"] .ibis-dropdown__item {
86
- background-color: var(--color-primary-500);
104
+ background-color: var(--color-interactive-primary-bg-menu-selected);
87
105
  color: var(--color-white);
88
106
  font-weight: var(--font-weight-bold);
89
107
  }
90
108
 
91
109
  li[aria-selected="true"] .ibis-dropdown__item:hover {
92
- background-color: var(--color-primary-700);
110
+ background-color: var(--color-interactive-primary-bg-menu-selected-hover);
93
111
  color: var(--color-white);
94
112
  }
95
113
 
96
114
  .ibis-dropdown__item:focus {
97
115
  outline: none;
98
- background-color: var(--color-neutral-200);
116
+ background-color: var(--color-interactive-neutral-bg-hover);
99
117
  }
100
118
 
101
119
  /* Disabled */
@@ -3,40 +3,54 @@
3
3
  display: inline-block;
4
4
  }
5
5
 
6
+ .ibis-dropdown-button .ibis-button {
7
+ white-space: nowrap;
8
+ }
9
+
10
+ .ibis-dropdown-button--open .ibis-button {
11
+ border-bottom-left-radius: 0;
12
+ border-bottom-right-radius: 0;
13
+ transition: border-radius var(--transition-duration-fast) var(--transition-timing-default);
14
+ }
15
+
16
+ /* Caret icon */
6
17
  .ibis-caret {
7
18
  margin-left: 0.25em;
8
19
  width: 1em;
9
20
  height: 1em;
21
+ transition: transform var(--transition-duration-fast) var(--transition-timing-default);
22
+ }
23
+
24
+ .ibis-caret--open {
25
+ transform: rotate(180deg);
10
26
  }
11
27
 
28
+ /* Menu */
12
29
  .ibis-dropdown-menu {
13
30
  position: absolute;
14
31
  top: 100%;
15
32
  left: 0;
16
- margin-top: var(--spacing-1);
33
+ margin-top: 0;
17
34
  min-width: 160px;
18
35
  background: var(--color-white);
19
- border: 1px solid var(--color-neutral-300);
20
- border-radius: var(--border-radius-md);
36
+ border: 2px solid var(--color-surface-inverse);
37
+ border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) var(--border-radius-lg);
21
38
  box-shadow: var(--shadow-elevation-sm);
22
39
  z-index: var(--z-index-dropdown);
23
- padding: var(--spacing-1);
40
+ padding: var(--spacing-0);
24
41
  display: flex;
25
42
  flex-direction: column;
43
+ list-style: none;
44
+ overflow: hidden;
26
45
  }
27
46
 
28
- /* .ibis-dropdown-menu :global(button) {
29
- all: unset;
30
- padding: 8px;
31
- cursor: pointer;
32
- border-radius: 4px;
47
+ /* Dividers between items */
48
+ .ibis-dropdown-menu li + li {
49
+ border-top: 1px solid var(--color-interactive-neutral-bg-hover);
33
50
  }
34
51
 
35
- .ibis-dropdown-menu :global(button:hover) {
36
- background-color: var(--color-neutral-100);
37
- } */
38
-
39
- .ibis-dropdown-menu :global(.ibis-dropdown-menu__item) {
52
+ /* Menu items */
53
+ .ibis-dropdown-menu .ibis-dropdown-menu__item {
40
54
  all: unset;
41
55
  display: flex;
42
56
  align-items: center;
@@ -48,34 +62,34 @@
48
62
  font-family: var(--font-family-sans);
49
63
  font-size: var(--font-size-body-md);
50
64
  font-weight: var(--font-weight-medium);
51
- color: var(--color-neutral-900);
65
+ color: var(--color-surface-inverse);
52
66
  text-align: center;
53
67
  transition: background-color var(--transition-duration-fast) var(--transition-timing-default);
54
68
  }
55
69
 
56
- .ibis-dropdown-menu :global(.ibis-dropdown-menu__item:hover) {
57
- background-color: var(--color-primary-400);
70
+ .ibis-dropdown-menu .ibis-dropdown-menu__item:hover {
71
+ background-color: var(--color-interactive-primary-bg-menu-hover);
58
72
  color: var(--color-white);
59
73
  }
60
74
 
61
- .ibis-dropdown-menu :global(.ibis-dropdown-menu__item--selected) {
62
- background-color: var(--color-primary-500);
75
+ .ibis-dropdown-menu .ibis-dropdown-menu__item--selected {
76
+ background-color: var(--color-interactive-primary-bg-menu-selected);
63
77
  color: var(--color-white);
64
78
  font-weight: var(--font-weight-bold);
65
79
  }
66
80
 
67
- .ibis-dropdown-menu :global(.ibis-dropdown-menu__item--selected:hover) {
68
- background-color: var(--color-primary-700);
81
+ .ibis-dropdown-menu .ibis-dropdown-menu__item--selected:hover {
82
+ background-color: var(--color-interactive-primary-bg-menu-selected-hover);
69
83
  color: var(--color-white);
70
84
  }
71
85
 
72
- .ibis-caret {
73
- margin-left: 0.25em;
74
- width: 1em;
75
- height: 1em;
76
- transition: transform var(--transition-duration-fast) var(--transition-timing-default);
86
+ .ibis-dropdown-menu :global(.ibis-dropdown-menu__item:focus) {
87
+ outline: none;
88
+ background-color: var(--color-interactive-neutral-bg-hover);
77
89
  }
78
90
 
79
- .ibis-caret--open {
80
- transform: rotate(180deg);
91
+ /* Disabled */
92
+ .ibis-dropdown-button:has(.ibis-button:disabled) {
93
+ cursor: not-allowed;
94
+ opacity: var(--opacity-5);
81
95
  }
@@ -0,0 +1,88 @@
1
+ /* Form Layout — import via @ibis-design/css/components/formLayout.css */
2
+
3
+ .ibis-form-layout {
4
+ display: flex;
5
+ flex-direction: column;
6
+ align-items: center;
7
+ width: 100%;
8
+ padding: var(--spacing-8) var(--spacing-6);
9
+ box-sizing: border-box;
10
+ min-height: 100%;
11
+ }
12
+
13
+ .ibis-form-layout__inner {
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: var(--spacing-6);
17
+ width: 100%;
18
+ max-width: 640px;
19
+ box-sizing: border-box;
20
+ }
21
+
22
+ /* Card variant */
23
+ .ibis-form-layout__inner--card {
24
+ background-color: var(--color-surface-default);
25
+ border: var(--border-width-thin) solid var(--border-color-subtle);
26
+ border-radius: var(--border-radius-xl);
27
+ box-shadow: var(--shadow-elevation-sm);
28
+ padding: var(--spacing-8);
29
+ }
30
+
31
+ /* Plain variant */
32
+ .ibis-form-layout__inner--plain {
33
+ background-color: transparent;
34
+ padding: 0;
35
+ }
36
+
37
+ .ibis-form-layout__header {
38
+ display: flex;
39
+ flex-direction: column;
40
+ gap: var(--spacing-2);
41
+ }
42
+
43
+ .ibis-form-layout__title {
44
+ font-family: var(--font-family-heading);
45
+ font-size: var(--font-size-heading-h3);
46
+ font-weight: var(--font-weight-bold);
47
+ color: var(--color-text-primary);
48
+ margin: 0;
49
+ }
50
+
51
+ .ibis-form-layout__subtitle {
52
+ font-family: var(--font-family-sans);
53
+ font-size: var(--font-size-body-md);
54
+ color: var(--color-text-secondary);
55
+ margin: 0;
56
+ }
57
+
58
+ .ibis-form-layout__body {
59
+ display: flex;
60
+ flex-direction: column;
61
+ gap: var(--spacing-6);
62
+ }
63
+
64
+ .ibis-form-layout__section {
65
+ display: flex;
66
+ flex-direction: column;
67
+ gap: var(--spacing-4);
68
+ }
69
+
70
+ .ibis-form-layout__section-label {
71
+ font-family: var(--font-family-sans);
72
+ font-size: var(--font-size-body-sm);
73
+ font-weight: var(--font-weight-medium);
74
+ color: var(--color-text-muted);
75
+ margin: 0;
76
+ padding-bottom: var(--spacing-2);
77
+ border-bottom: var(--border-width-thin) solid var(--border-color-subtle);
78
+ }
79
+
80
+ .ibis-form-layout__footer {
81
+ display: flex;
82
+ flex-direction: row;
83
+ align-items: center;
84
+ justify-content: flex-end;
85
+ gap: var(--spacing-3);
86
+ padding-top: var(--spacing-4);
87
+ border-top: var(--border-width-thin) solid var(--border-color-subtle);
88
+ }
@@ -0,0 +1,32 @@
1
+ /* Bottom navigation bar — import via @ibis-design/css/components/navBottom.css */
2
+
3
+ .ib-nav-bottom {
4
+ position: fixed;
5
+ bottom: 0;
6
+ left: 0;
7
+ right: 0;
8
+ width: 100%;
9
+ display: flex;
10
+ flex-direction: row;
11
+ align-items: center;
12
+ justify-content: space-around;
13
+ background-color: var(--color-surface-default);
14
+ border-top: var(--border-width-thin) solid var(--border-color-default);
15
+ box-shadow: var(--shadow-elevation-md);
16
+ padding: var(--spacing-2) var(--spacing-4);
17
+ padding-bottom: calc(var(--spacing-2) + env(safe-area-inset-bottom));
18
+ z-index: var(--z-index-sticky);
19
+ box-sizing: border-box;
20
+ }
21
+
22
+ .ib-nav-bottom-icon {
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ transition: transform var(--transition-duration-normal) var(--transition-timing-default);
27
+ transform: scale(1);
28
+ }
29
+
30
+ .ib-nav-bottom-icon--selected {
31
+ transform: scale(1.15);
32
+ }