opui-css 2.4.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 (80) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +23 -7
  3. package/dist/op.css +1 -14
  4. package/dist/{op+ui.css → theme-one.css} +4378 -4155
  5. package/dist/{ui.css → theme-two.css} +4097 -4100
  6. package/package.json +10 -8
  7. package/src/core/normalize.css +196 -196
  8. package/src/core/utils.css +60 -60
  9. package/src/open-props.css +1 -1
  10. package/src/{components → themes/theme-one/components}/accordion.css +172 -172
  11. package/src/{components → themes/theme-one/components}/alert.css +85 -85
  12. package/src/{components → themes/theme-one/components}/avatar.css +68 -68
  13. package/src/{components → themes/theme-one/components}/badge.css +101 -101
  14. package/src/{components → themes/theme-one/components}/button-group.css +69 -69
  15. package/src/{components → themes/theme-one/components}/button.css +267 -267
  16. package/src/{components → themes/theme-one/components}/card.css +82 -82
  17. package/src/{components → themes/theme-one/components}/checkbox-radio.css +123 -123
  18. package/src/{components → themes/theme-one/components}/chip.css +135 -135
  19. package/src/{components → themes/theme-one/components}/definition-list.css +65 -65
  20. package/src/{components → themes/theme-one/components}/dialog.css +59 -59
  21. package/src/{components → themes/theme-one/components}/divider.css +7 -7
  22. package/src/{components → themes/theme-one/components}/field-group.css +83 -83
  23. package/src/{components → themes/theme-one/components}/field.css +494 -494
  24. package/src/{components → themes/theme-one/components}/icon-button.css +40 -40
  25. package/src/{components → themes/theme-one/components}/link.css +21 -21
  26. package/src/{components → themes/theme-one/components}/list.css +317 -317
  27. package/src/{components → themes/theme-one/components}/progress.css +83 -83
  28. package/src/{components → themes/theme-one/components}/range.css +121 -121
  29. package/src/{components → themes/theme-one/components}/rich-text.css +210 -210
  30. package/src/{components → themes/theme-one/components}/select.css +163 -163
  31. package/src/{components → themes/theme-one/components}/snackbar.css +148 -148
  32. package/src/{components → themes/theme-one/components}/spinner.css +38 -38
  33. package/src/{components → themes/theme-one/components}/switch.css +189 -189
  34. package/src/{components → themes/theme-one/components}/tab-buttons.css +120 -120
  35. package/src/themes/theme-one/components/table.css +100 -0
  36. package/src/{components → themes/theme-one/components}/text-field.css +57 -57
  37. package/src/{components → themes/theme-one/components}/textarea.css +25 -25
  38. package/src/{components → themes/theme-one/components}/toggle-button-group.css +135 -139
  39. package/src/{components → themes/theme-one/components}/tooltip.css +94 -94
  40. package/src/{components → themes/theme-one/components}/typography.css +209 -209
  41. package/src/themes/theme-one/components.css +37 -0
  42. package/src/themes/theme-one/imports.css +16 -0
  43. package/src/{theme.css → themes/theme-one/theme.css} +163 -163
  44. package/src/themes/theme-two/components/accordion.css +172 -0
  45. package/src/themes/theme-two/components/alert.css +85 -0
  46. package/src/themes/theme-two/components/avatar.css +68 -0
  47. package/src/themes/theme-two/components/badge.css +101 -0
  48. package/src/themes/theme-two/components/button-group.css +50 -0
  49. package/src/themes/theme-two/components/button.css +217 -0
  50. package/src/themes/theme-two/components/card.css +82 -0
  51. package/src/themes/theme-two/components/checkbox-radio.css +123 -0
  52. package/src/themes/theme-two/components/chip.css +135 -0
  53. package/src/themes/theme-two/components/definition-list.css +65 -0
  54. package/src/themes/theme-two/components/dialog.css +59 -0
  55. package/src/themes/theme-two/components/divider.css +7 -0
  56. package/src/themes/theme-two/components/field-group.css +83 -0
  57. package/src/themes/theme-two/components/field.css +281 -0
  58. package/src/themes/theme-two/components/icon-button.css +40 -0
  59. package/src/themes/theme-two/components/link.css +21 -0
  60. package/src/themes/theme-two/components/list.css +317 -0
  61. package/src/themes/theme-two/components/progress.css +83 -0
  62. package/src/themes/theme-two/components/range.css +121 -0
  63. package/src/themes/theme-two/components/rich-text.css +210 -0
  64. package/src/themes/theme-two/components/select.css +162 -0
  65. package/src/themes/theme-two/components/snackbar.css +148 -0
  66. package/src/themes/theme-two/components/spinner.css +38 -0
  67. package/src/themes/theme-two/components/switch.css +189 -0
  68. package/src/themes/theme-two/components/tab-buttons.css +120 -0
  69. package/src/{components → themes/theme-two/components}/table.css +107 -107
  70. package/src/themes/theme-two/components/text-field.css +57 -0
  71. package/src/themes/theme-two/components/textarea.css +25 -0
  72. package/src/themes/theme-two/components/toggle-button-group.css +135 -0
  73. package/src/themes/theme-two/components/tooltip.css +94 -0
  74. package/src/themes/theme-two/components/typography.css +209 -0
  75. package/src/themes/theme-two/components.css +37 -0
  76. package/src/themes/theme-two/imports.css +16 -0
  77. package/src/themes/theme-two/theme.css +158 -0
  78. package/src/core/components.css +0 -37
  79. package/src/main.css +0 -13
  80. package/src/opui.css +0 -10
