@baton8/general-components 1.1.0 → 1.2.0-alpha.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.
@@ -21,7 +21,7 @@ export declare const Badge: import("react").ForwardRefExoticComponent<import("..
21
21
  * 見た目のバリアント。
22
22
  * @defaultValue `"solid"`
23
23
  */
24
- variant?: "solid" | "light" | "outline" | undefined;
24
+ variant?: "outline" | "solid" | "light" | undefined;
25
25
  /**
26
26
  * サイズ。
27
27
  * @defaultValue `"medium"`
@@ -37,6 +37,8 @@ type RootProps = {
37
37
  */
38
38
  appElement?: string | HTMLElement;
39
39
  /** */
40
+ defaultReady?: boolean;
41
+ /** */
40
42
  children: ReactNode;
41
43
  };
42
44
  /**
@@ -13,7 +13,7 @@ export declare const DialogButton: import("react").ForwardRefExoticComponent<imp
13
13
  * そのダイアログに関するメインの動作を行うボタンには `"submit"` を指定し、それ以外のキャンセルボタンなどには `"cancel"` を指定してください。
14
14
  * @defaultValue `"submit"`
15
15
  */
16
- variant?: "cancel" | "submit" | undefined;
16
+ variant?: "submit" | "cancel" | undefined;
17
17
  /**
18
18
  * 無効にするかどうか。
19
19
  *
@@ -13,7 +13,7 @@ export declare const DrawerButton: import("react").ForwardRefExoticComponent<imp
13
13
  * そのダイアログに関するメインの動作を行うボタンには `"submit"` を指定し、それ以外のキャンセルボタンなどには `"cancel"` を指定してください。
14
14
  * @defaultValue `"submit"`
15
15
  */
