@foi/design-system 0.0.18 → 0.0.20

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 (114) hide show
  1. package/README.md +665 -77
  2. package/dist/{DatePicker.utils-ytCEcs6T.js → DatePicker.utils-D6aKFBuv.js} +2 -2
  3. package/dist/{DatePicker.utils-ytCEcs6T.js.map → DatePicker.utils-D6aKFBuv.js.map} +1 -1
  4. package/dist/Toast-k4dxCveh.js +1366 -0
  5. package/dist/Toast-k4dxCveh.js.map +1 -0
  6. package/dist/components/atoms/Button/Button.interface.d.ts +1 -1
  7. package/dist/components/atoms/Checkbox/Checkbox.interface.d.ts +3 -3
  8. package/dist/components/atoms/Chip/Chip.d.ts +4 -0
  9. package/dist/components/atoms/Chip/Chip.emotion.d.ts +2 -0
  10. package/dist/components/atoms/Chip/Chip.interface.d.ts +14 -0
  11. package/dist/components/atoms/Chip/index.d.ts +5 -0
  12. package/dist/components/atoms/DatePicker/DatePicker.interface.d.ts +2 -2
  13. package/dist/components/atoms/DatePicker/DatePickerMenu/DatePickerMenu.interface.d.ts +3 -3
  14. package/dist/components/atoms/IconButton/IconButton.interface.d.ts +2 -2
  15. package/dist/components/atoms/NumberField/NumberField.interface.d.ts +2 -2
  16. package/dist/components/atoms/Radio/Radio.interface.d.ts +2 -2
  17. package/dist/components/atoms/Select/Select.interface.d.ts +2 -2
  18. package/dist/components/atoms/Select/SelectMenu/SelectMenu.interface.d.ts +1 -1
  19. package/dist/components/atoms/Slider/Slider.interface.d.ts +4 -4
  20. package/dist/components/atoms/Switch/Switch.interface.d.ts +1 -1
  21. package/dist/components/atoms/TextField/TextField.interface.d.ts +2 -2
  22. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.interface.d.ts +2 -2
  23. package/dist/components/molecules/CheckboxTree/CheckboxTree.interface.d.ts +2 -2
  24. package/dist/components/molecules/Modal/Modal.interface.d.ts +4 -4
  25. package/dist/components/molecules/RadioGroup/RadioGroup.interface.d.ts +2 -2
  26. package/dist/components/molecules/Toast/Toast.context.d.ts +2 -0
  27. package/dist/components/molecules/Toast/Toast.d.ts +4 -0
  28. package/dist/components/molecules/Toast/Toast.emotion.d.ts +4 -0
  29. package/dist/components/molecules/Toast/Toast.hook.d.ts +1 -0
  30. package/dist/components/molecules/Toast/Toast.interface.d.ts +33 -0
  31. package/dist/components/molecules/Toast/Toast.provider.d.ts +3 -0
  32. package/dist/components/molecules/Toast/index.d.ts +3 -0
  33. package/dist/components/organisms/DataGrid/DataGrid.interface.d.ts +3 -3
  34. package/dist/components/organisms/DataGrid/DataGridMenu/DataGridMenu.interface.d.ts +1 -1
  35. package/dist/hocs/ThemeProvider/ThemeProvider.interface.d.ts +6 -0
  36. package/dist/hocs/ThemeProvider/components/{Button.d.ts → atoms/Button.d.ts} +1 -1
  37. package/dist/hocs/ThemeProvider/components/{Checkbox.d.ts → atoms/Checkbox.d.ts} +1 -1
  38. package/dist/hocs/ThemeProvider/components/atoms/Chip.d.ts +13 -0
  39. package/dist/hocs/ThemeProvider/components/{DatePicker.d.ts → atoms/DatePicker.d.ts} +1 -1
  40. package/dist/hocs/ThemeProvider/components/{DatePickerMenu.d.ts → atoms/DatePickerMenu.d.ts} +1 -1
  41. package/dist/hocs/ThemeProvider/components/{IconButton.d.ts → atoms/IconButton.d.ts} +1 -1
  42. package/dist/hocs/ThemeProvider/components/{NumberField.d.ts → atoms/NumberField.d.ts} +1 -1
  43. package/dist/hocs/ThemeProvider/components/{Pagination.d.ts → atoms/Pagination.d.ts} +1 -1
  44. package/dist/hocs/ThemeProvider/components/{PaginationMenu.d.ts → atoms/PaginationMenu.d.ts} +1 -1
  45. package/dist/hocs/ThemeProvider/components/{Radio.d.ts → atoms/Radio.d.ts} +1 -1
  46. package/dist/hocs/ThemeProvider/components/{Select.d.ts → atoms/Select.d.ts} +1 -1
  47. package/dist/hocs/ThemeProvider/components/{SelectMenu.d.ts → atoms/SelectMenu.d.ts} +1 -1
  48. package/dist/hocs/ThemeProvider/components/{Slider.d.ts → atoms/Slider.d.ts} +1 -1
  49. package/dist/hocs/ThemeProvider/components/{Switch.d.ts → atoms/Switch.d.ts} +1 -1
  50. package/dist/hocs/ThemeProvider/components/{TextField.d.ts → atoms/TextField.d.ts} +1 -1
  51. package/dist/hocs/ThemeProvider/components/index.d.ts +23 -17
  52. package/dist/hocs/ThemeProvider/components/{CheckboxGroup.d.ts → molecules/CheckboxGroup.d.ts} +1 -1
  53. package/dist/hocs/ThemeProvider/components/{CheckboxTree.d.ts → molecules/CheckboxTree.d.ts} +1 -1
  54. package/dist/hocs/ThemeProvider/components/{Modal.d.ts → molecules/Modal.d.ts} +1 -1
  55. package/dist/hocs/ThemeProvider/components/{RadioGroup.d.ts → molecules/RadioGroup.d.ts} +1 -1
  56. package/dist/hocs/ThemeProvider/components/molecules/Toast.d.ts +16 -0
  57. package/dist/hocs/ThemeProvider/components/{DataGrid.d.ts → organisms/DataGrid.d.ts} +1 -1
  58. package/dist/hocs/ThemeProvider/components/{DataGridMenu.d.ts → organisms/DataGridMenu.d.ts} +1 -1
  59. package/dist/hocs/ThemeProvider/interfaces/Components.interface.d.ts +2 -0
  60. package/dist/hooks.d.ts +2 -0
  61. package/dist/hooks.mjs +2 -2
  62. package/dist/index.d.ts +14 -11
  63. package/dist/index.mjs +5596 -509
  64. package/dist/index.mjs.map +1 -1
  65. package/dist/theme/dark/components/atoms/Chip.d.ts +13 -0
  66. package/dist/theme/dark/components/index.d.ts +287 -263
  67. package/dist/theme/dark/components/molecules/Toast.d.ts +17 -0
  68. package/dist/theme/dark/index.d.ts +287 -263
  69. package/dist/theme/index.d.ts +287 -263
  70. package/dist/{theme-CLkxVsoE.js → theme-BjrtNRDQ.js} +230 -218
  71. package/dist/theme-BjrtNRDQ.js.map +1 -0
  72. package/dist/theme.d.ts +22 -0
  73. package/dist/theme.mjs +1 -1
  74. package/dist/utilities.mjs +1 -1
  75. package/package.json +1 -13
  76. package/dist/RadioGroup-D_R-nwCD.js +0 -456
  77. package/dist/RadioGroup-D_R-nwCD.js.map +0 -1
  78. package/dist/RadioGroup.context-CdFGi5z1.js +0 -601
  79. package/dist/RadioGroup.context-CdFGi5z1.js.map +0 -1
  80. package/dist/Switch-DK5hEXUS.js +0 -4196
  81. package/dist/Switch-DK5hEXUS.js.map +0 -1
  82. package/dist/ThemeProvider-BlqXHfU_.js +0 -39
  83. package/dist/ThemeProvider-BlqXHfU_.js.map +0 -1
  84. package/dist/atoms.d.ts +0 -21
  85. package/dist/atoms.mjs +0 -3
  86. package/dist/emotion-react-jsx-runtime.browser.esm-Ct_bZ5JG.js +0 -995
  87. package/dist/emotion-react-jsx-runtime.browser.esm-Ct_bZ5JG.js.map +0 -1
  88. package/dist/hocs.d.ts +0 -2
  89. package/dist/hocs.mjs +0 -2
  90. package/dist/molecules.d.ts +0 -8
  91. package/dist/molecules.mjs +0 -2
  92. package/dist/theme-CLkxVsoE.js.map +0 -1
  93. package/dist/useStateCallback-B4O93zzK.js +0 -32
  94. package/dist/useStateCallback-B4O93zzK.js.map +0 -1
  95. /package/dist/theme/dark/components/{Button.d.ts → atoms/Button.d.ts} +0 -0
  96. /package/dist/theme/dark/components/{Checkbox.d.ts → atoms/Checkbox.d.ts} +0 -0
  97. /package/dist/theme/dark/components/{DatePicker.d.ts → atoms/DatePicker.d.ts} +0 -0
  98. /package/dist/theme/dark/components/{DatePickerMenu.d.ts → atoms/DatePickerMenu.d.ts} +0 -0
  99. /package/dist/theme/dark/components/{IconButton.d.ts → atoms/IconButton.d.ts} +0 -0
  100. /package/dist/theme/dark/components/{NumberField.d.ts → atoms/NumberField.d.ts} +0 -0
  101. /package/dist/theme/dark/components/{Pagination.d.ts → atoms/Pagination.d.ts} +0 -0
  102. /package/dist/theme/dark/components/{PaginationMenu.d.ts → atoms/PaginationMenu.d.ts} +0 -0
  103. /package/dist/theme/dark/components/{Radio.d.ts → atoms/Radio.d.ts} +0 -0
  104. /package/dist/theme/dark/components/{Select.d.ts → atoms/Select.d.ts} +0 -0
  105. /package/dist/theme/dark/components/{SelectMenu.d.ts → atoms/SelectMenu.d.ts} +0 -0
  106. /package/dist/theme/dark/components/{Slider.d.ts → atoms/Slider.d.ts} +0 -0
  107. /package/dist/theme/dark/components/{Switch.d.ts → atoms/Switch.d.ts} +0 -0
  108. /package/dist/theme/dark/components/{TextField.d.ts → atoms/TextField.d.ts} +0 -0
  109. /package/dist/theme/dark/components/{CheckboxGroup.d.ts → molecules/CheckboxGroup.d.ts} +0 -0
  110. /package/dist/theme/dark/components/{CheckboxTree.d.ts → molecules/CheckboxTree.d.ts} +0 -0
  111. /package/dist/theme/dark/components/{Modal.d.ts → molecules/Modal.d.ts} +0 -0
  112. /package/dist/theme/dark/components/{RadioGroup.d.ts → molecules/RadioGroup.d.ts} +0 -0
  113. /package/dist/theme/dark/components/{DataGrid.d.ts → organisms/DataGrid.d.ts} +0 -0
  114. /package/dist/theme/dark/components/{DataGridMenu.d.ts → organisms/DataGridMenu.d.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeProvider-BlqXHfU_.js","names":[],"sources":["../src/hocs/ThemeProvider/fonts/loadFonts.ts","../src/hocs/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["const mulishRegular = new URL('../../../assets/fonts/Mulish/Mulish-Regular.ttf', import.meta.url).href;\nconst mulishMedium = new URL('../../../assets/fonts/Mulish/Mulish-Medium.ttf', import.meta.url).href;\nconst mulishSemiBold = new URL('../../../assets/fonts/Mulish/Mulish-SemiBold.ttf', import.meta.url).href;\nconst mulishBold = new URL('../../../assets/fonts/Mulish/Mulish-Bold.ttf', import.meta.url).href;\n\nconst leagueSpartanRegular = new URL('../../../assets/fonts/LeagueSpartan/LeagueSpartan-Regular.ttf', import.meta.url)\n .href;\nconst leagueSpartanBold = new URL('../../../assets/fonts/LeagueSpartan/LeagueSpartan-Bold.ttf', import.meta.url).href;\n\nconst googleSansCodeLight = new URL('../../../assets/fonts/GoogleSansCode/Light.ttf', import.meta.url).href;\nconst googleSansCodeLightItalic = new URL('../../../assets/fonts/GoogleSansCode/LightItalic.ttf', import.meta.url).href;\nconst googleSansCodeRegular = new URL('../../../assets/fonts/GoogleSansCode/Regular.ttf', import.meta.url).href;\nconst googleSansCodeItalic = new URL('../../../assets/fonts/GoogleSansCode/Italic.ttf', import.meta.url).href;\nconst googleSansCodeMedium = new URL('../../../assets/fonts/GoogleSansCode/Medium.ttf', import.meta.url).href;\nconst googleSansCodeMediumItalic = new URL('../../../assets/fonts/GoogleSansCode/MediumItalic.ttf', import.meta.url)\n .href;\nconst googleSansCodeSemiBold = new URL('../../../assets/fonts/GoogleSansCode/SemiBold.ttf', import.meta.url).href;\nconst googleSansCodeSemiBoldItalic = new URL('../../../assets/fonts/GoogleSansCode/SemiBoldItalic.ttf', import.meta.url)\n .href;\nconst googleSansCodeBold = new URL('../../../assets/fonts/GoogleSansCode/Bold.ttf', import.meta.url).href;\nconst googleSansCodeBoldItalic = new URL('../../../assets/fonts/GoogleSansCode/BoldItalic.ttf', import.meta.url).href;\n\nconst materialSymbolsRounded = new URL(\n '../../../assets/fonts/MaterialSymbolsRounded/MaterialSymbolsRounded.woff2',\n import.meta.url,\n).href;\n\nconst fontFaceCSS = `\n@font-face { font-family: 'Mulish'; src: url('${mulishRegular}') format('truetype'); }\n@font-face { font-family: 'Mulish'; src: url('${mulishMedium}') format('truetype'); font-weight: 500; }\n@font-face { font-family: 'Mulish'; src: url('${mulishSemiBold}') format('truetype'); font-weight: 600; }\n@font-face { font-family: 'Mulish'; src: url('${mulishBold}') format('truetype'); font-weight: 700; }\n\n@font-face { font-family: 'League Spartan'; src: url('${leagueSpartanRegular}') format('truetype'); }\n@font-face { font-family: 'League Spartan'; src: url('${leagueSpartanBold}') format('truetype'); font-weight: bold; }\n\n@font-face { font-family: 'Google Sans Code'; src: url('${googleSansCodeLight}') format('truetype'); font-weight: 300; }\n@font-face { font-family: 'Google Sans Code'; src: url('${googleSansCodeLightItalic}') format('truetype'); font-weight: 300; font-style: italic; }\n@font-face { font-family: 'Google Sans Code'; src: url('${googleSansCodeRegular}') format('truetype'); font-weight: 400; }\n@font-face { font-family: 'Google Sans Code'; src: url('${googleSansCodeItalic}') format('truetype'); font-weight: 400; font-style: italic; }\n@font-face { font-family: 'Google Sans Code'; src: url('${googleSansCodeMedium}') format('truetype'); font-weight: 500; }\n@font-face { font-family: 'Google Sans Code'; src: url('${googleSansCodeMediumItalic}') format('truetype'); font-weight: 500; font-style: italic; }\n@font-face { font-family: 'Google Sans Code'; src: url('${googleSansCodeSemiBold}') format('truetype'); font-weight: 600; }\n@font-face { font-family: 'Google Sans Code'; src: url('${googleSansCodeSemiBoldItalic}') format('truetype'); font-weight: 600; font-style: italic; }\n@font-face { font-family: 'Google Sans Code'; src: url('${googleSansCodeBold}') format('truetype'); font-weight: 700; }\n@font-face { font-family: 'Google Sans Code'; src: url('${googleSansCodeBoldItalic}') format('truetype'); font-weight: 700; font-style: italic; }\n\n@font-face { font-family: 'Material Symbols Rounded'; src: url('${materialSymbolsRounded}') format('woff2'); font-weight: 100 900; font-style: normal; font-display: block; }\n`;\n\nlet injected = false;\n\nexport const loadFonts = () => {\n console.log('loadFonts called, injected:', injected);\n if (typeof document === 'undefined' || injected) return;\n injected = true;\n const style = document.createElement('style');\n style.textContent = fontFaceCSS;\n document.head.appendChild(style);\n console.log('font style injected');\n};\n","import { useLayoutEffect } from 'react';\nimport { ThemeProviderComponent } from './ThemeProvider.interface';\nimport type { Theme } from './ThemeProvider.interface';\nimport { useCreateThemeStyles } from './useThemeProvider.hook';\nimport { loadFonts } from './fonts/loadFonts';\n\nconst ThemeProvider = <T extends readonly Theme[]>(props: ThemeProviderComponent<T>) => {\n const { themes, theme: selectedTheme, children } = props;\n useCreateThemeStyles(themes, selectedTheme);\n useLayoutEffect(() => {\n loadFonts();\n }, []);\n\n return <>{children}</>;\n};\n\nexport default ThemeProvider;\n"],"mappings":";;;AA2BA,IAAM,IAAc;gDA3BE,IAAA,IAAA,iv1IA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+BAA+B,EAAS,EAChD,OAAO,WAAa,OAAe,GAAU;CACjD,IAAW;CACX,IAAM,IAAQ,SAAS,cAAc,QAAQ;CAG7C,AAFA,EAAM,cAAc,GACpB,SAAS,KAAK,YAAY,EAAM,EAChC,QAAQ,IAAI,sBAAsB;GCrD9B,KAA6C,MAAqC;CACtF,IAAM,EAAE,WAAQ,OAAO,GAAe,gBAAa;CAMnD,OALA,EAAqB,GAAQ,EAAc,EAC3C,QAAsB;EACpB,GAAW;IACV,EAAE,CAAC,EAEC,kBAAA,GAAA,EAAG,aAAY,CAAA"}
