@loadsmart/miranda-react 2.1.0 → 3.0.0-alpha.2

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 (122) hide show
  1. package/dist/Accordion-CRFOEG8P.js +35 -0
  2. package/dist/ActionableTag-CiY3ktmR.js +30 -0
  3. package/dist/Badge-bksnMK0y.js +10 -0
  4. package/dist/Banner-DKi8HnhY.js +67 -0
  5. package/dist/Button-MYGS0n5V.js +16 -0
  6. package/dist/Card-DMVgqLq2.js +88 -0
  7. package/dist/Checkbox-OA3mt9qr.js +19 -0
  8. package/dist/Dialog-BXmQb7iZ.js +92 -0
  9. package/dist/Divider-Ce0Poebo.js +10 -0
  10. package/dist/Drawer-DAL5BRMS.js +84 -0
  11. package/dist/Dropdown-BZq7wxH2.js +47 -0
  12. package/dist/EmptyState-N_H8UALy.js +49 -0
  13. package/dist/Field-DUTm4XZx.js +31 -0
  14. package/dist/Header-BVVroF-a.js +47 -0
  15. package/dist/Icon-JSXp1ySp.js +10 -0
  16. package/dist/LabeledValue-BEj3zEk5.js +33 -0
  17. package/dist/Layout-yKvtIEmV.js +81 -0
  18. package/dist/Link-XqV4DM9g.js +10 -0
  19. package/dist/LogoLoader-Bjplh2u3.js +10 -0
  20. package/dist/PageContent-Bu0ofdVV.js +19 -0
  21. package/dist/Pagination-D2HYqeb2.js +13 -0
  22. package/dist/ProgressBar-CdwVUs1k.js +10 -0
  23. package/dist/ProgressBarCountdown-BsTb_5jd.js +10 -0
  24. package/dist/RadioGroup-QWrSrVvv.js +28 -0
  25. package/dist/Section-BcuVyQXQ.js +24 -0
  26. package/dist/SpinnerWheel-BqMAxsBi.js +10 -0
  27. package/dist/Switch-Uq5TuNqD.js +13 -0
  28. package/dist/Table-DlnVsR0p.js +78 -0
  29. package/dist/Tabs-9eHquUoD.js +34 -0
  30. package/dist/Text-BUtQqPKN.js +10 -0
  31. package/dist/TextArea-DNtv4x9o.js +18 -0
  32. package/dist/TextField-BHj0EHuT.js +20 -0
  33. package/dist/Timeline-MCAixOaW.js +68 -0
  34. package/dist/ToggleGroup-ig9rKVtU.js +33 -0
  35. package/dist/Tooltip-0sGIbwe8.js +15 -0
  36. package/dist/accordion.js +5 -0
  37. package/dist/badge.js +4 -0
  38. package/dist/banner.js +5 -0
  39. package/dist/button.js +5 -0
  40. package/dist/card.js +5 -0
  41. package/dist/checkbox.js +5 -0
  42. package/dist/components/Accordion/index.d.ts +2 -0
  43. package/dist/components/Badge/index.d.ts +2 -0
  44. package/dist/components/Banner/Banner.d.ts +0 -1
  45. package/dist/components/Banner/index.d.ts +3 -1
  46. package/dist/components/Button/index.d.ts +2 -0
  47. package/dist/components/Card/index.d.ts +2 -0
  48. package/dist/components/Checkbox/Checkbox.d.ts +2 -3
  49. package/dist/components/Checkbox/index.d.ts +2 -0
  50. package/dist/components/Dialog/index.d.ts +2 -0
  51. package/dist/components/Divider/index.d.ts +1 -0
  52. package/dist/components/Drawer/index.d.ts +2 -0
  53. package/dist/components/Dropdown/index.d.ts +2 -0
  54. package/dist/components/EmptyState/index.d.ts +1 -0
  55. package/dist/components/Field/index.d.ts +2 -0
  56. package/dist/components/Header/index.d.ts +1 -0
  57. package/dist/components/Icon/index.d.ts +2 -0
  58. package/dist/components/LabeledValue/index.d.ts +2 -0
  59. package/dist/components/Layout/index.d.ts +2 -0
  60. package/dist/components/Link/Link.d.ts +0 -2
  61. package/dist/components/Link/index.d.ts +3 -1
  62. package/dist/components/LogoLoader/index.d.ts +2 -0
  63. package/dist/components/PageContent/index.d.ts +4 -0
  64. package/dist/components/Pagination/index.d.ts +2 -0
  65. package/dist/components/ProgressBar/ProgressBar.d.ts +0 -2
  66. package/dist/components/ProgressBar/index.d.ts +3 -1
  67. package/dist/components/ProgressBarCountdown/index.d.ts +2 -0
  68. package/dist/components/RadioGroup/RadioGroup.d.ts +5 -4
  69. package/dist/components/RadioGroup/index.d.ts +2 -0
  70. package/dist/components/Section/index.d.ts +2 -0
  71. package/dist/components/SpinnerWheel/index.d.ts +2 -0
  72. package/dist/components/Steps/index.d.ts +2 -0
  73. package/dist/components/Switch/Switch.d.ts +2 -3
  74. package/dist/components/Switch/index.d.ts +2 -0
  75. package/dist/components/Table/index.d.ts +2 -1
  76. package/dist/components/Tabs/index.d.ts +2 -1
  77. package/dist/components/Tag/index.d.ts +2 -0
  78. package/dist/components/Text/index.d.ts +2 -0
  79. package/dist/components/TextArea/TextArea.d.ts +2 -3
  80. package/dist/components/TextArea/index.d.ts +2 -0
  81. package/dist/components/TextField/TextField.d.ts +1 -2
  82. package/dist/components/TextField/index.d.ts +2 -0
  83. package/dist/components/Timeline/index.d.ts +2 -0
  84. package/dist/components/ToggleGroup/ToggleGroup.d.ts +5 -3
  85. package/dist/components/ToggleGroup/index.d.ts +2 -0
  86. package/dist/components/Tooltip/Tooltip.d.ts +3 -5
  87. package/dist/components/Tooltip/index.d.ts +3 -1
  88. package/dist/createComponent-Cye6h9wF.js +120 -0
  89. package/dist/dialog.js +5 -0
  90. package/dist/divider.js +4 -0
  91. package/dist/drawer.js +5 -0
  92. package/dist/dropdown.js +5 -0
  93. package/dist/emptystate.js +5 -0
  94. package/dist/field.js +5 -0
  95. package/dist/header.js +4 -0
  96. package/dist/icon.js +4 -0
  97. package/dist/index.d.ts +0 -67
  98. package/dist/index.js +40 -1224
  99. package/dist/labeledvalue.js +5 -0
  100. package/dist/layout.js +5 -0
  101. package/dist/link.js +4 -0
  102. package/dist/logoloader.js +4 -0
  103. package/dist/pagecontent.js +4 -0
  104. package/dist/pagination.js +4 -0
  105. package/dist/progressbar.js +4 -0
  106. package/dist/progressbarcountdown.js +4 -0
  107. package/dist/radiogroup.js +5 -0
  108. package/dist/section.js +5 -0
  109. package/dist/spinnerwheel.js +4 -0
  110. package/dist/steps.js +4 -0
  111. package/dist/switch.js +4 -0
  112. package/dist/table.js +4 -0
  113. package/dist/tabs.js +5 -0
  114. package/dist/tag.js +5 -0
  115. package/dist/text.js +4 -0
  116. package/dist/textarea.js +5 -0
  117. package/dist/textfield.js +5 -0
  118. package/dist/timeline.js +4 -0
  119. package/dist/togglegroup.js +5 -0
  120. package/dist/tooltip.js +5 -0
  121. package/dist/useSteps-O9Ch5_pJ.js +88 -0
  122. package/package.json +3 -3
