opui-css 2.3.0 → 2.4.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 (79) hide show
  1. package/README.md +7 -23
  2. package/dist/{theme-one+op.css → op+ui.css} +20 -167
  3. package/dist/{theme-one.css → ui.css} +12 -168
  4. package/package.json +4 -6
  5. package/src/{themes/theme-one/components → components}/toggle-button-group.css +5 -1
  6. package/src/core/components.css +37 -0
  7. package/src/main.css +13 -0
  8. package/src/opui.css +10 -0
  9. package/src/{themes/theme-one/setup.css → theme.css} +1 -1
  10. package/dist/theme-two+op.css +0 -4021
  11. package/dist/theme-two.css +0 -3975
  12. package/src/themes/theme-one/components/table.css +0 -100
  13. package/src/themes/theme-one/components.css +0 -37
  14. package/src/themes/theme-one/theme+op.css +0 -5
  15. package/src/themes/theme-one/theme.css +0 -13
  16. package/src/themes/theme-two/components/accordion.css +0 -172
  17. package/src/themes/theme-two/components/alert.css +0 -85
  18. package/src/themes/theme-two/components/avatar.css +0 -68
  19. package/src/themes/theme-two/components/badge.css +0 -101
  20. package/src/themes/theme-two/components/button-group.css +0 -50
  21. package/src/themes/theme-two/components/button.css +0 -217
  22. package/src/themes/theme-two/components/card.css +0 -82
  23. package/src/themes/theme-two/components/checkbox-radio.css +0 -123
  24. package/src/themes/theme-two/components/chip.css +0 -135
  25. package/src/themes/theme-two/components/definition-list.css +0 -65
  26. package/src/themes/theme-two/components/dialog.css +0 -59
  27. package/src/themes/theme-two/components/divider.css +0 -7
  28. package/src/themes/theme-two/components/field-group.css +0 -83
  29. package/src/themes/theme-two/components/field.css +0 -281
  30. package/src/themes/theme-two/components/icon-button.css +0 -40
  31. package/src/themes/theme-two/components/link.css +0 -21
  32. package/src/themes/theme-two/components/list.css +0 -317
  33. package/src/themes/theme-two/components/progress.css +0 -83
  34. package/src/themes/theme-two/components/range.css +0 -121
  35. package/src/themes/theme-two/components/rich-text.css +0 -210
  36. package/src/themes/theme-two/components/select.css +0 -162
  37. package/src/themes/theme-two/components/snackbar.css +0 -148
  38. package/src/themes/theme-two/components/spinner.css +0 -38
  39. package/src/themes/theme-two/components/switch.css +0 -189
  40. package/src/themes/theme-two/components/tab-buttons.css +0 -120
  41. package/src/themes/theme-two/components/text-field.css +0 -57
  42. package/src/themes/theme-two/components/textarea.css +0 -25
  43. package/src/themes/theme-two/components/toggle-button-group.css +0 -135
  44. package/src/themes/theme-two/components/tooltip.css +0 -94
  45. package/src/themes/theme-two/components/typography.css +0 -209
  46. package/src/themes/theme-two/components.css +0 -37
  47. package/src/themes/theme-two/setup.css +0 -158
  48. package/src/themes/theme-two/theme+op.css +0 -5
  49. package/src/themes/theme-two/theme.css +0 -13
  50. /package/src/{themes/theme-one/components → components}/accordion.css +0 -0
  51. /package/src/{themes/theme-one/components → components}/alert.css +0 -0
  52. /package/src/{themes/theme-one/components → components}/avatar.css +0 -0
  53. /package/src/{themes/theme-one/components → components}/badge.css +0 -0
  54. /package/src/{themes/theme-one/components → components}/button-group.css +0 -0
  55. /package/src/{themes/theme-one/components → components}/button.css +0 -0
  56. /package/src/{themes/theme-one/components → components}/card.css +0 -0
  57. /package/src/{themes/theme-one/components → components}/checkbox-radio.css +0 -0
  58. /package/src/{themes/theme-one/components → components}/chip.css +0 -0
  59. /package/src/{themes/theme-one/components → components}/definition-list.css +0 -0
  60. /package/src/{themes/theme-one/components → components}/dialog.css +0 -0
  61. /package/src/{themes/theme-one/components → components}/divider.css +0 -0
  62. /package/src/{themes/theme-one/components → components}/field-group.css +0 -0
  63. /package/src/{themes/theme-one/components → components}/field.css +0 -0
  64. /package/src/{themes/theme-one/components → components}/icon-button.css +0 -0
  65. /package/src/{themes/theme-one/components → components}/link.css +0 -0
  66. /package/src/{themes/theme-one/components → components}/list.css +0 -0
  67. /package/src/{themes/theme-one/components → components}/progress.css +0 -0
  68. /package/src/{themes/theme-one/components → components}/range.css +0 -0
  69. /package/src/{themes/theme-one/components → components}/rich-text.css +0 -0
  70. /package/src/{themes/theme-one/components → components}/select.css +0 -0
  71. /package/src/{themes/theme-one/components → components}/snackbar.css +0 -0
  72. /package/src/{themes/theme-one/components → components}/spinner.css +0 -0
  73. /package/src/{themes/theme-one/components → components}/switch.css +0 -0
  74. /package/src/{themes/theme-one/components → components}/tab-buttons.css +0 -0
  75. /package/src/{themes/theme-two/components → components}/table.css +0 -0
  76. /package/src/{themes/theme-one/components → components}/text-field.css +0 -0
  77. /package/src/{themes/theme-one/components → components}/textarea.css +0 -0
  78. /package/src/{themes/theme-one/components → components}/tooltip.css +0 -0
  79. /package/src/{themes/theme-one/components → components}/typography.css +0 -0
