@lavalogic/scoria 0.40.18 → 0.40.19

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.
@@ -771,6 +771,9 @@ $effect(() => {
771
771
  {#if apt.sublabel}
772
772
  <span class="apt-sublabel">{apt.sublabel}</span>
773
773
  {/if}
774
+ {#if apt.reference}
775
+ <span class="apt-reference">Ref: {apt.reference}</span>
776
+ {/if}
774
777
  </div>
775
778
  {/each}
776
779
  </div>
@@ -1044,11 +1047,15 @@ $effect(() => {
1044
1047
  color: #259fc7;
1045
1048
  }
1046
1049
  .appointment-block.outbound {
1047
- border-color: #e7b100;
1048
- background-color: #f0faf0;
1050
+ border-color: #66bb6a;
1051
+ background-color: #eaf7ec;
1049
1052
  }
1050
1053
  .appointment-block.outbound .apt-type {
1051
- color: #e7b100;
1054
+ color: #2e7d32;
1055
+ }
1056
+ .appointment-block.outbound:hover {
1057
+ background-color: #dcefdd;
1058
+ border-color: #43a047;
1052
1059
  }
1053
1060
 
1054
1061
  .apt-type {
@@ -1067,6 +1074,12 @@ $effect(() => {
1067
1074
  font-size: 0.75rem;
1068
1075
  }
1069
1076
 
1077
+ .apt-reference {
1078
+ color: #647d8e;
1079
+ font-size: 0.75rem;
1080
+ font-weight: 600;
1081
+ }
1082
+
1070
1083
  .week-day-tabs {
1071
1084
  display: flex;
1072
1085
  flex-flow: row nowrap;
@@ -29,6 +29,8 @@ export interface CalendarAppointment {
29
29
  readonly typeCode: string;
30
30
  readonly label: string;
31
31
  readonly sublabel?: string;
32
+ /** Optional booking reference shown on the appointment card. */
33
+ readonly reference?: string;
32
34
  }
33
35
  export interface CalendarDoor {
34
36
  readonly id: number;
@@ -82,7 +82,7 @@ function handleChange(e) {
82
82
  />
83
83
  {/if}
84
84
  <input
85
- step={type === 'datetime-local' ? 1 : 'any'}
85
+ step={type === 'datetime-local' ? 1 : type === 'time' ? 60 : 'any'}
86
86
  class:invalid={isInvalid}
87
87
  class:left-pad={leftIcon != undefined}
88
88
  class:right-pad={rightIcon != undefined}
@@ -1,3 +1,4 @@
1
1
  import type { DateOnlyInputProps } from './DateOnlyInputProps.js';
2
2
  import type { DateTimeInputProps } from './DateTimeInputProps.js';
3
- export type DateInputProps = DateOnlyInputProps | DateTimeInputProps;
3
+ import type { TimeInputProps } from './TimeInputProps.js';
4
+ export type DateInputProps = DateOnlyInputProps | DateTimeInputProps | TimeInputProps;
@@ -0,0 +1,51 @@
1
+ import type { InputVariant } from '../Types/Internal/InputVariant.js';
2
+ import type { InputTime } from '../Types/Internal/Misc.js';
3
+ import type { PartialIconProps } from './PartialIconProps.js';
4
+ /**
5
+ * Props for the `time` variant of {@link DateInput}.
6
+ *
7
+ * Renders a native `<input type="time">` with the same overlapping-label
8
+ * border chrome as the date/datetime variants. `value` is branded with
9
+ * {@link InputTime} (`HH:MM`); the empty string is a known sentinel that
10
+ * the consumer is expected to handle when binding.
11
+ */
12
+ export interface TimeInputProps {
13
+ /** Discriminator. Must be the literal `'time'`. */
14
+ type: 'time';
15
+ /**
16
+ * Bindable time value (`HH:MM`). `''` or `null` represent "no time
17
+ * selected" — both are accepted because consumers commonly back the
18
+ * binding with a nullable field; the component treats them alike.
19
+ */
20
+ value?: InputTime | '' | null;
21
+ /** Label rendered above the input. */
22
+ label?: string;
23
+ /** Native `placeholder` attribute. */
24
+ placeholder?: string;
25
+ /** Native `required` attribute. */
26
+ required?: boolean;
27
+ /** Render the "- optional" suffix next to `label`. */
28
+ optional?: boolean;
29
+ /** Render variant. See {@link InputVariant}. */
30
+ variant?: InputVariant;
31
+ /** Native `min` constraint. */
32
+ min?: InputTime;
33
+ /** Native `max` constraint. */
34
+ max?: InputTime;
35
+ /** Native `disabled` attribute. */
36
+ disabled?: boolean;
37
+ /** Icon rendered on the left of the input. */
38
+ leftIcon?: PartialIconProps;
39
+ /** Icon rendered on the right of the input. */
40
+ rightIcon?: PartialIconProps;
41
+ /** Bindable reference to the underlying `<input>` element. */
42
+ inputRef?: HTMLInputElement;
43
+ /** Force the invalid visual state. */
44
+ invalid?: boolean;
45
+ /** Blur handler. */
46
+ onblur?: (e: FocusEvent) => void;
47
+ /** Focus handler. */
48
+ onfocus?: (e: FocusEvent) => void;
49
+ /** Change handler. May return `void` or `Promise<void>`. */
50
+ onchange?: (value: InputTime | null) => void | Promise<void>;
51
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -69,6 +69,8 @@ export type ScoriaStorageKey = BrandedString<'ScoriaStorageKey'>;
69
69
  export type InputDate = BrandedString<'InputDate'>;
70
70
  /** ISO date-time string of the form `YYYY-MM-DDTHH:MM:SS`. */
71
71
  export type InputDateWithTime = BrandedString<'InputDateWithTime'>;
72
+ /** ISO time-only string of the form `HH:MM`. */
73
+ export type InputTime = BrandedString<'InputTime'>;
72
74
  /** Date string formatted for the FloWMS SQL backend. */
73
75
  export type SQLDate = BrandedString<'SQLDate'>;
74
76
  /** Integer centimetre count. Used by dimension inputs. */
package/dist/index.d.ts CHANGED
@@ -41,6 +41,7 @@ export type { DateOnlyInputProps } from './Components/DateOnlyInputProps.js';
41
41
  export { default as DatePicker } from './Components/DatePicker.svelte';
42
42
  export { type DatePickerProps } from './Components/DatePickerProps.js';
43
43
  export type { DateTimeInputProps } from './Components/DateTimeInputProps.js';
44
+ export type { TimeInputProps } from './Components/TimeInputProps.js';
44
45
  export { default as DesktopModal } from './Components/DesktopModal.svelte';
45
46
  export type { DesktopModalProps } from './Components/DesktopModalProps.js';
46
47
  export { default as Dial } from './Components/Dial.svelte';
@@ -210,7 +211,7 @@ export { type GridStringItem } from './Types/Internal/GridStringItem.js';
210
211
  export { type GridTextItem } from './Types/Internal/GridTextItem.js';
211
212
  export { type IdentifiableToastMessage } from './Types/Internal/IdentifiableToastMessage.js';
212
213
  export { InputVariant } from './Types/Internal/InputVariant.js';
213
- export { type BrandedInteger, type BrandedNumber, type BrandedString, type Centimetres, type CssLength, type InputDate, type InputDateWithTime, type NonNullableKey, type Pixels, type ScoriaStorageKey, type SQLDate, type Unsubscriber, type Uuid, type ValueProp, } from './Types/Internal/Misc.js';
214
+ export { type BrandedInteger, type BrandedNumber, type BrandedString, type Centimetres, type CssLength, type InputDate, type InputDateWithTime, type InputTime, type NonNullableKey, type Pixels, type ScoriaStorageKey, type SQLDate, type Unsubscriber, type Uuid, type ValueProp, } from './Types/Internal/Misc.js';
214
215
  export { type RefWrapper } from './Types/Internal/RefWrapper.js';
215
216
  export { type SelectOption } from './Types/Internal/SelectOption.js';
216
217
  export { Shape } from './Types/Internal/Shape.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lavalogic/scoria",
3
3
  "description": "Svelte components used for the FloWMS Web Frontend",
4
- "version": "0.40.18",
4
+ "version": "0.40.19",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },