@descope/web-components-ui 3.8.0 → 3.9.1

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 (31) hide show
  1. package/dist/cjs/index.cjs.js +11887 -11084
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +6863 -6065
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/8961.js +1 -1
  6. package/dist/umd/8961.js.map +1 -1
  7. package/dist/umd/DescopeDev.js +1 -1
  8. package/dist/umd/DescopeDev.js.map +1 -1
  9. package/dist/umd/descope-anchored.js +1 -1
  10. package/dist/umd/descope-anchored.js.map +1 -1
  11. package/dist/umd/descope-attachment.js +1 -1
  12. package/dist/umd/descope-attachment.js.map +1 -1
  13. package/dist/umd/descope-multi-line-mappings.js +339 -0
  14. package/dist/umd/descope-multi-line-mappings.js.LICENSE.txt +5 -0
  15. package/dist/umd/descope-multi-line-mappings.js.map +1 -0
  16. package/dist/umd/descope-multi-select-combo-box.js +2 -0
  17. package/dist/umd/descope-multi-select-combo-box.js.map +1 -0
  18. package/dist/umd/descope-tooltip.js +1 -1
  19. package/dist/umd/descope-tooltip.js.map +1 -1
  20. package/dist/umd/index.js +1 -1
  21. package/dist/umd/index.js.map +1 -1
  22. package/package.json +36 -34
  23. package/src/index.cjs.js +1 -1
  24. package/src/index.js +0 -1
  25. package/src/theme/components/index.js +3 -1
  26. package/dist/umd/descope-multi-select-combo-box-index-js.js +0 -2
  27. package/dist/umd/descope-multi-select-combo-box-index-js.js.map +0 -1
  28. package/src/components/descope-multi-select-combo-box/MultiSelectComboBoxClass.js +0 -684
  29. package/src/components/descope-multi-select-combo-box/index.js +0 -6
  30. package/src/theme/components/multiSelectComboBox.js +0 -91
  31. package/stories/descope-multi-select-combo-box.stories.js +0 -183
