@midas-ds/components 17.25.2 → 17.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/assets/calendar.css +1 -1
  3. package/assets/drop-zone.css +1 -0
  4. package/assets/list-box.css +1 -1
  5. package/assets/select.css +1 -1
  6. package/calendar/Calendar.d.ts +8 -1
  7. package/calendar/Calendar.stories.d.ts +2 -1
  8. package/calendar/CalendarGrid.d.ts +1 -2
  9. package/calendar/CalendarHeader.d.ts +2 -3
  10. package/calendar/CalendarPicker.d.ts +18 -0
  11. package/calendar/RangeCalendar.d.ts +8 -2
  12. package/calendar/RangeCalendar.stories.d.ts +2 -1
  13. package/calendar/index.js +1 -1
  14. package/checkbox/index.js +1 -1
  15. package/chunks/calendar-DWdU1T7E.js +111 -0
  16. package/chunks/{checkbox-ivInWvEp.js → checkbox-BgCp0edW.js} +13 -13
  17. package/chunks/{combobox-DDO4fEtI.js → combobox-B3AGDNru.js} +9 -9
  18. package/chunks/{date-field-DG5TYsTF.js → date-field-Q3bQ5P_t.js} +8 -8
  19. package/chunks/{date-picker-1W7OmCT0.js → date-picker-BPAJK8Gr.js} +15 -15
  20. package/chunks/drop-zone-DvQLpgq6.js +25 -0
  21. package/chunks/file-trigger-Dp5nH8oS.js +7 -0
  22. package/chunks/{list-box-VdBVTwZK.js → list-box-BT33Wiwt.js} +16 -15
  23. package/chunks/{radio-W0YqY7lo.js → radio-BXC6pb3z.js} +8 -8
  24. package/chunks/{search-field-d7FV4Kuv.js → search-field-dAZu3T_V.js} +8 -8
  25. package/chunks/{select-LjjT_7hr.js → select-DOLE5CtI.js} +32 -28
  26. package/chunks/{table-O7Ht2ilY.js → table-RARvkGKL.js} +1 -1
  27. package/chunks/{textfield-BsijPPRD.js → textfield-BNdiOwXq.js} +10 -10
  28. package/chunks/{time-field-BlNUOjUJ.js → time-field-CZxI9Bs6.js} +9 -9
  29. package/combobox/index.js +1 -1
  30. package/date-field/index.js +1 -1
  31. package/date-picker/index.js +1 -1
  32. package/drop-zone/DropZone.d.ts +21 -0
  33. package/drop-zone/DropZone.stories.d.ts +16 -0
  34. package/drop-zone/index.d.ts +1 -0
  35. package/drop-zone/index.js +2 -0
  36. package/file-trigger/FileTrigger.d.ts +2 -0
  37. package/file-trigger/index.d.ts +1 -0
  38. package/file-trigger/index.js +2 -0
  39. package/index.d.ts +2 -1
  40. package/index.js +36 -35
  41. package/list-box/ListBox.d.ts +6 -1
  42. package/list-box/ListBox.stories.d.ts +1 -1
  43. package/list-box/index.js +1 -1
  44. package/package.json +1 -1
  45. package/radio/index.js +1 -1
  46. package/search-field/index.js +1 -1
  47. package/select/SelectTrigger.d.ts +7 -1
  48. package/select/index.d.ts +1 -0
  49. package/select/index.js +2 -2
  50. package/table/index.js +1 -1
  51. package/textfield/TextArea.stories.d.ts +5 -5
  52. package/textfield/index.js +1 -1
  53. package/time-field/index.js +1 -1
  54. package/assets/file-upload.css +0 -1
  55. package/chunks/calendar-R7x0m8ch.js +0 -74
  56. package/chunks/file-upload-DInuSFCB.js +0 -11
  57. package/file-upload/DropZone.stories.d.ts +0 -6
  58. package/file-upload/FileUpload.d.ts +0 -4
  59. package/file-upload/FileUpload.stories.d.ts +0 -11
  60. package/file-upload/index.d.ts +0 -1
  61. package/file-upload/index.js +0 -2
@@ -1,8 +1,14 @@
1
1
  import { Size } from '../common/types';
2
2
  import { MidasSelectProps } from './Select';
3
3
  import { SelectionMode } from '.';
