@ctlyst.id/internal-ui 2.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ export * from './badge';
1
2
  export * from './breadcrumb';
2
3
  export * from './button';
3
4
  export * from './card';
@@ -0,0 +1,3 @@
1
+ import type { ComponentStyleConfig } from '@chakra-ui/theme';
2
+ declare const Badge: ComponentStyleConfig;
3
+ export default Badge;
@@ -1,4 +1,5 @@
1
1
  export { default as Alert } from './alert';
2
+ export { default as Badge } from './badge';
2
3
  export { default as Button } from './button';
3
4
  export { default as Card } from './card';
4
5
  export { default as Checkbox } from './checkbox';
@@ -27,6 +27,27 @@ var styledSystem = require('@chakra-ui/styled-system');
27
27
  var themeTools = require('@chakra-ui/theme-tools');
28
28
  var axios = _interopDefault(require('axios'));
29
29
 
30
+ const Badge = props => {
31
+ const {
32
+ children,
33
+ pill,
34
+ ...rest
35
+ } = props;
36
+ return /*#__PURE__*/React__default.createElement(react.Badge, Object.assign({
37
+ borderRadius: pill ? 10 : 4,
38
+ variant: "primary-solid",
39
+ padding: "0 8px",
40
+ height: "18px",
41
+ display: "flex",
42
+ alignItems: "center",
43
+ justifyContent: "space-between",
44
+ textTransform: "none"
45
+ }, rest), children);
46
+ };
47
+ Badge.defaultProps = {
48
+ pill: false
49
+ };
50
+
30
51
  /* eslint-disable react-hooks/rules-of-hooks */
31
52
  const BreadCrumb = props => {
32
53
  const {
@@ -2088,7 +2109,7 @@ const XMSLogo = () => /*#__PURE__*/React__default.createElement(react.Image, {
2088
2109
  src: react.useColorModeValue('https://assets.voila.id/xms/logo-xms.jpg', 'https://assets.voila.id/xms/logo-xms-dark.png')
2089
2110
  });
2090
2111
  const VoilaLogo = () => /*#__PURE__*/React__default.createElement(react.Image, {
2091
- src: "https://s3.ap-southeast-1.amazonaws.com/assets.voila.id/xms/logo-voila-black.png?v=1",
2112
+ src: "https://assets.voila.id/xms/logo-voila-black.png?v=1",
2092
2113
  filter: react.useColorModeValue('none', 'invert(1)'),
2093
2114
  maxW: 24
2094
2115
  });
@@ -3244,6 +3265,72 @@ const alertTheme = /*#__PURE__*/defineMultiStyleConfig({
3244
3265
  }
3245
3266
  });
3246
3267
 
3268
+ const Badge$1 = {
3269
+ baseStyle: {
3270
+ display: 'inline-block',
3271
+ fontSize: 10,
3272
+ fontWeight: 600,
3273
+ lineHeight: '1.25',
3274
+ textTransform: 'none',
3275
+ px: 2,
3276
+ py: '0.5'
3277
+ },
3278
+ variants: {
3279
+ 'primary-solid': {
3280
+ bg: 'primary.500',
3281
+ color: 'white'
3282
+ },
3283
+ 'success-solid': {
3284
+ bg: 'success.500',
3285
+ color: 'white'
3286
+ },
3287
+ 'info-solid': {
3288
+ bg: 'info.500',
3289
+ color: 'white'
3290
+ },
3291
+ 'warning-solid': {
3292
+ bg: 'warning.500',
3293
+ color: 'white'
3294
+ },
3295
+ 'danger-solid': {
3296
+ bg: 'danger.500',
3297
+ color: 'white'
3298
+ },
3299
+ 'neutral-solid': {
3300
+ bg: 'neutral.600',
3301
+ color: 'white'
3302
+ },
3303
+ 'primary-light': {
3304
+ bg: 'primary.50',
3305
+ color: 'primary.500'
3306
+ },
3307
+ 'success-light': {
3308
+ bg: 'success.50',
3309
+ color: 'success.500'
3310
+ },
3311
+ 'info-light': {
3312
+ bg: 'info.50',
3313
+ color: 'info.500'
3314
+ },
3315
+ 'warning-light': {
3316
+ bg: 'warning.50',
3317
+ color: 'warning.500'
3318
+ },
3319
+ 'danger-light': {
3320
+ bg: 'danger.50',
3321
+ color: 'danger.500'
3322
+ },
3323
+ 'neutral-light': {
3324
+ bg: 'neutral.100',
3325
+ color: 'neutral.600'
3326
+ }
3327
+ },
3328
+ // The default size and variant values
3329
+ defaultProps: {
3330
+ variant: 'primary-solid'
3331
+ }
3332
+ };
3333
+
3247
3334
  // You can also use the more specific type for
3248
3335
  // a single part component: ComponentSingleStyleConfig
3249
3336
  const Button$1 = /*#__PURE__*/styledSystem.defineStyleConfig({
@@ -3306,14 +3393,15 @@ const Button$1 = /*#__PURE__*/styledSystem.defineStyleConfig({
3306
3393
  variant
3307
3394
  } = props;
3308
3395
  const base = {
3309
- fontSize: 'text.xs',
3310
- h: 6,
3396
+ fontSize: 'text.sm',
3397
+ h: '26px',
3398
+ lineHeight: 4,
3311
3399
  px: 2,
3312
3400
  py: '5px'
3313
3401
  };
3314
3402
  const icon = {
3315
- h: 6,
3316
- w: 6,
3403
+ h: '26px',
3404
+ w: '26px',
3317
3405
  p: 0
3318
3406
  };
3319
3407
  return variant === 'icon' ? icon : base;
@@ -4142,6 +4230,7 @@ const Textarea = /*#__PURE__*/react.defineStyleConfig({
4142
4230
  var components = {
4143
4231
  __proto__: null,
4144
4232
  Alert: alertTheme,
4233
+ Badge: Badge$1,
4145
4234
  Button: Button$1,
4146
4235
  Card: CardStyle,
4147
4236
  Checkbox: Checkbox,
@@ -4447,6 +4536,7 @@ Object.defineProperty(exports, 'useTabsStyles', {
4447
4536
  return react.useTabsStyles;
4448
4537
  }
4449
4538
  });
4539
+ exports.Badge = Badge;
4450
4540
  exports.Box = react.Box;
4451
4541
  exports.BreadCrumb = BreadCrumb;
4452
4542
  exports.Button = Button;