@drivy/cobalt 1.1.5 → 1.2.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.
Files changed (37) hide show
  1. package/components/Callout/index.js +1 -1
  2. package/components/Callout/index.js.map +1 -1
  3. package/index.js +0 -1
  4. package/index.js.map +1 -1
  5. package/package.json +8 -8
  6. package/src/tokens/breakpoints.js +2 -2
  7. package/src/tokens/colors.js +2 -2
  8. package/src/tokens/zIndexes.js +2 -2
  9. package/styles/components/Accordion/index.scss +1 -1
  10. package/styles/components/Buttons/DefaultButton/index.scss +7 -19
  11. package/styles/components/Buttons/GhostButton/index.scss +3 -11
  12. package/styles/components/Buttons/index.scss +2 -4
  13. package/styles/components/Callout/index.scss +1 -1
  14. package/styles/components/Chip/index.scss +2 -3
  15. package/styles/components/Form/Autocomplete/index.scss +1 -1
  16. package/styles/components/Form/CheckablePill.scss +3 -9
  17. package/styles/components/Form/Checkmark.scss +11 -9
  18. package/styles/components/Form/RadioWithDetails.scss +4 -16
  19. package/styles/components/Form/Select.scss +16 -4
  20. package/styles/components/Form/TextInput.scss +0 -4
  21. package/styles/components/Form/form.scss +3 -6
  22. package/styles/components/Layout/Components/index.scss +3 -3
  23. package/styles/components/TabBar/index.scss +1 -3
  24. package/styles/components/Tabs/index.scss +1 -4
  25. package/styles/components.scss +0 -1
  26. package/styles/core/text.scss +5 -1
  27. package/types/src/index.d.ts +0 -1
  28. package/utilities.css +6 -0
  29. package/utils/getCobaltTailwindcssConfig.js.map +1 -1
  30. package/utils/getCobaltTailwindcssConfig2.js +40 -6
  31. package/utils/getCobaltTailwindcssConfig2.js.map +1 -1
  32. package/utils/tailwindcssGenerators.js +5 -2
  33. package/utils/tailwindcssGenerators.js.map +1 -1
  34. package/components/Flash/index.js +0 -30
  35. package/components/Flash/index.js.map +0 -1
  36. package/styles/components/Flash/index.scss +0 -35
  37. package/types/src/components/Flash/index.d.ts +0 -7
@@ -11,7 +11,7 @@ const Callout = ({ title, children, status = "info", close, }) => (React.createE
11
11
  title && React.createElement("div", { className: "cobalt-Callout__Title" }, title),
12
12
  React.createElement("div", null, children),
13
13
  close && (React.createElement("button", { className: "cobalt-Callout__Close", onClick: close, type: "button" },
14
- React.createElement(CloseIcon, { color: "subduedInteractive", contained: true, size: 16 })))));
14
+ React.createElement(CloseIcon, { color: "subdued", size: 16, contained: true })))));
15
15
 
16
16
  export { Callout, Callout as default };
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Callout/index.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\nimport { CloseIcon } from \"../Icon\"\n\nexport interface CalloutProps {\n children: React.ReactNode\n title?: string\n status: \"info\" | \"error\" | \"success\"\n close?: () => void\n}\n\nexport const Callout = ({\n title,\n children,\n status = \"info\",\n close,\n}: CalloutProps) => (\n <div\n className={cx(\"cobalt-Callout\", {\n \"cobalt-Callout--info\": status === \"info\",\n \"cobalt-Callout--error\": status === \"error\",\n \"cobalt-Callout--success\": status === \"success\",\n })}\n >\n {title && <div className=\"cobalt-Callout__Title\">{title}</div>}\n <div>{children}</div>\n {close && (\n <button className=\"cobalt-Callout__Close\" onClick={close} type=\"button\">\n <CloseIcon color=\"subduedInteractive\" contained size={16} />\n </button>\n )}\n </div>\n)\n\nexport default Callout\n"],"names":[],"mappings":";;;;;AAWa,MAAA,OAAO,GAAG,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,MAAM,GAAG,MAAM,EACf,KAAK,GACQ,MACb,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE;QAC9B,sBAAsB,EAAE,MAAM,KAAK,MAAM;QACzC,uBAAuB,EAAE,MAAM,KAAK,OAAO;QAC3C,yBAAyB,EAAE,MAAM,KAAK,SAAS;KAChD,CAAC,EAAA;AAED,IAAA,KAAK,IAAI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,uBAAuB,EAAA,EAAE,KAAK,CAAO;AAC9D,IAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAM,QAAQ,CAAO;AACpB,IAAA,KAAK,KACJ,KAAQ,CAAA,aAAA,CAAA,QAAA,EAAA,EAAA,SAAS,EAAC,uBAAuB,EAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAA;AACrE,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAC,EAAA,KAAK,EAAC,oBAAoB,EAAC,SAAS,EAAA,IAAA,EAAC,IAAI,EAAE,EAAE,EAAI,CAAA,CACrD,CACV,CACG;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Callout/index.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\nimport { CloseIcon } from \"../Icon\"\n\nexport interface CalloutProps {\n children: React.ReactNode\n title?: string\n status: \"info\" | \"error\" | \"success\"\n close?: () => void\n}\n\nexport const Callout = ({\n title,\n children,\n status = \"info\",\n close,\n}: CalloutProps) => (\n <div\n className={cx(\"cobalt-Callout\", {\n \"cobalt-Callout--info\": status === \"info\",\n \"cobalt-Callout--error\": status === \"error\",\n \"cobalt-Callout--success\": status === \"success\",\n })}\n >\n {title && <div className=\"cobalt-Callout__Title\">{title}</div>}\n <div>{children}</div>\n {close && (\n <button className=\"cobalt-Callout__Close\" onClick={close} type=\"button\">\n <CloseIcon color=\"subdued\" size={16} contained />\n </button>\n )}\n </div>\n)\n\nexport default Callout\n"],"names":[],"mappings":";;;;;AAWa,MAAA,OAAO,GAAG,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,MAAM,GAAG,MAAM,EACf,KAAK,GACQ,MACb,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE;QAC9B,sBAAsB,EAAE,MAAM,KAAK,MAAM;QACzC,uBAAuB,EAAE,MAAM,KAAK,OAAO;QAC3C,yBAAyB,EAAE,MAAM,KAAK,SAAS;KAChD,CAAC,EAAA;AAED,IAAA,KAAK,IAAI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,uBAAuB,EAAA,EAAE,KAAK,CAAO;AAC9D,IAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAM,QAAQ,CAAO;AACpB,IAAA,KAAK,KACJ,KAAQ,CAAA,aAAA,CAAA,QAAA,EAAA,EAAA,SAAS,EAAC,uBAAuB,EAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAA;AACrE,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAC,EAAA,KAAK,EAAC,SAAS,EAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAG,IAAA,EAAA,CAAA,CAC1C,CACV,CACG;;;;"}
package/index.js CHANGED
@@ -10,7 +10,6 @@ export { Callout } from './components/Callout/index.js';
10
10
  export { default as Cell, Cells } from './components/Cell/index.js';
11
11
  export { EmptyState } from './components/EmptyState/index.js';
12
12
  export { Flag } from './components/Flag/index.js';
13
- export { Flash } from './components/Flash/index.js';
14
13
  export { default as Helper } from './components/Helper/index.js';
15
14
  export { CalendarRangePicker } from './components/Calendar/CalendarRangePicker/CalendarRangePicker.js';
16
15
  export { CalendarDayPicker } from './components/Calendar/CalendarDayPicker/CalendarDayPicker.js';
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drivy/cobalt",
3
- "version": "1.1.5",
3
+ "version": "1.2.0",
4
4
  "description": "Opinionated design system for Drivy's projects.",
5
5
  "main": "src/index.js",
6
6
  "types": "types/src/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "date-fns": "2.30.0",
29
29
  "lodash.throttle": "4.1.1",
30
30
  "media-typer": "1.1.0",
31
- "nanoid": "5.1.4",
31
+ "nanoid": "5.1.5",
32
32
  "postcss": "8.5.3",
33
33
  "tailwindcss": "3.4.17",
34
34
  "tippy.js": "6.3.7"
@@ -59,17 +59,17 @@
59
59
  "@types/jest": "29.5.14",
60
60
  "@types/lodash.throttle": "4.1.9",
61
61
  "@types/media-typer": "1.1.3",
62
- "@types/node": "22.13.10",
62
+ "@types/node": "22.13.17",
63
63
  "@types/react": "18.3.18",
64
64
  "@types/react-dom": "18.3.5",
65
65
  "autoprefixer": "10.4.21",
66
66
  "core-js": "3.41.0",
67
67
  "css-loader": "7.1.2",
68
68
  "eslint": "8.57.1",
69
- "eslint-plugin-storybook": "^0.11.6",
69
+ "eslint-plugin-storybook": "^0.12.0",
70
70
  "file-loader": "6.2.0",
71
71
  "fs-extra": "11.3.0",
72
- "html-entities": "2.5.2",
72
+ "html-entities": "2.6.0",
73
73
  "jest": "29.7.0",
74
74
  "jest-environment-jsdom": "29.7.0",
75
75
  "nested-object-access": "^0.2.5",
@@ -82,14 +82,14 @@
82
82
  "react-dom": "18.3.1",
83
83
  "react-syntax-highlighter": "15.6.1",
84
84
  "react-test-renderer": "18.3.1",
85
- "react-textarea-autosize": "8.5.8",
85
+ "react-textarea-autosize": "8.5.9",
86
86
  "regenerator-runtime": "0.14.1",
87
87
  "remark-gfm": "^3.0.1",
88
88
  "rollup": "2.79.2",
89
89
  "rollup-plugin-copy": "3.5.0",
90
90
  "rollup-plugin-svgo": "2.0.0",
91
91
  "rollup-plugin-typescript2": "0.36.0",
92
- "sass": "1.86.0",
92
+ "sass": "1.86.1",
93
93
  "sass-loader": "13.3.3",
94
94
  "sharp": "0.33.5",
95
95
  "sharp-cli": "5.1.0",
@@ -98,7 +98,7 @@
98
98
  "stylelint": "15.11.0",
99
99
  "svg2vectordrawable": "2.9.1",
100
100
  "svgo": "3.3.2",
101
- "ts-jest": "29.2.6",
101
+ "ts-jest": "29.3.1",
102
102
  "tsx": "4.19.3",
103
103
  "typescript": "5.4.5"
104
104
  },
@@ -2,12 +2,12 @@ const xs = "480px";
2
2
  const sm = "768px";
3
3
  const md = "992px";
4
4
  const lg = "1200px";
