asma-core-ui
TypeScript icon, indicating that this package has built-in type declarations

3.0.127 • Public • Published

How to create and use the Design System

Component composition.

  • When creating components that consists of several components, each component should be styled.
  • Each components that is used to create a "composed" component should be styled, and remember to check if the component alread is styled.
  • When creating a "composed component" evalute if it's really needed to create a composed component, or just document how to use the styled components.
    • MUI often has documentation on how to create composed components.

Documentation and testing

  • All components shall be documented and tested in Storybook before PR is created.

Changelog

The project uses "changesets" to automatically bump version and create a changelog.

For each new feature or change run "npx changeset". Choose patch for a change or bug fix, minor for a new feature or major version for a breaking change. This creates a markdown file in .changeset folder. Commit to brach/PR as normal.

A PR can have several changesets.

The pipeline will automatically bump version and create changelog after merge to master.

Index file

  • Index files shall not be edited manually.
  • ctix is used for automatically create index files for exporting componens. Run "npm run create-index"
  • 'src/styles/index.ccss' is imported to 'src/theme/customMuiColors.ts' so exporting works with ctix.

Using MUI theme in App

import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';
import { defaultTheme, customPalettes } from 'asma-core-ui';

const dataTheme = window.document.body.attributes.getNamedItem('data-theme');

const getTheme = () => {
  switch (dataTheme?.value) {
    case 'fretex':
      return customPalettes.fretex.primary;
    default:
      return null;
  }
};

const theme = createTheme(defaultTheme, {
  palette: {
    ...defaultTheme.palette,
    primary: {
      ...getTheme(),
    },
    role: customPalettes.role,
  },
});

<React.Fragment>
  <ThemeProvider theme={createMuiTheme(theme)}>
    <... />
  </ThemeProvider>
</React.Fragment>

Using Components in App

import { StyledButton } from 'asma-core-ui';

...

<>
  <StyledButton>
    Text
  </StyledButton>
</>

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.128-test48test
3.0.6422stage
3.0.6422prod
4.0.0-30beta
3.0.12743latest
3.0.120-alpha13alpha
3.0.102-pesterean62pesterean

Version History