16
- variant?: "cancel" | "submit" | undefined;
16
+ variant?: "submit" | "cancel" | undefined;
17
17
  /**
18
18
  * 無効にするかどうか。
19
19
  *
package/dist/index.js CHANGED
@@ -1396,7 +1396,7 @@
1396
1396
  inline-size: ${$(0)};
1397
1397
  opacity: 0;
1398
1398
  position: fixed;
1399
- `},Do=({})=>(0,e.jsxs)("svg",{css:Ro.root,viewBox:"0 0 1 1","aria-hidden":!0,children:[(0,e.jsxs)("linearGradient",{id:"qlib-rank-gold",x1:"0",y1:"0",x2:"576",y2:"512",gradientUnits:"userSpaceOnUse",children:[(0,e.jsx)("stop",{offset:"5%",stopColor:x("gold",5)}),(0,e.jsx)("stop",{offset:"50%",stopColor:x("gold",3)}),(0,e.jsx)("stop",{offset:"95%",stopColor:x("gold",5)})]}),(0,e.jsxs)("linearGradient",{id:"qlib-rank-silver",x1:"0",y1:"0",x2:"576",y2:"512",gradientUnits:"userSpaceOnUse",children:[(0,e.jsx)("stop",{offset:"5%",stopColor:x("silver",5)}),(0,e.jsx)("stop",{offset:"50%",stopColor:x("silver",3)}),(0,e.jsx)("stop",{offset:"95%",stopColor:x("silver",5)})]}),(0,e.jsxs)("linearGradient",{id:"qlib-rank-bronze",x1:"0",y1:"0",x2:"576",y2:"512",gradientUnits:"userSpaceOnUse",children:[(0,e.jsx)("stop",{offset:"5%",stopColor:x("bronze",5)}),(0,e.jsx)("stop",{offset:"50%",stopColor:x("bronze",3)}),(0,e.jsx)("stop",{offset:"95%",stopColor:x("bronze",5)})]})]}),Mo=({messages:o,rootFontSize:t={desktop:"16px",smartphone:"13px"},smartphoneQuery:n="(max-width: 767px)",colorDefinitions:a={},globalStyle:l,appElement:s,children:c})=>{const d=So(),b=zo(),p=$o(ko),u=jo(t),f=(0,r.useMemo)((()=>({rootFontSize:Oo(t),smartphoneQuery:n})),[t,n]),[m,y]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{y(!0)}),[]),(0,r.useEffect)((()=>{const e=go([null!=o?o:{},yo]),r=(0,C.createIntlCache)(),t=(0,C.createIntl)({locale:d,messages:e[d],onError:e=>null},r);ko.next(t)}),[d,o]),(0,r.useEffect)((()=>{var e;"undefined"!=typeof localStorage&&b(null!==(e=localStorage.getItem("qlib-locale"))&&void 0!==e?e:"ja")}),[b]),(0,r.useEffect)((()=>{const e="next"in window?"#__next":s;e&&Lr().setAppElement(e)}),[s]),(0,e.jsxs)(r.Fragment,{children:[(0,e.jsx)(i.Global,{styles:to(u)}),(0,e.jsx)(i.Global,{styles:h(a)}),(0,e.jsx)(i.Global,{styles:l}),(0,e.jsx)(Do,{}),(0,e.jsx)(C.RawIntlProvider,{value:p,children:(0,e.jsx)(lo,{value:f,children:(0,e.jsx)(fo,{children:(0,e.jsx)(ao,{children:m&&c})})})})]})};const Lo={root:i.css`
1399
+ `},Do=({})=>(0,e.jsxs)("svg",{css:Ro.root,viewBox:"0 0 1 1","aria-hidden":!0,children:[(0,e.jsxs)("linearGradient",{id:"qlib-rank-gold",x1:"0",y1:"0",x2:"576",y2:"512",gradientUnits:"userSpaceOnUse",children:[(0,e.jsx)("stop",{offset:"5%",stopColor:x("gold",5)}),(0,e.jsx)("stop",{offset:"50%",stopColor:x("gold",3)}),(0,e.jsx)("stop",{offset:"95%",stopColor:x("gold",5)})]}),(0,e.jsxs)("linearGradient",{id:"qlib-rank-silver",x1:"0",y1:"0",x2:"576",y2:"512",gradientUnits:"userSpaceOnUse",children:[(0,e.jsx)("stop",{offset:"5%",stopColor:x("silver",5)}),(0,e.jsx)("stop",{offset:"50%",stopColor:x("silver",3)}),(0,e.jsx)("stop",{offset:"95%",stopColor:x("silver",5)})]}),(0,e.jsxs)("linearGradient",{id:"qlib-rank-bronze",x1:"0",y1:"0",x2:"576",y2:"512",gradientUnits:"userSpaceOnUse",children:[(0,e.jsx)("stop",{offset:"5%",stopColor:x("bronze",5)}),(0,e.jsx)("stop",{offset:"50%",stopColor:x("bronze",3)}),(0,e.jsx)("stop",{offset:"95%",stopColor:x("bronze",5)})]})]}),Mo=({messages:o,rootFontSize:t={desktop:"16px",smartphone:"13px"},smartphoneQuery:n="(max-width: 767px)",colorDefinitions:a={},globalStyle:l,appElement:s,defaultReady:c=!1,children:d})=>{const b=So(),p=zo(),u=$o(ko),f=jo(t),m=(0,r.useMemo)((()=>({rootFontSize:Oo(t),smartphoneQuery:n})),[t,n]),[y,g]=(0,r.useState)(c);return(0,r.useEffect)((()=>{g(!0)}),[]),(0,r.useEffect)((()=>{const e=go([null!=o?o:{},yo]),r=(0,C.createIntlCache)(),t=(0,C.createIntl)({locale:b,messages:e[b],onError:e=>null},r);ko.next(t)}),[b,o]),(0,r.useEffect)((()=>{var e;"undefined"!=typeof localStorage&&p(null!==(e=localStorage.getItem("qlib-locale"))&&void 0!==e?e:"ja")}),[p]),(0,r.useEffect)((()=>{const e="next"in window?"#__next":s;e&&Lr().setAppElement(e)}),[s]),(0,e.jsxs)(r.Fragment,{children:[(0,e.jsx)(i.Global,{styles:to(f)}),(0,e.jsx)(i.Global,{styles:h(a)}),(0,e.jsx)(i.Global,{styles:l}),(0,e.jsx)(Do,{}),(0,e.jsx)(C.RawIntlProvider,{value:u,children:(0,e.jsx)(lo,{value:m,children:(0,e.jsx)(fo,{children:(0,e.jsx)(ao,{children:y&&d})})})})]})};const Lo={root:i.css`
1400
1400
  font-size: ${$(4.5)};
1401
1401
  font-weight: ${v("bold")};
1402
1402
  color: ${x("primary",6)};