5
- var require$$0 = {
5
+ var require$$1 = {
6
6
  xs: xs,
7
7
  sm: sm,
8
8
  md: md,
9
9
  lg: lg
10
10
  };
11
11
 
12
- export { require$$0 as default, lg, md, sm, xs };
12
+ export { require$$1 as default, lg, md, sm, xs };
13
13
  //# sourceMappingURL=breakpoints.js.map
@@ -33,7 +33,7 @@ const deprecatedSeasonLow = "#BDFFAC";
33
33
  const deprecatedSeasonMedium = "#94EA84";
34
34
  const deprecatedSeasonHigh = "#73C865";
35
35
  const deprecatedSeasonVeryHigh = "#54A949";
36
- var require$$1 = {
36
+ var require$$2 = {
37
37
  white: white,
38
38
  grey: grey,
39
39
  indigo: indigo,
@@ -53,5 +53,5 @@ var require$$1 = {
53
53
  deprecatedSeasonVeryHigh: deprecatedSeasonVeryHigh
54
54
  };
55
55
 
56
- export { amber, blue, coral, require$$1 as default, deprecatedBlueGhost, deprecatedDriver, deprecatedSeasonHigh, deprecatedSeasonLow, deprecatedSeasonMedium, deprecatedSeasonVeryHigh, graphite, green, grey, indigo, purple, red, turquoise, white };
56
+ export { amber, blue, coral, require$$2 as default, deprecatedBlueGhost, deprecatedDriver, deprecatedSeasonHigh, deprecatedSeasonLow, deprecatedSeasonMedium, deprecatedSeasonVeryHigh, graphite, green, grey, indigo, purple, red, turquoise, white };
57
57
  //# sourceMappingURL=colors.js.map
@@ -7,7 +7,7 @@ const header = 30;
7
7
  const sidepanel = 80;
8
8
  const modal = 90;
9
9
  const alert = 100;
10
- var require$$2 = {
10
+ var require$$3 = {
11
11
  below: below,
12
12
  base: base,
13
13
  above: above,
@@ -32,5 +32,5 @@ var require$$2 = {
32
32
  "autocomplete-popover": 2147483647
33
33
  };
34
34
 
35
- export { above, alert, base, below, require$$2 as default, dropdown, header, modal, nav, sidepanel };
35
+ export { above, alert, base, below, require$$3 as default, dropdown, header, modal, nav, sidepanel };
36
36
  //# sourceMappingURL=zIndexes.js.map
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  &accordion__header {
13
- @apply c-text-title-xs c-p-sm c-bg-secondary c-cursor-pointer c-gap-sm;
13
+ @apply c-text-title-xs c-p-sm c-bg-secondary c-cursor-pointer c-state-interactive c-transition-interactive c-gap-sm;
14
14
 
15
15
  width: 100%;
16
16
  display: flex;
@@ -1,19 +1,11 @@
1
1
  .cob-Button__default {
2
- @include semantic-color(
3
- buttonBackground,
4
- secondaryInteractive,
5
- background-color
6
- );
7
- @include semantic-color(stroke, baseInteractive, border-color);
8
- @include semantic-color(buttonLabel, secondaryInteractive, color);
2
+ @include semantic-color(buttonBackground, secondary, background-color);
3
+ @include semantic-color(stroke, strong, border-color);
4
+ @include semantic-color(buttonLabel, secondary, color);
9
5
 
10
6
  &--primary {
11
- @include semantic-color(
12
- buttonBackground,
13
- primaryInteractive,
14
- background-color
15
- );
16
- @include semantic-color(buttonLabel, primaryInteractive, color);
7
+ @include semantic-color(buttonBackground, primary, background-color);
8
+ @include semantic-color(buttonLabel, primary, color);
17
9
 
18
10
  border-color: transparent;
19
11
 
@@ -24,12 +16,8 @@
24
16
  }
25
17
 
26
18
  &.cob-Button__default--destructive {
27
- @include semantic-color(
28
- buttonBackground,
29
- destructiveInteractive,
30
- background-color
31
- );
32
- @include semantic-color(buttonLabel, destructiveInteractive, color);
19
+ @include semantic-color(buttonBackground, destructive, background-color);
20
+ @include semantic-color(buttonLabel, destructive, color);
33
21
 
34
22
  border-color: transparent;
35
23
  }
@@ -1,10 +1,6 @@
1
1
  .cob-Button__ghost {
2
- @include semantic-color(buttonLabel, tertiaryInteractive, color);
3
- @include semantic-color(
4
- buttonBackground,
5
- tertiaryInteractive,
6
- background-color
7
- );
2
+ @include semantic-color(buttonLabel, tertiary, color);
3
+ @include semantic-color(buttonBackground, tertiary, background-color);
8
4
  border-color: transparent;
9
5
 
10
6
  box-shadow: none;
@@ -32,11 +28,7 @@
32
28
  &[disabled],
33
29
  &[data-disabled]:not([data-disabled="false"]),
34
30
  &.cob-Button--disabled {
35
- @include semantic-color(
36
- buttonBackground,
37
- tertiaryInteractive,
38
- background-color
39
- );
31
+ @include semantic-color(buttonBackground, tertiary, background-color);
40
32
  border-color: transparent;
41
33
 
42
34
  &:hover,
@@ -24,6 +24,7 @@
24
24
  }
25
25
 
26
26
  .cob-Button {
27
+ @apply c-state-interactive c-transition;
27
28
  @include cob-button-sizing(
28
29
  $height: 40px,
29
30
  $line-height: 20px,
@@ -49,10 +50,6 @@
49
50
 
50
51
  cursor: pointer;
51
52
  user-select: none;
52
- transition-property: background-color, border, box-shadow, color, transform,
53
- fill;
54
- transition-duration: 0.15s;
55
- transition-timing-function: ease-out;
56
53
  appearance: none;
57
54
 
58
55
  &:hover {
@@ -97,6 +94,7 @@
97
94
  &[disabled],
98
95
  &[data-disabled]:not([data-disabled="false"]),
99
96
  &.cob-Button--disabled {
97
+ @apply c-state-none;
100
98
  @include semantic-color(buttonBackground, disabled, background-color);
101
99
  @include semantic-color(buttonLabel, disabled, color);
102
100
  @include semantic-color(stroke, subdued, border-color);
@@ -55,7 +55,7 @@
55
55
  cursor: pointer;
56
56
 
57
57
  .cobalt-Icon {
58
- transition: fill 0.2s;
58
+ @apply c-state-interactive c-transition-interactive;
59
59
  }
60
60
  }
61
61
  }
@@ -5,7 +5,7 @@ $chip-large-height: 50px;
5
5
 
6
6
  .cobalt- {
7
7
  &Chip {
8
- @apply c-border c-border-base c-bg-secondary;
8
+ @apply c-border c-border-base c-bg-secondary c-transition-colors;
9
9
 
10
10
  position: relative;
11
11
 
@@ -21,9 +21,8 @@ $chip-large-height: 50px;
21
21
  }
22
22
 
23
23
  &Chip--interactive {
24
- @apply c-border-baseInteractive;
25
-
26
24
  &:not([disabled]) {
25
+ @apply c-state-interactive;
27
26
  cursor: pointer;
28
27
  }
29
28
  }
@@ -108,7 +108,7 @@
108
108
  }
109
109
 
110
110
  .cobalt-TextField__Input[type][data-state="open"] {
111
- @apply c-border-accent c-border-2;
111
+ @apply c-border-accent;
112
112
  }
113
113
 
114
114
  .cobalt-TextField__Icon {
@@ -3,7 +3,6 @@
3
3
  .cobalt-CheckablePillField {
4
4
  $self: &;
5
5
  $height: 40px;
6
- $animation-duration: 100ms;
7
6
  $toggle-switch-focus-offset: math.div($height, 10);
8
7
 
9
8
  position: relative;
@@ -28,7 +27,7 @@
28
27
  }
29
28
 
30
29
  &__Label {
31
- @apply c-border-base c-border-2 c-text-base c-bg-secondary c-py-none c-px-md;
30
+ @apply c-border-base c-border-2 c-text-base c-bg-secondary c-py-none c-px-md c-state-interactive c-transition;
32
31
  position: relative;
33
32
 
34
33
  display: flex;
@@ -41,10 +40,7 @@
41
40
 
42
41
  border-radius: math.div($height, 2);
43
42
 
44
- transition: $animation-duration;
45
-
46
43
  &:hover {
47
- @apply c-border-accent;
48
44
  box-shadow: 0 4px 4px 0 rgba(#000, 0.16);
49
45
 
50
46
  transform: translateY(-1px);
@@ -71,7 +67,7 @@
71
67
  }
72
68
 
73
69
  &__Input:disabled + #{ $self }__Label {
74
- @apply c-border-base c-border-2 c-bg-disabled;
70
+ @apply c-border-base c-border-2 c-bg-disabled c-state-none;
75
71
 
76
72
  cursor: default;
77
73
  box-shadow: none;
@@ -87,9 +83,7 @@
87
83
  &--with-icon {
88
84
  .cobalt-Icon {
89
85
  @include semantic-color(icon, base, fill);
90
- @apply c-mr-xs;
91
-
92
- transition: fill $animation-duration ease-in-out;
86
+ @apply c-mr-xs c-transition-colors;
93
87
  }
94
88
 
95
89
  #{ $self }__Input:checked + #{ $self }__Label .cobalt-Icon {
@@ -21,15 +21,17 @@
21
21
  opacity: 0;
22
22
 
23
23
  & + #{ $self }__Checkmark {
24
- @apply c-border-accent c-border-2 c-mr-xs;
24
+ @apply c-border-accent c-border-2 c-mr-xs c-transition-colors;
25
25
  display: inline-block;
26
26
 
27
27
  flex: 0 0 auto;
28
28
 
29
29
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
30
30
  cursor: pointer;
31
+ }
31
32
 
32
- transition: border-color 150ms ease-in-out;
33
+ &:not([disabled]) + #{ $self }__Checkmark {
34
+ @apply c-state-interactive;
33
35
  }
34
36
 
35
37
  &[disabled] ~ .cobalt-CheckmarkField__Label {
@@ -53,7 +55,7 @@
53
55
  }
54
56
 
55
57
  & + #{ $self }__Checkmark::after {
56
- @apply c-border-accent c-bg-accentAlt c-rounded-full;
58
+ @apply c-border c-border-accent c-bg-accentAlt c-rounded-full;
57
59
 
58
60
  // Exception for radio inputs
59
61
  border-width: 5px;
@@ -75,13 +77,13 @@
75
77
  }
76
78
 
77
79
  &[disabled] + #{ $self }__Checkmark {
78
- @apply c-border-subdued;
80
+ @apply c-border c-border-subdued;
79
81
 
80
82
  box-shadow: none;
81
83
  }
82
84
 
83
85
  &[disabled]:checked ~ #{ $self }__Checkmark::after {
84
- @apply c-border-subdued c-bg-disabled;
86
+ @apply c-border c-border-subdued c-bg-disabled;
85
87
  }
86
88
  }
87
89
 
@@ -127,7 +129,7 @@
127
129
  }
128
130
 
129
131
  &[disabled] + #{ $self }__Checkmark {
130
- @apply c-border-subdued;
132
+ @apply c-border c-border-subdued;
131
133
 
132
134
  box-shadow: none;
133
135
  }
@@ -151,15 +153,15 @@
151
153
 
152
154
  &--error {
153
155
  #{ $self }__Input + #{ $self }__Checkmark {
154
- @apply c-border-error;
156
+ @apply c-border-2 c-border-error;
155
157
  }
156
158
 
157
159
  #{ $self }__Input[type="radio"]:checked + #{ $self }__Checkmark::after {
158
- @apply c-border-error c-bg-errorInteractive;
160
+ @apply c-border c-border-error c-bg-error;
159
161
  }
160
162
 
161
163
  #{ $self }__Input[type="checkbox"]:checked + #{ $self }__Checkmark {
162
- @apply c-bg-errorInteractive;
164
+ @apply c-bg-error;
163
165
  }
164
166
  }
165
167
  }
@@ -9,7 +9,7 @@
9
9
  --visual-radio-size: 18px;
10
10
 
11
11
  .cobalt-radio-with-details__inner {
12
- @apply c-border c-border-baseInteractive c-text-base c-bg-secondary;
12
+ @apply c-border c-border-base c-rounded-lg c-text-base c-bg-secondary c-state-interactive c-transition-colors;
13
13
  height: 100%;
14
14
  display: flex;
15
15
  flex-direction: row;
@@ -18,9 +18,6 @@
18
18
  padding: spacing(sm);
19
19
 
20
20
  cursor: pointer;
21
- @apply c-rounded-lg;
22
-
23
- transition: all 120ms ease-in-out;
24
21
 
25
22
  gap: spacing(xs);
26
23
  }
@@ -43,8 +40,6 @@
43
40
  font-size: 14px;
44
41
  font-weight: 600;
45
42
  line-height: 20px;
46
-
47
- transition: color 150ms ease-in-out;
48
43
  }
49
44
 
50
45
  .cobalt-radio-with-details__description {
@@ -52,8 +47,6 @@
52
47
  font-family: font-family(base);
53
48
  font-size: 14px;
54
49
  line-height: 20px;
55
-
56
- transition: color 150ms ease-in-out;
57
50
  }
58
51
 
59
52
  .cobalt-radio-with-details__input {
@@ -79,8 +72,6 @@
79
72
 
80
73
  @apply c-rounded-full;
81
74
  cursor: pointer;
82
-
83
- transition: border-color 150ms ease-in-out;
84
75
  }
85
76
 
86
77
  &:focus-visible + #{ $self }__inner {
@@ -91,17 +82,13 @@
91
82
  }
