@apia/theme 4.0.26 → 4.0.28

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.
@@ -6,7 +6,7 @@ import { Box, ThemeUIProvider, useThemeUI, ThemeProvider } from 'theme-ui';
6
6
  import { forwardRef, useState, useRef, useMemo, Suspense } from 'react';
7
7
  import '@theme-ui/match-media';
8
8
  import { useMount, setValueByPath, EventEmitter } from '@apia/util';
9
- import { spacing as spacing$1, responsive as responsive$2, getOneColorState as getOneColorState$1 } from '@apia/theme';
9
+ import { spacing as spacing$1, responsive as responsive$2, getOneColorState as getOneColorState$1, focusOutline as focusOutline$1 } from '@apia/theme';
10
10
  import { keyframes } from '@emotion/react';
11
11
 
12
12
  function defaultLighten(color, ratio) {
@@ -1169,21 +1169,27 @@ function getThemeColorsObject(theme) {
1169
1169
  schemas,
1170
1170
  scrollbars: {
1171
1171
  bar: {
1172
- color: theme.palette.secondary.main,
1173
- backgroundColor: theme.palette.background.default,
1172
+ color: theme.palette.darkenColor(
1173
+ theme.palette.background.default,
1174
+ 50
1175
+ ),
1176
+ backgroundColor: theme.palette.darkenColor(
1177
+ theme.palette.background.default,
1178
+ 10
1179
+ ),
1174
1180
  hover: {
1175
- backgroundColor: theme.palette.lightenColor(
1181
+ backgroundColor: theme.palette.darkenColor(
1176
1182
  theme.palette.background.default,
1177
1183
  10
1178
1184
  ),
1179
- color: theme.palette.lightenColor(theme.palette.secondary.main, 10)
1185
+ color: theme.palette.darkenColor(theme.palette.border.article, 40)
1180
1186
  },
1181
1187
  active: {
1182
- backgroundColor: theme.palette.lightenColor(
1188
+ backgroundColor: theme.palette.darkenColor(
1183
1189
  theme.palette.background.default,
1184
1190
  10
1185
1191
  ),
1186
- color: theme.palette.lightenColor(theme.palette.secondary.main, 20)
1192
+ color: theme.palette.darkenColor(theme.palette.border.article, 40)
1187
1193
  }
1188
1194
  }
1189
1195
  },
@@ -3012,10 +3018,30 @@ const apiaFinder = {
3012
3018
  }
3013
3019
  };
3014
3020
 
3021
+ const deadSession = {
3022
+ /* PREPEND HERE */
3023
+ display: "flex",
3024
+ flexDirection: "column",
3025
+ gap: 3,
3026
+ ".textAndIcon": {
3027
+ display: "flex",
3028
+ gap: 5,
3029
+ svg: {
3030
+ filter: "saturate(2.2)",
3031
+ color: "iconWarning"
3032
+ }
3033
+ },
3034
+ ".goHomeLink": {
3035
+ color: "palette.text.link",
3036
+ p: "3px"
3037
+ }
3038
+ };
3039
+
3015
3040
  const modals = {
3016
3041
  apiaApi,
3017
3042
  buttonsBar,
3018
3043
  confirm,
3044
+ deadSession,
3019
3045
  ...overlay,
3020
3046
  table,
3021
3047
  tableModal,
@@ -3332,8 +3358,8 @@ const primary$4 = (theme) => {
3332
3358
  "tr.filtersRow, tr.responsiveTable__filters__row": {
3333
3359
  backgroundColor: "components.primaryTable.body.backgroundColor",
3334
3360
  boxShadow: "tableFilters",
3335
- "th.noFilter": {
3336
- background: "transparent"
3361
+ "td.noFilter[class]": {
3362
+ background: "form.fields.disabled.backgroundColor"
3337
3363
  },
3338
3364
  "td.requiredFilter__Border": {
3339
3365
  borderLeftStyle: "solid !important",
@@ -3782,8 +3808,8 @@ const clean = (theme) => {
3782
3808
  },
3783
3809
  "tr.filtersRow, tr.responsiveTable__filters__row": {
3784
3810
  backgroundColor: "components.cleanTable.body.backgroundColor",
3785
- "th.noFilter": {
3786
- background: "transparent"
3811
+ "td.noFilter[class]": {
3812
+ background: "form.fields.disabled.backgroundColor"
3787
3813
  },
3788
3814
  "td.requiredFilter__Border": {
3789
3815
  borderLeftStyle: "solid !important",
@@ -4465,7 +4491,8 @@ const accordion = {
4465
4491
  "&, .accordion__item": {
4466
4492
  display: "flex",
4467
4493
  flexDirection: "column",
4468
- alignItems: "stretch"
4494
+ alignItems: "stretch",
4495
+ flexShrink: 0
4469
4496
  },
4470
4497
  ".accordion__item__button__rightGroup": {
4471
4498
  flexShrink: 0
@@ -4782,6 +4809,7 @@ const autocomplete = {
4782
4809
  position: "absolute",
4783
4810
  right: "20px",
4784
4811
  top: "calc(50% - 12px)",
4812
+ pointerEvents: "none",
4785
4813
  ".autocomplete__loadingSpinner": {
4786
4814
  width: "24px",
4787
4815
  height: "24px"
@@ -5033,6 +5061,275 @@ const fileCard = {
5033
5061
  }
5034
5062
  };
5035
5063
 
5064
+ const scheduler = {
5065
+ variant: "layout.execution.form.fields.field",
5066
+ details: {
5067
+ ".no__appoinments": {
5068
+ border: "1px solid",
5069
+ borderColor: "palette.border.field",
5070
+ padding: "10px"
5071
+ },
5072
+ ".appoinments__details": {
5073
+ width: "100%",
5074
+ textAlign: "left",
5075
+ border: "1px solid",
5076
+ borderColor: "palette.border.field",
5077
+ borderRadius: "default"
5078
+ },
5079
+ ".appoinments__details_attribute": {
5080
+ minWidth: "200px"
5081
+ },
5082
+ th: {
5083
+ padding: 3
5084
+ },
5085
+ td: {
5086
+ borderTop: "1px solid",
5087
+ borderTopColor: "palette.border.field",
5088
+ padding: 3
5089
+ }
5090
+ },
5091
+ "&.scheduler": {
5092
+ display: "flex",
5093
+ justifyContent: "center",
5094
+ flexDirection: "column",
5095
+ width: "100%",
5096
+ position: "relative",
5097
+ textAlign: "center",
5098
+ ".selectedDateInfo": {
5099
+ margin: "5px",
5100
+ minHeight: "25px",
5101
+ display: "flex",
5102
+ justifyContent: "center"
5103
+ },
5104
+ ".delete_date_button": {
5105
+ display: "none"
5106
+ },
5107
+ table: {
5108
+ variant: "layout.common.tables.primary",
5109
+ width: "100%",
5110
+ overflow: "hidden",
5111
+ border: " 1px solid",
5112
+ borderColor: "palette.border.field",
5113
+ borderCollapse: "collapse",
5114
+ thead: {
5115
+ "tr:not(.filtersRow)": {
5116
+ "th:first-of-type": {
5117
+ width: "80px"
5118
+ },
5119
+ th: {
5120
+ width: "auto",
5121
+ border: "none",
5122
+ borderColor: "palette.primary.main",
5123
+ textAlign: "center",
5124
+ px: 1,
5125
+ ".headButton__container": {
5126
+ display: "flex",
5127
+ justifyContent: "center"
5128
+ },
5129
+ ".headButton__label": {
5130
+ overflow: "hidden",
5131
+ textOverflow: "ellipsis",
5132
+ whiteSpace: "nowrap",
5133
+ px: 0
5134
+ },
5135
+ "& .headButton": {
5136
+ backgroundColor: "palette.primary.main",
5137
+ border: "none",
5138
+ px: 1,
5139
+ // py: 3,
5140
+ borderColor: "palette.primary.main"
5141
+ }
5142
+ }
5143
+ }
5144
+ },
5145
+ tbody: {
5146
+ tr: {
5147
+ "td:first-of-type": {
5148
+ display: "flex",
5149
+ alignItems: "center",
5150
+ justifyContent: "center"
5151
+ }
5152
+ },
5153
+ td: {
5154
+ p: 0,
5155
+ height: "40px",
5156
+ textAlign: "center",
5157
+ alignContent: "center",
5158
+ border: " 1px solid",
5159
+ borderColor: "palette.primary.main",
5160
+ "&.disabled": {
5161
+ background: (theme) => getOneColorState$1(
5162
+ "palette.background.paper",
5163
+ "disabled",
5164
+ theme.palette
5165
+ )
5166
+ },
5167
+ "&:focus-within": focusOutline$1
5168
+ }
5169
+ }
5170
+ },
5171
+ ".box_spinner": (theme) => ({
5172
+ position: "relative",
5173
+ alignItems: "center",
5174
+ justifyContent: "center",
5175
+ alignSelf: "center",
5176
+ width: "100%",
5177
+ height: "65%",
5178
+ marginTop: "20px",
5179
+ display: "flex",
5180
+ background: tinycolor(theme.palette.background.paper).setAlpha(0.4).toRgbString()
5181
+ }),
5182
+ ".scheduler__navigator": {
5183
+ gap: spacing$1(4),
5184
+ display: "flex",
5185
+ justifyContent: "center",
5186
+ flexWrap: "wrap",
5187
+ ".scheduler__navigator_dateInput input": {
5188
+ textAlign: "center",
5189
+ width: "380px",
5190
+ borderTopRightRadius: 0,
5191
+ borderBottomRightRadius: 0
5192
+ },
5193
+ ".scheduler__navigator_dateInput": {
5194
+ width: responsive$2({ 0: "100%", 3: "auto", 4: "100%", 5: "auto" }),
5195
+ order: responsive$2({ 0: 1, 3: 3, 4: 1, 5: 3 })
5196
+ },
5197
+ ".scheduler__navigator_todayBtn": {
5198
+ order: responsive$2({ 0: 2, 3: 1, 4: 2, 5: 1 })
5199
+ },
5200
+ ".scheduler__navigator_lastBtn": {
5201
+ order: responsive$2({ 0: 3, 3: 2, 4: 3, 5: 2 })
5202
+ },
5203
+ ".scheduler__navigator_nextBtn": {
5204
+ order: responsive$2({ 0: 4, 3: 4, 4: 4, 5: 4 })
5205
+ },
5206
+ ".scheduler__navigator_DeleteBtn": {
5207
+ order: responsive$2({ 0: 5, 3: 5, 4: 5, 5: 5 })
5208
+ },
5209
+ ".iconInput": {
5210
+ margin: responsive$2({ 0: "auto", 3: "0", 4: "auto", 5: "0" }),
5211
+ width: responsive$2({
5212
+ 0: "max-content",
5213
+ 1: "auto",
5214
+ 2: "max-content",
5215
+ 3: "auto",
5216
+ 4: "max-content",
5217
+ 5: "auto"
5218
+ }),
5219
+ gap: 0,
5220
+ ".iconButton": {
5221
+ border: "none",
5222
+ background: "palette.background.paper"
5223
+ }
5224
+ },
5225
+ ".iconButton": {
5226
+ borderTopLeftRadius: 0,
5227
+ borderBottomLeftRadius: 0
5228
+ }
5229
+ },
5230
+ ".scheduler__tskSchDisabled": {
5231
+ backgroundColor: "#b2c0cf",
5232
+ cursor: "not-allowed"
5233
+ },
5234
+ ".schedulerMini": {
5235
+ flex: 1,
5236
+ display: responsive$2({ 0: "block", 3: "flex" }),
5237
+ alignItems: responsive$2({ 0: "center", 3: "start" }),
5238
+ justifyContent: "center",
5239
+ flexDirection: responsive$2({ 0: "column", 3: "row" }),
5240
+ maxHeight: responsive$2({ 0: "100vh", 3: "60vh" }),
5241
+ gap: spacing$1(7),
5242
+ ".schedulerMini_faCaretDown": {
5243
+ flex: 1,
5244
+ alignSelf: "center",
5245
+ justifyContent: "center",
5246
+ display: responsive$2({ 0: "block", 3: "none" })
5247
+ }
5248
+ },
5249
+ ".stage": {
5250
+ display: "flex",
5251
+ flexDirection: "column",
5252
+ maxHeight: responsive$2({ 0: "auto", 3: "60vh" }),
5253
+ width: responsive$2({ 0: "100%", 3: "60%" }),
5254
+ zIndex: 1,
5255
+ transition: "width 1s"
5256
+ },
5257
+ '[data-name="daysList"]': {
5258
+ transition: "transform 0.5s, opacity 0.8s",
5259
+ transform: responsive$2({ 0: "translateY(-10%)", 3: "translateY(-40%)" }),
5260
+ opacity: 0,
5261
+ width: 0
5262
+ },
5263
+ '[data-name="morningOrAfternoon"]': {
5264
+ transition: "transform 0.5s, opacity 0.8s",
5265
+ transform: responsive$2({ 0: "translateY(-10%)", 3: "translateY(-40%)" }),
5266
+ opacity: 0,
5267
+ width: 0
5268
+ },
5269
+ '[data-name="daysHours"]': {
5270
+ transition: "transform 0.5s, opacity 0.8s",
5271
+ transform: responsive$2({ 0: "translateY(-10%)", 3: "translateY(-40%)" }),
5272
+ opacity: 0,
5273
+ width: 0
5274
+ },
5275
+ ".stage.in.visible": {
5276
+ opacity: 1,
5277
+ transform: responsive$2({ 0: "translateY(0)", 3: "translateY(0)" }),
5278
+ width: responsive$2({ 0: "100%", 3: "60%" })
5279
+ },
5280
+ '[data-name="daysList"] .stage.in.visible': {
5281
+ opacity: 1,
5282
+ transform: responsive$2({ 0: "translateY(0)", 3: "translateY(0)" }),
5283
+ width: responsive$2({ 0: "100%", 3: "60%" })
5284
+ },
5285
+ ".stage:nth-of-type(3)": {
5286
+ maxHeight: responsive$2({ 0: "auto", 3: "60vh" }),
5287
+ overflow: responsive$2({ 0: "none", 3: "auto" })
5288
+ },
5289
+ ".stage_btn": {
5290
+ margin: "2px",
5291
+ "&.selected": {
5292
+ position: "sticky",
5293
+ top: 0,
5294
+ variant: "buttons.primary",
5295
+ bottom: 0,
5296
+ zIndex: 1
5297
+ },
5298
+ "&:disabled:hover": {
5299
+ backgroundColor: "palette.gray.800",
5300
+ color: "palette.common.black"
5301
+ }
5302
+ },
5303
+ ".stage_btn:disabled": {
5304
+ display: responsive$2({ 0: "none", 3: "block" })
5305
+ },
5306
+ ".td_overassign": {
5307
+ backgroundColor: "palette.warning.main"
5308
+ }
5309
+ },
5310
+ ".schd__info_disabledColor": {
5311
+ background: (theme) => getOneColorState$1("palette.background.paper", "disabled", theme.palette),
5312
+ "&:hover, &:focus, &:active": {
5313
+ background: (theme) => getOneColorState$1("palette.background.paper", "disabled", theme.palette)
5314
+ }
5315
+ },
5316
+ ".scheduler_cell": {
5317
+ height: "100%",
5318
+ display: "flex",
5319
+ flexDirection: "row",
5320
+ alignItems: "center",
5321
+ justifyContent: "center",
5322
+ button: {
5323
+ width: "100%",
5324
+ height: "100%"
5325
+ },
5326
+ "*:focus": {
5327
+ outline: "none"
5328
+ }
5329
+ }
5330
+ /* PREPEND HERE */
5331
+ };
5332
+
5036
5333
  const components = {
5037
5334
  /* PREPEND HERE */
5038
5335
  accordion,
@@ -5040,6 +5337,7 @@ const components = {
5040
5337
  datePicker,
5041
5338
  pagination,
5042
5339
  chat: chat$1,
5340
+ scheduler,
5043
5341
  toolbar,
5044
5342
  aiMessage,
5045
5343
  infoButton,
@@ -6965,7 +7263,7 @@ async function getRemarkable(extensions) {
6965
7263
 
6966
7264
  const parseMarkdown = async (options) => {
6967
7265
  const markdownLibrary = await getRemarkable(options.extensions);
6968
- const css = (await import('./styles-CBUqGoTy.js')).markdownParserStyles ?? new ErrorImporting();
7266
+ const css = (await import('./styles-CXTekHxN.js')).markdownParserStyles ?? new ErrorImporting();
6969
7267
  if (css instanceof ErrorImporting)
6970
7268
  throw new Error("Could not import css, cannot continue");
6971
7269
  const html = options.htmlTemplate ?? (await import('./html-B-K0BIiw.js')).markdownHtml ?? new ErrorImporting();
@@ -7423,4 +7721,4 @@ class MarkdownBuilder {
7423
7721
  }
7424
7722
 
7425
7723
  export { ApiaThemeProvider as A, MarkdownTableOfContents as B, Form as F, MaterialInput as M, Table as T, getColorStates as a, getColorsAndStatesByDefinition as b, getColorsAndStatesByPath as c, getColorsByDefinition as d, getColorsByPath as e, getOneColorState as f, getColorState as g, applyStatesGetColor as h, makeStyledComponent as i, injectStyles as j, getSpacingLayouts as k, spacing as l, markdownExtensions as m, smallButton as n, focusOutline as o, parsePalette as p, getVariant as q, responsive$1 as r, spacingLayouts as s, MarkdownBlock as t, useMainTheme as u, MarkdownBuilder as v, parseMarkdown as w, MarkdownList as x, MarkdownParagraph as y, MarkdownTable as z };
7426
- //# sourceMappingURL=index-CPxF1D8S.js.map
7724
+ //# sourceMappingURL=index-BAf35hV5.js.map