package/README.md CHANGED
@@ -8,6 +8,13 @@ https://open-props-ui.netlify.app/
8
8
 
9
9
  Check out the [getting started guide](https://open-props-ui.netlify.app/guide/getting-started.html).
10
10
 
11
+ ## Development
12
+
13
+ ```
14
+ pnpm i
15
+ pnpm dev:css
16
+ ```
17
+
11
18
  ## Backstory
12
19
 
13
20
  Practically all established UI libraries need to take older browser versions into account. Some have only just dropped Internet Explorer. Some have barely discovered the power of CSS grid. Open Props UI starts from a blank slate and re-imagines how a component library could be built if you used the most modern features.
@@ -23,26 +30,3 @@ Yes and no. Right now that's true for most components. The point is to let the s
23
30
  - Follow accessibility guidelines
24
31
  - Serve as an inspiration
25
32
  - Be scalable
26
-
27
- ## Development
28
-
29
- ```bash
30
- # Install dependencies
31
- pnpm i
32
-
33
- # Build all themes (outputs to dist/)
34
- pnpm build
35
-
36
- # Build themes in watch mode (rebuilds on file changes)
37
- pnpm dev
38
-
39
- # Clean the dist folder
40
- pnpm clean
41
- ```
42
-
43
- ### Theme Building
44
-
45
- The build system automatically processes all themes in the `src/themes/` folder. For each theme folder (ex: `chad-zn`, `theme-one`), it:
46
-
47
- 1. Bundles `theme.css` → `dist/{theme-name}.css`
48
- 2. Bundles `theme+op.css` → `dist/{theme-name}+op.css`
@@ -1,5 +1,9 @@
1
1
  @layer openprops, normalize, utils, theme, components.root, components.extended;
2
- /* Open Props */
2
+ /*
3
+ This main.css file represents whatever file you choose to use as an entry point for OPUI
4
+ Ideally it's the root/entry CSS file in your project.
5
+ */
6
+ /* Open Props imports */
3
7
  /*
4
8
  * Open Props
5
9
  * Import as many props as you need here.
@@ -85,7 +89,7 @@
85
89
  --oklch-yellow: 100;
86
90
  --oklch-orange: 75;
87
91
  }}
88
- /* theme one theme */
92
+ /* OPUI Core */
89
93
  /* Normalize */
90
94
  @layer normalize {
91
95
  *,
@@ -901,7 +905,11 @@ When you visibly want to hide an element but make it accessible for screen reade
901
905
 
902
906
  /* Selected */
903
907
  &.selected {
904
- --_bg-color: oklch(from var(--primary) l c h / 25%);
908
+ --_bg-color: color-mix(
909
+ in oklch,
910
+ var(--primary) 12%,
911
+ var(--surface-default)
912
+ );
905
913
 
906
914
  /* Checkmark */
907
915
  svg:first-of-type {
@@ -1436,6 +1444,13 @@ When you visibly want to hide an element but make it accessible for screen reade
1436
1444
  text-align: start;
1437
1445
  }
1438
1446
 
1447
+ /* Header */
1448
+ thead {
1449
+ position: sticky;
1450
+ top: 0;
1451
+ z-index: 1;
1452
+ }
1453
+
1439
1454
  /* Footer */
1440
1455
  tfoot {
1441
1456
  border-top: 2px solid var(--border-color);
@@ -4136,167 +4151,5 @@ Lists meant to be used stand-alone or as part of Select elements
4136
4151
  }
4137
4152
  }
4138
4153
  }
4139
- /* Setup */
4140
- /*
4141
- theme one theme setup
4142
- */
4143
- @layer theme {
4144
- .light {
4145
- --color-scheme: light;
4146
- }
4147
- .dark {
4148
- --color-scheme: dark;
4149
- }
4150
-
4151
- :where(html) {
4152
- color-scheme: var(--color-scheme, light dark);
4153
-
4154
- --palette-hue: var(--oklch-teal);
4155
- --palette-hue-rotate-by: 5;
4156
- --palette-chroma: 0.89;
4157
-
4158
- /* Primary */
4159
- --primary: var(--color-8);
4160
- --primary-light: oklch(from var(--primary) calc(l * 1.25) c h);
4161
- --primary-dark: oklch(from var(--primary) calc(l * 0.75) c h);
4162
- --primary-contrast: var(--gray-1);
4163
-
4164
- /* Text */
4165
- --text-color-1: light-dark(var(--gray-15), var(--gray-1));
4166
- --text-color-1-contrast: light-dark(var(--gray-2), var(--gray-15));
4167
- --text-color-2: light-dark(var(--gray-13), var(--gray-4));
4168
- --text-color-2-contrast: light-dark(var(--gray-4), var(--gray-13));
4169
-
4170
- /* Surface */
4171
- --surface-default: light-dark(var(--gray-1), var(--gray-13));
4172
- --surface-filled: light-dark(var(--gray-3), var(--gray-15));
4173
- --surface-tonal: light-dark(var(--gray-3), var(--gray-12));
4174
- --surface-elevated: light-dark(var(--gray-1), var(--gray-12));
4175
-
4176
- /* Shadows */
4177
- --shadow-color: light-dark(220 3% 15%, 220 40% 2%);
4178
- --shadow-strength: light-dark(1%, 10%);
4179
- --inner-shadow-highlight: light-dark(
4180
- inset 0 -0.5px 0 0 #fff,
4181
- inset 0 0.5px 0 0 #0001,
4182
- inset 0 -0.5px 0 0 #fff1,
4183
- inset 0 0.5px 0 0 #0007
4184
- );
4185
-
4186
- /* Typography */
4187
- --font-size-h1: var(--font-size-fluid-3, 3.5rem);
4188
- --font-size-h2: var(--font-size-fluid-2, 2rem);
4189
- --font-size-h3: var(--font-size-fluid-1, 1.5rem);
4190
- --font-size-h4: var(--font-size-3, 1.25rem);
4191
- --font-size-h5: var(--font-size-2, 1.1rem);
4192
- --font-size-h6: var(--font-size-fluid-0, 1rem);
4193
- --font-size-lg: var(--font-size-3, 1.25rem);
4194
- --font-size-md: var(--font-size-fluid-0, 1rem);
4195
- --font-size-sm: 0.875rem;
4196
- --font-size-xs: var(--font-size-0, 0.75rem);
4197
-
4198
- /* Borders */
4199
- --border-color: light-dark(var(--gray-4), var(--gray-12));
4200
- --border-radius: var(--size-1);
4201
- --border-width: 1px;
4202
-
4203
- /* Input Field */
4204
- --field-border-color: var(--border-color);
4205
- --field-border-radius: var(--size-1);
4206
- --field-border-width: 1px;
4207
- --field-size: 2.3lh;
4208
- --field-size-small: 1.9lh;
4209
-
4210
- /* Button */
4211
- --button-border-radius: var(--radius-round);
4212
- /* Ripple effect */
4213
- @media (prefers-reduced-motion: no-preference) {
4214
- --button-ripple-size: 100%;
4215
- --button-ripple-duration: 0.5s;
4216
- }
4217
- }
4218
-
4219
- /* Highlight colors */
4220
- :where(.red, .error, del) {
4221
- --palette-hue: var(--oklch-red, 25);
4222
- --palette-chroma: 1;
4223
- --palette-hue-rotate-by: 1;
4224
- }
4225
- :where(.blue, .ok, abbr, dfn) {
4226
- --palette-hue: var(--oklch-blue, 210);
4227
- --palette-chroma: 1;
4228
- --palette-hue-rotate-by: 1;
4229
- }
4230
- :where(.green, .good, ins) {
4231
- --palette-hue: var(--oklch-green, 145);
4232
- --palette-chroma: 1;
4233
- --palette-hue-rotate-by: 1;
4234
- }
4235
- :where(.orange, .warning) {
4236
- --palette-hue: var(--oklch-orange, 75);
4237
- --palette-chroma: 1;
4238
- --palette-hue-rotate-by: 1;
4239
- }
4240
-
4241
- :where(html) {
4242
- --red: oklch(from var(--color-9) l 0.2 25);
4243
- --blue: oklch(from var(--color-9) l 0.2 210);
4244
- --green: oklch(from var(--color-9) l 0.2 145);
4245
- --orange: oklch(from var(--color-7) l 0.2 75);
4246
- }
4247
-
4248
- /* Gray palette */
4249
- :where(html) {
4250
- --gray-chroma: 0.01;
4251
- --gray-lightness: 255;
4252
-
4253
- --gray-1: oklch(
4254
- from var(--color-1) l var(--gray-chroma) var(--gray-lightness)
4255
- );
4256
- --gray-2: oklch(
4257
- from var(--color-2) l var(--gray-chroma) var(--gray-lightness)
4258
- );
4259
- --gray-3: oklch(
4260
- from var(--color-3) l var(--gray-chroma) var(--gray-lightness)
4261
- );
4262
- --gray-4: oklch(
4263
- from var(--color-4) l var(--gray-chroma) var(--gray-lightness)
4264
- );
4265
- --gray-5: oklch(
4266
- from var(--color-5) l var(--gray-chroma) var(--gray-lightness)
4267
- );
4268
- --gray-6: oklch(
4269
- from var(--color-6) l var(--gray-chroma) var(--gray-lightness)
4270
- );
4271
- --gray-7: oklch(
4272
- from var(--color-7) l var(--gray-chroma) var(--gray-lightness)
4273
- );
4274
- --gray-8: oklch(
4275
- from var(--color-8) l var(--gray-chroma) var(--gray-lightness)
4276
- );
4277
- --gray-9: oklch(
4278
- from var(--color-9) l var(--gray-chroma) var(--gray-lightness)
4279
- );
4280
- --gray-10: oklch(
4281
- from var(--color-10) l var(--gray-chroma) var(--gray-lightness)
4282
- );
4283
- --gray-11: oklch(
4284
- from var(--color-11) l var(--gray-chroma) var(--gray-lightness)
4285
- );
4286
- --gray-12: oklch(
4287
- from var(--color-12) l var(--gray-chroma) var(--gray-lightness)
4288
- );
4289
- --gray-13: oklch(
4290
- from var(--color-13) l var(--gray-chroma) var(--gray-lightness)
4291
- );
4292
- --gray-14: oklch(
4293
- from var(--color-14) l var(--gray-chroma) var(--gray-lightness)
4294
- );
4295
- --gray-15: oklch(
4296
- from var(--color-15) l var(--gray-chroma) var(--gray-lightness)
4297
- );
4298
- --gray-16: oklch(
4299
- from var(--color-16) l var(--gray-chroma) var(--gray-lightness)
4300
- );
4301
- }
4302
- }
4154
+ /* Theme (example) */
4155
+ /* @import "./theme.css"; */
@@ -825,7 +825,11 @@ When you visibly want to hide an element but make it accessible for screen reade
825
825
 
826
826
  /* Selected */
827
827
  &.selected {
828
- --_bg-color: oklch(from var(--primary) l c h / 25%);
828
+ --_bg-color: color-mix(
829
+ in oklch,
830
+ var(--primary) 12%,
831
+ var(--surface-default)
832
+ );
829
833
 
830
834
  /* Checkmark */
831
835
  svg:first-of-type {
@@ -1368,6 +1372,13 @@ When you visibly want to hide an element but make it accessible for screen reade
1368
1372
  text-align: start;
1369
1373
  }
1370
1374
 
1375
+ /* Header */
1376
+ thead {
1377
+ position: sticky;
1378
+ top: 0;
1379
+ z-index: 1;
1380
+ }
1381
+
1371
1382
  /* Footer */
1372
1383
  tfoot {
1373
1384
  border-top: 2px solid var(--border-color);
@@ -4087,170 +4098,3 @@ Lists meant to be used stand-alone or as part of Select elements
4087
4098
  }
4088
4099
  }
4089
4100
  }
