plutonium 0.32.0 → 0.33.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/app/assets/plutonium.css +2 -2
  4. data/lib/plutonium/ui/action_button.rb +5 -11
  5. data/lib/plutonium/ui/block.rb +1 -4
  6. data/lib/plutonium/ui/breadcrumbs.rb +8 -10
  7. data/lib/plutonium/ui/color_mode_selector.rb +2 -2
  8. data/lib/plutonium/ui/component/behaviour.rb +0 -8
  9. data/lib/plutonium/ui/component/kit.rb +1 -1
  10. data/lib/plutonium/ui/display/components/attachment.rb +2 -2
  11. data/lib/plutonium/ui/display/theme.rb +16 -16
  12. data/lib/plutonium/ui/empty_card.rb +2 -5
  13. data/lib/plutonium/ui/form/components/key_value_store.rb +11 -11
  14. data/lib/plutonium/ui/form/components/secure_association.rb +2 -2
  15. data/lib/plutonium/ui/form/components/uppy.rb +5 -5
  16. data/lib/plutonium/ui/form/concerns/renders_nested_resource_fields.rb +5 -5
  17. data/lib/plutonium/ui/form/query.rb +11 -11
  18. data/lib/plutonium/ui/form/resource.rb +2 -2
  19. data/lib/plutonium/ui/form/theme.rb +17 -17
  20. data/lib/plutonium/ui/layout/base.rb +2 -2
  21. data/lib/plutonium/ui/layout/header.rb +7 -10
  22. data/lib/plutonium/ui/layout/rodauth_layout.rb +5 -5
  23. data/lib/plutonium/ui/layout/sidebar.rb +2 -2
  24. data/lib/plutonium/ui/nav_grid_menu.rb +6 -6
  25. data/lib/plutonium/ui/nav_user.rb +7 -8
  26. data/lib/plutonium/ui/page/interactive_action.rb +4 -4
  27. data/lib/plutonium/ui/page_header.rb +4 -7
  28. data/lib/plutonium/ui/panel.rb +3 -3
  29. data/lib/plutonium/ui/sidebar_menu.rb +12 -12
  30. data/lib/plutonium/ui/skeleton_table.rb +8 -8
  31. data/lib/plutonium/ui/tab_list.rb +3 -5
  32. data/lib/plutonium/ui/table/components/attachment.rb +2 -2
  33. data/lib/plutonium/ui/table/components/pagy_info.rb +3 -3
  34. data/lib/plutonium/ui/table/components/pagy_pagination.rb +3 -3
  35. data/lib/plutonium/ui/table/components/scopes_bar.rb +14 -14
  36. data/lib/plutonium/ui/table/display_theme.rb +3 -3
  37. data/lib/plutonium/ui/table/resource.rb +2 -2
  38. data/lib/plutonium/ui/table/theme.rb +13 -13
  39. data/lib/plutonium/version.rb +1 -1
  40. data/package.json +1 -1
  41. data/src/css/core.css +2 -2
  42. data/src/css/easymde.css +8 -8
  43. data/src/css/intl_tel_input.css +7 -7
  44. data/src/css/slim_select.css +5 -5
  45. data/tailwind.options.js +2 -30
  46. metadata +1 -3
  47. data/docs/guide/theming.md +0 -431
  48. data/lib/plutonium/ui/component/theme.rb +0 -47
@@ -6,28 +6,28 @@ module Plutonium
6
6
  class Theme < Phlexi::Table::Theme
7
7
  def self.theme
