@cimpress-ui/react 1.10.0 → 1.11.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.
Files changed (71) hide show
  1. package/dist/commonjs/components/app-header/app-header.js +1 -1
  2. package/dist/commonjs/components/app-header/app-header.js.map +1 -1
  3. package/dist/commonjs/components/copy/copy-button.d.ts +10 -5
  4. package/dist/commonjs/components/copy/copy-button.d.ts.map +1 -1
  5. package/dist/commonjs/components/copy/copy-button.js +18 -13
  6. package/dist/commonjs/components/copy/copy-button.js.map +1 -1
  7. package/dist/commonjs/components/copy/copy-inline.d.ts +17 -0
  8. package/dist/commonjs/components/copy/copy-inline.d.ts.map +1 -0
  9. package/dist/commonjs/components/copy/{inline-copy.js → copy-inline.js} +15 -10
  10. package/dist/commonjs/components/copy/copy-inline.js.map +1 -0
  11. package/dist/commonjs/components/internal/input/input.d.ts +8 -0
  12. package/dist/commonjs/components/internal/input/input.d.ts.map +1 -0
  13. package/dist/commonjs/components/internal/input/input.js +36 -0
  14. package/dist/commonjs/components/internal/input/input.js.map +1 -0
  15. package/dist/commonjs/components/number-field/number-field.d.ts.map +1 -1
  16. package/dist/commonjs/components/number-field/number-field.js +2 -2
  17. package/dist/commonjs/components/number-field/number-field.js.map +1 -1
  18. package/dist/commonjs/components/slider/slider.d.ts +34 -0
  19. package/dist/commonjs/components/slider/slider.d.ts.map +1 -0
  20. package/dist/commonjs/components/slider/slider.js +60 -0
  21. package/dist/commonjs/components/slider/slider.js.map +1 -0
  22. package/dist/commonjs/i18n/messages/en-US.d.ts.map +1 -1
  23. package/dist/commonjs/i18n/messages/en-US.js +1 -0
  24. package/dist/commonjs/i18n/messages/en-US.js.map +1 -1
  25. package/dist/commonjs/i18n/messages/types.d.ts +6 -0
  26. package/dist/commonjs/i18n/messages/types.d.ts.map +1 -1
  27. package/dist/commonjs/i18n/messages/types.js.map +1 -1
  28. package/dist/commonjs/index.d.ts +3 -2
  29. package/dist/commonjs/index.d.ts.map +1 -1
  30. package/dist/commonjs/index.js +3 -2
  31. package/dist/commonjs/index.js.map +1 -1
  32. package/dist/esm/components/app-header/app-header.js +1 -1
  33. package/dist/esm/components/app-header/app-header.js.map +1 -1
  34. package/dist/esm/components/copy/copy-button.d.ts +10 -5
  35. package/dist/esm/components/copy/copy-button.d.ts.map +1 -1
  36. package/dist/esm/components/copy/copy-button.js +15 -10
  37. package/dist/esm/components/copy/copy-button.js.map +1 -1
  38. package/dist/esm/components/copy/copy-inline.d.ts +17 -0
  39. package/dist/esm/components/copy/copy-inline.d.ts.map +1 -0
  40. package/dist/esm/components/copy/{inline-copy.js → copy-inline.js} +13 -8
  41. package/dist/esm/components/copy/copy-inline.js.map +1 -0
  42. package/dist/esm/components/internal/input/input.d.ts +8 -0
  43. package/dist/esm/components/internal/input/input.d.ts.map +1 -0
  44. package/dist/esm/components/internal/input/input.js +30 -0
  45. package/dist/esm/components/internal/input/input.js.map +1 -0
  46. package/dist/esm/components/number-field/number-field.d.ts.map +1 -1
  47. package/dist/esm/components/number-field/number-field.js +2 -2
  48. package/dist/esm/components/number-field/number-field.js.map +1 -1
  49. package/dist/esm/components/slider/slider.d.ts +34 -0
  50. package/dist/esm/components/slider/slider.d.ts.map +1 -0
  51. package/dist/esm/components/slider/slider.js +54 -0
  52. package/dist/esm/components/slider/slider.js.map +1 -0
  53. package/dist/esm/i18n/messages/en-US.d.ts.map +1 -1
  54. package/dist/esm/i18n/messages/en-US.js +1 -0
  55. package/dist/esm/i18n/messages/en-US.js.map +1 -1
  56. package/dist/esm/i18n/messages/types.d.ts +6 -0
  57. package/dist/esm/i18n/messages/types.d.ts.map +1 -1
  58. package/dist/esm/i18n/messages/types.js.map +1 -1
  59. package/dist/esm/index.d.ts +3 -2
  60. package/dist/esm/index.d.ts.map +1 -1
  61. package/dist/esm/index.js +3 -2
  62. package/dist/esm/index.js.map +1 -1
  63. package/dist-styles/core.css +1 -1
  64. package/dist-styles/styles.css +1 -1
  65. package/package.json +1 -1
  66. package/dist/commonjs/components/copy/inline-copy.d.ts +0 -12
  67. package/dist/commonjs/components/copy/inline-copy.d.ts.map +0 -1
  68. package/dist/commonjs/components/copy/inline-copy.js.map +0 -1
  69. package/dist/esm/components/copy/inline-copy.d.ts +0 -12
  70. package/dist/esm/components/copy/inline-copy.d.ts.map +0 -1
  71. package/dist/esm/components/copy/inline-copy.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"en-US.js","sourceRoot":"","sources":["../../../../src/i18n/messages/en-US.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAId,+EAA+E;AAClE,QAAA,IAAI,GAAsB;IACrC,MAAM,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,6BAA6B,EAAE;IACzG,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE;IACjC,UAAU,EAAE;QACV,UAAU,EAAE,OAAO;QACnB,YAAY,EAAE,eAAe;QAC7B,aAAa,EAAE,gBAAgB;QAC/B,SAAS,EAAE,YAAY;QACvB,gBAAgB,EAAE,WAAW;QAC7B,YAAY,EAAE,eAAe;QAC7B,QAAQ,EAAE,WAAW;QACrB,qBAAqB,EAAE,iBAAiB;QACxC,wBAAwB,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ;QACnG,oBAAoB,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ;KAC5F;IACD,WAAW,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE;IAC/D,UAAU,EAAE;QACV,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;Q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ck\n\nimport type { LocalizedMessages } from './types.js';\n\n/** Strings used by Cimpress UI components, localized in the `en-US` locale. */\nexport const enUS: LocalizedMessages = {\n common: { clearValue: `Clear`, dismiss: `Dismiss`, clearValueDescription: `Press Escape to clear text.` },\n label: { required: `(required)` },\n datePicker: {\n clearValue: `Clear`,\n openCalendar: `Open calendar`,\n previousMonth: `Previous month`,\n nextMonth: `Next month`,\n switchToYearView: `Year view`,\n previousYear: `Previous year`,\n nextYear: `Next year`,\n switchToMultiYearView: `Multi-year view`,\n previousMultiYearSection: (args, formatter) => `Previous ${formatter.number(args.yearCount)} years`,\n nextMultiYearSection: (args, formatter) => `Next ${formatter.number(args.yearCount)} years`,\n },\n numberField: { decrement: `Decrement`, increment: `Increment` },\n pagination: {\n goToPage: (args, formatter) => `Page ${formatter.number(args.pageNumber)}`,\n previousPage: `Previous page`,\n nextPage: `Next page`,\n selectedPageAnnouncement: (args, formatter) => `Selected page: ${formatter.number(args.pageNumber)}`,\n },\n tagField: {\n itemsSelected: (args, formatter) =>\n `${formatter.plural(args.selectedItemCount, { one: () => `${formatter.number(args.selectedItemCount)} item selected`, other: () => `${formatter.number(args.selectedItemCount)} items selected` })}`,\n },\n filePicker: {\n chooseFile: `Choose file`,\n noFilesSelected: (args, formatter) =>\n `${formatter.select({ true: `No files selected`, other: `No file selected` }, args.allowsMultiple)}`,\n multipleFilesSelected: (args, formatter) => `${formatter.number(args.fileCount)} files`,\n },\n table: { toggleColumnSortOrder: `Toggle sort order of column:` },\n simpleAuthTool: {\n logIn: `Log in`,\n logOut: `Log out`,\n profileDetails: (args) => `Profile details for ${args.userFullName}`,\n unknownUser: `Unknown User`,\n },\n UNSTABLE_collection: { loading: `Loading items`, loadingMore: `Loading more items` },\n};\n"]}
