opui-css 2.3.0 → 3.0.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 (82) hide show
  1. package/LICENSE +21 -21
  2. package/dist/op.css +1 -14
  3. package/dist/theme-one.css +4378 -4256
  4. package/dist/theme-two.css +4097 -3975
  5. package/package.json +8 -8
  6. package/src/core/normalize.css +196 -196
  7. package/src/core/utils.css +60 -60
  8. package/src/open-props.css +1 -1
  9. package/src/themes/theme-one/components/accordion.css +172 -172
  10. package/src/themes/theme-one/components/alert.css +85 -85
  11. package/src/themes/theme-one/components/avatar.css +68 -68
  12. package/src/themes/theme-one/components/badge.css +101 -101
  13. package/src/themes/theme-one/components/button-group.css +69 -69
  14. package/src/themes/theme-one/components/button.css +267 -267
  15. package/src/themes/theme-one/components/card.css +82 -82
  16. package/src/themes/theme-one/components/checkbox-radio.css +123 -123
  17. package/src/themes/theme-one/components/chip.css +135 -135
  18. package/src/themes/theme-one/components/definition-list.css +65 -65
  19. package/src/themes/theme-one/components/dialog.css +59 -59
  20. package/src/themes/theme-one/components/divider.css +7 -7
  21. package/src/themes/theme-one/components/field-group.css +83 -83
  22. package/src/themes/theme-one/components/field.css +494 -494
  23. package/src/themes/theme-one/components/icon-button.css +40 -40
  24. package/src/themes/theme-one/components/link.css +21 -21
  25. package/src/themes/theme-one/components/list.css +317 -317
  26. package/src/themes/theme-one/components/progress.css +83 -83
  27. package/src/themes/theme-one/components/range.css +121 -121
  28. package/src/themes/theme-one/components/rich-text.css +210 -210
  29. package/src/themes/theme-one/components/select.css +163 -163
  30. package/src/themes/theme-one/components/snackbar.css +148 -148
  31. package/src/themes/theme-one/components/spinner.css +38 -38
  32. package/src/themes/theme-one/components/switch.css +189 -189
  33. package/src/themes/theme-one/components/tab-buttons.css +120 -120
  34. package/src/themes/theme-one/components/table.css +100 -100
  35. package/src/themes/theme-one/components/text-field.css +57 -57
  36. package/src/themes/theme-one/components/textarea.css +25 -25
  37. package/src/themes/theme-one/components/toggle-button-group.css +135 -135
  38. package/src/themes/theme-one/components/tooltip.css +94 -94
  39. package/src/themes/theme-one/components/typography.css +209 -209
  40. package/src/themes/theme-one/components.css +37 -37
  41. package/src/themes/theme-one/imports.css +16 -0
  42. package/src/themes/theme-one/theme.css +163 -13
  43. package/src/themes/theme-two/components/accordion.css +172 -172
  44. package/src/themes/theme-two/components/alert.css +85 -85
  45. package/src/themes/theme-two/components/avatar.css +68 -68
  46. package/src/themes/theme-two/components/badge.css +101 -101
  47. package/src/themes/theme-two/components/button-group.css +50 -50
  48. package/src/themes/theme-two/components/button.css +217 -217
  49. package/src/themes/theme-two/components/card.css +82 -82
  50. package/src/themes/theme-two/components/checkbox-radio.css +123 -123
  51. package/src/themes/theme-two/components/chip.css +135 -135
  52. package/src/themes/theme-two/components/definition-list.css +65 -65
  53. package/src/themes/theme-two/components/dialog.css +59 -59
  54. package/src/themes/theme-two/components/divider.css +7 -7
  55. package/src/themes/theme-two/components/field-group.css +83 -83
  56. package/src/themes/theme-two/components/field.css +281 -281
  57. package/src/themes/theme-two/components/icon-button.css +40 -40
  58. package/src/themes/theme-two/components/link.css +21 -21
  59. package/src/themes/theme-two/components/list.css +317 -317
  60. package/src/themes/theme-two/components/progress.css +83 -83
  61. package/src/themes/theme-two/components/range.css +121 -121
  62. package/src/themes/theme-two/components/rich-text.css +210 -210
  63. package/src/themes/theme-two/components/select.css +162 -162
  64. package/src/themes/theme-two/components/snackbar.css +148 -148
  65. package/src/themes/theme-two/components/spinner.css +38 -38
  66. package/src/themes/theme-two/components/switch.css +189 -189
  67. package/src/themes/theme-two/components/tab-buttons.css +120 -120
  68. package/src/themes/theme-two/components/table.css +107 -107
  69. package/src/themes/theme-two/components/text-field.css +57 -57
  70. package/src/themes/theme-two/components/textarea.css +25 -25
  71. package/src/themes/theme-two/components/toggle-button-group.css +135 -135
  72. package/src/themes/theme-two/components/tooltip.css +94 -94
  73. package/src/themes/theme-two/components/typography.css +209 -209
  74. package/src/themes/theme-two/components.css +37 -37
  75. package/src/themes/theme-two/imports.css +16 -0
  76. package/src/themes/theme-two/theme.css +158 -13
  77. package/dist/theme-one+op.css +0 -4302
  78. package/dist/theme-two+op.css +0 -4021
  79. package/src/themes/theme-one/setup.css +0 -163
  80. package/src/themes/theme-one/theme+op.css +0 -5
  81. package/src/themes/theme-two/setup.css +0 -158
  82. package/src/themes/theme-two/theme+op.css +0 -5