92
83
 
93
84
  &:checked + #{ $self }__inner {
94
- @apply c-border-accent c-text-accentAlt c-bg-accentAlt;
85
+ @apply c-border c-border-accent c-text-accentAlt c-bg-accentAlt c-state-interactive c-transition-interactive;
95
86
  }
96
87
 
97
88
  &:checked + #{ $self }__inner .cobalt-Icon {
98
89
  @include fill-color(accent);
99
90
  }
100
91
 
101
- &:checked + #{ $self }__inner .cobalt-contained-icon {
102
- @apply c-bg-accentAlt;
103
- }
104
-
105
92
  &:checked + #{ $self }__inner #{ $self }__visual-input {
106
93
  @include semantic-color(icon, accentAlt, border-color);
107
94
  }
@@ -112,7 +99,7 @@
112
99
  }
113
100
 
114
101
  & + #{ $self }__inner #{ $self }__visual-input::after {
115
- @apply c-border-accent c-bg-accentAlt;
102
+ @apply c-border c-border-accent c-bg-accentAlt;
116
103
  left: 2px;
117
104
  top: 2px;
118
105
 
@@ -137,6 +124,7 @@
137
124
  }
138
125
 
139
126
  &[disabled] + #{ $self }__inner {
127
+ @apply c-state-none;
140
128
  opacity: 0.7;
141
129
  cursor: not-allowed;
142
130
  }
@@ -11,17 +11,16 @@
11
11
  &__Input {
12
12
  @include form-input-base($self);
13
13
 
14
- @apply c-pr-lg;
14
+ @apply c-pr-lg c-cursor-pointer;
15
15
 
16
16
  line-height: 20px;
17
17
 
18
+ background-color: theme("semanticStateColor.interactive.DEFAULT");
18
19
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%2000000'><polygon points='0,0 100,0 50,50'/></svg>");
19
20
  background-size: 10px;
20
21
  background-position: calc(100% - 12px) 19px;
21
22
  background-repeat: no-repeat;
22
23
 
23
- -moz-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
24
- -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
25
24
  appearance: none;
26
25
 
27
26
  // select placeholder
@@ -30,8 +29,21 @@
30
29
  opacity: 0.7;
31
30
  }
32
31
 
33
- &[disabled] {
32
+ &:hover,
33
+ &:focus {
34
+ background-color: theme("semanticStateColor.interactive.hover");
35
+ }
36
+
37
+ &:active {
38
+ background-color: theme("semanticStateColor.interactive.press");
39
+ }
40
+
41
+ &[disabled],
42
+ &[disabled]:hover,
43
+ &[disabled]:focus,
44
+ &[disabled]:active {
34
45
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgba(0,0,0,0.2)'><polygon points='0,0 100,0 50,50'/></svg>");
46
+ background-color: theme("semanticStateColor.interactive.DEFAULT");
35
47
  }
36
48
  }
37
49
  }
@@ -36,10 +36,6 @@
36
36
  padding-left: 40px;
37
37
  }
38
38
 
39
- #{ $self }__Input:focus {
40
- padding-left: 39px;
41
- }
42
-
43
39
  #{ $self }__Input + #{ $self }__Icon {
44
40
  @include semantic-color(icon, accent, fill);
45
41
  pointer-events: none;
@@ -1,5 +1,5 @@
1
1
  @mixin form-input-base($container) {
2
- @apply c-text-base c-border c-border-strongInteractive c-bg-secondary;
2
+ @apply c-text-base c-border c-border-strong c-bg-secondary c-state-interactive c-transition-colors;
3
3
  @include withContext(#{$container}--success) {
4
4
  @apply c-border-success;
5
5
 
@@ -31,18 +31,15 @@
31
31
 
32
32
  border-radius: 4px;
33
33
 
34
- transition: border-color 150ms ease-in-out;
35
-
36
34
  &:not(:disabled):not(:read-only):hover {
37
35
  @apply c-text-base;
38
-
39
- box-shadow: elevation(base);
40
36
  }
41
37
 
42
38
  &:not(:disabled):not(:read-only):focus {
43
- @apply c-border-accent c-border-2;
39
+ @apply c-border-accent;
44
40
 
45
41
  outline: none;
42
+ box-shadow: inset 0 0 0 1px theme("semanticBorderColor.accent");
46
43
  }
47
44
 
48
45
  &:not(select):read-only:focus {
@@ -22,7 +22,7 @@
22
22
  @apply c-inline-flex c-items-center;
23
23
 
24
24
  a {
25
- @apply c-inline-flex c-gap-2xs c-no-underline c-text-body-md c-text-accentInteractive c-font-bold c-cursor-pointer hover:c-underline;
25
+ @apply c-inline-flex c-gap-2xs c-no-underline c-text-body-md c-text-accent c-font-bold c-cursor-pointer hover:c-underline;
26
26
  }
27
27
  }
28
28
 
@@ -59,8 +59,8 @@ div.cobalt-layout-stack {
59
59
  @apply [text-decoration:inherit] [font-weight:inherit];
60
60
  }
61
61
 
62
- a.cobalt-layout-stack__item[href]:hover {
63
- @apply c-bg-neutralAlt;
62
+ a.cobalt-layout-stack__item[href] {
63
+ @apply c-state-interactive c-transition-interactive;
64
64
  }
65
65
 
66
66
  a.cobalt-layout-stack__item[href]:first-child {
@@ -79,7 +79,7 @@
79
79
  }
80
80
 
81
81
  &Tab {
82
- @apply c-text-section-heading c-bg-secondaryInteractive;
82
+ @apply c-text-section-heading c-bg-secondary c-state-interactive c-transition-interactive;
83
83
 
84
84
  position: relative;
85
85
  z-index: theme("zIndex.above");
@@ -100,10 +100,8 @@
100
100
  line-height: 1;
101
101
 
102
102
  outline: none;
103
- background: none;
104
103
  cursor: pointer;
105
104
 
106
- transition: 0.2s color;
107
105
  appearance: none;
108
106
 
109
107
  &:after {
@@ -14,7 +14,7 @@
14
14
  }
15
15
 
16
16
  .cobalt-tabs__label {
17
- @apply c-text-section-heading c-bg-secondaryInteractive c-p-md;
17
+ @apply c-text-section-heading c-p-md c-bg-secondary c-state-interactive c-transition-interactive;
18
18
  position: relative;
19
19
 
20
20
  display: flex;
@@ -30,11 +30,8 @@
30
30
  line-height: 1;
31
31
 
32
32
  outline: none;
33
- background: none;
34
33
  cursor: pointer;
35
34
 
36
- transition: 0.2s color;
37
-
38
35
  &[data-selected] {
39
36
  @apply c-text-base;
40
37
  }
@@ -11,7 +11,6 @@
11
11
  @import "./components/Helper/index";
12
12
  @import "./components/Modal/index";
13
13
  @import "./components/Flag/index";
14
- @import "./components/Flash/index";
15
14
  @import "./components/Icon/index";
16
15
  @import "./components/Layout/Components/index";
17
16
  @import "./components/Layout/Surfaces/index";
@@ -111,10 +111,14 @@
111
111
  }
112
112
 
113
113
  @mixin c-text-link {
114
- @include text-color(baseInteractive);
114
+ @apply c-text-base;
115
115
  text-decoration: underline;
116
116
  font-weight: 500;
117
117
  text-underline-offset: 2px;
118
+
119
+ &:hover {
120
+ text-decoration: none;
121
+ }
118
122
  }
119
123
 
120
124
  // Default link styles
@@ -10,7 +10,6 @@ export { Callout } from "./components/Callout";
10
10
  export { default as Cell, Cells } from "./components/Cell";
11
11
  export { EmptyState } from "./components/EmptyState";
12
12
  export { Flag } from "./components/Flag";
13
- export { Flash } from "./components/Flash";
14
13
  export { default as Helper } from "./components/Helper";
15
14
  export { CalendarRangePicker } from "./components/Calendar/CalendarRangePicker";
16
15
  export { CalendarDayPicker } from "./components/Calendar/CalendarDayPicker";
package/utilities.css CHANGED
@@ -61,4 +61,10 @@
61
61
  transform: translateY(100%);
62
62
  }
63
63
  }
64
+
65
+ @property --c-state-interactive-color {
66
+ syntax: "<color>";
67
+ inherits: false;
68
+ initial-value: transparent;
69
+ }
64
70
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getCobaltTailwindcssConfig.js","sources":["../../utils/getCobaltTailwindcssConfig.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireGetCobaltTailwindcssConfig } from \"/Users/thibaudesnouf/sources/cobalt/utils/getCobaltTailwindcssConfig.js\";\nvar getCobaltTailwindcssConfigExports = requireGetCobaltTailwindcssConfig();\nexport { getCobaltTailwindcssConfigExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(getCobaltTailwindcssConfigExports);"],"names":[],"mappings":";;;AAEA,IAAI,iCAAiC,GAAG,iCAAiC,EAAE,CAAC;AAE5E,iCAAe,aAAa,uBAAuB,CAAC,iCAAiC,CAAC;;;;"}
1
+ {"version":3,"file":"getCobaltTailwindcssConfig.js","sources":["../../utils/getCobaltTailwindcssConfig.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireGetCobaltTailwindcssConfig } from \"/Users/cedric/Dev/drivy/cobalt/utils/getCobaltTailwindcssConfig.js\";\nvar getCobaltTailwindcssConfigExports = requireGetCobaltTailwindcssConfig();\nexport { getCobaltTailwindcssConfigExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(getCobaltTailwindcssConfigExports);"],"names":[],"mappings":";;;AAEA,IAAI,iCAAiC,GAAG,iCAAiC,EAAE,CAAC;AAE5E,iCAAe,aAAa,uBAAuB,CAAC,iCAAiC,CAAC;;;;"}
@@ -1,6 +1,7 @@
1
- import require$$0 from '../src/tokens/breakpoints.js';
2
- import require$$1 from '../src/tokens/colors.js';
3
- import require$$2 from '../src/tokens/zIndexes.js';
1
+ import require$$0 from 'tailwindcss/defaultTheme';
2
+ import require$$1 from '../src/tokens/breakpoints.js';
3
+ import require$$2 from '../src/tokens/colors.js';
4
+ import require$$3 from '../src/tokens/zIndexes.js';
4
5
  import { __require as requireHelpers } from './helpers.js';
