@drivy/cobalt 0.27.0 → 0.28.1

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.
@@ -33,6 +33,10 @@ const green = {
33
33
  const blue = "#2ea2ea";
34
34
  const deprecatedBlueGhost = "#2ea2ea0f";
35
35
  const deprecatedDriver = "#ffd988";
36
+ const deprecatedSeasonLow = "#BDFFAC";
37
+ const deprecatedSeasonMedium = "#94EA84";
38
+ const deprecatedSeasonHigh = "#73C865";
39
+ const deprecatedSeasonVeryHigh = "#54A949";
36
40
  var _colors = {
37
41
  white: white,
38
42
  grey: grey,
@@ -46,7 +50,11 @@ var _colors = {
46
50
  green: green,
47
51
  blue: blue,
48
52
  deprecatedBlueGhost: deprecatedBlueGhost,
49
- deprecatedDriver: deprecatedDriver
53
+ deprecatedDriver: deprecatedDriver,
54
+ deprecatedSeasonLow: deprecatedSeasonLow,
55
+ deprecatedSeasonMedium: deprecatedSeasonMedium,
56
+ deprecatedSeasonHigh: deprecatedSeasonHigh,
57
+ deprecatedSeasonVeryHigh: deprecatedSeasonVeryHigh
50
58
  };
51
59
 
52
60
  exports.amber = amber;
@@ -55,6 +63,10 @@ exports.coral = coral;
55
63
  exports["default"] = _colors;
56
64
  exports.deprecatedBlueGhost = deprecatedBlueGhost;
57
65
  exports.deprecatedDriver = deprecatedDriver;
66
+ exports.deprecatedSeasonHigh = deprecatedSeasonHigh;
67
+ exports.deprecatedSeasonLow = deprecatedSeasonLow;
68
+ exports.deprecatedSeasonMedium = deprecatedSeasonMedium;
69
+ exports.deprecatedSeasonVeryHigh = deprecatedSeasonVeryHigh;
58
70
  exports.graphite = graphite;
59
71
  exports.green = green;
60
72
  exports.grey = grey;
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"colors.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -80,6 +80,16 @@ const yellow = {
80
80
  "900": "#75592D",
81
81
  "1000": "#3B2E17"
82
82
  };
83
+ const season = {
84
+ "100": "#BDFFAC",
85
+ "200": "#94EA84",
86
+ "300": "#73C865",
87
+ "400": "#54A949",
88
+ "700": "#0B7011",
89
+ "800": "#005100",
90
+ "900": "#030",
91
+ "1000": "#001900"
92
+ };
83
93
  var _palette = {
84
94
  black: black,
85
95
  grey: grey,
@@ -92,7 +102,8 @@ var _palette = {
92
102
  red: red,
93
103
  turquoise: turquoise,
94
104
  white: white,
95
- yellow: yellow
105
+ yellow: yellow,
106
+ season: season
96
107
  };
97
108
 
98
109
  exports.black = black;
@@ -105,6 +116,7 @@ exports.purple = purple;
105
116
  exports.purpleDeep = purpleDeep;
106
117
  exports.purpleLight = purpleLight;
107
118
  exports.red = red;
119
+ exports.season = season;
108
120
  exports.turquoise = turquoise;
109
121
  exports.white = white;
110
122
  exports.yellow = yellow;
@@ -1 +1 @@
1
- {"version":3,"file":"palette.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"palette.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -38,7 +38,11 @@ const background = {
38
38
  owner: "indigo.dark/navy.700/navy.700",
39
39
  disabled: "grey.light/navy.100/black.50",
40
40
  neutral: "grey.light/navy.100/black.50",
41
- neutralAlt: "grey.lighter/navy.50/black.100"
41
+ neutralAlt: "grey.lighter/navy.50/black.100",
42
+ seasonLow: "deprecatedSeasonLow/season.100/season.700",
43
+ seasonMedium: "deprecatedSeasonMedium/season.200/season.800",
44
+ seasonHigh: "deprecatedSeasonHigh/season.300/season.900",
45
+ seasonVeryHigh: "deprecatedSeasonVeryHigh/season.400/season.1000"
42
46
  };
43
47
  const text = {
44
48
  base: "graphite/navy.700/grey.100",
@@ -62,15 +66,15 @@ const text = {
62
66
  hover: "white/purple.700/grey.100"
63
67
  },
64
68
  info: "graphite.light/yellow.900/yellow.300",
69
+ infoAlt: "turquoise/yellow.500/yellow.700",
65
70
  error: "red/red.500/red.400",
66
71
  errorAlt: "white/red.500/red.500",
67
72
  success: "green/green.700/green.700",
68
73
  successAlt: "white/green.900/green.100",
74
+ warning: "coral/orange.500/orange.300",
69
75
  connect: "turquoise/turquoise.500/turquoise.500",
70
76
  driver: "graphite/navy.700/navy.700",
71
77
  owner: "white/white/grey.100",
72
- warning: "coral/orange.500/orange.300",
73
- infoAlt: "turquoise/yellow.500/yellow.700",
74
78
  inversed: "white/white/white"
75
79
  };
76
80
  const buttonBackground = {
@@ -185,16 +189,16 @@ const icon = {
185
189
  hover: "white/purple.700/grey.100"
186
190
  },
187
191
  info: "graphite.light/yellow.900/yellow.300",
192
+ infoAlt: "turquoise/yellow.500/yellow.700",
188
193
  error: "red/red.500/red.400",
189
194
  errorAlt: "red/red.500/red.200",
190
195
  success: "green/green.700/green.700",
191
196
  successAlt: "white/green.900/green.100",
197
+ warning: "coral/orange.500/orange.300",
192
198
  connect: "turquoise/turquoise.500/white",
193
199
  connectAlt: "turquoise/turquoise.900/turquoise.50",
194
200
  driver: "graphite/navy.700//navy.700",
195
201
  owner: "white/white/white",
196
- warning: "coral/orange.500/orange.300",
197
- infoAlt: "turquoise/yellow.500/yellow.700",
198
202
  inversed: "white/white/white",
199
203
  disabled: "grey.lighter/navy.100/black.50"
200
204
  };
@@ -205,11 +209,11 @@ const stroke = {
205
209
  hover: "graphite.light/navy.300/purpleDeep.400",
206
210
  press: "graphite/navy.500/purpleDeep.400"
207
211
  },
208
- strong: "grey.dark/navy.200/grey.200",
212
+ strong: "grey.dark/navy.300/navy.200",
209
213
  strongInteractive: {
210
- DEFAULT: "grey.dark/navy.200/grey.200",
211
- hover: "graphite.light/navy.300/purpleDeep.400",
212
- press: "graphite/navy.500/purpleDeep.400"
214
+ DEFAULT: "grey.dark/navy.300/navy.200",
215
+ hover: "graphite.light/navy.500/purpleDeep.400",
216
+ press: "graphite/navy.700/purpleDeep.400"
213
217
  },
214
218
  subdued: "grey.light/navy.100/black.50",
215
219
  accent: "indigo/purple.500/purpleDeep.400",
@@ -231,10 +235,10 @@ const fill = {
231
235
  accent: "purple/purple.500/purpleDeep.400",
232
236
  accentAlt: "purple/purple.100/purpleDeep.900",
233
237
  error: "red/red.500/red.500",
234
- success: "green/green.500/green.700",
235
238
  negative: "red/red.150/red.900",
236
- neutral: "grey.lighter/navy.50/black.100",
237
- disabled: "grey.dark/navy.300/grey.300"
239
+ success: "green/green.500/green.700",
240
+ disabled: "grey.dark/navy.300/grey.300",
241
+ neutral: "grey.lighter/navy.50/black.100"
238
242
  };
239
243
  var _theme = {
240
244
  background: background,
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"theme.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -78,7 +78,7 @@ function CalendarRangePickerMonth({ date, onSelectDate, onChangeDate, onLeaveDat
78
78
  return (React.createElement("div", { className: cx("cobalt-CalendarRangePicker__month", {
79
79
  "cobalt-CalendarRangePicker__month--invalid": isOutOfRange && !isEditingStartDate,
80
80
  }), "data-month": format(date, "yyyy-MM") },
81
- React.createElement("div", { className: "cobalt-CalendarRangePicker__month-header cobalt-text-titleSmall" }, format(date, "MMMM yyyy", { locale })),
81
+ React.createElement("div", { className: "cobalt-CalendarRangePicker__month-header" }, format(date, "MMMM yyyy", { locale })),
82
82
  React.createElement("div", { className: "cobalt-CalendarRangePicker__month__weeks-container" },
83
83
  React.createElement("div", { className: "cobalt-CalendarRangePicker__month__week-header" }, weekdays.map((weekday) => (React.createElement("div", { key: weekday.getTime(), className: "cobalt-CalendarRangePicker__month__day-header" }, format(weekday, "iiiiii", { locale }))))),
84
84
  byWeeks.map((week, index) => (React.createElement("div", { key: index, className: "cobalt-CalendarRangePicker__month__week" }, week.map((day) => {
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarRangePickerMonth.js","sources":["../../../../src/components/Calendar/CalendarRangePicker/CalendarRangePickerMonth.tsx"],"sourcesContent":["import React, { useMemo } from \"react\"\nimport { CalendarRangePickerDay } from \"./CalendarRangePickerDay\"\nimport classNames from \"classnames\"\nimport {\n eachDayOfInterval,\n startOfMonth,\n endOfMonth,\n format,\n isSameDay,\n getDay,\n differenceInCalendarDays,\n startOfWeek,\n endOfWeek,\n} from \"date-fns\"\n\ntype Props = {\n date: Date\n startDate?: Date\n endDate?: Date\n onSelectDate: (date: Date, isOutOfRange?: boolean) => void\n onChangeDate: (date: Date, isOutOfRange: boolean, disabled: boolean) => void\n onLeaveDate?: (date: Date) => void\n isEditingStartDate?: boolean\n isEditingEndDate?: boolean\n rangeLimit?: number\n firstAvailableDate: Date\n lastAvailableDate?: Date\n locale: any\n}\n\nfunction daysByWeeks(monthDate: Date): Date[][] {\n const firstDayOfMonth = startOfMonth(monthDate)\n const firstDayOfMonthOffset = getDay(firstDayOfMonth) - 1\n const lastDayOfMonth = endOfMonth(monthDate)\n const days = eachDayOfInterval({\n start: firstDayOfMonth,\n end: lastDayOfMonth,\n })\n\n return days.reduce((acc: Date[][], day, index) => {\n if (index === 0 || (index + firstDayOfMonthOffset) % 7 === 0) {\n acc.push([])\n }\n acc[acc.length - 1].push(day)\n return acc\n }, [])\n}\n\nfunction isDisabled(\n day: Date,\n firstAvailableDate: Date,\n lastAvailableDate: Date | undefined\n) {\n return (\n day.getTime() < firstAvailableDate.getTime() ||\n (lastAvailableDate != null && day.getTime() > lastAvailableDate.getTime())\n )\n}\n\nfunction isInvalid(\n day: Date,\n startDate: Date | undefined,\n rangeLimit: number | undefined,\n isOutOfRange: boolean,\n isEditingEndDate: boolean | undefined\n) {\n return (\n rangeLimit != null &&\n isOutOfRange &&\n isEditingEndDate &&\n startDate != null &&\n differenceInCalendarDays(day, startDate) >= rangeLimit\n )\n}\n\nfunction isRange(\n startDate: Date | undefined,\n endDate: Date | undefined,\n isOutOfRangeStartDate: boolean\n) {\n return !!(startDate && endDate) && !isOutOfRangeStartDate\n}\n\nfunction isSelected(\n day: Date,\n startDate: Date | undefined,\n endDate: Date | undefined,\n isStartDay: boolean,\n isEndDay: boolean,\n isOutOfRangeStartDate: boolean\n) {\n return (\n isStartDay ||\n isEndDay ||\n (!isOutOfRangeStartDate &&\n endDate &&\n day.getTime() <= endDate.getTime() &&\n startDate &&\n day.getTime() > startDate.getTime())\n )\n}\n\nexport function CalendarRangePickerMonth({\n date,\n onSelectDate,\n onChangeDate,\n onLeaveDate,\n startDate,\n endDate,\n isEditingStartDate = false,\n isEditingEndDate = false,\n rangeLimit,\n firstAvailableDate,\n lastAvailableDate,\n locale,\n}: Props) {\n const firstDayOfMonth = useMemo(() => startOfMonth(date), [])\n const lastDayOfMonth = useMemo(() => endOfMonth(date), [])\n const byWeeks = useMemo(() => daysByWeeks(date), [])\n\n const today = new Date().setHours(0, 0, 0, 0)\n\n const weekdays: Date[] = useMemo(\n () =>\n eachDayOfInterval({\n start: startOfWeek(today, { weekStartsOn: 1 }),\n end: endOfWeek(today, { weekStartsOn: 1 }),\n }),\n []\n )\n\n const isOutOfRange =\n rangeLimit != null &&\n startDate != null &&\n endDate != null &&\n differenceInCalendarDays(endDate, startDate) >= rangeLimit\n\n const isOutOfRangeStartDate = !!isEditingStartDate && isOutOfRange\n\n const onMouseEnter = (day: Date, disabled: boolean) => {\n let isDayOutOfRange = false\n if (rangeLimit != null) {\n if (isEditingStartDate) {\n isDayOutOfRange =\n endDate != null &&\n differenceInCalendarDays(endDate, day) >= rangeLimit\n } else if (isEditingEndDate) {\n isDayOutOfRange =\n startDate != null &&\n differenceInCalendarDays(day, startDate) >= rangeLimit\n }\n }\n\n onChangeDate(day, isDayOutOfRange, disabled)\n }\n\n const onSelect = (day: Date) => {\n onSelectDate(day, isOutOfRange)\n }\n\n return (\n <div\n className={classNames(\"cobalt-CalendarRangePicker__month\", {\n \"cobalt-CalendarRangePicker__month--invalid\":\n isOutOfRange && !isEditingStartDate,\n })}\n data-month={format(date, \"yyyy-MM\")}\n >\n <div className=\"cobalt-CalendarRangePicker__month-header cobalt-text-titleSmall\">\n {format(date, \"MMMM yyyy\", { locale })}\n </div>\n <div className=\"cobalt-CalendarRangePicker__month__weeks-container\">\n <div className=\"cobalt-CalendarRangePicker__month__week-header\">\n {weekdays.map((weekday) => (\n <div\n key={weekday.getTime()}\n className=\"cobalt-CalendarRangePicker__month__day-header\"\n >\n {format(weekday, \"iiiiii\", { locale })}\n </div>\n ))}\n </div>\n {byWeeks.map((week, index) => (\n <div key={index} className=\"cobalt-CalendarRangePicker__month__week\">\n {week.map((day) => {\n const isStartDay = startDate != null && isSameDay(day, startDate)\n const isEndDay = endDate != null && isSameDay(day, endDate)\n return (\n <CalendarRangePickerDay\n key={day.getTime()}\n isEditingStartDate={!!isEditingStartDate}\n isEditingEndDate={!!isEditingEndDate}\n date={day}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onLeaveDate}\n onSelect={onSelect}\n isToday={isSameDay(day, today)}\n isStartDay={isStartDay}\n isEndDay={isEndDay}\n isFirstDayOfMonth={isSameDay(day, firstDayOfMonth)}\n isLastDayOfMonth={isSameDay(day, lastDayOfMonth)}\n isRange={isRange(startDate, endDate, isOutOfRangeStartDate)}\n invalid={isInvalid(\n day,\n startDate,\n rangeLimit,\n isOutOfRange,\n isEditingEndDate\n )}\n subdued={\n (isStartDay && isEditingEndDate) ||\n (isEndDay && isEditingStartDate)\n }\n disabled={isDisabled(\n day,\n firstAvailableDate,\n lastAvailableDate\n )}\n selected={isSelected(\n day,\n startDate,\n endDate,\n isStartDay,\n isEndDay,\n isOutOfRangeStartDate\n )}\n />\n )\n })}\n </div>\n ))}\n </div>\n </div>\n )\n}\n"],"names":["classNames","CalendarRangePickerDay"],"mappings":";;;;;AA8BA,SAAS,WAAW,CAAC,SAAe,EAAA;AAClC,IAAA,MAAM,eAAe,GAAG,YAAY,CAAC,SAAS,CAAC,CAAA;IAC/C,MAAM,qBAAqB,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;AACzD,IAAA,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAA;IAC5C,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAC7B,QAAA,KAAK,EAAE,eAAe;AACtB,QAAA,GAAG,EAAE,cAAc;AACpB,KAAA,CAAC,CAAA;IAEF,OAAO,IAAI,C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,SAAS,EACT,UAAU,EACV,YAAY,EACZ,gBAAgB,CACjB,EACD,OAAO,EACL,CAAC,UAAU,IAAI,gBAAgB;AAC/B,yBAAC,QAAQ,IAAI,kBAAkB,CAAC,EAElC,QAAQ,EAAE,UAAU,CAClB,GAAG,EACH,kBAAkB,EAClB,iBAAiB,CAClB,EACD,QAAQ,EAAE,UAAU,CAClB,GAAG,EACH,SAAS,EACT,OAAO,EACP,UAAU,EACV,QAAQ,EACR,qBAAqB,CACtB,EAAA,CACD,EACH;AACH,aAAC,CAAC,CACE,CACP,CAAC,CACE,CACF,EACP;AACH;;;;"}
1
+ {"version":3,"file":"CalendarRangePickerMonth.js","sources":["../../../../src/components/Calendar/CalendarRangePicker/CalendarRangePickerMonth.tsx"],"sourcesContent":["import React, { useMemo } from \"react\"\nimport { CalendarRangePickerDay } from \"./CalendarRangePickerDay\"\nimport classNames from \"classnames\"\nimport {\n eachDayOfInterval,\n startOfMonth,\n endOfMonth,\n format,\n isSameDay,\n getDay,\n differenceInCalendarDays,\n startOfWeek,\n endOfWeek,\n} from \"date-fns\"\n\ntype Props = {\n date: Date\n startDate?: Date\n endDate?: Date\n onSelectDate: (date: Date, isOutOfRange?: boolean) => void\n onChangeDate: (date: Date, isOutOfRange: boolean, disabled: boolean) => void\n onLeaveDate?: (date: Date) => void\n isEditingStartDate?: boolean\n isEditingEndDate?: boolean\n rangeLimit?: number\n firstAvailableDate: Date\n lastAvailableDate?: Date\n locale: any\n}\n\nfunction daysByWeeks(monthDate: Date): Date[][] {\n const firstDayOfMonth = startOfMonth(monthDate)\n const firstDayOfMonthOffset = getDay(firstDayOfMonth) - 1\n const lastDayOfMonth = endOfMonth(monthDate)\n const days = eachDayOfInterval({\n start: firstDayOfMonth,\n end: lastDayOfMonth,\n })\n\n return days.reduce((acc: Date[][], day, index) => {\n if (index === 0 || (index + firstDayOfMonthOffset) % 7 === 0) {\n acc.push([])\n }\n acc[acc.length - 1].push(day)\n return acc\n }, [])\n}\n\nfunction isDisabled(\n day: Date,\n firstAvailableDate: Date,\n lastAvailableDate: Date | undefined\n) {\n return (\n day.getTime() < firstAvailableDate.getTime() ||\n (lastAvailableDate != null && day.getTime() > lastAvailableDate.getTime())\n )\n}\n\nfunction isInvalid(\n day: Date,\n startDate: Date | undefined,\n rangeLimit: number | undefined,\n isOutOfRange: boolean,\n isEditingEndDate: boolean | undefined\n) {\n return (\n rangeLimit != null &&\n isOutOfRange &&\n isEditingEndDate &&\n startDate != null &&\n differenceInCalendarDays(day, startDate) >= rangeLimit\n )\n}\n\nfunction isRange(\n startDate: Date | undefined,\n endDate: Date | undefined,\n isOutOfRangeStartDate: boolean\n) {\n return !!(startDate && endDate) && !isOutOfRangeStartDate\n}\n\nfunction isSelected(\n day: Date,\n startDate: Date | undefined,\n endDate: Date | undefined,\n isStartDay: boolean,\n isEndDay: boolean,\n isOutOfRangeStartDate: boolean\n) {\n return (\n isStartDay ||\n isEndDay ||\n (!isOutOfRangeStartDate &&\n endDate &&\n day.getTime() <= endDate.getTime() &&\n startDate &&\n day.getTime() > startDate.getTime())\n )\n}\n\nexport function CalendarRangePickerMonth({\n date,\n onSelectDate,\n onChangeDate,\n onLeaveDate,\n startDate,\n endDate,\n isEditingStartDate = false,\n isEditingEndDate = false,\n rangeLimit,\n firstAvailableDate,\n lastAvailableDate,\n locale,\n}: Props) {\n const firstDayOfMonth = useMemo(() => startOfMonth(date), [])\n const lastDayOfMonth = useMemo(() => endOfMonth(date), [])\n const byWeeks = useMemo(() => daysByWeeks(date), [])\n\n const today = new Date().setHours(0, 0, 0, 0)\n\n const weekdays: Date[] = useMemo(\n () =>\n eachDayOfInterval({\n start: startOfWeek(today, { weekStartsOn: 1 }),\n end: endOfWeek(today, { weekStartsOn: 1 }),\n }),\n []\n )\n\n const isOutOfRange =\n rangeLimit != null &&\n startDate != null &&\n endDate != null &&\n differenceInCalendarDays(endDate, startDate) >= rangeLimit\n\n const isOutOfRangeStartDate = !!isEditingStartDate && isOutOfRange\n\n const onMouseEnter = (day: Date, disabled: boolean) => {\n let isDayOutOfRange = false\n if (rangeLimit != null) {\n if (isEditingStartDate) {\n isDayOutOfRange =\n endDate != null &&\n differenceInCalendarDays(endDate, day) >= rangeLimit\n } else if (isEditingEndDate) {\n isDayOutOfRange =\n startDate != null &&\n differenceInCalendarDays(day, startDate) >= rangeLimit\n }\n }\n\n onChangeDate(day, isDayOutOfRange, disabled)\n }\n\n const onSelect = (day: Date) => {\n onSelectDate(day, isOutOfRange)\n }\n\n return (\n <div\n className={classNames(\"cobalt-CalendarRangePicker__month\", {\n \"cobalt-CalendarRangePicker__month--invalid\":\n isOutOfRange && !isEditingStartDate,\n })}\n data-month={format(date, \"yyyy-MM\")}\n >\n <div className=\"cobalt-CalendarRangePicker__month-header\">\n {format(date, \"MMMM yyyy\", { locale })}\n </div>\n <div className=\"cobalt-CalendarRangePicker__month__weeks-container\">\n <div className=\"cobalt-CalendarRangePicker__month__week-header\">\n {weekdays.map((weekday) => (\n <div\n key={weekday.getTime()}\n className=\"cobalt-CalendarRangePicker__month__day-header\"\n >\n {format(weekday, \"iiiiii\", { locale })}\n </div>\n ))}\n </div>\n {byWeeks.map((week, index) => (\n <div key={index} className=\"cobalt-CalendarRangePicker__month__week\">\n {week.map((day) => {\n const isStartDay = startDate != null && isSameDay(day, startDate)\n const isEndDay = endDate != null && isSameDay(day, endDate)\n return (\n <CalendarRangePickerDay\n key={day.getTime()}\n isEditingStartDate={!!isEditingStartDate}\n isEditingEndDate={!!isEditingEndDate}\n date={day}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onLeaveDate}\n onSelect={onSelect}\n isToday={isSameDay(day, today)}\n isStartDay={isStartDay}\n isEndDay={isEndDay}\n isFirstDayOfMonth={isSameDay(day, firstDayOfMonth)}\n isLastDayOfMonth={isSameDay(day, lastDayOfMonth)}\n isRange={isRange(startDate, endDate, isOutOfRangeStartDate)}\n invalid={isInvalid(\n day,\n startDate,\n rangeLimit,\n isOutOfRange,\n isEditingEndDate\n )}\n subdued={\n (isStartDay && isEditingEndDate) ||\n (isEndDay && isEditingStartDate)\n }\n disabled={isDisabled(\n day,\n firstAvailableDate,\n lastAvailableDate\n )}\n selected={isSelected(\n day,\n startDate,\n endDate,\n isStartDay,\n isEndDay,\n isOutOfRangeStartDate\n )}\n />\n )\n })}\n </div>\n ))}\n </div>\n </div>\n )\n}\n"],"names":["classNames","CalendarRangePickerDay"],"mappings":";;;;;AA8BA,SAAS,WAAW,CAAC,SAAe,EAAA;AAClC,IAAA,MAAM,eAAe,GAAG,YAAY,CAAC,SAAS,CAAC,CAAA;IAC/C,MAAM,qBAAqB,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAA;AACzD,IAAA,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAA;IAC5C,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAC7B,QAAA,KAAK,EAAE,eAAe;AACtB,QAAA,GAAG,EAAE,cAAc;AACpB,KAAA,CAAC,CAAA;IAEF,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAa,EAAE,GAAG,EAAE,KAAK,KAAI;AAC/C,QAAA,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,qBAAqB,IAAI,CAAC,KAAK,CAAC,EAAE;AAC5D,YAAA,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACb,SAAA;AACD,QAAA,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC7B,QAAA,OAAO,GAAG,CAAA;KACX,EAAE,EAAE,CAAC,CAAA;AACR,CAAC;AAED,SAAS,UAAU,CACjB,GAAS,EACT,kBAAwB,EACxB,iBAAmC,EAAA;IAEnC,QACE,GAAG,CAAC,OAAO,EAAE,GAAG,kBAAkB,CAAC,OAAO,EAAE;AAC5C,SAAC,iBAAiB,IAAI,IAAI,IAAI,GAAG,CAAC,OAAO,EAAE,GAAG,iBAA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IAAI,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;gBAC3D,QACE,oBAACC,iBAAsB,EAAA,EACrB,GAAG,EAAE,GAAG,CAAC,OAAO,EAAE,EAClB,kBAAkB,EAAE,CAAC,CAAC,kBAAkB,EACxC,gBAAgB,EAAE,CAAC,CAAC,gBAAgB,EACpC,IAAI,EAAE,GAAG,EACT,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,WAAW,EACzB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,EAC9B,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,SAAS,CAAC,GAAG,EAAE,eAAe,CAAC,EAClD,gBAAgB,EAAE,SAAS,CAAC,GAAG,EAAE,cAAc,CAAC,EAChD,OAAO,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,qBAAqB,CAAC,EAC3D,OAAO,EAAE,SAAS,CAChB,GAAG,EACH,SAAS,EACT,UAAU,EACV,YAAY,EACZ,gBAAgB,CACjB,EACD,OAAO,EACL,CAAC,UAAU,IAAI,gBAAgB;AAC/B,yBAAC,QAAQ,IAAI,kBAAkB,CAAC,EAElC,QAAQ,EAAE,UAAU,CAClB,GAAG,EACH,kBAAkB,EAClB,iBAAiB,CAClB,EACD,QAAQ,EAAE,UAAU,CAClB,GAAG,EACH,SAAS,EACT,OAAO,EACP,UAAU,EACV,QAAQ,EACR,qBAAqB,CACtB,EAAA,CACD,EACH;AACH,aAAC,CAAC,CACE,CACP,CAAC,CACE,CACF,EACP;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drivy/cobalt",
3
- "version": "0.27.0",
3
+ "version": "0.28.1",
4
4
  "description": "Opinionated design system for Drivy's projects.",
5
5
  "main": "src/index.js",
6
6
  "types": "types/index.d.ts",
@@ -67,7 +67,7 @@
67
67
  "autoprefixer": "10.4.13",
68
68
  "core-js": "3.27.1",
69
69
  "css-loader": "6.7.3",
70
- "eslint": "8.31.0",
70
+ "eslint": "8.32.0",
71
71
  "file-loader": "6.2.0",
72
72
  "jest": "29.3.1",
73
73
  "jest-environment-jsdom": "29.3.1",
@@ -95,7 +95,7 @@
95
95
  "stylelint": "14.16.1",
96
96
  "svg2vectordrawable": "2.9.1",
97
97
  "svgo": "3.0.2",
98
- "ts-jest": "29.0.3",
98
+ "ts-jest": "29.0.5",
99
99
  "ts-node": "10.9.1",
100
100
  "typescript": "4.9.4"
101
101
  },
@@ -14,8 +14,9 @@
14
14
  }
15
15
 
16
16
  &BasicCell__Title {
17
- // TOFIX to replace by small
18
- @include text-style-title-tiny;
17
+ @include c-text-title-sm;
18
+ @include text-color(base);
19
+ margin-bottom: 0;
19
20
  }
20
21
 
21
22
  &BasicCell__Content {
@@ -65,6 +65,9 @@
65
65
  }
66
66
 
67
67
  &__month-header {
68
+ @include c-text-title-sm;
69
+ @include text-color(base);
70
+ margin-bottom: 12px;
68
71
  padding: 4px;
69
72
 
70
73
  text-align: center;
@@ -72,10 +75,6 @@
72
75
  text-transform: capitalize;
73
76
  }
74
77
 
75
- &__month-header.cobalt-text-titleSmall {
76
- margin-bottom: 12px;
77
- }
78
-
79
78
  &__month__week {
80
79
  display: flex;
81
80
  justify-content: flex-end;
@@ -58,6 +58,10 @@
58
58
  fill: var(--c-icon-info);
59
59
  }
60
60
 
61
+ .cobalt-Icon--colorInfoAlt {
62
+ fill: var(--c-icon-infoAlt);
63
+ }
64
+
61
65
  .cobalt-Icon--colorError {
62
66
  fill: var(--c-icon-error);
63
67
  }
@@ -74,6 +78,10 @@
74
78
  fill: var(--c-icon-successAlt);
75
79
  }
76
80
 
81
+ .cobalt-Icon--colorWarning {
82
+ fill: var(--c-icon-warning);
83
+ }
84
+
77
85
  .cobalt-Icon--colorConnect {
78
86
  fill: var(--c-icon-connect);
79
87
  }
@@ -90,14 +98,6 @@
90
98
  fill: var(--c-icon-owner);
91
99
  }
92
100
 
93
- .cobalt-Icon--colorWarning {
94
- fill: var(--c-icon-warning);
95
- }
96
-
97
- .cobalt-Icon--colorInfoAlt {
98
- fill: var(--c-icon-infoAlt);
99
- }
100
-
101
101
  .cobalt-Icon--colorInversed {
102
102
  fill: var(--c-icon-inversed);
103
103
  }
@@ -39,7 +39,11 @@ $theme-colors-map: (
39
39
  owner: var(--c-l-indigo-dark),
40
40
  disabled: var(--c-l-grey-light),
41
41
  neutral: var(--c-l-grey-light),
42
- neutralAlt: var(--c-l-grey-lighter)
42
+ neutralAlt: var(--c-l-grey-lighter),
43
+ seasonLow: var(--c-l-deprecatedSeasonLow),
44
+ seasonMedium: var(--c-l-deprecatedSeasonMedium),
45
+ seasonHigh: var(--c-l-deprecatedSeasonHigh),
46
+ seasonVeryHigh: var(--c-l-deprecatedSeasonVeryHigh)
43
47
  ),
44
48
  text: (
45
49
  base: var(--c-l-graphite),
@@ -63,15 +67,15 @@ $theme-colors-map: (
63
67
  hover: var(--c-l-white)
64
68
  ),
65
69
  info: var(--c-l-graphite-light),
70
+ infoAlt: var(--c-l-turquoise),
66
71
  error: var(--c-l-red),
67
72
  errorAlt: var(--c-l-white),
68
73
  success: var(--c-l-green),
69
74
  successAlt: var(--c-l-white),
75
+ warning: var(--c-l-coral),
70
76
  connect: var(--c-l-turquoise),
71
77
  driver: var(--c-l-graphite),
72
78
  owner: var(--c-l-white),
73
- warning: var(--c-l-coral),
74
- infoAlt: var(--c-l-turquoise),
75
79
  inversed: var(--c-l-white)
76
80
  ),
77
81
  buttonBackground: (
@@ -186,16 +190,16 @@ $theme-colors-map: (
186
190
  hover: var(--c-l-white)
187
191
  ),
188
192
  info: var(--c-l-graphite-light),
193
+ infoAlt: var(--c-l-turquoise),
189
194
  error: var(--c-l-red),
190
195
  errorAlt: var(--c-l-red),
191
196
  success: var(--c-l-green),
192
197
  successAlt: var(--c-l-white),
198
+ warning: var(--c-l-coral),
193
199
  connect: var(--c-l-turquoise),
194
200
  connectAlt: var(--c-l-turquoise),
195
201
  driver: var(--c-l-graphite),
196
202
  owner: var(--c-l-white),
197
- warning: var(--c-l-coral),
198
- infoAlt: var(--c-l-turquoise),
199
203
  inversed: var(--c-l-white),
200
204
  disabled: var(--c-l-grey-lighter)
201
205
  ),
@@ -232,9 +236,9 @@ $theme-colors-map: (
232
236
  accent: var(--c-l-purple),
233
237
  accentAlt: var(--c-l-purple),
234
238
  error: var(--c-l-red),
235
- success: var(--c-l-green),
236
239
  negative: var(--c-l-red),
237
- neutral: var(--c-l-grey-lighter),
238
- disabled: var(--c-l-grey-dark)
240
+ success: var(--c-l-green),
241
+ disabled: var(--c-l-grey-dark),
242
+ neutral: var(--c-l-grey-lighter)
239
243
  )
240
244
  );
@@ -59,6 +59,14 @@
59
59
  --c-yellow-700: #c59548;
60
60
  --c-yellow-900: #75592d;
61
61
  --c-yellow-1000: #3b2e17;
62
+ --c-season-100: #bdffac;
63
+ --c-season-200: #94ea84;
64
+ --c-season-300: #73c865;
65
+ --c-season-400: #54a949;
66
+ --c-season-700: #0b7011;
67
+ --c-season-800: #005100;
68
+ --c-season-900: #030;
69
+ --c-season-1000: #001900;
62
70
  --c-l-white: #fff;
63
71
  --c-l-grey-lighter: #f8f7f8;
64
72
  --c-l-grey-light: #edebed;
@@ -80,4 +88,8 @@
80
88
  --c-l-blue: #2ea2ea;
81
89
  --c-l-deprecatedBlueGhost: #2ea2ea0f;
82
90
  --c-l-deprecatedDriver: #ffd988;
91
+ --c-l-deprecatedSeasonLow: #bdffac;
92
+ --c-l-deprecatedSeasonMedium: #94ea84;
93
+ --c-l-deprecatedSeasonHigh: #73c865;
94
+ --c-l-deprecatedSeasonVeryHigh: #54a949;
83
95
  }
@@ -29,6 +29,10 @@
29
29
  --c-background-disabled: var(--c-l-grey-light);
30
30
  --c-background-neutral: var(--c-l-grey-light);
31
31
  --c-background-neutralAlt: var(--c-l-grey-lighter);
32
+ --c-background-seasonLow: var(--c-l-deprecatedSeasonLow);
33
+ --c-background-seasonMedium: var(--c-l-deprecatedSeasonMedium);
34
+ --c-background-seasonHigh: var(--c-l-deprecatedSeasonHigh);
35
+ --c-background-seasonVeryHigh: var(--c-l-deprecatedSeasonVeryHigh);
32
36
  --c-text-base: var(--c-l-graphite);
33
37
  --c-text-baseInteractive: var(--c-l-graphite);
34
38
  --c-text-baseInteractive--hover: var(--c-l-graphite);
@@ -42,15 +46,15 @@
42
46
  --c-text-accentAltInteractive: var(--c-l-white);
43
47
  --c-text-accentAltInteractive--hover: var(--c-l-white);
44
48
  --c-text-info: var(--c-l-graphite-light);
49
+ --c-text-infoAlt: var(--c-l-turquoise);
45
50
  --c-text-error: var(--c-l-red);
46
51
  --c-text-errorAlt: var(--c-l-white);
47
52
  --c-text-success: var(--c-l-green);
48
53
  --c-text-successAlt: var(--c-l-white);
54
+ --c-text-warning: var(--c-l-coral);
49
55
  --c-text-connect: var(--c-l-turquoise);
50
56
  --c-text-driver: var(--c-l-graphite);
51
57
  --c-text-owner: var(--c-l-white);
52
- --c-text-warning: var(--c-l-coral);
53
- --c-text-infoAlt: var(--c-l-turquoise);
54
58
  --c-text-inversed: var(--c-l-white);
55
59
  --c-buttonBackground-selected: var(--c-l-indigo);
56
60
  --c-buttonBackground-destructiveInteractive: var(--c-l-red);
@@ -119,16 +123,16 @@
119
123
  --c-icon-accentAltInteractive: var(--c-l-white);
120
124
  --c-icon-accentAltInteractive--hover: var(--c-l-white);
121
125
  --c-icon-info: var(--c-l-graphite-light);
126
+ --c-icon-infoAlt: var(--c-l-turquoise);
122
127
  --c-icon-error: var(--c-l-red);
123
128
  --c-icon-errorAlt: var(--c-l-red);
124
129
  --c-icon-success: var(--c-l-green);
125
130
  --c-icon-successAlt: var(--c-l-white);
131
+ --c-icon-warning: var(--c-l-coral);
126
132
  --c-icon-connect: var(--c-l-turquoise);
127
133
  --c-icon-connectAlt: var(--c-l-turquoise);
128
134
  --c-icon-driver: var(--c-l-graphite);
129
135
  --c-icon-owner: var(--c-l-white);
130
- --c-icon-warning: var(--c-l-coral);
131
- --c-icon-infoAlt: var(--c-l-turquoise);
132
136
  --c-icon-inversed: var(--c-l-white);
133
137
  --c-icon-disabled: var(--c-l-grey-lighter);
134
138
  --c-stroke-base: var(--c-l-grey);
@@ -155,8 +159,8 @@
155
159
  --c-fill-accent: var(--c-l-purple);
156
160
  --c-fill-accentAlt: var(--c-l-purple);
157
161
  --c-fill-error: var(--c-l-red);
158
- --c-fill-success: var(--c-l-green);
159
162
  --c-fill-negative: var(--c-l-red);
160
- --c-fill-neutral: var(--c-l-grey-lighter);
163
+ --c-fill-success: var(--c-l-green);
161
164
  --c-fill-disabled: var(--c-l-grey-dark);
165
+ --c-fill-neutral: var(--c-l-grey-lighter);
162
166
  }
@@ -72,177 +72,3 @@ $text-variants-data: (
72
72
  @function line-height($name) {
73
73
  @return nth(font-styles($name), 2);
74
74
  }
75
-
76
- // Those mixins are deprecated, please use the ones from ./text.scss
77
-
78
- @mixin text-style-hero-heading {
79
- // reset is necessary as we still apply default style to html tags such as hX
80
- margin-bottom: 0;
81
-
82
- font-family: BrownPro,BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif;
83
- font-size: remToPx(2.25rem);
84
- font-weight: 700;
85
- line-height: remToPx(2.5rem);
86
- color: color(white);
87
-
88
- text-shadow: 0 3px 20px rgba(#000, 0.3);
89
-
90
- @include breakpoint($from: sm) {
91
- font-size: remToPx(3.5rem);
92
- line-height: remToPx(3.75rem);
93
- }
94
- }
95
-
96
- @mixin text-style-hero-subheading {
97
- // reset is necessary as we still apply default style to html tags such as hX
98
- margin-bottom: 0;
99
-
100
- font-family: BrownPro,BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif;
101
- font-size: remToPx(1.25rem);
102
- font-weight: 700;
103
- line-height: remToPx(1.5rem);
104
- color: color(white);
105
-
106
- text-shadow: 0 3px 20px rgba(#000, 0.3);
107
-
108
- @include breakpoint($from: sm) {
109
- font-size: remToPx(1.75rem);
110
- line-height: remToPx(2rem);
111
- }
112
- }
113
-
114
- @mixin text-style-title-extralarge {
115
- // reset is necessary as we still apply default style to html tags such as hX
116
- margin-bottom: 0;
117
-
118
- font-family: BrownPro,BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif;
119
- font-size: 2rem;
120
- font-weight: 700;
121
- line-height: 2.25rem;
122
- color: color(indigo, dark);
123
-
124
- @include breakpoint($from: sm) {
125
- font-size: remToPx(2.5rem);
126
- line-height: remToPx(2.75rem);
127
- }
128
- }
129
-
130
- @mixin text-style-title-large {
131
- // reset is necessary as we still apply default style to html tags such as hX
132
- margin-bottom: 0;
133
-
134
- font-family: BrownPro,BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif;
135
- font-size: 1.5rem;
136
- font-weight: 700;
137
- line-height: 1.75rem;
138
- color: color(indigo, dark);
139
-
140
- @include breakpoint($from: sm) {
141
- font-size: remToPx(2rem);
142
- line-height: remToPx(2.25rem);
143
- }
144
- }
145
-
146
- @mixin text-style-title {
147
- // reset is necessary as we still apply default style to html tags such as hX
148
- margin-bottom: 0;
149
-
150
- font-family: BrownPro,BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif;
151
- font-size: 1.125rem;
152
- font-weight: 700;
153
- line-height: 1.25rem;
154
- color: color(indigo, dark);
155
-
156
- @include breakpoint($from: sm) {
157
- font-size: remToPx(1.5rem);
158
- line-height: remToPx(1.75rem);
159
- }
160
- }
161
-
162
- @mixin text-style-title-small {
163
- // reset is necessary as we still apply default style to html tags such as hX
164
- margin-bottom: 0;
165
-
166
- font-family: BrownPro,BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif;
167
- font-size: 0.9375rem;
168
- font-weight: 600;
169
- line-height: 1.25rem;
170
- color: color(indigo, dark);
171
-
172
- @include breakpoint($from: sm) {
173
- font-size: remToPx(1.125rem);
174
- line-height: remToPx(1.5rem);
175
- }
176
- }
177
-
178
- @mixin text-style-title-tiny {
179
- // reset is necessary as we still apply default style to html tags such as hX
180
- margin-bottom: 0;
181
-
182
- font-family: BrownPro,BlinkMacSystemFont,-apple-system,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans','Droid Sans','Helvetica Neue',Helvetica,Arial,sans-serif;
183
- font-size: 0.9375rem;
184
- font-weight: 600;
185
- line-height: 1.25rem;
186
- color: color(indigo, dark);
187
- }
188
-
189
- @mixin text-style--titleSubdued {
190
- color: color(purple);
191
- }
192
-
193
- @mixin text-style-body-large {
194
- // reset is necessary as we still apply default style to html tags such as hX
195
- margin-bottom: 0;
196
-
197
- font-size: font-size(body-large);
198
- line-height: line-height(body-large);
199
- }
200
-
201
- @mixin text-style-body {
202
- // reset is necessary as we still apply default style to html tags such as hX
203
- margin-bottom: 0;
204
-
205
- font-size: font-size(body);
206
- line-height: line-height(body);
207
- color: color(graphite);
208
- }
209
-
210
- @mixin text-style-body-small {
211
- // reset is necessary as we still apply default style to html tags such as hX
212
- margin-bottom: 0;
213
-
214
- font-size: font-size(body-small);
215
- line-height: line-height(body-small);
216
- }
217
-
218
- @mixin text-style--bodySubdued {
219
- color: color(graphite, light);
220
- }
221
-
222
- @mixin text-style--bodyInversed {
223
- color: color(white);
224
- }
225
-
226
- @mixin text-style-caption {
227
- // reset is necessary as we still apply default style to html tags such as hX
228
- margin-bottom: 0;
229
-
230
- font-size: font-size(caption);
231
- line-height: line-height(caption);
232
-
233
- color: rgba(color(graphite), 0.5);
234
- }
235
-
236
- @mixin text-style-section-header {
237
- @include text-color(subdued);
238
-
239
- // reset is necessary as we still apply default style to html tags such as hX
240
- margin-bottom: 0;
241
-
242
- font-family: font-family(brand);
243
- font-weight: 700;
244
- font-size: font-size(section-header);
245
- line-height: line-height(section-header);
246
-
247
- text-transform: uppercase;
248
- }
@@ -1,2 +1 @@
1
1
  @import "global/spacing";
2
- @import "global/typography";
package/tokens/colors.js CHANGED
@@ -29,6 +29,10 @@ const green = {
29
29
  const blue = "#2ea2ea";
30
30
  const deprecatedBlueGhost = "#2ea2ea0f";
31
31
  const deprecatedDriver = "#ffd988";
32
+ const deprecatedSeasonLow = "#BDFFAC";
33
+ const deprecatedSeasonMedium = "#94EA84";
34
+ const deprecatedSeasonHigh = "#73C865";
35
+ const deprecatedSeasonVeryHigh = "#54A949";
32
36
  var _colors = {
33
37
  white: white,
34
38
  grey: grey,
@@ -42,8 +46,12 @@ var _colors = {
42
46
  green: green,
43
47
  blue: blue,
44
48
  deprecatedBlueGhost: deprecatedBlueGhost,
45
- deprecatedDriver: deprecatedDriver
49
+ deprecatedDriver: deprecatedDriver,
50
+ deprecatedSeasonLow: deprecatedSeasonLow,
51
+ deprecatedSeasonMedium: deprecatedSeasonMedium,
52
+ deprecatedSeasonHigh: deprecatedSeasonHigh,
53
+ deprecatedSeasonVeryHigh: deprecatedSeasonVeryHigh
46
54
  };
47
55
 
48
- export { amber, blue, coral, _colors as default, deprecatedBlueGhost, deprecatedDriver, graphite, green, grey, indigo, purple, red, turquoise, white };
56
+ export { amber, blue, coral, _colors as default, deprecatedBlueGhost, deprecatedDriver, deprecatedSeasonHigh, deprecatedSeasonLow, deprecatedSeasonMedium, deprecatedSeasonVeryHigh, graphite, green, grey, indigo, purple, red, turquoise, white };
49
57
  //# sourceMappingURL=colors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"colors.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/tokens/palette.js CHANGED
@@ -76,6 +76,16 @@ const yellow = {
76
76
  "900": "#75592D",
77
77
  "1000": "#3B2E17"
78
78
  };
79
+ const season = {
80
+ "100": "#BDFFAC",
81
+ "200": "#94EA84",
82
+ "300": "#73C865",
83
+ "400": "#54A949",
84
+ "700": "#0B7011",
85
+ "800": "#005100",
86
+ "900": "#030",
87
+ "1000": "#001900"
88
+ };
79
89
  var _palette = {
80
90
  black: black,
81
91
  grey: grey,
@@ -88,8 +98,9 @@ var _palette = {
88
98
  red: red,
89
99
  turquoise: turquoise,
90
100
  white: white,
91
- yellow: yellow
101
+ yellow: yellow,
102
+ season: season
92
103
  };
93
104
 
94
- export { black, _palette as default, green, grey, navy, orange, purple, purpleDeep, purpleLight, red, turquoise, white, yellow };
105
+ export { black, _palette as default, green, grey, navy, orange, purple, purpleDeep, purpleLight, red, season, turquoise, white, yellow };
95
106
  //# sourceMappingURL=palette.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"palette.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"palette.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/tokens/theme.js CHANGED
@@ -34,7 +34,11 @@ const background = {
34
34
  owner: "indigo.dark/navy.700/navy.700",
35
35
  disabled: "grey.light/navy.100/black.50",
36
36
  neutral: "grey.light/navy.100/black.50",
37
- neutralAlt: "grey.lighter/navy.50/black.100"
37
+ neutralAlt: "grey.lighter/navy.50/black.100",
38
+ seasonLow: "deprecatedSeasonLow/season.100/season.700",
39
+ seasonMedium: "deprecatedSeasonMedium/season.200/season.800",
40
+ seasonHigh: "deprecatedSeasonHigh/season.300/season.900",
41
+ seasonVeryHigh: "deprecatedSeasonVeryHigh/season.400/season.1000"
38
42
  };
39
43
  const text = {
40
44
  base: "graphite/navy.700/grey.100",
@@ -58,15 +62,15 @@ const text = {
58
62
  hover: "white/purple.700/grey.100"
59
63
  },
60
64
  info: "graphite.light/yellow.900/yellow.300",
65
+ infoAlt: "turquoise/yellow.500/yellow.700",
61
66
  error: "red/red.500/red.400",
62
67
  errorAlt: "white/red.500/red.500",
63
68
  success: "green/green.700/green.700",
64
69
  successAlt: "white/green.900/green.100",
70
+ warning: "coral/orange.500/orange.300",
65
71
  connect: "turquoise/turquoise.500/turquoise.500",
66
72
  driver: "graphite/navy.700/navy.700",
67
73
  owner: "white/white/grey.100",
68
- warning: "coral/orange.500/orange.300",
69
- infoAlt: "turquoise/yellow.500/yellow.700",
70
74
  inversed: "white/white/white"
71
75
  };
72
76
  const buttonBackground = {
@@ -181,16 +185,16 @@ const icon = {
181
185
  hover: "white/purple.700/grey.100"
182
186
  },
183
187
  info: "graphite.light/yellow.900/yellow.300",
188
+ infoAlt: "turquoise/yellow.500/yellow.700",
184
189
  error: "red/red.500/red.400",
185
190
  errorAlt: "red/red.500/red.200",
186
191
  success: "green/green.700/green.700",
187
192
  successAlt: "white/green.900/green.100",
193
+ warning: "coral/orange.500/orange.300",
188
194
  connect: "turquoise/turquoise.500/white",
189
195
  connectAlt: "turquoise/turquoise.900/turquoise.50",
190
196
  driver: "graphite/navy.700//navy.700",
191
197
  owner: "white/white/white",
192
- warning: "coral/orange.500/orange.300",
193
- infoAlt: "turquoise/yellow.500/yellow.700",
194
198
  inversed: "white/white/white",
195
199
  disabled: "grey.lighter/navy.100/black.50"
196
200
  };
@@ -201,11 +205,11 @@ const stroke = {
201
205
  hover: "graphite.light/navy.300/purpleDeep.400",
202
206
  press: "graphite/navy.500/purpleDeep.400"
203
207
  },
204
- strong: "grey.dark/navy.200/grey.200",
208
+ strong: "grey.dark/navy.300/navy.200",
205
209
  strongInteractive: {
206
- DEFAULT: "grey.dark/navy.200/grey.200",
207
- hover: "graphite.light/navy.300/purpleDeep.400",
208
- press: "graphite/navy.500/purpleDeep.400"
210
+ DEFAULT: "grey.dark/navy.300/navy.200",
211
+ hover: "graphite.light/navy.500/purpleDeep.400",
212
+ press: "graphite/navy.700/purpleDeep.400"
209
213
  },
210
214
  subdued: "grey.light/navy.100/black.50",
211
215
  accent: "indigo/purple.500/purpleDeep.400",
@@ -227,10 +231,10 @@ const fill = {
227
231
  accent: "purple/purple.500/purpleDeep.400",
228
232
  accentAlt: "purple/purple.100/purpleDeep.900",
229
233
  error: "red/red.500/red.500",
230
- success: "green/green.500/green.700",
231
234
  negative: "red/red.150/red.900",
232
- neutral: "grey.lighter/navy.50/black.100",
233
- disabled: "grey.dark/navy.300/grey.300"
235
+ success: "green/green.500/green.700",
236
+ disabled: "grey.dark/navy.300/grey.300",
237
+ neutral: "grey.lighter/navy.50/black.100"
234
238
  };
235
239
  var _theme = {
236
240
  background: background,
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"theme.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,7 +5,7 @@ interface IconsMap {
5
5
  }
6
6
  export declare const BUNDLED_ICONS: IconsMap;
7
7
  export type IconSources = keyof typeof iconTokens.icons;
8
- export declare const iconColors: ("info" | "amber" | "blue" | "coral" | "graphite" | "graphiteLight" | "green" | "greenDark" | "greenLight" | "grey" | "greyDark" | "greyLight" | "greyLighter" | "indigo" | "indigoDark" | "purple" | "purpleLight" | "red" | "turquoise" | "white" | "base" | "baseInteractive" | "subdued" | "subduedInteractive" | "accent" | "accentInteractive" | "accentAlt" | "accentAltInteractive" | "error" | "errorAlt" | "success" | "successAlt" | "connect" | "connectAlt" | "driver" | "owner" | "warning" | "infoAlt" | "inversed" | "disabled")[];
8
+ export declare const iconColors: ("info" | "amber" | "blue" | "coral" | "graphite" | "graphiteLight" | "green" | "greenDark" | "greenLight" | "grey" | "greyDark" | "greyLight" | "greyLighter" | "indigo" | "indigoDark" | "purple" | "purpleLight" | "red" | "turquoise" | "white" | "base" | "baseInteractive" | "subdued" | "subduedInteractive" | "accent" | "accentInteractive" | "accentAlt" | "accentAltInteractive" | "infoAlt" | "error" | "errorAlt" | "success" | "successAlt" | "warning" | "connect" | "connectAlt" | "driver" | "owner" | "inversed" | "disabled")[];
9
9
  export type IconColorsType = typeof iconColors[number];
10
10
  export interface IconProps {
11
11
  source: IconSources;
@@ -36,6 +36,10 @@ export declare const colors: {
36
36
  blue: string;
37
37
  deprecatedBlueGhost: string;
38
38
  deprecatedDriver: string;
39
+ deprecatedSeasonLow: string;
40
+ deprecatedSeasonMedium: string;
41
+ deprecatedSeasonHigh: string;
42
+ deprecatedSeasonVeryHigh: string;
39
43
  };
40
44
  export declare const countries: {
41
45
  flags: {
@@ -438,6 +442,16 @@ export declare const palette: {
438
442
  "900": string;
439
443
  "1000": string;
440
444
  };
445
+ season: {
446
+ "100": string;
447
+ "200": string;
448
+ "300": string;
449
+ "400": string;
450
+ "700": string;
451
+ "800": string;
452
+ "900": string;
453
+ "1000": string;
454
+ };
441
455
  };
442
456
  export declare const theme: {
443
457
  background: {
@@ -477,6 +491,10 @@ export declare const theme: {
477
491
  disabled: string;
478
492
  neutral: string;
479
493
  neutralAlt: string;
494
+ seasonLow: string;
495
+ seasonMedium: string;
496
+ seasonHigh: string;
497
+ seasonVeryHigh: string;
480
498
  };
481
499
  text: {
482
500
  base: string;
@@ -500,15 +518,15 @@ export declare const theme: {
500
518
  hover: string;
501
519
  };
502
520
  info: string;
521
+ infoAlt: string;
503
522
  error: string;
504
523
  errorAlt: string;
505
524
  success: string;
506
525
  successAlt: string;
526
+ warning: string;
507
527
  connect: string;
508
528
  driver: string;
509
529
  owner: string;
510
- warning: string;
511
- infoAlt: string;
512
530
  inversed: string;
513
531
  };
514
532
  buttonBackground: {
@@ -623,16 +641,16 @@ export declare const theme: {
623
641
  hover: string;
624
642
  };
625
643
  info: string;
644
+ infoAlt: string;
626
645
  error: string;
627
646
  errorAlt: string;
628
647
  success: string;
629
648
  successAlt: string;
649
+ warning: string;
630
650
  connect: string;
631
651
  connectAlt: string;
632
652
  driver: string;
633
653
  owner: string;
634
- warning: string;
635
- infoAlt: string;
636
654
  inversed: string;
637
655
  disabled: string;
638
656
  };
@@ -669,9 +687,9 @@ export declare const theme: {
669
687
  accent: string;
670
688
  accentAlt: string;
671
689
  error: string;
672
- success: string;
673
690
  negative: string;
674
- neutral: string;
691
+ success: string;
675
692
  disabled: string;
693
+ neutral: string;
676
694
  };
677
695
  };
package/utilities.css CHANGED
@@ -2125,6 +2125,22 @@
2125
2125
  border-color: #ffd988
2126
2126
  }
2127
2127
 
2128
+ .c-border-deprecatedSeasonLow {
2129
+ border-color: #BDFFAC
2130
+ }
2131
+
2132
+ .c-border-deprecatedSeasonMedium {
2133
+ border-color: #94EA84
2134
+ }
2135
+
2136
+ .c-border-deprecatedSeasonHigh {
2137
+ border-color: #73C865
2138
+ }
2139
+
2140
+ .c-border-deprecatedSeasonVeryHigh {
2141
+ border-color: #54A949
2142
+ }
2143
+
2128
2144
  .c-border-current {
2129
2145
  border-color: currentColor
2130
2146
  }
@@ -2217,6 +2233,22 @@
2217
2233
  border-color: #ffd988
2218
2234
  }
2219
2235
 
2236
+ .hover\:c-border-deprecatedSeasonLow:hover {
2237
+ border-color: #BDFFAC
2238
+ }
2239
+
2240
+ .hover\:c-border-deprecatedSeasonMedium:hover {
2241
+ border-color: #94EA84
2242
+ }
2243
+
2244
+ .hover\:c-border-deprecatedSeasonHigh:hover {
2245
+ border-color: #73C865
2246
+ }
2247
+
2248
+ .hover\:c-border-deprecatedSeasonVeryHigh:hover {
2249
+ border-color: #54A949
2250
+ }
2251
+
2220
2252
  .hover\:c-border-current:hover {
2221
2253
  border-color: currentColor
2222
2254
  }
@@ -2309,6 +2341,22 @@
2309
2341
  border-color: #ffd988
2310
2342
  }
2311
2343
 
2344
+ .focus\:c-border-deprecatedSeasonLow:focus {
2345
+ border-color: #BDFFAC
2346
+ }
2347
+
2348
+ .focus\:c-border-deprecatedSeasonMedium:focus {
2349
+ border-color: #94EA84
2350
+ }
2351
+
2352
+ .focus\:c-border-deprecatedSeasonHigh:focus {
2353
+ border-color: #73C865
2354
+ }
2355
+
2356
+ .focus\:c-border-deprecatedSeasonVeryHigh:focus {
2357
+ border-color: #54A949
2358
+ }
2359
+
2312
2360
  .focus\:c-border-current:focus {
2313
2361
  border-color: currentColor
2314
2362
  }
@@ -2401,6 +2449,22 @@
2401
2449
  background-color: #ffd988
2402
2450
  }
2403
2451
 
2452
+ .c-bg-deprecatedSeasonLow {
2453
+ background-color: #BDFFAC
2454
+ }
2455
+
2456
+ .c-bg-deprecatedSeasonMedium {
2457
+ background-color: #94EA84
2458
+ }
2459
+
2460
+ .c-bg-deprecatedSeasonHigh {
2461
+ background-color: #73C865
2462
+ }
2463
+
2464
+ .c-bg-deprecatedSeasonVeryHigh {
2465
+ background-color: #54A949
2466
+ }
2467
+
2404
2468
  .c-bg-current {
2405
2469
  background-color: currentColor
2406
2470
  }
@@ -2493,6 +2557,22 @@
2493
2557
  background-color: #ffd988
2494
2558
  }
2495
2559
 
2560
+ .hover\:c-bg-deprecatedSeasonLow:hover {
2561
+ background-color: #BDFFAC
2562
+ }
2563
+
2564
+ .hover\:c-bg-deprecatedSeasonMedium:hover {
2565
+ background-color: #94EA84
2566
+ }
2567
+
2568
+ .hover\:c-bg-deprecatedSeasonHigh:hover {
2569
+ background-color: #73C865
2570
+ }
2571
+
2572
+ .hover\:c-bg-deprecatedSeasonVeryHigh:hover {
2573
+ background-color: #54A949
2574
+ }
2575
+
2496
2576
  .hover\:c-bg-current:hover {
2497
2577
  background-color: currentColor
2498
2578
  }
@@ -2585,6 +2665,22 @@
2585
2665
  background-color: #ffd988
2586
2666
  }
2587
2667
 
2668
+ .focus\:c-bg-deprecatedSeasonLow:focus {
2669
+ background-color: #BDFFAC
2670
+ }
2671
+
2672
+ .focus\:c-bg-deprecatedSeasonMedium:focus {
2673
+ background-color: #94EA84
2674
+ }
2675
+
2676
+ .focus\:c-bg-deprecatedSeasonHigh:focus {
2677
+ background-color: #73C865
2678
+ }
2679
+
2680
+ .focus\:c-bg-deprecatedSeasonVeryHigh:focus {
2681
+ background-color: #54A949
2682
+ }
2683
+
2588
2684
  .focus\:c-bg-current:focus {
2589
2685
  background-color: currentColor
2590
2686
  }
@@ -3089,6 +3185,22 @@
3089
3185
  color: #ffd988
3090
3186
  }
3091
3187
 
3188
+ .c-text-deprecatedSeasonLow {
3189
+ color: #BDFFAC
3190
+ }
3191
+
3192
+ .c-text-deprecatedSeasonMedium {
3193
+ color: #94EA84
3194
+ }
3195
+
3196
+ .c-text-deprecatedSeasonHigh {
3197
+ color: #73C865
3198
+ }
3199
+
3200
+ .c-text-deprecatedSeasonVeryHigh {
3201
+ color: #54A949
3202
+ }
3203
+
3092
3204
  .c-text-transparent {
3093
3205
  color: transparent
3094
3206
  }
@@ -3181,6 +3293,22 @@
3181
3293
  color: #ffd988
3182
3294
  }
3183
3295
 
3296
+ .hover\:c-text-deprecatedSeasonLow:hover {
3297
+ color: #BDFFAC
3298
+ }
3299
+
3300
+ .hover\:c-text-deprecatedSeasonMedium:hover {
3301
+ color: #94EA84
3302
+ }
3303
+
3304
+ .hover\:c-text-deprecatedSeasonHigh:hover {
3305
+ color: #73C865
3306
+ }
3307
+
3308
+ .hover\:c-text-deprecatedSeasonVeryHigh:hover {
3309
+ color: #54A949
3310
+ }
3311
+
3184
3312
  .hover\:c-text-transparent:hover {
3185
3313
  color: transparent
3186
3314
  }
@@ -3273,6 +3401,22 @@
3273
3401
  color: #ffd988
3274
3402
  }
3275
3403
 
3404
+ .focus\:c-text-deprecatedSeasonLow:focus {
3405
+ color: #BDFFAC
3406
+ }
3407
+
3408
+ .focus\:c-text-deprecatedSeasonMedium:focus {
3409
+ color: #94EA84
3410
+ }
3411
+
3412
+ .focus\:c-text-deprecatedSeasonHigh:focus {
3413
+ color: #73C865
3414
+ }
3415
+
3416
+ .focus\:c-text-deprecatedSeasonVeryHigh:focus {
3417
+ color: #54A949
3418
+ }
3419
+
3276
3420
  .focus\:c-text-transparent:focus {
3277
3421
  color: transparent
3278
3422
  }
@@ -3934,6 +4078,22 @@
3934
4078
  background-color: #f8f7f8
3935
4079
  }
3936
4080
 
4081
+ .c-bg-seasonLow {
4082
+ background-color: #BDFFAC
4083
+ }
4084
+
4085
+ .c-bg-seasonMedium {
4086
+ background-color: #94EA84
4087
+ }
4088
+
4089
+ .c-bg-seasonHigh {
4090
+ background-color: #73C865
4091
+ }
4092
+
4093
+ .c-bg-seasonVeryHigh {
4094
+ background-color: #54A949
4095
+ }
4096
+
3937
4097
  .c-bg-fill-base {
3938
4098
  background-color: #333
3939
4099
  }
@@ -3958,22 +4118,22 @@
3958
4118
  background-color: #ff7378
3959
4119
  }
3960
4120
 
3961
- .c-bg-fill-success {
3962
- background-color: #00da94
3963
- }
3964
-
3965
4121
  .c-bg-fill-negative {
3966
4122
  background-color: #ff7378
3967
4123
  }
3968
4124
 
3969
- .c-bg-fill-neutral {
3970
- background-color: #f8f7f8
4125
+ .c-bg-fill-success {
4126
+ background-color: #00da94
3971
4127
  }
3972
4128
 
3973
4129
  .c-bg-fill-disabled {
3974
4130
  background-color: #a49da7
3975
4131
  }
3976
4132
 
4133
+ .c-bg-fill-neutral {
4134
+ background-color: #f8f7f8
4135
+ }
4136
+
3977
4137
  .c-text-base {
3978
4138
  color: #333
3979
4139
  }
@@ -4042,6 +4202,10 @@
4042
4202
  color: #757575
4043
4203
  }
4044
4204
 
4205
+ .c-text-infoAlt {
4206
+ color: #5ecbdd
4207
+ }
4208
+
4045
4209
  .c-text-error {
4046
4210
  color: #ff7378
4047
4211
  }
@@ -4058,6 +4222,10 @@
4058
4222
  color: #fff
4059
4223
  }
4060
4224
 
4225
+ .c-text-warning {
4226
+ color: #ffa484
4227
+ }
4228
+
4061
4229
  .c-text-connect {
4062
4230
  color: #5ecbdd
4063
4231
  }
@@ -4070,14 +4238,6 @@
4070
4238
  color: #fff
4071
4239
  }