4
+ /**
5
+ * `'small'` is only available through the bare `SelectTrigger` (e.g. for
6
+ * compact standalone selects like the Calendar month/year picker) — the
7
+ * full `Select` field component's public `size` prop stays `Size`.
8
+ */
9
+ export type SelectSize = Size | 'small';
4
10
  interface SelectTriggerProps<T extends object, M extends SelectionMode = 'single'> extends Pick<MidasSelectProps<T, M>, 'isDisabled' | 'selectionMode'> {
5
- size: Size;
11
+ size: SelectSize;
6
12
  }
7
13
  export declare const SelectTrigger: <T extends object, M extends SelectionMode = "single">({ isDisabled, selectionMode, size, }: SelectTriggerProps<T, M>) => import("react/jsx-runtime").JSX.Element;
8
14
  export {};
package/select/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { type SelectionMode, Select, type MidasSelectProps } from './Select';
2
+ export { SelectTrigger, type SelectSize } from './SelectTrigger';
package/select/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/select-LjjT_7hr.js";
2
- export { e as Select };
1
+ import { n as e, t } from "../chunks/select-DOLE5CtI.js";
2
+ export { t as Select, e as SelectTrigger };
package/table/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/table-O7Ht2ilY.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../chunks/table-RARvkGKL.js";
2
2
  export { a as Cell, n as Column, i as Row, t as Table, e as TableBody, r as TableHeader };