8
8
  super.merge({
9
- selection_checkbox: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-elevated-dark dark:border-gray-600",
9
+ selection_checkbox: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600",
10
10
  name_column: "font-medium text-gray-900 whitespace-nowrap dark:text-white",
11
11
  align_start: "text-start",
12
12
  align_end: "text-end",
13
- wrapper: "pu-table-wrapper relative overflow-x-auto shadow-md sm:rounded-sm",
14
- base: "pu-table w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400",
15
- caption: "p-md text-lg font-semibold text-left rtl:text-right text-gray-900 bg-surface dark:text-white dark:bg-surface-dark",
16
- description: "mt-xs text-sm font-normal text-gray-500 dark:text-gray-400",
17
- header: "pu-table-header text-xs text-gray-700 uppercase bg-elevated dark:bg-elevated-dark dark:text-gray-400",
18
- header_grouping_cell: "px-lg py-sm text-center text-sm border-b border-t border-r last:border-r-0 dark:border-gray-800",
19
- header_cell: "pu-table-header-cell px-lg py-sm",
13
+ wrapper: "relative overflow-x-auto shadow-md sm:rounded-lg",
14
+ base: "w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400",
15
+ caption: "p-5 text-lg font-semibold text-left rtl:text-right text-gray-900 bg-white dark:text-white dark:bg-gray-800",
16
+ description: "mt-1 text-sm font-normal text-gray-500 dark:text-gray-400",
17
+ header: "text-xs text-gray-700 uppercase bg-gray-200 dark:bg-gray-700 dark:text-gray-400",
18
+ header_grouping_cell: "px-6 py-3 text-center text-sm border-b border-t border-r last:border-r-0 dark:border-gray-800",
19
+ header_cell: "px-6 py-3",
20
20
  header_cell_content_wrapper: "inline-flex items-center",
21
21
  header_cell_sort_wrapper: "flex items-center",
22
- header_cell_sort_indicator: "ml-xs.5",
23
- body_row: "pu-table-row bg-surface border-b last:border-none dark:bg-surface-dark dark:border-gray-700",
24
- body_cell: "pu-table-cell px-lg py-md whitespace-pre max-w-[450px] overflow-hidden text-ellipsis transition-all duration-300 ease-in-out",
22
+ header_cell_sort_indicator: "ml-1.5",
23
+ body_row: "bg-white border-b last:border-none dark:bg-gray-800 dark:border-gray-700",
24
+ body_cell: "px-6 py-4 whitespace-pre max-w-[450px] overflow-hidden text-ellipsis transition-all duration-300 ease-in-out",
25
25
  sort_icon: "w-3 h-3",
26
26
  sort_icon_active: "text-primary-600",
27
27
  sort_icon_inactive: "text-gray-600 dark:text-gray-500",
28
- sort_index_clear_link: "ml-sm",
28
+ sort_index_clear_link: "ml-2",
29
29
  sort_index_clear_link_text: "text-xs font-bold text-gray-600 dark:text-gray-500",
30
- sort_index_clear_link_icon: "ml-xs text-red-600"
30
+ sort_index_clear_link_icon: "ml-1 text-red-600"
31
31
  })
32
32
  end
33
33
  end
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.32.0"
2
+ VERSION = "0.33.0"
3
3
  NEXT_MAJOR_VERSION = VERSION.split(".").tap { |v|
4
4
  v[1] = v[1].to_i + 1
5
5
  v[2] = 0
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radioactive-labs/plutonium",
3
- "version": "0.32.0",
3
+ "version": "0.33.0",
4
4
  "description": "Core assets for the Plutonium gem",
5
5
  "type": "module",
6
6
  "main": "src/js/core.js",
data/src/css/core.css CHANGED
@@ -8,9 +8,9 @@
8
8
  }
9
9
 
10
10
  .pu-color-input::-webkit-color-swatch {
11
- @apply border-none rounded-sm;
11
+ @apply border-none rounded-lg;
12
12
  }
13
13
 
14
14
  .pu-color-input::-moz-color-swatch {
15
- @apply border-none rounded-sm;
15
+ @apply border-none rounded-lg;
16
16
  }
data/src/css/easymde.css CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  /* Container and CodeMirror theming */
8
8
  .EasyMDEContainer .CodeMirror {
9
- @apply border-gray-300 bg-surface text-gray-900 dark:border-gray-600 dark:bg-surface-dark dark:text-gray-100;
9
+ @apply border-gray-300 bg-white text-gray-900 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100;
10
10
  }
11
11
 
