@app-studio/web 0.9.80 → 0.9.81
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/dist/components/Accordion/Accordion/Accordion.type.d.ts +1 -1
- package/dist/components/Accordion/Accordion/Accordion.view.d.ts +1 -1
- package/dist/components/Badge/Badge/Badge.type.d.ts +1 -1
- package/dist/components/Card/Card/Card.type.d.ts +1 -1
- package/dist/components/ChatInput/ChatInput/ChatInput.type.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPicker/ColorPicker.type.d.ts +1 -1
- package/dist/components/EmojiPicker/EmojiPicker/EmojiPicker.type.d.ts +1 -1
- package/dist/components/Form/ColorInput/ColorInput/ColorInput.type.d.ts +1 -1
- package/dist/components/Form/TagInput/TagInput/TagInput.type.d.ts +1 -1
- package/dist/components/Form/TextArea/TextArea/TextArea.type.d.ts +1 -1
- package/dist/components/Input/Input.type.d.ts +1 -1
- package/dist/components/Message/Message/Message.type.d.ts +1 -1
- package/dist/components/Modal/Modal/Modal.props.d.ts +2 -2
- package/dist/components/Slider/Slider/Slider.type.d.ts +1 -1
- package/dist/components/Title/Title/Title.props.d.ts +0 -5
- package/dist/components/Toggle/Toggle/Toggle.type.d.ts +1 -1
- package/dist/components/ToggleGroup/ToggleGroup/ToggleGroup.type.d.ts +1 -1
- package/dist/pages/tabs.page.d.ts +1 -1
- package/dist/web.cjs.development.js +61 -77
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +61 -77
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +61 -77
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/docs/components/Background.mdx +133 -134
- package/docs/components/Button.mdx +154 -131
- package/docs/components/Chart.mdx +93 -368
- package/docs/components/ProgressBar.mdx +77 -394
- package/docs/components/Title.mdx +102 -290
- package/package.json +1 -1
- package/docs/components/ChatInput.mdx +0 -1039
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
var AccordionShapes = {
|
|
147
|
-
|
|
147
|
+
square: {
|
|
148
148
|
borderRadius: 0
|
|
149
149
|
},
|
|
150
150
|
rounded: {
|
|
@@ -1259,17 +1259,14 @@
|
|
|
1259
1259
|
width: "100%"
|
|
1260
1260
|
}, /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
1261
1261
|
size: "md",
|
|
1262
|
-
weight: "semiBold"
|
|
1263
|
-
backgroundColor: Theme[variant].container.backgroundColor
|
|
1262
|
+
weight: "semiBold"
|
|
1264
1263
|
}, views == null ? void 0 : views.title), title), subtitle && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
1265
|
-
size: "sm"
|
|
1266
|
-
backgroundColor: Theme[variant].container.backgroundColor
|
|
1264
|
+
size: "sm"
|
|
1267
1265
|
}, views == null ? void 0 : views.subtitle), subtitle))), showAction && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
1268
1266
|
marginRight: 10,
|
|
1269
1267
|
onClick: action,
|
|
1270
1268
|
padding: "6px 10px",
|
|
1271
|
-
whiteSpace: "nowrap"
|
|
1272
|
-
backgroundColor: Theme[variant].container.backgroundColor
|
|
1269
|
+
whiteSpace: "nowrap"
|
|
1273
1270
|
}, containerStyle, views == null ? void 0 : views.actionText), actionText)), isClosable && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
1274
1271
|
position: "absolute",
|
|
1275
1272
|
zIndex: 10000,
|
|
@@ -2257,9 +2254,9 @@
|
|
|
2257
2254
|
* Badge shapes with consistent border radius
|
|
2258
2255
|
*/
|
|
2259
2256
|
var BadgeShapes = {
|
|
2260
|
-
|
|
2257
|
+
square: 0,
|
|
2261
2258
|
rounded: '8px',
|
|
2262
|
-
|
|
2259
|
+
pill: '9999px'
|
|
2263
2260
|
};
|
|
2264
2261
|
/**
|
|
2265
2262
|
* Badge positions for absolute positioning
|
|
@@ -2337,7 +2334,7 @@
|
|
|
2337
2334
|
var {
|
|
2338
2335
|
content,
|
|
2339
2336
|
position,
|
|
2340
|
-
shape = '
|
|
2337
|
+
shape = 'pill',
|
|
2341
2338
|
variant = 'filled',
|
|
2342
2339
|
size = 'md',
|
|
2343
2340
|
views,
|
|
@@ -2711,9 +2708,9 @@
|
|
|
2711
2708
|
* Button shapes with consistent border radius
|
|
2712
2709
|
*/
|
|
2713
2710
|
var ButtonShapes = {
|
|
2714
|
-
|
|
2711
|
+
square: 0,
|
|
2715
2712
|
rounded: 8,
|
|
2716
|
-
|
|
2713
|
+
pill: 999
|
|
2717
2714
|
};
|
|
2718
2715
|
/**
|
|
2719
2716
|
* Icon sizes for different button sizes
|
|
@@ -3386,9 +3383,9 @@
|
|
|
3386
3383
|
* Card shapes with consistent border radius
|
|
3387
3384
|
*/
|
|
3388
3385
|
var CardShapes = {
|
|
3389
|
-
|
|
3386
|
+
square: 0,
|
|
3390
3387
|
rounded: '8px',
|
|
3391
|
-
|
|
3388
|
+
pill: '24px'
|
|
3392
3389
|
};
|
|
3393
3390
|
/**
|
|
3394
3391
|
* Get card variants with consistent styling based on theme mode
|
|
@@ -3548,7 +3545,9 @@
|
|
|
3548
3545
|
// Prepare context value, merging default styles with user's `views` overrides
|
|
3549
3546
|
var contextValue = React.useMemo(() => ({
|
|
3550
3547
|
styles: {
|
|
3551
|
-
container: Object.assign({}, defaultStyles.container,
|
|
3548
|
+
container: Object.assign({}, defaultStyles.container, {
|
|
3549
|
+
borderRadius: CardShapes[shape]
|
|
3550
|
+
}, views == null ? void 0 : views.container),
|
|
3552
3551
|
header: Object.assign({}, defaultStyles.header, {
|
|
3553
3552
|
padding: sizePadding
|
|
3554
3553
|
}, views == null ? void 0 : views.header),
|
|
@@ -3559,7 +3558,7 @@
|
|
|
3559
3558
|
padding: sizePadding
|
|
3560
3559
|
}, views == null ? void 0 : views.footer)
|
|
3561
3560
|
}
|
|
3562
|
-
}), [defaultStyles, views, sizePadding]);
|
|
3561
|
+
}), [defaultStyles, views, sizePadding, shape]);
|
|
3563
3562
|
// Determine if we have explicit Card.Header, Card.Content, Card.Footer components
|
|
3564
3563
|
var hasExplicitStructure = React__default.Children.toArray(children).some(child => /*#__PURE__*/React__default.isValidElement(child) && (child.type === CardHeader || child.type === CardContent || child.type === CardFooter));
|
|
3565
3564
|
// Get the appropriate variant styles based on theme mode
|
|
@@ -3571,7 +3570,6 @@
|
|
|
3571
3570
|
// Merge styles for the root element
|
|
3572
3571
|
var mergedRootProps = Object.assign({
|
|
3573
3572
|
width: isFullWidth ? '100%' : 'auto',
|
|
3574
|
-
borderRadius: CardShapes[shape],
|
|
3575
3573
|
overflow: 'hidden'
|
|
3576
3574
|
}, variantStyles, contextValue.styles.container, props, {
|
|
3577
3575
|
style: Object.assign({}, (_contextValue$styles$ = contextValue.styles.container) == null ? void 0 : _contextValue$styles$.style, style)
|
|
@@ -6368,7 +6366,7 @@
|
|
|
6368
6366
|
}
|
|
6369
6367
|
}
|
|
6370
6368
|
},
|
|
6371
|
-
|
|
6369
|
+
square: {
|
|
6372
6370
|
borderRadius: 0
|
|
6373
6371
|
},
|
|
6374
6372
|
rounded: {
|
|
@@ -6379,7 +6377,7 @@
|
|
|
6379
6377
|
}
|
|
6380
6378
|
}
|
|
6381
6379
|
},
|
|
6382
|
-
|
|
6380
|
+
pill: {
|
|
6383
6381
|
borderRadius: '9999px'
|
|
6384
6382
|
}
|
|
6385
6383
|
};
|
|
@@ -8529,13 +8527,13 @@
|
|
|
8529
8527
|
default: {
|
|
8530
8528
|
borderRadius: '6px'
|
|
8531
8529
|
},
|
|
8532
|
-
|
|
8530
|
+
square: {
|
|
8533
8531
|
borderRadius: '0px'
|
|
8534
8532
|
},
|
|
8535
8533
|
rounded: {
|
|
8536
8534
|
borderRadius: '8px'
|
|
8537
8535
|
},
|
|
8538
|
-
|
|
8536
|
+
pill: {
|
|
8539
8537
|
borderRadius: '9999px'
|
|
8540
8538
|
}
|
|
8541
8539
|
};
|
|
@@ -11223,9 +11221,6 @@
|
|
|
11223
11221
|
isReadOnly
|
|
11224
11222
|
} = _ref;
|
|
11225
11223
|
var [isRemoveHovered, setIsRemoveHovered] = React__default.useState(false);
|
|
11226
|
-
var {
|
|
11227
|
-
getColor
|
|
11228
|
-
} = appStudio.useTheme();
|
|
11229
11224
|
var chipSize = {
|
|
11230
11225
|
xs: {
|
|
11231
11226
|
padding: '2px 8px',
|
|
@@ -11261,24 +11256,23 @@
|
|
|
11261
11256
|
alignItems: "center",
|
|
11262
11257
|
gap: 6,
|
|
11263
11258
|
padding: chipSize.padding,
|
|
11264
|
-
backgroundColor: "color.gray.100",
|
|
11259
|
+
backgroundColor: "color.gray.100.100",
|
|
11265
11260
|
borderRadius: "16px",
|
|
11266
11261
|
borderWidth: "1px",
|
|
11267
11262
|
borderStyle: "solid",
|
|
11268
|
-
borderColor: "color.gray.
|
|
11263
|
+
borderColor: "color.gray.100",
|
|
11269
11264
|
boxShadow: "0 1px 2px rgba(0,0,0,0.05)",
|
|
11270
11265
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
11271
11266
|
opacity: isDisabled ? 0.6 : 1,
|
|
11272
11267
|
_hover: !isDisabled && !isReadOnly ? {
|
|
11273
|
-
backgroundColor: 'color.gray.200',
|
|
11274
|
-
borderColor: 'color.gray.
|
|
11268
|
+
backgroundColor: 'color.gray.100.200',
|
|
11269
|
+
borderColor: 'color.gray.200',
|
|
11275
11270
|
boxShadow: '0 4px 6px rgba(0,0,0,0.05)',
|
|
11276
11271
|
transform: 'translateY(-1px)'
|
|
11277
11272
|
} : {}
|
|
11278
11273
|
}, views == null ? void 0 : views.tag), /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
11279
11274
|
fontSize: chipSize.fontSize,
|
|
11280
|
-
color: isDisabled ? 'color.gray.
|
|
11281
|
-
fontWeight: "bold",
|
|
11275
|
+
color: isDisabled ? 'color.gray.100' : 'theme.primary',
|
|
11282
11276
|
whiteSpace: "nowrap"
|
|
11283
11277
|
}, views == null ? void 0 : views.tagText), tag), isRemovable && !isDisabled && !isReadOnly && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
|
|
11284
11278
|
cursor: "pointer",
|
|
@@ -12773,7 +12767,7 @@
|
|
|
12773
12767
|
default: {
|
|
12774
12768
|
borderRadius: '8px'
|
|
12775
12769
|
},
|
|
12776
|
-
|
|
12770
|
+
square: {
|
|
12777
12771
|
borderRadius: '0px'
|
|
12778
12772
|
},
|
|
12779
12773
|
rounded: {
|
|
@@ -14440,9 +14434,9 @@
|
|
|
14440
14434
|
}
|
|
14441
14435
|
};
|
|
14442
14436
|
var SliderShapes = {
|
|
14443
|
-
|
|
14437
|
+
square: 0,
|
|
14444
14438
|
rounded: 4,
|
|
14445
|
-
|
|
14439
|
+
pill: 24
|
|
14446
14440
|
};
|
|
14447
14441
|
var getSlider = themeMode => {
|
|
14448
14442
|
return {
|
|
@@ -15256,7 +15250,7 @@
|
|
|
15256
15250
|
* Following the 4px grid system
|
|
15257
15251
|
*/
|
|
15258
15252
|
var ContainerShapes = {
|
|
15259
|
-
|
|
15253
|
+
square: {
|
|
15260
15254
|
borderRadius: 0
|
|
15261
15255
|
},
|
|
15262
15256
|
rounded: {
|
|
@@ -16705,30 +16699,25 @@
|
|
|
16705
16699
|
textStyles
|
|
16706
16700
|
} = _ref;
|
|
16707
16701
|
// Base styles for the tab header
|
|
16702
|
+
// Base styles for the tab header
|
|
16708
16703
|
var baseStyles = {
|
|
16709
16704
|
display: 'flex',
|
|
16710
16705
|
alignItems: 'center',
|
|
16711
16706
|
justifyContent: 'center',
|
|
16712
|
-
padding: '
|
|
16707
|
+
padding: '12px 16px',
|
|
16713
16708
|
cursor: 'pointer',
|
|
16714
|
-
|
|
16715
|
-
|
|
16716
|
-
|
|
16717
|
-
borderBottomRightRadius: 0,
|
|
16718
|
-
borderWidth: '1px',
|
|
16719
|
-
borderStyle: 'solid',
|
|
16720
|
-
borderColor: isActive ? 'theme.primary' : 'transparent',
|
|
16721
|
-
borderBottomColor: isActive ? 'transparent' : 'color.gray.200',
|
|
16722
|
-
backgroundColor: isActive ? 'color.white' : 'transparent',
|
|
16709
|
+
borderBottom: '2px solid',
|
|
16710
|
+
borderBottomColor: isActive ? 'theme.primary' : 'transparent',
|
|
16711
|
+
backgroundColor: 'transparent',
|
|
16723
16712
|
color: isActive ? 'theme.primary' : 'color.gray.600',
|
|
16724
|
-
fontWeight: '
|
|
16725
|
-
|
|
16726
|
-
|
|
16727
|
-
// to create the illusion that the tab is connected to the content
|
|
16713
|
+
fontWeight: isActive ? '600' : '500',
|
|
16714
|
+
marginBottom: '-1px',
|
|
16715
|
+
transition: 'all 0.2s ease',
|
|
16728
16716
|
// Hover state
|
|
16729
16717
|
on: {
|
|
16730
16718
|
hover: {
|
|
16731
|
-
color: 'theme.primary'
|
|
16719
|
+
color: 'theme.primary',
|
|
16720
|
+
borderBottomColor: isActive ? 'theme.primary' : 'color.gray.300'
|
|
16732
16721
|
}
|
|
16733
16722
|
}
|
|
16734
16723
|
};
|
|
@@ -16790,7 +16779,11 @@
|
|
|
16790
16779
|
React__default.createElement(appStudio.Vertical, Object.assign({
|
|
16791
16780
|
width: "100%",
|
|
16792
16781
|
height: '100%'
|
|
16793
|
-
}, views.container), /*#__PURE__*/React__default.createElement(appStudio.Horizontal, Object.assign({
|
|
16782
|
+
}, views.container), /*#__PURE__*/React__default.createElement(appStudio.Horizontal, Object.assign({
|
|
16783
|
+
width: "100%",
|
|
16784
|
+
borderBottom: "1px solid",
|
|
16785
|
+
borderBottomColor: "color.gray.200"
|
|
16786
|
+
}, views.headerTabs), tabs.map(tab => {
|
|
16794
16787
|
// Determine if the current tab in the loop is the active one
|
|
16795
16788
|
var isActive = tab.title === activeTab.title;
|
|
16796
16789
|
// Prepare the onClick handler for this specific tab
|
|
@@ -17364,7 +17357,7 @@
|
|
|
17364
17357
|
}))))));
|
|
17365
17358
|
};
|
|
17366
17359
|
|
|
17367
|
-
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential", "themeMode"
|
|
17360
|
+
var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential", "themeMode"];
|
|
17368
17361
|
function escapeRegExp(string) {
|
|
17369
17362
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
17370
17363
|
}
|
|
@@ -17395,8 +17388,7 @@
|
|
|
17395
17388
|
highlightSlideDuration = 500,
|
|
17396
17389
|
highlightSlideStagger = 50,
|
|
17397
17390
|
highlightSlideSequential = true,
|
|
17398
|
-
themeMode: elementMode
|
|
17399
|
-
textComponent
|
|
17391
|
+
themeMode: elementMode
|
|
17400
17392
|
} = _ref,
|
|
17401
17393
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$$);
|
|
17402
17394
|
var {
|
|
@@ -17450,7 +17442,6 @@
|
|
|
17450
17442
|
highlightSlideStagger,
|
|
17451
17443
|
highlightSlideSequential
|
|
17452
17444
|
}, props));
|
|
17453
|
-
var TextComponent = textComponent || appStudio.Text;
|
|
17454
17445
|
var fontSize = TitleSizes[size];
|
|
17455
17446
|
// Highlight style props
|
|
17456
17447
|
var highlightProps = HighlightStyles[highlightStyle](resolvedHighlightColor, resolvedHighlightSecondaryColor);
|
|
@@ -17471,13 +17462,12 @@
|
|
|
17471
17462
|
// Get the text to display
|
|
17472
17463
|
var text = typeof finalDisplayedText === 'string' ? finalDisplayedText : typeof children === 'string' ? children : '';
|
|
17473
17464
|
// Common container props
|
|
17474
|
-
var containerProps =
|
|
17465
|
+
var containerProps = {
|
|
17475
17466
|
ref,
|
|
17476
|
-
animate: inView ? controlledAnimate : undefined
|
|
17477
|
-
}, !textComponent && {
|
|
17467
|
+
animate: inView ? controlledAnimate : undefined,
|
|
17478
17468
|
as: 'h1',
|
|
17479
17469
|
fontSize
|
|
17480
|
-
}
|
|
17470
|
+
};
|
|
17481
17471
|
// Render highlighted text content (typewriter, slide, or plain)
|
|
17482
17472
|
var renderHighlightedContent = content => {
|
|
17483
17473
|
// If animations are enabled but not in view, render invisible placeholder
|
|
@@ -17493,8 +17483,7 @@
|
|
|
17493
17483
|
return /*#__PURE__*/React__default.createElement(TypewriterEffect, Object.assign({
|
|
17494
17484
|
text: content,
|
|
17495
17485
|
typingSpeed: Math.max(30, highlightTypewriterDuration / (content.length * 10)),
|
|
17496
|
-
cursorColor: "currentColor"
|
|
17497
|
-
textComponent: TextComponent
|
|
17486
|
+
cursorColor: "currentColor"
|
|
17498
17487
|
}, highlightProps));
|
|
17499
17488
|
}
|
|
17500
17489
|
if (highlightSlide) {
|
|
@@ -17505,8 +17494,7 @@
|
|
|
17505
17494
|
sequential: stateHighlightSlideSequential,
|
|
17506
17495
|
direction: "up",
|
|
17507
17496
|
fontSize: fontSize,
|
|
17508
|
-
wordProps: highlightProps
|
|
17509
|
-
textComponent: TextComponent
|
|
17497
|
+
wordProps: highlightProps
|
|
17510
17498
|
});
|
|
17511
17499
|
}
|
|
17512
17500
|
return renderWithLineBreaks(content);
|
|
@@ -17526,13 +17514,11 @@
|
|
|
17526
17514
|
lastIndex = match.index + match[0].length;
|
|
17527
17515
|
}
|
|
17528
17516
|
if (lastIndex < text.length) parts.push(text.substring(lastIndex));
|
|
17529
|
-
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
17530
|
-
fontSize: fontSize
|
|
17531
|
-
}, containerProps, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? (/*#__PURE__*/React__default.createElement(TextComponent, {
|
|
17517
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({}, containerProps, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? (/*#__PURE__*/React__default.createElement(appStudio.Text, {
|
|
17532
17518
|
key: "text-" + idx,
|
|
17533
17519
|
as: "span",
|
|
17534
17520
|
display: "inline"
|
|
17535
|
-
}, renderWithLineBreaks(part))) : (/*#__PURE__*/React__default.createElement(
|
|
17521
|
+
}, renderWithLineBreaks(part))) : (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
17536
17522
|
key: "highlight-" + idx,
|
|
17537
17523
|
as: "span",
|
|
17538
17524
|
display: "inline",
|
|
@@ -17541,16 +17527,14 @@
|
|
|
17541
17527
|
}
|
|
17542
17528
|
// Case 2: Has highlight style but no highlight target - apply style to entire title
|
|
17543
17529
|
if (highlightStyle && !activeHighlightTarget) {
|
|
17544
|
-
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
|
|
17545
|
-
fontSize: fontSize
|
|
17546
|
-
}, containerProps, props, views == null ? void 0 : views.container), /*#__PURE__*/React__default.createElement(TextComponent, Object.assign({
|
|
17530
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({}, containerProps, props, views == null ? void 0 : views.container), /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
|
|
17547
17531
|
as: "span",
|
|
17548
17532
|
display: "inline",
|
|
17549
17533
|
animate: inView ? controlledHighlightAnimate : undefined
|
|
17550
17534
|
}, !highlightSlide ? highlightProps : {}, views == null ? void 0 : views.highlight), renderHighlightedContent(text)));
|
|
17551
17535
|
}
|
|
17552
17536
|
// Case 3: Default - no highlighting
|
|
17553
|
-
return /*#__PURE__*/React__default.createElement(
|
|
17537
|
+
return /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({}, containerProps, props, views == null ? void 0 : views.container), renderWithLineBreaks(text));
|
|
17554
17538
|
};
|
|
17555
17539
|
|
|
17556
17540
|
/**
|
|
@@ -17616,9 +17600,9 @@
|
|
|
17616
17600
|
};
|
|
17617
17601
|
|
|
17618
17602
|
var ToggleShapes = {
|
|
17619
|
-
|
|
17603
|
+
square: 0,
|
|
17620
17604
|
rounded: 4,
|
|
17621
|
-
|
|
17605
|
+
pill: 24
|
|
17622
17606
|
};
|
|
17623
17607
|
/**
|
|
17624
17608
|
* Generate toggle variants with proper color combinations based on main color and contrast
|
|
@@ -17735,7 +17719,7 @@
|
|
|
17735
17719
|
};
|
|
17736
17720
|
return /*#__PURE__*/React__default.createElement(appStudio.Center, Object.assign({
|
|
17737
17721
|
role: "Toggle",
|
|
17738
|
-
padding: shape === '
|
|
17722
|
+
padding: shape === 'pill' ? '10px 12px' : '8px',
|
|
17739
17723
|
width: "fit-content",
|
|
17740
17724
|
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
17741
17725
|
borderRadius: ToggleShapes[shape],
|
|
@@ -18644,13 +18628,13 @@
|
|
|
18644
18628
|
default: {
|
|
18645
18629
|
borderRadius: '8px'
|
|
18646
18630
|
},
|
|
18647
|
-
|
|
18631
|
+
square: {
|
|
18648
18632
|
borderRadius: 0
|
|
18649
18633
|
},
|
|
18650
18634
|
rounded: {
|
|
18651
18635
|
borderRadius: '8px'
|
|
18652
18636
|
},
|
|
18653
|
-
|
|
18637
|
+
pill: {
|
|
18654
18638
|
borderRadius: '9999px'
|
|
18655
18639
|
}
|
|
18656
18640
|
};
|
|
@@ -19112,13 +19096,13 @@
|
|
|
19112
19096
|
default: {
|
|
19113
19097
|
borderRadius: '8px'
|
|
19114
19098
|
},
|
|
19115
|
-
|
|
19099
|
+
square: {
|
|
19116
19100
|
borderRadius: 0
|
|
19117
19101
|
},
|
|
19118
19102
|
rounded: {
|
|
19119
19103
|
borderRadius: '8px'
|
|
19120
19104
|
},
|
|
19121
|
-
|
|
19105
|
+
pill: {
|
|
19122
19106
|
borderRadius: '9999px'
|
|
19123
19107
|
}
|
|
19124
19108
|
};
|