@veeqo/ui 15.15.2 → 15.15.4

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 (39) hide show
  1. package/README.md +40 -29
  2. package/dist/components/Calendars/components/Calendar/Calendar.module.scss.cjs +2 -2
  3. package/dist/components/Calendars/components/Calendar/Calendar.module.scss.cjs.map +1 -1
  4. package/dist/components/Calendars/components/Calendar/Calendar.module.scss.js +2 -2
  5. package/dist/components/Calendars/components/Calendar/Calendar.module.scss.js.map +1 -1
  6. package/dist/components/Calendars/components/RangeCalendar/RangeCalendar.module.scss.cjs +2 -2
  7. package/dist/components/Calendars/components/RangeCalendar/RangeCalendar.module.scss.cjs.map +1 -1
  8. package/dist/components/Calendars/components/RangeCalendar/RangeCalendar.module.scss.js +2 -2
  9. package/dist/components/Calendars/components/RangeCalendar/RangeCalendar.module.scss.js.map +1 -1
  10. package/dist/components/DateInputField/DateInputField.cjs +6 -5
  11. package/dist/components/DateInputField/DateInputField.cjs.map +1 -1
  12. package/dist/components/DateInputField/DateInputField.d.ts +1 -1
  13. package/dist/components/DateInputField/DateInputField.js +6 -5
  14. package/dist/components/DateInputField/DateInputField.js.map +1 -1
  15. package/dist/components/DateInputField/DateInputField.module.scss.cjs +2 -2
  16. package/dist/components/DateInputField/DateInputField.module.scss.cjs.map +1 -1
  17. package/dist/components/DateInputField/DateInputField.module.scss.js +2 -2
  18. package/dist/components/DateInputField/DateInputField.module.scss.js.map +1 -1
  19. package/dist/components/DateInputField/types.d.ts +1 -0
  20. package/dist/components/DatePicker/DatePicker.cjs +1 -1
  21. package/dist/components/DatePicker/DatePicker.cjs.map +1 -1
  22. package/dist/components/DatePicker/DatePicker.js +1 -1
  23. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  24. package/dist/components/DateRangePicker/DateRangePicker.cjs +12 -6
  25. package/dist/components/DateRangePicker/DateRangePicker.cjs.map +1 -1
  26. package/dist/components/DateRangePicker/DateRangePicker.js +12 -6
  27. package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
  28. package/dist/components/PhoneInput/types.d.ts +16 -0
  29. package/dist/components/PriceInput/types.d.ts +10 -0
  30. package/dist/components/Search/types.d.ts +5 -0
  31. package/dist/hoc/withLabels/withLabels.cjs.map +1 -1
  32. package/dist/hoc/withLabels/withLabels.d.ts +7 -0
  33. package/dist/hoc/withLabels/withLabels.js.map +1 -1
  34. package/dist/hoc/withLabels/withLabels.module.scss.cjs +2 -2
  35. package/dist/hoc/withLabels/withLabels.module.scss.cjs.map +1 -1
  36. package/dist/hoc/withLabels/withLabels.module.scss.js +2 -2
  37. package/dist/hoc/withLabels/withLabels.module.scss.js.map +1 -1
  38. package/dist/icons/design-system/icons.figma.batch.d.ts +8 -0
  39. package/package.json +11 -6
@@ -1,4 +1,4 @@
1
- import React__default, { useCallback, useMemo, useEffect } from 'react';
1
+ import React__default, { useState, useCallback, useMemo, useEffect } from 'react';
2
2
  import { Action } from '../Action/Action.js';
3
3
  import { Select } from '../Select/Select.js';
4
4
  import { DateInputField } from '../DateInputField/index.js';
@@ -9,11 +9,11 @@ import '@internationalized/date';
9
9
  import '../Calendars/types.js';
10
10
  import '../Calendars/data/constants.js';
11
11
  import '../Button/Button.js';
12
- import { Stack } from '../Stack/Stack.js';
12
+ import '../Stack/Stack.js';
13
13
  import '../Calendars/components/subcomponents/CalendarHeading.js';
14
14
  import { useIsDateUnavailable } from '../Calendars/data/useIsDateUnavailable.js';
15
15
  import { Card } from '../Card/Card.js';
16
- import { theme } from '../../theme/index.js';
16
+ import { FlexCol } from '../Flex/FlexCol/FlexCol.js';
17
17
  import { ComparePreviousPeriod } from './components/ComparePreviousPeriod.js';
18
18
  import { checkForMatchingPreset, DATE_RANGE_OPTIONS, getDateRange, DateRanges } from './constants.js';
19
19
  import { Divider } from './components/Divider.js';
@@ -28,6 +28,7 @@ showDatePresets = true, onReset,
28
28
  disabledRanges, disallowWeekends, maxValue, minValue, selectedPreset, setSelectedPreset, selectedRange, setSelectedRange,
29
29
  // Previous period props