12
12
  .EasyMDEContainer .CodeMirror-focused .CodeMirror-selected {
@@ -31,7 +31,7 @@
31
31
 
32
32
  /* Gutter theming */
33
33
  .CodeMirror-gutters {
34
- @apply border-gray-300 bg-elevated dark:border-gray-600 dark:bg-elevated-dark;
34
+ @apply border-gray-300 bg-gray-50 dark:border-gray-600 dark:bg-gray-700;
35
35
  }
36
36
 
37
37
  .CodeMirror-linenumber {
@@ -44,11 +44,11 @@
44
44
 
45
45
  /* Toolbar theming */
46
46
  .editor-toolbar {
47
- @apply border-gray-300 bg-surface dark:border-gray-600 dark:bg-surface-dark;
47
+ @apply border-gray-300 bg-white dark:border-gray-600 dark:bg-gray-800;
48
48
  }
49
49
 
50
50
  .editor-toolbar.fullscreen {
51
- @apply bg-surface dark:bg-surface-dark;
51
+ @apply bg-white dark:bg-gray-800;
52
52
  }
53
53
 
54
54
  .editor-toolbar button {
@@ -71,7 +71,7 @@
71
71
 
72
72
  /* Preview theming */
73
73
  .editor-preview {
74
- @apply bg-elevated text-gray-900 dark:bg-surface-dark dark:text-gray-100;
74
+ @apply bg-gray-50 text-gray-900 dark:bg-gray-800 dark:text-gray-100;
75
75
  }
76
76
 
77
77
  .editor-preview pre {
@@ -84,7 +84,7 @@
84
84
  }
85
85
 
86
86
  .editor-preview-side {
87
- @apply border-gray-300 bg-surface dark:border-gray-600 dark:bg-surface-dark;
87
+ @apply border-gray-300 bg-white dark:border-gray-600 dark:bg-gray-800;
88
88
  }
89
89
 
90
90
  /* CodeMirror syntax highlighting - dark mode support */
@@ -127,11 +127,11 @@
127
127
 
128
128
  /* Dropdown theming */
129
129
  .editor-toolbar .easymde-dropdown {
130
- @apply bg-surface border-gray-300 dark:bg-surface-dark dark:border-gray-600;
130
+ @apply bg-white border-gray-300 dark:bg-gray-800 dark:border-gray-600;
131
131
  }
132
132
 
133
133
  .easymde-dropdown-content {
134
- @apply bg-surface shadow-lg border border-gray-200 dark:bg-surface-dark dark:border-gray-600 dark:shadow-gray-900/20;
134
+ @apply bg-white shadow-lg border border-gray-200 dark:bg-gray-800 dark:border-gray-600 dark:shadow-gray-900/20;
135
135
  }
136
136
 
137
137
  .easymde-dropdown-content button {
@@ -9,7 +9,7 @@
9
9
  --iti-hover-color: theme(colors.primary.50);
10
10
  --iti-border-color: theme(colors.gray.300);
11
11
  --iti-dialcode-color: theme(colors.gray.500);
12
- --iti-dropdown-bg: theme(colors.surface.DEFAULT);
12
+ --iti-dropdown-bg: theme(colors.white);
13
13
  --iti-arrow-color: theme(colors.gray.700);
14
14
  }
15
15
 
@@ -19,7 +19,7 @@
19
19
  --iti-hover-color: theme(colors.primary.900 / 0.3);
20
20
  --iti-border-color: theme(colors.gray.600);
21
21
  --iti-dialcode-color: theme(colors.gray.400);
22
- --iti-dropdown-bg: theme(colors.surface.dark);
22
+ --iti-dropdown-bg: theme(colors.gray.700);
23
23
  --iti-arrow-color: theme(colors.white);
24
24
  }
25
25
  }
@@ -29,7 +29,7 @@
29
29
  --iti-hover-color: theme(colors.primary.900 / 0.3);
30
30
  --iti-border-color: theme(colors.gray.600);
31
31
  --iti-dialcode-color: theme(colors.gray.400);
32
- --iti-dropdown-bg: theme(colors.surface.dark);
32
+ --iti-dropdown-bg: theme(colors.gray.700);
33
33
  --iti-arrow-color: theme(colors.white);
34
34
  }
35
35
 
@@ -42,7 +42,7 @@
42
42
  .iti input.iti__tel-input,
43
43
  .iti input.iti__tel-input[type=tel],
