@semcore/select 17.3.0-prerelease.0 → 17.4.0-prerelease.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 +7 -1
- package/lib/cjs/InputSearch.js +6 -6
- package/lib/cjs/Select.js +8 -8
- package/lib/cjs/components/AutoSuggest/AutoSuggest.js +506 -0
- package/lib/cjs/components/AutoSuggest/AutoSuggest.js.map +1 -0
- package/lib/cjs/components/AutoSuggest/AutoSuggest.type.js +2 -0
- package/lib/cjs/components/AutoSuggest/AutoSuggest.type.js.map +1 -0
- package/lib/cjs/components/AutoSuggest/Highlight.js +49 -0
- package/lib/cjs/components/AutoSuggest/Highlight.js.map +1 -0
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +9 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/en.json +2 -1
- package/lib/es6/InputSearch.js +6 -6
- package/lib/es6/Select.js +8 -8
- package/lib/es6/components/AutoSuggest/AutoSuggest.js +504 -0
- package/lib/es6/components/AutoSuggest/AutoSuggest.js.map +1 -0
- package/lib/es6/components/AutoSuggest/AutoSuggest.type.js +2 -0
- package/lib/es6/components/AutoSuggest/AutoSuggest.type.js.map +1 -0
- package/lib/es6/components/AutoSuggest/Highlight.js +42 -0
- package/lib/es6/components/AutoSuggest/Highlight.js.map +1 -0
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/index.js +1 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/en.json +2 -1
- package/lib/esm/InputSearch.mjs +7 -7
- package/lib/esm/Select.mjs +9 -9
- package/lib/esm/components/AutoSuggest/AutoSuggest.mjs +500 -0
- package/lib/esm/components/AutoSuggest/Highlight.mjs +44 -0
- package/lib/esm/index.mjs +2 -0
- package/lib/esm/translations/en.json.mjs +2 -1
- package/lib/types/components/AutoSuggest/AutoSuggest.d.ts +2 -0
- package/lib/types/components/AutoSuggest/AutoSuggest.type.d.ts +126 -0
- package/lib/types/components/AutoSuggest/Highlight.d.ts +7 -0
- package/lib/types/index.d.ts +6 -3
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +87 -0
- package/package.json +15 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoSuggest.type.js","names":[],"sources":["../../../../src/components/AutoSuggest/AutoSuggest.type.ts"],"sourcesContent":["import type { NeighborItemProps } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type Dropdown from '@semcore/dropdown';\nimport type { DropdownTriggerProps } from '@semcore/dropdown';\nimport type { InputValueProps, InputProps } from '@semcore/input';\nimport type Input from '@semcore/input';\nimport type React from 'react';\n\nimport type Select from '../../index';\n\ndeclare namespace NSAutoSuggest {\n type Suggestion = string;\n\n type Props = InputValueProps & {\n /**\n * List of suggestions or async function to load suggestions.\n */\n suggestions: Suggestion[] | ((value: string, signal: AbortSignal) => Promise<Suggestion[]>);\n /**\n * Placeholder in popper for init state.\n * Set an empty string to hide init state.\n */\n statusItemPlaceholder?: string;\n /** Tag for the left Addon */\n addonLeft?: React.ElementType;\n /** Tag for the right Addon */\n addonRight?: React.ElementType;\n };\n\n type State = {\n isVisible: boolean;\n highlightedIndex: number;\n suggestions: Suggestion[];\n openOnChanges: boolean;\n isLoading: boolean;\n };\n\n type DefaultProps = {\n defaultValue: string;\n placeholder: string;\n children: React.ReactNode;\n };\n\n type Handlers = {\n value: null;\n };\n\n namespace Trigger {\n type Props = {};\n\n type InnerProps = {\n 'tag': typeof Input;\n 'onFocus': () => void;\n 'onBlur': () => void;\n 'aria-haspopup': 'listbox';\n 'aria-expanded': 'true' | 'false';\n 'aria-controls': string;\n 'addonLeft'?: React.ElementType;\n 'addonRight'?: React.ElementType;\n 'isLoading': NSAutoSuggest.State['isLoading'];\n 'size': NSAutoSuggest.Props['size'];\n 'getI18nText': (str: string) => string;\n 'neighborLocation': NeighborItemProps['neighborLocation'];\n };\n\n namespace Value {\n type Props = {};\n\n type InnerProps = {\n id: string;\n neighborLocation: NeighborItemProps['neighborLocation'];\n value: string;\n role: 'combobox';\n onChange: (value: string, e: React.SyntheticEvent) => void;\n onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n autoComplete: 'off';\n ref?: React.Ref<any>;\n };\n\n type Component = Intergalactic.Component<typeof Input.Value, Props>;\n }\n\n type Component = Intergalactic.Component<typeof Dropdown.Trigger & typeof Input, DropdownTriggerProps & InputProps> & {\n Value: Value.Component;\n };\n }\n namespace Popper {\n type Props = {};\n\n type InnerProps = {\n 'aria-labelledby': string;\n 'ref': React.RefObject<HTMLElement>;\n };\n\n namespace LoadingState {\n type InnerProps = {\n isLoading: boolean;\n };\n\n type Component = Intergalactic.Component<typeof Dropdown.StatusItem>;\n }\n namespace StartTypingState {\n type InnerProps = {\n isLoading: boolean;\n isStartTypingState: boolean;\n children: string;\n };\n\n type Component = Intergalactic.Component<typeof Dropdown.StatusItem>;\n }\n namespace List {\n type InnerProps = {\n 'value': string;\n 'isLoading': boolean;\n 'suggestions': Suggestion[];\n 'isStartTypingState': boolean;\n 'aria-label': string;\n };\n\n type Component = Intergalactic.Component<typeof Select.List>;\n }\n namespace SuggestionItem {\n type InnerProps = {\n value: Suggestion;\n selected: false;\n onClick: (e: React.SyntheticEvent) => void;\n children: React.ReactNode;\n };\n\n type Component = Intergalactic.Component<typeof Dropdown.StatusItem>;\n }\n\n type Component = Intergalactic.Component<typeof Select.Popper, Props> & {\n LoadingState: LoadingState.Component;\n StartTypingState: StartTypingState.Component;\n List: List.Component;\n SuggestionItem: SuggestionItem.Component;\n };\n }\n\n type Component = Intergalactic.Component<typeof Input, Props> & {\n Trigger: Trigger.Component;\n Popper: Popper.Component;\n };\n}\n\nexport {\n NSAutoSuggest,\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Highlight = Highlight;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
function Highlight({
|
|
10
|
+
highlight,
|
|
11
|
+
children
|
|
12
|
+
}) {
|
|
13
|
+
const ref = _react.default.useRef(null);
|
|
14
|
+
_react.default.useEffect(() => {
|
|
15
|
+
const child = document.createElement('span');
|
|
16
|
+
if (highlight) {
|
|
17
|
+
const regexp = new RegExp(RegExp.escape(highlight.toLowerCase()), 'ig');
|
|
18
|
+
const results = [...children.matchAll(regexp)];
|
|
19
|
+
let cursor = 0;
|
|
20
|
+
for (const result of results) {
|
|
21
|
+
const foundStr = result[0];
|
|
22
|
+
const index = result.index;
|
|
23
|
+
const before = children.slice(cursor, index);
|
|
24
|
+
const bold = children.slice(index, index + foundStr.length);
|
|
25
|
+
cursor = index + foundStr.length;
|
|
26
|
+
const beforeNode = document.createTextNode(before);
|
|
27
|
+
const boldNode = document.createElement('strong');
|
|
28
|
+
boldNode.textContent = bold;
|
|
29
|
+
child.appendChild(beforeNode);
|
|
30
|
+
child.appendChild(boldNode);
|
|
31
|
+
}
|
|
32
|
+
if (cursor < children.length) {
|
|
33
|
+
const after = children.slice(cursor);
|
|
34
|
+
const afterNode = document.createTextNode(after);
|
|
35
|
+
child.appendChild(afterNode);
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
child.textContent = children;
|
|
39
|
+
}
|
|
40
|
+
ref.current?.appendChild(child);
|
|
41
|
+
return () => {
|
|
42
|
+
child.remove();
|
|
43
|
+
};
|
|
44
|
+
}, [highlight, children]);
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
46
|
+
ref: ref
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=Highlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Highlight.js","names":["_react","_interopRequireDefault","require","Highlight","highlight","children","ref","React","useRef","useEffect","child","document","createElement","regexp","RegExp","escape","toLowerCase","results","matchAll","cursor","result","foundStr","index","before","slice","bold","length","beforeNode","createTextNode","boldNode","textContent","appendChild","after","afterNode","current","remove","default"],"sources":["../../../../src/components/AutoSuggest/Highlight.tsx"],"sourcesContent":["import React from 'react';\n\ntype HighlightProps = {\n highlight: string;\n children: string;\n};\n\nexport function Highlight({ highlight, children }: HighlightProps) {\n const ref = React.useRef<HTMLSpanElement | null>(null);\n\n React.useEffect(() => {\n const child = document.createElement('span');\n\n if (highlight) {\n const regexp = new RegExp(RegExp.escape(highlight.toLowerCase()), 'ig');\n const results = [...children.matchAll(regexp)];\n\n let cursor = 0;\n\n for (const result of results) {\n const foundStr = result[0];\n const index = result.index;\n\n const before = children.slice(cursor, index);\n const bold = children.slice(index, index + foundStr.length);\n\n cursor = index + foundStr.length;\n\n const beforeNode = document.createTextNode(before);\n const boldNode = document.createElement('strong');\n boldNode.textContent = bold;\n\n child.appendChild(beforeNode);\n child.appendChild(boldNode);\n }\n\n if (cursor < children.length) {\n const after = children.slice(cursor);\n const afterNode = document.createTextNode(after);\n child.appendChild(afterNode);\n }\n } else {\n child.textContent = children;\n }\n\n ref.current?.appendChild(child);\n\n return () => {\n child.remove();\n };\n }, [highlight, children]);\n\n return <span ref={ref} />;\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAOO,SAASC,SAASA,CAAC;EAAEC,SAAS;EAAEC;AAAyB,CAAC,EAAE;EACjE,MAAMC,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAyB,IAAI,CAAC;EAEtDD,cAAK,CAACE,SAAS,CAAC,MAAM;IACpB,MAAMC,KAAK,GAAGC,QAAQ,CAACC,aAAa,CAAC,MAAM,CAAC;IAE5C,IAAIR,SAAS,EAAE;MACb,MAAMS,MAAM,GAAG,IAAIC,MAAM,CAACA,MAAM,CAACC,MAAM,CAACX,SAAS,CAACY,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC;MACvE,MAAMC,OAAO,GAAG,CAAC,GAAGZ,QAAQ,CAACa,QAAQ,CAACL,MAAM,CAAC,CAAC;MAE9C,IAAIM,MAAM,GAAG,CAAC;MAEd,KAAK,MAAMC,MAAM,IAAIH,OAAO,EAAE;QAC5B,MAAMI,QAAQ,GAAGD,MAAM,CAAC,CAAC,CAAC;QAC1B,MAAME,KAAK,GAAGF,MAAM,CAACE,KAAK;QAE1B,MAAMC,MAAM,GAAGlB,QAAQ,CAACmB,KAAK,CAACL,MAAM,EAAEG,KAAK,CAAC;QAC5C,MAAMG,IAAI,GAAGpB,QAAQ,CAACmB,KAAK,CAACF,KAAK,EAAEA,KAAK,GAAGD,QAAQ,CAACK,MAAM,CAAC;QAE3DP,MAAM,GAAGG,KAAK,GAAGD,QAAQ,CAACK,MAAM;QAEhC,MAAMC,UAAU,GAAGhB,QAAQ,CAACiB,cAAc,CAACL,MAAM,CAAC;QAClD,MAAMM,QAAQ,GAAGlB,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;QACjDiB,QAAQ,CAACC,WAAW,GAAGL,IAAI;QAE3Bf,KAAK,CAACqB,WAAW,CAACJ,UAAU,CAAC;QAC7BjB,KAAK,CAACqB,WAAW,CAACF,QAAQ,CAAC;MAC7B;MAEA,IAAIV,MAAM,GAAGd,QAAQ,CAACqB,MAAM,EAAE;QAC5B,MAAMM,KAAK,GAAG3B,QAAQ,CAACmB,KAAK,CAACL,MAAM,CAAC;QACpC,MAAMc,SAAS,GAAGtB,QAAQ,CAACiB,cAAc,CAACI,KAAK,CAAC;QAChDtB,KAAK,CAACqB,WAAW,CAACE,SAAS,CAAC;MAC9B;IACF,CAAC,MAAM;MACLvB,KAAK,CAACoB,WAAW,GAAGzB,QAAQ;IAC9B;IAEAC,GAAG,CAAC4B,OAAO,EAAEH,WAAW,CAACrB,KAAK,CAAC;IAE/B,OAAO,MAAM;MACXA,KAAK,CAACyB,MAAM,CAAC,CAAC;IAChB,CAAC;EACH,CAAC,EAAE,CAAC/B,SAAS,EAAEC,QAAQ,CAAC,CAAC;EAEzB,oBAAOL,MAAA,CAAAoC,OAAA,CAAAxB,aAAA;IAAMN,GAAG,EAAEA;EAAI,CAAE,CAAC;AAC3B","ignoreList":[]}
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { BoxProps, Flex } from '@semcore/base-components';\nimport type { ButtonTrigger, BaseTriggerProps, ButtonTriggerProps, LinkTriggerProps } from '@semcore/base-trigger';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type Divider from '@semcore/divider';\nimport type Dropdown from '@semcore/dropdown';\nimport type { StatusItemComponent } from '@semcore/dropdown';\nimport type {\n DropdownMenuContext,\n DropdownMenuItemProps,\n DropdownMenuProps,\n DropdownMenuHandlers,\n DropdownMenuTriggerProps,\n} from '@semcore/dropdown-menu';\nimport type DropdownMenu from '@semcore/dropdown-menu';\nimport type {
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { BoxProps, Flex } from '@semcore/base-components';\nimport type { ButtonTrigger, BaseTriggerProps, ButtonTriggerProps, LinkTriggerProps } from '@semcore/base-trigger';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type Divider from '@semcore/divider';\nimport type Dropdown from '@semcore/dropdown';\nimport type { StatusItemComponent } from '@semcore/dropdown';\nimport type {\n DropdownMenuContext,\n DropdownMenuItemProps,\n DropdownMenuProps,\n DropdownMenuHandlers,\n DropdownMenuTriggerProps,\n} from '@semcore/dropdown-menu';\nimport type DropdownMenu from '@semcore/dropdown-menu';\nimport type { NSInput } from '@semcore/input';\nimport type Input from '@semcore/input';\nimport type { Text } from '@semcore/typography';\nimport type React from 'react';\n\nexport type SelectInputSearch = NSInput.Value.Props & {};\nimport type { NSAutoSuggest } from './components/AutoSuggest/AutoSuggest.type';\n\nexport type OptionValue = string | number;\nexport type SelectValue = string | number | Array<string | number> | null;\n\nexport type SelectOption = {\n value: OptionValue;\n children?: React.ReactNode;\n label?: React.ReactNode;\n};\n\nexport type SelectProps<T extends SelectValue = SelectValue> = Intergalactic.InternalTypings.EfficientOmit<DropdownMenuProps, 'size'> &\n Intergalactic.InternalTypings.EfficientOmit<BaseTriggerProps, 'size'> & {\n /**\n * Options array\n */\n options?: SelectOption[];\n /**\n * The value or values array selected by default when using multiselect\n * @type SelectValue\n */\n defaultValue?: T;\n /**\n * The selected value or values array when using multiselect\n * @type SelectValue\n */\n value?: T;\n /**\n * Callback on value change\n * @type (value: SelectValue, e: React.SyntheticEvent) => boolean | void\n */\n onChange?:\n | ((value: T, e: React.SyntheticEvent) => boolean | void)\n | React.Dispatch<React.SetStateAction<T>>;\n /**\n * Trigger placeholder at not selected value\n */\n placeholder?: React.ReactNode;\n /**\n * Trigger state\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disables select\n */\n disabled?: boolean;\n /**\n * If provided, adds a hidden <input /> tag with the given name for enhancing accessibility.\n */\n name?: string;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * If enabled, after opening select popper view will be scrolled to selected option or, if there are multiple selected options, to the first selected option.\n * @default true\n */\n scrollToSelected?: boolean;\n } & ({\n tag?: never;\n /**\n * Default type for size from BaseTriggerProps if there is no customization via `tag`.\n */\n size?: BaseTriggerProps['size'];\n } | {});\n\nexport type SelectOptionProps = DropdownMenuItemProps & {\n /**\n * Enables selected state\n */\n selected?: boolean;\n /** Value of the option */\n value: string | number;\n};\n\nexport type SelectOptionCheckboxProps = BoxProps & {\n /** Checkbox theme */\n theme?: string;\n /** Visual indeterminate state */\n indeterminate?: boolean;\n /** Controls the selected state */\n selected?: boolean;\n};\n\ndeclare const InputSearch: Intergalactic.Component<'div', SelectInputSearch> & {\n SearchIcon: typeof Input.Addon;\n Value: typeof Input.Value;\n Clear: typeof Input.Addon;\n};\n\nexport type SelectContext = DropdownMenuContext & {\n getOptionProps: PropGetterFn;\n getOptionCheckboxProps: PropGetterFn;\n getDividerProps: PropGetterFn;\n};\n\nexport type SelectHandlers = DropdownMenuHandlers & {\n value: (index: SelectValue) => void;\n};\n\ntype IntergalacticSelectComponent<PropsExtending = {}> = (<\n Value extends SelectValue,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n 'div',\n SelectProps<Value>,\n SelectContext,\n [handlers: SelectHandlers]\n > &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\nIntergalactic.InternalTypings.ComponentAdditive<'div', 'div', SelectProps>;\n\ndeclare const Select: IntergalacticSelectComponent & {\n Trigger: Intergalactic.Component<\n typeof Dropdown.Trigger,\n DropdownMenuTriggerProps & (ButtonTriggerProps | LinkTriggerProps),\n {},\n [handlers: SelectHandlers]\n > & {\n Addon: typeof ButtonTrigger.Addon;\n Text: typeof ButtonTrigger.Text;\n };\n Popper: typeof DropdownMenu.Popper;\n List: typeof DropdownMenu.List;\n Menu: typeof DropdownMenu.Menu;\n Group: typeof Dropdown.Group;\n StatusItem: StatusItemComponent;\n Option: Intergalactic.Component<\n 'option',\n SelectOptionProps,\n SelectContext,\n [handlers: SelectHandlers]\n > & {\n Addon: typeof DropdownMenu.Item.Addon;\n Checkbox: Intergalactic.Component<'div', SelectOptionCheckboxProps>;\n Content: typeof Flex;\n Text: typeof Text;\n Hint: typeof Flex;\n };\n Divider: typeof Divider;\n InputSearch: typeof InputSearch;\n Input: typeof InputSearch;\n};\n\ndeclare const wrapSelect: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticSelectComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticSelectComponent<PropsExtending>;\n\ndeclare const AutoSuggest: NSAutoSuggest.Component;\n\nexport { InputSearch, wrapSelect, AutoSuggest, NSAutoSuggest };\nexport default Select;\n"],"mappings":"","ignoreList":[]}
|
package/lib/cjs/index.js
CHANGED
|
@@ -6,8 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
var _exportNames = {
|
|
9
|
-
InputSearch: true
|
|
9
|
+
InputSearch: true,
|
|
10
|
+
AutoSuggest: true
|
|
10
11
|
};
|
|
12
|
+
Object.defineProperty(exports, "AutoSuggest", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _AutoSuggest.AutoSuggest;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
11
18
|
Object.defineProperty(exports, "InputSearch", {
|
|
12
19
|
enumerable: true,
|
|
13
20
|
get: function () {
|
|
@@ -33,4 +40,5 @@ Object.keys(_Select).forEach(function (key) {
|
|
|
33
40
|
}
|
|
34
41
|
});
|
|
35
42
|
});
|
|
43
|
+
var _AutoSuggest = require("./components/AutoSuggest/AutoSuggest");
|
|
36
44
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_InputSearch","_interopRequireDefault","require","_Select","_interopRequireWildcard","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get"],"sources":["../../src/index.js"],"sourcesContent":["export { default as InputSearch } from './InputSearch';\nexport { default } from './Select';\nexport * from './Select';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_InputSearch","_interopRequireDefault","require","_Select","_interopRequireWildcard","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_AutoSuggest"],"sources":["../../src/index.js"],"sourcesContent":["export { default as InputSearch } from './InputSearch';\nexport { default } from './Select';\nexport * from './Select';\nexport { AutoSuggest } from './components/AutoSuggest/AutoSuggest';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AACAG,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,YAAA,GAAAf,OAAA","ignoreList":[]}
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
"clearSearch": "Clear search field",
|
|
3
3
|
"selectPlaceholder": "Select option",
|
|
4
4
|
"Select.InputSearch.Value:placeholder": "Search",
|
|
5
|
-
"Select.InputSearch.Value:aria-label": "Search"
|
|
5
|
+
"Select.InputSearch.Value:aria-label": "Search",
|
|
6
|
+
"AutoSuggest.Popper.placeholderText": "Start typing to see options"
|
|
6
7
|
}
|
package/lib/es6/InputSearch.js
CHANGED
|
@@ -13,14 +13,14 @@ import Input from '@semcore/input';
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { selectContext } from './context';
|
|
15
15
|
/*!__reshadow-styles__:"./style/input-search.shadow.css"*/
|
|
16
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
16
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SInputSearch_1m3u8_gg_._size_m_1m3u8_gg_{height:32px}.___SSearchClear_1m3u8_gg_{padding:0 var(--intergalactic-spacing-2x,8px)}.___SSearchClear_1m3u8_gg_.__hide_1m3u8_gg_{visibility:hidden}.___SOutline_1m3u8_gg_{top:-1px;left:-1px;width:100%;border-radius:var(--intergalactic-control-rounded,6px) var(--intergalactic-control-rounded,6px) 0 0;box-sizing:initial}", /*__inner_css_end__*/"1m3u8_gg_"),
|
|
17
17
|
/*__reshadow_css_end__*/
|
|
18
18
|
{
|
|
19
|
-
"__SInputSearch": "
|
|
20
|
-
"_size_m": "
|
|
21
|
-
"__SSearchClear": "
|
|
22
|
-
"_hide": "
|
|
23
|
-
"__SOutline": "
|
|
19
|
+
"__SInputSearch": "___SInputSearch_1m3u8_gg_",
|
|
20
|
+
"_size_m": "_size_m_1m3u8_gg_",
|
|
21
|
+
"__SSearchClear": "___SSearchClear_1m3u8_gg_",
|
|
22
|
+
"_hide": "__hide_1m3u8_gg_",
|
|
23
|
+
"__SOutline": "___SOutline_1m3u8_gg_"
|
|
24
24
|
});
|
|
25
25
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
26
26
|
class InputSearchRoot extends Component {
|
package/lib/es6/Select.js
CHANGED
|
@@ -24,16 +24,16 @@ import React from 'react';
|
|
|
24
24
|
import { selectContext } from './context';
|
|
25
25
|
import InputSearch from './InputSearch';
|
|
26
26
|
/*!__reshadow-styles__:"./style/select.shadow.css"*/
|
|
27
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
27
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SOptionCheckbox_nu0ok_gg_{margin-top:var(--intergalactic-spacing-05x,2px);margin-right:var(--intergalactic-spacing-2x,8px);margin-bottom:auto;position:relative;flex-shrink:0;width:16px;height:16px}.___SOptionCheckbox_nu0ok_gg_:before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--intergalactic-bg-primary-neutral,oklch(1 0 0));border:1px solid;border-radius:var(--intergalactic-addon-rounded,4px);border-color:var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___SOptionCheckbox_nu0ok_gg_:before{border-color:var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___SOptionCheckbox_nu0ok_gg_:after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;margin:0 var(--intergalactic-spacing-05x,2px);background-repeat:no-repeat;background-position:50%}.___SOptionCheckbox_nu0ok_gg_.__selected_nu0ok_gg_:after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSI3IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMTAgNyI+PHBhdGggc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIgZD0iTTguMjUgMSA0IDUuMjUgMS43NSAzIi8+PC9zdmc+\")}.___SOptionCheckbox_nu0ok_gg_._size_l_nu0ok_gg_{width:20px;height:20px}.___SOptionCheckbox_nu0ok_gg_._size_l_nu0ok_gg_.__selected_nu0ok_gg_:after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMTIgOSI+PHBhdGggc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIgZD0iTTExIDEuNSA0Ljc1IDcuNzUgMSA0Ii8+PC9zdmc+\")}.___SOptionCheckbox_nu0ok_gg_.__indeterminate_nu0ok_gg_:before,.___SOptionCheckbox_nu0ok_gg_.__selected_nu0ok_gg_:before{background-color:var(--intergalactic-control-primary-info,oklch(.23 .01 140));border-color:var(--intergalactic-control-primary-info,oklch(.23 .01 140))}.___SOptionCheckbox_nu0ok_gg_.__theme_nu0ok_gg_:before{border-color:var(--theme_nu0ok)}.___SOptionCheckbox_nu0ok_gg_.__theme_nu0ok_gg_.__indeterminate_nu0ok_gg_:before,.___SOptionCheckbox_nu0ok_gg_.__theme_nu0ok_gg_.__selected_nu0ok_gg_:before{background-color:var(--theme_nu0ok);border-color:var(--theme_nu0ok)}.___SOptionCheckbox_nu0ok_gg_.__selected_nu0ok_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected,#0050ff14)}@media (color-gamut:p3){.___SOptionCheckbox_nu0ok_gg_.__selected_nu0ok_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected,oklch(.525 .265 263/.077))}}@media (hover:hover){.___SOptionCheckbox_nu0ok_gg_.__selected_nu0ok_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover,#004dff31)}@media (color-gamut:p3){.___SOptionCheckbox_nu0ok_gg_.__selected_nu0ok_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover,oklch(.52 .268 263.2/.191))}}}.___SOptionCheckbox_nu0ok_gg_.__indeterminate_nu0ok_gg_:after{background-color:#fff;background-image:none;margin:auto;border-radius:1px}.___SOptionCheckbox_nu0ok_gg_.__indeterminate_nu0ok_gg_._size_l_nu0ok_gg_:after{width:12px;height:2px}.___SOptionCheckbox_nu0ok_gg_.__indeterminate_nu0ok_gg_._size_m_nu0ok_gg_:after{width:8px;height:2px}", /*__inner_css_end__*/"nu0ok_gg_"),
|
|
28
28
|
/*__reshadow_css_end__*/
|
|
29
29
|
{
|
|
30
|
-
"__SOptionCheckbox": "
|
|
31
|
-
"_selected": "
|
|
32
|
-
"_size_l": "
|
|
33
|
-
"_indeterminate": "
|
|
34
|
-
"_theme": "
|
|
35
|
-
"--theme": "--
|
|
36
|
-
"_size_m": "
|
|
30
|
+
"__SOptionCheckbox": "___SOptionCheckbox_nu0ok_gg_",
|
|
31
|
+
"_selected": "__selected_nu0ok_gg_",
|
|
32
|
+
"_size_l": "_size_l_nu0ok_gg_",
|
|
33
|
+
"_indeterminate": "__indeterminate_nu0ok_gg_",
|
|
34
|
+
"_theme": "__theme_nu0ok_gg_",
|
|
35
|
+
"--theme": "--theme_nu0ok",
|
|
36
|
+
"_size_m": "_size_m_nu0ok_gg_"
|
|
37
37
|
});
|
|
38
38
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
39
39
|
function isSelectedOption(value, valueOption) {
|