@@ -139,15 +139,15 @@ export declare const Disabled: {
139
139
  isReadOnly?: boolean;
140
140
  errorMessage?: string | ((validation: import('react-aria-components').ValidationResult) => string);
141
141
  isInvalid?: boolean;
142
- description?: string;
143
142
  label?: string;
144
- autoComplete?: string;
145
- maxLength?: number;
146
- minLength?: number;
143
+ description?: string;
147
144
  validationBehavior?: "native" | "aria";
148
145
  isRequired?: boolean;
149
146
  validate?: ((value: string) => import('@react-types/shared').ValidationError | true | null | undefined) | undefined;
150
147
  errorPosition?: "top" | "bottom";
148
+ autoComplete?: string;
149
+ maxLength?: number;
150
+ minLength?: number;
151
151
  showCounter?: boolean;
152
152
  className?: import('react-aria-components').ClassNameOrFunction<import('react-aria-components').InputRenderProps>;
153
153
  color?: string | undefined;
@@ -329,10 +329,10 @@ export declare const Disabled: {
329
329
  popoverTarget?: string | undefined;
330
330
  is?: string | undefined;
331
331
  exportparts?: string | undefined;
332
+ placeholder?: string | undefined;
332
333
  disabled?: boolean | undefined;
333
334
  cols?: number | undefined;
334
335
  dirName?: string | undefined;
335
- placeholder?: string | undefined;
336
336
  readOnly?: boolean | undefined;
337
337
  required?: boolean | undefined;
338
338
  wrap?: string | undefined;
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "../chunks/textfield-BsijPPRD.js";
1
+ import { i as e, n as t, r as n, t as r } from "../chunks/textfield-BNdiOwXq.js";
2
2
  export { n as Input, r as TextArea, t as TextField, e as TextFieldBase };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/time-field-BlNUOjUJ.js";
1
+ import { t as e } from "../chunks/time-field-CZxI9Bs6.js";
2
2
  export { e as TimeField };
@@ -1 +0,0 @@
1
- ._dropzone_pm0xi_1{font-family:var(--midas-typography-font-family);color:var(--midas-text-primary);border:1px dashed var(--midas-border-color-subtle);text-align:center;background-color:var(--midas-background-base);padding:1.5rem}._dropzone_pm0xi_1 [slot=label]{margin-top:1rem;display:block}._dropzone_pm0xi_1[data-drop-target]{background:var(--midas-background-hover);border:1px solid var(--midas-border-color-primary)}
@@ -1,74 +0,0 @@
1
- import { n as e, t } from "./clsx-B1NYyfch.js";
2
- import { t as n } from "./createLucideIcon-BgluSHFG.js";
3
- import { t as r } from "./chevron-right-DwqboCdU.js";
4
- import { n as i } from "./button-Ch860h28.js";
5
- import { t as a } from "./heading-bnDePIbv.js";
6
- import { t as o } from "./field-error-pJiSw4PN.js";
7
- import * as s from "react";
8
- import { Calendar as c, CalendarCell as l, CalendarGrid as u, RangeCalendar as d, RangeCalendarContext as f } from "react-aria-components";
9
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
10
- import '../assets/calendar.css';var h = n("chevron-left", [["path", {
11
- d: "m15 18-6-6 6-6",
12
- key: "1wnfg3"
13
- }]]), g = {
14
- container: "_container_19aea_1",
15
- calendar: "_calendar_19aea_6",
16
- day: "_day_19aea_28",
17
- header: "_header_19aea_90",
18
- range: "_range_19aea_162"
19
- }, _ = ({ weekdayStyle: e = "short", isReadOnly: n }) => {
20
- let r = !!s.useContext(f);
21
- return /* @__PURE__ */ p(u, {
22
- weekdayStyle: e,
23
- children: (e) => /* @__PURE__ */ p(l, {
24
- date: e,
25
- className: t(g.day, r && g.range),
26
- "data-readonly": n || void 0
27
- })
28
- });
29
- }, v = ({ isDisabled: e, isReadOnly: t }) => /* @__PURE__ */ m("header", {
30
- className: g.header,
31
- children: [
32
- /* @__PURE__ */ p(i, {
33
- slot: "previous",
34
- size: "medium",
35
- "data-readonly": t || void 0,
36
- children: /* @__PURE__ */ p(h, { size: 20 })
37
- }),
38
- /* @__PURE__ */ p(a, {
39
- level: 3,
40
- elementType: "h2",
41
- "data-disabled": e || void 0
42
- }),
43
- /* @__PURE__ */ p(i, {
44
- slot: "next",
45
- size: "medium",
46
- "data-readonly": t || void 0,
47
- children: /* @__PURE__ */ p(r, { size: 20 })
48
- })
49
- ]
50
- }), y = ({ className: t, errorMessage: n, ...r }) => /* @__PURE__ */ m("div", {
51
- className: g.container,
52
- children: [/* @__PURE__ */ m(c, {
53
- className: e(g.calendar, t),
54
- "data-readonly": r.isReadOnly || void 0,
55
- ...r,
56
- children: [/* @__PURE__ */ p(v, { ...r }), /* @__PURE__ */ p(_, { ...r })]
57
- }), /* @__PURE__ */ p(o, {
58
- isInvalid: r.isInvalid,
59
- children: n
60
- })]
61
- }), b = ({ className: t, errorMessage: n, ...r }) => /* @__PURE__ */ m("div", {
62
- className: g.container,
63
- children: [/* @__PURE__ */ m(d, {
64
- className: e(g.calendar, t),
65
- "data-readonly": r.isReadOnly || void 0,
66
- ...r,
67
- children: [/* @__PURE__ */ p(v, { ...r }), /* @__PURE__ */ p(_, { ...r })]
68
- }), /* @__PURE__ */ p(o, {
69
- isInvalid: r.isInvalid,
70
- children: n
71
- })]
72
- });
73
- //#endregion
74
- export { y as n, b as t };
@@ -1,11 +0,0 @@
1
- 'use client';
2
- import { t as e } from "./clsx-B1NYyfch.js";
3
- import "react";
4
- import { DropZone as t, FileTrigger as n } from "react-aria-components";
5
- import { jsx as r } from "react/jsx-runtime";
6
- import '../assets/file-upload.css';var i = { dropzone: "_dropzone_pm0xi_1" }, a = ({ className: n, ...a }) => /* @__PURE__ */ r(t, {
7
- ...a,
8
- className: e(i.dropzone, n)
9
- }), o = (e) => /* @__PURE__ */ r(n, { ...e });
10
- //#endregion
11
- export { o as n, a as t };
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react-vite';
2
- import { DropZone } from './FileUpload';
3
- declare const meta: Meta<typeof DropZone>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Default: Story;
@@ -1,4 +0,0 @@
1
- import { DropZoneProps, FileTriggerProps } from 'react-aria-components';
2
- import * as React from 'react';
3
- export declare const DropZone: React.FC<DropZoneProps>;
4
- export declare const FileTrigger: React.FC<FileTriggerProps>;
@@ -1,11 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- import { DropZone } from './FileUpload';
3
- type Story = StoryObj<typeof DropZone>;
4
- declare const _default: {
5
- component: import('react').FC<import('react-aria-components').DropZoneProps>;
6
- title: string;
7
- tags: string[];
8
- args: {};
9
- };
10
- export default _default;
11
- export declare const DropIt: Story;
@@ -1 +0,0 @@
1
- export { FileTrigger, DropZone } from './FileUpload';
@@ -1,2 +0,0 @@
1
- import { n as e, t } from "../chunks/file-upload-DInuSFCB.js";
2
- export { t as DropZone, e as FileTrigger };