4090
-
4091
- /* Setup */
4092
-
4093
- /*
4094
- theme one theme setup
4095
- */
4096
-
4097
- @layer theme {
4098
- .light {
4099
- --color-scheme: light;
4100
- }
4101
- .dark {
4102
- --color-scheme: dark;
4103
- }
4104
-
4105
- :where(html) {
4106
- color-scheme: var(--color-scheme, light dark);
4107
-
4108
- --palette-hue: var(--oklch-teal);
4109
- --palette-hue-rotate-by: 5;
4110
- --palette-chroma: 0.89;
4111
-
4112
- /* Primary */
4113
- --primary: var(--color-8);
4114
- --primary-light: oklch(from var(--primary) calc(l * 1.25) c h);
4115
- --primary-dark: oklch(from var(--primary) calc(l * 0.75) c h);
4116
- --primary-contrast: var(--gray-1);
4117
-
4118
- /* Text */
4119
- --text-color-1: light-dark(var(--gray-15), var(--gray-1));
4120
- --text-color-1-contrast: light-dark(var(--gray-2), var(--gray-15));
4121
- --text-color-2: light-dark(var(--gray-13), var(--gray-4));
4122
- --text-color-2-contrast: light-dark(var(--gray-4), var(--gray-13));
4123
-
4124
- /* Surface */
4125
- --surface-default: light-dark(var(--gray-1), var(--gray-13));
4126
- --surface-filled: light-dark(var(--gray-3), var(--gray-15));
4127
- --surface-tonal: light-dark(var(--gray-3), var(--gray-12));
4128
- --surface-elevated: light-dark(var(--gray-1), var(--gray-12));
4129
-
4130
- /* Shadows */
4131
- --shadow-color: light-dark(220 3% 15%, 220 40% 2%);
4132
- --shadow-strength: light-dark(1%, 10%);
4133
- --inner-shadow-highlight: light-dark(
4134
- inset 0 -0.5px 0 0 #fff,
4135
- inset 0 0.5px 0 0 #0001,
4136
- inset 0 -0.5px 0 0 #fff1,
4137
- inset 0 0.5px 0 0 #0007
4138
- );
4139
-
4140
- /* Typography */
4141
- --font-size-h1: var(--font-size-fluid-3, 3.5rem);
4142
- --font-size-h2: var(--font-size-fluid-2, 2rem);
4143
- --font-size-h3: var(--font-size-fluid-1, 1.5rem);
4144
- --font-size-h4: var(--font-size-3, 1.25rem);
4145
- --font-size-h5: var(--font-size-2, 1.1rem);
4146
- --font-size-h6: var(--font-size-fluid-0, 1rem);
4147
- --font-size-lg: var(--font-size-3, 1.25rem);
4148
- --font-size-md: var(--font-size-fluid-0, 1rem);
4149
- --font-size-sm: 0.875rem;
4150
- --font-size-xs: var(--font-size-0, 0.75rem);
4151
-
4152
- /* Borders */
4153
- --border-color: light-dark(var(--gray-4), var(--gray-12));
4154
- --border-radius: var(--size-1);
4155
- --border-width: 1px;
4156
-
4157
- /* Input Field */
4158
- --field-border-color: var(--border-color);
4159
- --field-border-radius: var(--size-1);
4160
- --field-border-width: 1px;
4161
- --field-size: 2.3lh;
4162
- --field-size-small: 1.9lh;
4163
-
4164
- /* Button */
4165
- --button-border-radius: var(--radius-round);
4166
- /* Ripple effect */
4167
- @media (prefers-reduced-motion: no-preference) {
4168
- --button-ripple-size: 100%;
4169
- --button-ripple-duration: 0.5s;
4170
- }
4171
- }
4172
-
4173
- /* Highlight colors */
4174
- :where(.red, .error, del) {
4175
- --palette-hue: var(--oklch-red, 25);
4176
- --palette-chroma: 1;
4177
- --palette-hue-rotate-by: 1;
4178
- }
4179
- :where(.blue, .ok, abbr, dfn) {
4180
- --palette-hue: var(--oklch-blue, 210);
4181
- --palette-chroma: 1;
4182
- --palette-hue-rotate-by: 1;
4183
- }
4184
- :where(.green, .good, ins) {
4185
- --palette-hue: var(--oklch-green, 145);
4186
- --palette-chroma: 1;
4187
- --palette-hue-rotate-by: 1;
4188
- }
4189
- :where(.orange, .warning) {
4190
- --palette-hue: var(--oklch-orange, 75);
4191
- --palette-chroma: 1;
4192
- --palette-hue-rotate-by: 1;
4193
- }
4194
-
4195
- :where(html) {
4196
- --red: oklch(from var(--color-9) l 0.2 25);
4197
- --blue: oklch(from var(--color-9) l 0.2 210);
4198
- --green: oklch(from var(--color-9) l 0.2 145);
4199
- --orange: oklch(from var(--color-7) l 0.2 75);
4200
- }
4201
-
4202
- /* Gray palette */
4203
- :where(html) {
4204
- --gray-chroma: 0.01;
4205
- --gray-lightness: 255;
4206
-
4207
- --gray-1: oklch(
4208
- from var(--color-1) l var(--gray-chroma) var(--gray-lightness)
4209
- );
4210
- --gray-2: oklch(
4211
- from var(--color-2) l var(--gray-chroma) var(--gray-lightness)
4212
- );
4213
- --gray-3: oklch(
4214
- from var(--color-3) l var(--gray-chroma) var(--gray-lightness)
4215
- );
4216
- --gray-4: oklch(
4217
- from var(--color-4) l var(--gray-chroma) var(--gray-lightness)
4218
- );
4219
- --gray-5: oklch(
4220
- from var(--color-5) l var(--gray-chroma) var(--gray-lightness)
4221
- );
4222
- --gray-6: oklch(
4223
- from var(--color-6) l var(--gray-chroma) var(--gray-lightness)
4224
- );
4225
- --gray-7: oklch(
4226
- from var(--color-7) l var(--gray-chroma) var(--gray-lightness)
4227
- );
4228
- --gray-8: oklch(
4229
- from var(--color-8) l var(--gray-chroma) var(--gray-lightness)
4230
- );
4231
- --gray-9: oklch(
4232
- from var(--color-9) l var(--gray-chroma) var(--gray-lightness)
4233
- );
4234
- --gray-10: oklch(
4235
- from var(--color-10) l var(--gray-chroma) var(--gray-lightness)
4236
- );
4237
- --gray-11: oklch(
4238
- from var(--color-11) l var(--gray-chroma) var(--gray-lightness)
4239
- );
4240
- --gray-12: oklch(
4241
- from var(--color-12) l var(--gray-chroma) var(--gray-lightness)
4242
- );
4243
- --gray-13: oklch(
4244
- from var(--color-13) l var(--gray-chroma) var(--gray-lightness)
4245
- );
4246
- --gray-14: oklch(
4247
- from var(--color-14) l var(--gray-chroma) var(--gray-lightness)
4248
- );
4249
- --gray-15: oklch(
4250
- from var(--color-15) l var(--gray-chroma) var(--gray-lightness)
4251
- );
4252
- --gray-16: oklch(
4253
- from var(--color-16) l var(--gray-chroma) var(--gray-lightness)
4254
- );
4255
- }
4256
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opui-css",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "files": [
@@ -20,17 +20,15 @@
20
20
  "access": "public"
21
21
  },
