@dialpad/dialtone-vue 2.57.1 → 2.58.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.58.0](https://github.com/dialpad/dialtone-vue/compare/v2.57.1...v2.58.0) (2023-02-17)
2
+
3
+
4
+ ### Features
5
+
6
+ * **Stack:** new stack component ([#758](https://github.com/dialpad/dialtone-vue/issues/758)) ([7e8e78a](https://github.com/dialpad/dialtone-vue/commit/7e8e78ae5e884ce0d1bb79a61ee5417f04ec4086))
7
+
8
+ # [2.58.0](https://github.com/dialpad/dialtone-vue/compare/v2.57.1...v2.58.0) (2023-02-17)
9
+
10
+
11
+ ### Features
12
+
13
+ * **Stack:** new stack component ([#758](https://github.com/dialpad/dialtone-vue/issues/758)) ([7e8e78a](https://github.com/dialpad/dialtone-vue/commit/7e8e78ae5e884ce0d1bb79a61ee5417f04ec4086))
14
+
1
15
  ## [2.57.1](https://github.com/dialpad/dialtone-vue/compare/v2.57.0...v2.57.1) (2023-02-15)
2
16
 
3
17
 
@@ -2248,6 +2248,7 @@ __webpack_require__.d(__webpack_exports__, {
2248
2248
  "DtSkeletonParagraph": () => (/* reexport */ skeleton_paragraph),
2249
2249
  "DtSkeletonShape": () => (/* reexport */ skeleton_shape),
2250
2250
  "DtSkeletonText": () => (/* reexport */ skeleton_text),
2251
+ "DtStack": () => (/* reexport */ stack),
2251
2252
  "DtTab": () => (/* reexport */ tab),
2252
2253
  "DtTabGroup": () => (/* reexport */ tab_group),
2253
2254
  "DtTabPanel": () => (/* reexport */ tab_panel),
@@ -20623,6 +20624,179 @@ var root_layout_component = normalizeComponent(
20623
20624
  ;// CONCATENATED MODULE: ./components/root_layout/index.js
20624
20625
 
20625
20626
 
20627
+ ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/stack/stack.vue?vue&type=template&id=ec7d952a&
20628
+ var stackvue_type_template_id_ec7d952a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.as,{tag:"component",class:[
20629
+ 'd-stack',
20630
+ _vm.defaultDirection,
20631
+ _vm.stackResponsive,
20632
+ _vm.stackGap ]},[_vm._t("default")],2)}
20633
+ var stackvue_type_template_id_ec7d952a_staticRenderFns = []
20634
+
20635
+
20636
+ ;// CONCATENATED MODULE: ./components/stack/stack_constants.js
20637
+ const DT_STACK_DIRECTION = {
20638
+ default: 'column',
20639
+ column: 'column',
20640
+ row: 'row',
20641
+ 'row-reverse': 'row-reverse',
20642
+ 'column-reverse': 'column-reverse'
20643
+ };
20644
+ const DT_STACK_RESPONSIVE_BREAKPOINTS = ['sm', 'md', 'lg', 'xl'];
20645
+ const DT_STACK_GAP = ['0', '100', '200', '300', '400', '500', '600'];
20646
+ ;// CONCATENATED MODULE: ./components/stack/utils.js
20647
+
20648
+
20649
+ function _isDefaultDirection(direction) {
20650
+ return direction === DT_STACK_DIRECTION["default"];
20651
+ }
20652
+
20653
+ function _getValidDirection(direction) {
20654
+ if (directionPropType(direction) === 'string') {
20655
+ return !_isDefaultDirection(direction) ? DT_STACK_DIRECTION[direction] : null;
20656
+ } else if (directionPropType(direction) === 'object') {
20657
+ const {
20658
+ default: defaultStyle
20659
+ } = direction;
20660
+ return !_isDefaultDirection(defaultStyle) ? DT_STACK_DIRECTION[defaultStyle] : null;
20661
+ } else {
20662
+ return null;
20663
+ }
20664
+ }
20665
+
20666
+ function directionPropType(value) {
20667
+ return typeof value;
20668
+ }
20669
+ function getDefaultDirectionClass(direction) {
20670
+ return _getValidDirection(direction) ? `d-stack--${DT_STACK_DIRECTION[_getValidDirection(direction)]}` : null;
20671
+ }
20672
+ function getResponsiveClasses(direction) {
20673
+ if (directionPropType(direction) === 'object') {
20674
+ return [...DT_STACK_RESPONSIVE_BREAKPOINTS.map(breakpoint => {
20675
+ return direction[breakpoint] ? `d-stack--${breakpoint}--${direction[breakpoint]}` : null;
20676
+ })];
20677
+ } else {
20678
+ return null;
20679
+ }
20680
+ }
20681
+ function getGapClass(gap) {
20682
+ return DT_STACK_GAP.includes(gap) ? `d-stack--gap-${gap}` : null;
20683
+ }
20684
+ ;// CONCATENATED MODULE: ./components/stack/validators.js
20685
+
20686
+
20687
+ function directionValidator(direction) {
20688
+ if (directionPropType(direction) === 'string') {
20689
+ return Object.keys(DT_STACK_DIRECTION).includes(direction);
20690
+ } else if (directionPropType(direction) === 'object') {
20691
+ const {
20692
+ default: defaultStyle
20693
+ } = direction;
20694
+ return Object.keys(DT_STACK_DIRECTION).includes(defaultStyle);
20695
+ } else {
20696
+ return null;
20697
+ }
20698
+ }
20699
+ function gapValidator(gap) {
20700
+ return DT_STACK_GAP.includes(gap);
20701
+ }
20702
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/stack/stack.vue?vue&type=script&lang=js&
20703
+ //
20704
+ //
20705
+ //
20706
+ //
20707
+ //
20708
+ //
20709
+ //
20710
+ //
20711
+ //
20712
+ //
20713
+ //
20714
+ //
20715
+ //
20716
+ //
20717
+ //
20718
+
20719
+
20720
+
20721
+ /* harmony default export */ const stackvue_type_script_lang_js_ = ({
20722
+ name: 'DtStack',
20723
+ props: {
20724
+ /**
20725
+ * Set this prop to the direction to stack the items.
20726
+ * You can override the default direction with 'default' key.
20727
+ * All the undefined breakpoints will have 'default' value
20728
+ */
20729
+ direction: {
20730
+ type: [String, Object],
20731
+ default: 'column',
20732
+ validator: direction => directionValidator(direction)
20733
+ },
20734
+
20735
+ /**
20736
+ * Set this prop to render stack as a specific HTML element.
20737
+ */
20738
+ as: {
20739
+ type: String,
20740
+ default: 'div'
20741
+ },
20742
+
20743
+ /**
20744
+ * Set this prop to have the space between each stack item
20745
+ */
20746
+ gap: {
20747
+ type: String,
20748
+ default: '0',
20749
+ validator: gap => gapValidator(gap)
20750
+ }
20751
+ },
20752
+
20753
+ data() {
20754
+ return {
20755
+ DT_STACK_DIRECTION: DT_STACK_DIRECTION,
20756
+ DT_STACK_GAP: DT_STACK_GAP,
20757
+ DT_STACK_RESPONSIVE_BREAKPOINTS: DT_STACK_RESPONSIVE_BREAKPOINTS
20758
+ };
20759
+ },
20760
+
20761
+ computed: {
20762
+ stackGap() {
20763
+ return getGapClass(this.gap);
20764
+ },
20765
+
20766
+ defaultDirection() {
20767
+ return getDefaultDirectionClass(this.direction);
20768
+ },
20769
+
20770
+ stackResponsive() {
20771
+ return getResponsiveClasses(this.direction);
20772
+ }
20773
+
20774
+ }
20775
+ });
20776
+ ;// CONCATENATED MODULE: ./components/stack/stack.vue?vue&type=script&lang=js&
20777
+ /* harmony default export */ const stack_stackvue_type_script_lang_js_ = (stackvue_type_script_lang_js_);
20778
+ ;// CONCATENATED MODULE: ./components/stack/stack.vue
20779
+
20780
+
20781
+
20782
+
20783
+
20784
+ /* normalize component */
20785
+ ;
20786
+ var stack_component = normalizeComponent(
20787
+ stack_stackvue_type_script_lang_js_,
20788
+ stackvue_type_template_id_ec7d952a_render,
20789
+ stackvue_type_template_id_ec7d952a_staticRenderFns,
20790
+ false,
20791
+ null,
20792
+ null,
20793
+ null
20794
+
20795
+ )
20796
+
20797
+ /* harmony default export */ const stack = (stack_component.exports);
20798
+ ;// CONCATENATED MODULE: ./components/stack/index.js
20799
+
20626
20800
  ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue?vue&type=template&id=8075a3ae&
20627
20801
  var combobox_with_popovervue_type_template_id_8075a3ae_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-combobox',_vm._g({ref:"combobox",attrs:{"loading":_vm.loading,"label":_vm.label,"label-visible":_vm.labelVisible,"size":_vm.size,"description":_vm.description,"empty-list":_vm.emptyList,"empty-state-message":_vm.emptyStateMessage,"show-list":_vm.isListShown,"on-beginning-of-list":_vm.onBeginningOfList,"on-end-of-list":_vm.onEndOfList,"list-rendered-outside":true,"list-id":_vm.listId,"data-qa":"dt-combobox"},scopedSlots:_vm._u([{key:"input",fn:function(ref){
20628
20802
  var inputProps = ref.inputProps;
@@ -23063,6 +23237,7 @@ var grouped_chip_component = normalizeComponent(
23063
23237
 
23064
23238
 
23065
23239
 
23240
+
23066
23241
 
23067
23242
 
23068
23243
  /// Recipes
@@ -2258,6 +2258,7 @@ __webpack_require__.d(__webpack_exports__, {
2258
2258
  "DtSkeletonParagraph": () => (/* reexport */ skeleton_paragraph),
2259
2259
  "DtSkeletonShape": () => (/* reexport */ skeleton_shape),
2260
2260
  "DtSkeletonText": () => (/* reexport */ skeleton_text),
2261
+ "DtStack": () => (/* reexport */ stack),
2261
2262
  "DtTab": () => (/* reexport */ tab),
2262
2263
  "DtTabGroup": () => (/* reexport */ tab_group),
2263
2264
  "DtTabPanel": () => (/* reexport */ tab_panel),
@@ -20633,6 +20634,179 @@ var root_layout_component = normalizeComponent(
20633
20634
  ;// CONCATENATED MODULE: ./components/root_layout/index.js
20634
20635
 
20635
20636
 
20637
+ ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/stack/stack.vue?vue&type=template&id=ec7d952a&
20638
+ var stackvue_type_template_id_ec7d952a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.as,{tag:"component",class:[
20639
+ 'd-stack',
20640
+ _vm.defaultDirection,
20641
+ _vm.stackResponsive,
20642
+ _vm.stackGap ]},[_vm._t("default")],2)}
20643
+ var stackvue_type_template_id_ec7d952a_staticRenderFns = []
20644
+
20645
+
20646
+ ;// CONCATENATED MODULE: ./components/stack/stack_constants.js
20647
+ const DT_STACK_DIRECTION = {
20648
+ default: 'column',
20649
+ column: 'column',
20650
+ row: 'row',
20651
+ 'row-reverse': 'row-reverse',
20652
+ 'column-reverse': 'column-reverse'
20653
+ };
20654
+ const DT_STACK_RESPONSIVE_BREAKPOINTS = ['sm', 'md', 'lg', 'xl'];
20655
+ const DT_STACK_GAP = ['0', '100', '200', '300', '400', '500', '600'];
20656
+ ;// CONCATENATED MODULE: ./components/stack/utils.js
20657
+
20658
+
20659
+ function _isDefaultDirection(direction) {
20660
+ return direction === DT_STACK_DIRECTION["default"];
20661
+ }
20662
+
20663
+ function _getValidDirection(direction) {
20664
+ if (directionPropType(direction) === 'string') {
20665
+ return !_isDefaultDirection(direction) ? DT_STACK_DIRECTION[direction] : null;
20666
+ } else if (directionPropType(direction) === 'object') {
20667
+ const {
20668
+ default: defaultStyle
20669
+ } = direction;
20670
+ return !_isDefaultDirection(defaultStyle) ? DT_STACK_DIRECTION[defaultStyle] : null;
20671
+ } else {
20672
+ return null;
20673
+ }
20674
+ }
20675
+
20676
+ function directionPropType(value) {
20677
+ return typeof value;
20678
+ }
20679
+ function getDefaultDirectionClass(direction) {
20680
+ return _getValidDirection(direction) ? `d-stack--${DT_STACK_DIRECTION[_getValidDirection(direction)]}` : null;
20681
+ }
20682
+ function getResponsiveClasses(direction) {
20683
+ if (directionPropType(direction) === 'object') {
20684
+ return [...DT_STACK_RESPONSIVE_BREAKPOINTS.map(breakpoint => {
20685
+ return direction[breakpoint] ? `d-stack--${breakpoint}--${direction[breakpoint]}` : null;
20686
+ })];
20687
+ } else {
20688
+ return null;
20689
+ }
20690
+ }
20691
+ function getGapClass(gap) {
20692
+ return DT_STACK_GAP.includes(gap) ? `d-stack--gap-${gap}` : null;
20693
+ }
20694
+ ;// CONCATENATED MODULE: ./components/stack/validators.js
20695
+
20696
+
20697
+ function directionValidator(direction) {
20698
+ if (directionPropType(direction) === 'string') {
20699
+ return Object.keys(DT_STACK_DIRECTION).includes(direction);
20700
+ } else if (directionPropType(direction) === 'object') {
20701
+ const {
20702
+ default: defaultStyle
20703
+ } = direction;
20704
+ return Object.keys(DT_STACK_DIRECTION).includes(defaultStyle);
20705
+ } else {
20706
+ return null;
20707
+ }
20708
+ }
20709
+ function gapValidator(gap) {
20710
+ return DT_STACK_GAP.includes(gap);
20711
+ }
20712
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-80[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/stack/stack.vue?vue&type=script&lang=js&
20713
+ //
20714
+ //
20715
+ //
20716
+ //
20717
+ //
20718
+ //
20719
+ //
20720
+ //
20721
+ //
20722
+ //
20723
+ //
20724
+ //
20725
+ //
20726
+ //
20727
+ //
20728
+
20729
+
20730
+
20731
+ /* harmony default export */ const stackvue_type_script_lang_js_ = ({
20732
+ name: 'DtStack',
20733
+ props: {
20734
+ /**
20735
+ * Set this prop to the direction to stack the items.
20736
+ * You can override the default direction with 'default' key.
20737
+ * All the undefined breakpoints will have 'default' value
20738
+ */
20739
+ direction: {
20740
+ type: [String, Object],
20741
+ default: 'column',
20742
+ validator: direction => directionValidator(direction)
20743
+ },
20744
+
20745
+ /**
20746
+ * Set this prop to render stack as a specific HTML element.
20747
+ */
20748
+ as: {
20749
+ type: String,
20750
+ default: 'div'
20751
+ },
20752
+
20753
+ /**
20754
+ * Set this prop to have the space between each stack item
20755
+ */
20756
+ gap: {
20757
+ type: String,
20758
+ default: '0',
20759
+ validator: gap => gapValidator(gap)
20760
+ }
20761
+ },
20762
+
20763
+ data() {
20764
+ return {
20765
+ DT_STACK_DIRECTION: DT_STACK_DIRECTION,
20766
+ DT_STACK_GAP: DT_STACK_GAP,
20767
+ DT_STACK_RESPONSIVE_BREAKPOINTS: DT_STACK_RESPONSIVE_BREAKPOINTS
20768
+ };
20769
+ },
20770
+
20771
+ computed: {
20772
+ stackGap() {
20773
+ return getGapClass(this.gap);
20774
+ },
20775
+
20776
+ defaultDirection() {
20777
+ return getDefaultDirectionClass(this.direction);
20778
+ },
20779
+
20780
+ stackResponsive() {
20781
+ return getResponsiveClasses(this.direction);
20782
+ }
20783
+
20784
+ }
20785
+ });
20786
+ ;// CONCATENATED MODULE: ./components/stack/stack.vue?vue&type=script&lang=js&
20787
+ /* harmony default export */ const stack_stackvue_type_script_lang_js_ = (stackvue_type_script_lang_js_);
20788
+ ;// CONCATENATED MODULE: ./components/stack/stack.vue
20789
+
20790
+
20791
+
20792
+
20793
+
20794
+ /* normalize component */
20795
+ ;
20796
+ var stack_component = normalizeComponent(
20797
+ stack_stackvue_type_script_lang_js_,
20798
+ stackvue_type_template_id_ec7d952a_render,
20799
+ stackvue_type_template_id_ec7d952a_staticRenderFns,
20800
+ false,
20801
+ null,
20802
+ null,
20803
+ null
20804
+
20805
+ )
20806
+
20807
+ /* harmony default export */ const stack = (stack_component.exports);
20808
+ ;// CONCATENATED MODULE: ./components/stack/index.js
20809
+
20636
20810
  ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue?vue&type=template&id=8075a3ae&
20637
20811
  var combobox_with_popovervue_type_template_id_8075a3ae_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-combobox',_vm._g({ref:"combobox",attrs:{"loading":_vm.loading,"label":_vm.label,"label-visible":_vm.labelVisible,"size":_vm.size,"description":_vm.description,"empty-list":_vm.emptyList,"empty-state-message":_vm.emptyStateMessage,"show-list":_vm.isListShown,"on-beginning-of-list":_vm.onBeginningOfList,"on-end-of-list":_vm.onEndOfList,"list-rendered-outside":true,"list-id":_vm.listId,"data-qa":"dt-combobox"},scopedSlots:_vm._u([{key:"input",fn:function(ref){
20638
20812
  var inputProps = ref.inputProps;
@@ -23073,6 +23247,7 @@ var grouped_chip_component = normalizeComponent(
23073
23247
 
23074
23248
 
23075
23249
 
23250
+
23076
23251
 
23077
23252
 
23078
23253
  /// Recipes