@indico-data/design-system 1.0.51 → 1.0.53

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 (64) hide show
  1. package/.eslintrc.js +5 -0
  2. package/jest.config.js +1 -2
  3. package/lib/components/Icon/Icon.stories.d.ts +2 -2
  4. package/lib/components/Icon/indicons.d.ts +1 -0
  5. package/lib/components/dropdowns/types.d.ts +0 -1
  6. package/lib/components/index.d.ts +2 -1
  7. package/lib/components/inputs/DatePicker/DatePicker.d.ts +15 -0
  8. package/lib/components/inputs/DatePicker/DatePicker.stories.d.ts +6 -0
  9. package/lib/components/inputs/DatePicker/DatePicker.styles.d.ts +2 -0
  10. package/lib/components/inputs/DatePicker/index.d.ts +1 -0
  11. package/lib/components/inputs/NoInputDatePicker/NoInputDatePicker.d.ts +19 -0
  12. package/lib/components/inputs/NoInputDatePicker/NoInputDatePicker.stories.d.ts +7 -0
  13. package/lib/components/inputs/NoInputDatePicker/NoInputDatePicker.styles.d.ts +2 -0
  14. package/lib/components/inputs/NoInputDatePicker/__tests__/NoInputDatePicker.test.d.ts +1 -0
  15. package/lib/components/inputs/NoInputDatePicker/index.d.ts +1 -0
  16. package/lib/components/inputs/RadioButtons/RadioButtons.d.ts +1 -0
  17. package/lib/components/inputs/index.d.ts +2 -0
  18. package/lib/components/text-truncate/TextTruncate.d.ts +1 -1
  19. package/lib/index.d.ts +69 -27
  20. package/lib/index.esm.js +21808 -13686
  21. package/lib/index.esm.js.map +1 -1
  22. package/lib/index.js +21474 -13333
  23. package/lib/index.js.map +1 -1
  24. package/lib/tokens/colors.d.ts +1 -0
  25. package/lib/types.d.ts +1 -0
  26. package/lib/utils/color.d.ts +21 -0
  27. package/lib/utils/index.d.ts +4 -0
  28. package/lib/utils/number.d.ts +21 -0
  29. package/lib/utils/string.d.ts +12 -0
  30. package/package.json +36 -29
  31. package/src/components/Icon/indicons.tsx +6 -0
  32. package/src/components/ListTable/Header/Header.tsx +1 -1
  33. package/src/components/Pagination/Pagination.tsx +1 -1
  34. package/src/components/basic-section/SectionTable/SectionTable.styles.ts +1 -2
  35. package/src/components/basic-section/SectionTable/SectionTable.tsx +12 -10
  36. package/src/components/dropdowns/MultiCombobox/MultiCombobox.stories.tsx +1 -1
  37. package/src/components/dropdowns/MultiCombobox/MultiCombobox.tsx +1 -1
  38. package/src/components/dropdowns/SingleCombobox/SingleCombobox.tsx +1 -1
  39. package/src/components/index.ts +2 -0
  40. package/src/components/inputs/DatePicker/DatePicker.stories.tsx +30 -0
  41. package/src/components/inputs/DatePicker/DatePicker.styles.ts +437 -0
  42. package/src/components/inputs/DatePicker/DatePicker.tsx +165 -0
  43. package/src/components/inputs/DatePicker/index.ts +1 -0
  44. package/src/components/inputs/EditableInput/EditableInput.tsx +1 -1
  45. package/src/components/inputs/NoInputDatePicker/NoInputDatePicker.stories.tsx +52 -0
  46. package/src/components/inputs/NoInputDatePicker/NoInputDatePicker.styles.ts +449 -0
  47. package/src/components/inputs/NoInputDatePicker/NoInputDatePicker.tsx +204 -0
  48. package/src/components/inputs/NoInputDatePicker/__tests__/NoInputDatePicker.test.tsx +126 -0
  49. package/src/components/inputs/NoInputDatePicker/index.ts +1 -0
  50. package/src/components/inputs/RadioButtons/RadioButtons.tsx +4 -2
  51. package/src/components/inputs/RadioGroup/RadioGroup.tsx +4 -5
  52. package/src/components/inputs/TextInput/TextInput.stories.tsx +1 -1
  53. package/src/components/inputs/index.ts +2 -0
  54. package/src/components/modals/ModalBase/ModalBase.styles.tsx +1 -1
  55. package/src/components/text-truncate/TextTruncate.test.tsx +3 -4
  56. package/src/components/text-truncate/TextTruncate.tsx +3 -2
  57. package/src/index.ts +2 -0
  58. package/src/styles/globals/forms.ts +1 -9
  59. package/src/styles/globals/tables.ts +1 -5
  60. package/src/tokens/colors.ts +1 -0
  61. package/src/utils/color.ts +139 -0
  62. package/src/utils/index.ts +5 -0
  63. package/src/utils/number.ts +29 -0
  64. package/src/utils/string.ts +87 -0
package/.eslintrc.js CHANGED
@@ -8,6 +8,11 @@ module.exports = {
8
8
  'plugin:@typescript-eslint/recommended',
9
9
  'plugin:react/recommended',
10
10
  ],