44
44
  .iti input.iti__tel-input[type=text] {
45
- @apply w-full border border-gray-300 rounded shadow-sm font-medium text-sm bg-surface text-gray-700 outline-none transition-colors duration-200 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 dark:bg-elevated-dark dark:border-gray-600 dark:text-white dark:placeholder-gray-400;
45
+ @apply w-full border border-gray-300 rounded-md shadow-sm font-medium text-sm bg-white text-gray-700 outline-none transition-colors duration-200 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400;
46
46
  padding: theme(spacing.2);
47
47
  padding-left: 52px;
48
48
  /* Space for country selector */
@@ -87,12 +87,12 @@
87
87
 
88
88
  /* Dropdown content styling to match form theme */
89
89
  .iti .iti__dropdown-content {
90
- @apply border border-gray-300 bg-surface shadow-sm rounded dark:bg-surface-dark dark:border-gray-600;
90
+ @apply border border-gray-300 bg-white shadow-sm rounded-md dark:bg-gray-700 dark:border-gray-600;
91
91
  }
92
92
 
93
93
  /* Search input to match form theme */
94
94
  .iti .iti__search-input {
95
- @apply w-full p-2 border border-gray-300 rounded shadow-sm font-medium text-sm bg-surface text-gray-700 outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 dark:bg-elevated-dark dark:border-gray-600 dark:text-white dark:placeholder-gray-400;
95
+ @apply w-full p-2 border border-gray-300 rounded-md shadow-sm font-medium text-sm bg-white text-gray-700 outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400;
96
96
  margin: theme(spacing.2);
97
97
  width: calc(100% - theme(spacing.4));
98
98
  }
@@ -186,7 +186,7 @@
186
186
  }
187
187
 
188
188
  .iti--fullscreen-popup .iti__dropdown-content {
189
- @apply bg-surface dark:bg-surface-dark;
189
+ @apply bg-white dark:bg-gray-700;
190
190
  }
191
191
 