package/dist/atoms.d.ts DELETED
@@ -1,21 +0,0 @@
1
- export { default as Button } from './components/atoms/Button';
2
- export { default as Icon } from './components/atoms/Icon';
3
- export { default as Checkbox } from './components/atoms/Checkbox';
4
- export { default as DatePicker } from './components/atoms/DatePicker';
5
- export { default as IconButton } from './components/atoms/IconButton';
6
- export { default as TextField } from './components/atoms/TextField';
7
- export { default as NumberField } from './components/atoms/NumberField';
8
- export { default as Radio } from './components/atoms/Radio';
9
- export { default as Select } from './components/atoms/Select';
10
- export { default as Slider } from './components/atoms/Slider';
11
- export { default as Switch } from './components/atoms/Switch';
12
- export type { ButtonStyleProps } from './components/atoms/Button/Button.interface';
13
- export type { CheckboxStyleProps } from './components/atoms/Checkbox/Checkbox.interface';
14
- export type { DatePickerStyleProps } from './components/atoms/DatePicker/DatePicker.interface';
15
- export type { IconButtonStyleProps } from './components/atoms/IconButton/IconButton.interface';
16
- export type { TextFieldStyleProps } from './components/atoms/TextField/TextField.interface';
17
- export type { NumberFieldStyleProps } from './components/atoms/NumberField/NumberField.interface';
18
- export type { RadioStyleProps } from './components/atoms/Radio/Radio.interface';
19
- export type { SelectStyleProps } from './components/atoms/Select/Select.interface';
20
- export type { SliderStyleProps } from './components/atoms/Slider/Slider.interface';
21
- export type { SwitchStyleProps } from './components/atoms/Switch/Switch.interface';
package/dist/atoms.mjs DELETED
@@ -1,3 +0,0 @@
1
- import { n as e, o as t, r as n } from "./RadioGroup.context-CdFGi5z1.js";
2
- import { a as r, c as i, i as a, n as o, o as s, r as c, s as l, t as u } from "./Switch-DK5hEXUS.js";
3
- export { i as Button, n as Checkbox, l as DatePicker, t as Icon, e as IconButton, r as NumberField, a as Radio, c as Select, o as Slider, u as Switch, s as TextField };