11
+ settings: {
12
+ react: {
13
+ version: 'detect',
14
+ },
15
+ },
11
16
  overrides: [
12
17
  {
13
18
  env: {
package/jest.config.js CHANGED
@@ -4,12 +4,11 @@ module.exports = {
4
4
  testEnvironment: 'jest-environment-jsdom',
5
5
  testPathIgnorePatterns: ['/node_modules/', '/lib/', '__mocks__'],
6
6
  setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"],
7
- moduleNameMapper: {
7
+ moduleNameMapper: {
8
8
  '^@/(.*)$': '<rootDir>/src/$1',
9
9
  },
10
10
  transform: {
11
11
  '^.+\\.(ts|tsx)?$': 'ts-jest',
12
12
  '^.+\\.(js|jsx)$': 'babel-jest',
13
13
  },
14
-
15
14
  };
@@ -15,7 +15,7 @@ declare const meta: {
15
15
  name: {
16
16
  control: {
17
17
  type: string;
18
- options: ("checkbox" | "ellipsis" | "help" | "pointer" | "text" | "zoom-in" | "zoom-out" | "reset" | "menu" | "search" | "split" | "indico-o-white" | "account" | "address" | "api-doc" | "arrow-dots" | "arrow-down" | "arrow-up-circle" | "arrows-cursor" | "bookmark" | "bookmarks" | "bookmark-saved" | "branch" | "check-circle" | "circle-help" | "check" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "classification-document" | "classification-image" | "classification-page" | "classify-and-unbundle" | "clipboard" | "coffee-1" | "coffee-2" | "coffee-fail" | "coffeecup" | "coffeesteam" | "cog" | "collection" | "compare" | "company-name" | "confidence-bar-1" | "confidence-bar-2" | "confidence-bar-3" | "confidence-bar-4" | "confidence-bars" | "configure" | "choose-library" | "crowdlabel" | "currency" | "dashboard" | "data-and-access" | "database" | "document" | "date" | "draggable" | "droplet" | "edit" | "education" | "elmos-fire" | "email" | "enterprise" | "exclamation-circle-stroke" | "extraction" | "eye" | "file" | "fileHappy" | "filter" | "filter-outline" | "folder" | "form" | "gallery" | "find-documents" | "graphiql" | "grid-view" | "happy" | "help-solid" | "highlight" | "highlight-outline" | "indico-logo-white" | "indico-o" | "info" | "kabob" | "key" | "label" | "layout-complex" | "layout-simple" | "list-view" | "libraries" | "location" | "logout" | "lock" | "model-import" | "model-starter" | "moon" | "moonbow" | "no-collections" | "no-libraries" | "no_results" | "no-format" | "object-detection" | "organizations" | "output" | "page-thumbnail" | "pay-as-you-go" | "person" | "phone" | "pin" | "plus" | "popup" | "price" | "preview-view" | "radio-button" | "recruiter" | "regex" | "reject" | "repair" | "research" | "retrain" | "sad" | "search-thin" | "shrug" | "signature" | "sort-down" | "step-forward" | "sun" | "surround" | "surround-outline" | "thumbs-down" | "thumbs-up" | "time" | "trash" | "unlock" | "upload" | "url" | "user" | "wand" | "warning" | "warning-stroke" | "workflows" | "x-close" | "fa-dot-circle" | "fa-file" | "fa-file-alt" | "fa-file-pdf" | "fa-file-word" | "fa-check-square" | "fa-square" | "fa-angle-double-left" | "fa-arrow-circle-right" | "fa-arrow-down" | "fa-arrow-left" | "fa-arrow-right" | "fa-arrow-up" | "fa-ban" | "fa-caret-down" | "fa-caret-up" | "fa-chart-bar" | "fa-check" | "fa-check-circle" | "fa-circle-notch" | "fa-clipboard" | "fa-clock" | "fa-clone" | "fa-cloud" | "fa-cog" | "fa-cogs" | "fa-coins" | "fa-cube" | "fa-cut" | "fa-download" | "fa-exclamation-circle" | "fa-exclamation-triangle" | "fa-external-link-alt" | "fa-eye-dropper" | "fa-file-download" | "fa-file-export" | "fa-file-upload" | "fa-filter" | "fa-ghost" | "fa-hat-wizard" | "fa-info-circle" | "fa-key" | "fa-keyboard" | "fa-layer-group" | "fa-pencil-alt" | "fa-plus" | "fa-plus-square" | "fa-question-circle" | "fa-robot" | "fa-search" | "fa-sign-out-alt" | "fa-sliders-h" | "fa-sync-alt" | "fa-tag" | "fa-times" | "fa-times-circle" | "fa-tint" | "fa-toggle-off" | "fa-toggle-on" | "fa-trash" | "fa-trash-alt" | "fa-undo" | "fa-user" | "fa-users" | "fa-mouse-pointer" | "fa-step-forward" | "fa-search-minus" | "fa-search-plus" | "fa-table" | "fa-image" | "fa-link" | "fa-list")[];
18
+ options: ("checkbox" | "ellipsis" | "help" | "pointer" | "text" | "zoom-in" | "zoom-out" | "reset" | "menu" | "search" | "split" | "indico-o-white" | "account" | "address" | "api-doc" | "arrow-dots" | "arrow-down" | "arrow-up-circle" | "arrows-cursor" | "bookmark" | "bookmarks" | "bookmark-saved" | "branch" | "calendar" | "check-circle" | "circle-help" | "check" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "classification-document" | "classification-image" | "classification-page" | "classify-and-unbundle" | "clipboard" | "coffee-1" | "coffee-2" | "coffee-fail" | "coffeecup" | "coffeesteam" | "cog" | "collection" | "compare" | "company-name" | "confidence-bar-1" | "confidence-bar-2" | "confidence-bar-3" | "confidence-bar-4" | "confidence-bars" | "configure" | "choose-library" | "crowdlabel" | "currency" | "dashboard" | "data-and-access" | "database" | "document" | "date" | "draggable" | "droplet" | "edit" | "education" | "elmos-fire" | "email" | "enterprise" | "exclamation-circle-stroke" | "extraction" | "eye" | "file" | "fileHappy" | "filter" | "filter-outline" | "folder" | "form" | "gallery" | "find-documents" | "graphiql" | "grid-view" | "happy" | "help-solid" | "highlight" | "highlight-outline" | "indico-logo-white" | "indico-o" | "info" | "kabob" | "key" | "label" | "layout-complex" | "layout-simple" | "list-view" | "libraries" | "location" | "logout" | "lock" | "model-import" | "model-starter" | "moon" | "moonbow" | "no-collections" | "no-libraries" | "no_results" | "no-format" | "object-detection" | "organizations" | "output" | "page-thumbnail" | "pay-as-you-go" | "person" | "phone" | "pin" | "plus" | "popup" | "price" | "preview-view" | "radio-button" | "recruiter" | "regex" | "reject" | "repair" | "research" | "retrain" | "sad" | "search-thin" | "shrug" | "signature" | "sort-down" | "step-forward" | "sun" | "surround" | "surround-outline" | "thumbs-down" | "thumbs-up" | "time" | "trash" | "unlock" | "upload" | "url" | "user" | "wand" | "warning" | "warning-stroke" | "workflows" | "x-close" | "fa-dot-circle" | "fa-file" | "fa-file-alt" | "fa-file-pdf" | "fa-file-word" | "fa-check-square" | "fa-square" | "fa-angle-double-left" | "fa-arrow-circle-right" | "fa-arrow-down" | "fa-arrow-left" | "fa-arrow-right" | "fa-arrow-up" | "fa-ban" | "fa-caret-down" | "fa-caret-up" | "fa-chart-bar" | "fa-check" | "fa-check-circle" | "fa-circle-notch" | "fa-clipboard" | "fa-clock" | "fa-clone" | "fa-cloud" | "fa-cog" | "fa-cogs" | "fa-coins" | "fa-cube" | "fa-cut" | "fa-download" | "fa-exclamation-circle" | "fa-exclamation-triangle" | "fa-external-link-alt" | "fa-eye-dropper" | "fa-file-download" | "fa-file-export" | "fa-file-upload" | "fa-filter" | "fa-ghost" | "fa-hat-wizard" | "fa-info-circle" | "fa-key" | "fa-keyboard" | "fa-layer-group" | "fa-pencil-alt" | "fa-plus" | "fa-plus-square" | "fa-question-circle" | "fa-robot" | "fa-search" | "fa-sign-out-alt" | "fa-sliders-h" | "fa-sync-alt" | "fa-tag" | "fa-times" | "fa-times-circle" | "fa-tint" | "fa-toggle-off" | "fa-toggle-on" | "fa-trash" | "fa-trash-alt" | "fa-undo" | "fa-user" | "fa-users" | "fa-mouse-pointer" | "fa-step-forward" | "fa-search-minus" | "fa-search-plus" | "fa-table" | "fa-image" | "fa-link" | "fa-list")[];
19
19
  };
20
20
  };
21
21
  };
@@ -26,7 +26,7 @@ declare const meta: {
26
26
  'data-testid'?: string | undefined;
27
27
  ariaLabel?: string | undefined;
28
28
  fill?: string | undefined;
29
- name: "checkbox" | "ellipsis" | "help" | "pointer" | "text" | "zoom-in" | "zoom-out" | "reset" | "menu" | "search" | "split" | "indico-o-white" | "account" | "address" | "api-doc" | "arrow-dots" | "arrow-down" | "arrow-up-circle" | "arrows-cursor" | "bookmark" | "bookmarks" | "bookmark-saved" | "branch" | "check-circle" | "circle-help" | "check" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "classification-document" | "classification-image" | "classification-page" | "classify-and-unbundle" | "clipboard" | "coffee-1" | "coffee-2" | "coffee-fail" | "coffeecup" | "coffeesteam" | "cog" | "collection" | "compare" | "company-name" | "confidence-bar-1" | "confidence-bar-2" | "confidence-bar-3" | "confidence-bar-4" | "confidence-bars" | "configure" | "choose-library" | "crowdlabel" | "currency" | "dashboard" | "data-and-access" | "database" | "document" | "date" | "draggable" | "droplet" | "edit" | "education" | "elmos-fire" | "email" | "enterprise" | "exclamation-circle-stroke" | "extraction" | "eye" | "file" | "fileHappy" | "filter" | "filter-outline" | "folder" | "form" | "gallery" | "find-documents" | "graphiql" | "grid-view" | "happy" | "help-solid" | "highlight" | "highlight-outline" | "indico-logo-white" | "indico-o" | "info" | "kabob" | "key" | "label" | "layout-complex" | "layout-simple" | "list-view" | "libraries" | "location" | "logout" | "lock" | "model-import" | "model-starter" | "moon" | "moonbow" | "no-collections" | "no-libraries" | "no_results" | "no-format" | "object-detection" | "organizations" | "output" | "page-thumbnail" | "pay-as-you-go" | "person" | "phone" | "pin" | "plus" | "popup" | "price" | "preview-view" | "radio-button" | "recruiter" | "regex" | "reject" | "repair" | "research" | "retrain" | "sad" | "search-thin" | "shrug" | "signature" | "sort-down" | "step-forward" | "sun" | "surround" | "surround-outline" | "thumbs-down" | "thumbs-up" | "time" | "trash" | "unlock" | "upload" | "url" | "user" | "wand" | "warning" | "warning-stroke" | "workflows" | "x-close" | "fa-dot-circle" | "fa-file" | "fa-file-alt" | "fa-file-pdf" | "fa-file-word" | "fa-check-square" | "fa-square" | "fa-angle-double-left" | "fa-arrow-circle-right" | "fa-arrow-down" | "fa-arrow-left" | "fa-arrow-right" | "fa-arrow-up" | "fa-ban" | "fa-caret-down" | "fa-caret-up" | "fa-chart-bar" | "fa-check" | "fa-check-circle" | "fa-circle-notch" | "fa-clipboard" | "fa-clock" | "fa-clone" | "fa-cloud" | "fa-cog" | "fa-cogs" | "fa-coins" | "fa-cube" | "fa-cut" | "fa-download" | "fa-exclamation-circle" | "fa-exclamation-triangle" | "fa-external-link-alt" | "fa-eye-dropper" | "fa-file-download" | "fa-file-export" | "fa-file-upload" | "fa-filter" | "fa-ghost" | "fa-hat-wizard" | "fa-info-circle" | "fa-key" | "fa-keyboard" | "fa-layer-group" | "fa-pencil-alt" | "fa-plus" | "fa-plus-square" | "fa-question-circle" | "fa-robot" | "fa-search" | "fa-sign-out-alt" | "fa-sliders-h" | "fa-sync-alt" | "fa-tag" | "fa-times" | "fa-times-circle" | "fa-tint" | "fa-toggle-off" | "fa-toggle-on" | "fa-trash" | "fa-trash-alt" | "fa-undo" | "fa-user" | "fa-users" | "fa-mouse-pointer" | "fa-step-forward" | "fa-search-minus" | "fa-search-plus" | "fa-table" | "fa-image" | "fa-link" | "fa-list";
29
+ name: "checkbox" | "ellipsis" | "help" | "pointer" | "text" | "zoom-in" | "zoom-out" | "reset" | "menu" | "search" | "split" | "indico-o-white" | "account" | "address" | "api-doc" | "arrow-dots" | "arrow-down" | "arrow-up-circle" | "arrows-cursor" | "bookmark" | "bookmarks" | "bookmark-saved" | "branch" | "calendar" | "check-circle" | "circle-help" | "check" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "classification-document" | "classification-image" | "classification-page" | "classify-and-unbundle" | "clipboard" | "coffee-1" | "coffee-2" | "coffee-fail" | "coffeecup" | "coffeesteam" | "cog" | "collection" | "compare" | "company-name" | "confidence-bar-1" | "confidence-bar-2" | "confidence-bar-3" | "confidence-bar-4" | "confidence-bars" | "configure" | "choose-library" | "crowdlabel" | "currency" | "dashboard" | "data-and-access" | "database" | "document" | "date" | "draggable" | "droplet" | "edit" | "education" | "elmos-fire" | "email" | "enterprise" | "exclamation-circle-stroke" | "extraction" | "eye" | "file" | "fileHappy" | "filter" | "filter-outline" | "folder" | "form" | "gallery" | "find-documents" | "graphiql" | "grid-view" | "happy" | "help-solid" | "highlight" | "highlight-outline" | "indico-logo-white" | "indico-o" | "info" | "kabob" | "key" | "label" | "layout-complex" | "layout-simple" | "list-view" | "libraries" | "location" | "logout" | "lock" | "model-import" | "model-starter" | "moon" | "moonbow" | "no-collections" | "no-libraries" | "no_results" | "no-format" | "object-detection" | "organizations" | "output" | "page-thumbnail" | "pay-as-you-go" | "person" | "phone" | "pin" | "plus" | "popup" | "price" | "preview-view" | "radio-button" | "recruiter" | "regex" | "reject" | "repair" | "research" | "retrain" | "sad" | "search-thin" | "shrug" | "signature" | "sort-down" | "step-forward" | "sun" | "surround" | "surround-outline" | "thumbs-down" | "thumbs-up" | "time" | "trash" | "unlock" | "upload" | "url" | "user" | "wand" | "warning" | "warning-stroke" | "workflows" | "x-close" | "fa-dot-circle" | "fa-file" | "fa-file-alt" | "fa-file-pdf" | "fa-file-word" | "fa-check-square" | "fa-square" | "fa-angle-double-left" | "fa-arrow-circle-right" | "fa-arrow-down" | "fa-arrow-left" | "fa-arrow-right" | "fa-arrow-up" | "fa-ban" | "fa-caret-down" | "fa-caret-up" | "fa-chart-bar" | "fa-check" | "fa-check-circle" | "fa-circle-notch" | "fa-clipboard" | "fa-clock" | "fa-clone" | "fa-cloud" | "fa-cog" | "fa-cogs" | "fa-coins" | "fa-cube" | "fa-cut" | "fa-download" | "fa-exclamation-circle" | "fa-exclamation-triangle" | "fa-external-link-alt" | "fa-eye-dropper" | "fa-file-download" | "fa-file-export" | "fa-file-upload" | "fa-filter" | "fa-ghost" | "fa-hat-wizard" | "fa-info-circle" | "fa-key" | "fa-keyboard" | "fa-layer-group" | "fa-pencil-alt" | "fa-plus" | "fa-plus-square" | "fa-question-circle" | "fa-robot" | "fa-search" | "fa-sign-out-alt" | "fa-sliders-h" | "fa-sync-alt" | "fa-tag" | "fa-times" | "fa-times-circle" | "fa-tint" | "fa-toggle-off" | "fa-toggle-on" | "fa-trash" | "fa-trash-alt" | "fa-undo" | "fa-user" | "fa-users" | "fa-mouse-pointer" | "fa-step-forward" | "fa-search-minus" | "fa-search-plus" | "fa-table" | "fa-image" | "fa-link" | "fa-list";
30
30
  size?: [string | number] | [string | number, string | number] | undefined;
31
31
  style?: any;
32
32
  onClick?: (() => void) | undefined;
@@ -11,6 +11,7 @@ declare const indicons: {
11
11
  bookmarks: import("react/jsx-runtime").JSX.Element;
12
12
  'bookmark-saved': import("react/jsx-runtime").JSX.Element;
13
13
  branch: import("react/jsx-runtime").JSX.Element;
14
+ calendar: import("react/jsx-runtime").JSX.Element;
14
15
  'check-circle': import("react/jsx-runtime").JSX.Element;
15
16
  'circle-help': import("react/jsx-runtime").JSX.Element;
16
17
  check: import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type ComboboxProps = {
3
2
  'aria-label'?: string;
4
3
  'aria-labelledby'?: string;
@@ -3,7 +3,7 @@ export { Section, SectionBlock, SectionBody, SectionHeader, SectionTable } from
3
3
  export { Button, IconButton } from './buttons';
4
4
  export { BorderSelect, MultiCombobox, Select, SingleCombobox } from './dropdowns';
5
5
  export { Icon, faIcons, indicons } from './Icon';
6
- export { EditableInput, NumberInput, SearchInput, TextInput, Radio, RadioGroup, AbstractRadio, AbstractRadioGroup, } from './inputs';
6
+ export { EditableInput, NumberInput, SearchInput, TextInput, Radio, RadioGroup, AbstractRadio, AbstractRadioGroup, DatePicker, NoInputDatePicker, } from './inputs';
7
7
  export { BarSpinner, CirclePulse, CircleSpinner, LoadingList, PercentageRing, RandomLoadingMessage, LoadingIndicator, } from './loading-indicators';
8
8
  export { ListTable } from './ListTable';
9
9
  export { Pagination } from './Pagination';
@@ -13,3 +13,4 @@ export { LoadingAwareContainer } from './LoadingAwareContainer';
13
13
  export { Wizard, WizardCard, WizardSection, StyledWizard } from './Wizard';
14
14
  export { WizardWithSidebar } from './WizardWithSidebar';
15
15
  export { Drawer } from './Navigation/Drawer';
16
+ export { TextTruncate } from './text-truncate';
@@ -0,0 +1,15 @@
1
+ import { PermafrostComponent } from '@/types';
2
+ type Props = PermafrostComponent & {
3
+ ariaLabel?: string;
4
+ disableBeforeDate?: Date;
5
+ disableAfterDate?: Date;
6
+ disabled?: boolean;
7
+ id: string;
8
+ label?: string;
9
+ onChange: (value: Date | undefined) => void;
10
+ placeholder?: string;
11
+ selected?: Date | undefined;
12
+ value: Date | undefined;
13
+ };
14
+ export declare const DatePicker: (props: Props) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { DatePicker } from '@/components/inputs/DatePicker';
3
+ declare const meta: Meta<typeof DatePicker>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DatePicker>;
6
+ export declare const Normal: Story;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledDatePicker: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -0,0 +1 @@
1
+ export { DatePicker } from './DatePicker';
@@ -0,0 +1,19 @@
1
+ import { DateRange } from 'react-day-picker';
2
+ import { IconName, PermafrostComponent } from '@/types';
3
+ type Props = PermafrostComponent & {
4
+ ariaLabel?: string;
5
+ disableBeforeDate?: Date;
6
+ disableAfterDate?: Date;
7
+ disabled?: boolean;
8
+ id: string;
9
+ label?: string;
10
+ onChange: (value: Date | DateRange | undefined) => void;
11
+ selected?: Date | undefined;
12
+ value: Date | undefined;
13
+ triggerIcon: IconName;
14
+ triggerIconSize: [string | number];
15
+ isRangePicker?: boolean;
16
+ isOpen?: boolean;
17
+ };
18
+ export declare const NoInputDatePicker: (props: Props) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { NoInputDatePicker } from '@/components/inputs/NoInputDatePicker';
3
+ declare const meta: Meta<typeof NoInputDatePicker>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof NoInputDatePicker>;
6
+ export declare const Single: Story;
7
+ export declare const Range: Story;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledNoInputDatePicker: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -0,0 +1 @@
1
+ export { NoInputDatePicker } from './NoInputDatePicker';
@@ -9,6 +9,7 @@ type Props = {
9
9
  labelColor: string;
10
10
  hoverAndSelectedColor: string;
11
11
  focusRingColor: string;
12
+ value: string;
12
13
  } & RadioGroupProps & PermafrostComponent;
13
14
  /**
14
15
  * Renders a group of radio buttons.
@@ -4,3 +4,5 @@ export { SearchInput } from './SearchInput';
4
4
  export { TextInput } from './TextInput';
5
5
  export { Radio, RadioGroup } from './RadioButtons';
6
6
  export { AbstractRadio, AbstractRadioGroup } from './RadioGroup';
7
+ export { DatePicker } from './DatePicker';
8
+ export { NoInputDatePicker } from './NoInputDatePicker';
@@ -1,7 +1,7 @@
1
1
  interface TextTruncateProps {
2
2
  string: string;
3
3
  maxChars: number;
4
- children: any;
4
+ children?: any;
5
5
  }
6
6
  export declare function TextTruncate({ string, maxChars, children }: TextTruncateProps): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
package/lib/index.d.ts CHANGED
@@ -6,6 +6,7 @@ import * as styled_components from 'styled-components';
6
6
  import { PermafrostComponent, IconName } from '@/types';
7
7
  import { AriaButtonProps } from '@react-types/button';
8
8
  import { AriaRadioProps, RadioGroupProps as RadioGroupProps$1, AriaRadioGroupProps } from '@react-types/radio';
9
+ import { DateRange } from 'react-day-picker';
9
10
  import * as styled_components_dist_types from 'styled-components/dist/types';
10
11
 
11
12
  declare const GlobalStyles: () => react_jsx_runtime.JSX.Element;
@@ -98,6 +99,7 @@ declare const indicons: {
98
99
  bookmarks: react_jsx_runtime.JSX.Element;
99
100
  'bookmark-saved': react_jsx_runtime.JSX.Element;
100
101
  branch: react_jsx_runtime.JSX.Element;
102
+ calendar: react_jsx_runtime.JSX.Element;
101
103
  'check-circle': react_jsx_runtime.JSX.Element;
102
104
  'circle-help': react_jsx_runtime.JSX.Element;
103
105
  check: react_jsx_runtime.JSX.Element;
@@ -365,6 +367,7 @@ declare const allColors: {
365
367
  readonly flamingo: "#f861b6";
366
368
  readonly flirt: "#910870";
367
369
  readonly forestGreen: "#1f7f1f";
370
+ readonly frostedOver: "#DCEAFD";
368
371
  readonly geraldine: "#fe9486";
369
372
  readonly grannysmith: "#92e959";
370
373
  readonly green: "#4caf50";
@@ -441,25 +444,25 @@ declare const allColors: {
441
444
  readonly backgroundColor: "#182432";
442
445
  };
443
446
 
444
- type Props$o = PermafrostComponent & {
447
+ type Props$q = PermafrostComponent & {
445
448
  content: React__default.ReactNode;
446
449
  header?: React__default.ReactNode | string;
447
450
  open?: boolean;
448
451
  };
449
- declare const Accordion: (props: Props$o) => react_jsx_runtime.JSX.Element;
452
+ declare const Accordion: (props: Props$q) => react_jsx_runtime.JSX.Element;
450
453
 
451
- type Props$n = PermafrostComponent & {
454
+ type Props$p = PermafrostComponent & {
452
455
  style?: object;
453
456
  children: React__default.ReactNode;
454
457
  };
455
- declare const Section: (props: Props$n) => react_jsx_runtime.JSX.Element;
458
+ declare const Section: (props: Props$p) => react_jsx_runtime.JSX.Element;
456
459
 
457
- type Props$m = PermafrostComponent & {
460
+ type Props$o = PermafrostComponent & {
458
461
  title?: string;
459
462
  style?: object;
460
463
  children: React__default.ReactNode;
461
464
  };
462
- declare const SectionBlock: (props: Props$m) => react_jsx_runtime.JSX.Element;
465
+ declare const SectionBlock: (props: Props$o) => react_jsx_runtime.JSX.Element;
463
466
 
464
467
  type SectionBodyProps = PermafrostComponent & {
465
468
  style?: object;
@@ -467,12 +470,12 @@ type SectionBodyProps = PermafrostComponent & {
467
470
  };
468
471
  declare const SectionBody: (props: SectionBodyProps) => react_jsx_runtime.JSX.Element;
469
472
 
470
- type Props$l = PermafrostComponent & {
473
+ type Props$n = PermafrostComponent & {
471
474
  style?: object;
472
475
  children?: React__default.ReactNode;
473
476
  };
474
477
  declare const SectionHeader: {
475
- (props: Props$l): react_jsx_runtime.JSX.Element;
478
+ (props: Props$n): react_jsx_runtime.JSX.Element;
476
479
  defaultProps: {
477
480
  className: string;
478
481
  style: {};
@@ -504,7 +507,7 @@ declare function Button(props: ButtonProps): React__default.ReactElement;
504
507
  type IconButtonVariant = 'default' | 'primary' | 'destructive' | 'outline';
505
508
  type ButtonSize = 'normal' | 'large';
506
509
 
507
- type Props$k = PermafrostComponent & {
510
+ type Props$m = PermafrostComponent & {
508
511
  /**
509
512
  * Adjusts vertical alignment of the text label, in relation to the icon
510
513
  */
@@ -530,9 +533,9 @@ type Props$k = PermafrostComponent & {
530
533
  *
531
534
  * @see {@link https://react-spectrum.adobe.com/blog/building-a-button-part-1.html}
532
535
  */
533
- declare function IconButton(props: Props$k): react_jsx_runtime.JSX.Element;
536
+ declare function IconButton(props: Props$m): react_jsx_runtime.JSX.Element;
534
537
 
535
- type Props$j = PermafrostComponent & {
538
+ type Props$l = PermafrostComponent & {
536
539
  defaultValue?: string;
537
540
  disabled?: boolean;
538
541
  horizontal?: boolean;
@@ -547,7 +550,7 @@ type Props$j = PermafrostComponent & {
547
550
  value?: string | number;
548
551
  validationErrors?: string[];
549
552
  };
550
- declare const BorderSelect: (props: Props$j) => react_jsx_runtime.JSX.Element;
553
+ declare const BorderSelect: (props: Props$l) => react_jsx_runtime.JSX.Element;
551
554
 
552
555
  type ComboboxProps = {
553
556
  'aria-label'?: string;
@@ -595,7 +598,7 @@ type ComboboxOption = {
595
598
  type ComboboxSize = 'small' | 'medium';
596
599
  type ComboboxVariant = 'default' | 'light';
597
600
 
598
- type Props$i = PermafrostComponent & {
601
+ type Props$k = PermafrostComponent & {
599
602
  disabled?: boolean;
600
603
  initialText?: string;
601
604
  options: {
@@ -609,7 +612,7 @@ type Props$i = PermafrostComponent & {
609
612
  onChange(e: React__default.ChangeEvent<HTMLSelectElement>): void;
610
613
  onClick?(e: React__default.MouseEvent<HTMLDivElement, MouseEvent>): void;
611
614
  };
612
- declare const Select: (props: Props$i) => react_jsx_runtime.JSX.Element;
615
+ declare const Select: (props: Props$k) => react_jsx_runtime.JSX.Element;
613
616
 
614
617
  /**
615
618
  * Multiselect combobox component. If selections are not bound to outside state
@@ -650,7 +653,7 @@ declare const SingleCombobox: React__default.ForwardRefExoticComponent<Permafros
650
653
  onChange: (selectedOption: ComboboxOption) => void;
651
654
  } & React__default.RefAttributes<unknown>>;
652
655
 
653
- type Props$h = PermafrostComponent & {
656
+ type Props$j = PermafrostComponent & {
654
657
  ariaLabel?: string;
655
658
  fill?: string;
656
659
  name: IconName;
@@ -662,9 +665,9 @@ type Props$h = PermafrostComponent & {
662
665
  * Generic icon component, hidden from Assistive Technology by default.
663
666
  * If icon should be available to AT, pass the desired name into the `ariaLabel` prop.
664
667
  */
665
- declare function Icon({ style, ...props }: Props$h): React__default.ReactElement | null;
668
+ declare function Icon({ style, ...props }: Props$j): React__default.ReactElement | null;
666
669
 
667
- type Props$g = PermafrostComponent & {
670
+ type Props$i = PermafrostComponent & {
668
671
  children: React__default.ReactNode | string;
669
672
  minLength?: number;
670
673
  onUpdate?(newValue: string): void;
@@ -673,9 +676,9 @@ type Props$g = PermafrostComponent & {
673
676
  * Wrapper component which enables text editing in place directly on a child component,
674
677
  * element, or plain text.
675
678
  */
676
- declare function EditableInput(props: Props$g): react_jsx_runtime.JSX.Element;
679
+ declare function EditableInput(props: Props$i): react_jsx_runtime.JSX.Element;
677
680
 
678
- type Props$f = PermafrostComponent & {
681
+ type Props$h = PermafrostComponent & {
679
682
  autoFocus?: boolean;
680
683
  decrement?(): void;
681
684
  disabled?: boolean;
@@ -695,9 +698,9 @@ type Props$f = PermafrostComponent & {
695
698
  * Basic numeric input field. A label is required, but may be visually hidden
696
699
  * using the `hiddenLabel` property.
697
700
  */
698
- declare function NumberInput(props: Props$f): React__default.ReactElement;
701
+ declare function NumberInput(props: Props$h): React__default.ReactElement;
699
702
 
700
- type Props$e = PermafrostComponent & {
703
+ type Props$g = PermafrostComponent & {
701
704
  border?: boolean;
702
705
  showClearInputIcon?: boolean;
703
706
  showSearchIcon?: boolean;
@@ -711,13 +714,13 @@ type Props$e = PermafrostComponent & {
711
714
  value?: string;
712
715
  };
713
716
  declare const SearchInput: {
714
- (props: Props$e): react_jsx_runtime.JSX.Element;
717
+ (props: Props$g): react_jsx_runtime.JSX.Element;
715
718
  defaultProps: {
716
719
  className: string;
717
720
  };
718
721
  };
719
722
 
720
- type Props$d = PermafrostComponent & {
723
+ type Props$f = PermafrostComponent & {
721
724
  autoComplete?: 'email' | 'current-password' | 'new-password' | string;
722
725
  autoFocus?: boolean;
723
726
  defaultValue?: string;
@@ -738,9 +741,9 @@ type Props$d = PermafrostComponent & {
738
741
  value?: string;
739
742
  readOnly?: boolean;
740
743
  };
741
- declare function TextInput(props: Props$d): React__default.ReactElement;
744
+ declare function TextInput(props: Props$f): React__default.ReactElement;
742
745
 
743
- type Props$c = {
746
+ type Props$e = {
744
747
  ['aria-label']: string;
745
748
  children?: React__default.ReactNode;
746
749
  hideFocusRing: boolean;
@@ -748,6 +751,7 @@ type Props$c = {
748
751
  labelColor: string;
749
752
  hoverAndSelectedColor: string;
750
753
  focusRingColor: string;
754
+ value: string;
751
755
  } & RadioGroupProps$1 & PermafrostComponent;
752
756
  /**
753
757
  * Renders a group of radio buttons.
@@ -755,7 +759,7 @@ type Props$c = {
755
759
  * A group label must be included: either pass a string or markup into the
756
760
  * `label` prop, or include an `aria-label` or `aria-labelledby` attribute.
757
761
  */
758
- declare function RadioGroup$1({ children, ...props }: Props$c): react_jsx_runtime.JSX.Element;
762
+ declare function RadioGroup$1({ children, ...props }: Props$e): react_jsx_runtime.JSX.Element;
759
763
  /**
760
764
  * A single radio button and its label.
761
765
  */
@@ -784,6 +788,37 @@ declare function Radio(props: AriaRadioProps & {
784
788
  isVisuallySelected?: (selectedValue: string) => void;
785
789
  }): react_jsx_runtime.JSX.Element;
786
790
 
791
+ type Props$d = PermafrostComponent & {
792
+ ariaLabel?: string;
793
+ disableBeforeDate?: Date;
794
+ disableAfterDate?: Date;
795
+ disabled?: boolean;
796
+ id: string;
797
+ label?: string;
798
+ onChange: (value: Date | undefined) => void;
799
+ placeholder?: string;
800
+ selected?: Date | undefined;
801
+ value: Date | undefined;
802
+ };
803
+ declare const DatePicker: (props: Props$d) => react_jsx_runtime.JSX.Element;
804
+
805
+ type Props$c = PermafrostComponent & {
806
+ ariaLabel?: string;
807
+ disableBeforeDate?: Date;
808
+ disableAfterDate?: Date;
809
+ disabled?: boolean;
810
+ id: string;
811
+ label?: string;
812
+ onChange: (value: Date | DateRange | undefined) => void;
813
+ selected?: Date | undefined;
814
+ value: Date | undefined;
815
+ triggerIcon: IconName;
816
+ triggerIconSize: [string | number];
817
+ isRangePicker?: boolean;
818
+ isOpen?: boolean;
819
+ };
820
+ declare const NoInputDatePicker: (props: Props$c) => react_jsx_runtime.JSX.Element;
821
+
787
822
  type Props$b = PermafrostComponent & {
788
823
  ariaLabel?: string;
789
824
  size?: string;
@@ -1069,4 +1104,11 @@ type Props = PermafrostComponent & {
1069
1104
  };
1070
1105
  declare const Drawer: (props: Props) => react_jsx_runtime.JSX.Element;
1071
1106
 
1072
- export { animation as ANIMATION, Radio as AbstractRadio, RadioGroup as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button, allColors as COLORS, CirclePulse, CircleSpinner, ConfirmModal, Drawer, EditableInput, GlobalStyles, Icon, IconButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NumberInput, padding as PADDINGS, Pagination, PercentageRing, Radio$1 as Radio, RadioGroup$1 as RadioGroup, RandomLoadingMessage, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, StyledWizard, typography as TYPOGRAPHY, TextInput, Wizard, WizardCard, WizardSection, WizardWithSidebar, faIcons, indicons };
1107
+ interface TextTruncateProps {
1108
+ string: string;
1109
+ maxChars: number;
1110
+ children?: any;
1111
+ }
1112
+ declare function TextTruncate({ string, maxChars, children }: TextTruncateProps): react_jsx_runtime.JSX.Element;
1113
+
1114
+ export { animation as ANIMATION, Radio as AbstractRadio, RadioGroup as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button, allColors as COLORS, CirclePulse, CircleSpinner, ConfirmModal, DatePicker, Drawer, EditableInput, GlobalStyles, Icon, IconButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NoInputDatePicker, NumberInput, padding as PADDINGS, Pagination, PercentageRing, Radio$1 as Radio, RadioGroup$1 as RadioGroup, RandomLoadingMessage, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, StyledWizard, typography as TYPOGRAPHY, TextInput, TextTruncate, Wizard, WizardCard, WizardSection, WizardWithSidebar, faIcons, indicons };