30
30
  'aria-describedby': ariaDescribedBy, 'aria-label': ariaLabel, ...previousPeriodProps }) => {
31
+ const [isCalendarFocused, setIsCalendarFocused] = useState(false);
31
32
  const { isDateRangeUnavailable } = useIsDateUnavailable({
32
33
  disabledRanges,
33
34
  disallowWeekends,
@@ -60,12 +61,17 @@ disabledRanges, disallowWeekends, maxValue, minValue, selectedPreset, setSelecte
60
61
  else
61
62
  setSelectedPreset(DATE_RANGE_OPTIONS[0]); // Otherwise, select "custom" option.
62
63
  }, [matchedPreset, setSelectedPreset]);
63
- return (React__default.createElement(Stack, { direction: "vertical", alignX: "stretch", spacing: "0", style: { gap: theme.sizes.base, ...style }, className: className, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel },
64
+ return (React__default.createElement(FlexCol, { gap: "base", alignItems: "stretch", style: style, className: className, "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel },
64
65
  showDatePresets && (React__default.createElement(Select, { disabled: isDisabled, label: "Date Range", options: DATE_RANGE_OPTIONS, value: selectedPreset === null || selectedPreset === void 0 ? void 0 : selectedPreset.value, onChange: updateRangePreset })),
65
- React__default.createElement(DateInputField, { isRangeInput: true, disabled: isDisabled, label: "Start date - End date", onChangeStartDate: updateDateSegment('start'), onChangeEndDate: updateDateSegment('end'), startValue: selectedRange && selectedRange.start, endValue: selectedRange && selectedRange.end, error: isDateRangeInvalid ? 'Range contains invalid dates' : undefined, disabledRanges: disabledRanges, disallowWeekends: disallowWeekends, maxValue: maxValue, minValue: minValue }),
66
+ React__default.createElement(DateInputField, { isRangeInput: true, disabled: isDisabled, isOpen: isCalendarFocused, label: "Start date - End date", onChangeStartDate: updateDateSegment('start'), onChangeEndDate: updateDateSegment('end'), startValue: selectedRange && selectedRange.start, endValue: selectedRange && selectedRange.end, error: isDateRangeInvalid ? 'Range contains invalid dates' : undefined, disabledRanges: disabledRanges, disallowWeekends: disallowWeekends, maxValue: maxValue, minValue: minValue }),
66
67
  previousPeriodProps.showPreviousPeriod && React__default.createElement(ComparePreviousPeriod, { ...previousPeriodProps }),
67
68
  React__default.createElement(Divider, null),
68
- React__default.createElement(Stack, { alignX: "center" },
69
+ React__default.createElement(FlexCol, { alignItems: "center", gap: "base", onFocus: () => setIsCalendarFocused(true), onBlur: (e) => {
70
+ const related = e.relatedTarget;
71
+ if (!e.currentTarget.contains(related instanceof Node ? related : null)) {
72
+ setIsCalendarFocused(false);
73
+ }
74
+ } },
69
75
  React__default.createElement(RangeCalendar, { "aria-label": "Selected Date Range", isDisabled: isDisabled, value: selectedRange, onChange: setSelectedRange, disabledRanges: disabledRanges, maxValue: maxValue, minValue: minValue, disallowWeekends: disallowWeekends })),
70
76
  !!onReset && (React__default.createElement(React__default.Fragment, null,
71
77
  React__default.createElement(Divider, null),
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangePicker.js","sources":["../../../src/components/DateRangePicker/DateRangePicker.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo } from 'react';\nimport type { DateRange, DateValue } from 'react-aria-components';\nimport { Action } from '../Action';\nimport { Select } from '../Select';\nimport { DateInputField } from '../DateInputField';\nimport { RangeCalendar, useIsDateUnavailable } from '../Calendars';\nimport { Card } from '../Card';\nimport { theme } from '../../theme';\nimport { Stack } from '../Stack';\nimport { ComparePreviousPeriod } from './components/ComparePreviousPeriod';\nimport { DATE_RANGE_OPTIONS, DateRanges, checkForMatchingPreset, getDateRange } from './constants';\nimport { Divider } from './components/Divider';\nimport { DateRangePickerProps } from './types';\nimport styles from './DateRangePicker.module.scss';\n\nexport const DateRangePicker = ({\n // Style props\n className,\n style,\n isDisabled,\n // Customizable options\n showDatePresets = true,\n onReset,\n // Calendar props\n disabledRanges,\n disallowWeekends,\n maxValue,\n minValue,\n selectedPreset,\n setSelectedPreset,\n selectedRange,\n setSelectedRange,\n // Previous period props\n 'aria-describedby': ariaDescribedBy,\n 'aria-label': ariaLabel,\n ...previousPeriodProps\n}: DateRangePickerProps) => {\n const { isDateRangeUnavailable } = useIsDateUnavailable({\n disabledRanges,\n disallowWeekends,\n maxValue,\n minValue,\n });\n\n const updateRangePreset = (selectedValue: string) => {\n setSelectedRange(getDateRange(DateRanges[selectedValue as DateRanges]));\n setSelectedPreset(\n DATE_RANGE_OPTIONS.find(({ value }) => value === selectedValue) || DATE_RANGE_OPTIONS[0],\n );\n };\n\n const updateDateSegment = useCallback(\n (slot: 'start' | 'end') => (value: DateValue | null) => {\n if (!value) return;\n\n const newRange = {\n start: slot === 'start' ? value : selectedRange?.start,\n end: slot === 'end' ? value : selectedRange?.end,\n } as DateRange;\n\n setSelectedRange(newRange);\n },\n [selectedRange?.end, selectedRange?.start, setSelectedRange],\n );\n\n const isDateRangeInvalid = useMemo(\n () => isDateRangeUnavailable(selectedRange),\n [isDateRangeUnavailable, selectedRange],\n );\n\n // Memoize finding preset since checkForMatchingPreset isn't quick.\n const matchedPreset = useMemo(() => {\n if (!selectedRange) return null;\n return checkForMatchingPreset(selectedRange);\n }, [selectedRange]);\n\n useEffect(() => {\n if (matchedPreset)\n setSelectedPreset(matchedPreset); // If selected value is a preset, set it.\n else setSelectedPreset(DATE_RANGE_OPTIONS[0]); // Otherwise, select \"custom\" option.\n }, [matchedPreset, setSelectedPreset]);\n\n return (\n <Stack\n direction=\"vertical\"\n alignX=\"stretch\"\n spacing=\"0\"\n style={{ gap: theme.sizes.base, ...style }}\n className={className}\n aria-describedby={ariaDescribedBy}\n aria-label={ariaLabel}\n >\n {showDatePresets && (\n <Select\n disabled={isDisabled}\n label=\"Date Range\"\n options={DATE_RANGE_OPTIONS}\n value={selectedPreset?.value}\n onChange={updateRangePreset}\n />\n )}\n\n <DateInputField\n isRangeInput\n disabled={isDisabled}\n label=\"Start date - End date\"\n onChangeStartDate={updateDateSegment('start')}\n onChangeEndDate={updateDateSegment('end')}\n startValue={selectedRange && selectedRange.start}\n endValue={selectedRange && selectedRange.end}\n error={isDateRangeInvalid ? 'Range contains invalid dates' : undefined}\n disabledRanges={disabledRanges}\n disallowWeekends={disallowWeekends}\n maxValue={maxValue}\n minValue={minValue}\n />\n\n {previousPeriodProps.showPreviousPeriod && <ComparePreviousPeriod {...previousPeriodProps} />}\n\n <Divider />\n\n <Stack alignX=\"center\">\n <RangeCalendar\n aria-label=\"Selected Date Range\"\n isDisabled={isDisabled}\n value={selectedRange}\n onChange={setSelectedRange}\n disabledRanges={disabledRanges}\n maxValue={maxValue}\n minValue={minValue}\n disallowWeekends={disallowWeekends}\n />\n </Stack>\n\n {!!onReset && (\n <>\n <Divider />\n <Card.Footer className={styles.resetFooter}>\n <Action variant=\"default\" size=\"sm\" onClick={onReset} disabled={isDisabled}>\n Reset\n </Action>\n </Card.Footer>\n </>\n )}\n </Stack>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeO,MAAM,eAAe,GAAG,CAAC;AAC9B;AACA,SAAS,EACT,KAAK,EACL,UAAU;AACV;AACA,eAAe,GAAG,IAAI,EACtB,OAAO;AACP;AACA,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB;AAChB;AACA,kBAAkB,EAAE,eAAe,EACnC,YAAY,EAAE,SAAS,EACvB,GAAG,mBAAmB,EACD,KAAI;AACzB,IAAA,MAAM,EAAE,sBAAsB,EAAE,GAAG,oBAAoB,CAAC;QACtD,cAAc;QACd,gBAAgB;QAChB,QAAQ;QACR,QAAQ;AACT,KAAA,CAAC;AAEF,IAAA,MAAM,iBAAiB,GAAG,CAAC,aAAqB,KAAI;QAClD,gBAAgB,CAAC,YAAY,CAAC,UAAU,CAAC,aAA2B,CAAC,CAAC,CAAC;QACvE,iBAAiB,CACf,kBAAkB,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,KAAK,aAAa,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,CACzF;AACH,IAAA,CAAC;AAED,IAAA,MAAM,iBAAiB,GAAG,W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CAAA,aAAA,CAAC,aAAa,EAAA,EAAA,YAAA,EACD,qBAAqB,EAChC,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,gBAAgB,EAC1B,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,GAClC,CACI;QAEP,CAAC,CAAC,OAAO,KACRA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA;AACE,YAAAA,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,IAAA,CAAG;YACXA,cAAA,CAAA,aAAA,CAAC,IAAI,CAAC,MAAM,EAAA,EAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAA;gBACxCA,cAAA,CAAA,aAAA,CAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAA,EAAA,OAAA,CAEjE,CACG,CACb,CACJ,CACK;AAEZ;;;;"}
1
+ {"version":3,"file":"DateRangePicker.js","sources":["../../../src/components/DateRangePicker/DateRangePicker.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport type { DateRange, DateValue } from 'react-aria-components';\nimport { Action } from '../Action';\nimport { Select } from '../Select';\nimport { DateInputField } from '../DateInputField';\nimport { RangeCalendar, useIsDateUnavailable } from '../Calendars';\nimport { Card } from '../Card';\nimport { FlexCol } from '../Flex/FlexCol';\nimport { ComparePreviousPeriod } from './components/ComparePreviousPeriod';\nimport { DATE_RANGE_OPTIONS, DateRanges, checkForMatchingPreset, getDateRange } from './constants';\nimport { Divider } from './components/Divider';\nimport { DateRangePickerProps } from './types';\nimport styles from './DateRangePicker.module.scss';\n\nexport const DateRangePicker = ({\n // Style props\n className,\n style,\n isDisabled,\n // Customizable options\n showDatePresets = true,\n onReset,\n // Calendar props\n disabledRanges,\n disallowWeekends,\n maxValue,\n minValue,\n selectedPreset,\n setSelectedPreset,\n selectedRange,\n setSelectedRange,\n // Previous period props\n 'aria-describedby': ariaDescribedBy,\n 'aria-label': ariaLabel,\n ...previousPeriodProps\n}: DateRangePickerProps) => {\n const [isCalendarFocused, setIsCalendarFocused] = useState(false);\n const { isDateRangeUnavailable } = useIsDateUnavailable({\n disabledRanges,\n disallowWeekends,\n maxValue,\n minValue,\n });\n\n const updateRangePreset = (selectedValue: string) => {\n setSelectedRange(getDateRange(DateRanges[selectedValue as DateRanges]));\n setSelectedPreset(\n DATE_RANGE_OPTIONS.find(({ value }) => value === selectedValue) || DATE_RANGE_OPTIONS[0],\n );\n };\n\n const updateDateSegment = useCallback(\n (slot: 'start' | 'end') => (value: DateValue | null) => {\n if (!value) return;\n\n const newRange = {\n start: slot === 'start' ? value : selectedRange?.start,\n end: slot === 'end' ? value : selectedRange?.end,\n } as DateRange;\n\n setSelectedRange(newRange);\n },\n [selectedRange?.end, selectedRange?.start, setSelectedRange],\n );\n\n const isDateRangeInvalid = useMemo(\n () => isDateRangeUnavailable(selectedRange),\n [isDateRangeUnavailable, selectedRange],\n );\n\n // Memoize finding preset since checkForMatchingPreset isn't quick.\n const matchedPreset = useMemo(() => {\n if (!selectedRange) return null;\n return checkForMatchingPreset(selectedRange);\n }, [selectedRange]);\n\n useEffect(() => {\n if (matchedPreset)\n setSelectedPreset(matchedPreset); // If selected value is a preset, set it.\n else setSelectedPreset(DATE_RANGE_OPTIONS[0]); // Otherwise, select \"custom\" option.\n }, [matchedPreset, setSelectedPreset]);\n\n return (\n <FlexCol\n gap=\"base\"\n alignItems=\"stretch\"\n style={style}\n className={className}\n aria-describedby={ariaDescribedBy}\n aria-label={ariaLabel}\n >\n {showDatePresets && (\n <Select\n disabled={isDisabled}\n label=\"Date Range\"\n options={DATE_RANGE_OPTIONS}\n value={selectedPreset?.value}\n onChange={updateRangePreset}\n />\n )}\n\n <DateInputField\n isRangeInput\n disabled={isDisabled}\n isOpen={isCalendarFocused}\n label=\"Start date - End date\"\n onChangeStartDate={updateDateSegment('start')}\n onChangeEndDate={updateDateSegment('end')}\n startValue={selectedRange && selectedRange.start}\n endValue={selectedRange && selectedRange.end}\n error={isDateRangeInvalid ? 'Range contains invalid dates' : undefined}\n disabledRanges={disabledRanges}\n disallowWeekends={disallowWeekends}\n maxValue={maxValue}\n minValue={minValue}\n />\n\n {previousPeriodProps.showPreviousPeriod && <ComparePreviousPeriod {...previousPeriodProps} />}\n\n <Divider />\n\n <FlexCol\n alignItems=\"center\"\n gap=\"base\"\n onFocus={() => setIsCalendarFocused(true)}\n onBlur={(e) => {\n const related = e.relatedTarget;\n if (!e.currentTarget.contains(related instanceof Node ? related : null)) {\n setIsCalendarFocused(false);\n }\n }}\n >\n <RangeCalendar\n aria-label=\"Selected Date Range\"\n isDisabled={isDisabled}\n value={selectedRange}\n onChange={setSelectedRange}\n disabledRanges={disabledRanges}\n maxValue={maxValue}\n minValue={minValue}\n disallowWeekends={disallowWeekends}\n />\n </FlexCol>\n\n {!!onReset && (\n <>\n <Divider />\n <Card.Footer className={styles.resetFooter}>\n <Action variant=\"default\" size=\"sm\" onClick={onReset} disabled={isDisabled}>\n Reset\n </Action>\n </Card.Footer>\n </>\n )}\n </FlexCol>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAcO,MAAM,eAAe,GAAG,CAAC;AAC9B;AACA,SAAS,EACT,KAAK,EACL,UAAU;AACV;AACA,eAAe,GAAG,IAAI,EACtB,OAAO;AACP;AACA,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB;AAChB;AACA,kBAAkB,EAAE,eAAe,EACnC,YAAY,EAAE,SAAS,EACvB,GAAG,mBAAmB,EACD,KAAI;IACzB,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AACjE,I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AAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAA,EAAA,OAAA,CAEjE,CACG,CACb,CACJ,CACO;AAEd;;;;"}
@@ -1,24 +1,40 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { TextFieldProps } from '../TextField';
3
3
  export type PhoneOption = {
4
+ /** Unique identifier for the phone option */
4
5
  id: string;
6
+ /** Display label for the phone option */
5
7
  label: string;
8
+ /** Additional info slot element */
6
9
  itemInfoSlot: ReactElement;
10
+ /** Whether to disable selection rendering */
7
11
  shouldDisableSelectionRender: boolean;
12
+ /** Media slot element (typically flag icon) */
8
13
  mediaSlot: ReactElement;
9
14
  };
10
15
  export type InternationalCode = {
16
+ /** Country code (e.g., "US", "GB", "FR") */
11
17
  countryCode: string;
18
+ /** Full country name */
12
19
  country: string;
20
+ /** Country flag asset identifier used to resolve the flag SVG URL */
13
21
  countryFlag: string;
22
+ /** Expected phone number length for this country */
14
23
  length: number;
15
24
  };
25
+ /** Props for the PhoneInput component */
16
26
  export type PhoneInputProps = TextFieldProps & {
27
+ /** Phone number value including country code */
17
28
  value?: string;
29
+ /** Callback fired when phone number changes */
18
30
  onChange?: (value: string) => void;
31
+ /** Whether the input has validation errors */
19
32
  hasError?: boolean;
33
+ /** Whether the input is disabled */
20
34
  disabled?: boolean;
35
+ /** Error message to display */
21
36
  error?: string;
37
+ /** Additional CSS class name */
22
38
  className?: string;
23
39
  };
24
40
  export type PhoneOptions = PhoneOption[];
@@ -1,12 +1,22 @@
1
1
  import { ComponentSizeType } from '../types';
2
+ /** Base props for the PriceInput component */
2
3
  export interface PriceInputProps {
4
+ /** Additional CSS class name */
3
5
  className?: string;
6
+ /** Whether the input is disabled and non-interactive */
4
7
  disabled?: boolean;
8
+ /** Size of the input field */
5
9
  size?: ComponentSizeType;
10
+ /** Currency symbol displayed as prefix */
6
11
  currency: string;
12
+ /** Step value for increment/decrement buttons */
7
13
  step?: string;
14
+ /** Whether the input has validation errors */
8
15
  hasError?: boolean;
16
+ /** Current price value as string */
9
17
  priceValue: string;
18
+ /** Callback fired when the input value changes */
10
19
  onChange: (value: string) => void;
20
+ /** Callback fired when the price value changes */
11
21
  onPriceChange: (value: string) => void;
12
22
  }
@@ -1,8 +1,13 @@
1
1
  import { SyntheticEvent } from 'react';
2
2
  import { TextFieldProps } from '../TextField/types';
3
+ /** Props for the Search component */
3
4
  export type SearchProps = TextFieldProps & {
5
+ /** Whether to show loading spinner instead of search icon */
4
6
  isLoading?: boolean;
7
+ /** Fill color for the search/clear icon and loading spinner */
5
8
  fill?: string;
9
+ /** Callback fired when the clear button is clicked */
6
10
  onClearClick?: (event: SyntheticEvent) => void;
11
+ /** Whether to position the search icon on the left side */
7
12
  reversed?: boolean;
8
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"withLabels.cjs","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, forwardRef, ReactNode } from 'react';\n\nimport { FlexCol } from '../../components/Flex/FlexCol';\nimport { FlexRow } from '../../components/Flex/FlexRow';\nimport { MiniAlert } from '../../components/Alerts/MiniAlert';\nimport { Text } from '../../components/Text';\nimport { useId } from '../../hooks/useId';\nimport { HelpIcon } from '../../icons';\nimport { theme } from '../../theme';\n\nimport { BlockTooltip } from './BlockTooltip';\nimport styles from './withLabels.module.scss';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n disabledMessage?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\n// eslint-disable-next-line @typescript-eslint/comma-dangle -- comma is required so TS knows this is a generic, not JSX\nexport const withLabels = <P, R = unknown>(Component: ComponentType<P>) => {\n const ComponentWithLabels = forwardRef<R, P & WithLabelsProps>(\n ({ label, hint, error, disabledMessage, tooltip, tooltipContent, id, ...otherProps }, ref) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label)\n return (\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n );\n\n return (\n <FlexCol className={styles.rootStack}>\n <FlexRow>\n <Text variant=\"inputLabel\" id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Text>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </FlexRow>\n {hint && (\n <Text variant=\"hintText\" as=\"span\" className={styles.hint} id={`${componentId}-hint`}>\n {hint}\n </Text>\n )}\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n {error && (\n <MiniAlert\n id={`${componentId}-error`}\n variant=\"error\"\n isBold={false}\n role=\"alert\"\n title={error}\n />\n )}\n {disabledMessage && (\n <MiniAlert\n id={`${componentId}-disabled`}\n isBold={false}\n title={disabledMessage}\n />\n )}\n </FlexCol>\n );\n },\n );\n\n ComponentWithLabels.displayName = `withLabels(${Component.displayName || Component.name || 'Component'})`;\n\n return ComponentWithLabels;\n};\n"],"names":["forwardRef","useId","React","FlexCol","styles","FlexRow","Text","BlockTooltip","HelpIcon","theme","MiniAlert"],"mappings":";;;;;;;;;;;;;;;;;AAuBA;AACO,MAAM,UAAU,GAAG,CAAiB,SAA2B,KAAI;IACxE,MAAM,mBAAmB,GAAGA,gBAAU,CACpC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,GAAG,UAAU,EAAE,EAAE,GAAG,KAAI;AAC3F,QAAA,MAAM,WAAW,GAAGC,WAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;AAEzD,QAAA,IAAI,CAAC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,GAAG,EACR,EAAE,EAAE,WAAW,EACf,QAAQ,EAAE,CAAC,CAAC,KAAK,EACjB,QAAQ,EAAE,CAAC,CAAC,eAAe,EAC3B,eAAe,EAAE,eAAe,EAAA,GAC3B,UAAgB,EAAA,CACrB;YACD,KAAK,KACJA,sBAAA,CAAA,aAAA,CAACQ,mBAAS,EAAA,EACR,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,MAAA,CAAQ,EAC1B,OAAO,EAAC,OAAO,EACf,MAAM,EAAE,KAAK,EACb,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EAAA,CACZ,CACH;YACA,eAAe,KACdR,sBAAA,CAAA,aAAA,CAACQ,mBAAS,IACR,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,SAAA,CAAW,EAC7B,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,eAAe,EAAA,CACtB,CACH,CACO;AAEd,IAAA,CAAC,CACF;AAED,IAAA,mBAAmB,CAAC,WAAW,GAAG,CAAA,WAAA,EAAc,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG;AAEzG,IAAA,OAAO,mBAAmB;AAC5B;;;;"}
1
+ {"version":3,"file":"withLabels.cjs","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, forwardRef, ReactNode } from 'react';\n\nimport { FlexCol } from '../../components/Flex/FlexCol';\nimport { FlexRow } from '../../components/Flex/FlexRow';\nimport { MiniAlert } from '../../components/Alerts/MiniAlert';\nimport { Text } from '../../components/Text';\nimport { useId } from '../../hooks/useId';\nimport { HelpIcon } from '../../icons';\nimport { theme } from '../../theme';\n\nimport { BlockTooltip } from './BlockTooltip';\nimport styles from './withLabels.module.scss';\n\nexport interface WithLabelsProps {\n /** Unique identifier for the component */\n id?: string;\n /** Label text displayed above the component */\n label?: ReactNode;\n /** Hint text displayed below the component for additional context */\n hint?: ReactNode;\n /** Error message displayed when validation fails */\n error?: ReactNode;\n /** Message displayed when the component is disabled */\n disabledMessage?: ReactNode;\n /** Tooltip text displayed on hover via help icon */\n tooltip?: string;\n /** Custom rich content for tooltip (ReactNode) */\n tooltipContent?: ReactNode;\n}\n\n// eslint-disable-next-line @typescript-eslint/comma-dangle -- comma is required so TS knows this is a generic, not JSX\nexport const withLabels = <P, R = unknown>(Component: ComponentType<P>) => {\n const ComponentWithLabels = forwardRef<R, P & WithLabelsProps>(\n ({ label, hint, error, disabledMessage, tooltip, tooltipContent, id, ...otherProps }, ref) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label)\n return (\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n );\n\n return (\n <FlexCol className={styles.rootStack}>\n <FlexRow>\n <Text variant=\"inputLabel\" id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Text>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </FlexRow>\n {hint && (\n <Text variant=\"hintText\" as=\"span\" className={styles.hint} id={`${componentId}-hint`}>\n {hint}\n </Text>\n )}\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n {error && (\n <MiniAlert\n id={`${componentId}-error`}\n variant=\"error\"\n isBold={false}\n role=\"alert\"\n title={error}\n />\n )}\n {disabledMessage && (\n <MiniAlert\n id={`${componentId}-disabled`}\n isBold={false}\n title={disabledMessage}\n />\n )}\n </FlexCol>\n );\n },\n );\n\n ComponentWithLabels.displayName = `withLabels(${Component.displayName || Component.name || 'Component'})`;\n\n return ComponentWithLabels;\n};\n"],"names":["forwardRef","useId","React","FlexCol","styles","FlexRow","Text","BlockTooltip","HelpIcon","theme","M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AAI,EACxB,KAAK,EAAEA,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAA,CACrC,CACW,CAChB,CACO;YACT,IAAI,KACHP,sBAAA,CAAA,aAAA,CAACI,SAAI,EAAA,EAAC,OAAO,EAAC,UAAU,EAAC,EAAE,EAAC,MAAM,EAAC,SAAS,EAAEF,iBAAM,CAAC,IAAI,EAAE,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,KAAA,CAAO,EAAA,EACjF,IAAI,CACA,CACR;YACDF,sBAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,WAAW,EACf,QAAQ,EAAE,CAAC,CAAC,KAAK,EACjB,QAAQ,EAAE,CAAC,CAAC,eAAe,EAC3B,eAAe,EAAE,eAAe,EAAA,GAC3B,UAAgB,EAAA,CACrB;YACD,KAAK,KACJA,sBAAA,CAAA,aAAA,CAACQ,mBAAS,EAAA,EACR,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,MAAA,CAAQ,EAC1B,OAAO,EAAC,OAAO,EACf,MAAM,EAAE,KAAK,EACb,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EAAA,CACZ,CACH;YACA,eAAe,KACdR,sBAAA,CAAA,aAAA,CAACQ,mBAAS,IACR,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,SAAA,CAAW,EAC7B,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,eAAe,EAAA,CACtB,CACH,CACO;AAEd,IAAA,CAAC,CACF;AAED,IAAA,mBAAmB,CAAC,WAAW,GAAG,CAAA,WAAA,EAAc,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG;AAEzG,IAAA,OAAO,mBAAmB;AAC5B;;;;"}
@@ -1,11 +1,18 @@
1
1
  import React, { ComponentType, ReactNode } from 'react';
2
2
  export interface WithLabelsProps {
3
+ /** Unique identifier for the component */
3
4
  id?: string;
5
+ /** Label text displayed above the component */
4
6
  label?: ReactNode;
7
+ /** Hint text displayed below the component for additional context */
5
8
  hint?: ReactNode;
9
+ /** Error message displayed when validation fails */
6
10
  error?: ReactNode;
11
+ /** Message displayed when the component is disabled */
7
12
  disabledMessage?: ReactNode;
13
+ /** Tooltip text displayed on hover via help icon */
8
14
  tooltip?: string;
15
+ /** Custom rich content for tooltip (ReactNode) */
9
16
  tooltipContent?: ReactNode;
10
17
  }
11
18
  export declare const withLabels: <P, R = unknown>(Component: React.ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P & WithLabelsProps> & React.RefAttributes<R>>;
@@ -1 +1 @@
1
- {"version":3,"file":"withLabels.js","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, forwardRef, ReactNode } from 'react';\n\nimport { FlexCol } from '../../components/Flex/FlexCol';\nimport { FlexRow } from '../../components/Flex/FlexRow';\nimport { MiniAlert } from '../../components/Alerts/MiniAlert';\nimport { Text } from '../../components/Text';\nimport { useId } from '../../hooks/useId';\nimport { HelpIcon } from '../../icons';\nimport { theme } from '../../theme';\n\nimport { BlockTooltip } from './BlockTooltip';\nimport styles from './withLabels.module.scss';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n disabledMessage?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\n// eslint-disable-next-line @typescript-eslint/comma-dangle -- comma is required so TS knows this is a generic, not JSX\nexport const withLabels = <P, R = unknown>(Component: ComponentType<P>) => {\n const ComponentWithLabels = forwardRef<R, P & WithLabelsProps>(\n ({ label, hint, error, disabledMessage, tooltip, tooltipContent, id, ...otherProps }, ref) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label)\n return (\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n );\n\n return (\n <FlexCol className={styles.rootStack}>\n <FlexRow>\n <Text variant=\"inputLabel\" id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Text>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </FlexRow>\n {hint && (\n <Text variant=\"hintText\" as=\"span\" className={styles.hint} id={`${componentId}-hint`}>\n {hint}\n </Text>\n )}\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n {error && (\n <MiniAlert\n id={`${componentId}-error`}\n variant=\"error\"\n isBold={false}\n role=\"alert\"\n title={error}\n />\n )}\n {disabledMessage && (\n <MiniAlert\n id={`${componentId}-disabled`}\n isBold={false}\n title={disabledMessage}\n />\n )}\n </FlexCol>\n );\n },\n );\n\n ComponentWithLabels.displayName = `withLabels(${Component.displayName || Component.name || 'Component'})`;\n\n return ComponentWithLabels;\n};\n"],"names":["React","styles"],"mappings":";;;;;;;;;;;AAuBA;AACO,MAAM,UAAU,GAAG,CAAiB,SAA2B,KAAI;IACxE,MAAM,mBAAmB,GAAG,UAAU,CACpC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,GAAG,UAAU,EAAE,EAAE,GAAG,KAAI;AAC3F,QAAA,MAAM,WAAW,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;AAEzD,QAAA,IAAI,CAAC,KAAK;AACR,YAAA,QACEA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,WAAW,EACf,QAAQ,EAAE,CAAC,CAAC,KAAK,EACjB,QAAQ,EAAE,CAA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,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,MAAA,CAAQ,EAC1B,OAAO,EAAC,OAAO,EACf,MAAM,EAAE,KAAK,EACb,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EAAA,CACZ,CACH;YACA,eAAe,KACdA,cAAA,CAAA,aAAA,CAAC,SAAS,IACR,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,SAAA,CAAW,EAC7B,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,eAAe,EAAA,CACtB,CACH,CACO;AAEd,IAAA,CAAC,CACF;AAED,IAAA,mBAAmB,CAAC,WAAW,GAAG,CAAA,WAAA,EAAc,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG;AAEzG,IAAA,OAAO,mBAAmB;AAC5B;;;;"}
1
+ {"version":3,"file":"withLabels.js","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, forwardRef, ReactNode } from 'react';\n\nimport { FlexCol } from '../../components/Flex/FlexCol';\nimport { FlexRow } from '../../components/Flex/FlexRow';\nimport { MiniAlert } from '../../components/Alerts/MiniAlert';\nimport { Text } from '../../components/Text';\nimport { useId } from '../../hooks/useId';\nimport { HelpIcon } from '../../icons';\nimport { theme } from '../../theme';\n\nimport { BlockTooltip } from './BlockTooltip';\nimport styles from './withLabels.module.scss';\n\nexport interface WithLabelsProps {\n /** Unique identifier for the component */\n id?: string;\n /** Label text displayed above the component */\n label?: ReactNode;\n /** Hint text displayed below the component for additional context */\n hint?: ReactNode;\n /** Error message displayed when validation fails */\n error?: ReactNode;\n /** Message displayed when the component is disabled */\n disabledMessage?: ReactNode;\n /** Tooltip text displayed on hover via help icon */\n tooltip?: string;\n /** Custom rich content for tooltip (ReactNode) */\n tooltipContent?: ReactNode;\n}\n\n// eslint-disable-next-line @typescript-eslint/comma-dangle -- comma is required so TS knows this is a generic, not JSX\nexport const withLabels = <P, R = unknown>(Component: ComponentType<P>) => {\n const ComponentWithLabels = forwardRef<R, P & WithLabelsProps>(\n ({ label, hint, error, disabledMessage, tooltip, tooltipContent, id, ...otherProps }, ref) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label)\n return (\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n );\n\n return (\n <FlexCol className={styles.rootStack}>\n <FlexRow>\n <Text variant=\"inputLabel\" id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Text>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </FlexRow>\n {hint && (\n <Text variant=\"hintText\" as=\"span\" className={styles.hint} id={`${componentId}-hint`}>\n {hint}\n </Text>\n )}\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n {error && (\n <MiniAlert\n id={`${componentId}-error`}\n variant=\"error\"\n isBold={false}\n role=\"alert\"\n title={error}\n />\n )}\n {disabledMessage && (\n <MiniAlert\n id={`${componentId}-disabled`}\n isBold={false}\n title={disabledMessage}\n />\n )}\n </FlexCol>\n );\n },\n );\n\n ComponentWithLabels.displayName = `withLabels(${Component.displayName || Component.name || 'Component'})`;\n\n return ComponentWithLabels;\n};\n"],"names":["React","styles"],"mappings":";;;;;;;;;;;AA8BA;AACO,MAAM,UAAU,GAAG,CAAiB,SAA2B,KAAI;IACxE,MAAM,mBAAmB,GAAG,UAAU,CACpC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,GAAG,UAAU,EAAE,EAAE,GAAG,KAAI;AA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AW,CAAA,KAAA,CAAO,EAAA,EACjF,IAAI,CACA,CACR;YACDD,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,WAAW,EACf,QAAQ,EAAE,CAAC,CAAC,KAAK,EACjB,QAAQ,EAAE,CAAC,CAAC,eAAe,EAC3B,eAAe,EAAE,eAAe,EAAA,GAC3B,UAAgB,EAAA,CACrB;YACD,KAAK,KACJA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,MAAA,CAAQ,EAC1B,OAAO,EAAC,OAAO,EACf,MAAM,EAAE,KAAK,EACb,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EAAA,CACZ,CACH;YACA,eAAe,KACdA,cAAA,CAAA,aAAA,CAAC,SAAS,IACR,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,SAAA,CAAW,EAC7B,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,eAAe,EAAA,CACtB,CACH,CACO;AAEd,IAAA,CAAC,CACF;AAED,IAAA,mBAAmB,CAAC,WAAW,GAAG,CAAA,WAAA,EAAc,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG;AAEzG,IAAA,OAAO,mBAAmB;AAC5B;;;;"}
@@ -2,8 +2,8 @@
2
2
 
3
3
  var ___$insertStyle = require('../../_virtual/____insertStyle.cjs');
4
4
 
5
- ___$insertStyle("._rootStack_1rs8c_1 {\n position: relative;\n}\n\n/* Overrides hintText token's 12px/16px to use body font-size/line-height */\n._hint_1rs8c_6 {\n margin-top: var(--sizes-xs);\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n}\n\n/* Error token uses font-weight: 600, but form errors render at normal weight */\n._error_1rs8c_13 {\n font-weight: normal;\n}");
6
- var labelStyles = {"rootStack":"_rootStack_1rs8c_1","hint":"_hint_1rs8c_6","error":"_error_1rs8c_13"};
5
+ ___$insertStyle("._rootStack_idlam_1 {\n position: relative;\n}\n\n/* Overrides hintText token's 12px/16px to use body font-size/line-height */\n._hint_idlam_6 {\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n}\n\n/* Error token uses font-weight: 600, but form errors render at normal weight */\n._error_idlam_12 {\n font-weight: normal;\n}");
6
+ var labelStyles = {"rootStack":"_rootStack_idlam_1","hint":"_hint_idlam_6","error":"_error_idlam_12"};
7
7
 
8
8
  module.exports = labelStyles;
9
9
  //# sourceMappingURL=withLabels.module.scss.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"withLabels.module.scss.cjs","sources":["../../../src/hoc/withLabels/withLabels.module.scss"],"sourcesContent":[".rootStack {\n position: relative;\n}\n\n/* Overrides hintText token's 12px/16px to use body font-size/line-height */\n.hint {\n margin-top: var(--sizes-xs);\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n}\n\n/* Error token uses font-weight: 600, but form errors render at normal weight */\n.error {\n font-weight: normal;\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,iZAAA;;;;;"}
1
+ {"version":3,"file":"withLabels.module.scss.cjs","sources":["../../../src/hoc/withLabels/withLabels.module.scss"],"sourcesContent":[".rootStack {\n position: relative;\n}\n\n/* Overrides hintText token's 12px/16px to use body font-size/line-height */\n.hint {\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n}\n\n/* Error token uses font-weight: 600, but form errors render at normal weight */\n.error {\n font-weight: normal;\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,iXAAA;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import insertStyle from '../../_virtual/____insertStyle.js';
2
2
 
3
- insertStyle("._rootStack_1rs8c_1 {\n position: relative;\n}\n\n/* Overrides hintText token's 12px/16px to use body font-size/line-height */\n._hint_1rs8c_6 {\n margin-top: var(--sizes-xs);\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n}\n\n/* Error token uses font-weight: 600, but form errors render at normal weight */\n._error_1rs8c_13 {\n font-weight: normal;\n}");
4
- var labelStyles = {"rootStack":"_rootStack_1rs8c_1","hint":"_hint_1rs8c_6","error":"_error_1rs8c_13"};
3
+ insertStyle("._rootStack_idlam_1 {\n position: relative;\n}\n\n/* Overrides hintText token's 12px/16px to use body font-size/line-height */\n._hint_idlam_6 {\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n}\n\n/* Error token uses font-weight: 600, but form errors render at normal weight */\n._error_idlam_12 {\n font-weight: normal;\n}");
4
+ var labelStyles = {"rootStack":"_rootStack_idlam_1","hint":"_hint_idlam_6","error":"_error_idlam_12"};
5
5
 
6
6
  export { labelStyles as default };
7
7
  //# sourceMappingURL=withLabels.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withLabels.module.scss.js","sources":["../../../src/hoc/withLabels/withLabels.module.scss"],"sourcesContent":[".rootStack {\n position: relative;\n}\n\n/* Overrides hintText token's 12px/16px to use body font-size/line-height */\n.hint {\n margin-top: var(--sizes-xs);\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n}\n\n/* Error token uses font-weight: 600, but form errors render at normal weight */\n.error {\n font-weight: normal;\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,iZAAA;;;;;"}
1
+ {"version":3,"file":"withLabels.module.scss.js","sources":["../../../src/hoc/withLabels/withLabels.module.scss"],"sourcesContent":[".rootStack {\n position: relative;\n}\n\n/* Overrides hintText token's 12px/16px to use body font-size/line-height */\n.hint {\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n}\n\n/* Error token uses font-weight: 600, but form errors render at normal weight */\n.error {\n font-weight: normal;\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,iXAAA;;;;;"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="@figma/code-connect/figma-types" />
2
+ import figma from 'figma';
3
+ declare const _default: {
4
+ id: any;
5
+ imports: string[];
6
+ example: figma.TemplateStringResult;
7
+ };
8
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veeqo/ui",
3
- "version": "15.15.2",
3
+ "version": "15.15.4",
4
4
  "description": "New optimised component library for Veeqo.",
5
5
  "author": "Robert Wealthall",
6
6
  "license": "ISC",
@@ -42,11 +42,16 @@
42
42
  "tags:remove": "node scripts/remove-tag.cjs",
43
43
  "tags:update": "git fetch --tags && git push --follow-tags",
44
44
  "changelog:update": "npm run tags:update && auto-changelog -p && bash ./scripts/ai-changelog.sh && git add CHANGELOG.md NEW_CHANGELOG.md && (git diff --cached --quiet || git commit -m \"Update CHANGELOG and NEW_CHANGELOG\")",
45
- "figma:export": "rimraf ./src/icons/design-system/imports && dotenv figma-export use-config scripts/figma-export/.figmaexportrc.icons.js ",
46
- "figma:export-integrations": "rimraf ./imports/integrations && dotenv figma-export use-config scripts/figma-export/.figmaexportrc.integrations.js -- --type=all",
47
- "figma:export-integrations:accounting": "rimraf ./imports/integrations/accounting && dotenv figma-export use-config scripts/figma-export/.figmaexportrc.integrations.js -- --type=accounting",
48
- "figma:export-integrations:carriers": "rimraf ./imports/integrations/carriers && dotenv figma-export use-config scripts/figma-export/.figmaexportrc.integrations.js -- --type=carriers",
49
- "figma:export-integrations:channels": "rimraf ./imports/integrations/channels && dotenv figma-export use-config scripts/figma-export/.figmaexportrc.integrations.js -- --type=channels"
45
+ "figma:export": "npm run figma:export-icons && npm run figma:export-logos",
46
+ "figma:export-icons": "rimraf ./src/icons/design-system/imports && dotenv figma-export use-config scripts/figma-export/.figmaexportrc.icons.js && npm run build:icons",
47
+ "figma:publish": "if [ ! -f ./.env ]; then echo 'Error: .env not found — copy .env.sample to .env and set FIGMA_TOKEN' >&2; exit 1; fi; set -a && . ./.env && set +a; if [ -z \"$FIGMA_TOKEN\" ]; then echo 'Error: FIGMA_TOKEN is empty — set it in .env' >&2; exit 1; fi; FIGMA_ACCESS_TOKEN=\"$FIGMA_TOKEN\" npx figma connect publish --force",
48
+ "icons:code-connect": "node scripts/figma-export/generate-icon-code-connect.js",
49
+ "logos:code-connect": "node scripts/figma-export/generate-logo-code-connect.js",
50
+ "figma:export-code-connect": "npm run icons:code-connect && npm run logos:code-connect",
51
+ "figma:export-logos": "rimraf ./src/logos/imports && dotenv figma-export use-config scripts/figma-export/.figmaexportrc.logos.js -- --type=all && npm run build:logos",
52
+ "figma:export-logos:channels": "dotenv figma-export use-config scripts/figma-export/.figmaexportrc.logos.js -- --type=channels && npm run build:logos",
53
+ "figma:export-logos:carriers": "dotenv figma-export use-config scripts/figma-export/.figmaexportrc.logos.js -- --type=carriers && npm run build:logos",
54
+ "figma:export-logos:accounting": "dotenv figma-export use-config scripts/figma-export/.figmaexportrc.logos.js -- --type=accounting && npm run build:logos"
50
55
  },
51
56
  "auto-changelog": {
52
57
  "issueUrl": "https://sim.amazon.com/issues/{id}",