5
6
  import { __require as requireTailwindcssGenerators } from './tailwindcssGenerators.js';
6
7
 
@@ -23,12 +24,15 @@ var hasRequiredGetCobaltTailwindcssConfig;
23
24
  function requireGetCobaltTailwindcssConfig () {
24
25
  if (hasRequiredGetCobaltTailwindcssConfig) return getCobaltTailwindcssConfig_1;
25
26
  hasRequiredGetCobaltTailwindcssConfig = 1;
26
- const breakpoints = require$$0;
27
- const legacyColors = require$$1;
28
- const zIndexes = require$$2;
27
+ const defaultTheme = require$$0;
28
+ const breakpoints = require$$1;
29
+ const legacyColors = require$$2;
30
+ const zIndexes = require$$3;
29
31
  const { getColorsUsingCSSVariables } = requireHelpers();
30
32
  const generators = requireTailwindcssGenerators();
31
33
 
34
+ const CSS_VAR_STATE_INTERACTIVE_COLOR = "--c-state-interactive-color";
35
+
32
36
  const rem = (value) => `${value}rem`;
33
37
 
34
38
  const REM = {
@@ -89,10 +93,30 @@ function requireGetCobaltTailwindcssConfig () {
89
93
  fill: false,
90
94
  },
91
95
  theme: {
96
+ extend: {
97
+ transitionProperty: {
98
+ interactive: `${CSS_VAR_STATE_INTERACTIVE_COLOR}`,
99
+ DEFAULT: `${CSS_VAR_STATE_INTERACTIVE_COLOR}, ${defaultTheme.transitionProperty.DEFAULT}`,
100
+ colors: `${CSS_VAR_STATE_INTERACTIVE_COLOR}, ${defaultTheme.transitionProperty.colors}`,
101
+ },
102
+ },
92
103
  colors: {
93
104
  ...legacyColors, // deprecated
94
105
  current: "currentColor",
95
106
  },
107
+ semanticStateColor: {
108
+ interactive: {
109
+ DEFAULT: "#00000000",
110
+ hover: "#00000005",
111
+ press: "#0000000F",
112
+ },
113
+ onDrag: "#00000029",
114
+ none: {
115
+ DEFAULT: "transparent",
116
+ hover: "transparent",
117
+ press: "transparent",
118
+ },
119
+ },
96
120
  semanticBorderColor: borderColors,
97
121
  semanticBackgroundColor: {
98
122
  ...bgColors,
@@ -293,6 +317,16 @@ function requireGetCobaltTailwindcssConfig () {
293
317
  classPrefix: "bg",
294
318
  cssProperty: "background-color",
295
319
  }),
320
+ generators.getSemanticColorGenerator({
321
+ type: "semanticStateColor",
322
+ classPrefix: "state",
323
+ cssProperty: CSS_VAR_STATE_INTERACTIVE_COLOR,
324
+ additionalRules: {
325
+ interactive: {
326
+ "background-image": `linear-gradient(var(${CSS_VAR_STATE_INTERACTIVE_COLOR}), var(${CSS_VAR_STATE_INTERACTIVE_COLOR}))`,
327
+ },
328
+ },
329
+ }),
296
330
  generators.getSemanticColorGenerator({
297
331
  type: "semanticFillColor",
298
332
  classPrefix: "accent",
@@ -1 +1 @@
1
- {"version":3,"file":"getCobaltTailwindcssConfig2.js","sources":["../../utils/getCobaltTailwindcssConfig.js"],"sourcesContent":["/*\n FOR NODE ENVIRONMENT ONLY\n Do never import tailwind file config (or helpers importing it) into Cobalt\n components/stories on src/ side, it will result to have tailwindcss unecessary\n dependencies into build files.\n See https://github.com/tailwindcss/tailwindcss/issues/634#issuecomment-459740859\n If you need data from the theme configuration, you can do the same as we did\n for colors:\n - create a json token file with the data needed (will be the single source of data)\n - In the tailwindcss config file: import and use this json file\n - In the src/ side: import and use this json file also\n*/\nconst breakpoints = require(\"../src/tokens/breakpoints.json\")\nconst legacyColors = require(\"../src/tokens/colors.json\")\nconst zIndexes = require(\"../src/tokens/zIndexes.json\")\nconst { getColorsUsingCSSVariables } = require(\"./helpers\")\nconst generators = require(\"./tailwindcssGenerators\")\n\nconst rem = (value) => `${value}rem`\n\nconst REM = {\n _12px: 0.75,\n _14px: 0.875,\n _15px: 0.9375,\n _16px: 1,\n _18px: 1.125,\n _20px: 1.25,\n _24px: 1.5,\n _28px: 1.75,\n _32px: 2,\n _36px: 2.25,\n _40px: 2.5,\n _44px: 2.75,\n _56px: 3.5,\n _60px: 3.75,\n _64px: 4,\n}\n\nconst {\n stroke: borderColors,\n background: bgColors,\n fill: fillColors,\n text: textColors,\n} = getColorsUsingCSSVariables({\n additionalColors: { transparent: \"transparent\" },\n})\n\nconst baseFont =\n \"BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif\"\n\nconst getCobaltTailwindcssConfig = ({ content, safelist = undefined }) => ({\n content,\n safelist: safelist,\n prefix: \"c-\",\n // utilities to disable\n corePlugins: {\n // Don't use Tailwindcss reset and default styles\n preflight: false,\n // Handle by custom classes via generators\n letterSpacing: false,\n lineHeight: false,\n borderStyle: false,\n borderWidth: false,\n fontSize: false,\n // Not needed, at least for now\n textOpacity: false,\n backgroundOpacity: false,\n caretColor: false,\n boxShadowColor: false,\n ringOffsetColor: false,\n gradientColorStops: false,\n gradientColorStopPositions: false,\n textDecorationColor: false,\n // SVG color\n stroke: false,\n fill: false,\n },\n theme: {\n colors: {\n ...legacyColors, // deprecated\n current: \"currentColor\",\n },\n semanticBorderColor: borderColors,\n semanticBackgroundColor: {\n ...bgColors,\n ...{ fill: fillColors },\n },\n semanticFillColor: fillColors,\n borderStyle: {\n solid: \"solid\",\n dashed: \"dashed\",\n none: \"none\",\n },\n borderWidth: {\n 0: \"0\",\n \"0_5\": \"0.5px\",\n DEFAULT: \"1px\",\n 2: \"0.125rem\",\n 4: \".25rem\",\n },\n borderRadius: {\n none: \"0\",\n DEFAULT: \".25rem\", // c-rounded\n md: \".375rem\",\n lg: \".5rem\",\n xl: \".75rem\",\n \"2xl\": \"1rem\",\n full: \"9999px\", // full rounded\n },\n boxShadow: {\n DEFAULT: \"0 0.125rem 0.75rem rgba(0, 0, 0, 0.1)\", // c-shadow\n md: \"0 0.25rem 1.5rem rgba(0, 0, 0, 0.15)\",\n lg: \"0 0.375rem 2.25rem rgba(0, 0, 0, 0.2)\",\n },\n semanticTextColor: textColors,\n fontFamily: {\n base: baseFont,\n brand: `BrownPro,${baseFont}`,\n mono: \"Consolas,'Liberation Mono',Menlo,Courier,monospace\",\n },\n fontWeight: {\n regular: \"400\",\n bold: \"600\",\n },\n spacing: {\n none: \"0\",\n \"2xs\": \".25rem\",\n xs: \".5rem\",\n sm: \"1rem\",\n md: \"1.5rem\",\n lg: \"2rem\",\n xl: \"3rem\",\n \"2xl\": \"4rem\",\n },\n screens: { ...breakpoints },\n zIndex: Object.fromEntries(\n Object.entries(zIndexes).map(([key, value]) => [key, value.toString()])\n ),\n // custom properties, not processed by Tailwindcss itself\n customText: ({ theme }) => ({\n heading: {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._36px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: \"-0.5px\",\n from: {\n sm: {\n fontSize: rem(REM._56px),\n },\n },\n },\n subheading: {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._20px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: \"-0.5px\",\n from: {\n sm: {\n fontSize: rem(REM._28px),\n },\n },\n },\n \"title-xl\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._32px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._32px),\n from: {\n sm: {\n fontSize: rem(REM._40px),\n letterSpacing: rem((-2 / 100) * REM._40px),\n },\n },\n },\n \"title-lg\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._24px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._24px),\n from: {\n sm: {\n fontSize: rem(REM._32px),\n letterSpacing: rem((-2 / 100) * REM._32px),\n },\n },\n },\n \"title-md\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._20px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._20px),\n from: {\n sm: {\n fontSize: rem(REM._24px),\n letterSpacing: rem((-2 / 100) * REM._24px),\n },\n },\n },\n \"title-sm\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._16px),\n lineHeight: \"125%\",\n fontWeight: 600,\n letterSpacing: rem((-2 / 100) * REM._16px),\n from: {\n sm: {\n fontSize: rem(REM._20px),\n letterSpacing: rem((-2 / 100) * REM._20px),\n },\n },\n },\n \"title-xs\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._16px),\n lineHeight: \"125%\",\n fontWeight: 600,\n letterSpacing: rem((-2 / 100) * REM._16px),\n },\n //\n \"body-lg\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._18px),\n lineHeight: rem(REM._24px),\n },\n \"body-md\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._16px),\n lineHeight: rem(REM._24px),\n },\n \"body-sm\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._12px),\n lineHeight: rem(REM._16px),\n },\n \"section-heading\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._14px),\n lineHeight: \"175%\",\n fontWeight: 700,\n textTransform: \"uppercase\",\n letterSpacing: \"-0.2px\",\n color: theme(\"semanticTextColor\").subdued,\n },\n }),\n },\n plugins: [\n // custom typography classes\n generators.text,\n // custom border width classes (width default solid style)\n generators.borderWidth,\n // custom border style classes, must be after border width plugin\n generators.borderStyle,\n // Semantic colors (handling hover/press color states)\n generators.getSemanticColorGenerator({\n type: \"semanticTextColor\",\n classPrefix: \"text\",\n cssProperty: \"color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticTextColor\",\n classPrefix: \"placeholder\",\n selectorSuffix: \"::placeholder\",\n cssProperty: \"color\",\n enableInteractiveColors: false,\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticTextColor\",\n classPrefix: \"placeholder\",\n selectorSuffix: \"::-moz-placeholder\",\n cssProperty: \"color\",\n enableInteractiveColors: false,\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBackgroundColor\",\n classPrefix: \"bg\",\n cssProperty: \"background-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticFillColor\",\n classPrefix: \"accent\",\n cssProperty: \"accent-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border\",\n cssProperty: \"border-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-t\",\n cssProperty: \"border-top-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-b\",\n cssProperty: \"border-bottom-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-l\",\n cssProperty: \"border-left-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-r\",\n cssProperty: \"border-right-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-e\",\n cssProperty: \"border-inline-end-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-s\",\n cssProperty: \"border-inline-start-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-y\",\n cssProperty: \"border-top\",\n cssProperty2: \"border-bottom\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-x\",\n cssProperty: \"border-left\",\n cssProperty2: \"border-right\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"divide\",\n cssProperty: \"border-color\",\n selectorSuffix: \" > :not([hidden]) ~ :not([hidden])\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"outline\",\n cssProperty: \"outline-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"ring\",\n cssProperty: \"--tw-ring-color\",\n }),\n ],\n})\n\nmodule.exports = getCobaltTailwindcssConfig\n"],"names":["require$$3","require$$4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYA,CAAA,MAAM,WAAW,GAAG,WAAA;AACpB,CAAA,MAAM,YAAY,GAAG,WAAA;AACrB,CAAA,MAAM,QAAQ,GAAG,WAAA;CACjB,MAAM,EAAE,0BAA0B,EAAE,GAAGA,cAAA,GAAA;AACvC,CAAA,MAAM,UAAU,GAAGC,4BAAA,GAAA;;CAEnB,MAAM,GAAG,GAAG,CAAC,KAAK,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG,EAAA;;AAEnC,CAAA,MAAM,GAAG,GAAG;GACV,K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B,WAAW,EAAE,UAAU;OACvB,WAAW,EAAE,YAAY;OACzB,YAAY,EAAE,eAAe;AACnC,MAAK,CAAC;KACF,UAAU,CAAC,yBAAyB,CAAC;OACnC,IAAI,EAAE,qBAAqB;OAC3B,WAAW,EAAE,UAAU;OACvB,WAAW,EAAE,aAAa;OAC1B,YAAY,EAAE,cAAc;AAClC,MAAK,CAAC;KACF,UAAU,CAAC,yBAAyB,CAAC;OACnC,IAAI,EAAE,qBAAqB;OAC3B,WAAW,EAAE,QAAQ;OACrB,WAAW,EAAE,cAAc;OAC3B,cAAc,EAAE,oCAAoC;AAC1D,MAAK,CAAC;KACF,UAAU,CAAC,yBAAyB,CAAC;OACnC,IAAI,EAAE,qBAAqB;OAC3B,WAAW,EAAE,SAAS;OACtB,WAAW,EAAE,eAAe;AAClC,MAAK,CAAC;KACF,UAAU,CAAC,yBAAyB,CAAC;OACnC,IAAI,EAAE,qBAAqB;OAC3B,WAAW,EAAE,MAAM;OACnB,WAAW,EAAE,iBAAiB;AACpC,MAAK,CAAC;IACH;EACF,EAAA;;AAED,CAAA,4BAAc,GAAG,2BAAA;;;;;;"}
1
+ {"version":3,"file":"getCobaltTailwindcssConfig2.js","sources":["../../utils/getCobaltTailwindcssConfig.js"],"sourcesContent":["/*\n FOR NODE ENVIRONMENT ONLY\n Do never import tailwind file config (or helpers importing it) into Cobalt\n components/stories on src/ side, it will result to have tailwindcss unecessary\n dependencies into build files.\n See https://github.com/tailwindcss/tailwindcss/issues/634#issuecomment-459740859\n If you need data from the theme configuration, you can do the same as we did\n for colors:\n - create a json token file with the data needed (will be the single source of data)\n - In the tailwindcss config file: import and use this json file\n - In the src/ side: import and use this json file also\n*/\nconst defaultTheme = require(\"tailwindcss/defaultTheme\")\nconst breakpoints = require(\"../src/tokens/breakpoints.json\")\nconst legacyColors = require(\"../src/tokens/colors.json\")\nconst zIndexes = require(\"../src/tokens/zIndexes.json\")\nconst { getColorsUsingCSSVariables } = require(\"./helpers\")\nconst generators = require(\"./tailwindcssGenerators\")\n\nconst CSS_VAR_STATE_INTERACTIVE_COLOR = \"--c-state-interactive-color\"\n\nconst rem = (value) => `${value}rem`\n\nconst REM = {\n _12px: 0.75,\n _14px: 0.875,\n _15px: 0.9375,\n _16px: 1,\n _18px: 1.125,\n _20px: 1.25,\n _24px: 1.5,\n _28px: 1.75,\n _32px: 2,\n _36px: 2.25,\n _40px: 2.5,\n _44px: 2.75,\n _56px: 3.5,\n _60px: 3.75,\n _64px: 4,\n}\n\nconst {\n stroke: borderColors,\n background: bgColors,\n fill: fillColors,\n text: textColors,\n} = getColorsUsingCSSVariables({\n additionalColors: { transparent: \"transparent\" },\n})\n\nconst baseFont =\n \"BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif\"\n\nconst getCobaltTailwindcssConfig = ({ content, safelist = undefined }) => ({\n content,\n safelist: safelist,\n prefix: \"c-\",\n // utilities to disable\n corePlugins: {\n // Don't use Tailwindcss reset and default styles\n preflight: false,\n // Handle by custom classes via generators\n letterSpacing: false,\n lineHeight: false,\n borderStyle: false,\n borderWidth: false,\n fontSize: false,\n // Not needed, at least for now\n textOpacity: false,\n backgroundOpacity: false,\n caretColor: false,\n boxShadowColor: false,\n ringOffsetColor: false,\n gradientColorStops: false,\n gradientColorStopPositions: false,\n textDecorationColor: false,\n // SVG color\n stroke: false,\n fill: false,\n },\n theme: {\n extend: {\n transitionProperty: {\n interactive: `${CSS_VAR_STATE_INTERACTIVE_COLOR}`,\n DEFAULT: `${CSS_VAR_STATE_INTERACTIVE_COLOR}, ${defaultTheme.transitionProperty.DEFAULT}`,\n colors: `${CSS_VAR_STATE_INTERACTIVE_COLOR}, ${defaultTheme.transitionProperty.colors}`,\n },\n },\n colors: {\n ...legacyColors, // deprecated\n current: \"currentColor\",\n },\n semanticStateColor: {\n interactive: {\n DEFAULT: \"#00000000\",\n hover: \"#00000005\",\n press: \"#0000000F\",\n },\n onDrag: \"#00000029\",\n none: {\n DEFAULT: \"transparent\",\n hover: \"transparent\",\n press: \"transparent\",\n },\n },\n semanticBorderColor: borderColors,\n semanticBackgroundColor: {\n ...bgColors,\n ...{ fill: fillColors },\n },\n semanticFillColor: fillColors,\n borderStyle: {\n solid: \"solid\",\n dashed: \"dashed\",\n none: \"none\",\n },\n borderWidth: {\n 0: \"0\",\n \"0_5\": \"0.5px\",\n DEFAULT: \"1px\",\n 2: \"0.125rem\",\n 4: \".25rem\",\n },\n borderRadius: {\n none: \"0\",\n DEFAULT: \".25rem\", // c-rounded\n md: \".375rem\",\n lg: \".5rem\",\n xl: \".75rem\",\n \"2xl\": \"1rem\",\n full: \"9999px\", // full rounded\n },\n boxShadow: {\n DEFAULT: \"0 0.125rem 0.75rem rgba(0, 0, 0, 0.1)\", // c-shadow\n md: \"0 0.25rem 1.5rem rgba(0, 0, 0, 0.15)\",\n lg: \"0 0.375rem 2.25rem rgba(0, 0, 0, 0.2)\",\n },\n semanticTextColor: textColors,\n fontFamily: {\n base: baseFont,\n brand: `BrownPro,${baseFont}`,\n mono: \"Consolas,'Liberation Mono',Menlo,Courier,monospace\",\n },\n fontWeight: {\n regular: \"400\",\n bold: \"600\",\n },\n spacing: {\n none: \"0\",\n \"2xs\": \".25rem\",\n xs: \".5rem\",\n sm: \"1rem\",\n md: \"1.5rem\",\n lg: \"2rem\",\n xl: \"3rem\",\n \"2xl\": \"4rem\",\n },\n screens: { ...breakpoints },\n zIndex: Object.fromEntries(\n Object.entries(zIndexes).map(([key, value]) => [key, value.toString()])\n ),\n // custom properties, not processed by Tailwindcss itself\n customText: ({ theme }) => ({\n heading: {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._36px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: \"-0.5px\",\n from: {\n sm: {\n fontSize: rem(REM._56px),\n },\n },\n },\n subheading: {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._20px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: \"-0.5px\",\n from: {\n sm: {\n fontSize: rem(REM._28px),\n },\n },\n },\n \"title-xl\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._32px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._32px),\n from: {\n sm: {\n fontSize: rem(REM._40px),\n letterSpacing: rem((-2 / 100) * REM._40px),\n },\n },\n },\n \"title-lg\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._24px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._24px),\n from: {\n sm: {\n fontSize: rem(REM._32px),\n letterSpacing: rem((-2 / 100) * REM._32px),\n },\n },\n },\n \"title-md\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._20px),\n lineHeight: \"125%\",\n fontWeight: 700,\n letterSpacing: rem((-2 / 100) * REM._20px),\n from: {\n sm: {\n fontSize: rem(REM._24px),\n letterSpacing: rem((-2 / 100) * REM._24px),\n },\n },\n },\n \"title-sm\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._16px),\n lineHeight: \"125%\",\n fontWeight: 600,\n letterSpacing: rem((-2 / 100) * REM._16px),\n from: {\n sm: {\n fontSize: rem(REM._20px),\n letterSpacing: rem((-2 / 100) * REM._20px),\n },\n },\n },\n \"title-xs\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._16px),\n lineHeight: \"125%\",\n fontWeight: 600,\n letterSpacing: rem((-2 / 100) * REM._16px),\n },\n //\n \"body-lg\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._18px),\n lineHeight: rem(REM._24px),\n },\n \"body-md\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._16px),\n lineHeight: rem(REM._24px),\n },\n \"body-sm\": {\n fontFamily: theme(\"fontFamily\").base,\n fontSize: rem(REM._12px),\n lineHeight: rem(REM._16px),\n },\n \"section-heading\": {\n fontFamily: theme(\"fontFamily\").brand,\n fontSize: rem(REM._14px),\n lineHeight: \"175%\",\n fontWeight: 700,\n textTransform: \"uppercase\",\n letterSpacing: \"-0.2px\",\n color: theme(\"semanticTextColor\").subdued,\n },\n }),\n },\n plugins: [\n // custom typography classes\n generators.text,\n // custom border width classes (width default solid style)\n generators.borderWidth,\n // custom border style classes, must be after border width plugin\n generators.borderStyle,\n // Semantic colors (handling hover/press color states)\n generators.getSemanticColorGenerator({\n type: \"semanticTextColor\",\n classPrefix: \"text\",\n cssProperty: \"color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticTextColor\",\n classPrefix: \"placeholder\",\n selectorSuffix: \"::placeholder\",\n cssProperty: \"color\",\n enableInteractiveColors: false,\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticTextColor\",\n classPrefix: \"placeholder\",\n selectorSuffix: \"::-moz-placeholder\",\n cssProperty: \"color\",\n enableInteractiveColors: false,\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBackgroundColor\",\n classPrefix: \"bg\",\n cssProperty: \"background-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticStateColor\",\n classPrefix: \"state\",\n cssProperty: CSS_VAR_STATE_INTERACTIVE_COLOR,\n additionalRules: {\n interactive: {\n \"background-image\": `linear-gradient(var(${CSS_VAR_STATE_INTERACTIVE_COLOR}), var(${CSS_VAR_STATE_INTERACTIVE_COLOR}))`,\n },\n },\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticFillColor\",\n classPrefix: \"accent\",\n cssProperty: \"accent-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border\",\n cssProperty: \"border-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-t\",\n cssProperty: \"border-top-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-b\",\n cssProperty: \"border-bottom-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-l\",\n cssProperty: \"border-left-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-r\",\n cssProperty: \"border-right-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-e\",\n cssProperty: \"border-inline-end-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-s\",\n cssProperty: \"border-inline-start-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-y\",\n cssProperty: \"border-top\",\n cssProperty2: \"border-bottom\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"border-x\",\n cssProperty: \"border-left\",\n cssProperty2: \"border-right\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"divide\",\n cssProperty: \"border-color\",\n selectorSuffix: \" > :not([hidden]) ~ :not([hidden])\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"outline\",\n cssProperty: \"outline-color\",\n }),\n generators.getSemanticColorGenerator({\n type: \"semanticBorderColor\",\n classPrefix: \"ring\",\n cssProperty: \"--tw-ring-color\",\n }),\n ],\n})\n\nmodule.exports = getCobaltTailwindcssConfig\n"],"names":["require$$4","require$$5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,CAAA,MAAM,YAAY,GAAG,WAAA;AACrB,CAAA,MAAM,WAAW,GAAG,WAAA;AACpB,CAAA,MAAM,YAAY,GAAG,WAAA;AACrB,CAAA,MAAM,QAAQ,GAAG,WAAA;CACjB,MAAM,EAAE,0BAA0B,EAAE,GAAGA,cAAA,GAAA;AACvC,CAAA,MAAM,UAAU,GAAGC,4BAAA,GAAA;;AAEnB,CAAA,MAAM,+BAA+B,GAAG,8BAAA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C;KACF,UAAU,CAAC,yBAAyB,CAAC;OACnC,IAAI,EAAE,qBAAqB;OAC3B,WAAW,EAAE,QAAQ;OACrB,WAAW,EAAE,cAAc;OAC3B,cAAc,EAAE,oCAAoC;AAC1D,MAAK,CAAC;KACF,UAAU,CAAC,yBAAyB,CAAC;OACnC,IAAI,EAAE,qBAAqB;OAC3B,WAAW,EAAE,SAAS;OACtB,WAAW,EAAE,eAAe;AAClC,MAAK,CAAC;KACF,UAAU,CAAC,yBAAyB,CAAC;OACnC,IAAI,EAAE,qBAAqB;OAC3B,WAAW,EAAE,MAAM;OACnB,WAAW,EAAE,iBAAiB;AACpC,MAAK,CAAC;IACH;EACF,EAAA;;AAED,CAAA,4BAAc,GAAG,2BAAA;;;;;;"}
@@ -1,4 +1,4 @@
1
- import require$$0 from '../src/tokens/breakpoints.js';
1
+ import require$$1 from '../src/tokens/breakpoints.js';
2
2
  import { __require as requireHelpers } from './helpers.js';
3
3
 
4
4
  var tailwindcssGenerators;
@@ -7,7 +7,7 @@ var hasRequiredTailwindcssGenerators;
7
7
  function requireTailwindcssGenerators () {
8
8
  if (hasRequiredTailwindcssGenerators) return tailwindcssGenerators;
9
9
  hasRequiredTailwindcssGenerators = 1;
10
- const breakpoints = require$$0;
10
+ const breakpoints = require$$1;
11
11
  const { hasProp } = requireHelpers();
12
12
 
13
13
  const COLOR_STATES = {
@@ -104,6 +104,7 @@ function requireTailwindcssGenerators () {
104
104
  cssProperty,
105
105
  cssProperty2,
106
106
  enableInteractiveColors = true,
107
+ additionalRules = {},
107
108
  }) => {
108
109
  return ({ addUtilities, theme }) => {
109
110
  const themeProps = theme(type);
@@ -115,6 +116,7 @@ function requireTailwindcssGenerators () {
115
116
  acc[`.${classPrefix}-${propName}${selectorSuffix}`] = {
116
117
  [cssProperty]: colorProp,
117
118
  ...(cssProperty2 ? { [cssProperty2]: colorProp } : {}),
119
+ ...(additionalRules[propName] || {}),
118
120
  };
119
121
  } else {
120
122
  Object.keys(colorProp).map((colorState) => {
@@ -123,6 +125,7 @@ function requireTailwindcssGenerators () {
123
125
  acc[`.${classPrefix}-${propName}${selectorSuffix}`] = {
124
126
  [cssProperty]: subColorProp,
125
127
  ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),
128
+ ...(additionalRules[propName] || {}),
126
129
  };
127
130
  } else if (
128
131
  colorState === COLOR_STATES.HOVER &&
@@ -1 +1 @@
1
- {"version":3,"file":"tailwindcssGenerators.js","sources":["../../utils/tailwindcssGenerators.js"],"sourcesContent":["const breakpoints = require(\"../src/tokens/breakpoints.json\")\nconst { hasProp } = require(\"./helpers\")\n\nconst COLOR_STATES = {\n DEFAULT: \"DEFAULT\",\n HOVER: \"hover\",\n PRESS: \"press\",\n}\n\nconst textGenerator = ({ addUtilities, theme }) => {\n const textTheme = theme(\"customText\")\n const mediaQueries = {}\n const textUtilities = Object.keys(textTheme).reduce((acc, propName) => {\n const props = textTheme[propName]\n acc[`.text-${propName}`] = {\n fontFamily: props.fontFamily,\n fontSize: props.fontSize,\n lineHeight: props.lineHeight,\n }\n ;[\"fontWeight\", \"textTransform\", \"color\", \"letterSpacing\"].forEach(\n (cssPropName) => {\n if (props[cssPropName]) {\n acc[`.text-${propName}`][cssPropName] = props[cssPropName]\n }\n }\n )\n if (props.from) {\n Object.keys(props.from).forEach((breakpoint) => {\n const breakpointRule = `@media (min-width: ${breakpoints[breakpoint]})`\n if (!hasProp(mediaQueries, breakpointRule)) {\n mediaQueries[breakpointRule] = {}\n }\n mediaQueries[breakpointRule] = {\n ...mediaQueries[breakpointRule],\n [`.text-${propName}`]: props.from[breakpoint],\n }\n })\n }\n return acc\n }, {})\n // For CSS priority, we have to put media queries after all text utilities\n addUtilities(\n { ...textUtilities, ...mediaQueries },\n { variants: [\"responsive\"] }\n )\n}\n\nconst borderWidthGenerator = ({ addUtilities, theme }) => {\n const widthTheme = theme(\"borderWidth\")\n const widthUtilities = Object.keys(widthTheme).reduce((acc, propName) => {\n const modifier = propName === \"DEFAULT\" ? \"\" : `-${propName}`\n acc[`.border${modifier}`] = {\n borderWidth: widthTheme[propName],\n // add default solid style only if width is not 0\n ...(widthTheme[propName] === \"0\" ? {} : { borderStyle: \"solid\" }),\n }\n acc[`.border-t${modifier}`] = {\n borderTopWidth: widthTheme[propName],\n ...(widthTheme[propName] === \"0\" ? {} : { borderTopStyle: \"solid\" }),\n }\n acc[`.border-r${modifier}`] = {\n borderRightWidth: widthTheme[propName],\n ...(widthTheme[propName] === \"0\" ? {} : { borderRightStyle: \"solid\" }),\n }\n acc[`.border-b${modifier}`] = {\n borderBottomWidth: widthTheme[propName],\n ...(widthTheme[propName] === \"0\" ? {} : { borderBottomStyle: \"solid\" }),\n }\n acc[`.border-l${modifier}`] = {\n borderLeftWidth: widthTheme[propName],\n ...(widthTheme[propName] === \"0\" ? {} : { borderLeftStyle: \"solid\" }),\n }\n return acc\n }, {})\n addUtilities(widthUtilities)\n}\n\nconst borderStyleGenerator = ({ addUtilities, theme }) => {\n const styleTheme = theme(\"borderStyle\")\n const styleUtilities = Object.keys(styleTheme).reduce((acc, propName) => {\n acc[`.border-${propName}`] = { borderStyle: styleTheme[propName] }\n acc[`.border-t-${propName}`] = { borderTopStyle: styleTheme[propName] }\n acc[`.border-r-${propName}`] = { borderRightStyle: styleTheme[propName] }\n acc[`.border-b-${propName}`] = { borderBottomStyle: styleTheme[propName] }\n acc[`.border-l-${propName}`] = { borderLeftStyle: styleTheme[propName] }\n return acc\n }, {})\n addUtilities(styleUtilities)\n}\n\nconst getSemanticColorGenerator = ({\n type,\n classPrefix,\n selectorSuffix = \"\",\n cssProperty,\n cssProperty2,\n enableInteractiveColors = true,\n}) => {\n return ({ addUtilities, theme }) => {\n const themeProps = theme(type)\n if (!themeProps)\n throw new Error(`Didn't found theme properties for \"${type}\".`)\n const utilities = Object.keys(themeProps).reduce((acc, propName) => {\n const colorProp = themeProps[propName]\n if (typeof colorProp === \"string\") {\n acc[`.${classPrefix}-${propName}${selectorSuffix}`] = {\n [cssProperty]: colorProp,\n ...(cssProperty2 ? { [cssProperty2]: colorProp } : {}),\n }\n } else {\n Object.keys(colorProp).map((colorState) => {\n const subColorProp = colorProp[colorState]\n if (colorState === COLOR_STATES.DEFAULT) {\n acc[`.${classPrefix}-${propName}${selectorSuffix}`] = {\n [cssProperty]: subColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),\n }\n } else if (\n colorState === COLOR_STATES.HOVER &&\n enableInteractiveColors\n ) {\n acc[`.${classPrefix}-${propName}:hover${selectorSuffix}`] = {\n [cssProperty]: subColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),\n }\n acc[`.${classPrefix}-${propName}:focus${selectorSuffix}`] = {\n [cssProperty]: subColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),\n }\n } else if (\n colorState === COLOR_STATES.PRESS &&\n enableInteractiveColors\n ) {\n acc[`.${classPrefix}-${propName}:active${selectorSuffix}`] = {\n [cssProperty]: subColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),\n }\n } else if (typeof subColorProp === \"string\") {\n acc[`.${classPrefix}-${propName}-${colorState}`] = {\n [cssProperty]: subColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),\n }\n } else {\n Object.keys(colorProp).map((subColorState) => {\n const subSubColorProp = colorProp[colorState][subColorState]\n if (subColorState === COLOR_STATES.DEFAULT) {\n acc[`.${classPrefix}-${propName}${selectorSuffix}`] = {\n [cssProperty]: subSubColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subSubColorProp } : {}),\n }\n } else if (\n subColorState === COLOR_STATES.HOVER &&\n enableInteractiveColors\n ) {\n acc[`.${classPrefix}-${propName}:hover${selectorSuffix}`] = {\n [cssProperty]: subSubColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subSubColorProp } : {}),\n }\n acc[`.${classPrefix}-${propName}:focus${selectorSuffix}`] = {\n [cssProperty]: subSubColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subSubColorProp } : {}),\n }\n } else if (\n subColorState === COLOR_STATES.PRESS &&\n enableInteractiveColors\n ) {\n acc[`.${classPrefix}-${propName}:active${selectorSuffix}`] = {\n [cssProperty]: subSubColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subSubColorProp } : {}),\n }\n }\n })\n }\n })\n }\n return acc\n }, {})\n addUtilities(utilities)\n }\n}\n\nmodule.exports = {\n text: textGenerator,\n borderWidth: borderWidthGenerator,\n borderStyle: borderStyleGenerator,\n getSemanticColorGenerator,\n}\n"],"names":["require$$1"],"mappings":";;;;;;;;;AAAA,CAAA,MAAM,WAAW,GAAG,WAAA;CACpB,MAAM,EAAE,OAAO,EAAE,GAAGA,cAAA,GAAA;;AAEpB,CAAA,MAAM,YAAY,GAAG;GACnB,OAAO,EAAE,SAAS;GAClB,KAAK,EAAE,OAAO;GACd,KAAK,EAAE,OAAO;AAChB,GAAA;;CAEA,MAAM,aAAa,GAAG,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK;AACnD,GAAE,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,EAAA;GACpC,MAAM,YAAY,GAAG,GAAA;AACvB,GAAE,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,KAAK;AACzE,KAAI,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAA;KAChC,GAAG,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG;AAC/B,OAAM,UAAU,EAAE,KAAK,CAAC,UAAU;AAClC,OAAM,QAAQ,EAAE,KAAK,CAAC,QAAQ;AAC9B,OAAM,UAAU,EAAE,KAAK,CAAC,UAAU;AAClC,MAAA;MACK,CAAC,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,OAAO;OAChE,CAAC,WAAW,KAAK;AACvB,SAAQ,IAAI,KAAK,CAAC,WAAW,CAA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BAAA;cACa,EAAA;AACb,YAAA;UACS,EAAA;AACT,QAAA;AACA,OAAM,OAAO,GAAA;AACb,MAAK,EAAE,EAAE,EAAA;KACL,YAAY,CAAC,SAAS,EAAA;AAC1B,IAAA;AACA,GAAA;;AAEA,CAAA,qBAAc,GAAG;GACf,IAAI,EAAE,aAAa;GACnB,WAAW,EAAE,oBAAoB;GACjC,WAAW,EAAE,oBAAoB;AACnC,GAAE,yBAAyB;AAC3B,GAAA;;;;;;"}
1
+ {"version":3,"file":"tailwindcssGenerators.js","sources":["../../utils/tailwindcssGenerators.js"],"sourcesContent":["const breakpoints = require(\"../src/tokens/breakpoints.json\")\nconst { hasProp } = require(\"./helpers\")\n\nconst COLOR_STATES = {\n DEFAULT: \"DEFAULT\",\n HOVER: \"hover\",\n PRESS: \"press\",\n}\n\nconst textGenerator = ({ addUtilities, theme }) => {\n const textTheme = theme(\"customText\")\n const mediaQueries = {}\n const textUtilities = Object.keys(textTheme).reduce((acc, propName) => {\n const props = textTheme[propName]\n acc[`.text-${propName}`] = {\n fontFamily: props.fontFamily,\n fontSize: props.fontSize,\n lineHeight: props.lineHeight,\n }\n ;[\"fontWeight\", \"textTransform\", \"color\", \"letterSpacing\"].forEach(\n (cssPropName) => {\n if (props[cssPropName]) {\n acc[`.text-${propName}`][cssPropName] = props[cssPropName]\n }\n }\n )\n if (props.from) {\n Object.keys(props.from).forEach((breakpoint) => {\n const breakpointRule = `@media (min-width: ${breakpoints[breakpoint]})`\n if (!hasProp(mediaQueries, breakpointRule)) {\n mediaQueries[breakpointRule] = {}\n }\n mediaQueries[breakpointRule] = {\n ...mediaQueries[breakpointRule],\n [`.text-${propName}`]: props.from[breakpoint],\n }\n })\n }\n return acc\n }, {})\n // For CSS priority, we have to put media queries after all text utilities\n addUtilities(\n { ...textUtilities, ...mediaQueries },\n { variants: [\"responsive\"] }\n )\n}\n\nconst borderWidthGenerator = ({ addUtilities, theme }) => {\n const widthTheme = theme(\"borderWidth\")\n const widthUtilities = Object.keys(widthTheme).reduce((acc, propName) => {\n const modifier = propName === \"DEFAULT\" ? \"\" : `-${propName}`\n acc[`.border${modifier}`] = {\n borderWidth: widthTheme[propName],\n // add default solid style only if width is not 0\n ...(widthTheme[propName] === \"0\" ? {} : { borderStyle: \"solid\" }),\n }\n acc[`.border-t${modifier}`] = {\n borderTopWidth: widthTheme[propName],\n ...(widthTheme[propName] === \"0\" ? {} : { borderTopStyle: \"solid\" }),\n }\n acc[`.border-r${modifier}`] = {\n borderRightWidth: widthTheme[propName],\n ...(widthTheme[propName] === \"0\" ? {} : { borderRightStyle: \"solid\" }),\n }\n acc[`.border-b${modifier}`] = {\n borderBottomWidth: widthTheme[propName],\n ...(widthTheme[propName] === \"0\" ? {} : { borderBottomStyle: \"solid\" }),\n }\n acc[`.border-l${modifier}`] = {\n borderLeftWidth: widthTheme[propName],\n ...(widthTheme[propName] === \"0\" ? {} : { borderLeftStyle: \"solid\" }),\n }\n return acc\n }, {})\n addUtilities(widthUtilities)\n}\n\nconst borderStyleGenerator = ({ addUtilities, theme }) => {\n const styleTheme = theme(\"borderStyle\")\n const styleUtilities = Object.keys(styleTheme).reduce((acc, propName) => {\n acc[`.border-${propName}`] = { borderStyle: styleTheme[propName] }\n acc[`.border-t-${propName}`] = { borderTopStyle: styleTheme[propName] }\n acc[`.border-r-${propName}`] = { borderRightStyle: styleTheme[propName] }\n acc[`.border-b-${propName}`] = { borderBottomStyle: styleTheme[propName] }\n acc[`.border-l-${propName}`] = { borderLeftStyle: styleTheme[propName] }\n return acc\n }, {})\n addUtilities(styleUtilities)\n}\n\nconst getSemanticColorGenerator = ({\n type,\n classPrefix,\n selectorSuffix = \"\",\n cssProperty,\n cssProperty2,\n enableInteractiveColors = true,\n additionalRules = {},\n}) => {\n return ({ addUtilities, theme }) => {\n const themeProps = theme(type)\n if (!themeProps)\n throw new Error(`Didn't found theme properties for \"${type}\".`)\n const utilities = Object.keys(themeProps).reduce((acc, propName) => {\n const colorProp = themeProps[propName]\n if (typeof colorProp === \"string\") {\n acc[`.${classPrefix}-${propName}${selectorSuffix}`] = {\n [cssProperty]: colorProp,\n ...(cssProperty2 ? { [cssProperty2]: colorProp } : {}),\n ...(additionalRules[propName] || {}),\n }\n } else {\n Object.keys(colorProp).map((colorState) => {\n const subColorProp = colorProp[colorState]\n if (colorState === COLOR_STATES.DEFAULT) {\n acc[`.${classPrefix}-${propName}${selectorSuffix}`] = {\n [cssProperty]: subColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),\n ...(additionalRules[propName] || {}),\n }\n } else if (\n colorState === COLOR_STATES.HOVER &&\n enableInteractiveColors\n ) {\n acc[`.${classPrefix}-${propName}:hover${selectorSuffix}`] = {\n [cssProperty]: subColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),\n }\n acc[`.${classPrefix}-${propName}:focus${selectorSuffix}`] = {\n [cssProperty]: subColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),\n }\n } else if (\n colorState === COLOR_STATES.PRESS &&\n enableInteractiveColors\n ) {\n acc[`.${classPrefix}-${propName}:active${selectorSuffix}`] = {\n [cssProperty]: subColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),\n }\n } else if (typeof subColorProp === \"string\") {\n acc[`.${classPrefix}-${propName}-${colorState}`] = {\n [cssProperty]: subColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subColorProp } : {}),\n }\n } else {\n Object.keys(colorProp).map((subColorState) => {\n const subSubColorProp = colorProp[colorState][subColorState]\n if (subColorState === COLOR_STATES.DEFAULT) {\n acc[`.${classPrefix}-${propName}${selectorSuffix}`] = {\n [cssProperty]: subSubColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subSubColorProp } : {}),\n }\n } else if (\n subColorState === COLOR_STATES.HOVER &&\n enableInteractiveColors\n ) {\n acc[`.${classPrefix}-${propName}:hover${selectorSuffix}`] = {\n [cssProperty]: subSubColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subSubColorProp } : {}),\n }\n acc[`.${classPrefix}-${propName}:focus${selectorSuffix}`] = {\n [cssProperty]: subSubColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subSubColorProp } : {}),\n }\n } else if (\n subColorState === COLOR_STATES.PRESS &&\n enableInteractiveColors\n ) {\n acc[`.${classPrefix}-${propName}:active${selectorSuffix}`] = {\n [cssProperty]: subSubColorProp,\n ...(cssProperty2 ? { [cssProperty2]: subSubColorProp } : {}),\n }\n }\n })\n }\n })\n }\n return acc\n }, {})\n addUtilities(utilities)\n }\n}\n\nmodule.exports = {\n text: textGenerator,\n borderWidth: borderWidthGenerator,\n borderStyle: borderStyleGenerator,\n getSemanticColorGenerator,\n}\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;;;;AAAA,CAAA,MAAM,WAAW,GAAGA,WAAA;CACpB,MAAM,EAAE,OAAO,EAAE,GAAGC,cAAA,GAAA;;AAEpB,CAAA,MAAM,YAAY,GAAG;GACnB,OAAO,EAAE,SAAS;GAClB,KAAK,EAAE,OAAO;GACd,KAAK,EAAE,OAAO;AAChB,GAAA;;CAEA,MAAM,aAAa,GAAG,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK;AACnD,GAAE,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,EAAA;GACpC,MAAM,YAAY,GAAG,GAAA;AACvB,GAAE,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,KAAK;AACzE,KAAI,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAA;KAChC,GAAG,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG;AAC/B,OAAM,UAAU,EAAE,KAAK,CAAC,UAAU;AAClC,OAAM,QAAQ,EAAE,KAAK,CAAC,QAAQ;AAC9B,OAAM,UAAU,EAAE,KAAK,CAAC,UAAU;AAClC,MAAA;MACK,CAAC,YAAY,EAA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;iBACA;AAChB,iBAAgB,GAAG,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG;mBAC3D,CAAC,WAAW,GAAG,eAAe;mBAC9B,IAAI,YAAY,GAAG,EAAE,CAAC,YAAY,GAAG,eAAe,EAAE,GAAG,EAAE,CAAC;AAC9E,mBAAA;AACA,gBAAA;cACa,EAAA;AACb,YAAA;UACS,EAAA;AACT,QAAA;AACA,OAAM,OAAO,GAAA;AACb,MAAK,EAAE,EAAE,EAAA;KACL,YAAY,CAAC,SAAS,EAAA;AAC1B,IAAA;AACA,GAAA;;AAEA,CAAA,qBAAc,GAAG;GACf,IAAI,EAAE,aAAa;GACnB,WAAW,EAAE,oBAAoB;GACjC,WAAW,EAAE,oBAAoB;AACnC,GAAE,yBAAyB;AAC3B,GAAA;;;;;;"}
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { Icon } from '../Icon/index.js';
3
-
4
- const ICON_SIZE = 20;
5
- const STATUS_ICONS_MAP = {
6
- info: "infoFilled",
7
- success: "checkCircle",
8
- error: "contextualWarningCircleFilled",
9
- };
10
- const STATUS_ICON_COLOR_MAP = {
11
- info: "info",
12
- success: "success",
13
- error: "error",
14
- };
15
- const Flash = ({ children, status = "info" }) => {
16
- const icon = STATUS_ICONS_MAP[status]
17
- ? STATUS_ICONS_MAP[status]
18
- : "infoFilled";
19
- const iconColor = STATUS_ICON_COLOR_MAP[status]
20
- ? STATUS_ICON_COLOR_MAP[status]
21
- : "base";
22
- return (React.createElement("div", { className: `cobalt-Flash cobalt-Flash--${status}` },
23
- React.createElement("div", { className: "cobalt-Flash__wrapper" },
24
- React.createElement("span", { className: "cobalt-Flash__Icon" },
25
- React.createElement(Icon, { source: icon, size: ICON_SIZE, color: iconColor })),
26
- React.createElement("span", { className: "cobalt-Flash__content" }, children))));
27
- };
28
-
29
- export { Flash };
30
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Flash/index.tsx"],"sourcesContent":["import React from \"react\"\nimport { Icon, IconColorsType, IconSources } from \"../Icon\"\n\nexport type FlashStatus = \"info\" | \"success\" | \"error\"\n\nexport interface FlashProps {\n children: React.ReactNode\n status: FlashStatus\n}\n\nconst ICON_SIZE = 20\n\nconst STATUS_ICONS_MAP: { [k in FlashStatus]: IconSources } = {\n info: \"infoFilled\",\n success: \"checkCircle\",\n error: \"contextualWarningCircleFilled\",\n}\n\nconst STATUS_ICON_COLOR_MAP: { [k in FlashStatus]: IconColorsType } = {\n info: \"info\",\n success: \"success\",\n error: \"error\",\n}\n\nexport const Flash = ({ children, status = \"info\" }: FlashProps) => {\n const icon = STATUS_ICONS_MAP[status]\n ? STATUS_ICONS_MAP[status]\n : \"infoFilled\"\n\n const iconColor: IconColorsType = STATUS_ICON_COLOR_MAP[status]\n ? STATUS_ICON_COLOR_MAP[status]\n : \"base\"\n\n return (\n <div className={`cobalt-Flash cobalt-Flash--${status}`}>\n <div className=\"cobalt-Flash__wrapper\">\n <span className=\"cobalt-Flash__Icon\">\n <Icon source={icon} size={ICON_SIZE} color={iconColor} />\n </span>\n <span className=\"cobalt-Flash__content\">{children}</span>\n </div>\n </div>\n )\n}\n"],"names":[],"mappings":";;;AAUA,MAAM,SAAS,GAAG,EAAE,CAAA;AAEpB,MAAM,gBAAgB,GAAwC;AAC5D,IAAA,IAAI,EAAE,YAAY;AAClB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,KAAK,EAAE,+BAA+B;CACvC,CAAA;AAED,MAAM,qBAAqB,GAA2C;AACpE,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,OAAO;CACf,CAAA;AAEM,MAAM,KAAK,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAc,KAAI;AACjE,IAAA,MAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC;AACnC,UAAE,gBAAgB,CAAC,MAAM,CAAC;UACxB,YAAY,CAAA;AAEhB,IAAA,MAAM,SAAS,GAAmB,qBAAqB,CAAC,MAAM,CAAC;AAC7D,UAAE,qBAAqB,CAAC,MAAM,CAAC;UAC7B,MAAM,CAAA;AAEV,IAAA,QACE,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,CAAA,2BAAA,EAA8B,MAAM,CAAE,CAAA,EAAA;QACpD,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,uBAAuB,EAAA;YACpC,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAC,oBAAoB,EAAA;AAClC,gBAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAI,CACpD;YACP,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAC,uBAAuB,EAAA,EAAE,QAAQ,CAAQ,CACrD,CACF,EACP;AACH;;;;"}
@@ -1,35 +0,0 @@
1
- .cobalt- {
2
- &Flash {
3
- @apply c-text-body-md c-rounded-md c-shadow-lg;
4
-
5
- max-width: 800px;
6
-
7
- display: inline-block;
8
-
9
- padding: theme("spacing.sm") theme("spacing.md") theme("spacing.sm")
10
- theme("spacing.sm");
11
-
12
- &--info {
13
- @apply c-bg-info c-text-info;
14
- }
15
-
16
- &--success {
17
- @apply c-bg-successAlt c-text-successAlt;
18
- }
19
-
20
- &--error {
21
- @apply c-bg-errorAlt c-text-errorAlt;
22
- }
23
- }
24
-
25
- &Flash__wrapper {
26
- display: flex;
27
- justify-content: center;
28
- align-items: center;
29
- }
30
-
31
- &Flash__Icon {
32
- @apply c-mr-xs;
33
- min-width: 20px;
34
- }
35
- }
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- export type FlashStatus = "info" | "success" | "error";
3
- export interface FlashProps {
4
- children: React.ReactNode;
5
- status: FlashStatus;
6
- }
7
- export declare const Flash: ({ children, status }: FlashProps) => React.JSX.Element;