@@ -1,65 +1,65 @@
1
- @layer components.root {
2
- :where(.definition-list) {
3
- --_border-style: solid;
4
- --_border-width: 1px;
5
-
6
- display: grid;
7
- gap: var(--size-3);
8
- padding: 0;
9
-
10
- &.dotted {
11
- --_border-style: dotted;
12
- --_border-width: 2px;
13
- }
14
-
15
- li {
16
- display: grid;
17
- margin: 0;
18
- padding: 0;
19
-
20
- .term {
21
- display: block;
22
- font-weight: 700;
23
- overflow: hidden;
24
- position: relative;
25
- }
26
-
27
- hr {
28
- display: none;
29
- margin: 0;
30
- }
31
- }
32
-
33
- @container (width > 45ch) {
34
- gap: var(--size-1);
35
-
36
- li {
37
- align-items: baseline;
38
- display: grid;
39
- gap: var(--size-1);
40
- grid-template-columns: 1fr auto;
41
-
42
- &:has(hr) {
43
- grid-template-columns: auto 1fr auto;
44
- }
45
-
46
- hr {
47
- background-color: transparent;
48
- border-block-end: var(--_border-width) var(--_border-style)
49
- var(--border-color);
50
- block-size: 2px;
51
- display: block;
52
- }
53
-
54
- .term {
55
- &::after {
56
- display: inline-block;
57
- }
58
- }
59
- .description {
60
- color: var(--text-color-2);
61
- }
62
- }
63
- }
64
- }
65
- }
1
+ @layer components.root {
2
+ :where(.definition-list) {
3
+ --_border-style: solid;
4
+ --_border-width: 1px;
5
+
6
+ display: grid;
7
+ gap: var(--size-3);
8
+ padding: 0;
9
+
10
+ &.dotted {
11
+ --_border-style: dotted;
12
+ --_border-width: 2px;
13
+ }
14
+
15
+ li {
16
+ display: grid;
17
+ margin: 0;
18
+ padding: 0;
19
+
20
+ .term {
21
+ display: block;
22
+ font-weight: 700;
23
+ overflow: hidden;
24
+ position: relative;
25
+ }
26
+
27
+ hr {
28
+ display: none;
29
+ margin: 0;
30
+ }
31
+ }
32
+
33
+ @container (width > 45ch) {
34
+ gap: var(--size-1);
35
+
36
+ li {
37
+ align-items: baseline;
38
+ display: grid;
39
+ gap: var(--size-1);
40
+ grid-template-columns: 1fr auto;
41
+
42
+ &:has(hr) {
43
+ grid-template-columns: auto 1fr auto;
44
+ }
45
+
46
+ hr {
47
+ background-color: transparent;
48
+ border-block-end: var(--_border-width) var(--_border-style)
49
+ var(--border-color);
50
+ block-size: 2px;
51
+ display: block;
52
+ }
53
+
54
+ .term {
55
+ &::after {
56
+ display: inline-block;
57
+ }
58
+ }
59
+ .description {
60
+ color: var(--text-color-2);
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
@@ -1,59 +1,59 @@
1
- @layer components.extended {
2
- :where(dialog) {
3
- margin-block-start: 15%; /* vertical alignment */
4
- padding-block: 0;
5
- pointer-events: none;
6
-
7
- &::backdrop {
8
- background-color: rgba(0, 0, 0, 0.5);
9
- backdrop-filter: blur(5px);
10
-
11
- @media (prefers-reduced-motion: reduce) {
12
- backdrop-filter: none;
13
- }
14
- }
15
-
16
- &:not([open]) {
17
- display: none;
18
- }
19
-
20
- &[open] {
21
- pointer-events: all;
22
- }
23
-
24
- .actions {
25
- justify-content: end;
26
- padding-inline: var(--size-3) var(--size-1);
27
- }
28
-
29
- /* Animation */
30
- /* There's no close animation, intentionally */
31
- opacity: 0;
32
-
33
- &[open] {
34
- opacity: 1;
35
- transition: display 0.2s allow-discrete,
36
- margin-block-start 0.3s var(--ease-1), overlay 0.2s allow-discrete,
37
- opacity 0.2s var(--ease-out-1);
38
-
39
- @starting-style {
40
- opacity: 0;
41
- }
42
- }
43
-
44
- @media (prefers-reduced-motion: no-preference) {
45
- margin-block-start: 17%;
46
- &[open] {
47
- margin-block-start: 15%;
48
-
49
- @starting-style {
50
- margin-block-start: 17%;
51
- }
52
- }
53
- }
54
- }
55
-
56
- :where(html:has(dialog[open])) {
57
- overflow: hidden;
58
- }
59
- }
1
+ @layer components.extended {
2
+ :where(dialog) {
3
+ margin-block-start: 15%; /* vertical alignment */
4
+ padding-block: 0;
5
+ pointer-events: none;
6
+
7
+ &::backdrop {
8
+ background-color: rgba(0, 0, 0, 0.5);
9
+ backdrop-filter: blur(5px);
10
+
11
+ @media (prefers-reduced-motion: reduce) {
12
+ backdrop-filter: none;
13
+ }
14
+ }
15
+
16
+ &:not([open]) {
17
+ display: none;
18
+ }
19
+
20
+ &[open] {
21
+ pointer-events: all;
22
+ }
23
+
24
+ .actions {
25
+ justify-content: end;
26
+ padding-inline: var(--size-3) var(--size-1);
27
+ }
28
+
29
+ /* Animation */
30
+ /* There's no close animation, intentionally */
31
+ opacity: 0;
32
+
33
+ &[open] {
34
+ opacity: 1;
35
+ transition: display 0.2s allow-discrete,
36
+ margin-block-start 0.3s var(--ease-1), overlay 0.2s allow-discrete,
37
+ opacity 0.2s var(--ease-out-1);
38
+
39
+ @starting-style {
40
+ opacity: 0;
41
+ }
42
+ }
43
+
44
+ @media (prefers-reduced-motion: no-preference) {
45
+ margin-block-start: 17%;
46
+ &[open] {
47
+ margin-block-start: 15%;
48
+
49
+ @starting-style {
50
+ margin-block-start: 17%;
51
+ }
52
+ }
53
+ }
54
+ }
55
+
56
+ :where(html:has(dialog[open])) {
57
+ overflow: hidden;
58
+ }
59
+ }
@@ -1,7 +1,7 @@
1
- @layer components.root {
2
- :where(hr) {
3
- background-color: var(--border-color);
4
- block-size: var(--border-size-1);
5
- margin-block: var(--size-fluid-3);
6
- }
7
- }
1
+ @layer components.root {
2
+ :where(hr) {
3
+ background-color: var(--border-color);
4
+ block-size: var(--border-size-1);
5
+ margin-block: var(--size-fluid-3);
6
+ }
7
+ }
@@ -1,83 +1,83 @@
1
- @layer components.extended {
2
- /* Common styling for checkbox, radio and switch groups */
3
- :where(fieldset.field-group) {
4
- border: 0;
5
- border-radius: 0;
6
- gap: 0;
7
- padding: 0;
8
- z-index: 1;
9
-
10
- legend {
11
- color: var(--text-color-2);
12
- padding: 0 1ex 0 0;
13
- }
14
-
15
- /* Disabled */
16
- &[disabled] {
17
- cursor: not-allowed;
18
- opacity: 0.64;
19
- user-select: none;
20
-
21
- input {
22
- cursor: not-allowed;
23
- }
24
- }
25
-
26
- /* Validation */
27
- &.error {
28
- legend,
29
- .supporting-text {
30
- color: var(--color-9);
31
- }
32
- }
33
-
34
- /* Required */
35
- &:has([required]) {
36
- &:not(:has(input:where([type="radio"], [type="checkbox"]):checked)) {
37
- legend {
38
- position: relative;
39
-
40
- &::after {
41
- color: var(--red);
42
- content: "*";
43
- inset: 0 -0.25ex auto auto;
44
- position: absolute;
45
- }
46
- }
47
- }
48
- }
49
- :where(.radio, .checkbox, .switch) .label:after {
50
- display: none;
51
- }
52
-
53
- /* Supporting text */
54
- .supporting-text {
55
- color: var(--text-color-2);
56
- font-size: var(--font-size-xs);
57
- line-height: 1.5;
58
- z-index: 1;
59
- }
60
-
61
- /* Fields */
62
- .fields {
63
- display: flex;
64
- flex-direction: column;
65
- gap: var(--size-2);
66
-
67
- * ~ & {
68
- padding: var(--size-2) 0;
69
- }
70
- }
71
-
72
- :last-child {
73
- padding-block-end: 0;
74
- }
75
-
76
- /* Directions */
77
- &.row {
78
- .fields {
79
- flex-direction: row;
80
- }
81
- }
82
- }
83
- }
1
+ @layer components.extended {
2
+ /* Common styling for checkbox, radio and switch groups */
3
+ :where(fieldset.field-group) {
4
+ border: 0;
5
+ border-radius: 0;
6
+ gap: 0;
7
+ padding: 0;
8
+ z-index: 1;
9
+
10
+ legend {
11
+ color: var(--text-color-2);
12
+ padding: 0 1ex 0 0;
13
+ }
14
+
15
+ /* Disabled */
16
+ &[disabled] {
17
+ cursor: not-allowed;
18
+ opacity: 0.64;
19
+ user-select: none;
20
+
21
+ input {
22
+ cursor: not-allowed;
23
+ }
24
+ }
25
+
26
+ /* Validation */
27
+ &.error {
28
+ legend,
29
+ .supporting-text {
30
+ color: var(--color-9);
31
+ }
32
+ }
33
+
34
+ /* Required */
35
+ &:has([required]) {
36
+ &:not(:has(input:where([type="radio"], [type="checkbox"]):checked)) {
37
+ legend {
38
+ position: relative;
39
+
40
+ &::after {
41
+ color: var(--red);
42
+ content: "*";
43
+ inset: 0 -0.25ex auto auto;
44
+ position: absolute;
45
+ }
46
+ }
47
+ }
48
+ }
49
+ :where(.radio, .checkbox, .switch) .label:after {
50
+ display: none;
51
+ }
52
+
53
+ /* Supporting text */
54
+ .supporting-text {
55
+ color: var(--text-color-2);
56
+ font-size: var(--font-size-xs);
57
+ line-height: 1.5;
58
+ z-index: 1;
59
+ }
60
+
61
+ /* Fields */
62
+ .fields {
63
+ display: flex;
64
+ flex-direction: column;
65
+ gap: var(--size-2);
66
+
67
+ * ~ & {
68
+ padding: var(--size-2) 0;
69
+ }
70
+ }
71
+
72
+ :last-child {
73
+ padding-block-end: 0;
74
+ }
75
+
76
+ /* Directions */
77
+ &.row {
78
+ .fields {
79
+ flex-direction: row;
80
+ }
81
+ }
82
+ }
83
+ }