@pismo/marola 0.0.1-alpha.16 → 0.0.1-alpha.18

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 (93) hide show
  1. package/dist/{Button-B1umG8kJ.js → Button-2b1peDFT.js} +25 -26
  2. package/dist/{ClickAwayListener-HI1G6ob9.js → ClickAwayListener-BSW-Nd-y.js} +3 -3
  3. package/dist/{Popup-DFJQc_jn.js → Popup-B6ZSGIEI.js} +12 -13
  4. package/dist/{Portal-D__zvwbZ.js → Portal-DIeBsWdL.js} +2 -2
  5. package/dist/{SelectButton-DWZ2BRaX.js → SelectButton-pciwIWcj.js} +24 -22
  6. package/dist/assets/Chip.css +1 -1
  7. package/dist/assets/Input.css +1 -1
  8. package/dist/assets/PageHeader.css +1 -1
  9. package/dist/assets/Pagination.css +1 -1
  10. package/dist/assets/SelectButton.css +1 -1
  11. package/dist/assets/TextDisplay.css +1 -0
  12. package/dist/{combineHooksSlotProps-BHqhiBfc.js → combineHooksSlotProps-DVjg9PRh.js} +18 -19
  13. package/dist/components/Button/Button.js +1 -1
  14. package/dist/components/Checkbox/Checkbox.d.ts +15 -0
  15. package/dist/components/Checkbox/Checkbox.stories.d.ts +31 -0
  16. package/dist/components/Chip/Chip.js +1 -1
  17. package/dist/components/Dialog/CloseIconButton.js +1 -1
  18. package/dist/components/Dialog/Dialog.js +15 -16
  19. package/dist/components/Dialog/Dialog.stories.d.ts +3 -3
  20. package/dist/components/Icon/Icon.d.ts +10 -1
  21. package/dist/components/Icon/Icon.js +39 -25
  22. package/dist/components/Icon/Icon.stories.d.ts +16 -0
  23. package/dist/components/IconButton/Icon.stories.d.ts +15 -0
  24. package/dist/components/IconButton/IconButton.d.ts +14 -0
  25. package/dist/components/IconButton/IconButton.js +1 -1
  26. package/dist/components/Input/Input.js +38 -39
  27. package/dist/components/PageHeader/PageHeader.js +23 -23
  28. package/dist/components/Pagination/Pagination.d.ts +24 -5
  29. package/dist/components/Pagination/Pagination.js +119 -116
  30. package/dist/components/Pagination/Pagination.stories.d.ts +17 -0
  31. package/dist/components/Select/Select.js +137 -138
  32. package/dist/components/Select/SelectButton.js +1 -1
  33. package/dist/components/Skeleton/Skeleton.d.ts +10 -3
  34. package/dist/components/Skeleton/Skeleton.js +12 -15
  35. package/dist/components/Skeleton/Skeleton.stories.d.ts +14 -0
  36. package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +14 -0
  37. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +16 -0
  38. package/dist/components/Snackbar/Snackbar.js +6 -7
  39. package/dist/components/Snackbar/Snackbar.stories.d.ts +3 -3
  40. package/dist/components/SortTooltip/SortTooltip.d.ts +3 -1
  41. package/dist/components/SortTooltip/SortTooltip.js +27 -16
  42. package/dist/components/Stepper/Stepper.d.ts +11 -1
  43. package/dist/components/Stepper/Stepper.stories.d.ts +16 -0
  44. package/dist/components/Table/Table.js +38 -40
  45. package/dist/components/Tabs/Tab.d.ts +5 -0
  46. package/dist/components/Tabs/Tab.js +9 -10
  47. package/dist/components/Tabs/Tab.stories.d.ts +15 -0
  48. package/dist/components/Tabs/TabPanel.d.ts +4 -0
  49. package/dist/components/Tabs/TabPanel.js +13 -14
  50. package/dist/components/Tabs/TabPanel.stories.d.ts +14 -0
  51. package/dist/components/Tabs/Tabs.d.ts +5 -1
  52. package/dist/components/Tabs/Tabs.js +36 -37
  53. package/dist/components/Tabs/Tabs.stories.d.ts +14 -0
  54. package/dist/components/TextDisplay/TextDisplay.d.ts +23 -0
  55. package/dist/components/TextDisplay/TextDisplay.js +37 -0
  56. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +13 -0
  57. package/dist/components/TextDisplay/textDisplay.test.d.ts +1 -0
  58. package/dist/components/Toggle/Toggle.js +7 -8
  59. package/dist/components/Tooltip/Tooltip.d.ts +18 -6
  60. package/dist/components/Tooltip/Tooltip.js +104 -92
  61. package/dist/components/Tooltip/Tooltip.stories.d.ts +33 -0
  62. package/dist/components/Typography/Typography.d.ts +2 -0
  63. package/dist/components/Typography/Typography.js +40 -29
  64. package/dist/components/Typography/Typography.stories.d.ts +1 -0
  65. package/dist/{index-CqjC7P5Y.js → index-CH45lKw7.js} +333 -307
  66. package/dist/{index-BJ8HbRCy.js → index-CjW42-M-.js} +5 -6
  67. package/dist/main.d.ts +5 -1
  68. package/dist/main.js +34 -32
  69. package/dist/marola.css +1 -0
  70. package/dist/{useButton-Bc8IAgyk.js → useButton-DNk3wrQp.js} +3 -4
  71. package/dist/{useEventCallback-vAfOD-oT.js → useEventCallback-xTG9piMa.js} +1 -1
  72. package/dist/{useList-ByMguSS_.js → useList-B0hog_3-.js} +48 -49
  73. package/package.json +2 -2
  74. package/dist/_commonjsHelpers-CT_km90n.js +0 -30
  75. package/dist/components/Advice/Advice.stories.js +0 -48
  76. package/dist/components/Button/Button.stories.js +0 -40
  77. package/dist/components/Chip/Chip.stories.js +0 -59
  78. package/dist/components/Chip/chip.test.js +0 -17303
  79. package/dist/components/Dialog/Dialog.stories.js +0 -59
  80. package/dist/components/Input/Input.stories.js +0 -106
  81. package/dist/components/InputSearch/InputSearch.stories.js +0 -73
  82. package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +0 -38
  83. package/dist/components/PageHeader/PageHeader.stories.js +0 -49
  84. package/dist/components/Select/Select.stories.js +0 -89
  85. package/dist/components/Snackbar/Snackbar.stories.js +0 -62
  86. package/dist/components/Toggle/Toggle.stories.js +0 -33
  87. package/dist/components/Typography/Typography.stories.js +0 -30
  88. package/dist/components/Typography/typography.test.js +0 -234
  89. package/dist/magic-string.es-O_8lTkE3.js +0 -738
  90. package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +0 -26
  91. package/dist/react.esm-DGd9_oKA.js +0 -11126
  92. package/dist/utils/styleStrings.test.js +0 -41
  93. package/dist/vi.Y_w82WR8-XVYrIxgm.js +0 -9861
