@moises.ai/design-system 3.11.17 → 3.11.18

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moises.ai/design-system",
3
- "version": "3.11.17",
3
+ "version": "3.11.18",
4
4
  "description": "Design System package based on @radix-ui/themes with custom defaults",
5
5
  "private": false,
6
6
  "type": "module",
@@ -21,6 +21,7 @@ export const Slider = ({
21
21
  highContrast = false,
22
22
  markers = [],
23
23
  orientation = 'horizontal',
24
+ horizontalWidth = '100%',
24
25
  verticalHeight = 200,
25
26
  scrollWheel = false,
26
27
  ...props
@@ -69,10 +70,14 @@ export const Slider = ({
69
70
  typeof verticalHeight === 'number'
70
71
  ? `${verticalHeight}px`
71
72
  : verticalHeight
73
+ const horizontalWidthStyle =
74
+ typeof horizontalWidth === 'number'
75
+ ? `${horizontalWidth}px`
76
+ : horizontalWidth
72
77
 
73
78
  return (
74
79
  <Box
75
- width="100%"
80
+ width={isVertical ? '100%' : horizontalWidthStyle}
76
81
  className={classNames(isVertical && styles.boxVertical)}
77
82
  style={
78
83
  isVertical
@@ -27,6 +27,7 @@ import { Slider } from '@moises.ai/design-system'
27
27
  disabled={false}
28
28
  size="2"
29
29
  orientation="horizontal"
30
+ horizontalWidth={320}
30
31
  scrollWheel={false}
31
32
  />
32
33
 
@@ -56,6 +57,7 @@ import { Slider } from '@moises.ai/design-system'
56
57
  size: '1' | '2' | '3', // Size of the slider (1: small, 2: medium, 3: large)
57
58
  markers: number[], // Array of values where visual markers should be displayed
58
59
  orientation: 'horizontal' | 'vertical', // Slider axis; vertical uses verticalHeight for track
60
+ horizontalWidth: number | string, // Track width when horizontal (number = px, or CSS length)
59
61
  verticalHeight: number | string, // Track height when vertical (number = px, or CSS length)
60
62
  scrollWheel: boolean, // Wheel/trackpad adjusts value on hover/focus (use controlled value)
61
63
  }
@@ -129,6 +131,10 @@ import { Slider } from '@moises.ai/design-system'
129
131
  options: ['horizontal', 'vertical'],
130
132
  description: 'Slider axis',
131
133
  },
134
+ horizontalWidth: {
135
+ control: 'number',
136
+ description: 'Track width in px when orientation is horizontal (or pass a CSS length string)',
137
+ },
132
138
  verticalHeight: {
133
139
  control: 'number',
134
140
  description: 'Track height in px when orientation is vertical (or pass a CSS length string)',
@@ -151,6 +157,7 @@ export const Default = {
151
157
  highContrast: false,
152
158
  size: '2',
153
159
  orientation: 'horizontal',
160
+ horizontalWidth: 300,
154
161
  verticalHeight: 200,
155
162
  scrollWheel: false,
156
163
  },