VersionDownloads (Last 7 Days)Published
3.0.128-test48
3.0.127-test47
3.0.12743
3.0.12662
3.0.1257
3.0.1243
3.0.1233
3.0.1224
3.0.1214
3.0.120-alpha13
3.0.1203
3.0.1191
3.0.1181
3.0.117-alpha80
3.0.117-alpha70
3.0.117-alpha60
3.0.117-alpha50
3.0.117-alpha40
3.0.117-alpha30
3.0.117-alpha20
3.0.117-alpha10
3.0.1173
3.0.1160
3.0.1150
3.0.1141
3.0.1131
3.0.1120
3.0.1112
3.0.1100
3.0.1090
3.0.1080
3.0.1070
3.0.1060
3.0.1055
3.0.1044
3.0.102-pesterean62
3.0.1030
3.0.102-pesterean50
3.0.102-pesterean40
3.0.102-pesterean31
3.0.102-pesterean20
3.0.102-pesterean10
3.0.1020
3.0.1010
3.0.100-alpha60
3.0.100-alpha50
3.0.100-alpha41
3.0.100-alpha33
3.0.100-alpha20
3.0.100-alpha10
3.0.100-alpha0
3.0.1002
3.0.990
3.0.980
3.0.970
3.0.960
3.0.950
3.0.940
3.0.93-alpha30
3.0.93-alpha20
3.0.93-alpha10
3.0.930
3.0.92-alpha50
3.0.92-alpha40
3.0.920
3.0.91-alpha30
3.0.91-alpha20
3.0.91-alpha11
3.0.91-alpha0
3.0.910
3.0.90-alpha10
3.0.90-alpha0
3.0.900
3.0.800
3.0.790
3.0.780
3.0.771
3.0.761
3.0.752
3.0.742
3.0.730
3.0.720
3.0.710
3.0.701
3.0.690
3.0.680
3.1.0-30
3.1.0-20
3.0.670
3.1.0-10
4.0.0-30
4.0.0-20
4.0.0-10
3.0.660
3.0.66-10
3.0.65-100
3.0.65-90
3.0.65-80
3.0.65-71
3.0.65-60
3.0.65-50
3.0.66-50
3.0.65-40
3.0.65-31
3.0.65-20
3.0.65-10
3.0.65-00
3.0.6422
3.0.631
3.0.621
3.0.610
3.0.600
3.0.590
3.0.580
3.0.571
3.0.560
3.0.551
3.0.540
3.0.530
3.0.521
3.0.510
3.0.500
3.0.490
3.0.480
3.0.470
3.0.461
3.0.450
3.0.441
3.0.430
3.0.420
3.0.410
3.0.401
3.1.0-beta.40
3.1.0-beta.31
3.0.390
3.0.380
3.1.0-beta.20
3.1.0-beta.00
3.0.370
3.0.361
0.0.00
3.0.350
3.0.340
3.0.330
3.0.321
3.0.310
3.0.300
3.0.290
3.0.28-beta.00
3.0.270
3.0.26-beta.00
3.0.22-beta.00
2.22.191
3.0.261
2.22.180
2.22.170
2.22.160
2.22.150
2.22.140
3.0.252
3.0.240
3.0.230
3.1.0-beta.10
3.0.220
3.0.210
3.0.200
3.0.191
3.0.170
3.0.161
3.0.151
3.0.140
3.0.130
3.0.121
3.0.110
3.0.101
3.0.90
3.0.81
3.0.70
3.0.60
3.0.50
3.0.40
3.0.30
3.0.20
3.0.10
3.0.00
2.22.130
2.22.120
2.22.110
2.22.90
2.22.80
2.22.70
2.22.60
2.22.50
2.22.41
2.21.40
2.21.30
2.21.20
2.21.10
2.21.00
2.20.370
2.20.360
2.20.351
2.20.340
2.20.330
2.20.320
2.20.311
2.20.301
2.20.291
2.20.280
2.20.270
2.20.261
2.20.250
2.20.241
2.20.230
2.20.220
2.20.210
2.20.200
2.20.190
2.20.180
2.20.170
2.20.160
2.20.150
2.20.142
2.20.130
2.20.120
2.20.100
2.20.91
2.20.80
2.20.70
2.20.60
2.20.51
2.20.41
2.20.31
2.20.20
2.20.01
1.10.1100
2.19.1110
2.19.1101
1.10.1091
1.19.1090
2.19.1080
1.19.1080
2.19.1070
2.19.1060
2.19.1050
2.19.1040
2.19.1030
2.19.1020
2.19.1010
2.19.1000
2.19.990
2.19.980
2.19.970
2.19.960
2.19.950
2.19.940
2.19.930
2.19.920
2.19.910
2.19.901
2.19.890
2.19.880
2.19.870
2.19.861
2.19.850
2.19.840
2.19.830
2.19.820
2.19.810
2.19.800
2.19.790
2.19.780
2.19.770
2.19.760
2.19.750
2.19.740
2.19.730
2.19.720
2.19.710
2.19.700
2.19.690
2.19.680
2.19.670
2.19.650
2.19.640
2.19.631
2.19.620
2.19.610
2.19.601
2.19.590
2.19.580
2.19.570
2.19.560
2.19.550
2.19.541
2.19.530
2.19.520
2.19.510
2.19.501
2.19.480
2.19.470
2.19.460
2.19.450
2.19.441
2.19.430
2.19.420
2.19.410
2.19.400
2.19.390
2.19.380
2.19.370
2.19.360
2.19.350
2.19.340
2.19.331
2.19.320
2.19.310
2.19.300
2.19.290
2.19.280
2.19.271
2.19.261
2.19.250
2.19.240
2.19.230
2.19.220
2.19.210
2.19.202
2.19.90
2.19.80
2.19.70
2.19.50
2.19.40
2.19.30
2.19.20
2.19.10
2.19.00
2.18.420
2.18.410
1.9.110
1.9.100
2.18.400
1.9.90
1.9.80
1.9.70
1.9.60
2.18.390
2.18.380
2.18.360
2.18.351
2.18.340
2.18.330
2.18.320
2.18.312
2.18.300
2.18.290
2.18.281
2.18.271
2.18.260
2.18.250
2.18.240
2.18.230
2.18.221
2.18.210
2.18.200
2.18.192
2.18.180
2.18.170
2.18.160
2.18.150
2.18.140
2.18.130
2.18.121
2.18.111
2.18.100
2.18.90
2.18.80
2.18.70
2.18.60
2.18.51
2.18.40
2.18.30
2.18.20
2.18.10
2.18.00
2.17.210
2.17.200
2.17.190
1.9.50
2.17.182
2.17.170
2.17.150
2.17.141
2.17.130
2.17.120
2.17.110
2.17.100
2.17.90
2.17.80
2.17.70
2.17.60
2.17.51
2.17.40
2.17.30
2.17.20
2.17.10
2.16.190
2.16.180
2.16.170
2.16.160
2.16.150
2.16.140
2.16.130
2.16.121
2.16.110
2.16.100
2.17.01
2.16.90
2.16.81
2.16.70
2.16.61
2.16.50
2.16.40
2.16.30
2.16.20
2.16.10
2.16.00
2.15.10
2.15.00
2.14.90
2.14.81
2.14.70
2.14.60
2.14.50
2.14.40
2.14.30
2.14.20
2.14.10
2.14.00
2.13.40
2.13.30
2.13.20
2.13.11
2.13.00
2.12.10
2.12.00
2.11.00
2.10.00
2.10.0-beta.00
2.9.30
2.9.22
2.9.10
2.9.00
2.8.10
2.8.01
2.7.60
2.7.51
2.7.41
2.7.31
2.7.20
2.7.10
2.7.00
2.6.100
2.6.91
2.6.80
2.6.70
2.6.60
2.6.51
2.6.40
2.6.30
2.6.20
2.6.11
2.6.01
2.5.50
2.5.40
2.5.30
2.5.20
2.5.10
2.5.00
2.4.00
2.3.00
2.2.00
2.1.01
2.0.60
2.0.50
2.0.40
2.0.30
2.0.20
2.0.11
2.0.00
1.9.40
1.9.31
1.9.20
1.9.10
1.9.00
1.8.70
1.8.60
1.8.51
1.8.41
1.8.30
1.8.20
1.8.10
1.8.00
1.7.20
1.7.10
1.7.01
1.6.60
1.6.50
1.6.40
1.6.30
1.6.20
1.6.11
1.5.90
1.5.80
1.5.70
1.5.60
1.5.50
1.5.40
1.5.30
1.5.20
1.5.10
1.5.00
1.4.20
1.4.10
1.4.00
1.3.20
1.3.10
1.3.00
1.2.60
1.2.51
1.2.40
1.2.30
1.2.20
1.2.12
1.1.22
1.1.12
1.1.02
0.0.12

Package Sidebar

Install

npm i asma-core-ui

Weekly Downloads

384

Version

3.0.127

License

UNLICENSED

Unpacked Size

3.02 MB

Total Files

461

Last publish

Collaborators

  • matsgm
  • andygr1n1
  • avans
  • sebastiandarie
  • utopiaeh
  • hsoratsa
  • alex_bularga
  • mark31
  • daria_bogat
  • nexp