4072
4240
 
4073
- .c-text-warning {
4074
- color: #ffa484
4075
- }
4076
-
4077
- .c-text-infoAlt {
4078
- color: #5ecbdd
4079
- }
4080
-
4081
4241
  .c-text-inversed {
4082
4242
  color: #fff
4083
4243
  }
@@ -1,78 +0,0 @@
1
- .cobalt- {
2
- @mixin title-shared-styles {
3
- &.cobalt-text--subdued {
4
- @include text-style--titleSubdued;
5
- }
6
- }
7
-
8
- @mixin body-shared-styles {
9
- &.cobalt-text--subdued {
10
- @include text-style--bodySubdued;
11
- }
12
-
13
- &.cobalt-text--inversed {
14
- @include text-style--bodyInversed;
15
- }
16
-
17
- &.cobalt-text--emphasized,
18
- .cobalt-text--emphasized {
19
- font-weight: 600;
20
- }
21
- }
22
-
23
- &text-heroHeading {
24
- @include text-style-hero-heading;
25
- }
26
-
27
- &text-heroSubheading {
28
- @include text-style-hero-subheading;
29
- }
30
-
31
- &text-titleExtraLarge {
32
- @include text-style-title-extralarge;
33
- @include title-shared-styles;
34
- }
35
-
36
- &text-titleLarge {
37
- @include text-style-title-large;
38
- @include title-shared-styles;
39
- }
40
-
41
- &text-title {
42
- @include text-style-title;
43
- @include title-shared-styles;
44
- }
45
-
46
- &text-titleSmall {
47
- @include text-style-title-small;
48
- @include title-shared-styles;
49
- }
50
-
51
- &text-titleTiny {
52
- @include text-style-title-tiny;
53
- @include title-shared-styles;
54
- }
55
-
56
- &text-bodyLarge {
57
- @include text-style-body-large;
58
- @include body-shared-styles;
59
- }
60
-
61
- &text-body {
62
- @include text-style-body;
63
- @include body-shared-styles;
64
- }
65
-
66
- &text-bodySmall {
67
- @include text-style-body-small;
68
- @include body-shared-styles;
69
- }
70
-
71
- &text-caption {
72
- @include text-style-caption;
73
- }
74
-
75
- &text-sectionHeader {
76
- @include c-text-section-heading;
77
- }
78
- }