@@ -1,91 +0,0 @@
1
- import globals from '../globals';
2
- import { MultiSelectComboBoxClass } from '../../components/descope-multi-select-combo-box/MultiSelectComboBoxClass';
3
- import { getThemeRefs } from '../../helpers/themeHelpers';
4
- import { refs } from './inputWrapper';
5
-
6
- const globalRefs = getThemeRefs(globals);
7
- const vars = MultiSelectComboBoxClass.cssVarList;
8
-
9
- export const multiSelectComboBox = {
10
- [vars.hostWidth]: refs.width,
11
- [vars.hostDirection]: refs.direction,
12
- [vars.fontSize]: refs.fontSize,
13
- [vars.fontFamily]: refs.fontFamily,
14
- [vars.labelFontSize]: refs.labelFontSize,
15
- [vars.labelFontWeight]: refs.labelFontWeight,
16
- [vars.inputValueFontWeight]: refs.inputValueFontWeight,
17
- [vars.inputPlaceholderFontWeight]: refs.inputPlaceholderFontWeight,
18
- [vars.helperTextFontWeight]: refs.helperTextFontWeight,
19
- [vars.errorMessageFontWeight]: refs.errorMessageFontWeight,
20
- [vars.labelTextColor]: refs.labelTextColor,
21
- [vars.errorMessageTextColor]: refs.errorMessageTextColor,
22
- [vars.inputBorderColor]: refs.borderColor,
23
- [vars.inputBorderWidth]: refs.borderWidth,
24
- [vars.inputBorderStyle]: refs.borderStyle,
25
- [vars.inputBorderRadius]: refs.borderRadius,
26
- [vars.inputOutlineColor]: refs.outlineColor,
27
- [vars.inputOutlineOffset]: refs.outlineOffset,
28
- [vars.inputOutlineWidth]: refs.outlineWidth,
29
- [vars.inputOutlineStyle]: refs.outlineStyle,
30
- [vars.labelRequiredIndicator]: refs.requiredIndicator,
31
- [vars.inputValueTextColor]: refs.valueTextColor,
32
- [vars.inputPlaceholderTextColor]: refs.placeholderTextColor,
33
- [vars.inputBackgroundColor]: refs.backgroundColor,
34
- [vars.inputHorizontalPadding]: refs.horizontalPadding,
35
- [vars.inputVerticalPadding]: refs.verticalPadding,
36
- [vars.inputHeight]: refs.inputHeight,
37
- [vars.inputDropdownButtonColor]: globalRefs.colors.surface.dark,
38
- [vars.inputDropdownButtonCursor]: 'pointer',
39
- [vars.inputDropdownButtonSize]: refs.toggleButtonSize,
40
- [vars.inputDropdownButtonOffset]: globalRefs.spacing.xs,
41
- [vars.overlayItemPaddingInlineStart]: globalRefs.spacing.xs,
42
- [vars.overlayItemPaddingInlineEnd]: globalRefs.spacing.lg,
43
- [vars.chipFontSize]: refs.chipFontSize,
44
- [vars.chipTextColor]: globalRefs.colors.surface.contrast,
45
- [vars.chipBackgroundColor]: globalRefs.colors.surface.light,
46
- [vars.labelPosition]: refs.labelPosition,
47
- [vars.labelTopPosition]: refs.labelTopPosition,
48
- [vars.labelLeftPosition]: refs.labelLeftPosition,
49
- [vars.labelHorizontalPosition]: refs.labelHorizontalPosition,
50
- [vars.inputTransformY]: refs.inputTransformY,
51
- [vars.inputTransition]: refs.inputTransition,
52
- [vars.marginInlineStart]: refs.marginInlineStart,
53
- [vars.placeholderOpacity]: refs.placeholderOpacity,
54
- [vars.inputVerticalAlignment]: refs.inputVerticalAlignment,
55
-
56
- // error message icon
57
- [vars.errorMessageIcon]: refs.errorMessageIcon,
58
- [vars.errorMessageIconSize]: refs.errorMessageIconSize,
59
- [vars.errorMessageIconPadding]: refs.errorMessageIconPadding,
60
- [vars.errorMessageIconRepeat]: refs.errorMessageIconRepeat,
61
- [vars.errorMessageIconPosition]: refs.errorMessageIconPosition,
62
- [vars.errorMessageFontSize]: refs.errorMessageFontSize,
63
-
64
- labelType: {
65
- floating: {
66
- [vars.inputHorizontalPadding]: '0.25em',
67
- _hasValue: {
68
- [vars.inputHorizontalPadding]: '0.45em',
69
- },
70
- },
71
- },
72
-
73
- _readonly: {
74
- [vars.inputDropdownButtonCursor]: 'default',
75
- },
76
-
77
- // Overlay theme exposed via the component:
78
- [vars.overlayFontSize]: refs.fontSize,
79
- [vars.overlayFontFamily]: refs.fontFamily,
80
- [vars.overlayCursor]: 'pointer',
81
- [vars.overlayItemBoxShadow]: 'none',
82
- [vars.overlayBackground]: refs.backgroundColor,
83
- [vars.overlayTextColor]: refs.valueTextColor,
84
-
85
- // Overlay direct theme:
86
- [vars.overlay.minHeight]: '400px',
87
- [vars.overlay.margin]: '0',
88
- };
89
-
90
- export default multiSelectComboBox;
91
- export { vars };
@@ -1,183 +0,0 @@
1
- import { componentName } from '../src/components/descope-multi-select-combo-box';
2
- import { toggleDefaultErrorMessageValueMissingDecorator, withForm } from './helpers';
3
- import {
4
- labelControl,
5
- placeholderControl,
6
- sizeControl,
7
- fullWidthControl,
8
- directionControl,
9
- disabledControl,
10
- minItemsSelectionControl,
11
- maxItemsSelectionControl,
12
- readOnlyControl,
13
- requiredControl,
14
- borderedControl,
15
- errorMissingValueControl,
16
- overrideRenderItemControl,
17
- itemsSourceControl,
18
- inputLabelTypeControl,
19
- errorPatternMismatchControl,
20
- errorMessageIconControl,
21
- errorMessageIconAttrs,
22
- defaultValueMissingControl,
23
- } from './commonControls';
24
-
25
- const altRenderItem = ({ displayName, label, value }) =>
26
- `<span data-name="${displayName}" data-id="${value}">${label}</span>`;
27
-
28
- const Template = ({
29
- 'allow-custom-value': allowCustomValue,
30
- label,
31
- placeholder,
32
- size,
33
- bordered,
34
- 'full-width': fullWidth,
35
- readonly,
36
- required,
37
- direction,
38
- disabled,
39
- data,
40
- overrideRenderItem,
41
- itemsSource,
42
- minItemsSelection,
43
- maxItemsSelection,
44
- pattern,
45
- 'default-values': defaultValues,
46
- 'data-errormessage-value-missing': customErrorMissingValue,
47
- 'data-errormessage-pattern-mismatch': customErrorPatternMismatch,
48
- 'ignore-data': ignoreData,
49
- 'label-type': labelType,
50
- errorMsgIcon,
51
- }) => {
52
- let serializedData;
53
- let serializedDefaultValues;
54
-
55
- try {
56
- serializedData = JSON.stringify(data);
57
- serializedDefaultValues = JSON.stringify(defaultValues);
58
- } catch (e) {
59
- // do nothing
60
- }
61
-
62
- if (ignoreData) {
63
- serializedData = '[]';
64
- }
65
-
66
- return `
67
- <descope-multi-select-combo-box
68
- clear-button-visible
69
- data='${(itemsSource === 'attr' && serializedData) || ''}'
70
- size="${size}"
71
- bordered="${bordered}"
72
- item-label-path="data-name"
73
- item-value-path="data-id"
74
- label="${label || ''}"
75
- placeholder="${placeholder || ''}"
76
- default-values='${serializedDefaultValues || ''}'
77
- required="${required || false}"
78
- full-width="${fullWidth || false}"
79
- readonly="${readonly || false}"
80
- disabled="${disabled || false}"
81
- data-errormessage-value-missing="${customErrorMissingValue || ''}"
82
- data-errormessage-pattern-mismatch="${customErrorPatternMismatch || ''}"
83
- st-host-direction="${direction ?? ''}"
84
- allow-custom-value="${allowCustomValue || false}"
85
- min-items-selection="${minItemsSelection || ''}"
86
- max-items-selection="${maxItemsSelection || ''}"
87
- label-type="${labelType || ''}"
88
- pattern="${pattern || ''}"
89
- ${errorMsgIcon ? errorMessageIconAttrs : ''}
90
- >
91
- ${
92
- itemsSource === 'children' &&
93
- `
94
- <span data-name="ItemName1" data-id="itemId1">Trojan War Heroes' Valor</span>
95
- <span data-name="ItemName2" data-id="itemId2">Achilles' Fateful Wrath</span>
96
- <span data-name="ItemName3" data-id="itemId3">Epic Battle of Gods</span>
97
- <span data-name="ItemName4" data-id="itemId4">Hector's Brave Sacrifice</span>
98
- <span data-name="ItemName5" data-id="itemId5">Trojan Horse Deception</span>
99
- <span data-name="ItemName6" data-id="itemId6">Agamemnon's Royal Command</span>
100
- <span data-name="ItemName7" data-id="itemId7">Odysseus' Cunning Strategy</span>
101
- <span data-name="ItemName8" data-id="itemId8">Helen's Beauty's Curse</span>
102
- <span data-name="ItemName9" data-id="itemId9">Achilles' Heel Weakness</span>
103
- <span data-name="ItemName10" data-id="itemId10">Epic Poem of Ancient</span>
104
- `
105
- }
106
- </descope-multi-select-combo-box>
107
- `;
108
- };
109
-
110
- const allowCustomValueControl = {
111
- 'allow-custom-value': {
112
- name: 'Allow Custom Values',
113
- control: { type: 'boolean' },
114
- },
115
- };
116
-
117
- export default {
118
- component: componentName,
119
- title: 'descope-multi-select-combo-box',
120
- decorators: [
121
- (story, { args }) => {
122
- setTimeout(() => {
123
- const ele = document.querySelector('descope-multi-select-combo-box');
124
- if (args.itemsSource === 'prop') {
125
- ele.data = args.data;
126
- }
127
- if (args.overrideRenderItem) {
128
- ele.renderItem = altRenderItem;
129
- }
130
- });
131
- return story();
132
- },
133
- toggleDefaultErrorMessageValueMissingDecorator,
134
- withForm,
135
- ],
136
- argTypes: {
137
- ...labelControl,
138
- ...placeholderControl,
139
- ...inputLabelTypeControl,
140
- ...sizeControl,
141
- ...fullWidthControl,
142
- ...disabledControl,
143
- ...readOnlyControl,
144
- ...requiredControl,
145
- ...borderedControl,
146
- ...errorMissingValueControl,
147
- ...errorPatternMismatchControl,
148
- ...overrideRenderItemControl,
149
- ...itemsSourceControl,
150
- ...allowCustomValueControl,
151
- ...minItemsSelectionControl,
152
- ...maxItemsSelectionControl,
153
- ...directionControl,
154
- ...errorMessageIconControl,
155
- ...defaultValueMissingControl,
156
- 'default-values': {
157
- name: 'Default Values',
158
- control: { type: 'object' },
159
- },
160
- // Control used to ignore the default data values, required for testing specific behavior
161
- 'ignore-data': {
162
- name: 'Ignore Data Value',
163
- control: { type: 'boolean' },
164
- },
165
- },
166
- };
167
-
168
- export const Default = Template.bind({});
169
-
170
- Default.args = {
171
- size: 'md',
172
- bordered: true,
173
- itemsSource: 'children',
174
- data: [
175
- { displayName: 'Item1', value: '1', label: 'data item 1' },
176
- { displayName: 'Item2', value: 'itemId2', label: 'data item 2' },
177
- { displayName: 'Item3', value: '3', label: 'data item 3' },
178
- { displayName: 'Item4', value: '4', label: 'data item 4' },
179
- ],
180
- pattern: '',
181
- 'data-errormessage-value-missing': 'Please fill out this field.',
182
- 'data-errormessage-pattern-mismatch': 'Please match the requested format.',
183
- };