@telegraph/select 0.0.80 → 0.0.81
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 +9 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +20 -18
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/Select/Select.d.ts +1 -1
- package/dist/types/Select/Select.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @telegraph/select
|
|
2
2
|
|
|
3
|
+
## 0.0.81
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#679](https://github.com/knocklabs/telegraph/pull/679) [`7111048`](https://github.com/knocklabs/telegraph/commit/71110486996cf8e447f503bf1aef63aeee1a6d4e) Thanks [@kylemcd](https://github.com/kylemcd)! - feat: add defaultValue and defaultScrollToValue, automatically scroll to value on open
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`7111048`](https://github.com/knocklabs/telegraph/commit/71110486996cf8e447f503bf1aef63aeee1a6d4e)]:
|
|
10
|
+
- @telegraph/combobox@0.1.27
|
|
11
|
+
|
|
3
12
|
## 0.0.80
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("@telegraph/combobox"),m=({size:t="1",value:e,onValueChange:n,defaultValue:s,triggerProps:b,contentProps:c,optionsProps:i,children:x,...l})=>o.jsxs(r.Combobox.Root,{value:e,onValueChange:n,defaultValue:s,closeOnSelect:!Array.isArray(e)&&!Array.isArray(s),...l,children:[o.jsx(r.Combobox.Trigger,{size:t,...b}),o.jsx(r.Combobox.Content,{...c,children:o.jsx(r.Combobox.Options,{...i,children:x})})]}),j=({value:t,children:e,...n})=>o.jsx(r.Combobox.Option,{value:t,label:e,...n}),y={Root:m,Option:j};exports.Select=y;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Select/Select.tsx"],"sourcesContent":["import { Combobox } from \"@telegraph/combobox\";\nimport { TgphComponentProps } from \"@telegraph/helpers\";\n\ntype Option = TgphComponentProps<typeof Combobox.Option>;\n\ntype RootProps = TgphComponentProps<typeof Combobox.Root> & {\n size?: TgphComponentProps<typeof Combobox.Trigger>[\"size\"];\n triggerProps?: TgphComponentProps<typeof Combobox.Trigger>;\n contentProps?: TgphComponentProps<typeof Combobox.Content>;\n optionsProps?: TgphComponentProps<typeof Combobox.Options>;\n};\nconst Root = ({\n size = \"1\",\n value,\n onValueChange,\n triggerProps,\n contentProps,\n optionsProps,\n children,\n ...props\n}: RootProps) => {\n return (\n <Combobox.Root\n value={value}\n onValueChange={onValueChange}\n closeOnSelect={!Array.isArray(value)}\n {...props}\n >\n <Combobox.Trigger size={size} {...triggerProps} />\n <Combobox.Content {...contentProps}>\n <Combobox.Options {...optionsProps}>{children}</Combobox.Options>\n </Combobox.Content>\n </Combobox.Root>\n );\n};\n\ntype OptionProps = Omit<TgphComponentProps<typeof Combobox.Option>, \"label\">;\n\nconst Option = ({ value, children, ...props }: OptionProps) => {\n return <Combobox.Option value={value} label={children} {...props} />;\n};\n\nconst Select = { Root, Option };\ntype SelectProps = RootProps;\n\nexport { Select };\nexport type { SelectProps, OptionProps, Option };\n"],"names":["Root","size","value","onValueChange","triggerProps","contentProps","optionsProps","children","props","jsxs","Combobox","jsx","Option","Select"],"mappings":"sJAWMA,EAAO,CAAC,CACZ,KAAAC,EAAO,IACP,MAAAC,EACA,cAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAEIC,EAAAA,KAACC,EAAAA,SAAS,KAAT,CACC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Select/Select.tsx"],"sourcesContent":["import { Combobox } from \"@telegraph/combobox\";\nimport { TgphComponentProps } from \"@telegraph/helpers\";\n\ntype Option = TgphComponentProps<typeof Combobox.Option>;\n\ntype RootProps = TgphComponentProps<typeof Combobox.Root> & {\n size?: TgphComponentProps<typeof Combobox.Trigger>[\"size\"];\n triggerProps?: TgphComponentProps<typeof Combobox.Trigger>;\n contentProps?: TgphComponentProps<typeof Combobox.Content>;\n optionsProps?: TgphComponentProps<typeof Combobox.Options>;\n};\nconst Root = ({\n size = \"1\",\n value,\n onValueChange,\n defaultValue,\n triggerProps,\n contentProps,\n optionsProps,\n children,\n ...props\n}: RootProps) => {\n return (\n <Combobox.Root\n value={value}\n onValueChange={onValueChange}\n defaultValue={defaultValue}\n closeOnSelect={!Array.isArray(value) && !Array.isArray(defaultValue)}\n {...props}\n >\n <Combobox.Trigger size={size} {...triggerProps} />\n <Combobox.Content {...contentProps}>\n <Combobox.Options {...optionsProps}>{children}</Combobox.Options>\n </Combobox.Content>\n </Combobox.Root>\n );\n};\n\ntype OptionProps = Omit<TgphComponentProps<typeof Combobox.Option>, \"label\">;\n\nconst Option = ({ value, children, ...props }: OptionProps) => {\n return <Combobox.Option value={value} label={children} {...props} />;\n};\n\nconst Select = { Root, Option };\ntype SelectProps = RootProps;\n\nexport { Select };\nexport type { SelectProps, OptionProps, Option };\n"],"names":["Root","size","value","onValueChange","defaultValue","triggerProps","contentProps","optionsProps","children","props","jsxs","Combobox","jsx","Option","Select"],"mappings":"sJAWMA,EAAO,CAAC,CACZ,KAAAC,EAAO,IACP,MAAAC,EACA,cAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAEIC,EAAAA,KAACC,EAAAA,SAAS,KAAT,CACC,MAAAT,EACA,cAAAC,EACA,aAAAC,EACA,cAAe,CAAC,MAAM,QAAQF,CAAK,GAAK,CAAC,MAAM,QAAQE,CAAY,EAClE,GAAGK,EAEJ,SAAA,CAAAG,EAAAA,IAACD,EAAAA,SAAS,QAAT,CAAiB,KAAAV,EAAa,GAAGI,CAAA,CAAc,EAChDO,EAAAA,IAACD,EAAAA,SAAS,QAAT,CAAkB,GAAGL,EACpB,SAAAM,MAACD,EAAAA,SAAS,QAAT,CAAkB,GAAGJ,EAAe,SAAAC,EAAS,CAAA,CAChD,CAAA,CAAA,CAAA,EAOAK,EAAS,CAAC,CAAE,MAAAX,EAAO,SAAAM,EAAU,GAAGC,KAC7BG,EAAAA,IAACD,EAAAA,SAAS,OAAT,CAAgB,MAAAT,EAAc,MAAOM,EAAW,GAAGC,EAAO,EAG9DK,EAAS,CAAE,KAAAd,EAAM,OAAAa,CAAA"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Combobox as
|
|
3
|
-
const
|
|
1
|
+
import { jsxs as x, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Combobox as r } from "@telegraph/combobox";
|
|
3
|
+
const y = ({
|
|
4
4
|
size: n = "1",
|
|
5
|
-
value:
|
|
5
|
+
value: o,
|
|
6
6
|
onValueChange: e,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
defaultValue: i,
|
|
8
|
+
triggerProps: s,
|
|
9
|
+
contentProps: c,
|
|
10
|
+
optionsProps: p,
|
|
11
|
+
children: m,
|
|
12
|
+
...l
|
|
13
|
+
}) => /* @__PURE__ */ x(
|
|
14
|
+
r.Root,
|
|
14
15
|
{
|
|
15
|
-
value:
|
|
16
|
+
value: o,
|
|
16
17
|
onValueChange: e,
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
defaultValue: i,
|
|
19
|
+
closeOnSelect: !Array.isArray(o) && !Array.isArray(i),
|
|
20
|
+
...l,
|
|
19
21
|
children: [
|
|
20
|
-
/* @__PURE__ */ t(
|
|
21
|
-
/* @__PURE__ */ t(
|
|
22
|
+
/* @__PURE__ */ t(r.Trigger, { size: n, ...s }),
|
|
23
|
+
/* @__PURE__ */ t(r.Content, { ...c, children: /* @__PURE__ */ t(r.Options, { ...p, children: m }) })
|
|
22
24
|
]
|
|
23
25
|
}
|
|
24
|
-
),
|
|
26
|
+
), A = ({ value: n, children: o, ...e }) => /* @__PURE__ */ t(r.Option, { value: n, label: o, ...e }), a = { Root: y, Option: A };
|
|
25
27
|
export {
|
|
26
|
-
|
|
28
|
+
a as Select
|
|
27
29
|
};
|
|
28
30
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/Select/Select.tsx"],"sourcesContent":["import { Combobox } from \"@telegraph/combobox\";\nimport { TgphComponentProps } from \"@telegraph/helpers\";\n\ntype Option = TgphComponentProps<typeof Combobox.Option>;\n\ntype RootProps = TgphComponentProps<typeof Combobox.Root> & {\n size?: TgphComponentProps<typeof Combobox.Trigger>[\"size\"];\n triggerProps?: TgphComponentProps<typeof Combobox.Trigger>;\n contentProps?: TgphComponentProps<typeof Combobox.Content>;\n optionsProps?: TgphComponentProps<typeof Combobox.Options>;\n};\nconst Root = ({\n size = \"1\",\n value,\n onValueChange,\n triggerProps,\n contentProps,\n optionsProps,\n children,\n ...props\n}: RootProps) => {\n return (\n <Combobox.Root\n value={value}\n onValueChange={onValueChange}\n closeOnSelect={!Array.isArray(value)}\n {...props}\n >\n <Combobox.Trigger size={size} {...triggerProps} />\n <Combobox.Content {...contentProps}>\n <Combobox.Options {...optionsProps}>{children}</Combobox.Options>\n </Combobox.Content>\n </Combobox.Root>\n );\n};\n\ntype OptionProps = Omit<TgphComponentProps<typeof Combobox.Option>, \"label\">;\n\nconst Option = ({ value, children, ...props }: OptionProps) => {\n return <Combobox.Option value={value} label={children} {...props} />;\n};\n\nconst Select = { Root, Option };\ntype SelectProps = RootProps;\n\nexport { Select };\nexport type { SelectProps, OptionProps, Option };\n"],"names":["Root","size","value","onValueChange","triggerProps","contentProps","optionsProps","children","props","jsxs","Combobox","jsx","Option","Select"],"mappings":";;AAWA,MAAMA,IAAO,CAAC;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAACC,EAAS;AAAA,EAAT;AAAA,IACC,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/Select/Select.tsx"],"sourcesContent":["import { Combobox } from \"@telegraph/combobox\";\nimport { TgphComponentProps } from \"@telegraph/helpers\";\n\ntype Option = TgphComponentProps<typeof Combobox.Option>;\n\ntype RootProps = TgphComponentProps<typeof Combobox.Root> & {\n size?: TgphComponentProps<typeof Combobox.Trigger>[\"size\"];\n triggerProps?: TgphComponentProps<typeof Combobox.Trigger>;\n contentProps?: TgphComponentProps<typeof Combobox.Content>;\n optionsProps?: TgphComponentProps<typeof Combobox.Options>;\n};\nconst Root = ({\n size = \"1\",\n value,\n onValueChange,\n defaultValue,\n triggerProps,\n contentProps,\n optionsProps,\n children,\n ...props\n}: RootProps) => {\n return (\n <Combobox.Root\n value={value}\n onValueChange={onValueChange}\n defaultValue={defaultValue}\n closeOnSelect={!Array.isArray(value) && !Array.isArray(defaultValue)}\n {...props}\n >\n <Combobox.Trigger size={size} {...triggerProps} />\n <Combobox.Content {...contentProps}>\n <Combobox.Options {...optionsProps}>{children}</Combobox.Options>\n </Combobox.Content>\n </Combobox.Root>\n );\n};\n\ntype OptionProps = Omit<TgphComponentProps<typeof Combobox.Option>, \"label\">;\n\nconst Option = ({ value, children, ...props }: OptionProps) => {\n return <Combobox.Option value={value} label={children} {...props} />;\n};\n\nconst Select = { Root, Option };\ntype SelectProps = RootProps;\n\nexport { Select };\nexport type { SelectProps, OptionProps, Option };\n"],"names":["Root","size","value","onValueChange","defaultValue","triggerProps","contentProps","optionsProps","children","props","jsxs","Combobox","jsx","Option","Select"],"mappings":";;AAWA,MAAMA,IAAO,CAAC;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAACC,EAAS;AAAA,EAAT;AAAA,IACC,OAAAT;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAe,CAAC,MAAM,QAAQF,CAAK,KAAK,CAAC,MAAM,QAAQE,CAAY;AAAA,IAClE,GAAGK;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAG,EAACD,EAAS,SAAT,EAAiB,MAAAV,GAAa,GAAGI,EAAA,CAAc;AAAA,MAChD,gBAAAO,EAACD,EAAS,SAAT,EAAkB,GAAGL,GACpB,UAAA,gBAAAM,EAACD,EAAS,SAAT,EAAkB,GAAGJ,GAAe,UAAAC,GAAS,EAAA,CAChD;AAAA,IAAA;AAAA,EAAA;AAAA,GAOAK,IAAS,CAAC,EAAE,OAAAX,GAAO,UAAAM,GAAU,GAAGC,QAC7B,gBAAAG,EAACD,EAAS,QAAT,EAAgB,OAAAT,GAAc,OAAOM,GAAW,GAAGC,GAAO,GAG9DK,IAAS,EAAE,MAAAd,GAAM,QAAAa,EAAA;"}
|
|
@@ -10,7 +10,7 @@ type RootProps = TgphComponentProps<typeof Combobox.Root> & {
|
|
|
10
10
|
type OptionProps = Omit<TgphComponentProps<typeof Combobox.Option>, "label">;
|
|
11
11
|
declare const Option: ({ value, children, ...props }: OptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare const Select: {
|
|
13
|
-
Root: ({ size, value, onValueChange, triggerProps, contentProps, optionsProps, children, ...props }: RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
Root: ({ size, value, onValueChange, defaultValue, triggerProps, contentProps, optionsProps, children, ...props }: RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
Option: ({ value, children, ...props }: OptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
};
|
|
16
16
|
type SelectProps = RootProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,KAAK,MAAM,GAAG,kBAAkB,CAAC,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAEzD,KAAK,SAAS,GAAG,kBAAkB,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG;IAC1D,IAAI,CAAC,EAAE,kBAAkB,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,kBAAkB,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,kBAAkB,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,kBAAkB,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC5D,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,KAAK,MAAM,GAAG,kBAAkB,CAAC,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAEzD,KAAK,SAAS,GAAG,kBAAkB,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG;IAC1D,IAAI,CAAC,EAAE,kBAAkB,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,kBAAkB,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,kBAAkB,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,kBAAkB,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC5D,CAAC;AA4BF,KAAK,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;AAE7E,QAAA,MAAM,MAAM,GAAI,+BAA+B,WAAW,4CAEzD,CAAC;AAEF,QAAA,MAAM,MAAM;uHAvBT,SAAS;4CAmBmC,WAAW;CAI3B,CAAC;AAChC,KAAK,WAAW,GAAG,SAAS,CAAC;AAE7B,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telegraph/select",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.81",
|
|
4
4
|
"description": "A simple select component built on top of @telegraph/combobox",
|
|
5
5
|
"repository": "https://github.com/knocklabs/telegraph/tree/main/packages/select",
|
|
6
6
|
"author": "@knocklabs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"preview": "vite preview"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@telegraph/combobox": "0.1.
|
|
33
|
+
"@telegraph/combobox": "0.1.27",
|
|
34
34
|
"@telegraph/helpers": "0.0.15"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|