@@ -1,8 +1,7 @@
1
- import { a as Ak } from "./objectWithoutPropertiesLoose-D7Cp0Pg_.js";
2
- import { g as Hk } from "./_commonjsHelpers-CT_km90n.js";
1
+ import { b as Ak, h as Hk } from "./index-CH45lKw7.js";
3
2
  import QE from "react";
4
3
  const Fk = "exact-prop: ​";
5
- function qk(ne) {
4
+ function Xk(ne) {
6
5
  return process.env.NODE_ENV === "production" ? ne : Ak({}, ne, {
7
6
  [Fk]: (ze) => {
8
7
  const L = Object.keys(ze).filter((pn) => !ne.hasOwnProperty(pn));
@@ -19577,9 +19576,9 @@ function GE() {
19577
19576
  }
19578
19577
  process.env.NODE_ENV === "production" ? (GE(), a0.exports = Bk()) : a0.exports = Pk();
19579
19578
  var Yk = a0.exports;
19580
- const Kk = /* @__PURE__ */ Hk(Yk);
19579
+ const qk = /* @__PURE__ */ Hk(Yk);
19581
19580
  export {
19582
- Kk as R,
19583
- qk as e,
19581
+ qk as R,
19582
+ Xk as e,
19584
19583
  Yk as r
19585
19584
  };
package/dist/main.d.ts CHANGED
@@ -1,4 +1,7 @@
1
-
1
+ /**
2
+ * This file is automatically generated. Any changes will be lost.
3
+ * run "yarn export-files" or "yarn build" to regenerate it.
4
+ */
2
5
  export * from './components/Advice/Advice';
3
6
  export * from './components/Button/Button';
4
7
  export * from './components/Checkbox/Checkbox';
@@ -18,6 +21,7 @@ export * from './components/SortTooltip/SortTooltip';
18
21
  export * from './components/Stepper/Stepper';
19
22
  export * from './components/Table/Table';
20
23
  export * from './components/Tabs/Tabs';
24
+ export * from './components/TextDisplay/TextDisplay';
21
25
  export * from './components/Toggle/Toggle';
22
26
  export * from './components/Tooltip/Tooltip';
23
27
  export * from './components/Typography/Typography';
package/dist/main.js CHANGED
@@ -1,15 +1,15 @@
1
- import { Chip as e } from "./components/Chip/Chip.js";
2
- import { Advice as p } from "./components/Advice/Advice.js";
3
- import { Button as f } from "./components/Button/Button.js";
4
- import { Checkbox as n } from "./components/Checkbox/Checkbox.js";
1
+ import { Advice as e } from "./components/Advice/Advice.js";
2
+ import { Button as p } from "./components/Button/Button.js";
3
+ import { Checkbox as f } from "./components/Checkbox/Checkbox.js";
4
+ import { Chip as m } from "./components/Chip/Chip.js";
5
5
  import { Dialog as l } from "./components/Dialog/Dialog.js";
6
- import { FamilyAndIcons as T, Icon as c } from "./components/Icon/Icon.js";
6
+ import { FamilyAndIcons as T, Icon as s } from "./components/Icon/Icon.js";
7
7
  import { IconButton as S } from "./components/IconButton/IconButton.js";
8
8
  import { Input as u } from "./components/Input/Input.js";
9
9
  import { InputSearch as d } from "./components/InputSearch/InputSearch.js";
10
- import { LoadingSpinner as I } from "./components/LoadingSpinner/LoadingSpinner.js";
11
- import { PageHeader as C } from "./components/PageHeader/PageHeader.js";
12
- import { Pagination as y, paginationDefaultTranslations as A } from "./components/Pagination/Pagination.js";
10
+ import { LoadingSpinner as D } from "./components/LoadingSpinner/LoadingSpinner.js";
11
+ import { PageHeader as h } from "./components/PageHeader/PageHeader.js";
12
+ import { Pagination as C, paginationDefaultTranslations as A } from "./components/Pagination/Pagination.js";
13
13
  import { Select as B, SelectOption as v } from "./components/Select/Select.js";
14
14
  import { Skeleton as H, SkeletonCircle as L, SkeletonTable as O } from "./components/Skeleton/Skeleton.js";
15
15
  import { Snackbar as q } from "./components/Snackbar/Snackbar.js";
@@ -17,31 +17,32 @@ import { SortTooltip as z, sortTooltipDefaultTranslations as E } from "./compone
17
17
  import { Stepper as J } from "./components/Stepper/Stepper.js";
18
18
  import { Table as M } from "./components/Table/Table.js";
19
19
  import { Tabs as Q } from "./components/Tabs/Tabs.js";
20
- import { Toggle as U } from "./components/Toggle/Toggle.js";
21
- import { Tooltip as W } from "./components/Tooltip/Tooltip.js";
22
- import { Typography as Y } from "./components/Typography/Typography.js";
23
- import { default as _ } from "./components/Dialog/Title.js";
24
- import { default as oo } from "./components/Dialog/Content.js";
25
- import { default as eo } from "./components/Dialog/Actions.js";
26
- import { Tab as po } from "./components/Tabs/Tab.js";
27
- import { TabPanel as fo } from "./components/Tabs/TabPanel.js";
20
+ import { TextDisplay as U } from "./components/TextDisplay/TextDisplay.js";
21
+ import { Toggle as W } from "./components/Toggle/Toggle.js";
22
+ import { Tooltip as Y } from "./components/Tooltip/Tooltip.js";
23
+ import { Typography as _ } from "./components/Typography/Typography.js";
24
+ import { default as oo } from "./components/Dialog/Title.js";
25
+ import { default as eo } from "./components/Dialog/Content.js";
26
+ import { default as po } from "./components/Dialog/Actions.js";
27
+ import { Tab as fo } from "./components/Tabs/Tab.js";
28
+ import { TabPanel as mo } from "./components/Tabs/TabPanel.js";
28
29
  export {
29
- eo as Actions,
30
- p as Advice,
31
- f as Button,
32
- n as Checkbox,
33
- e as Chip,
34
- oo as Content,
30
+ po as Actions,
31
+ e as Advice,
32
+ p as Button,
33
+ f as Checkbox,
34
+ m as Chip,
35
+ eo as Content,
35
36
  l as Dialog,
36
- _ as DialogTitle,
37
+ oo as DialogTitle,
37
38
  T as FamilyAndIcons,
38
- c as Icon,
39
+ s as Icon,
39
40
  S as IconButton,
40
41
  u as Input,
41
42
  d as InputSearch,
42
- I as LoadingSpinner,
43
- C as PageHeader,
44
- y as Pagination,
43
+ D as LoadingSpinner,
44
+ h as PageHeader,
45
+ C as Pagination,
45
46
  B as Select,
46
47
  v as SelectOption,
47
48
  H as Skeleton,
@@ -50,13 +51,14 @@ export {
50
51
  q as Snackbar,
51
52
  z as SortTooltip,
52
53
  J as Stepper,
53
- po as Tab,
54
- fo as TabPanel,
54
+ fo as Tab,
55
+ mo as TabPanel,
55
56
  M as Table,
56
57
  Q as Tabs,
57
- U as Toggle,
58
- W as Tooltip,
59
- Y as Typography,
58
+ U as TextDisplay,
59
+ W as Toggle,
60
+ Y as Tooltip,
61
+ _ as Typography,
60
62
  A as paginationDefaultTranslations,
61
63
  E as sortTooltipDefaultTranslations
62
64
  };
@@ -0,0 +1 @@
1
+ :root{--secondary-orange: #ffa945;--secondary-orange-rgb: 255, 169, 69;--secondary-orange-dark: #fe8d53;--secondary-orange-dark-rgb: 254, 141, 83;--secondary-orange-light: #525061;--secondary-orange-light-rgb: 82, 80, 97;--secondary-green: #99dec3;--secondary-green-rgb: 153, 222, 195;--secondary-green-dark: #6acbb1;--secondary-green-dark-rgb: 106, 203, 177;--secondary-green-darker: #31aa7e;--secondary-green-darker-rgb: 49, 170, 126;--secondary-green-light: #baedd9;--secondary-green-light-rgb: 186, 237, 217;--accent: #1897f3;--accent-rgb: 24, 151, 243;--accent-dark: #1672c7;--accent-dark-rgb: 22, 114, 199;--accent-light: #4fb1f9;--accent-light-rgb: 79, 177, 249;--accent-lighter: #8ae1fd;--accent-lighter-rgb: 138, 225, 253;--alert: #df4561;--alert-rgb: 223, 69, 97;--alert-dark: #bb2b45;--alert-dark-rgb: 187, 43, 69;--accent-alert-light: #f37c91;--accent-alert-light-rgb: 243, 124, 145;--cream: #fafafa;--cream-rgb: 250, 250, 250;--hover: #42b7ff;--hover-rgb: 66, 183, 255;--active: #0a75cc;--active-rgb: 10, 117, 204;--border: #d9d9d9;--border-rgb: 217, 217, 217}:root{--gray-100: #16161e;--gray-100-rgb: 22, 22, 30;--gray-95: #3f3d4b;--gray-95-rgb: 63, 61, 75;--gray-90: #525061;--gray-90-rgb: 82, 80, 97;--gray-75: #838192;--gray-75-rgb: 131, 129, 146;--gray-50: #bcbac8;--gray-50-rgb: 188, 186, 200;--gray-25: #dbdae2;--gray-25-rgb: 219, 218, 226;--gray-10: #ebeaf0;--gray-10-rgb: 235, 234, 240;--gray-5: #f7f7fc;--gray-5-rgb: 247, 247, 252;--black-100: #000000;--black-100-rgb: 0, 0, 0;--black-75: #616161;--black-75-rgb: 97, 97, 97;--black-50: #838192;--black-50-rgb: 131, 129, 146;--black-25: #bcbac8;--black-25-rgb: 188, 186, 200;--black-10: #ebeaf0;--black-10-rgb: 235, 234, 240;--white-100: #ffffff;--white-100-rgb: 255, 255, 255}:root{--heading-font-weight: 700;--heading-font-size-xl: 3.75rem;--heading-line-height-xl: 4.875rem;--heading-font-size-l: 3rem;--heading-line-height-l: 3.9375rem;--heading-font-size: 2.25rem;--heading-line-height: 2.875rem;--heading-font-size-s: 1.5rem;--heading-line-height-s: 2rem;--body-font-size: 1rem;--body-line-height: 1.3125rem;--body-weight: normal;--body-bold: bold;--body-font-size-large: 1.5rem;--body-line-height-large: 1.625rem;--body-font-size-medium: 1.125;--body-line-height-medium: 1rem;--body-font-size-small: .875rem;--body-line-height-small: 1.125rem;--body-font-size-tiny: .75rem;--body-line-height-tiny: 1rem;--quote-font-size-large: 1.5rem;--quote-line-height-large: 2rem;--quote-font-weight-large: normal;--quote-font-size: 1rem;--quote-line-height: 1.3125rem;--quote-font-weight: normal;--form-input-font-size: 1rem;--form-input-line-height: 1.3125rem;--form-input-font-weight: bold;--form-hint-font-size: .875rem;--form-hint-line-height: 1.3125rem;--form-hint-font-weight: normal;--form-label-font-size: .875rem;--form-label-line-height: 1.3125rem;--form-label-font-weight: normal;--form-dropdown-font-size: 1rem;--form-dropdown-line-height: 1.3125rem;--form-dropdown-font-weight: normal;--table-font-size: .875rem;--table-line-height: 1.0625rem;--table-header-font-weight: bold;--table-body-font-weight: normal;--table-body-secondary-line-height: 1.3125rem;--button-font-size: 1rem;--button-line-height: 1.25rem;--button-font-weight: bold;--font-size-small: .75rem;--font-weight-small: 400;--font-line-height-small: 1.25rem;--font-weight-700: 700}:root{--spacing: 8px;--border-radius: 6px;--border-radius-soft: 4px;--transition-soft: .3s;--transition-long: .75s}*{box-sizing:border-box}
@@ -1,6 +1,5 @@
1
- import { a as D } from "./objectWithoutPropertiesLoose-D7Cp0Pg_.js";
1
+ import { u as S, b as D, f as k } from "./index-CH45lKw7.js";
2
2
  import * as i from "react";
3
- import { u as S, e as k } from "./index-CqjC7P5Y.js";
4
3
  import { u as _ } from "./useIsFocusVisible-BH4IAdcw.js";
5
4
  function v(p) {
6
5
  const {
@@ -16,7 +15,7 @@ function v(p) {
16
15
  }, []);
17
16
  return [c, u];
18
17
  }
19
- function h(p = {}) {
18
+ function W(p = {}) {
20
19
  const {
21
20
  disabled: n = !1,
22
21
  focusableWhenDisabled: l,
@@ -102,5 +101,5 @@ function h(p = {}) {
102
101
  };
103
102
  }
104
103
  export {
105
- h as u
104
+ W as u
106
105
  };
@@ -1,4 +1,4 @@
1
- import { P as a } from "./index-CqjC7P5Y.js";
1
+ import { P as a } from "./index-CH45lKw7.js";
2
2
  import * as c from "react";
3
3
  import { u as m } from "./useEnhancedEffect-CJGo-L3B.js";
4
4
  function s(e, n) {
@@ -1,7 +1,6 @@
1
- import { a as p } from "./objectWithoutPropertiesLoose-D7Cp0Pg_.js";
1
+ import { b as p, u as re, f as ie } from "./index-CH45lKw7.js";
2
2
  import * as f from "react";
3
- import { L as x } from "./combineHooksSlotProps-BHqhiBfc.js";
4
- import { u as re, e as ie } from "./index-CqjC7P5Y.js";
3
+ import { L as x } from "./combineHooksSlotProps-DVjg9PRh.js";
5
4
  function W(t, e, r = (n, l) => n === l) {
6
5
  return t.length === e.length && t.every((n, l) => r(n, e[l]));
7
6
  }
@@ -16,44 +15,44 @@ function L(t, e) {
16
15
  e[n] !== void 0 && (r[n] = e[n]);
17
16
  }), r;
18
17
  }
19
- function ae(t) {
18
+ function se(t) {
20
19
  const {
21
20
  nextState: e,
22
21
  initialState: r,
23
22
  stateComparers: n,
24
23
  onStateChange: l,
25
- controlledProps: s,
24
+ controlledProps: a,
26
25
  lastActionRef: i
27
26
  } = t, h = f.useRef(r);
28
27
  f.useEffect(() => {
29
28
  if (i.current === null)
30
29
  return;
31
- const a = L(h.current, s);
30
+ const s = L(h.current, a);
32
31
  Object.keys(e).forEach((C) => {
33
32
  var V;
34
- const g = (V = n[C]) != null ? V : ue, c = e[C], m = a[C];
33
+ const g = (V = n[C]) != null ? V : ue, c = e[C], m = s[C];
35
34
  if (m == null && c != null || m != null && c == null || m != null && c != null && !g(c, m)) {
36
35
  var o, S;
37
36
  l == null || l((o = i.current.event) != null ? o : null, C, c, (S = i.current.type) != null ? S : "", e);
38
37
  }
39
38
  }), h.current = e, i.current = null;
40
- }, [h, e, i, l, n, s]);
39
+ }, [h, e, i, l, n, a]);
41
40
  }
42
- function se(t) {
41
+ function ae(t) {
43
42
  const e = f.useRef(null), {
44
43
  reducer: r,
45
44
  initialState: n,
46
45
  controlledProps: l = N,
47
- stateComparers: s = N,
46
+ stateComparers: a = N,
48
47
  onStateChange: i = q,
49
48
  actionContext: h,
50
- componentName: a = ""
49
+ componentName: s = ""
51
50
  } = t, C = f.useRef(l);
52
51
  process.env.NODE_ENV !== "production" && f.useEffect(() => {
53
52
  Object.keys(l).forEach((o) => {
54
- C.current[o] !== void 0 && l[o] === void 0 && console.error(`useControllableReducer: ${a ? `The ${a} component` : "A component"} is changing a controlled prop to be uncontrolled: ${o}`), C.current[o] === void 0 && l[o] !== void 0 && console.error(`useControllableReducer: ${a ? `The ${a} component` : "A component"} is changing an uncontrolled prop to be controlled: ${o}`);
53
+ C.current[o] !== void 0 && l[o] === void 0 && console.error(`useControllableReducer: ${s ? `The ${s} component` : "A component"} is changing a controlled prop to be uncontrolled: ${o}`), C.current[o] === void 0 && l[o] !== void 0 && console.error(`useControllableReducer: ${s ? `The ${s} component` : "A component"} is changing an uncontrolled prop to be controlled: ${o}`);
55
54
  });
56
- }, [l, a]);
55
+ }, [l, s]);
57
56
  const V = f.useCallback((o, S) => {
58
57
  e.current = S;
59
58
  const R = L(o, l);
@@ -63,24 +62,24 @@ function se(t) {
63
62
  context: h
64
63
  }));
65
64
  }, [h]);
66
- return ae({
65
+ return se({
67
66
  nextState: g,
68
67
  initialState: n,
69
- stateComparers: s ?? N,
68
+ stateComparers: a ?? N,
70
69
  onStateChange: i ?? q,
71
70
  controlledProps: l,
72
71
  lastActionRef: e
73
72
  }), [L(g, l), m];
74
73
  }
75
- function oe(t, e, r, n, l, s) {
76
- if (r.length === 0 || !n && r.every((h, a) => l(h, a)))
74
+ function oe(t, e, r, n, l, a) {
75
+ if (r.length === 0 || !n && r.every((h, s) => l(h, s)))
77
76
  return -1;
78
77
  let i = t;
79
78
  for (; ; ) {
80
- if (!s && e === "next" && i === r.length || !s && e === "previous" && i === -1)
79
+ if (!a && e === "next" && i === r.length || !a && e === "previous" && i === -1)
81
80
  return -1;
82
81
  if (n ? !1 : l(r[i], i))
83
- i += e === "next" ? 1 : -1, s && (i = (i + r.length) % r.length);
82
+ i += e === "next" ? 1 : -1, a && (i = (i + r.length) % r.length);
84
83
  else
85
84
  return i;
86
85
  }
@@ -89,12 +88,12 @@ function w(t, e, r) {
89
88
  var n;
90
89
  const {
91
90
  items: l,
92
- isItemDisabled: s,
91
+ isItemDisabled: a,
93
92
  disableListWrap: i,
94
93
  disabledItemsFocusable: h,
95
- itemComparer: a,
94
+ itemComparer: s,
96
95
  focusManagement: C
97
- } = r, V = C === "DOM" ? 0 : -1, g = l.length - 1, c = t == null ? -1 : l.findIndex((D) => a(D, t));
96
+ } = r, V = C === "DOM" ? 0 : -1, g = l.length - 1, c = t == null ? -1 : l.findIndex((D) => s(D, t));
98
97
  let m, o, S = !i;
99
98
  switch (e) {
100
99
  case "reset":
@@ -113,8 +112,8 @@ function w(t, e, r) {
113
112
  D < 0 ? !S && c !== -1 || Math.abs(e) > 1 ? (m = 0, o = "next") : (m = g, o = "previous") : D > g ? !S || Math.abs(e) > 1 ? (m = g, o = "previous") : (m = 0, o = "next") : (m = D, o = e >= 0 ? "next" : "previous");
114
113
  }
115
114
  }
116
- const R = oe(m, o, l, h, s, S);
117
- return R === -1 && t !== null && !s(t, c) ? t : (n = l[R]) != null ? n : null;
115
+ const R = oe(m, o, l, h, a, S);
116
+ return R === -1 && t !== null && !a(t, c) ? t : (n = l[R]) != null ? n : null;
118
117
  }
119
118
  function ce(t, e, r, n) {
120
119
  return r === "none" ? [] : r === "single" ? n(e[0], t) ? e : [t] : e.some((l) => n(l, t)) ? e.filter((l) => !n(l, t)) : [...e, t];
@@ -123,14 +122,14 @@ function j(t, e, r) {
123
122
  const {
124
123
  itemComparer: n,
125
124
  isItemDisabled: l,
126
- selectionMode: s,
125
+ selectionMode: a,
127
126
  items: i
128
127
  } = r, {
129
128
  selectedValues: h
130
- } = e, a = i.findIndex((V) => n(t, V));
131
- if (l(t, a))
129
+ } = e, s = i.findIndex((V) => n(t, V));
130
+ if (l(t, s))
132
131
  return e;
133
- const C = ce(t, h, s, n);
132
+ const C = ce(t, h, a, n);
134
133
  return p({}, e, {
135
134
  selectedValues: C,
136
135
  highlightedValue: t
@@ -139,7 +138,7 @@ function j(t, e, r) {
139
138
  function he(t, e, r) {
140
139
  const n = e.highlightedValue, {
141
140
  orientation: l,
142
- pageSize: s
141
+ pageSize: a
143
142
  } = r;
144
143
  switch (t) {
145
144
  case "Home":
@@ -152,11 +151,11 @@ function he(t, e, r) {
152
151
  });
153
152
  case "PageUp":
154
153
  return p({}, e, {
155
- highlightedValue: w(n, -s, r)
154
+ highlightedValue: w(n, -a, r)
156
155
  });
157
156
  case "PageDown":
158
157
  return p({}, e, {
159
- highlightedValue: w(n, s, r)
158
+ highlightedValue: w(n, a, r)
160
159
  });
161
160
  case "ArrowUp":
162
161
  if (l !== "vertical")
@@ -204,34 +203,34 @@ function fe(t, e, r) {
204
203
  const {
205
204
  items: n,
206
205
  isItemDisabled: l,
207
- disabledItemsFocusable: s,
206
+ disabledItemsFocusable: a,
208
207
  getItemAsString: i
209
208
  } = r, h = e.length > 1;
210
- let a = h ? t.highlightedValue : w(t.highlightedValue, 1, r);
209
+ let s = h ? t.highlightedValue : w(t.highlightedValue, 1, r);
211
210
  for (let C = 0; C < n.length; C += 1) {
212
- if (!a || !h && t.highlightedValue === a)
211
+ if (!s || !h && t.highlightedValue === s)
213
212
  return t;
214
- if (de(a, e, i) && (!l(a, n.indexOf(a)) || s))
213
+ if (de(s, e, i) && (!l(s, n.indexOf(s)) || a))
215
214
  return p({}, t, {
216
- highlightedValue: a
215
+ highlightedValue: s
217
216
  });
218
- a = w(a, 1, r);
217
+ s = w(s, 1, r);
219
218
  }
220
219
  return t;
221
220
  }
222
221
  function me(t, e, r, n) {
223
222
  var l;
224
223
  const {
225
- itemComparer: s,
224
+ itemComparer: a,
226
225
  focusManagement: i
227
226
  } = n;
228
227
  let h = null;
229
228
  if (r.highlightedValue != null) {
230
- var a;
231
- h = (a = t.find((g) => s(g, r.highlightedValue))) != null ? a : null;
229
+ var s;
230
+ h = (s = t.find((g) => a(g, r.highlightedValue))) != null ? s : null;
232
231
  } else
233
232
  i === "DOM" && e.length === 0 && (h = w(null, "reset", n));
234
- const V = ((l = r.selectedValues) != null ? l : []).filter((g) => t.some((c) => s(c, g)));
233
+ const V = ((l = r.selectedValues) != null ? l : []).filter((g) => t.some((c) => a(c, g)));
235
234
  return p({}, r, {
236
235
  highlightedValue: h,
237
236
  selectedValues: V
@@ -287,8 +286,8 @@ function xe(t) {
287
286
  });
288
287
  return f.useCallback((r) => {
289
288
  if (r.key.length === 1 && r.key !== " ") {
290
- const n = e.current, l = r.key.toLowerCase(), s = performance.now();
291
- n.searchString.length > 0 && n.lastTime && s - n.lastTime > be ? n.searchString = l : (n.searchString.length !== 1 || l !== n.searchString) && (n.searchString += l), n.lastTime = s, t(n.searchString, r);
289
+ const n = e.current, l = r.key.toLowerCase(), a = performance.now();
290
+ n.searchString.length > 0 && n.lastTime && a - n.lastTime > be ? n.searchString = l : (n.searchString.length !== 1 || l !== n.searchString) && (n.searchString += l), n.lastTime = a, t(n.searchString, r);
292
291
  }
293
292
  }, [t]);
294
293
  }
@@ -297,16 +296,16 @@ const z = {}, Ve = () => {
297
296
  highlightedValue: null,
298
297
  selectedValues: []
299
298
  });
300
- function Oe(t) {
299
+ function Me(t) {
301
300
  const {
302
301
  controlledProps: e = z,
303
302
  disabledItemsFocusable: r = !1,
304
303
  disableListWrap: n = !1,
305
304
  focusManagement: l = "activeDescendant",
306
- getInitialState: s = ve,
305
+ getInitialState: a = ve,
307
306
  getItemDomElement: i,
308
307
  getItemId: h,
309
- isItemDisabled: a = De,
308
+ isItemDisabled: s = De,
310
309
  rootRef: C,
311
310
  onStateChange: V = Ve,
312
311
  items: g,
@@ -349,7 +348,7 @@ function Oe(t) {
349
348
  disabledItemsFocusable: r,
350
349
  disableListWrap: n,
351
350
  focusManagement: l,
352
- isItemDisabled: a,
351
+ isItemDisabled: s,
353
352
  itemComparer: c,
354
353
  items: g,
355
354
  getItemAsString: m,
@@ -358,7 +357,7 @@ function Oe(t) {
358
357
  pageSize: P,
359
358
  selectionMode: $,
360
359
  stateComparers: O
361
- }), [r, n, l, a, c, g, m, T, D, P, $, O]), Y = s(), X = _ ?? Ie, Q = f.useMemo(() => p({}, H, K), [H, K]), [k, v] = se({
360
+ }), [r, n, l, s, c, g, m, T, D, P, $, O]), Y = a(), X = _ ?? Ie, Q = f.useMemo(() => p({}, H, K), [H, K]), [k, v] = ae({
362
361
  reducer: X,
363
362
  actionContext: Q,
364
363
  initialState: Y,
@@ -433,5 +432,5 @@ export {
433
432
  j as h,
434
433
  Ie as l,
435
434
  w as m,
436
- Oe as u
435
+ Me as u
437
436
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "0.0.1-alpha.16",
4
+ "version": "0.0.1-alpha.18",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -31,7 +31,7 @@
31
31
  "coverage": "vitest run --coverage",
32
32
  "export-files": "node scripts/export-files.cjs",
33
33
  "prebuild": "yarn export-files",
34
- "build": "tsc --p ./tsconfig-build.json && vite build",
34
+ "build": "tsc --p ./tsconfig-build.json && vite build && mv ./dist/assets/marola.css ./dist",
35
35
  "postbuild": "storybook build --disable-telemetry --output-dir build",
36
36
  "storybook": "storybook dev -p 6006"
37
37
  },
@@ -1,30 +0,0 @@
1
- var u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function f(e) {
3
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
- }
5
- function l(e) {
6
- if (e.__esModule)
7
- return e;
8
- var r = e.default;
9
- if (typeof r == "function") {
10
- var t = function o() {
11
- return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
12
- };
13
- t.prototype = r.prototype;
14
- } else
15
- t = {};
16
- return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
17
- var n = Object.getOwnPropertyDescriptor(e, o);
18
- Object.defineProperty(t, o, n.get ? n : {
19
- enumerable: !0,
20
- get: function() {
21
- return e[o];
22
- }
23
- });
24
- }), t;
25
- }
26
- export {
27
- l as a,
28
- u as c,
29
- f as g
30
- };
@@ -1,48 +0,0 @@
1
- import { Advice as o } from "./Advice.js";
2
- import * as e from "react";
3
- const n = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", "data-waves-icon": "fa/duotone/helmet-battle", fill: "currentColor", color: "currentColor", width: "1em", height: "1em", style: {
4
- fill: "currentcolor",
5
- color: "currentcolor",
6
- width: "1em",
7
- height: "1em"
8
- }, ...t }, /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("style", null, `
9
- .fa-secondary {
10
- opacity: .4
11
- }
12
- `)), /* @__PURE__ */ e.createElement("path", { className: "fa-primary", d: "M31.99 256c17.63 0 32.01-12.5 32.01-28V0L.9928 221.1C-4.132 238.9 11.24 256 31.99 256zM575 221.1L512 0v228c0 15.5 14.38 28 32 28C564.8 256 580.1 238.9 575 221.1zM159.1 192L159.1 224l96 32v256l64-.0022L320 256l96-32l.0008-31.1H159.1z" }), /* @__PURE__ */ e.createElement("path", { className: "fa-secondary", d: "M480 210.9C480 90.38 288 0 288 0S95.1 90.38 95.1 210.9c0 82.75-22.88 145.9-31.13 180.6c-3.375 14.5 3.625 29.38 16.38 35.25L255.1 512V256L159.1 224L159.1 192h256L416 224l-96 32l-.0009 255.1l174.9-85.25c12.63-5.875 19.75-20.75 16.25-35.25C502.9 356.8 480 293.6 480 210.9z" })), c = {
13
- title: "Components/Advice",
14
- component: o,
15
- tags: ["autodocs"],
16
- parameters: {
17
- layout: "padded"
18
- }
19
- }, a = {
20
- args: {
21
- type: "without-results",
22
- content: "No Results"
23
- }
24
- }, l = {
25
- args: {
26
- type: "no-permission",
27
- content: "No Permission"
28
- }
29
- }, r = {
30
- name: "Custom Icons (Waves Icons)",
31
- args: {
32
- icon: { icon: "logo", iconFamily: "pi", color: "var(--secondary-orange)", size: "5rem" },
33
- content: "Pismo"
34
- }
35
- }, m = {
36
- name: "Custom Icons (SVG)",
37
- args: {
38
- IconSvg: n,
39
- content: "Ready for battle?"
40
- }
41
- };
42
- export {
43
- r as CustomIcon,
44
- m as CustomIconSVG,
45
- l as NoPermission,
46
- a as WithoutResults,
47
- c as default
48
- };
@@ -1,40 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import "../Chip/Chip.js";
3
- import { Button as i } from "./Button.js";
4
- import "react";
5
- import "../Dialog/Backdrop.js";
6
- import "../Typography/Typography.js";
7
- import "../IconButton/IconButton.js";
8
- import "../Select/Select.js";
9
- import "../Table/Table.js";
10
- import "../Tabs/Tabs.js";
11
- const k = {
12
- title: "Components/Button",
13
- component: i,
14
- tags: ["autodocs"],
15
- decorators: [
16
- (o) => /* @__PURE__ */ t("div", { style: { padding: "1em" }, children: /* @__PURE__ */ t(o, {}) })
17
- ],
18
- argTypes: {
19
- onClick: {
20
- if: { arg: "link", exists: !1 }
21
- },
22
- type: {
23
- control: { type: "text" },
24
- if: { arg: "onClick", exists: !0 }
25
- },
26
- link: {
27
- control: { type: "text" },
28
- if: { arg: "onClick", exists: !1 }
29
- }
30
- }
31
- }, f = {
32
- args: { children: "Button", onClick: () => alert("Button was clicked!") }
33
- }, g = {
34
- args: { children: "Button", link: "https://marola.pismolabs.io" }
35
- };
36
- export {
37
- g as Link,
38
- f as Simple,
39
- k as default
40
- };
@@ -1,59 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { Chip as i } from "./Chip.js";
3
- import { Icon as e } from "../Icon/Icon.js";
4
- import "../Button/Button.js";
5
- import "react";
6
- import "../Dialog/Backdrop.js";
7
- import "../Typography/Typography.js";
8
- import "../IconButton/IconButton.js";
9
- import "../Select/Select.js";
10
- import "../Table/Table.js";
11
- import "../Tabs/Tabs.js";
12
- const f = {
13
- title: "Components/Chip",
14
- component: i,
15
- tags: ["autodocs"],
16
- decorators: [
17
- (s) => /* @__PURE__ */ a("div", { style: { padding: "1em" }, children: /* @__PURE__ */ a(s, {}) })
18
- ]
19
- }, r = {
20
- args: {
21
- label: "Example text"
22
- }
23
- }, t = {
24
- args: {
25
- ...r == null ? void 0 : r.args,
26
- onClickContent: () => alert("Button was clicked!")
27
- }
28
- }, n = {
29
- args: {
30
- ...t == null ? void 0 : t.args,
31
- onClickRemove: () => alert("Remove changes!")
32
- }
33
- }, o = {
34
- args: {
35
- ...n == null ? void 0 : n.args,
36
- leftAdornment: {
37
- icon: /* @__PURE__ */ a(e, { icon: "calendar-days", color: "rgba(var(--gray-95-rgb), 0.45)", size: "1.125rem" })
38
- }
39
- }
40
- }, b = {
41
- args: {
42
- ...o == null ? void 0 : o.args,
43
- variant: "outlined"
44
- }
45
- }, j = {
46
- args: {
47
- ...o == null ? void 0 : o.args,
48
- variant: "contained"
49
- }
50
- };
51
- export {
52
- t as Clickable,
53
- n as ClickableWithRemove,
54
- j as FullContained,
55
- o as FullDefault,
56
- b as FullOutlined,
57
- r as Simple,
58
- f as default
59
- };