@stonecrop/beam 0.2.56 → 0.2.58

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.
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import ActionFooter from '@/components/ActionFooter.vue';
2
2
  import BeamArrow from '@/components/BeamArrow.vue';
3
3
  import BeamBtn from '@/components/BeamBtn.vue';
4
+ import BeamDayDivider from '@/components/BeamDayDivider.vue';
4
5
  import BeamFilter from '@/components/BeamFilter.vue';
5
6
  import BeamFilterOption from '@/components/BeamFilterOption.vue';
6
7
  import BeamHeading from '@/components/BeamHeading.vue';
@@ -30,6 +31,7 @@ function install(app /* options */) {
30
31
  app.component('ActionFooter', ActionFooter);
31
32
  app.component('BeamArrow', BeamArrow);
32
33
  app.component('BeamBtn', BeamBtn);
34
+ app.component('BeamDayDivider', BeamDayDivider);
33
35
  app.component('BeamFilter', BeamFilter);
34
36
  app.component('BeamFilterOption', BeamFilterOption);
35
37
  app.component('BeamHeading', BeamHeading);
@@ -49,4 +51,4 @@ function install(app /* options */) {
49
51
  app.component('SplitColumn', SplitColumn);
50
52
  app.component('ToggleArrow', ToggleArrow);
51
53
  }
52
- export { ActionFooter, BeamArrow, BeamBtn, BeamFilter, BeamFilterOption, BeamHeading, BeamMetadata, BeamModal, BeamModalOutlet, BeamProgress, Confirm, FixedTop, ItemCheck, ItemCount, ListAnchor, ListItem, ListView, Navbar, ScanInput, SplitColumn, ToggleArrow, install, useMqttStream, };
54
+ export { ActionFooter, BeamArrow, BeamBtn, BeamDayDivider, BeamFilter, BeamFilterOption, BeamHeading, BeamMetadata, BeamModal, BeamModalOutlet, BeamProgress, Confirm, FixedTop, ItemCheck, ItemCount, ListAnchor, ListItem, ListView, Navbar, ScanInput, SplitColumn, ToggleArrow, install, useMqttStream, };
@@ -2,6 +2,7 @@ import { App } from 'vue';
2
2
  import ActionFooter from '@/components/ActionFooter.vue';
3
3
  import BeamArrow from '@/components/BeamArrow.vue';
4
4
  import BeamBtn from '@/components/BeamBtn.vue';
5
+ import BeamDayDivider from '@/components/BeamDayDivider.vue';
5
6
  import BeamFilter from '@/components/BeamFilter.vue';
6
7
  import BeamFilterOption from '@/components/BeamFilterOption.vue';
7
8
  import BeamHeading from '@/components/BeamHeading.vue';
@@ -21,6 +22,7 @@ import ScanInput from '@/components/ScanInput.vue';
21
22
  import SplitColumn from '@/components/SplitColumn.vue';
22
23
  import ToggleArrow from '@/components/ToggleArrow.vue';
23
24
  import { useMqttStream } from '@/composables/mqtt';
25
+ export type { ListViewItem } from '@/types';
24
26
  import 'themes/beam.css';
25
27
  /**
26
28
  * Install all Beam components
@@ -28,5 +30,5 @@ import 'themes/beam.css';
28
30
  * @public
29
31
  */
30
32
  declare function install(app: App): void;
31
- export { ActionFooter, BeamArrow, BeamBtn, BeamFilter, BeamFilterOption, BeamHeading, BeamMetadata, BeamModal, BeamModalOutlet, BeamProgress, Confirm, FixedTop, ItemCheck, ItemCount, ListAnchor, ListItem, ListView, Navbar, ScanInput, SplitColumn, ToggleArrow, install, useMqttStream, };
33
+ export { ActionFooter, BeamArrow, BeamBtn, BeamDayDivider, BeamFilter, BeamFilterOption, BeamHeading, BeamMetadata, BeamModal, BeamModalOutlet, BeamProgress, Confirm, FixedTop, ItemCheck, ItemCount, ListAnchor, ListItem, ListView, Navbar, ScanInput, SplitColumn, ToggleArrow, install, useMqttStream, };
32
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,OAAO,YAAY,MAAM,+BAA+B,CAAA;AACxD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,OAAO,MAAM,0BAA0B,CAAA;AAC9C,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,gBAAgB,MAAM,mCAAmC,CAAA;AACh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ACX,WAAW,EACX,OAAO,EACP,aAAa,GACb,CAAA"}
@@ -2,13 +2,15 @@ export type ListViewItem = {
2
2
  description: string;
3
3
  label: string;
4
4
  checked?: boolean;
5
- debounce?: number;
6
- linkComponent?: string;
7
- route?: string;
8
5
  count?: {
9
6
  count: number;
10
7
  of: number;
11
8
  uom: string;
12
9
  };
10
+ date?: string;
11
+ dateFormat?: string;
12
+ debounce?: number;
13
+ linkComponent?: string;
14
+ route?: string;
13
15
  };
14
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAA;QACb,EAAE,EAAE,MAAM,CAAA;QACV,GAAG,EAAE,MAAM,CAAA;KACX,CAAA;CACD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IAEb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAA;QACb,EAAE,EAAE,MAAM,CAAA;QACV,GAAG,EAAE,MAAM,CAAA;KACX,CAAA;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/beam",
3
- "version": "0.2.56",
3
+ "version": "0.2.58",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "author": {
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <footer class="beam_action-footer">
3
3
  <span class="footer-action-wrapper">
4
- <button class="beam_btn" @click="handleFooterAction">
4
+ <BeamBtn @click="handleFooterAction">
5
5
  <slot />
6
- </button>
6
+ </BeamBtn>
7
7
  </span>
8
8
  </footer>
9
9
  </template>
@@ -15,3 +15,17 @@ const handleFooterAction = () => {
15
15
  emit('click')
16
16
  }
17
17
  </script>
18
+
19
+ <style scoped>
20
+ .beam_action-footer {
21
+ margin-left: 0;
22
+ background: linear-gradient(180deg, transparent 0%, white 100%);
23
+ color: var(--sc-primary-text-color);
24
+ position: fixed;
25
+ bottom: 0;
26
+ left: 0;
27
+ width: 100%;
28
+ padding: 0.625rem;
29
+ text-align: center;
30
+ }
31
+ </style>
@@ -3,3 +3,21 @@
3
3
  <slot>Action</slot>
4
4
  </button>
5
5
  </template>
6
+
7
+ <style scoped>
8
+ .beam_btn {
9
+ font-size: 0.875rem;
10
+ text-align: center;
11
+ padding: 0.3125rem 0.75rem;
12
+ border: 1px solid var(--sc-btn-border);
13
+ color: var(--sc-btn-label-color);
14
+ background-color: var(--sc-btn-color);
15
+ cursor: pointer;
16
+ font-family: var(--sc-font-family);
17
+
18
+ &:hover,
19
+ &:active {
20
+ background-color: var(--sc-btn-hover);
21
+ }
22
+ }
23
+ </style>
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <div class="beam_day-divider">
3
+ <h2>{{ date }}</h2>
4
+ </div>
5
+
6
+ <slot></slot>
7
+ </template>
8
+
9
+ <script setup lang="ts">
10
+ import { defineProps, computed } from 'vue'
11
+
12
+ import type { ListViewItem } from '@/types'
13
+
14
+ defineSlots<{ default(): any }>()
15
+ const { item } = defineProps<{ item: ListViewItem }>()
16
+
17
+ const date = computed(() => {
18
+ if (!item.date || isNaN(Date.parse(item.date))) {
19
+ return item.date
20
+ }
21
+
22
+ // if needed, the user can specify a Date format flag that will dictate how the output is formatted,
23
+ // defaults to toDateString(); using switch/case here in case more values wanted to be added
24
+ const dateObj = new Date(item.date)
25
+ if (item.dateFormat) {
26
+ switch (item.dateFormat.toLowerCase()) {
27
+ case 'iso':
28
+ return dateObj.toISOString()
29
+ }
30
+ }
31
+ return dateObj.toDateString()
32
+ })
33
+ </script>
34
+
35
+ <style scoped>
36
+ .beam_day-divider {
37
+ text-align: left;
38
+ padding: 1rem;
39
+ background: var(--sc-cell-changed-color);
40
+ border-bottom: 1px solid var(--sc-row-border-color);
41
+ box-sizing: border-box;
42
+ margin: 1rem 0;
43
+
44
+ & h2 {
45
+ text-align: left;
46
+ font-size: 1rem;
47
+ color: var(--sc-primary-text-color);
48
+ margin: 0;
49
+ padding: 0;
50
+ }
51
+ }
52
+
53
+ .beam_day-divider:first-of-type {
54
+ margin-top: 0;
55
+ }
56
+ </style>
@@ -3,3 +3,15 @@
3
3
  <slot></slot>
4
4
  </h1>
5
5
  </template>
6
+
7
+ <style scoped>
8
+ .beam_header {
9
+ border: 1px solid transparent;
10
+ text-align: left;
11
+ font-size: 1.125rem;
12
+ color: var(--sc-primary-text-color);
13
+ margin: 0;
14
+ padding: 0;
15
+ font-family: var(--sc-font-family);
16
+ }
17
+ </style>
@@ -36,3 +36,75 @@ defineProps<{
36
36
  }
37
37
  }>()
38
38
  </script>
39
+
40
+ <style scoped>
41
+ .beam_metadata {
42
+ /* margin:3.125rem; */
43
+ box-sizing: border-box;
44
+ border: 1px solid black;
45
+ display: flex;
46
+ flex-direction: column;
47
+ max-height: 100vh;
48
+ color: var(--sc-primary-text-color);
49
+ font-family: var(--sc-font-family);
50
+ }
51
+ .beam_metadata_content {
52
+ padding-top: 10px;
53
+ }
54
+ .beam_metadata_header {
55
+ display: flex;
56
+ flex-direction: row;
57
+ align-items: baseline;
58
+ padding: 0px 30px 0px 30px;
59
+ justify-content: space-between;
60
+ }
61
+ .beam_metadata_count {
62
+ font-size: 1.5rem;
63
+
64
+ & p {
65
+ margin: 0;
66
+ }
67
+ }
68
+ .beam_metadata_header-order-num {
69
+ font-weight: bold;
70
+ font-size: 1.5rem;
71
+ }
72
+ .beam_metadata_block {
73
+ padding: 0px 30px;
74
+ margin: 10px 0;
75
+ }
76
+
77
+ .beam_metadata_shipping {
78
+ display: flex;
79
+ flex-direction: row;
80
+ align-items: baseline;
81
+ justify-content: space-between;
82
+
83
+ & p {
84
+ line-height: 1.5rem;
85
+ }
86
+ }
87
+ @media screen and (max-width: 600px) {
88
+ .beam_metadata_shipping {
89
+ flex-direction: column;
90
+ }
91
+ }
92
+
93
+ .beam_metadata_component_header {
94
+ display: flex;
95
+ flex-direction: row;
96
+ justify-content: space-between;
97
+ align-items: baseline;
98
+ }
99
+ .beam_metadata_components {
100
+ overflow: scroll;
101
+ }
102
+ </style>
103
+ <style>
104
+ .beam_metadata_heading {
105
+ font-size: 1.125rem;
106
+ font-weight: bold;
107
+ margin: 0.625rem 0;
108
+ color: var(--sc-primary-text-color);
109
+ }
110
+ </style>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <portal to="beam_modal_outlet">
3
3
  <div class="beam_modal" v-show="showModal">
4
- <button class="beam_btn" @click="$emit('closemodal')">Close Modal</button>
4
+ <BeamBtn @click="$emit('closemodal')">Close Modal</BeamBtn>
5
5
  <slot @closemodal="$emit('closemodal')" @confirmmodal="$emit('confirmmodal')"></slot>
6
6
  </div>
7
7
  </portal>
@@ -10,3 +10,18 @@
10
10
  <script setup lang="ts">
11
11
  defineProps<{ showModal: boolean }>()
12
12
  </script>
13
+
14
+ <style scoped>
15
+ .beam_modal {
16
+ position: fixed;
17
+ top: 0;
18
+ right: 0;
19
+ bottom: 0;
20
+ left: 0;
21
+ background-color: rgba(0, 0, 0, 0.5);
22
+ backdrop-filter: blur(2px);
23
+ z-index: 1000;
24
+ text-align: center;
25
+ padding: 1.25rem;
26
+ }
27
+ </style>
@@ -1,7 +1,29 @@
1
1
  <template>
2
2
  <div class="beam_modal-confirm">
3
3
  <h2>Would you like to continue?</h2>
4
- <button class="beam_btn" @click="$emit('confirmmodal')">Yes</button>
5
- <button class="beam_btn" @click="$emit('closemodal')">No</button>
4
+ <BeamBtn @click="$emit('confirmmodal')">Yes</BeamBtn>
5
+ <BeamBtn @click="$emit('confirmmodal')">No</BeamBtn>
6
6
  </div>
7
7
  </template>
8
+
9
+ <style scoped>
10
+ .beam_modal-confirm {
11
+ background: #ffffff;
12
+ padding: 1.25rem;
13
+ width: 80%;
14
+ max-width: 400px;
15
+ position: absolute;
16
+ top: 50%;
17
+ left: 50%;
18
+ transform: translate(-50%, -50%);
19
+
20
+ & button {
21
+ margin: 0.625rem;
22
+ }
23
+ & h2 {
24
+ border-bottom: 1px solid var(--sc-row-border-color);
25
+ padding-bottom: 0.625rem;
26
+ color: var(--sc-primary-text-color);
27
+ }
28
+ }
29
+ </style>
@@ -40,3 +40,16 @@ const validate = (payload: ClipboardEvent | InputEvent | MouseEvent) => {
40
40
  const debouncedRequest = useDebounceFn((payload: InputEvent) => validate(payload), debounce)
41
41
  const debouncedValidate = async (payload: InputEvent) => await debouncedRequest(payload)
42
42
  </script>
43
+
44
+ <style scoped>
45
+ .beam_item-count {
46
+ font-size: 1.3125rem;
47
+ color: var(--sc-primary-text-color);
48
+ }
49
+
50
+ .beam_item-count span {
51
+ margin: 0;
52
+ padding: 0;
53
+ outline: none;
54
+ }
55
+ </style>
@@ -7,3 +7,11 @@
7
7
  <script setup lang="ts">
8
8
  const { to = '' } = defineProps<{ to?: string }>()
9
9
  </script>
10
+
11
+ <style scoped>
12
+ .beam_list-anchor {
13
+ text-decoration: none;
14
+ outline: none;
15
+ color: var(--sc-primary-text-color);
16
+ }
17
+ </style>
@@ -36,3 +36,50 @@ watch(
36
36
  { deep: true }
37
37
  )
38
38
  </script>
39
+
40
+ <style scoped>
41
+ .beam_list-item {
42
+ padding: 0.625rem;
43
+ border-bottom: 1px solid var(--sc-row-border-color);
44
+ max-width: 100%;
45
+ box-sizing: border-box;
46
+ display: flex;
47
+ flex-flow: row nowrap;
48
+ justify-content: space-between;
49
+ gap: 1.25rem;
50
+ cursor: pointer;
51
+ outline: 2px solid transparent;
52
+ outline-offset: -1px;
53
+
54
+ &:focus {
55
+ outline: 2px solid var(--sc-focus-cell-outline);
56
+ background-color: var(--sc-focus-cell-background);
57
+ }
58
+ }
59
+
60
+ .beam_list-text {
61
+ width: 80%;
62
+ text-overflow: ellipsis;
63
+ white-space: nowrap;
64
+ overflow: hidden;
65
+ flex-grow: 1;
66
+ font-size: 0.875rem;
67
+ color: var(--sc-primary-text-color);
68
+
69
+ & label,
70
+ & p {
71
+ overflow: hidden;
72
+ text-overflow: ellipsis;
73
+ width: 100%;
74
+ display: block;
75
+ }
76
+ }
77
+
78
+ .beam_list-item label {
79
+ display: block;
80
+ }
81
+
82
+ .beam_list-item p {
83
+ margin: 0;
84
+ }
85
+ </style>
@@ -1,11 +1,16 @@
1
1
  <template>
2
2
  <ul class="beam_list-view">
3
3
  <li v-for="item in items" :key="item.label">
4
- <template v-if="item.linkComponent">
4
+ <template v-if="item.linkComponent == 'BeamDayDivider'">
5
+ <BeamDayDivider :item="item"></BeamDayDivider>
6
+ </template>
7
+
8
+ <template v-else-if="item.linkComponent">
5
9
  <component :is="item.linkComponent" :to="item.route" tabindex="-1">
6
10
  <ListItem :item="item" @update="handleUpdate"></ListItem>
7
11
  </component>
8
12
  </template>
13
+
9
14
  <template v-else>
10
15
  <ListItem :item="item" @update="handleUpdate"></ListItem>
11
16
  </template>
@@ -16,6 +21,7 @@
16
21
  <script setup lang="ts">
17
22
  import { onMounted, onUnmounted } from 'vue'
18
23
 
24
+ import BeamDayDivider from '@/components/BeamDayDivider.vue'
19
25
  import ListItem from '@/components/ListItem.vue'
20
26
  import type { ListViewItem } from '@/types'
21
27
 
@@ -39,3 +45,18 @@ const handleScroll = () => {
39
45
  }
40
46
  }
41
47
  </script>
48
+
49
+ <style scoped>
50
+ .beam_list-view {
51
+ list-style-type: none;
52
+ margin: var(--sc-list-margin);
53
+ padding: 0;
54
+ /* padding-bottom: 2.5em; */
55
+ margin-top: 1px;
56
+ font-family: var(--sc-font-family);
57
+ }
58
+
59
+ ul.beam_list-view:last-of-type {
60
+ padding-bottom: 2.5em;
61
+ }
62
+ </style>
@@ -3,9 +3,9 @@
3
3
  <slot name="title">
4
4
  <BeamHeading>TITLE</BeamHeading>
5
5
  </slot>
6
- <button class="navbar-action beam_btn" @click="handlePrimaryAction">
6
+ <BeamBtn @click="handlePrimaryAction">
7
7
  <slot name="navbaraction">Action</slot>
8
- </button>
8
+ </BeamBtn>
9
9
  </nav>
10
10
  </template>
11
11
 
@@ -16,3 +16,27 @@ const handlePrimaryAction = () => {
16
16
  emit('click')
17
17
  }
18
18
  </script>
19
+
20
+ <style scoped>
21
+ .beam_navbar {
22
+ padding: 0.625rem;
23
+ background-color: var(--sc-primary-color);
24
+ margin-left: 0;
25
+ min-height: 2em;
26
+ max-height: 2em;
27
+ color: var(--sc-primary-text-color);
28
+ display: flex;
29
+ flex-flow: row nowrap;
30
+ align-content: center;
31
+ justify-content: space-between;
32
+ align-items: center;
33
+ position: sticky;
34
+ top: 0;
35
+ font-family: var(--sc-font-family);
36
+ border-bottom: 1px solid var(--sc-row-border-color);
37
+
38
+ & h1 {
39
+ margin-left: 0.625rem;
40
+ }
41
+ }
42
+ </style>
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@ import { App } from 'vue'
3
3
  import ActionFooter from '@/components/ActionFooter.vue'
4
4
  import BeamArrow from '@/components/BeamArrow.vue'
5
5
  import BeamBtn from '@/components/BeamBtn.vue'
6
+ import BeamDayDivider from '@/components/BeamDayDivider.vue'
6
7
  import BeamFilter from '@/components/BeamFilter.vue'
7
8
  import BeamFilterOption from '@/components/BeamFilterOption.vue'
8
9
  import BeamHeading from '@/components/BeamHeading.vue'
@@ -22,6 +23,7 @@ import ScanInput from '@/components/ScanInput.vue'
22
23
  import SplitColumn from '@/components/SplitColumn.vue'
23
24
  import ToggleArrow from '@/components/ToggleArrow.vue'
24
25
  import { useMqttStream } from '@/composables/mqtt'
26
+ export type { ListViewItem } from '@/types'
25
27
  import 'themes/beam.css'
26
28
 
27
29
  /**
@@ -33,6 +35,7 @@ function install(app: App /* options */) {
33
35
  app.component('ActionFooter', ActionFooter)
34
36
  app.component('BeamArrow', BeamArrow)
35
37
  app.component('BeamBtn', BeamBtn)
38
+ app.component('BeamDayDivider', BeamDayDivider)
36
39
  app.component('BeamFilter', BeamFilter)
37
40
  app.component('BeamFilterOption', BeamFilterOption)
38
41
  app.component('BeamHeading', BeamHeading)
@@ -57,6 +60,7 @@ export {
57
60
  ActionFooter,
58
61
  BeamArrow,
59
62
  BeamBtn,
63
+ BeamDayDivider,
60
64
  BeamFilter,
61
65
  BeamFilterOption,
62
66
  BeamHeading,
@@ -1,13 +1,16 @@
1
1
  export type ListViewItem = {
2
2
  description: string
3
3
  label: string
4
+
4
5
  checked?: boolean
5
- debounce?: number
6
- linkComponent?: string
7
- route?: string
8
6
  count?: {
9
7
  count: number
10
8
  of: number
11
9
  uom: string
12
10
  }
11
+ date?: string
12
+ dateFormat?: string
13
+ debounce?: number
14
+ linkComponent?: string
15
+ route?: string
13
16
  }