@@ -0,0 +1,5 @@
1
+ export { b as LabeledValue, L as LabeledValueLabel, a as LabeledValueValue } from './LabeledValue-BEj3zEk5.js';
2
+ export { LabeledValue as WCLabeledValue, LabeledValueLabel as WCLabeledValueLabel, LabeledValueValue as WCLabeledValueValue } from '@loadsmart/miranda-wc';
3
+ import 'react/jsx-runtime';
4
+ import 'react';
5
+ import './createComponent-Cye6h9wF.js';
package/dist/layout.js ADDED
@@ -0,0 +1,5 @@
1
+ export { B as Box, C as Column, d as Container, a as Grid, G as Group, L as Layout, R as Row, b as Sidebar, S as Stack, c as Switcher } from './Layout-yKvtIEmV.js';
2
+ export { Box as WCBox, Column as WCColumn, Container as WCContainer, Grid as WCGrid, Group as WCGroup, Row as WCRow, Sidebar as WCSidebar, Stack as WCStack, Switcher as WCSwitcher } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
5
+ import 'react/jsx-runtime';
package/dist/link.js ADDED
@@ -0,0 +1,4 @@
1
+ export { L as Link } from './Link-XqV4DM9g.js';
2
+ export { Link as WCLink } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
@@ -0,0 +1,4 @@
1
+ export { L as LogoLoader } from './LogoLoader-Bjplh2u3.js';
2
+ export { LogoLoader as WCLogoLoader } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
@@ -0,0 +1,4 @@
1
+ export { B as Body, P as PageContent } from './PageContent-Bu0ofdVV.js';
2
+ export { Body as WCBody, PageContent as WCPageContent } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
@@ -0,0 +1,4 @@
1
+ export { P as Pagination } from './Pagination-D2HYqeb2.js';
2
+ export { Pagination as WCPagination } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
@@ -0,0 +1,4 @@
1
+ export { P as ProgressBar } from './ProgressBar-CdwVUs1k.js';
2
+ export { ProgressBar as WCProgressBar } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
@@ -0,0 +1,4 @@
1
+ export { P as ProgressBarCountdown } from './ProgressBarCountdown-BsTb_5jd.js';
2
+ export { ProgressBarCountdown as WCProgressBarCountdown } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
@@ -0,0 +1,5 @@
1
+ export { a as Radio, R as RadioGroup } from './RadioGroup-QWrSrVvv.js';
2
+ export { Radio as WCRadio, RadioGroup as WCRadioGroup } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
5
+ import 'react/jsx-runtime';
@@ -0,0 +1,5 @@
1
+ export { S as Section } from './Section-BcuVyQXQ.js';
2
+ export { Section as WCSection, SectionTitle as WCSectionTitle } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
5
+ import 'react/jsx-runtime';
@@ -0,0 +1,4 @@
1
+ export { S as SpinnerWheel } from './SpinnerWheel-BqMAxsBi.js';
2
+ export { SpinnerWheel as WCSpinnerWheel } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
package/dist/steps.js ADDED
@@ -0,0 +1,4 @@
1
+ export { a as Step, S as Steps, u as useSteps } from './useSteps-O9Ch5_pJ.js';
2
+ export { Step as WCStep, Steps as WCSteps } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
package/dist/switch.js ADDED
@@ -0,0 +1,4 @@
1
+ export { S as Switch } from './Switch-Uq5TuNqD.js';
2
+ export { Switch as WCSwitch } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
package/dist/table.js ADDED
@@ -0,0 +1,4 @@
1
+ export { T as Table, i as TableActions, b as TableBody, f as TableCell, h as TableFeedback, c as TableFoot, a as TableHead, e as TableHeadCell, d as TableRow, g as TableToolbar } from './Table-DlnVsR0p.js';
2
+ export { Table as WCTable, TableActions as WCTableActions, TableBody as WCTableBody, TableCell as WCTableCell, TableFeedback as WCTableFeedback, TableFoot as WCTableFoot, TableHead as WCTableHead, TableHeadCell as WCTableHeadCell, TableRow as WCTableRow, TableToolbar as WCTableToolbar } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
package/dist/tabs.js ADDED
@@ -0,0 +1,5 @@
1
+ export { a as Tab, b as TabPanel, T as Tabs } from './Tabs-9eHquUoD.js';
2
+ export { Tab as WCTab, TabPanel as WCTabPanel, Tabs as WCTabs } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
5
+ import 'react/jsx-runtime';
package/dist/tag.js ADDED
@@ -0,0 +1,5 @@
1
+ export { A as ActionableTag, T as Tag } from './ActionableTag-CiY3ktmR.js';
2
+ export { ActionableTag as WCActionableTag, Tag as WCTag } from '@loadsmart/miranda-wc';
3
+ import 'react/jsx-runtime';
4
+ import 'react';
5
+ import './createComponent-Cye6h9wF.js';
package/dist/text.js ADDED
@@ -0,0 +1,4 @@
1
+ export { T as Text } from './Text-BUtQqPKN.js';
2
+ export { Text as WCText } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
@@ -0,0 +1,5 @@
1
+ export { T as TextArea } from './TextArea-DNtv4x9o.js';
2
+ export { TextArea as WCTextArea } from '@loadsmart/miranda-wc';
3
+ import 'react/jsx-runtime';
4
+ import './createComponent-Cye6h9wF.js';
5
+ import 'react';
@@ -0,0 +1,5 @@
1
+ export { T as TextField } from './TextField-BHj0EHuT.js';
2
+ export { TextField as WCTextField } from '@loadsmart/miranda-wc';
3
+ import 'react/jsx-runtime';
4
+ import 'react';
5
+ import './createComponent-Cye6h9wF.js';
@@ -0,0 +1,4 @@
1
+ export { T as Timeline, b as TimelineExpandableItem, a as TimelineItem, c as TimelineItemBody, d as TimelineItemFooter, e as TimelineItemHeader, f as TimelineItemHeaderSubtitle, g as TimelineItemHeaderTitle, h as TimelineItemIcon } from './Timeline-MCAixOaW.js';
2
+ export { Timeline as WCTimeline, TimelineExpandableItem as WCTimelineExpandableItem, TimelineItem as WCTimelineItem, TimelineItemBody as WCTimelineItemBody, TimelineItemFooter as WCTimelineItemFooter, TimelineItemHeader as WCTimelineItemHeader, TimelineItemHeaderSubtitle as WCTimelineItemHeaderSubtitle, TimelineItemHeaderTitle as WCTimelineItemHeaderTitle, TimelineItemIcon as WCTimelineItemIcon } from '@loadsmart/miranda-wc';
3
+ import './createComponent-Cye6h9wF.js';
4
+ import 'react';
@@ -0,0 +1,5 @@
1
+ export { a as Toggle, T as ToggleGroup } from './ToggleGroup-ig9rKVtU.js';
2
+ export { Toggle as WCToggle, ToggleGroup as WCToggleGroup } from '@loadsmart/miranda-wc';
3
+ import 'react/jsx-runtime';
4
+ import './createComponent-Cye6h9wF.js';
5
+ import 'react';
@@ -0,0 +1,5 @@
1
+ export { T as Tooltip } from './Tooltip-0sGIbwe8.js';
2
+ export { Tooltip as WCTooltip } from '@loadsmart/miranda-wc';
3
+ import 'react/jsx-runtime';
4
+ import './createComponent-Cye6h9wF.js';
5
+ import 'react';
@@ -0,0 +1,88 @@
1
+ import { Step as Step$1, Steps as Steps$1 } from '@loadsmart/miranda-wc';
2
+ import { c as createComponent } from './createComponent-Cye6h9wF.js';
3
+ import { useState, useCallback } from 'react';
4
+
5
+ const Step = createComponent({
6
+ tagName: 'm-step',
7
+ elementClass: Step$1,
8
+ displayName: 'Step',
9
+ });
10
+
11
+ const Steps = createComponent({
12
+ tagName: 'm-steps',
13
+ elementClass: Steps$1,
14
+ displayName: 'Steps',
15
+ events: {
16
+ onChange: 'm-change',
17
+ onComplete: 'm-complete',
18
+ onNavigate: 'm-navigate',
19
+ onNext: 'm-next',
20
+ onPrevious: 'm-previous',
21
+ },
22
+ subComponents: {
23
+ Step,
24
+ },
25
+ });
26
+
27
+ function createCustomEvent(eventName, detail) {
28
+ const event = new CustomEvent(eventName, {
29
+ bubbles: true,
30
+ detail,
31
+ });
32
+ return event;
33
+ }
34
+ function useSteps() {
35
+ const [stepsElement, setStepsElement] = useState(null);
36
+ const registerSteps = useCallback(() => {
37
+ return {
38
+ ref(element) {
39
+ if (element == null || stepsElement != null) {
40
+ return;
41
+ }
42
+ setStepsElement(element);
43
+ },
44
+ };
45
+ }, [stepsElement]);
46
+ const navigateToStep = useCallback(
47
+ /**
48
+ * Either `'previous'`, `'next'`, or step name.
49
+ */
50
+ (step) => {
51
+ if (stepsElement == null) {
52
+ return;
53
+ }
54
+ const navigateToNextStep = () => {
55
+ return createCustomEvent('m-next');
56
+ };
57
+ const navigateToPreviousStep = () => {
58
+ return createCustomEvent('m-previous');
59
+ };
60
+ let event;
61
+ switch (step) {
62
+ case 'next':
63
+ event = navigateToNextStep();
64
+ break;
65
+ case 'previous':
66
+ event = navigateToPreviousStep();
67
+ break;
68
+ default:
69
+ event = createCustomEvent('m-navigate', step);
70
+ }
71
+ stepsElement.dispatchEvent(event);
72
+ }, [stepsElement]);
73
+ const completeStep = useCallback(() => {
74
+ if (stepsElement == null) {
75
+ return;
76
+ }
77
+ const event = createCustomEvent('m-complete');
78
+ stepsElement.dispatchEvent(event);
79
+ }, [stepsElement]);
80
+ return {
81
+ elementRef: stepsElement,
82
+ registerSteps,
83
+ navigateToStep,
84
+ completeStep,
85
+ };
86
+ }
87
+
88
+ export { Steps as S, Step as a, useSteps as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadsmart/miranda-react",
3
- "version": "2.1.0",
3
+ "version": "3.0.0-alpha.2",
4
4
  "description": "React component library based on Miranda Web Components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -40,8 +40,8 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
- "@loadsmart/miranda-tokens": "3.1.0",
44
- "@loadsmart/miranda-wc": "2.1.0",
43
+ "@loadsmart/miranda-tokens": "4.0.0-alpha.2",
44
+ "@loadsmart/miranda-wc": "3.0.0-alpha.2",
45
45
  "@lit/react": "^1.0.5"
46
46
  },
47
47
  "directories": {