192
192
  .iti--fullscreen-popup .iti__country {
@@ -36,7 +36,7 @@
36
36
 
37
37
  /* Main container - Updated to match form input theme */
38
38
  .ss-main {
39
- @apply flex flex-row relative select-none w-full min-h-8 p-2 cursor-pointer border border-gray-300 rounded shadow-sm font-medium text-sm bg-surface text-gray-700 outline-none transition-colors duration-200 overflow-hidden focus:ring-2 focus:ring-primary-500 focus:border-primary-500 dark:bg-elevated-dark dark:border-gray-600 dark:text-white dark:placeholder-gray-400;
39
+ @apply flex flex-row relative select-none w-full min-h-8 p-2 cursor-pointer border border-gray-300 rounded-md shadow-sm font-medium text-sm bg-white text-gray-700 outline-none transition-colors duration-200 overflow-hidden focus:ring-2 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400;
40
40
  }
41
41
 
42
42
  .ss-main.ss-disabled {
@@ -131,7 +131,7 @@
131
131
 
132
132
  /* Content container - Updated to match shadow and borders */
133
133
  .ss-content {
134
- @apply absolute flex h-auto flex-col w-auto max-h-72 border border-gray-300 bg-surface shadow-sm transition-all duration-200 opacity-0 z-[10000] overflow-hidden dark:bg-surface-dark dark:border-gray-600;
134
+ @apply absolute flex h-auto flex-col w-auto max-h-72 border border-gray-300 bg-white shadow-sm transition-all duration-200 opacity-0 z-[10000] overflow-hidden dark:bg-gray-700 dark:border-gray-600;
135
135
  transform: scaleY(0);
136
136
  transform-origin: top;
137
137
  }
@@ -162,14 +162,14 @@
162
162
  }
163
163
 
164
164
  .ss-content .ss-search input {
165
- @apply inline-flex flex-auto w-full min-w-0 p-2 m-0 border border-gray-300 rounded shadow-sm font-medium text-sm bg-surface outline-none text-left placeholder:text-gray-400 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 dark:bg-elevated-dark dark:border-gray-600 dark:text-white dark:placeholder-gray-400;
165
+ @apply inline-flex flex-auto w-full min-w-0 p-2 m-0 border border-gray-300 rounded-md shadow-sm font-medium text-sm bg-white outline-none text-left placeholder:text-gray-400 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400;
166
166
  box-sizing: border-box;
167
167
  font-size: inherit;
168
168
  line-height: inherit;
169
169
  }
170
170
 
171
171
  .ss-content .ss-search .ss-addable {
172
- @apply inline-flex justify-center items-center cursor-pointer flex-none h-auto ml-2 border border-gray-300 rounded shadow-sm dark:border-gray-600;
172
+ @apply inline-flex justify-center items-center cursor-pointer flex-none h-auto ml-2 border border-gray-300 rounded-md shadow-sm dark:border-gray-600;
173
173
  }
174
174
 
175
175
  .ss-content .ss-search .ss-addable svg {
@@ -202,7 +202,7 @@
202
202
 
203
203
  /* Option groups - Updated colors */
204
204
  .ss-content .ss-list .ss-optgroup .ss-optgroup-label {
205
- @apply flex flex-row items-center justify-between p-2 bg-elevated dark:bg-elevated-dark;
205
+ @apply flex flex-row items-center justify-between p-2 bg-gray-50 dark:bg-gray-600;
206
206
  }
207
207
 
208
208
  .ss-content .ss-list .ss-optgroup .ss-optgroup-label .ss-optgroup-label-text {
data/tailwind.options.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export const content = [
2
+ `${__dirname}/src/css/**/*.css`,
2
3
  `${__dirname}/src/js/**/*.js`,
3
4
  `${__dirname}/app/views/**/*.{rb,erb,js}`,
4
5
  `${__dirname}/lib/plutonium/**/*.rb`,
@@ -63,36 +64,7 @@ export const theme = {
63
64
  },
64
65
  },
65
66
  }),
66
- // Semantic spacing scale - affects padding, margin, gap, space utilities
67
- spacing: {
68
- 'xs': '0.5rem', // 8px - extra small spacing
69
- 'sm': '0.75rem', // 12px - small spacing (inputs, buttons, small gaps)
70
- 'md': '1rem', // 16px - medium spacing (cards, tabs, standard gaps)
71
- 'lg': '1.5rem', // 24px - large spacing (forms, displays, large spacing)
72
- 'xl': '2rem', // 32px - extra large spacing
73
- '2xl': '2.5rem', // 40px - 2x extra large spacing
74
- '3xl': '3rem', // 48px - 3x extra large spacing
75
- },
76
67
  colors: {
77
- // Semantic background colors for theming - minimal, modern palette
78
- surface: {
79
- DEFAULT: '#ffffff', // Light mode surface (cards, forms, tables, panels)
80
- dark: '#1f2937', // Dark mode surface - gray-800
81
- },
82
- page: {
83
- DEFAULT: 'rgb(248 248 248)', // Light mode page - neutral gray
84
- dark: '#111827', // Dark mode page - gray-900
85
- },
86
- elevated: {
87
- DEFAULT: 'rgb(244 244 245)', // Light mode elevated - subtle
88
- dark: '#374151', // Dark mode elevated - gray-700
89
- },
90
- interactive: {
91
- DEFAULT: 'rgb(244 244 245)', // Light mode hover - subtle
92
- dark: '#374151', // Dark mode hover - gray-700
93
- },
94
-
95
- // Brand colors
96
68
  primary: {
97
69
  50: '#F0FDFD',
98
70
  100: '#E0FAFA',
@@ -234,7 +206,7 @@ export const theme = {
234
206
  'Courier New',
235
207
  'monospace'
236
208
  ]
237
- },
209
+ }
238
210
  };
239
211
 
240
212
  export const safelist = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
@@ -505,7 +505,6 @@ files:
505
505
  - docs/guide/index.md
506
506
  - docs/guide/introduction/01-what-is-plutonium.md
507
507
  - docs/guide/introduction/02-core-concepts.md
508
- - docs/guide/theming.md
509
508
  - docs/guide/tutorial/01-project-setup.md
510
509
  - docs/guide/tutorial/02-creating-a-feature-package.md
511
510
  - docs/guide/tutorial/03-defining-resources.md
@@ -831,7 +830,6 @@ files:
831
830
  - lib/plutonium/ui/component/behaviour.rb
832
831
  - lib/plutonium/ui/component/kit.rb
833
832
  - lib/plutonium/ui/component/methods.rb
834
- - lib/plutonium/ui/component/theme.rb
835
833
  - lib/plutonium/ui/component/tokens.rb
836
834
  - lib/plutonium/ui/display/base.rb
837
835
  - lib/plutonium/ui/display/components/association.rb