22
22
  "devDependencies": {
23
- "nodemon": "^3.1.10",
24
23
  "open-props": "2.0.0-beta.5",
25
- "postcss": "^8.5.6",
26
24
  "postcss-cli": "^11.0.1",
27
25
  "postcss-import": "^16.1.1",
26
+ "postcss": "^8.5.6",
28
27
  "shx": "^0.4.0"
29
28
  },
30
29
  "scripts": {
31
- "build:themes": "node scripts/build-themes.js",
32
- "build": "pnpm run clean && pnpm run build:themes && postcss src/open-props.css -o dist/op.css",
30
+ "build": "pnpm run clean && pnpm exec shx mkdir -p dist && postcss src/main.css -o dist/op+ui.css && postcss src/opui.css -o dist/ui.css && postcss src/open-props.css -o dist/op.css",
33
31
  "clean": "pnpm exec shx rm -rf dist",
34
- "dev": "nodemon --watch src --ext css --delay 500ms --verbose --exec \"pnpm build:themes\""
32
+ "dev": "pnpm run clean && pnpm exec shx mkdir -p dist && postcss src/main.css -o dist/op+ui.css -w & postcss src/opui.css -o dist/ui.css -w & postcss src/open-props.css -o dist/op.css -w"
35
33
  }
36
34
  }
