@openedx/paragon 23.8.0 → 23.10.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.
@@ -147,6 +147,11 @@ const COMMANDS = {
147
147
  description: 'Path to the theme\'s core SCSS file, defaults to Paragon\'s core.scss.',
148
148
  defaultValue: 'styles/scss/core/core.scss',
149
149
  },
150
+ {
151
+ name: '--excludeCore',
152
+ description: 'Exclude core from the SCSS build.',
153
+ defaultValue: false,
154
+ },
150
155
  {
151
156
  name: '--themesPath',
152
157
  description: `Path to the directory that contains themes' files. Expects directory to have following structure:
@@ -16,7 +16,29 @@
16
16
  @include border-radius($button-border-radius, 0);
17
17
  }
18
18
 
19
- // Mixin for button states that affect border radius
19
+ /// Sets the CSS custom properties for a button variant
20
+ /// @param {String} $variant - The variant name (e.g., 'primary', 'outline-primary')
21
+ @mixin button-variant($variant) {
22
+ --pgn-btn-color: var(--pgn-color-btn-text-#{$variant});
23
+ --pgn-btn-bg: var(--pgn-color-btn-bg-#{$variant});
24
+ --pgn-btn-border-color: var(--pgn-color-btn-border-#{$variant});
25
+ --pgn-btn-hover-color: var(--pgn-color-btn-hover-text-#{$variant});
26
+ --pgn-btn-hover-bg: var(--pgn-color-btn-hover-bg-#{$variant});
27
+ --pgn-btn-hover-border-color: var(--pgn-color-btn-hover-border-#{$variant});
28
+ --pgn-btn-disabled-color: var(--pgn-color-btn-disabled-text-#{$variant});
29
+ --pgn-btn-disabled-bg: var(--pgn-color-btn-disabled-bg-#{$variant});
30
+ --pgn-btn-disabled-border-color: var(--pgn-color-btn-disabled-border-#{$variant});
31
+ --pgn-btn-active-color: var(--pgn-color-btn-active-text-#{$variant});
32
+ --pgn-btn-active-bg: var(--pgn-color-btn-active-bg-#{$variant});
33
+ --pgn-btn-active-border-color: var(--pgn-color-btn-active-border-#{$variant});
34
+ --pgn-btn-focus-outline-color: var(--pgn-color-btn-focus-outline-#{$variant});
35
+ --pgn-btn-focus-color: var(--pgn-color-btn-focus-text-#{$variant});
36
+ --pgn-btn-focus-border-color: var(--pgn-color-btn-focus-border-#{$variant});
37
+ --pgn-btn-focus-bg: var(--pgn-color-btn-focus-bg-#{$variant});
38
+ }
39
+
40
+ /// Mixin for button states that affect border radius
41
+ /// @param {String} $side - The side of the button to affect ('left' or 'right')
20
42
  @mixin button-border-radius-0($side) {
21
43
  @if $side == 'right' {
22
44
  @include border-right-radius(0);
@@ -26,7 +48,7 @@
26
48
  @include border-left-radius(0);
27
49
  }
28
50
 
29
- // Handle pseudo-classes
51
+ /// Handle pseudo-classes
30
52
  &.btn:not(:disabled, .disabled):focus,
31
53
  &.btn:not(:disabled, .disabled):focus::before {
32
54
  @if $side == 'left' {
@@ -49,7 +71,7 @@
49
71
  }
50
72
  }
51
73
 
52
- // Handle .active class
74
+ /// Handle .active class
53
75
  &.btn:not(:disabled, .disabled).active,
54
76
  &.btn:not(:disabled, .disabled).active::before {
55
77
  @if $side == 'right' {