1
+ {"version":3,"file":"en-US.js","sourceRoot":"","sources":["../../../../src/i18n/messages/en-US.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAId,+EAA+E;AAClE,QAAA,IAAI,GAAsB;IACrC,MAAM,EAAE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,EAAE,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,CAAC,EAAE;KACvM;IACD,UAAU,EAAE;QACV,UAAU,EAAE,aAAa;QACzB,eAAe,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CACnC,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,cAAc,CAAC,EAAE;QACtG,qBAAqB,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ;KACxF;IACD,KAAK,EAAE,EAAE,qBAAqB,EAAE,8BAA8B,EAAE;IAChE,cAAc,EAAE;QACd,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,SAAS;QACjB,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,uBAAuB,IAAI,CAAC,YAAY,EAAE;QACpE,WAAW,EAAE,cAAc;KAC5B;IACD,mBAAmB,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAoB,EAAE;CACrF,CAAC","sourcesContent":["// @ts-nocheck\n\nimport type { LocalizedMessages } from './types.js';\n\n/** Strings used by Cimpress UI components, localized in the `en-US` locale. */\nexport const enUS: LocalizedMessages = {\n common: { clearValue: `Clear`, dismiss: `Dismiss`, clearValueDescription: `Press Escape to clear text.` },\n copyToClipboard: { success: `Copied to clipboard.`, failure: `Failed to copy to clipboard.` },\n label: { required: `(required)` },\n datePicker: {\n clearValue: `Clear`,\n openCalendar: `Open calendar`,\n previousMonth: `Previous month`,\n nextMonth: `Next month`,\n switchToYearView: `Year view`,\n previousYear: `Previous year`,\n nextYear: `Next year`,\n switchToMultiYearView: `Multi-year view`,\n previousMultiYearSection: (args, formatter) => `Previous ${formatter.number(args.yearCount)} years`,\n nextMultiYearSection: (args, formatter) => `Next ${formatter.number(args.yearCount)} years`,\n },\n numberField: { decrement: `Decrement`, increment: `Increment` },\n pagination: {\n goToPage: (args, formatter) => `Page ${formatter.number(args.pageNumber)}`,\n previousPage: `Previous page`,\n nextPage: `Next page`,\n selectedPageAnnouncement: (args, formatter) => `Selected page: ${formatter.number(args.pageNumber)}`,\n },\n tagField: {\n itemsSelected: (args, formatter) =>\n `${formatter.plural(args.selectedItemCount, { one: () => `${formatter.number(args.selectedItemCount)} item selected`, other: () => `${formatter.number(args.selectedItemCount)} items selected` })}`,\n },\n filePicker: {\n chooseFile: `Choose file`,\n noFilesSelected: (args, formatter) =>\n `${formatter.select({ true: `No files selected`, other: `No file selected` }, args.allowsMultiple)}`,\n multipleFilesSelected: (args, formatter) => `${formatter.number(args.fileCount)} files`,\n },\n table: { toggleColumnSortOrder: `Toggle sort order of column:` },\n simpleAuthTool: {\n logIn: `Log in`,\n logOut: `Log out`,\n profileDetails: (args) => `Profile details for ${args.userFullName}`,\n unknownUser: `Unknown User`,\n },\n UNSTABLE_collection: { loading: `Loading items`, loadingMore: `Loading more items` },\n};\n"]}
@@ -14,6 +14,12 @@ export type LocalizedMessages = {
14
14
  /** A visually hidden label that indicates a text field can be cleared by pressing the Escape key. This text is only announced by screen readers. */
15
15
  clearValueDescription: LocalizedString;
16
16
  };
17
+ copyToClipboard: {
18
+ /** The message displayed in a tooltip when a value is successfully copied to clipboard. */
19
+ success: LocalizedString;
20
+ /** The message displayed in a tooltip when a value fails to be copied to clipboard. */
21
+ failure: LocalizedString;
22
+ };
17
23
  label: {
18
24
  /** A visually hidden label that indicates a form field is required. This text is appended to the field's visible label and is only announced by screen readers. */
19
25
  required: LocalizedString;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/i18n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E,eAAe,CAAC;KAC3C,CAAC;IACF,QAAQ,EAAE;QACR,kGAAkG;QAClG,aAAa,EAAE,eAAe,CAAC;KAChC,CAAC;IACF,UAAU,EAAE;QACV,uEAAuE;QACvE,UAAU,EAAE,eAAe,CAAC;QAC5B,8CAA8C;QAC9C,eAAe,EAAE,eAAe,CAAC;QACjC,oDAAoD;QACpD,qBAAqB,EAAE,eAAe,CAAC;KACxC,CAAC;IACF,KAAK,EAAE;QACL,0JAA0J;QAC1J,qBAAqB,EAAE,eAAe,CAAC;KACxC,CAAC;IACF,cAAc,EAAE;QACd,gEAAgE;QAChE,KAAK,EAAE,eAAe,CAAC;QACvB,gEAAgE;QAChE,MAAM,EAAE,eAAe,CAAC;QACxB,sFAAsF;QACtF,cAAc,EAAE,eAAe,CAAC;QAChC,uEAAuE;QACvE,WAAW,EAAE,eAAe,CAAC;KAC9B,CAAC;IACF,mBAAmB,EAAE;QACnB,0GAA0G;QAC1G,OAAO,EAAE,eAAe,CAAC;QACzB,gGAAgG;QAChG,WAAW,EAAE,eAAe,CAAC;KAC9B,CAAC;CACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/i18n/messages/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { LocalizedStringFormatter } from 'react-aria';\n\n/**\n * Represents a localized piece of text used within a component.\n * It can either be a plain string, or a function that returns a plain string based on provided context.\n */\nexport type LocalizedString =\n | string\n | ((\n args?: Record<string, string | number | boolean>,\n formatter?: LocalizedStringFormatter<string, LocalizedString>,\n ) => string);\n\n/** A collection of localized strings used by Cimpress UI components. */\nexport type LocalizedMessages = {\n common: {\n /** An ARIA label for a button that clears the value of a field. */\n clearValue: LocalizedString;\n /** An ARIA label for a button that closes or dismisses an alert, a callout, a dialog, or other overlay component. Used for accessibility purposes to clearly indicate the button's function to screen reader users. */\n dismiss: LocalizedString;\n /** A visually hidden label that indicates a text field can be cleared by pressing the Escape key. This text is only announced by screen readers. */\n clearValueDescription: LocalizedString;\n };\n label: {\n /** A visually hidden label that indicates a form field is required. This text is appended to the field's visible label and is only announced by screen readers. */\n required: LocalizedString;\n };\n datePicker: {\n /** An ARIA label for a button that clears the value of a date picker field. */\n clearValue: LocalizedString;\n /** An ARIA label for a button that opens a calendar popup. Part of a date picker. */\n openCalendar: LocalizedString;\n /** An ARIA label for a button that displays the previous month in a calendar popup. Part of a date picker. */\n previousMonth: LocalizedString;\n /** An ARIA label for a button that displays the next month in a calendar popup. Part of a date picker. */\n nextMonth: LocalizedString;\n /** An ARIA label for a button that changes the calendar popup to a single-year view. Part of a date picker. */\n switchToYearView: LocalizedString;\n /** An ARIA label for a button that displays the previous year in a calendar popup. Part of a date picker. */\n previousYear: LocalizedString;\n /** An ARIA label for a button that displays the next year in a calendar popup. Part of a date picker. */\n nextYear: LocalizedString;\n /** An ARIA label for a button that changes the calendar popup to a multi-year view. Part of a date picker. */\n switchToMultiYearView: LocalizedString;\n /** An ARIA label for a button that displays the previous section of a multi-year view in a calendar popup. Year count will always be larger than 1. Part of a date picker. */\n previousMultiYearSection: LocalizedString;\n /** An ARIA label for a button that displays the next section of a multi-year view in a calendar popup. Year count will always be larger than 1. Part of a date picker. */\n nextMultiYearSection: LocalizedString;\n };\n numberField: {\n /** An ARIA label for a button that decrements the value of a number field. */\n decrement: LocalizedString;\n /** An ARIA label for a button that increments the value of a number field. */\n increment: LocalizedString;\n };\n pagination: {\n /** An ARIA label for a button that navigates to a specific page. Part of a pagination navigation structure. */\n goToPage: LocalizedString;\n /** An ARIA label for a button that navigates to the previous page. Part of a pagination navigation structure. */\n previousPage: LocalizedString;\n /** An ARIA label for a button that navigates to the next page. Part of a pagination navigation structure. */\n nextPage: LocalizedString;\n /** A screen reader announcement for when the selected page changes. Part of a pagination navigation structure. */\n selectedPageAnnouncement: LocalizedString;\n };\n tagField: {\n /** A label displayed within a tag field to inform the user about the number of selected items. */\n itemsSelected: LocalizedString;\n };\n filePicker: {\n /** A label for the button that opens the native file picker dialog. */\n chooseFile: LocalizedString;\n /** A label for when no files are selected. */\n noFilesSelected: LocalizedString;\n /** A label for when multiple files are selected. */\n multipleFilesSelected: LocalizedString;\n };\n table: {\n /** An ARIA label for a button that toggles the sort order of a specific column in a data table. This label will be followed by the name of the column. */\n toggleColumnSortOrder: LocalizedString;\n };\n simpleAuthTool: {\n /** A label used for a button that redirects to a login flow. */\n logIn: LocalizedString;\n /** A label used for a button that logs the current user out. */\n logOut: LocalizedString;\n /** An ARIA label for a popover that contains information about the logged in user. */\n profileDetails: LocalizedString;\n /** A name that's displayed when the current user's name is unknown. */\n unknownUser: LocalizedString;\n };\n UNSTABLE_collection: {\n /** An ARIA label for a spinner displayed when the list of items is first being loaded in a collection. */\n loading: LocalizedString;\n /** An ARIA label for a spinner displayed when more items are being loaded into a collection. */\n loadingMore: LocalizedString;\n };\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/i18n/messages/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { LocalizedStringFormatter } from 'react-aria';\n\n/**\n * Represents a localized piece of text used within a component.\n * It can either be a plain string, or a function that returns a plain string based on provided context.\n */\nexport type LocalizedString =\n | string\n | ((\n args?: Record<string, string | number | boolean>,\n formatter?: LocalizedStringFormatter<string, LocalizedString>,\n ) => string);\n\n/** A collection of localized strings used by Cimpress UI components. */\nexport type LocalizedMessages = {\n common: {\n /** An ARIA label for a button that clears the value of a field. */\n clearValue: LocalizedString;\n /** An ARIA label for a button that closes or dismisses an alert, a callout, a dialog, or other overlay component. Used for accessibility purposes to clearly indicate the button's function to screen reader users. */\n dismiss: LocalizedString;\n /** A visually hidden label that indicates a text field can be cleared by pressing the Escape key. This text is only announced by screen readers. */\n clearValueDescription: LocalizedString;\n };\n copyToClipboard: {\n /** The message displayed in a tooltip when a value is successfully copied to clipboard. */\n success: LocalizedString;\n /** The message displayed in a tooltip when a value fails to be copied to clipboard. */\n failure: LocalizedString;\n };\n label: {\n /** A visually hidden label that indicates a form field is required. This text is appended to the field's visible label and is only announced by screen readers. */\n required: LocalizedString;\n };\n datePicker: {\n /** An ARIA label for a button that clears the value of a date picker field. */\n clearValue: LocalizedString;\n /** An ARIA label for a button that opens a calendar popup. Part of a date picker. */\n openCalendar: LocalizedString;\n /** An ARIA label for a button that displays the previous month in a calendar popup. Part of a date picker. */\n previousMonth: LocalizedString;\n /** An ARIA label for a button that displays the next month in a calendar popup. Part of a date picker. */\n nextMonth: LocalizedString;\n /** An ARIA label for a button that changes the calendar popup to a single-year view. Part of a date picker. */\n switchToYearView: LocalizedString;\n /** An ARIA label for a button that displays the previous year in a calendar popup. Part of a date picker. */\n previousYear: LocalizedString;\n /** An ARIA label for a button that displays the next year in a calendar popup. Part of a date picker. */\n nextYear: LocalizedString;\n /** An ARIA label for a button that changes the calendar popup to a multi-year view. Part of a date picker. */\n switchToMultiYearView: LocalizedString;\n /** An ARIA label for a button that displays the previous section of a multi-year view in a calendar popup. Year count will always be larger than 1. Part of a date picker. */\n previousMultiYearSection: LocalizedString;\n /** An ARIA label for a button that displays the next section of a multi-year view in a calendar popup. Year count will always be larger than 1. Part of a date picker. */\n nextMultiYearSection: LocalizedString;\n };\n numberField: {\n /** An ARIA label for a button that decrements the value of a number field. */\n decrement: LocalizedString;\n /** An ARIA label for a button that increments the value of a number field. */\n increment: LocalizedString;\n };\n pagination: {\n /** An ARIA label for a button that navigates to a specific page. Part of a pagination navigation structure. */\n goToPage: LocalizedString;\n /** An ARIA label for a button that navigates to the previous page. Part of a pagination navigation structure. */\n previousPage: LocalizedString;\n /** An ARIA label for a button that navigates to the next page. Part of a pagination navigation structure. */\n nextPage: LocalizedString;\n /** A screen reader announcement for when the selected page changes. Part of a pagination navigation structure. */\n selectedPageAnnouncement: LocalizedString;\n };\n tagField: {\n /** A label displayed within a tag field to inform the user about the number of selected items. */\n itemsSelected: LocalizedString;\n };\n filePicker: {\n /** A label for the button that opens the native file picker dialog. */\n chooseFile: LocalizedString;\n /** A label for when no files are selected. */\n noFilesSelected: LocalizedString;\n /** A label for when multiple files are selected. */\n multipleFilesSelected: LocalizedString;\n };\n table: {\n /** An ARIA label for a button that toggles the sort order of a specific column in a data table. This label will be followed by the name of the column. */\n toggleColumnSortOrder: LocalizedString;\n };\n simpleAuthTool: {\n /** A label used for a button that redirects to a login flow. */\n logIn: LocalizedString;\n /** A label used for a button that logs the current user out. */\n logOut: LocalizedString;\n /** An ARIA label for a popover that contains information about the logged in user. */\n profileDetails: LocalizedString;\n /** A name that's displayed when the current user's name is unknown. */\n unknownUser: LocalizedString;\n };\n UNSTABLE_collection: {\n /** An ARIA label for a spinner displayed when the list of items is first being loaded in a collection. */\n loading: LocalizedString;\n /** An ARIA label for a spinner displayed when more items are being loaded into a collection. */\n loadingMore: LocalizedString;\n };\n};\n"]}
@@ -11,6 +11,8 @@ export * from './components/card/card.js';
11
11
  export * from './components/checkbox/checkbox.js';
12
12
  export * from './components/checkbox/checkbox-group.js';
13
13
  export * from './components/combo-box/combo-box.js';
14
+ export * from './components/copy/copy-button.js';
15
+ export * from './components/copy/copy-inline.js';
14
16
  export * from './components/date-picker/date-picker.js';
15
17
  export * from './components/dialog-root/dialog-root.js';
16
18
  export * from './components/disclosure/disclosure.js';
@@ -27,6 +29,7 @@ export * from './components/pagination/pagination.js';
27
29
  export * from './components/radio/radio.js';
28
30
  export * from './components/radio/radio-group.js';
29
31
  export * from './components/select/select.js';
32
+ export * from './components/slider/slider.js';
30
33
  export * from './components/spinner/spinner.js';
31
34
  export * from './components/text-inputs/search-field.js';
32
35
  export * from './components/text-inputs/text-field.js';
@@ -81,7 +84,5 @@ export * from './components/app-shell/app-shell.js';
81
84
  export * from './components/app-header/side-nav.js';
82
85
  export * from './components/hidden/hidden.js';
83
86
  export * from './components/app-header/nav-button.js';
84
- export * from './components/copy/copy-button.js';
85
- export * from './components/copy/inline-copy.js';
86
87
  export * from './components/top-nav/top-nav.js';
87
88
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"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AAC/B,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AACzE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,4CAA4C,CAAC;AAG3D,cAAc,iDAAiD,CAAC;AAChE,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAClG,YAAY,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC"}
@@ -28,6 +28,8 @@ __exportStar(require("./components/card/card.js"), exports);
28
28
  __exportStar(require("./components/checkbox/checkbox.js"), exports);
29
29
  __exportStar(require("./components/checkbox/checkbox-group.js"), exports);
30
30
  __exportStar(require("./components/combo-box/combo-box.js"), exports);
31
+ __exportStar(require("./components/copy/copy-button.js"), exports);
32
+ __exportStar(require("./components/copy/copy-inline.js"), exports);
31
33
  __exportStar(require("./components/date-picker/date-picker.js"), exports);
32
34
  __exportStar(require("./components/dialog-root/dialog-root.js"), exports);
33
35
  __exportStar(require("./components/disclosure/disclosure.js"), exports);
@@ -43,6 +45,7 @@ __exportStar(require("./components/pagination/pagination.js"), exports);
43
45
  __exportStar(require("./components/radio/radio.js"), exports);
44
46
  __exportStar(require("./components/radio/radio-group.js"), exports);
45
47
  __exportStar(require("./components/select/select.js"), exports);
48
+ __exportStar(require("./components/slider/slider.js"), exports);
46
49
  __exportStar(require("./components/spinner/spinner.js"), exports);
47
50
  __exportStar(require("./components/text-inputs/search-field.js"), exports);
48
51
  __exportStar(require("./components/text-inputs/text-field.js"), exports);
@@ -91,7 +94,5 @@ __exportStar(require("./components/app-shell/app-shell.js"), exports);
91
94
  __exportStar(require("./components/app-header/side-nav.js"), exports);
92
95
  __exportStar(require("./components/hidden/hidden.js"), exports);
93
96
  __exportStar(require("./components/app-header/nav-button.js"), exports);
94
- __exportStar(require("./components/copy/copy-button.js"), exports);
95
- __exportStar(require("./components/copy/inline-copy.js"), exports);
96
97
  __exportStar(require("./components/top-nav/top-nav.js"), exports);
97
98
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,wEAAsD;AACtD,8EAA4D;AAC5D,8DAA4C;AAC5C,gEAA8C;AAC9C,qEAAmD;AACnD,qEAAmD;AACnD,0EAAwD;AACxD,kEAAgD;AAChD,4DAA0C;AAC1C,oEAAkD;AAClD,0EAAwD;AACxD,sEAAoD;AACpD,0EAAwD;AACxD,0EAAwD;AACxD,wEAAsD;AACtD,8EAA4D;AAE5D,kEAAgD;AAChD,gEAA8C;AAC9C,4DAA0C;AAC1C,sEAAoD;AACpD,4DAA0C;AAC1C,4EAA0D;AAC1D,4EAA0D;AAC1D,wEAAsD;AACtD,8DAA4C;AAC5C,oEAAkD;AAClD,gEAA8C;AAC9C,kEAAgD;AAChD,2EAAyD;AACzD,yEAAuD;AACvD,wEAAsD;AACtD,0EAAwD;AACxD,kEAAgD;AAChD,kEAAgD;AAChD,wEAAsD;AACtD,8DAA4C;AAC5C,qEAAmD;AACnD,yEAAuD;AACvD,0EAAwD;AACxD,mEAAiD;AACjD,uEAAqD;AACrD,wEAAsD;AACtD,2EAAyD;AACzD,gFAA8D;AAC9D,0EAAwD;AAGxD,4DAA0C;AAC1C,0DAAwC;AACxC,gEAA8C;AAC9C,sEAAoD;AACpD,8EAA4D;AAC5D,mFAAiE;AACjE,oFAAkE;AAClE,+DAA6C;AAE7C,kEAAgD;AAChD,sEAAoD;AAEpD,kEAAgD;AAChD,kEAAgD;AAoBhD,kEAAgD;AAChD,wEAAsD;AAEtD,6EAA2D;AAE3D,2BAA2B;AAC3B,kFAAgE;AAChE,0EAAwD;AACxD,sEAAoD;AACpD,gEAA8C;AAC9C,qEAAmD;AACnD,oEAAkG;AAAzF,qHAAA,mBAAmB,OAAA;AAE5B,4EAA0D;AAC1D,kEAAgD;AAChD,uEAAqD;AAErD,sEAAoD;AACpD,sEAAoD;AACpD,gEAA8C;AAC9C,wEAAsD;AACtD,mEAAiD;AACjD,mEAAiD;AACjD,kEAAgD","sourcesContent":["export * from './components/alert/alert.js';\nexport * from './components/app-header/app-header.js';\nexport * from './components/app-header/simple-auth-tool.js';\nexport * from './components/badge/badge.js';\nexport * from './components/button/button.js';\nexport * from './components/button/link-button.js';\nexport * from './components/button/icon-button.js';\nexport * from './components/button/icon-link-button.js';\nexport * from './components/callout/callout.js';\nexport * from './components/card/card.js';\nexport * from './components/checkbox/checkbox.js';\nexport * from './components/checkbox/checkbox-group.js';\nexport * from './components/combo-box/combo-box.js';\nexport * from './components/date-picker/date-picker.js';\nexport * from './components/dialog-root/dialog-root.js';\nexport * from './components/disclosure/disclosure.js';\nexport * from './components/disclosure/disclosure-group.js';\nexport type { DisclosureSize, DisclosureVariant } from './components/disclosure/context.js';\nexport * from './components/divider/divider.js';\nexport * from './components/drawer/drawer.js';\nexport * from './components/form/form.js';\nexport * from './components/link-tabs/link-tabs.js';\nexport * from './components/menu/menu.js';\nexport * from './components/modal-dialog/modal-dialog.js';\nexport * from './components/number-field/number-field.js';\nexport * from './components/pagination/pagination.js';\nexport * from './components/radio/radio.js';\nexport * from './components/radio/radio-group.js';\nexport * from './components/select/select.js';\nexport * from './components/spinner/spinner.js';\nexport * from './components/text-inputs/search-field.js';\nexport * from './components/text-inputs/text-field.js';\nexport * from './components/text-inputs/text-area.js';\nexport * from './components/breadcrumbs/breadcrumbs.js';\nexport * from './components/tooltip/tooltip.js';\nexport * from './components/popover/popover.js';\nexport * from './components/table/table-container.js';\nexport * from './components/table/table.js';\nexport * from './components/table/table-header.js';\nexport * from './components/table/table-header-row.js';\nexport * from './components/table/table-header-cell.js';\nexport * from './components/table/table-body.js';\nexport * from './components/table/table-body-row.js';\nexport * from './components/table/table-body-cell.js';\nexport * from './components/table/table-row-selector.js';\nexport * from './components/table/table-all-rows-selector.js';\nexport * from './components/table/table-empty-state.js';\nexport type { RowSelectionMode as TableRowSelectionMode } from './components/table/contexts/table-state.js';\nexport type { ColumnContentAlignment as TableColumnContentAlignment } from './components/table/contexts/column-collection.js';\nexport * from './components/tabs/tabs.js';\nexport * from './components/tag/tag.js';\nexport * from './components/tag/tag-group.js';\nexport * from './components/tag-field/tag-field.js';\nexport * from './components/toggle-button/toggle-button.js';\nexport * from './components/toggle-button/toggle-icon-button.js';\nexport * from './components/toggle-button/toggle-button-group.js';\nexport * from './components/file-trigger.js';\n\nexport * from './components/spacing/box/box.js';\nexport * from './components/spacing/stack/stack.js';\n\nexport * from './components/typography/text.js';\nexport * from './components/typography/link.js';\n\nexport type { ForegroundTone } from './utils/style/types.js';\n\nexport type {\n CollectionItem,\n Direction,\n FieldError,\n HoverEvent,\n Key,\n Selection,\n PressEvent,\n RouterConfig,\n Href,\n RouterOptions,\n ValidationResult,\n} from './components/types.js';\nexport type { Spacing, Responsive } from './components/spacing/types.js';\nexport type { StyleProps } from './with-style-props.js';\n\nexport * from './providers/ssr/ssr-provider.js';\nexport * from './providers/router/router-provider.js';\n\nexport * from './components/internal/x-button/x-button.js';\n\n// Unfinished exports below\nexport * from './components/visually-hidden/visually-hidden.js';\nexport * from './components/file-picker/file-picker.js';\nexport * from './components/container/container.js';\nexport * from './components/toggle/toggle.js';\nexport * from './components/toast/toast-region.js';\nexport { UNSTABLE_toastQueue, type UNSTABLE_ToastQueue } from './components/toast/toast-queue.js';\nexport type { UNSTABLE_ToastOptions } from './components/toast/types.js';\nexport * from './components/alert-dialog/alert-dialog.js';\nexport * from './components/stepper/stepper.js';\nexport * from './components/stepper/stepper-item.js';\nexport type { StepperStatus } from './components/stepper/types.js';\nexport * from './components/app-shell/app-shell.js';\nexport * from './components/app-header/side-nav.js';\nexport * from './components/hidden/hidden.js';\nexport * from './components/app-header/nav-button.js';\nexport * from './components/copy/copy-button.js';\nexport * from './components/copy/inline-copy.js';\nexport * from './components/top-nav/top-nav.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,wEAAsD;AACtD,8EAA4D;AAC5D,8DAA4C;AAC5C,gEAA8C;AAC9C,qEAAmD;AACnD,qEAAmD;AACnD,0EAAwD;AACxD,kEAAgD;AAChD,4DAA0C;AAC1C,oEAAkD;AAClD,0EAAwD;AACxD,sEAAoD;AACpD,mEAAiD;AACjD,mEAAiD;AACjD,0EAAwD;AACxD,0EAAwD;AACxD,wEAAsD;AACtD,8EAA4D;AAE5D,kEAAgD;AAChD,gEAA8C;AAC9C,4DAA0C;AAC1C,sEAAoD;AACpD,4DAA0C;AAC1C,4EAA0D;AAC1D,4EAA0D;AAC1D,wEAAsD;AACtD,8DAA4C;AAC5C,oEAAkD;AAClD,gEAA8C;AAC9C,gEAA8C;AAC9C,kEAAgD;AAChD,2EAAyD;AACzD,yEAAuD;AACvD,wEAAsD;AACtD,0EAAwD;AACxD,kEAAgD;AAChD,kEAAgD;AAChD,wEAAsD;AACtD,8DAA4C;AAC5C,qEAAmD;AACnD,yEAAuD;AACvD,0EAAwD;AACxD,mEAAiD;AACjD,uEAAqD;AACrD,wEAAsD;AACtD,2EAAyD;AACzD,gFAA8D;AAC9D,0EAAwD;AAGxD,4DAA0C;AAC1C,0DAAwC;AACxC,gEAA8C;AAC9C,sEAAoD;AACpD,8EAA4D;AAC5D,mFAAiE;AACjE,oFAAkE;AAClE,+DAA6C;AAE7C,kEAAgD;AAChD,sEAAoD;AAEpD,kEAAgD;AAChD,kEAAgD;AAoBhD,kEAAgD;AAChD,wEAAsD;AAEtD,6EAA2D;AAE3D,2BAA2B;AAC3B,kFAAgE;AAChE,0EAAwD;AACxD,sEAAoD;AACpD,gEAA8C;AAC9C,qEAAmD;AACnD,oEAAkG;AAAzF,qHAAA,mBAAmB,OAAA;AAE5B,4EAA0D;AAC1D,kEAAgD;AAChD,uEAAqD;AAErD,sEAAoD;AACpD,sEAAoD;AACpD,gEAA8C;AAC9C,wEAAsD;AACtD,kEAAgD","sourcesContent":["export * from './components/alert/alert.js';\nexport * from './components/app-header/app-header.js';\nexport * from './components/app-header/simple-auth-tool.js';\nexport * from './components/badge/badge.js';\nexport * from './components/button/button.js';\nexport * from './components/button/link-button.js';\nexport * from './components/button/icon-button.js';\nexport * from './components/button/icon-link-button.js';\nexport * from './components/callout/callout.js';\nexport * from './components/card/card.js';\nexport * from './components/checkbox/checkbox.js';\nexport * from './components/checkbox/checkbox-group.js';\nexport * from './components/combo-box/combo-box.js';\nexport * from './components/copy/copy-button.js';\nexport * from './components/copy/copy-inline.js';\nexport * from './components/date-picker/date-picker.js';\nexport * from './components/dialog-root/dialog-root.js';\nexport * from './components/disclosure/disclosure.js';\nexport * from './components/disclosure/disclosure-group.js';\nexport type { DisclosureSize, DisclosureVariant } from './components/disclosure/context.js';\nexport * from './components/divider/divider.js';\nexport * from './components/drawer/drawer.js';\nexport * from './components/form/form.js';\nexport * from './components/link-tabs/link-tabs.js';\nexport * from './components/menu/menu.js';\nexport * from './components/modal-dialog/modal-dialog.js';\nexport * from './components/number-field/number-field.js';\nexport * from './components/pagination/pagination.js';\nexport * from './components/radio/radio.js';\nexport * from './components/radio/radio-group.js';\nexport * from './components/select/select.js';\nexport * from './components/slider/slider.js';\nexport * from './components/spinner/spinner.js';\nexport * from './components/text-inputs/search-field.js';\nexport * from './components/text-inputs/text-field.js';\nexport * from './components/text-inputs/text-area.js';\nexport * from './components/breadcrumbs/breadcrumbs.js';\nexport * from './components/tooltip/tooltip.js';\nexport * from './components/popover/popover.js';\nexport * from './components/table/table-container.js';\nexport * from './components/table/table.js';\nexport * from './components/table/table-header.js';\nexport * from './components/table/table-header-row.js';\nexport * from './components/table/table-header-cell.js';\nexport * from './components/table/table-body.js';\nexport * from './components/table/table-body-row.js';\nexport * from './components/table/table-body-cell.js';\nexport * from './components/table/table-row-selector.js';\nexport * from './components/table/table-all-rows-selector.js';\nexport * from './components/table/table-empty-state.js';\nexport type { RowSelectionMode as TableRowSelectionMode } from './components/table/contexts/table-state.js';\nexport type { ColumnContentAlignment as TableColumnContentAlignment } from './components/table/contexts/column-collection.js';\nexport * from './components/tabs/tabs.js';\nexport * from './components/tag/tag.js';\nexport * from './components/tag/tag-group.js';\nexport * from './components/tag-field/tag-field.js';\nexport * from './components/toggle-button/toggle-button.js';\nexport * from './components/toggle-button/toggle-icon-button.js';\nexport * from './components/toggle-button/toggle-button-group.js';\nexport * from './components/file-trigger.js';\n\nexport * from './components/spacing/box/box.js';\nexport * from './components/spacing/stack/stack.js';\n\nexport * from './components/typography/text.js';\nexport * from './components/typography/link.js';\n\nexport type { ForegroundTone } from './utils/style/types.js';\n\nexport type {\n CollectionItem,\n Direction,\n FieldError,\n HoverEvent,\n Key,\n Selection,\n PressEvent,\n RouterConfig,\n Href,\n RouterOptions,\n ValidationResult,\n} from './components/types.js';\nexport type { Spacing, Responsive } from './components/spacing/types.js';\nexport type { StyleProps } from './with-style-props.js';\n\nexport * from './providers/ssr/ssr-provider.js';\nexport * from './providers/router/router-provider.js';\n\nexport * from './components/internal/x-button/x-button.js';\n\n// Unfinished exports below\nexport * from './components/visually-hidden/visually-hidden.js';\nexport * from './components/file-picker/file-picker.js';\nexport * from './components/container/container.js';\nexport * from './components/toggle/toggle.js';\nexport * from './components/toast/toast-region.js';\nexport { UNSTABLE_toastQueue, type UNSTABLE_ToastQueue } from './components/toast/toast-queue.js';\nexport type { UNSTABLE_ToastOptions } from './components/toast/types.js';\nexport * from './components/alert-dialog/alert-dialog.js';\nexport * from './components/stepper/stepper.js';\nexport * from './components/stepper/stepper-item.js';\nexport type { StepperStatus } from './components/stepper/types.js';\nexport * from './components/app-shell/app-shell.js';\nexport * from './components/app-header/side-nav.js';\nexport * from './components/hidden/hidden.js';\nexport * from './components/app-header/nav-button.js';\nexport * from './components/top-nav/top-nav.js';\n"]}
@@ -13,7 +13,7 @@ import { CimpressLogo } from './cimpress-logo.js';
13
13
  function AppHeader({ title, titleLink, tools, UNSTABLE_navButton: navButton, UNSTABLE_postTitle: postTitle, UNSTABLE_search: search, UNSAFE_className, UNSAFE_style, ...props }, ref) {
14
14
  const isMobile = useIsMobile();
15
15
  const titleLinkProps = typeof titleLink === 'object' && 'href' in titleLink ? titleLink : { href: titleLink };
16
- return (_jsxs("header", { ...props, ref: ref, className: clsx('cim-app-header', UNSAFE_className), style: UNSAFE_style, children: [_jsxs("div", { className: "cim-app-header-title", children: [navButton, _jsx(CimpressLogo, { height: 24 }), _jsx(Divider, { orientation: "vertical" }), _jsx(Text, { as: "h1", variant: "title-5", tone: "base", children: _jsx(Link, { ...titleLinkProps, UNSAFE_className: "cim-app-header-title-link", children: title }) }), postTitle] }), search && _jsx("div", { className: "cim-app-header-search", children: search }), _jsx("div", { className: "cim-app-header-tools", children: isMobile ? (_jsxs(PopoverRoot, { children: [_jsx(IconButton, { icon: _jsx(IconMenuMoreVertical, {}), "aria-label": "Expand/collapse header", variant: "tertiary", size: "small" }), _jsx(Popover, { "aria-label": "Expanded header", placement: "bottom end", children: _jsx("div", { className: "cim-app-header-tools-collapsed", children: tools }) })] })) : (tools) })] }));
16
+ return (_jsxs("header", { ...props, ref: ref, className: clsx('cim-app-header', UNSAFE_className), style: UNSAFE_style, children: [_jsxs("div", { className: "cim-app-header-title", children: [navButton, _jsx(CimpressLogo, { height: 24 }), _jsx(Divider, { orientation: "vertical" }), _jsx(Text, { as: "h1", variant: "title-5", tone: "base", children: _jsx(Link, { ...titleLinkProps, UNSAFE_className: "cim-app-header-title-link", children: title }) }), postTitle] }), search && _jsx("div", { className: "cim-app-header-search", children: search }), _jsx("div", { className: "cim-app-header-tools", children: isMobile && tools ? (_jsxs(PopoverRoot, { children: [_jsx(IconButton, { icon: _jsx(IconMenuMoreVertical, {}), "aria-label": "Expand/collapse header", variant: "tertiary", size: "small" }), _jsx(Popover, { "aria-label": "Expanded header", placement: "bottom end", children: _jsx("div", { className: "cim-app-header-tools-collapsed", children: tools }) })] })) : (tools) })] }));
17
17
  }
18
18
  /**
19
19
  * Displays a basic application header.
@@ -1 +1 @@
1
- {"version":3,"file":"app-header.js","sourceRoot":"","sources":["../../../../src/components/app-header/app-header.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAgBlD,SAAS,SAAS,CAChB,EACE,KAAK,EACL,SAAS,EACT,KAAK,EACL,kBAAkB,EAAE,SAAS,EAC7B,kBAAkB,EAAE,SAAS,EAC7B,eAAe,EAAE,MAAM,EACvB,gBAAgB,EAChB,YAAY,EACZ,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;AAEtD,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef, ReactNode } from 'react';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconMenuMoreVertical } from '../../icons/index.js';\nimport { useIsMobile } from '../../utils/use-is-mobile.js';\nimport { IconButton } from '../button/icon-button.js';\nimport { Divider } from '../divider/divider.js';\nimport { Popover, PopoverRoot } from '../popover/popover.js';\nimport type { CommonProps, Href, NavigationProps, WithRequired } from '../types.js';\nimport { Link } from '../typography/link.js';\nimport { Text } from '../typography/text.js';\nimport { CimpressLogo } from './cimpress-logo.js';\n\nexport interface AppHeaderTitleLinkProps extends WithRequired<NavigationProps, 'href'> {}\n\nexport interface AppHeaderProps extends CommonProps {\n /** The title displayed in the header, usually the application name. Rendered as an `<h1>` element. */\n title: string;\n /** The props of the link that is rendered around the header title. */\n titleLink: Href | AppHeaderTitleLinkProps;\n /** The tools to render at the end of the header. */\n tools?: ReactNode;\n UNSTABLE_navButton?: ReactNode;\n UNSTABLE_postTitle?: ReactNode;\n UNSTABLE_search?: ReactNode;\n}\n\nfunction AppHeader(\n {\n title,\n titleLink,\n tools,\n UNSTABLE_navButton: navButton,\n UNSTABLE_postTitle: postTitle,\n UNSTABLE_search: search,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: AppHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const isMobile = useIsMobile();\n\n const titleLinkProps = typeof titleLink === 'object' && 'href' in titleLink ? titleLink : { href: titleLink };\n\n return (\n <header {...props} ref={ref} className={clsx('cim-app-header', UNSAFE_className)} style={UNSAFE_style}>\n <div className=\"cim-app-header-title\">\n {navButton}\n <CimpressLogo height={24} />\n <Divider orientation=\"vertical\" />\n <Text as=\"h1\" variant=\"title-5\" tone=\"base\">\n <Link {...titleLinkProps} UNSAFE_className=\"cim-app-header-title-link\">\n {title}\n </Link>\n </Text>\n\n {postTitle}\n </div>\n\n {search && <div className=\"cim-app-header-search\">{search}</div>}\n\n <div className=\"cim-app-header-tools\">\n {isMobile ? (\n <PopoverRoot>\n <IconButton\n icon={<IconMenuMoreVertical />}\n // TODO: i18n\n aria-label=\"Expand/collapse header\"\n variant=\"tertiary\"\n size=\"small\"\n />\n <Popover aria-label=\"Expanded header\" placement=\"bottom end\">\n <div className=\"cim-app-header-tools-collapsed\">{tools}</div>\n </Popover>\n </PopoverRoot>\n ) : (\n tools\n )}\n </div>\n </header>\n );\n}\n\n/**\n * Displays a basic application header.\n *\n * See [app header usage guidelines](https://ui.cimpress.io/components/app-header/).\n */\nconst _AppHeader = forwardRef(AppHeader, 'AppHeader');\n\nexport { _AppHeader as AppHeader };\n"]}
1
+ {"version":3,"file":"app-header.js","sourceRoot":"","sources":["../../../../src/components/app-header/app-header.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAgBlD,SAAS,SAAS,CAChB,EACE,KAAK,EACL,SAAS,EACT,KAAK,EACL,kBAAkB,EAAE,SAAS,EAC7B,kBAAkB,EAAE,SAAS,EAC7B,eAAe,EAAE,MAAM,EACvB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KA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CAAC;AAEtD,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef, ReactNode } from 'react';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconMenuMoreVertical } from '../../icons/index.js';\nimport { useIsMobile } from '../../utils/use-is-mobile.js';\nimport { IconButton } from '../button/icon-button.js';\nimport { Divider } from '../divider/divider.js';\nimport { Popover, PopoverRoot } from '../popover/popover.js';\nimport type { CommonProps, Href, NavigationProps, WithRequired } from '../types.js';\nimport { Link } from '../typography/link.js';\nimport { Text } from '../typography/text.js';\nimport { CimpressLogo } from './cimpress-logo.js';\n\nexport interface AppHeaderTitleLinkProps extends WithRequired<NavigationProps, 'href'> {}\n\nexport interface AppHeaderProps extends CommonProps {\n /** The title displayed in the header, usually the application name. Rendered as an `<h1>` element. */\n title: string;\n /** The props of the link that is rendered around the header title. */\n titleLink: Href | AppHeaderTitleLinkProps;\n /** The tools to render at the end of the header. */\n tools?: ReactNode;\n UNSTABLE_navButton?: ReactNode;\n UNSTABLE_postTitle?: ReactNode;\n UNSTABLE_search?: ReactNode;\n}\n\nfunction AppHeader(\n {\n title,\n titleLink,\n tools,\n UNSTABLE_navButton: navButton,\n UNSTABLE_postTitle: postTitle,\n UNSTABLE_search: search,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: AppHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const isMobile = useIsMobile();\n\n const titleLinkProps = typeof titleLink === 'object' && 'href' in titleLink ? titleLink : { href: titleLink };\n\n return (\n <header {...props} ref={ref} className={clsx('cim-app-header', UNSAFE_className)} style={UNSAFE_style}>\n <div className=\"cim-app-header-title\">\n {navButton}\n <CimpressLogo height={24} />\n <Divider orientation=\"vertical\" />\n <Text as=\"h1\" variant=\"title-5\" tone=\"base\">\n <Link {...titleLinkProps} UNSAFE_className=\"cim-app-header-title-link\">\n {title}\n </Link>\n </Text>\n\n {postTitle}\n </div>\n\n {search && <div className=\"cim-app-header-search\">{search}</div>}\n\n <div className=\"cim-app-header-tools\">\n {isMobile && tools ? (\n <PopoverRoot>\n <IconButton\n icon={<IconMenuMoreVertical />}\n // TODO: i18n\n aria-label=\"Expand/collapse header\"\n variant=\"tertiary\"\n size=\"small\"\n />\n <Popover aria-label=\"Expanded header\" placement=\"bottom end\">\n <div className=\"cim-app-header-tools-collapsed\">{tools}</div>\n </Popover>\n </PopoverRoot>\n ) : (\n tools\n )}\n </div>\n </header>\n );\n}\n\n/**\n * Displays a basic application header.\n *\n * See [app header usage guidelines](https://ui.cimpress.io/components/app-header/).\n */\nconst _AppHeader = forwardRef(AppHeader, 'AppHeader');\n\nexport { _AppHeader as AppHeader };\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { ActionButtonProps, BaseButtonProps } from '../button/types.js';
2
2
  import type { AriaLabelingProps, CommonProps, StringLikeChildren } from '../types.js';
3
- export interface UNSTABLE_CopyButtonProps extends CommonProps, AriaLabelingProps, Pick<BaseButtonProps, 'size'>, Pick<ActionButtonProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
3
+ export interface CopyButtonProps extends CommonProps, AriaLabelingProps, Pick<BaseButtonProps, 'size'>, Pick<ActionButtonProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
4
4
  /** The text displayed on the button. */
5
5
  children?: StringLikeChildren;
6
6
  /**
@@ -10,11 +10,16 @@ export interface UNSTABLE_CopyButtonProps extends CommonProps, AriaLabelingProps
10
10
  variant?: 'secondary' | 'tertiary';
11
11
  /** The content to be copied. */
12
12
  value: string;
13
- /** The help text that appears in a tooltip when the user hovers or focuses the button. */
14
- helpText?: string;
13
+ /** The description that appears in a tooltip when the user hovers or focuses the button. */
14
+ description?: string;
15
15
  /** A handler that gets called when the user triggers the copying. */
16
16
  onCopy?: () => void;
17
17
  }
18
- declare const _UNSTABLE_CopyButton: (props: UNSTABLE_CopyButtonProps & import("react").RefAttributes<HTMLButtonElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
19
- export { _UNSTABLE_CopyButton as UNSTABLE_CopyButton };
18
+ /**
19
+ * Displays a button that allows users to copy a specific value to clipboard.
20
+ *
21
+ * See [copy button usage guidelines](https://ui.cimpress.io/components/copy-button/).
22
+ */
23
+ declare const _CopyButton: (props: CopyButtonProps & import("react").RefAttributes<HTMLButtonElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
24
+ export { _CopyButton as CopyButton };
20
25
  //# sourceMappingURL=copy-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy-button.d.ts","sourceRoot":"","sources":["../../../../src/components/copy/copy-button.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtF,MAAM,WAAW,wBACf,SAAQ,WAAW,EACjB,iBAAiB,EACjB,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,EAC7B,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,cAAc,GAAG,YAAY,CAAC;IACvE,wCAAwC;IACxC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IACnC,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAyDD,QAAA,MAAM,oBAAoB,6KAAgE,CAAC;AAE3F,OAAO,EAAE,oBAAoB,IAAI,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"copy-button.d.ts","sourceRoot":"","sources":["../../../../src/components/copy/copy-button.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtF,MAAM,WAAW,eACf,SAAQ,WAAW,EACjB,iBAAiB,EACjB,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,EAC7B,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,cAAc,GAAG,YAAY,CAAC;IACvE,wCAAwC;IACxC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IACnC,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAuDD;;;;GAIG;AACH,QAAA,MAAM,WAAW,oKAAuD,CAAC;AAEzE,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC"}
@@ -3,6 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useContext, useEffect, useState } from 'react';
4
4
  import { TooltipTriggerStateContext as RACTooltipTriggerStateContext } from 'react-aria-components';
5
5
  import { forwardRef } from '../../forward-ref.js';
6
+ import { useLocalizedMessages } from '../../i18n/index.js';
6
7
  import { IconCheckCircle, IconCopy } from '../../icons/index.js';
7
8
  import { useProductionWarning } from '../../utils/use-production-warning.js';
8
9
  import { withStyleProps } from '../../with-style-props.js';
@@ -10,7 +11,7 @@ import { Button } from '../button/button.js';
10
11
  import { IconButton } from '../button/icon-button.js';
11
12
  import { Tooltip } from '../tooltip/tooltip.js';
12
13
  import { useCopyToClipboard } from './use-copy.js';
13
- function UNSTABLE_CopyButton({ onCopy, helpText, ...props }, ref) {
14
+ function CopyButton({ onCopy, description, ...props }, ref) {
14
15
  const [copyStatus, showCopyFeedback, copyToClipboard] = useCopyToClipboard();
15
16
  const [showCopyFeedbackLabel, setShowCopyFeedbackLabel] = useState(showCopyFeedback);
16
17
  useEffect(() => {
@@ -38,16 +39,20 @@ function UNSTABLE_CopyButton({ onCopy, helpText, ...props }, ref) {
38
39
  copyToClipboard(props.value);
39
40
  onCopy?.();
40
41
  };
41
- return (_jsx(Tooltip, { isDisabled: props.isDisabled || (!showCopyFeedback && !helpText), label: showCopyFeedbackLabel
42
+ const messages = useLocalizedMessages('copyToClipboard');
43
+ return (_jsx(Tooltip, { isDisabled: props.isDisabled || (!showCopyFeedback && !description), label: showCopyFeedbackLabel
42
44
  ? copyStatus?.success
43
- ? // TODO: i18n
44
- 'Copied to clipboard.'
45
- : 'Failed to copy to clipboard.'
46
- : (helpText ?? ''), placement: "top", children: _jsx(CopyButtonInner, { ...props, buttonRef: ref, onCopy: onPress, showCopyFeedback: showCopyFeedback }) }));
45
+ ? messages.format('success')
46
+ : messages.format('failure')
47
+ : (description ?? ''), placement: "top", children: _jsx(CopyButtonInner, { ...props, buttonRef: ref, onCopy: onPress, showCopyFeedback: showCopyFeedback }) }));
47
48
  }
48
- const _UNSTABLE_CopyButton = withStyleProps(forwardRef(UNSTABLE_CopyButton), 'CopyButton');
49
- export { _UNSTABLE_CopyButton as UNSTABLE_CopyButton };
50
- // eslint-disable-next-line react-refresh/only-export-components
49
+ /**
50
+ * Displays a button that allows users to copy a specific value to clipboard.
51
+ *
52
+ * See [copy button usage guidelines](https://ui.cimpress.io/components/copy-button/).
53
+ */
54
+ const _CopyButton = withStyleProps(forwardRef(CopyButton), 'CopyButton');
55
+ export { _CopyButton as CopyButton };
51
56
  function CopyButtonInner({ UNSAFE_className, UNSAFE_style, children, value, onCopy, buttonRef, showCopyFeedback, ...props }) {
52
57
  const tooltipTriggerState = useContext(RACTooltipTriggerStateContext);
53
58
  const icon = showCopyFeedback ? _jsx(IconCheckCircle, {}) : _jsx(IconCopy, {});
@@ -60,6 +65,6 @@ function CopyButtonInner({ UNSAFE_className, UNSAFE_style, children, value, onCo
60
65
  }
61
66
  // eslint-disable-next-line react-hooks/exhaustive-deps
62
67
  }, [showCopyFeedback]);
63
- return children ? (_jsx(Button, { ...props, ref: buttonRef, iconStart: icon, tone: "base", onPress: onCopy, children: children })) : (_jsx(IconButton, { ...props, ref: buttonRef, icon: icon, tone: "base", "aria-label": props['aria-label'] ?? '', onPress: onCopy }));
68
+ return children ? (_jsx(Button, { ...props, ref: buttonRef, type: "button", iconStart: icon, tone: "base", onPress: onCopy, children: children })) : (_jsx(IconButton, { ...props, ref: buttonRef, type: "button", icon: icon, tone: "base", "aria-label": props['aria-label'] ?? '', onPress: onCopy }));
64
69
  }
65
70
  //# sourceMappingURL=copy-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy-button.js","sourceRoot":"","sources":["../../../../src/components/copy/copy-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAqB,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,0BAA0B,IAAI,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAsBnD,SAAS,mBAAmB,CAC1B,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,EAA4B,EACxD,GAAoC;IAEpC,MAAM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CAAC,CAAC,CAAC,CACF,KAAC,UAAU,OACL,KAAK,EACT,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,MAAM,gBACC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,EACrC,OAAO,EAAE,MAAM,GACf,CACH,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport { useContext, useEffect, useState, type ForwardedRef } from 'react';\nimport { TooltipTriggerStateContext as RACTooltipTriggerStateContext } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckCircle, IconCopy } from '../../icons/index.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { Button } from '../button/button.js';\nimport { IconButton } from '../button/icon-button.js';\nimport type { ActionButtonProps, BaseButtonProps } from '../button/types.js';\nimport { Tooltip } from '../tooltip/tooltip.js';\nimport type { AriaLabelingProps, CommonProps, StringLikeChildren } from '../types.js';\nimport { useCopyToClipboard } from './use-copy.js';\n\nexport interface UNSTABLE_CopyButtonProps\n extends CommonProps,\n AriaLabelingProps,\n Pick<BaseButtonProps, 'size'>,\n Pick<ActionButtonProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {\n /** The text displayed on the button. */\n children?: StringLikeChildren;\n /**\n * Determines the visual appearance of the button.\n * @default 'secondary'\n */\n variant?: 'secondary' | 'tertiary';\n /** The content to be copied. */\n value: string;\n /** The help text that appears in a tooltip when the user hovers or focuses the button. */\n helpText?: string;\n /** A handler that gets called when the user triggers the copying. */\n onCopy?: () => void;\n}\n\nfunction UNSTABLE_CopyButton(\n { onCopy, helpText, ...props }: UNSTABLE_CopyButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n const [copyStatus, showCopyFeedback, copyToClipboard] = useCopyToClipboard();\n const [showCopyFeedbackLabel, setShowCopyFeedbackLabel] = useState(showCopyFeedback);\n\n useEffect(() => {\n let labelChangeTimeout: ReturnType<typeof setTimeout> | undefined;\n\n if (showCopyFeedback) {\n setShowCopyFeedbackLabel(true);\n } else {\n // Wait until the tooltip has animated away before changing the label\n labelChangeTimeout = setTimeout(() => setShowCopyFeedbackLabel(false), 200);\n }\n\n return () => {\n if (labelChangeTimeout) {\n clearTimeout(labelChangeTimeout);\n }\n };\n }, [showCopyFeedback]);\n\n const { children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useProductionWarning(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn('CopyButton requires one of children / aria-label / aria-labelledby for accessibility');\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n const onPress = () => {\n copyToClipboard(props.value);\n onCopy?.();\n };\n\n return (\n <Tooltip\n isDisabled={props.isDisabled || (!showCopyFeedback && !helpText)}\n label={\n showCopyFeedbackLabel\n ? copyStatus?.success\n ? // TODO: i18n\n 'Copied to clipboard.'\n : 'Failed to copy to clipboard.'\n : (helpText ?? '')\n }\n placement=\"top\"\n >\n <CopyButtonInner {...props} buttonRef={ref} onCopy={onPress} showCopyFeedback={showCopyFeedback} />\n </Tooltip>\n );\n}\n\nconst _UNSTABLE_CopyButton = withStyleProps(forwardRef(UNSTABLE_CopyButton), 'CopyButton');\n\nexport { _UNSTABLE_CopyButton as UNSTABLE_CopyButton };\n\n// eslint-disable-next-line react-refresh/only-export-components\nfunction CopyButtonInner({\n UNSAFE_className,\n UNSAFE_style,\n children,\n value,\n onCopy,\n buttonRef,\n showCopyFeedback,\n ...props\n}: Omit<UNSTABLE_CopyButtonProps, 'helpText'> & {\n buttonRef: ForwardedRef<HTMLButtonElement>;\n showCopyFeedback: boolean;\n}) {\n const tooltipTriggerState = useContext(RACTooltipTriggerStateContext);\n\n const icon = showCopyFeedback ? <IconCheckCircle /> : <IconCopy />;\n\n useEffect(() => {\n if (showCopyFeedback) {\n tooltipTriggerState?.open(true);\n } else {\n tooltipTriggerState?.close(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [showCopyFeedback]);\n\n return children ? (\n <Button {...props} ref={buttonRef} iconStart={icon} tone=\"base\" onPress={onCopy}>\n {children}\n </Button>\n ) : (\n <IconButton\n {...props}\n ref={buttonRef}\n icon={icon}\n tone=\"base\"\n aria-label={props['aria-label'] ?? ''}\n onPress={onCopy}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"copy-button.js","sourceRoot":"","sources":["../../../../src/components/copy/copy-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAqB,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,0BAA0B,IAAI,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAsBnD,SAAS,UAAU,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAmB,EAAE,GAAoC;IAC1G,MAAM,CAAC,UAAU,EAAE,gBAAgB,EAAE,eAAe,CAAC,GAAG,kBAAkB,EAAE,CAAC;IAC7E,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAErF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,kBAA6D,C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Q,EACb,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,MAAM,gBACC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,EACrC,OAAO,EAAE,MAAM,GACf,CACH,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport { useContext, useEffect, useState, type ForwardedRef } from 'react';\nimport { TooltipTriggerStateContext as RACTooltipTriggerStateContext } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { useLocalizedMessages } from '../../i18n/index.js';\nimport { IconCheckCircle, IconCopy } from '../../icons/index.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { Button } from '../button/button.js';\nimport { IconButton } from '../button/icon-button.js';\nimport type { ActionButtonProps, BaseButtonProps } from '../button/types.js';\nimport { Tooltip } from '../tooltip/tooltip.js';\nimport type { AriaLabelingProps, CommonProps, StringLikeChildren } from '../types.js';\nimport { useCopyToClipboard } from './use-copy.js';\n\nexport interface CopyButtonProps\n extends CommonProps,\n AriaLabelingProps,\n Pick<BaseButtonProps, 'size'>,\n Pick<ActionButtonProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {\n /** The text displayed on the button. */\n children?: StringLikeChildren;\n /**\n * Determines the visual appearance of the button.\n * @default 'secondary'\n */\n variant?: 'secondary' | 'tertiary';\n /** The content to be copied. */\n value: string;\n /** The description that appears in a tooltip when the user hovers or focuses the button. */\n description?: string;\n /** A handler that gets called when the user triggers the copying. */\n onCopy?: () => void;\n}\n\nfunction CopyButton({ onCopy, description, ...props }: CopyButtonProps, ref: ForwardedRef<HTMLButtonElement>) {\n const [copyStatus, showCopyFeedback, copyToClipboard] = useCopyToClipboard();\n const [showCopyFeedbackLabel, setShowCopyFeedbackLabel] = useState(showCopyFeedback);\n\n useEffect(() => {\n let labelChangeTimeout: ReturnType<typeof setTimeout> | undefined;\n\n if (showCopyFeedback) {\n setShowCopyFeedbackLabel(true);\n } else {\n // Wait until the tooltip has animated away before changing the label\n labelChangeTimeout = setTimeout(() => setShowCopyFeedbackLabel(false), 200);\n }\n\n return () => {\n if (labelChangeTimeout) {\n clearTimeout(labelChangeTimeout);\n }\n };\n }, [showCopyFeedback]);\n\n const { children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useProductionWarning(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn('CopyButton requires one of children / aria-label / aria-labelledby for accessibility');\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n const onPress = () => {\n copyToClipboard(props.value);\n onCopy?.();\n };\n\n const messages = useLocalizedMessages('copyToClipboard');\n\n return (\n <Tooltip\n isDisabled={props.isDisabled || (!showCopyFeedback && !description)}\n label={\n showCopyFeedbackLabel\n ? copyStatus?.success\n ? messages.format('success')\n : messages.format('failure')\n : (description ?? '')\n }\n placement=\"top\"\n >\n <CopyButtonInner {...props} buttonRef={ref} onCopy={onPress} showCopyFeedback={showCopyFeedback} />\n </Tooltip>\n );\n}\n\n/**\n * Displays a button that allows users to copy a specific value to clipboard.\n *\n * See [copy button usage guidelines](https://ui.cimpress.io/components/copy-button/).\n */\nconst _CopyButton = withStyleProps(forwardRef(CopyButton), 'CopyButton');\n\nexport { _CopyButton as CopyButton };\n\nfunction CopyButtonInner({\n UNSAFE_className,\n UNSAFE_style,\n children,\n value,\n onCopy,\n buttonRef,\n showCopyFeedback,\n ...props\n}: Omit<CopyButtonProps, 'description'> & {\n buttonRef: ForwardedRef<HTMLButtonElement>;\n showCopyFeedback: boolean;\n}) {\n const tooltipTriggerState = useContext(RACTooltipTriggerStateContext);\n\n const icon = showCopyFeedback ? <IconCheckCircle /> : <IconCopy />;\n\n useEffect(() => {\n if (showCopyFeedback) {\n tooltipTriggerState?.open(true);\n } else {\n tooltipTriggerState?.close(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [showCopyFeedback]);\n\n return children ? (\n <Button {...props} ref={buttonRef} type=\"button\" iconStart={icon} tone=\"base\" onPress={onCopy}>\n {children}\n </Button>\n ) : (\n <IconButton\n {...props}\n ref={buttonRef}\n type=\"button\"\n icon={icon}\n tone=\"base\"\n aria-label={props['aria-label'] ?? ''}\n onPress={onCopy}\n />\n );\n}\n"]}
@@ -0,0 +1,17 @@
1
+ import type { ActionButtonProps } from '../button/types.js';
2
+ import type { AriaLabelingProps, CommonProps, StringLikeChildren } from '../types.js';
3
+ import type { TextStyleOptions } from '../typography/types.js';
4
+ export interface CopyInlineProps extends CommonProps, AriaLabelingProps, Pick<TextStyleOptions, 'variant'>, Pick<ActionButtonProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
5
+ /** The content to be copied. */
6
+ children: StringLikeChildren;
7
+ /** A handler that gets called when the user triggers the copying. */
8
+ onCopy?: () => void;
9
+ }
10
+ /**
11
+ * Allows copying an inline value to clipboard.
12
+ *
13
+ * See [copy inline usage guidelines](https://ui.cimpress.io/components/copy-inline/).
14
+ */
15
+ declare const _CopyInline: (props: CopyInlineProps & import("react").RefAttributes<HTMLButtonElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
16
+ export { _CopyInline as CopyInline };
17
+ //# sourceMappingURL=copy-inline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-inline.d.ts","sourceRoot":"","sources":["../../../../src/components/copy/copy-inline.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAO/D,MAAM,WAAW,eACf,SAAQ,WAAW,EACjB,iBAAiB,EACjB,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,EACjC,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,cAAc,GAAG,YAAY,CAAC;IACvE,gCAAgC;IAChC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AA0CD;;;;GAIG;AACH,QAAA,MAAM,WAAW,oKAAuD,CAAC;AAEzE,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC"}
@@ -4,6 +4,7 @@ import clsx from 'clsx';
4
4
  import { useRef } from 'react';
5
5
  import { Button as RACButton } from 'react-aria-components';
6
6
  import { forwardRef } from '../../forward-ref.js';
7
+ import { useLocalizedMessages } from '../../i18n/index.js';
7
8
  import { IconCheckCircle, IconCopy } from '../../icons/index.js';
8
9
  import { withStyleProps } from '../../with-style-props.js';
9
10
  import { Tooltip } from '../tooltip/tooltip.js';
@@ -11,17 +12,21 @@ import { textStyle } from '../typography/utils.js';
11
12
  import { useCopyToClipboard } from './use-copy.js';
12
13
  // Used to prevent word wrap between icons and text
13
14
  const WORD_JOINER = '\u2060';
14
- function UNSTABLE_InlineCopy({ children, UNSAFE_className, UNSAFE_style, variant, tone, fontStyle, onCopy, ...props }, ref) {
15
+ function CopyInline({ children, UNSAFE_className, UNSAFE_style, variant, onCopy, ...props }, ref) {
15
16
  const tooltipTriggerRef = useRef(null);
16
17
  const [copyStatus, showCopyFeedback, copyToClipboard] = useCopyToClipboard();
17
18
  const textValue = typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');
18
- return (_jsx(Tooltip, { isOpen: showCopyFeedback, isDisabled: props.isDisabled,
19
- // TODO: i18n
20
- label: copyStatus?.success ? 'Copied to clipboard.' : 'Failed to copy to clipboard.', placement: "top", triggerRef: tooltipTriggerRef, children: _jsxs(RACButton, { ...props, ref: ref, className: clsx('cim-inline-copy', textStyle({ variant, tone, fontStyle }), UNSAFE_className), style: UNSAFE_style, onPress: () => {
19
+ const messages = useLocalizedMessages('copyToClipboard');
20
+ return (_jsx(Tooltip, { isOpen: showCopyFeedback, isDisabled: props.isDisabled, label: copyStatus?.success ? messages.format('success') : messages.format('failure'), placement: "top", triggerRef: tooltipTriggerRef, children: _jsxs(RACButton, { ...props, ref: ref, className: clsx('cim-copy-inline', textStyle({ variant, tone: 'base' }), UNSAFE_className), style: UNSAFE_style, onPress: () => {
21
21
  copyToClipboard(textValue);
22
22
  onCopy?.();
23
- }, children: [_jsx("span", { className: "cim-inline-copy-text", children: children }), WORD_JOINER, _jsx("span", { className: "cim-inline-copy-icon", ref: tooltipTriggerRef, children: showCopyFeedback ? _jsx(IconCheckCircle, {}) : _jsx(IconCopy, {}) })] }) }));
23
+ }, children: [_jsx("span", { className: "cim-copy-inline-text", children: children }), WORD_JOINER, _jsx("span", { className: "cim-copy-inline-icon", ref: tooltipTriggerRef, children: showCopyFeedback ? _jsx(IconCheckCircle, {}) : _jsx(IconCopy, {}) })] }) }));
24
24
  }
25
- const _UNSTABLE_InlineCopy = withStyleProps(forwardRef(UNSTABLE_InlineCopy), 'InlineCopy');
26
- export { _UNSTABLE_InlineCopy as UNSTABLE_InlineCopy };
27
- //# sourceMappingURL=inline-copy.js.map
25
+ /**
26
+ * Allows copying an inline value to clipboard.
27
+ *
28
+ * See [copy inline usage guidelines](https://ui.cimpress.io/components/copy-inline/).
29
+ */
30
+ const _CopyInline = withStyleProps(forwardRef(CopyInline), 'CopyInline');
31
+ export { _CopyInline as CopyInline };
32
+ //# sourceMappingURL=copy-inline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-inline.js","sourceRoot":"","sources":["../../../../src/components/copy/copy-inline.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,EAAqB,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,eAAe,E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EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,gBAAgB,CAAC,EAC1F,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,GAAG,EAAE;gBACZ,eAAe,CAAC,SAAS,CAAC,CAAC;gBAC3B,MAAM,EAAE,EAAE,CAAC;YACb,CAAC,aAED,eAAM,SAAS,EAAC,sBAAsB,YAAE,QAAQ,GAAQ,EACvD,WAAW,EACZ,eAAM,SAAS,EAAC,sBAAsB,EAAC,GAAG,EAAE,iBAAiB,YAC1D,gBAAgB,CAAC,CAAC,CAAC,KAAC,eAAe,KAAG,CAAC,CAAC,CAAC,KAAC,QAAQ,KAAG,GACjD,IACG,GACJ,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG,cAAc,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;AAEzE,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useRef, type ForwardedRef } from 'react';\nimport { Button as RACButton } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { useLocalizedMessages } from '../../i18n/index.js';\nimport { IconCheckCircle, IconCopy } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { ActionButtonProps } from '../button/types.js';\nimport { Tooltip } from '../tooltip/tooltip.js';\nimport type { AriaLabelingProps, CommonProps, StringLikeChildren } from '../types.js';\nimport type { TextStyleOptions } from '../typography/types.js';\nimport { textStyle } from '../typography/utils.js';\nimport { useCopyToClipboard } from './use-copy.js';\n\n// Used to prevent word wrap between icons and text\nconst WORD_JOINER = '\\u2060';\n\nexport interface CopyInlineProps\n extends CommonProps,\n AriaLabelingProps,\n Pick<TextStyleOptions, 'variant'>,\n Pick<ActionButtonProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {\n /** The content to be copied. */\n children: StringLikeChildren;\n /** A handler that gets called when the user triggers the copying. */\n onCopy?: () => void;\n}\n\nfunction CopyInline(\n { children, UNSAFE_className, UNSAFE_style, variant, onCopy, ...props }: CopyInlineProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n const tooltipTriggerRef = useRef<HTMLSpanElement>(null);\n const [copyStatus, showCopyFeedback, copyToClipboard] = useCopyToClipboard();\n\n const textValue =\n typeof children === 'string' ? children : typeof children === 'number' ? String(children) : children.join('');\n\n const messages = useLocalizedMessages('copyToClipboard');\n\n return (\n <Tooltip\n isOpen={showCopyFeedback}\n isDisabled={props.isDisabled}\n label={copyStatus?.success ? messages.format('success') : messages.format('failure')}\n placement=\"top\"\n triggerRef={tooltipTriggerRef}\n >\n <RACButton\n {...props}\n ref={ref}\n className={clsx('cim-copy-inline', textStyle({ variant, tone: 'base' }), UNSAFE_className)}\n style={UNSAFE_style}\n onPress={() => {\n copyToClipboard(textValue);\n onCopy?.();\n }}\n >\n <span className=\"cim-copy-inline-text\">{children}</span>\n {WORD_JOINER}\n <span className=\"cim-copy-inline-icon\" ref={tooltipTriggerRef}>\n {showCopyFeedback ? <IconCheckCircle /> : <IconCopy />}\n </span>\n </RACButton>\n </Tooltip>\n );\n}\n\n/**\n * Allows copying an inline value to clipboard.\n *\n * See [copy inline usage guidelines](https://ui.cimpress.io/components/copy-inline/).\n */\nconst _CopyInline = withStyleProps(forwardRef(CopyInline), 'CopyInline');\n\nexport { _CopyInline as CopyInline };\n"]}
@@ -0,0 +1,8 @@
1
+ import { type InputProps as RACInputProps } from 'react-aria-components';
2
+ import type { CommonProps } from '../../types.js';
3
+ interface InputProps extends CommonProps, Exclude<RACInputProps, 'className' | 'style'> {
4
+ width?: 'fit-content' | 'full-width';
5
+ }
6
+ export declare function Input(props: InputProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/internal/input/input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,UAAU,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,UAAU,UAAW,SAAQ,WAAW,EAAE,OAAO,CAAC,aAAa,EAAE,WAAW,GAAG,OAAO,CAAC;IACrF,KAAK,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC;CACtC;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,2CAqDtC"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useLayoutEffect } from '@react-aria/utils';
3
+ import clsx from 'clsx';
4
+ import { useRef } from 'react';
5
+ import { Input as RACInput } from 'react-aria-components';
6
+ import { textStyle } from '../../typography/utils.js';
7
+ export function Input(props) {
8
+ const inputRef = useRef(null);
9
+ // TODO: find a better way to extract common props, if a new prop is added to `CommonProps` this will break
10
+ const { id, UNSAFE_className, UNSAFE_style, 'data-cim-style-root': dataCimStyleRoot, width, ...inputProps } = props;
11
+ // Field sizing based on input length for browsers that don't support `field-sizing: content`
12
+ useLayoutEffect(() => {
13
+ const input = inputRef.current;
14
+ function setInputLengthStyle() {
15
+ // Ensure input value changes are flushed before updating input width, especially in Safari
16
+ requestAnimationFrame(() => input?.style.setProperty('--cim-input-length', input?.value.length.toString() ?? '0'));
17
+ }
18
+ if (input != null) {
19
+ setInputLengthStyle();
20
+ input.addEventListener('input', setInputLengthStyle);
21
+ input.addEventListener('change', setInputLengthStyle);
22
+ }
23
+ return () => {
24
+ input?.removeEventListener('input', setInputLengthStyle);
25
+ input?.removeEventListener('change', setInputLengthStyle);
26
+ };
27
+ }, []);
28
+ return (_jsx("div", { id: id, className: clsx('cim-input', UNSAFE_className), style: UNSAFE_style, "data-cim-style-root": dataCimStyleRoot, children: _jsx(RACInput, { ...inputProps, ref: inputRef, className: clsx('cim-input-control', textStyle({ variant: 'body' })), "data-width": width }) }));
29
+ }
30
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../../../src/components/internal/input/input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAoC,MAAM,uBAAuB,CAAC;AAE5F,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAMtD,MAAM,UAAU,KAAK,CAAC,KAAiB;IACrC,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAChD,2GAA2G;IAC3G,MAAM,EACJ,EAAE,EACF,gBAAgB,EAChB,YAAY,EACZ,qBAAqB,EAAE,gBAAgB,EAEvC,KAAK,EAEL,GAAG,UAAU,EACd,GAAG,KAAK,CAAC;IAEV,6FAA6F;IAC7F,eAAe,CAAC,GAAG,EAAE;QACnB,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC;QAE/B,SAAS,mBAAmB;YAC1B,2FAA2F;YAC3F,qBAAqB,CAAC,GAAG,EAAE,CACzB,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,oBAAoB,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,CACtF,CAAC;QACJ,CAAC;QAED,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,mBAAmB,EAAE,CAAC;YAEtB,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;YACrD,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;QACxD,CAAC;QAED,OAAO,GAAG,EAAE;YACV,KAAK,EAAE,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;YACzD,KAAK,EAAE,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;QAC5D,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,cACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,EAC9C,KAAK,EAAE,YAAY,yBACE,gBAAgB,YAErC,KAAC,QAAQ,OACH,UAAU,EACd,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,gBACxD,KAAK,GACjB,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { useLayoutEffect } from '@react-aria/utils';\nimport clsx from 'clsx';\nimport { useRef } from 'react';\nimport { Input as RACInput, type InputProps as RACInputProps } from 'react-aria-components';\nimport type { CommonProps } from '../../types.js';\nimport { textStyle } from '../../typography/utils.js';\n\ninterface InputProps extends CommonProps, Exclude<RACInputProps, 'className' | 'style'> {\n width?: 'fit-content' | 'full-width';\n}\n\nexport function Input(props: InputProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n // TODO: find a better way to extract common props, if a new prop is added to `CommonProps` this will break\n const {\n id,\n UNSAFE_className,\n UNSAFE_style,\n 'data-cim-style-root': dataCimStyleRoot,\n\n width,\n\n ...inputProps\n } = props;\n\n // Field sizing based on input length for browsers that don't support `field-sizing: content`\n useLayoutEffect(() => {\n const input = inputRef.current;\n\n function setInputLengthStyle() {\n // Ensure input value changes are flushed before updating input width, especially in Safari\n requestAnimationFrame(() =>\n input?.style.setProperty('--cim-input-length', input?.value.length.toString() ?? '0'),\n );\n }\n\n if (input != null) {\n setInputLengthStyle();\n\n input.addEventListener('input', setInputLengthStyle);\n input.addEventListener('change', setInputLengthStyle);\n }\n\n return () => {\n input?.removeEventListener('input', setInputLengthStyle);\n input?.removeEventListener('change', setInputLengthStyle);\n };\n }, []);\n\n return (\n <div\n id={id}\n className={clsx('cim-input', UNSAFE_className)}\n style={UNSAFE_style}\n data-cim-style-root={dataCimStyleRoot}\n >\n <RACInput\n {...inputProps}\n ref={inputRef}\n className={clsx('cim-input-control', textStyle({ variant: 'body' }))}\n data-width={width}\n />\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"number-field.d.ts","sourceRoot":"","sources":["../../../../src/components/number-field/number-field.tsx"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,gBAAgB,IAAI,mBAAmB,EAE7C,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGpF,MAAM,WAAW,gBACf,SAAQ,WAAW,EACjB,yBAAyB,CAAC,MAAM,CAAC,EACjC,QAAQ,CAAC,cAAc,CAAC,EACxB,IAAI,CACF,mBAAmB,EACjB,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,GACX,UAAU,GACV,UAAU,GACV,MAAM,GACN,eAAe,GACf,SAAS,GACT,QAAQ,GACR,WAAW,CACd;IACH,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C;AAED,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAqFD;;;;GAIG;AACH,QAAA,MAAM,YAAY,kKAAyD,CAAC;AAE5E,OAAO,EAAE,YAAY,IAAI,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"number-field.d.ts","sourceRoot":"","sources":["../../../../src/components/number-field/number-field.tsx"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,gBAAgB,IAAI,mBAAmB,EAE7C,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGpF,MAAM,WAAW,gBACf,SAAQ,WAAW,EACjB,yBAAyB,CAAC,MAAM,CAAC,EACjC,QAAQ,CAAC,cAAc,CAAC,EACxB,IAAI,CACF,mBAAmB,EACjB,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,GACX,UAAU,GACV,UAAU,GACV,MAAM,GACN,eAAe,GACf,SAAS,GACT,QAAQ,GACR,WAAW,CACd;IACH,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAG3C;AAED,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAwFD;;;;GAIG;AACH,QAAA,MAAM,YAAY,kKAAyD,CAAC;AAE5E,OAAO,EAAE,YAAY,IAAI,WAAW,EAAE,CAAC"}
@@ -11,7 +11,7 @@ import { withStyleProps } from '../../with-style-props.js';
11
11
  import { IconButton } from '../button/icon-button.js';
12
12
  import { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';
13
13
  import { textStyle } from '../typography/utils.js';
14
- function NumberField({ label, description, error: errorMessage, placeholder, UNSAFE_className, UNSAFE_style, value, defaultValue, onChange, apiRef, ...props }, ref) {
14
+ function NumberField({ label, description, error: errorMessage, placeholder, UNSAFE_className, UNSAFE_style, value, defaultValue, onChange, apiRef, UNSTABLE_hideSpinner, ...props }, ref) {
15
15
  const inputRef = useRef(null);
16
16
  const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
17
17
  useProductionWarning(() => {
@@ -28,7 +28,7 @@ function NumberField({ label, description, error: errorMessage, placeholder, UNS
28
28
  // NumberField uses `NaN` to signify an empty value, which is unintuitive
29
29
  // https://github.com/adobe/react-spectrum/issues/5524
30
30
  // https://github.com/adobe/react-spectrum/issues/6971
31
- value: value === null ? Number.NaN : value, defaultValue: defaultValue === null ? Number.NaN : defaultValue, onChange: onChange ? (value) => onChange(Number.isNaN(value) ? null : value) : undefined, children: [_jsx(FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), _jsxs(RACGroup, { className: "cim-number-field-input-group", children: [_jsx(RACInput, { ref: inputRef, className: clsx('cim-number-field-input', textStyle({ variant: 'body' })), placeholder: placeholder }), _jsxs("div", { className: "cim-number-field-spinner", children: [_jsx(IconButton, { slot: "decrement", icon: _jsx(IconSubtract, {}), "aria-label": messages.format('decrement'), variant: "tertiary", size: "small" }), _jsx("div", { className: "cim-number-field-spinner-separator" }), _jsx(IconButton, { slot: "increment", icon: _jsx(IconAdd, {}), "aria-label": messages.format('increment'), variant: "tertiary", size: "small" })] })] }), _jsx(FormFieldError, { children: errorMessage }), _jsx(FormFieldDescription, { children: description })] }));
31
+ value: value === null ? Number.NaN : value, defaultValue: defaultValue === null ? Number.NaN : defaultValue, onChange: onChange ? (value) => onChange(Number.isNaN(value) ? null : value) : undefined, children: [_jsx(FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), _jsxs(RACGroup, { className: "cim-number-field-input-group", children: [_jsx(RACInput, { ref: inputRef, className: clsx('cim-number-field-input', textStyle({ variant: 'body' })), placeholder: placeholder }), !UNSTABLE_hideSpinner && (_jsxs("div", { className: "cim-number-field-spinner", children: [_jsx(IconButton, { slot: "decrement", icon: _jsx(IconSubtract, {}), "aria-label": messages.format('decrement'), variant: "tertiary", size: "small" }), _jsx("div", { className: "cim-number-field-spinner-separator" }), _jsx(IconButton, { slot: "increment", icon: _jsx(IconAdd, {}), "aria-label": messages.format('increment'), variant: "tertiary", size: "small" })] }))] }), _jsx(FormFieldError, { children: errorMessage }), _jsx(FormFieldDescription, { children: description })] }));
32
32
  }
33
33
  /**
34
34
  * Allows users to edit a number with a keyboard or increment/decrement buttons.
@@ -1 +1 @@
1
- {"version":3,"file":"number-field.js","sourceRoot":"","sources":["../../../../src/components/number-field/number-field.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAqB,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EACL,KAAK,IAAI,QAAQ,EACjB,WAAW,IAAI,cAAc,EAE7B,KAAK,IAAI,QAAQ,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAE5G,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAqCnD,SAAS,WAAW,CAClB,EACE,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACL,YAAY,E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KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,aAExF,KAAC,cAAc,IAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,YACvE,KAAK,GACS,EACjB,MAAC,QAAQ,IAAC,SAAS,EAAC,8BAA8B,aAChD,KAAC,QAAQ,IACP,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EACzE,WAAW,EAAE,WAAW,GACxB,EACF,eAAK,SAAS,EAAC,0BAA0B,aACvC,KAAC,UAAU,IACT,IAAI,EAAC,WAAW,EAChB,IAAI,EAAE,KAAC,YAAY,KAAG,gBACV,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,EACxC,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,GACZ,EACF,cAAK,SAAS,EAAC,oCAAoC,GAAG,EACtD,KAAC,UAAU,IACT,IAAI,EAAC,WAAW,EAChB,IAAI,EAAE,KAAC,OAAO,KAAG,gBACL,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,EACxC,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,GACZ,IACE,IACG,EACX,KAAC,cAAc,cAAE,YAAY,GAAkB,EAC/C,KAAC,oBAAoB,cAAE,WAAW,GAAwB,IAC3C,CAClB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,YAAY,GAAG,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,CAAC;AAE5E,OAAO,EAAE,YAAY,IAAI,WAAW,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { type ForwardedRef, useImperativeHandle, useRef } from 'react';\nimport {\n Input as RACInput,\n NumberField as RACNumberField,\n type NumberFieldProps as RACNumberFieldProps,\n Group as RACGroup,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { useLocalizedMessages } from '../../i18n/index.js';\nimport { IconAdd, IconSubtract } from '../../icons/index.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { IconButton } from '../button/icon-button.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport type { ApiProps, CommonProps, FieldWithPlaceholderProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface NumberFieldProps\n extends CommonProps,\n FieldWithPlaceholderProps<number>,\n ApiProps<NumberFieldApi>,\n Pick<\n RACNumberFieldProps,\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'autoFocus'\n | 'minValue'\n | 'maxValue'\n | 'step'\n | 'formatOptions'\n | 'onFocus'\n | 'onBlur'\n | 'onKeyDown'\n > {\n /** The current value (controlled). A `null` value means an empty field. */\n value?: number | null;\n /** The default value (uncontrolled). A `null` value means an empty field. */\n defaultValue?: number | null;\n /** Handler that is called when the value changes. A `null` value means an empty field. */\n onChange?: (value: number | null) => void;\n}\n\n/** The imperative API exposed by the `NumberField` component. */\nexport interface NumberFieldApi {\n /** Focuses the input field. */\n focus: () => void;\n /** Selects the contents of the input field. */\n select: () => void;\n}\n\nfunction NumberField(\n {\n label,\n description,\n error: errorMessage,\n placeholder,\n UNSAFE_className,\n UNSAFE_style,\n value,\n defaultValue,\n onChange,\n apiRef,\n ...props\n }: NumberFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const inputRef = useRef<HTMLInputElement>(null);\n\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useProductionWarning(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('NumberField requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const messages = useLocalizedMessages('numberField');\n\n useImperativeHandle(\n apiRef,\n () => ({\n focus: () => inputRef.current?.focus(),\n select: () => inputRef.current?.select(),\n }),\n [],\n );\n\n return (\n <RACNumberField\n {...props}\n ref={ref}\n className={clsx('cim-number-field', UNSAFE_className)}\n style={UNSAFE_style}\n // NumberField uses `NaN` to signify an empty value, which is unintuitive\n // https://github.com/adobe/react-spectrum/issues/5524\n // https://github.com/adobe/react-spectrum/issues/6971\n value={value === null ? Number.NaN : value}\n defaultValue={defaultValue === null ? Number.NaN : defaultValue}\n onChange={onChange ? (value) => onChange(Number.isNaN(value) ? null : value) : undefined}\n >\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACGroup className=\"cim-number-field-input-group\">\n <RACInput\n ref={inputRef}\n className={clsx('cim-number-field-input', textStyle({ variant: 'body' }))}\n placeholder={placeholder}\n />\n <div className=\"cim-number-field-spinner\">\n <IconButton\n slot=\"decrement\"\n icon={<IconSubtract />}\n aria-label={messages.format('decrement')}\n variant=\"tertiary\"\n size=\"small\"\n />\n <div className=\"cim-number-field-spinner-separator\" />\n <IconButton\n slot=\"increment\"\n icon={<IconAdd />}\n aria-label={messages.format('increment')}\n variant=\"tertiary\"\n size=\"small\"\n />\n </div>\n </RACGroup>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACNumberField>\n );\n}\n\n/**\n * Allows users to edit a number with a keyboard or increment/decrement buttons.\n *\n * See [number field usage guidelines](https://ui.cimpress.io/components/number-field/).\n */\nconst _NumberField = withStyleProps(forwardRef(NumberField), 'NumberField');\n\nexport { _NumberField as NumberField };\n"]}
1
+ {"version":3,"file":"number-field.js","sourceRoot":"","sources":["../../../../src/components/number-field/number-field.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAqB,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CA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AChB,IAAI,EAAE,KAAC,YAAY,KAAG,gBACV,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,EACxC,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,GACZ,EACF,cAAK,SAAS,EAAC,oCAAoC,GAAG,EACtD,KAAC,UAAU,IACT,IAAI,EAAC,WAAW,EAChB,IAAI,EAAE,KAAC,OAAO,KAAG,gBACL,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,EACxC,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,OAAO,GACZ,IACE,CACP,IACQ,EACX,KAAC,cAAc,cAAE,YAAY,GAAkB,EAC/C,KAAC,oBAAoB,cAAE,WAAW,GAAwB,IAC3C,CAClB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,YAAY,GAAG,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,CAAC;AAE5E,OAAO,EAAE,YAAY,IAAI,WAAW,EAAE,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { type ForwardedRef, useImperativeHandle, useRef } from 'react';\nimport {\n Input as RACInput,\n NumberField as RACNumberField,\n type NumberFieldProps as RACNumberFieldProps,\n Group as RACGroup,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { useLocalizedMessages } from '../../i18n/index.js';\nimport { IconAdd, IconSubtract } from '../../icons/index.js';\nimport { useProductionWarning } from '../../utils/use-production-warning.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { IconButton } from '../button/icon-button.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport type { ApiProps, CommonProps, FieldWithPlaceholderProps } from '../types.js';\nimport { textStyle } from '../typography/utils.js';\n\nexport interface NumberFieldProps\n extends CommonProps,\n FieldWithPlaceholderProps<number>,\n ApiProps<NumberFieldApi>,\n Pick<\n RACNumberFieldProps,\n | 'isDisabled'\n | 'isRequired'\n | 'isInvalid'\n | 'isReadOnly'\n | 'autoFocus'\n | 'minValue'\n | 'maxValue'\n | 'step'\n | 'formatOptions'\n | 'onFocus'\n | 'onBlur'\n | 'onKeyDown'\n > {\n /** The current value (controlled). A `null` value means an empty field. */\n value?: number | null;\n /** The default value (uncontrolled). A `null` value means an empty field. */\n defaultValue?: number | null;\n /** Handler that is called when the value changes. A `null` value means an empty field. */\n onChange?: (value: number | null) => void;\n /** @internal */\n UNSTABLE_hideSpinner?: boolean;\n}\n\n/** The imperative API exposed by the `NumberField` component. */\nexport interface NumberFieldApi {\n /** Focuses the input field. */\n focus: () => void;\n /** Selects the contents of the input field. */\n select: () => void;\n}\n\nfunction NumberField(\n {\n label,\n description,\n error: errorMessage,\n placeholder,\n UNSAFE_className,\n UNSAFE_style,\n value,\n defaultValue,\n onChange,\n apiRef,\n UNSTABLE_hideSpinner,\n ...props\n }: NumberFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const inputRef = useRef<HTMLInputElement>(null);\n\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useProductionWarning(() => {\n if (!label && !ariaLabel && !ariaLabelledBy) {\n console.warn('NumberField requires one of label / aria-label / aria-labelledby for accessibility');\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n const messages = useLocalizedMessages('numberField');\n\n useImperativeHandle(\n apiRef,\n () => ({\n focus: () => inputRef.current?.focus(),\n select: () => inputRef.current?.select(),\n }),\n [],\n );\n\n return (\n <RACNumberField\n {...props}\n ref={ref}\n className={clsx('cim-number-field', UNSAFE_className)}\n style={UNSAFE_style}\n // NumberField uses `NaN` to signify an empty value, which is unintuitive\n // https://github.com/adobe/react-spectrum/issues/5524\n // https://github.com/adobe/react-spectrum/issues/6971\n value={value === null ? Number.NaN : value}\n defaultValue={defaultValue === null ? Number.NaN : defaultValue}\n onChange={onChange ? (value) => onChange(Number.isNaN(value) ? null : value) : undefined}\n >\n <FormFieldLabel isRequired={props.isRequired} isDisabled={props.isDisabled}>\n {label}\n </FormFieldLabel>\n <RACGroup className=\"cim-number-field-input-group\">\n <RACInput\n ref={inputRef}\n className={clsx('cim-number-field-input', textStyle({ variant: 'body' }))}\n placeholder={placeholder}\n />\n {!UNSTABLE_hideSpinner && (\n <div className=\"cim-number-field-spinner\">\n <IconButton\n slot=\"decrement\"\n icon={<IconSubtract />}\n aria-label={messages.format('decrement')}\n variant=\"tertiary\"\n size=\"small\"\n />\n <div className=\"cim-number-field-spinner-separator\" />\n <IconButton\n slot=\"increment\"\n icon={<IconAdd />}\n aria-label={messages.format('increment')}\n variant=\"tertiary\"\n size=\"small\"\n />\n </div>\n )}\n </RACGroup>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACNumberField>\n );\n}\n\n/**\n * Allows users to edit a number with a keyboard or increment/decrement buttons.\n *\n * See [number field usage guidelines](https://ui.cimpress.io/components/number-field/).\n */\nconst _NumberField = withStyleProps(forwardRef(NumberField), 'NumberField');\n\nexport { _NumberField as NumberField };\n"]}