@@ -123,7 +123,11 @@
123
123
 
124
124
  /* Selected */
125
125
  &.selected {
126
- --_bg-color: oklch(from var(--primary) l c h / 25%);
126
+ --_bg-color: color-mix(
127
+ in oklch,
128
+ var(--primary) 12%,
129
+ var(--surface-default)
130
+ );
127
131
 
128
132
  /* Checkmark */
129
133
  svg:first-of-type {
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Components are divided into two categories - if they are stand-alone (root) or if they are built on top of others (extended).
3
+ */
4
+
5
+ /*** Root components (no dependencies) */
6
+ @import "../components/button.css";
7
+ @import "../components/icon-button.css";
8
+ @import "../components/tab-buttons.css";
9
+ @import "../components/toggle-button-group.css";
10
+ @import "../components/avatar.css";
11
+ @import "../components/badge.css";
12
+ @import "../components/card.css";
13
+ @import "../components/chip.css";
14
+ @import "../components/definition-list.css";
15
+ @import "../components/divider.css";
16
+ @import "../components/link.css";
17
+ @import "../components/table.css";
18
+ @import "../components/progress.css";
19
+ @import "../components/spinner.css";
20
+ @import "../components/checkbox-radio.css";
21
+ @import "../components/switch.css";
22
+ @import "../components/range.css";
23
+ @import "../components/typography.css";
24
+
25
+ /*** Extended components (has dependencies) */
26
+ @import "../components/button-group.css";
27
+ @import "../components/accordion.css";
28
+ @import "../components/list.css";
29
+ @import "../components/alert.css";
30
+ @import "../components/dialog.css";
31
+ @import "../components/snackbar.css";
32
+ @import "../components/field-group.css";
33
+ @import "../components/field.css";
34
+ @import "../components/select.css";
35
+ @import "../components/text-field.css";
36
+ @import "../components/textarea.css";
37
+ @import "../components/rich-text.css";
package/src/main.css ADDED
@@ -0,0 +1,13 @@
1
+ /*
2
+ This main.css file represents whatever file you choose to use as an entry point for OPUI
3
+ Ideally it's the root/entry CSS file in your project.
4
+ */
5
+
6
+ /* Open Props imports */
7
+ @import "./open-props.css";
8
+
9
+ /* OPUI Core */
10
+ @import "./opui.css";
11
+
12
+ /* Theme (example) */
13
+ /* @import "./theme.css"; */
package/src/opui.css ADDED
@@ -0,0 +1,10 @@
1
+ @layer openprops, normalize, utils, theme, components.root, components.extended;
2
+
3
+ /* Normalize */
4
+ @import "./core/normalize.css";
5
+
6
+ /* Utils */
7
+ @import "./core/utils.css";
8
+
9
+ /* Components */
10
+ @import "./core/components.css";
@@ -1,5 +1,5 @@
1
1
  /*
2
- theme one theme setup
2
+ OPUI default theme
3
3
  */
4
4
  @layer theme {
5
5
  .light {