@@ -1,135 +1,135 @@
1
- @layer components.root {
2
- :where([role="group"].toggle-button-group) {
3
- --_border-radius: var(--button-border-radius);
4
- --_button-padding-inline: clamp(var(--size-2), 3cqi, var(--size-4));
5
- --_max-width: auto;
6
- --_icon-size: var(--size-4);
7
-
8
- background-color: var(--surface-default);
9
- border: 1px solid var(--border-color);
10
- border-radius: var(--_border-radius);
11
- display: flex;
12
- grid-auto-columns: 1fr;
13
- grid-auto-flow: column;
14
- max-inline-size: var(--_max-width);
15
- min-inline-size: max-content;
16
- overflow: clip;
17
-
18
- /* Size */
19
- &.small {
20
- button {
21
- min-block-size: 2.1875rem; /* 35px */
22
- }
23
- }
24
-
25
- &.x-small {
26
- button {
27
- min-block-size: var(--size-6); /* 30px */
28
- }
29
- }
30
-
31
- &.fullwidth {
32
- inline-size: 100%;
33
- }
34
-
35
- /* Button */
36
- button {
37
- --_bg-color: transparent;
38
-
39
- align-items: center;
40
- background: var(--_bg-color) var(--ripple, none);
41
- border-radius: 0;
42
- border-inline: 1px solid var(--border-color);
43
- border-inline-start-width: 0;
44
- color: var(--text-color-1);
45
- display: inline-flex;
46
- flex: auto;
47
- gap: 1ex;
48
- justify-content: center;
49
- min-block-size: 2.5rem; /* 40px */
50
- min-inline-size: 5ex;
51
- outline-offset: calc(-1 * var(--size-2));
52
- padding: 0 var(--_button-padding-inline);
53
- position: relative;
54
- user-select: none;
55
-
56
- @media (prefers-reduced-motion: no-preference) {
57
- transition: background-color 0.2s var(--ease-out-3),
58
- box-shadow 0.2s var(--ease-out-3), border-color 0.2s var(--ease-out-3),
59
- color 0.2s var(--ease-out-3), outline-offset 0.05s var(--ease-1);
60
- }
61
-
62
- /* Element states */
63
- &:hover {
64
- --_bg-color: light-dark(oklch(0% 0 0 / 0.04), oklch(100% 0 0 / 0.08));
65
- }
66
-
67
- &:focus-visible {
68
- outline-offset: -6px;
69
- }
70
-
71
- /* Disabled */
72
- &[disabled] {
73
- border-color: color-mix(in oklch, var(--border-color) 50%, transparent);
74
- cursor: not-allowed;
75
- color: color-mix(in oklch, var(--text-color-1) 30%, transparent);
76
- }
77
-
78
- &[disabled] + &:not([disabled]):not(:last-of-type) {
79
- border-inline-end-width: 1px;
80
- }
81
-
82
- /* Assign border radius for outline */
83
- &:first-of-type {
84
- border-bottom-left-radius: var(--_border-radius);
85
- border-top-left-radius: var(--_border-radius);
86
- }
87
- &:last-of-type {
88
- border-bottom-right-radius: var(--_border-radius);
89
- border-top-right-radius: var(--_border-radius);
90
- }
91
-
92
- &:last-of-type {
93
- border-inline-end-width: 0;
94
- }
95
-
96
- /* Ripple effect */
97
- background-position: center;
98
-
99
- &:where(:not([disabled])) {
100
- &:where(:not(:active):hover) {
101
- --ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
102
- center/15000%;
103
-
104
- transition: background var(--button-ripple-duration);
105
- }
106
-
107
- &:where(:hover:active) {
108
- background-size: var(--button-ripple-size);
109
- transition: background 0s;
110
- }
111
- }
112
-
113
- /* Icons */
114
- svg {
115
- inline-size: var(--_icon-size);
116
- inset-inline-start: calc(var(--_button-padding-inline));
117
-
118
- & + svg {
119
- max-block-size: var(--size-5);
120
- max-inline-size: var(--size-7);
121
- }
122
- }
123
-
124
- /* Selected */
125
- &.selected {
126
- --_bg-color: oklch(from var(--primary) l c h / 25%);
127
-
128
- /* Checkmark */
129
- svg:first-of-type {
130
- margin-block-end: -3px;
131
- }
132
- }
133
- }
134
- }
135
- }
1
+ @layer components.root {
2
+ :where([role="group"].toggle-button-group) {
3
+ --_border-radius: var(--button-border-radius);
4
+ --_button-padding-inline: clamp(var(--size-2), 3cqi, var(--size-4));
5
+ --_max-width: auto;
6
+ --_icon-size: var(--size-4);
7
+
8
+ background-color: var(--surface-default);
9
+ border: 1px solid var(--border-color);
10
+ border-radius: var(--_border-radius);
11
+ display: flex;
12
+ grid-auto-columns: 1fr;
13
+ grid-auto-flow: column;
14
+ max-inline-size: var(--_max-width);
15
+ min-inline-size: max-content;
16
+ overflow: clip;
17
+
18
+ /* Size */
19
+ &.small {
20
+ button {
21
+ min-block-size: 2.1875rem; /* 35px */
22
+ }
23
+ }
24
+
25
+ &.x-small {
26
+ button {
27
+ min-block-size: var(--size-6); /* 30px */
28
+ }
29
+ }
30
+
31
+ &.fullwidth {
32
+ inline-size: 100%;
33
+ }
34
+
35
+ /* Button */
36
+ button {
37
+ --_bg-color: transparent;
38
+
39
+ align-items: center;
40
+ background: var(--_bg-color) var(--ripple, none);
41
+ border-radius: 0;
42
+ border-inline: 1px solid var(--border-color);
43
+ border-inline-start-width: 0;
44
+ color: var(--text-color-1);
45
+ display: inline-flex;
46
+ flex: auto;
47
+ gap: 1ex;
48
+ justify-content: center;
49
+ min-block-size: 2.5rem; /* 40px */
50
+ min-inline-size: 5ex;
51
+ outline-offset: calc(-1 * var(--size-2));
52
+ padding: 0 var(--_button-padding-inline);
53
+ position: relative;
54
+ user-select: none;
55
+
56
+ @media (prefers-reduced-motion: no-preference) {
57
+ transition: background-color 0.2s var(--ease-out-3),
58
+ box-shadow 0.2s var(--ease-out-3), border-color 0.2s var(--ease-out-3),
59
+ color 0.2s var(--ease-out-3), outline-offset 0.05s var(--ease-1);
60
+ }
61
+
62
+ /* Element states */
63
+ &:hover {
64
+ --_bg-color: light-dark(oklch(0% 0 0 / 0.04), oklch(100% 0 0 / 0.08));
65
+ }
66
+
67
+ &:focus-visible {
68
+ outline-offset: -6px;
69
+ }
70
+
71
+ /* Disabled */
72
+ &[disabled] {
73
+ border-color: color-mix(in oklch, var(--border-color) 50%, transparent);
74
+ cursor: not-allowed;
75
+ color: color-mix(in oklch, var(--text-color-1) 30%, transparent);
76
+ }
77
+
78
+ &[disabled] + &:not([disabled]):not(:last-of-type) {
79
+ border-inline-end-width: 1px;
80
+ }
81
+
82
+ /* Assign border radius for outline */
83
+ &:first-of-type {
84
+ border-bottom-left-radius: var(--_border-radius);
85
+ border-top-left-radius: var(--_border-radius);
86
+ }
87
+ &:last-of-type {
88
+ border-bottom-right-radius: var(--_border-radius);
89
+ border-top-right-radius: var(--_border-radius);
90
+ }
91
+
92
+ &:last-of-type {
93
+ border-inline-end-width: 0;
94
+ }
95
+
96
+ /* Ripple effect */
97
+ background-position: center;
98
+
99
+ &:where(:not([disabled])) {
100
+ &:where(:not(:active):hover) {
101
+ --ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
102
+ center/15000%;
103
+
104
+ transition: background var(--button-ripple-duration);
105
+ }
106
+
107
+ &:where(:hover:active) {
108
+ background-size: var(--button-ripple-size);
109
+ transition: background 0s;
110
+ }
111
+ }
112
+
113
+ /* Icons */
114
+ svg {
115
+ inline-size: var(--_icon-size);
116
+ inset-inline-start: calc(var(--_button-padding-inline));
117
+
118
+ & + svg {
119
+ max-block-size: var(--size-5);
120
+ max-inline-size: var(--size-7);
121
+ }
122
+ }
123
+
124
+ /* Selected */
125
+ &.selected {
126
+ --_bg-color: oklch(from var(--primary) l c h / 25%);
127
+
128
+ /* Checkmark */
129
+ svg:first-of-type {
130
+ margin-block-end: -3px;
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
@@ -1,94 +1,94 @@
1
- @layer components.root {
2
- :where(.tooltip) {
3
- background-color: var(--surface-tonal);
4
- border-radius: var(--radius-2);
5
- font-size: var(--font-size-xs);
6
- margin: var(--size-1);
7
- opacity: 1;
8
- padding: 0 var(--size-2);
9
- position: absolute;
10
- position-area: block-start;
11
- position-try-fallbacks: flip-block;
12
- /* position-try-order: most-height; */
13
- view-transition-name: vt-tooltip;
14
- z-index: 1;
15
-
16
- &:hover {
17
- opacity: 1;
18
- }
19
-
20
- &:where([class^="top"], [class^="bottom"]) {
21
- background-color: red;
22
- position-try-order: most-height;
23
- }
24
-
25
- &:where([class^="left"], [class^="right"]) {
26
- background-color: red;
27
- position-try-order: most-width;
28
- }
29
-
30
- &.top {
31
- position-area: block-start;
32
- }
33
- &.top-start {
34
- position-area: block-start span-inline-start;
35
- }
36
- &.top-end {
37
- position-area: block-start span-inline-end;
38
- }
39
- &.right {
40
- position-area: inline-end;
41
- }
42
- &.right-start {
43
- position-area: inline-end span-block-start;
44
- }
45
- &.right-end {
46
- position-area: inline-end span-block-end;
47
- }
48
- &.bottom {
49
- position-area: block-end;
50
- }
51
- &.bottom-start {
52
- position-area: block-end span-inline-start;
53
- }
54
- &.bottom-end {
55
- position-area: block-end span-inline-end;
56
- }
57
- &.left {
58
- position-area: inline-start;
59
- }
60
- &.left-start {
61
- position-area: inline-start span-block-start;
62
- }
63
- &.left-end {
64
- position-area: inline-start span-block-end;
65
- }
66
-
67
- /* Swap it around for rtl */
68
- :dir(rtl) {
69
- &.right {
70
- position-area: inline-start;
71
- }
72
- &.right-start {
73
- position-area: inline-start span-block-start;
74
- }
75
- &.right-end {
76
- position-area: inline-start span-block-end;
77
- }
78
- &.left {
79
- position-area: inline-end;
80
- }
81
- &.left-start {
82
- position-area: inline-end span-block-start;
83
- }
84
- &.left-end {
85
- position-area: inline-end span-block-end;
86
- }
87
- }
88
- }
89
-
90
- ::view-transition-old(vt-tooltip),
91
- ::view-transition-new(vt-tooltip) {
92
- height: 100%;
93
- }
94
- }
1
+ @layer components.root {
2
+ :where(.tooltip) {
3
+ background-color: var(--surface-tonal);
4
+ border-radius: var(--radius-2);
5
+ font-size: var(--font-size-xs);
6
+ margin: var(--size-1);
7
+ opacity: 1;
8
+ padding: 0 var(--size-2);
9
+ position: absolute;
10
+ position-area: block-start;
11
+ position-try-fallbacks: flip-block;
12
+ /* position-try-order: most-height; */
13
+ view-transition-name: vt-tooltip;
14
+ z-index: 1;
15
+
16
+ &:hover {
17
+ opacity: 1;
18
+ }
19
+
20
+ &:where([class^="top"], [class^="bottom"]) {
21
+ background-color: red;
22
+ position-try-order: most-height;
23
+ }
24
+
25
+ &:where([class^="left"], [class^="right"]) {
26
+ background-color: red;
27
+ position-try-order: most-width;
28
+ }
29
+
30
+ &.top {
31
+ position-area: block-start;
32
+ }
33
+ &.top-start {
34
+ position-area: block-start span-inline-start;
35
+ }
36
+ &.top-end {
37
+ position-area: block-start span-inline-end;
38
+ }
39
+ &.right {
40
+ position-area: inline-end;
41
+ }
42
+ &.right-start {
43
+ position-area: inline-end span-block-start;
44
+ }
45
+ &.right-end {
46
+ position-area: inline-end span-block-end;
47
+ }
48
+ &.bottom {
49
+ position-area: block-end;
50
+ }
51
+ &.bottom-start {
52
+ position-area: block-end span-inline-start;
53
+ }
54
+ &.bottom-end {
55
+ position-area: block-end span-inline-end;
56
+ }
57
+ &.left {
58
+ position-area: inline-start;
59
+ }
60
+ &.left-start {
61
+ position-area: inline-start span-block-start;
62
+ }
63
+ &.left-end {
64
+ position-area: inline-start span-block-end;
65
+ }
66
+
67
+ /* Swap it around for rtl */
68
+ :dir(rtl) {
69
+ &.right {
70
+ position-area: inline-start;
71
+ }
72
+ &.right-start {
73
+ position-area: inline-start span-block-start;
74
+ }
75
+ &.right-end {
76
+ position-area: inline-start span-block-end;
77
+ }
78
+ &.left {
79
+ position-area: inline-end;
80
+ }
81
+ &.left-start {
82
+ position-area: inline-end span-block-start;
83
+ }
84
+ &.left-end {
85
+ position-area: inline-end span-block-end;
86
+ }
87
+ }
88
+ }
89
+
90
+ ::view-transition-old(vt-tooltip),
91
+ ::view-transition-new(vt-tooltip) {
92
+ height: 100%;
93
+ }
94
+ }