@tempots/beatui 0.40.0 → 0.41.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/README.md +11 -11
- package/dist/{2019-nWH_nAwT.cjs → 2019-BFDr925O.cjs} +1 -1
- package/dist/{2019-sCKLAY8c.js → 2019-DnG5Y5sm.js} +2 -2
- package/dist/{2020-B4xCW_nu.js → 2020-D0-tZTo7.js} +2 -2
- package/dist/{2020-D7RWX09D.cjs → 2020-gUs7l1CJ.cjs} +1 -1
- package/dist/{ar-D_4BfIJO.cjs → ar-BLgxAefV.cjs} +1 -1
- package/dist/{ar-i2uHmy8P.js → ar-DpQo8C31.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +4 -4
- package/dist/beatui.css +35 -22
- package/dist/beatui.tailwind.css +35 -22
- package/dist/{de-C0PZz9sE.cjs → de-Bv-qs--J.cjs} +1 -1
- package/dist/{de-CeLwmVZz.js → de-D1MQ4wen.js} +1 -1
- package/dist/{es-C8qT1ins.cjs → es-3r8Ko5Dn.cjs} +1 -1
- package/dist/{es-DxOgARww.js → es-DwPjonS7.js} +1 -1
- package/dist/{fa-BFV9MxMX.cjs → fa-Qw6uVZeX.cjs} +1 -1
- package/dist/{fa-B9pEff8A.js → fa-fxf_lWjh.js} +1 -1
- package/dist/{fr-Caeevx56.js → fr-BDDsMHRZ.js} +1 -1
- package/dist/{fr-BBx5IJ7G.cjs → fr-pVhG9qik.cjs} +1 -1
- package/dist/{he-DeN-WW3u.js → he-B4deK_wE.js} +1 -1
- package/dist/{he-CMOvd4Dr.cjs → he-D-fvzfe1.cjs} +1 -1
- package/dist/{hi-Dey2HxiD.js → hi-CxQT8nRD.js} +1 -1
- package/dist/{hi-IOU_PzvH.cjs → hi-DKgxHzmH.cjs} +1 -1
- package/dist/{index-HqWBd-jW.js → index-Acyxme63.js} +3 -3
- package/dist/{index-B0ff5lT-.cjs → index-BZ2AX5sk.cjs} +2 -2
- package/dist/{index-DJqo6Guq.js → index-BwEJlbG2.js} +1 -1
- package/dist/{index-BTZqW3-b.js → index-CWq36UAJ.js} +710 -710
- package/dist/{index-IQ3lRaL0.js → index-Clw0AwwJ.js} +1 -1
- package/dist/{index-C2VAPX2b.cjs → index-DRDJFYRb.cjs} +1 -1
- package/dist/{index-D8fg48Fv.cjs → index-Lj0QS2po.cjs} +1 -1
- package/dist/{index-Dtka01mK.cjs → index-nVVPqgLq.cjs} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +1862 -1865
- package/dist/{it-DghnQdZa.js → it-6QS5PWzQ.js} +1 -1
- package/dist/{it-uQF0jkDT.cjs → it-Ck0r9TO3.cjs} +1 -1
- package/dist/{ja-Kb7rxmFg.js → ja-D2VvVGEN.js} +1 -1
- package/dist/{ja-BJD6uPbl.cjs → ja-D6b9suYB.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{ko-53o5WJ-v.js → ko-CP_WopWz.js} +1 -1
- package/dist/{ko-B7bLdRnp.cjs → ko-CzvM2Bjv.cjs} +1 -1
- package/dist/{modal-BRUgTJG9.cjs → modal-BmSRMdY9.cjs} +1 -1
- package/dist/{modal-_2B8vIo0.js → modal-DMc-R2VT.js} +2 -2
- package/dist/{nl-DvUVT7xd.js → nl-DZ4dFolZ.js} +1 -1
- package/dist/{nl-CJE0fC8g.cjs → nl-_9vJc8JD.cjs} +1 -1
- package/dist/{notice-C4n5jXi6.js → notice-B5Yn_3Ay.js} +89 -89
- package/dist/{notice-CncwkUTy.cjs → notice-D3P0lewM.cjs} +2 -2
- package/dist/{pl-C3oYeTwf.js → pl-BE81iFSF.js} +1 -1
- package/dist/{pl-DUaY5slY.cjs → pl-DKcVCojx.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-BJGeScun.js → pt-BcCdXUA2.js} +1 -1
- package/dist/{pt-BAqNKCuy.cjs → pt-DNVS1_MF.cjs} +1 -1
- package/dist/{ru-2irv1YXp.js → ru-Bo_jc3s1.js} +1 -1
- package/dist/{ru-CAlgJm3K.cjs → ru-DTn9Rssv.cjs} +1 -1
- package/dist/{toolbar-CVDXVnje.js → toolbar-DhD5GmMa.js} +1 -1
- package/dist/{toolbar-B7HrL0vD.cjs → toolbar-jPGzdJGi.cjs} +1 -1
- package/dist/{tr-DMiXAhok.cjs → tr-BhTJYHQ3.cjs} +1 -1
- package/dist/{tr-CkHLE5u7.js → tr-CBw3FlOg.js} +1 -1
- package/dist/{translations-Q5C5LyIi.js → translations-B0HuWYIz.js} +1 -1
- package/dist/{translations-DRNj0YIi.cjs → translations-B7_3phoA.cjs} +1 -1
- package/dist/translations-C21osktO.cjs +1 -0
- package/dist/{translations-DEEflRUY.js → translations-D-fMB_IO.js} +195 -167
- package/dist/types/components/form/controller/color-controller.d.ts +1 -1
- package/dist/types/components/form/input/color-input.d.ts +2 -5
- package/dist/types/components/form/input/color-swatch-input.d.ts +9 -0
- package/dist/types/components/form/input/index.d.ts +1 -0
- package/dist/types/components/form/input/input-container.d.ts +7 -0
- package/dist/types/utils/{color-validation.d.ts → color.d.ts} +13 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/{ur-BjiNs3SL.cjs → ur-BjuXyU8Z.cjs} +1 -1
- package/dist/{ur-bxBR_9Z-.js → ur-BsXnPgxd.js} +1 -1
- package/dist/utils-BOEQMy82.js +2512 -0
- package/dist/utils-DH-SYrQg.cjs +1 -0
- package/dist/{vi-CByOZvV2.cjs → vi-CvsTHMkK.cjs} +1 -1
- package/dist/{vi-CKknZqol.js → vi-D1rLo6MX.js} +1 -1
- package/dist/{zh-CmUgcP9o.js → zh-BoLsjdfz.js} +1 -1
- package/dist/{zh-C0QOebEA.cjs → zh-zh1FJ4Ud.cjs} +1 -1
- package/package.json +2 -2
- package/dist/translations-Dw1oO6Dh.cjs +0 -1
- package/dist/utils-BCbc19N0.js +0 -2427
- package/dist/utils-BJZipnfW.cjs +0 -1
package/README.md
CHANGED
|
@@ -142,7 +142,7 @@ document.body.appendChild(card)
|
|
|
142
142
|
- Button - Interactive buttons with multiple variants
|
|
143
143
|
- Input - Text input fields with validation
|
|
144
144
|
- Checkbox - Checkbox inputs with custom styling
|
|
145
|
-
- Color Input - Color picker input with validation and format conversion
|
|
145
|
+
- Color Swatch Input - Color picker input with validation and format conversion
|
|
146
146
|
- Tags Input - Multi-tag input field
|
|
147
147
|
|
|
148
148
|
### Layout Components
|
|
@@ -270,18 +270,18 @@ If you prefer to handle git commits manually, use the `:no-commit` variants:
|
|
|
270
270
|
|
|
271
271
|
These scripts will publish successfully but leave git operations to you.
|
|
272
272
|
|
|
273
|
-
## Color
|
|
273
|
+
## Color Swatch Input Component
|
|
274
274
|
|
|
275
|
-
The Color
|
|
275
|
+
The Color Swatch Input component provides an intuitive interface for color selection with comprehensive validation and format conversion capabilities.
|
|
276
276
|
|
|
277
277
|
### Basic Usage
|
|
278
278
|
|
|
279
279
|
```typescript
|
|
280
|
-
import {
|
|
280
|
+
import { ColorSwatchInput, prop } from '@tempots/beatui'
|
|
281
281
|
|
|
282
282
|
const color = prop('#3b82f6')
|
|
283
283
|
|
|
284
|
-
const colorPicker =
|
|
284
|
+
const colorPicker = ColorSwatchInput({
|
|
285
285
|
value: color,
|
|
286
286
|
onChange: newColor => console.log('Color changed:', newColor),
|
|
287
287
|
id: 'my-color-picker',
|
|
@@ -292,7 +292,7 @@ const colorPicker = ColorInput({
|
|
|
292
292
|
|
|
293
293
|
```typescript
|
|
294
294
|
import {
|
|
295
|
-
|
|
295
|
+
ColorSwatchInput,
|
|
296
296
|
createColorController,
|
|
297
297
|
colorInputOptionsFromController,
|
|
298
298
|
useForm,
|
|
@@ -323,10 +323,10 @@ const secondaryColorController = createColorController(
|
|
|
323
323
|
)
|
|
324
324
|
|
|
325
325
|
// Use with input options
|
|
326
|
-
const primaryColorInput =
|
|
326
|
+
const primaryColorInput = ColorSwatchInput(
|
|
327
327
|
colorInputOptionsFromController(primaryColorController)
|
|
328
328
|
)
|
|
329
|
-
const secondaryColorInput =
|
|
329
|
+
const secondaryColorInput = ColorSwatchInput(
|
|
330
330
|
colorInputOptionsFromController(secondaryColorController)
|
|
331
331
|
)
|
|
332
332
|
```
|
|
@@ -405,15 +405,15 @@ getContrastRatio('#000000', '#ffffff') // 21 (maximum contrast)
|
|
|
405
405
|
|
|
406
406
|
### CSS Classes
|
|
407
407
|
|
|
408
|
-
The Color
|
|
408
|
+
The Color Swatch Input uses the following CSS classes:
|
|
409
409
|
|
|
410
|
-
- `.bc-color-input` - Main color input styling
|
|
410
|
+
- `.bc-color-swatch-input` - Main color input styling
|
|
411
411
|
- `.bc-input-container` - Container wrapper (inherited from InputContainer)
|
|
412
412
|
- `.bc-input-container--error` - Error state styling
|
|
413
413
|
|
|
414
414
|
### Browser Support
|
|
415
415
|
|
|
416
|
-
The Color
|
|
416
|
+
The Color Swatch Input component uses the HTML5 `<input type="color">` element, which is supported in:
|
|
417
417
|
|
|
418
418
|
- Chrome 20+
|
|
419
419
|
- Firefox 29+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./index-
|
|
1
|
+
"use strict";const o=require("./index-BZ2AX5sk.cjs"),y=require("./index-DRDJFYRb.cjs");function P(n,e){for(var s=0;s<e.length;s++){const t=e[s];if(typeof t!="string"&&!Array.isArray(t)){for(const r in t)if(r!=="default"&&!(r in n)){const i=Object.getOwnPropertyDescriptor(t,r);i&&Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:()=>t[r]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var m={exports:{}},$={};const q="https://json-schema.org/draft/2019-09/schema",R="https://json-schema.org/draft/2019-09/schema",O={"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},M=!0,I="Core and Validation specifications meta-schema",N=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],S=["object","boolean"],C={definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}},D={$schema:q,$id:R,$vocabulary:O,$recursiveAnchor:M,title:I,allOf:N,type:S,properties:C},E="https://json-schema.org/draft/2019-09/schema",V="https://json-schema.org/draft/2019-09/meta/applicator",w={"https://json-schema.org/draft/2019-09/vocab/applicator":!0},T=!0,x="Applicator vocabulary meta-schema",k=["object","boolean"],K={additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},z={schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}},G={$schema:E,$id:V,$vocabulary:w,$recursiveAnchor:T,title:x,type:k,properties:K,$defs:z},F="https://json-schema.org/draft/2019-09/schema",J="https://json-schema.org/draft/2019-09/meta/content",L={"https://json-schema.org/draft/2019-09/vocab/content":!0},U=!0,Z="Content vocabulary meta-schema",H=["object","boolean"],W={contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}},B={$schema:F,$id:J,$vocabulary:L,$recursiveAnchor:U,title:Z,type:H,properties:W},Q="https://json-schema.org/draft/2019-09/schema",X="https://json-schema.org/draft/2019-09/meta/core",Y={"https://json-schema.org/draft/2019-09/vocab/core":!0},ee=!0,te="Core vocabulary meta-schema",re=["object","boolean"],ae={$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}},ne={$schema:Q,$id:X,$vocabulary:Y,$recursiveAnchor:ee,title:te,type:re,properties:ae},oe="https://json-schema.org/draft/2019-09/schema",se="https://json-schema.org/draft/2019-09/meta/format",ie={"https://json-schema.org/draft/2019-09/vocab/format":!0},ce=!0,ue="Format vocabulary meta-schema",de=["object","boolean"],fe={format:{type:"string"}},me={$schema:oe,$id:se,$vocabulary:ie,$recursiveAnchor:ce,title:ue,type:de,properties:fe},$e="https://json-schema.org/draft/2019-09/schema",le="https://json-schema.org/draft/2019-09/meta/meta-data",pe={"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},he=!0,ye="Meta-data vocabulary meta-schema",ve=["object","boolean"],ge={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},be={$schema:$e,$id:le,$vocabulary:pe,$recursiveAnchor:he,title:ye,type:ve,properties:ge},je="https://json-schema.org/draft/2019-09/schema",_e="https://json-schema.org/draft/2019-09/meta/validation",Ae={"https://json-schema.org/draft/2019-09/vocab/validation":!0},Pe=!0,qe="Validation vocabulary meta-schema",Re=["object","boolean"],Oe={multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},Me={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Ie={$schema:je,$id:_e,$vocabulary:Ae,$recursiveAnchor:Pe,title:qe,type:Re,properties:Oe,$defs:Me};var v;function Ne(){if(v)return $;v=1,Object.defineProperty($,"__esModule",{value:!0});const n=D,e=G,s=B,t=ne,r=me,i=be,l=Ie,p=["/properties"];function h(u){return[n,e,s,t,c(this,r),i,c(this,l)].forEach(d=>this.addMetaSchema(d,void 0,!1)),this;function c(d,a){return u?d.$dataMetaSchema(a,p):a}}return $.default=h,$}var g;function Se(){return g||(g=1,function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;const s=o.requireCore(),t=o.requireDraft7(),r=y.requireDynamic(),i=y.requireNext(),l=y.requireUnevaluated(),p=o.requireDiscriminator(),h=Ne(),u="https://json-schema.org/draft/2019-09/schema";class c extends s.default{constructor(f={}){super({...f,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(r.default),t.default.forEach(f=>this.addVocabulary(f)),this.addVocabulary(i.default),this.addVocabulary(l.default),this.opts.discriminator&&this.addKeyword(p.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:f,meta:A}=this.opts;A&&(h.default.call(this,f),this.refs["http://json-schema.org/schema"]=u)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.Ajv2019=c,n.exports=e=c,n.exports.Ajv2019=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var d=o.requireValidate();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var a=o.requireCodegen();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return a.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return a.CodeGen}});var j=o.requireValidation_error();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return j.default}});var _=o.requireRef_error();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return _.default}})}(m,m.exports)),m.exports}var b=Se();const Ce=o.getDefaultExportFromCjs(b),De=P({__proto__:null,default:Ce},[b]);exports._2019=De;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as _, a as A, b as P, c as R, d as O, e as q, f as M, g as I } from "./index-
|
|
2
|
-
import { r as N, a as S, b as C } from "./index-
|
|
1
|
+
import { r as _, a as A, b as P, c as R, d as O, e as q, f as M, g as I } from "./index-CWq36UAJ.js";
|
|
2
|
+
import { r as N, a as S, b as C } from "./index-Clw0AwwJ.js";
|
|
3
3
|
function D(o, e) {
|
|
4
4
|
for (var n = 0; n < e.length; n++) {
|
|
5
5
|
const t = e[n];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as _, i as A, j as R, k as q, l as P, r as S, b as O, c as M, d as I, e as N, f as C, g as D } from "./index-
|
|
2
|
-
import { r as V, a as E, b as T } from "./index-
|
|
1
|
+
import { h as _, i as A, j as R, k as q, l as P, r as S, b as O, c as M, d as I, e as N, f as C, g as D } from "./index-CWq36UAJ.js";
|
|
2
|
+
import { r as V, a as E, b as T } from "./index-Clw0AwwJ.js";
|
|
3
3
|
function w(r, e) {
|
|
4
4
|
for (var n = 0; n < e.length; n++) {
|
|
5
5
|
const t = e[n];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./index-B0ff5lT-.cjs"),b=require("./index-C2VAPX2b.cjs");function R(n,e){for(var o=0;o<e.length;o++){const a=e[o];if(typeof a!="string"&&!Array.isArray(a)){for(const r in a)if(r!=="default"&&!(r in n)){const s=Object.getOwnPropertyDescriptor(a,r);s&&Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:()=>a[r]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var l={exports:{}},p={},g;function q(){if(g)return p;g=1,Object.defineProperty(p,"__esModule",{value:!0});const n=t.requireCore$1(),e=t.requireValidation(),o=t.requireApplicator(),a=b.requireDynamic(),r=b.requireNext(),s=b.requireUnevaluated(),m=t.requireFormat(),c=t.requireMetadata(),u=[a.default,n.default,e.default,(0,o.default)(!0),m.default,c.metadataVocabulary,c.contentVocabulary,r.default,s.default];return p.default=u,p}var y={};const P="https://json-schema.org/draft/2020-12/schema",S="https://json-schema.org/draft/2020-12/schema",O={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},M="meta",I="Core and Validation specifications meta-schema",N=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],C=["object","boolean"],D="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",V={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},E={$schema:P,$id:S,$vocabulary:O,$dynamicAnchor:M,title:I,allOf:N,type:C,$comment:D,properties:V},T="https://json-schema.org/draft/2020-12/schema",w="https://json-schema.org/draft/2020-12/meta/applicator",x={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},K="meta",z="Applicator vocabulary meta-schema",F=["object","boolean"],G={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},U={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},k={$schema:T,$id:w,$vocabulary:x,$dynamicAnchor:K,title:z,type:F,properties:G,$defs:U},J="https://json-schema.org/draft/2020-12/schema",L="https://json-schema.org/draft/2020-12/meta/unevaluated",Z={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},H="meta",B="Unevaluated applicator vocabulary meta-schema",Q=["object","boolean"],W={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},X={$schema:J,$id:L,$vocabulary:Z,$dynamicAnchor:H,title:B,type:Q,properties:W},Y="https://json-schema.org/draft/2020-12/schema",ee="https://json-schema.org/draft/2020-12/meta/content",te={"https://json-schema.org/draft/2020-12/vocab/content":!0},ae="meta",re="Content vocabulary meta-schema",ne=["object","boolean"],oe={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},se={$schema:Y,$id:ee,$vocabulary:te,$dynamicAnchor:ae,title:re,type:ne,properties:oe},ce="https://json-schema.org/draft/2020-12/schema",ie="https://json-schema.org/draft/2020-12/meta/core",de={"https://json-schema.org/draft/2020-12/vocab/core":!0},me="meta",ue="Core vocabulary meta-schema",fe=["object","boolean"],$e={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},le={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},pe={$schema:ce,$id:ie,$vocabulary:de,$dynamicAnchor:me,title:ue,type:fe,properties:$e,$defs:le},ye="https://json-schema.org/draft/2020-12/schema",he="https://json-schema.org/draft/2020-12/meta/format-annotation",be={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},ge="meta",ve="Format vocabulary meta-schema for annotation results",je=["object","boolean"],_e={format:{type:"string"}},Ae={$schema:ye,$id:he,$vocabulary:be,$dynamicAnchor:ge,title:ve,type:je,properties:_e},Re="https://json-schema.org/draft/2020-12/schema",qe="https://json-schema.org/draft/2020-12/meta/meta-data",Pe={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Se="meta",Oe="Meta-data vocabulary meta-schema",Me=["object","boolean"],Ie={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},Ne={$schema:Re,$id:qe,$vocabulary:Pe,$dynamicAnchor:Se,title:Oe,type:Me,properties:Ie},Ce="https://json-schema.org/draft/2020-12/schema",De="https://json-schema.org/draft/2020-12/meta/validation",Ve={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Ee="meta",Te="Validation vocabulary meta-schema",we=["object","boolean"],xe={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},Ke={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},ze={$schema:Ce,$id:De,$vocabulary:Ve,$dynamicAnchor:Ee,title:Te,type:we,properties:xe,$defs:Ke};var v;function Fe(){if(v)return y;v=1,Object.defineProperty(y,"__esModule",{value:!0});const n=E,e=k,o=X,a=se,r=pe,s=Ae,m=Ne,c=ze,u=["/properties"];function i(h){return[n,e,o,a,r,f(this,s),m,f(this,c)].forEach($=>this.addMetaSchema($,void 0,!1)),this;function f($,d){return h?$.$dataMetaSchema(d,u):d}}return y.default=i,y}var j;function Ge(){return j||(j=1,function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const o=t.requireCore(),a=q(),r=t.requireDiscriminator(),s=Fe(),m="https://json-schema.org/draft/2020-12/schema";class c extends o.default{constructor(d={}){super({...d,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),a.default.forEach(d=>this.addVocabulary(d)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:d,meta:A}=this.opts;A&&(s.default.call(this,d),this.refs["http://json-schema.org/schema"]=m)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(m)?m:void 0)}}e.Ajv2020=c,n.exports=e=c,n.exports.Ajv2020=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=t.requireValidate();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var i=t.requireCodegen();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});var h=t.requireValidation_error();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var f=t.requireRef_error();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(l,l.exports)),l.exports}var _=Ge();const Ue=t.getDefaultExportFromCjs(_),ke=R({__proto__:null,default:Ue},[_]);exports._2020=ke;
|
|
1
|
+
"use strict";const t=require("./index-BZ2AX5sk.cjs"),b=require("./index-DRDJFYRb.cjs");function R(n,e){for(var o=0;o<e.length;o++){const a=e[o];if(typeof a!="string"&&!Array.isArray(a)){for(const r in a)if(r!=="default"&&!(r in n)){const s=Object.getOwnPropertyDescriptor(a,r);s&&Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:()=>a[r]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var l={exports:{}},p={},g;function q(){if(g)return p;g=1,Object.defineProperty(p,"__esModule",{value:!0});const n=t.requireCore$1(),e=t.requireValidation(),o=t.requireApplicator(),a=b.requireDynamic(),r=b.requireNext(),s=b.requireUnevaluated(),m=t.requireFormat(),c=t.requireMetadata(),u=[a.default,n.default,e.default,(0,o.default)(!0),m.default,c.metadataVocabulary,c.contentVocabulary,r.default,s.default];return p.default=u,p}var y={};const P="https://json-schema.org/draft/2020-12/schema",S="https://json-schema.org/draft/2020-12/schema",O={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},M="meta",I="Core and Validation specifications meta-schema",N=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],C=["object","boolean"],D="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",V={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},E={$schema:P,$id:S,$vocabulary:O,$dynamicAnchor:M,title:I,allOf:N,type:C,$comment:D,properties:V},T="https://json-schema.org/draft/2020-12/schema",w="https://json-schema.org/draft/2020-12/meta/applicator",x={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},K="meta",z="Applicator vocabulary meta-schema",F=["object","boolean"],G={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},U={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},k={$schema:T,$id:w,$vocabulary:x,$dynamicAnchor:K,title:z,type:F,properties:G,$defs:U},J="https://json-schema.org/draft/2020-12/schema",L="https://json-schema.org/draft/2020-12/meta/unevaluated",Z={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},H="meta",B="Unevaluated applicator vocabulary meta-schema",Q=["object","boolean"],W={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},X={$schema:J,$id:L,$vocabulary:Z,$dynamicAnchor:H,title:B,type:Q,properties:W},Y="https://json-schema.org/draft/2020-12/schema",ee="https://json-schema.org/draft/2020-12/meta/content",te={"https://json-schema.org/draft/2020-12/vocab/content":!0},ae="meta",re="Content vocabulary meta-schema",ne=["object","boolean"],oe={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},se={$schema:Y,$id:ee,$vocabulary:te,$dynamicAnchor:ae,title:re,type:ne,properties:oe},ce="https://json-schema.org/draft/2020-12/schema",ie="https://json-schema.org/draft/2020-12/meta/core",de={"https://json-schema.org/draft/2020-12/vocab/core":!0},me="meta",ue="Core vocabulary meta-schema",fe=["object","boolean"],$e={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},le={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},pe={$schema:ce,$id:ie,$vocabulary:de,$dynamicAnchor:me,title:ue,type:fe,properties:$e,$defs:le},ye="https://json-schema.org/draft/2020-12/schema",he="https://json-schema.org/draft/2020-12/meta/format-annotation",be={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},ge="meta",ve="Format vocabulary meta-schema for annotation results",je=["object","boolean"],_e={format:{type:"string"}},Ae={$schema:ye,$id:he,$vocabulary:be,$dynamicAnchor:ge,title:ve,type:je,properties:_e},Re="https://json-schema.org/draft/2020-12/schema",qe="https://json-schema.org/draft/2020-12/meta/meta-data",Pe={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Se="meta",Oe="Meta-data vocabulary meta-schema",Me=["object","boolean"],Ie={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},Ne={$schema:Re,$id:qe,$vocabulary:Pe,$dynamicAnchor:Se,title:Oe,type:Me,properties:Ie},Ce="https://json-schema.org/draft/2020-12/schema",De="https://json-schema.org/draft/2020-12/meta/validation",Ve={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Ee="meta",Te="Validation vocabulary meta-schema",we=["object","boolean"],xe={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},Ke={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},ze={$schema:Ce,$id:De,$vocabulary:Ve,$dynamicAnchor:Ee,title:Te,type:we,properties:xe,$defs:Ke};var v;function Fe(){if(v)return y;v=1,Object.defineProperty(y,"__esModule",{value:!0});const n=E,e=k,o=X,a=se,r=pe,s=Ae,m=Ne,c=ze,u=["/properties"];function i(h){return[n,e,o,a,r,f(this,s),m,f(this,c)].forEach($=>this.addMetaSchema($,void 0,!1)),this;function f($,d){return h?$.$dataMetaSchema(d,u):d}}return y.default=i,y}var j;function Ge(){return j||(j=1,function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const o=t.requireCore(),a=q(),r=t.requireDiscriminator(),s=Fe(),m="https://json-schema.org/draft/2020-12/schema";class c extends o.default{constructor(d={}){super({...d,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),a.default.forEach(d=>this.addVocabulary(d)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:d,meta:A}=this.opts;A&&(s.default.call(this,d),this.refs["http://json-schema.org/schema"]=m)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(m)?m:void 0)}}e.Ajv2020=c,n.exports=e=c,n.exports.Ajv2020=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=t.requireValidate();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var i=t.requireCodegen();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});var h=t.requireValidation_error();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var f=t.requireRef_error();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}(l,l.exports)),l.exports}var _=Ge();const Ue=t.getDefaultExportFromCjs(_),ke=R({__proto__:null,default:Ue},[_]);exports._2020=ke;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-C21osktO.cjs"),a={loadingExtended:"جاري التحميل، يرجى الانتظار",loadingShort:"جاري التحميل...",locale:"اللغة",iconDescription:"أيقونة",loadingIcon:"أيقونة التحميل",failedToLoadIcon:"فشل في تحميل الأيقونة",editLabel:"تحرير",selectOne:"اختر واحد",selectMany:"اختر عدة",noResults:"لا نتائج",passwordPlaceholderText:"كلمة المرور السرية",togglePasswordVisibility:"إظهار/إخفاء كلمة المرور",toggleMenu:"تبديل القائمة",toggleAside:"تبديل اللوحة الجانبية",mainNavigation:"القائمة الرئيسية",sidebar:"الشريط الجانبي",closeDrawer:"إغلاق الدرج",closeModal:"إغلاق النافذة المنبثقة",confirm:"تأكيد",cancel:"إلغاء",addLabel:"إضافة",removeItem:"إزالة العنصر",currentLocale:"العربية",ar:"العربية",de:"الألمانية",en:"الإنجليزية",es:"الأسبانية",fr:"الفرنسية",hi:"الهندية",it:"الإيطالية",ja:"اليابانية",ko:"الكورية",nl:"الهولندية",pl:"البولندية",pt:"البرتغالية",ru:"الروسية",tr:"التركية",vi:"الفيتنامية",zh:"الصينية",he:"العبرية",fa:"الفارسية",ur:"الأردية",emailPlaceholderText:"بريدك الإلكتروني",incrementValue:"زيادة القيمة",decrementValue:"تقليل القيمة",dropZoneInstructions:e=>e?"انقر للاختيار أو اسحب الملفات هنا، أو اضغط Enter أو Space لفتح محدد الملفات":"اسحب الملفات هنا",fileSizeUnits:["بايت","ك.ب","م.ب","ج.ب","ت.ب"],removeFile:"إزالة الملف",clearAllFiles:"مسح كل الملفات",clearValue:"مسح القيمة",unknownType:"نوع غير معروف",filesInputInstructions:(e,t,l)=>{let n=e==null||e>1?"انقر للاختيار أو اسحب الملفات هنا":"انقر للاختيار أو اسحب ملف هنا";if(e||t){const o=[];if(e!=null&&e>1&&o.push(`حتى ${e} ملفات`),t&&l){const i=r.formatFileSize(t,{units:l});o.push(`حد أقصى ${i} لكل ملف`)}o.length>0&&(n+=` (${o.join("، ")})`)}else if(t&&l){const o=r.formatFileSize(t,{units:l});n+=` (حد أقصى ${o})`}return n},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"}};exports.default=a;
|
package/dist/auth/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@tempots/dom"),u=require("../notice-CncwkUTy.cjs"),w=require("../modal-BRUgTJG9.cjs"),S=require("../translations-DRNj0YIi.cjs"),y=require("../translations-Dw1oO6Dh.cjs"),X=require("@tempots/ui"),q={google:{name:"Google",icon:"logos:google-icon",color:"#4285f4"},github:{name:"GitHub",icon:"logos:github-icon",color:"#333"},apple:{name:"Apple",icon:"logos:apple",color:"#000"},facebook:{name:"Facebook",icon:"logos:facebook",color:"#1877f2"},twitter:{name:"Twitter",icon:"logos:twitter",color:"#1da1f2"},microsoft:{name:"Microsoft",icon:"logos:microsoft-icon",color:"#00a4ef"},discord:{name:"Discord",icon:"logos:discord-icon",color:"#5865f2"},linkedin:{name:"LinkedIn",icon:"logos:linkedin-icon",color:"#0077b5"},instagram:{name:"Instagram",icon:"logos:instagram-icon",color:"#e4405f"},tiktok:{name:"TikTok",icon:"logos:tiktok-icon",color:"#000"},snapchat:{name:"Snapchat",icon:"logos:snapchat-icon",color:"#fffc00"},reddit:{name:"Reddit",icon:"logos:reddit-icon",color:"#ff4500"},pinterest:{name:"Pinterest",icon:"logos:pinterest-icon",color:"#bd081c"},twitch:{name:"Twitch",icon:"logos:twitch",color:"#9146ff"},steam:{name:"Steam",icon:"logos:steam-icon",color:"#000"},epic:{name:"Epic Games",icon:"simple-icons:epicgames",color:"#313131"},playstation:{name:"PlayStation",icon:"logos:playstation-icon",color:"#003791"},xbox:{name:"Xbox",icon:"logos:xbox-icon",color:"#107c10"},whatsapp:{name:"WhatsApp",icon:"logos:whatsapp-icon",color:"#25d366"},wechat:{name:"WeChat",icon:"logos:wechat-icon",color:"#1aad19"},amazon:{name:"Amazon",icon:"logos:amazon-icon",color:"#ff9900"},yahoo:{name:"Yahoo",icon:"logos:yahoo-icon",color:"#720e9e"},paypal:{name:"PayPal",icon:"logos:paypal",color:"#0070ba"},x:{name:"X",icon:"simple-icons:x",color:"#000"}};function D(o){return q[o]?.name||o}function Y(o){return q[o]?.icon||"mdi:account"}function Z(o){return q[o]?.color||"#666"}function J(o,e="Continue with {provider}"){return e.replace("{provider}",D(o))}const P={minLength:8,requireUppercase:!0,requireLowercase:!0,requireNumbers:!0,requireSymbols:!1};function K(o){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)}function V(o=32){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i="";for(let l=0;l<o;l++)i+=e.charAt(Math.floor(Math.random()*e.length));return i}function Q(o,e,i,l=[],c={}){const r={google:"https://accounts.google.com/oauth/authorize",github:"https://github.com/login/oauth/authorize",apple:"https://appleid.apple.com/auth/authorize",facebook:"https://www.facebook.com/v18.0/dialog/oauth",twitter:"https://twitter.com/i/oauth2/authorize",microsoft:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",discord:"https://discord.com/api/oauth2/authorize",linkedin:"https://www.linkedin.com/oauth/v2/authorization",instagram:"https://api.instagram.com/oauth/authorize",tiktok:"https://www.tiktok.com/v2/auth/authorize",snapchat:"https://accounts.snapchat.com/accounts/oauth2/authorize",reddit:"https://www.reddit.com/api/v1/authorize",pinterest:"https://api.pinterest.com/oauth/",twitch:"https://id.twitch.tv/oauth2/authorize",steam:"https://steamcommunity.com/oauth/authorize",epic:"https://auth.epicgames.com/authorize",playstation:"https://auth.api.sonyentertainmentnetwork.com/oauth/authorize",xbox:"https://login.live.com/oauth20_authorize.srf",whatsapp:"https://web.whatsapp.com/oauth/authorize",wechat:"https://open.weixin.qq.com/connect/qrconnect",amazon:"https://www.amazon.com/ap/oa",yahoo:"https://api.login.yahoo.com/oauth2/request_auth",paypal:"https://www.paypal.com/signin/authorize",x:"https://api.twitter.com/oauth2/authorize"},a={google:["openid","email","profile"],github:["user:email"],apple:["email","name"],facebook:["email"],twitter:["users.read"],microsoft:["openid","email","profile"],discord:["identify","email"],linkedin:["r_liteprofile","r_emailaddress"],instagram:["user_profile","user_media"],tiktok:["user.info.basic","user.external.id"],snapchat:["user.info.basic","user.external.id"],reddit:["identity","email"],pinterest:["read_public","read_relationships"],twitch:["openid","email","profile"],steam:["openid","email","profile"],epic:["openid","email","profile"],playstation:["openid","email","profile"],xbox:["openid","email","profile"],whatsapp:["openid","email","profile"],wechat:["openid","email","profile"],amazon:["openid","email","profile"],yahoo:["openid","email","profile"],paypal:["openid","email","profile"],x:["openid","email","profile"]},n=r[o];if(!n)throw new Error(`Unsupported provider: ${o}`);const m=l.length>0?l:a[o],s=V(),f=new URLSearchParams({client_id:e,redirect_uri:i,scope:m.join(" "),state:s,response_type:"code",...c});return`${n}?${f.toString()}`}function tt(o,e,i,l){const c=window.open(o,`${e}_login`,"width=500,height=600,scrollbars=yes,resizable=yes");if(!c){l?.(new Error("Failed to open popup window"));return}const r=setInterval(()=>{c.closed&&(clearInterval(r),l?.(new Error("Login cancelled")))},1e3),a=n=>{n.origin===window.location.origin&&(n.data.type==="SOCIAL_LOGIN_SUCCESS"?(clearInterval(r),c.close(),window.removeEventListener("message",a),i?.(n.data.result)):n.data.type==="SOCIAL_LOGIN_ERROR"&&(clearInterval(r),c.close(),window.removeEventListener("message",a),l?.(new Error(n.data.error))))};window.addEventListener("message",a)}function ot(o){return o instanceof Error?o.message:typeof o=="string"?o:o&&typeof o=="object"&&"message"in o?String(o.message):"An unexpected error occurred"}function et(){return typeof window<"u"&&typeof document<"u"}function A({task:o,message:e,onStart:i,onEnd:l}){return async c=>{i?.();const r=await u.taskToValidation({task:o!=null?()=>o(c):async()=>null,errorMessage:e,errorPath:["root"],validation:a=>a!=null?u.a.invalid({message:a}):u.a.valid});return l?.(),r}}function C(o=P){let e=w.string();return o.minLength&&(e=e.min(o.minLength,`Password must be at least ${o.minLength} characters`)),o.requireUppercase&&(e=e.regex(/[A-Z]/,"Password must contain at least one uppercase letter")),o.requireLowercase&&(e=e.regex(/[a-z]/,"Password must contain at least one lowercase letter")),o.requireNumbers&&(e=e.regex(/[0-9]/,"Password must contain at least one number")),o.requireSymbols&&(e=e.regex(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,"Password must contain at least one special character")),o.customValidation&&(e=e.refine(i=>o.customValidation(i))),e}const B=w.string().min(1,"Email is required").email("Please enter a valid email address");function T(o){const e=o?C(o):w.string().refine(i=>i.length>0?null:"Password is required");return w.object({email:B,password:e,rememberMe:w.boolean().default(!1)}).schema()}function $(o=P,e){const i=C(o),l=e?.showNameField!==!1,c=e?.showConfirmPassword!==!1,r=e?.showAcceptTermsAndConditions!==!1,a={name:l?w.string().min(1,"Name is required").optional():w.string().optional(),email:B,password:i,confirmPassword:c?w.string().min(1,"Please confirm your password"):w.string(),acceptTerms:r?w.boolean().refine(m=>m===!0,"You must accept the terms and conditions"):w.boolean().default(!0)},n=w.object(a);return c?n.refine(m=>m.password===m.confirmPassword?null:"Passwords don't match",{path:["confirmPassword"]}).schema():n.schema()}const W=w.object({email:B}).schema(),at=T(),nt=$(),rt={signIn:T,signUp:$,resetPassword:()=>W};function st(o){const e=B.validate(o);return e.success?null:e.errors[0]?.message||"Invalid email"}function it(o,e=P){const l=C(e).validate(o);return l.success?null:l.errors[0]?.message||"Invalid password"}function O(o,e=P){const i={length:o.length>=(e.minLength||8),uppercase:/[A-Z]/.test(o),lowercase:/[a-z]/.test(o),numbers:/[0-9]/.test(o),symbols:/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(o),custom:e.customValidation?e.customValidation(o)===null:o.length>0},l=[!0,e.requireUppercase,e.requireLowercase,e.requireNumbers,e.requireSymbols,!!e.customValidation].filter(Boolean).length,c=[i.length,e.requireUppercase?i.uppercase:null,e.requireLowercase?i.lowercase:null,e.requireNumbers?i.numbers:null,e.requireSymbols?i.symbols:null,e.customValidation?i.custom:null].filter(n=>n===!0).length,r=l>0?Math.round(c/l*100):0;let a;return r<40?a="weak":r<60?a="fair":r<80?a="good":a="strong",{strength:a,score:r,checks:i}}const F=()=>t.localStorageProp({key:"bui_auth_email",defaultValue:null});function R({onSignIn:o,passwordRules:e,labels:i,showRememberMe:l}){const c=t.prop(!1),r=F(),a=T(e),n=u.useForm({schema:a,onSubmit:A({task:o,message:"Reset password failed",onStart:()=>{c.set(!0),n.controller.disable()},onEnd:()=>{c.set(!1),n.controller.enable()}}),initialValue:{email:"",password:""}}),{controller:m,submit:s}=n;c.on(m.setDisabled);const f=m.field("email"),b=m.field("password");return r.on(h=>{h!=null&&f.change(h)}),f.signal.on(h=>{r.value!=null&&(r.value=h)}),t.Use(S.AuthI18n,h=>t.html.form(t.OnDispose(m.dispose,r.dispose,c.dispose),t.attr.class("bc-auth-form__form"),t.on.submit(s),u.Stack(t.attr.class("bc-auth-form__fields"),t.Ensure(m.error,g=>u.Notice({variant:"danger",tone:"prominent",role:"alert"},t.html.div(g))),u.Control(u.EmailInput,{controller:f,label:t.coalesce(i?.emailLabel,h.$.emailLabel)}),u.Control(u.PasswordInput,{controller:b,label:t.coalesce(i?.passwordLabel,h.$.passwordLabel)}),t.When(l??!0,()=>t.html.div(t.attr.class("bc-auth-form__remember-me"),t.html.label(t.attr.class("bc-auth-form__checkbox-label"),u.CheckboxInput({value:r.map(g=>g!=null),after:t.html.span(t.coalesce(i?.rememberMeLabel,h.$.rememberMeLabel)),onChange:g=>{g?r.value=f.signal.value??"":r.value=null}}))))),y.Button({type:"submit",variant:"filled",color:"primary",loading:c,disabled:m.disabledOrHasErrors},t.attr.class("bc-auth-form__submit"),t.coalesce(i?.signInButton,h.$.signInButton))))}function M({password:o,rules:e=P,showLabel:i=!0,className:l}){const c=t.computedOf(o)(s=>!s||s.length===0?{strength:"weak",score:0,checks:{length:!1,uppercase:!1,lowercase:!1,numbers:!1,symbols:!1,custom:!1}}:O(s,e)),r=c.map(s=>s.strength),a=c.map(s=>s.score),n=c.map(s=>s.checks),m=t.computedOf(r,l)((s,f)=>["bc-password-strength",`bc-password-strength--${s}`,f].filter(Boolean).join(" "));return t.html.div(t.OnDispose(c,m),t.attr.class(m),t.html.div(t.attr.class("bc-password-strength__bar"),t.html.div(t.attr.class("bc-password-strength__fill"),t.attr.style(a.map(s=>`width: ${s}%`)))),t.When(i,()=>t.Use(S.AuthI18n,s=>t.html.div(t.attr.class("bc-password-strength__label"),t.computedOf(r,s)((f,b)=>{switch(f){case"weak":return b.passwordStrengthWeak;case"fair":return b.passwordStrengthFair;case"good":return b.passwordStrengthGood;case"strong":return b.passwordStrengthStrong;default:return b.passwordStrengthWeak}})))),t.html.div(t.attr.class("bc-password-strength__requirements"),t.When(e.minLength!==void 0,()=>t.html.div(t.attr.class("bc-password-strength__requirement"),t.attr.class(t.computedOf(n)(s=>s.length?"bc-password-strength__requirement--met":"")),t.html.span(t.attr.class("bc-password-strength__requirement-icon"),t.computedOf(n)(s=>s.length?"✓":"○")),t.html.span(t.attr.class("bc-password-strength__requirement-text"),`At least ${e.minLength} characters`))),t.When(e.requireUppercase===!0,()=>t.html.div(t.attr.class("bc-password-strength__requirement"),t.attr.class(t.computedOf(n)(s=>s.uppercase?"bc-password-strength__requirement--met":"")),t.html.span(t.attr.class("bc-password-strength__requirement-icon"),t.computedOf(n)(s=>s.uppercase?"✓":"○")),t.html.span(t.attr.class("bc-password-strength__requirement-text"),"One uppercase letter"))),t.When(e.requireLowercase===!0,()=>t.html.div(t.attr.class("bc-password-strength__requirement"),t.attr.class(t.computedOf(n)(s=>s.lowercase?"bc-password-strength__requirement--met":"")),t.html.span(t.attr.class("bc-password-strength__requirement-icon"),t.computedOf(n)(s=>s.lowercase?"✓":"○")),t.html.span(t.attr.class("bc-password-strength__requirement-text"),"One lowercase letter"))),t.When(e.requireNumbers===!0,()=>t.html.div(t.attr.class("bc-password-strength__requirement"),t.attr.class(t.computedOf(n)(s=>s.numbers?"bc-password-strength__requirement--met":"")),t.html.span(t.attr.class("bc-password-strength__requirement-icon"),t.computedOf(n)(s=>s.numbers?"✓":"○")),t.html.span(t.attr.class("bc-password-strength__requirement-text"),"One number"))),t.When(e.requireSymbols===!0,()=>t.html.div(t.attr.class("bc-password-strength__requirement"),t.attr.class(t.computedOf(n)(s=>s.symbols?"bc-password-strength__requirement--met":"")),t.html.span(t.attr.class("bc-password-strength__requirement-icon"),t.computedOf(n)(s=>s.symbols?"✓":"○")),t.html.span(t.attr.class("bc-password-strength__requirement-text"),"One special character")))))}function ct({password:o,rules:e=P,className:i}){const l=t.computedOf(o)(n=>!n||n.length===0?{strength:"weak",score:0}:O(n,e)),c=l.map(n=>n.strength),r=l.map(n=>n.score),a=t.computedOf(c,i)((n,m)=>["bc-password-strength-bar",`bc-password-strength-bar--${n}`,m].filter(Boolean).join(" "));return t.html.div(t.OnDispose(l,a),t.attr.class(a),t.html.div(t.attr.class("bc-password-strength-bar__fill"),t.attr.style(r.map(n=>`width: ${n}%`))))}function lt({password:o,rules:e=P,className:i}){const l=t.computedOf(o)(r=>!r||r.length===0?"weak":O(r,e).strength),c=t.computedOf(l,i)((r,a)=>["bc-password-strength-text",`bc-password-strength-text--${r}`,a].filter(Boolean).join(" "));return t.Fragment(t.OnDispose(l,c),t.Use(S.AuthI18n,r=>t.html.span(t.attr.class(c),t.computedOf(l,r)((a,n)=>{switch(a){case"weak":return n.passwordStrengthWeak;case"fair":return n.passwordStrengthFair;case"good":return n.passwordStrengthGood;case"strong":return n.passwordStrengthStrong;default:return n.passwordStrengthWeak}}))))}function N({passwordRules:o,labels:e,showPasswordStrength:i,onSignUp:l,showNameField:c,showConfirmPassword:r,showAcceptTermsAndConditions:a,termsAndConditions:n}){const m=t.prop(!1),s=o||P,f=$(s,{showNameField:c!==!1,showConfirmPassword:r!==!1,showAcceptTermsAndConditions:a!==!1}),b=u.useForm({schema:f,onSubmit:A({task:l!=null?v=>l({email:v.email,password:v.password,name:v.name}):void 0,message:"Reset password failed",onStart:()=>{m.set(!0),b.controller.disable()},onEnd:()=>{m.set(!1),b.controller.enable()}}),initialValue:{name:"",email:"",password:"",confirmPassword:"",acceptTerms:!1}}),{controller:h,submit:g}=b;m.on(h.setDisabled);const _=h.field("name"),I=h.field("email"),x=h.field("password"),z=h.field("confirmPassword"),k=h.field("acceptTerms");return t.Use(S.AuthI18n,v=>t.html.form(t.OnDispose(h.dispose,m.dispose),t.attr.class("bc-auth-form__form"),t.on.submit(g),u.Stack(t.attr.class("bc-auth-form__fields"),t.Ensure(h.error,L=>u.Notice({variant:"danger",tone:"prominent",role:"alert"},t.html.div(L))),t.When(c!==!1,()=>u.Control(y.TextInput,{controller:_.transform(L=>L??"",L=>L===""?void 0:L),label:t.coalesce(e?.nameLabel,v.$.nameLabel)})),u.Control(u.EmailInput,{controller:I,label:t.coalesce(e?.emailLabel,v.$.emailLabel)}),u.Control(u.PasswordInput,{controller:x,label:t.coalesce(e?.passwordLabel,v.$.passwordLabel)}),t.When(i??!1,()=>M({password:x.signal,rules:s,showLabel:!0})),t.When(r??!1,()=>u.Control(u.PasswordInput,{controller:z,label:t.coalesce(e?.confirmPasswordLabel,v.$.confirmPasswordLabel)})),t.When(a??!1,()=>t.html.div(t.attr.class("bc-auth-form__terms"),t.html.label(t.attr.class("bc-auth-form__checkbox-label"),u.CheckboxInput({value:k.signal.map(L=>L??!1),onChange:L=>k.change(L)}),t.html.span(n||t.coalesce(e?.acceptTermsLabel,v.$.acceptTermsLabel))),t.When(k.errorVisible,()=>t.html.div(t.attr.class("bc-auth-form__field-error"),k.error.map(L=>L||"")))))),y.Button({type:"submit",variant:"filled",color:"primary",loading:m,disabled:h.disabledOrHasErrors},t.attr.class("bc-auth-form__submit"),t.coalesce(e?.signUpButton,v.$.signUpButton))))}function G({onResetPassword:o,labels:e={}}){const i=F(),l=t.prop(!1),c=u.useForm({schema:W,onSubmit:A({task:o,message:"Reset password failed",onStart:()=>{l.set(!0),c.controller.disable()},onEnd:()=>{l.set(!1),c.controller.enable()}}),initialValue:{email:""}}),{controller:r,submit:a}=c;l.on(r.setDisabled);const n=r.field("email");return i.on(m=>{m!=null&&n.change(m)}),t.Use(S.AuthI18n,m=>t.html.form(t.OnDispose(r.dispose,i.dispose,l.dispose),t.attr.class("bc-auth-form__form"),t.Ensure(r.error,s=>u.Notice({variant:"danger",tone:"prominent",role:"alert"},t.html.div(s))),t.html.p(t.attr.class("bc-auth-form__description"),t.coalesce(e?.resetPasswordDescription,m.$.resetPasswordDescription)),t.on.submit(a),u.Stack(t.attr.class("bc-auth-form__fields"),u.Control(u.EmailInput,{controller:n,label:t.coalesce(e?.emailLabel,m.$.emailLabel)})),y.Button({loading:l,type:"submit",variant:"filled",color:"primary",disabled:r.disabledOrHasErrors},t.attr.class("bc-auth-form__submit"),t.coalesce(e?.resetPasswordButton,m.$.resetPasswordButton))))}function p({provider:o,onClick:e,size:i="md",name:l,icon:c,color:r,flow:a,labels:n}){const m=async()=>{if(e)try{a==="popup"?await e():await e()}catch(s){console.error(`Social login error for ${o} (${a||"redirect"} flow):`,s)}};return y.Button({type:"button",variant:"filled",size:i,color:r,onClick:m,roundedness:"full"},t.attr.class("bc-social-login-button"),t.attr.class(t.computedOf(o)(s=>`bc-social-login-button--${s}`)),t.html.span(t.attr.class("bc-social-login-button__inner"),t.html.span(t.attr.class("bc-social-login-button__icon"),y.Icon({icon:c,size:i},t.attr.class("bc-social-login-button__icon-inner"))),t.Use(S.AuthI18n,s=>t.html.span(t.attr.class("bc-social-login-button__label"),t.bind(t.coalesce(n?.continueWithProvider,s.$.continueWithProvider))(l)))))}function j({providers:o,onProviderClick:e,size:i="md",className:l}){return u.Stack(t.attr.class("bc-social-login-buttons"),t.attr.class(l),t.ForEach(o,c=>p({provider:c.$.provider,flow:c.$.flow,color:c.map(({provider:r})=>d[r].color),name:c.map(({provider:r})=>d[r].name),icon:c.map(({provider:r})=>d[r].icon),onClick:async()=>{e&&await e(c.$.provider.value)},size:i})))}const d={google:{name:"Google",icon:"logos:google-icon",color:"red"},github:{name:"GitHub",icon:"logos:github-icon",color:"black"},apple:{name:"Apple",icon:"logos:apple",color:"stone"},facebook:{name:"Facebook",icon:"logos:facebook",color:"blue"},twitter:{name:"Twitter",icon:"logos:twitter",color:"sky"},x:{name:"X",icon:"logos:x",color:"zinc"},microsoft:{name:"Microsoft",icon:"logos:microsoft-icon",color:"amber"},discord:{name:"Discord",icon:"logos:discord-icon",color:"indigo"},linkedin:{name:"LinkedIn",icon:"logos:linkedin-icon",color:"cyan"},instagram:{name:"Instagram",icon:"logos:instagram-icon",color:"fuchsia"},tiktok:{name:"TikTok",icon:"logos:tiktok-icon",color:"teal"},snapchat:{name:"Snapchat",icon:"streamline-logos:snapchat-logo-solid",color:"yellow"},reddit:{name:"Reddit",icon:"logos:reddit-icon",color:"orange"},pinterest:{name:"Pinterest",icon:"logos:pinterest",color:"rose"},twitch:{name:"Twitch",icon:"logos:twitch",color:"purple"},steam:{name:"Steam",icon:"logos:steam",color:"slate"},epic:{name:"Epic Games",icon:"streamline-logos:epic-games-logo-solid",color:"neutral"},playstation:{name:"PlayStation",icon:"streamline-logos:playstation-logo-solid",color:"violet"},xbox:{name:"Xbox",icon:"streamline-logos:xbox-live-logo-solid",color:"green"},whatsapp:{name:"WhatsApp",icon:"logos:whatsapp-icon",color:"emerald"},wechat:{name:"WeChat",icon:"streamline-logos:wechat-logo",color:"lime"},amazon:{name:"Amazon",icon:"streamline-logos:amazon-logo-solid",color:"red"},yahoo:{name:"Yahoo",icon:"logos:yahoo",color:"rose"},paypal:{name:"PayPal",icon:"logos:paypal",color:"blue"}},mt=o=>p({...o,...d.google,provider:"google"}),ut=o=>p({...o,...d.github,provider:"github"}),dt=o=>p({...o,...d.apple,provider:"apple"}),pt=o=>p({...o,...d.facebook,provider:"facebook"}),ht=o=>p({...o,...d.x,provider:"x"}),gt=o=>p({...o,...d.twitter,provider:"twitter"}),ft=o=>p({...o,...d.microsoft,provider:"microsoft"}),bt=o=>p({...o,...d.discord,provider:"discord"}),wt=o=>p({...o,...d.linkedin,provider:"linkedin"}),Lt=o=>p({...o,...d.instagram,provider:"instagram"}),_t=o=>p({...o,...d.tiktok,provider:"tiktok"}),kt=o=>p({...o,...d.snapchat,provider:"snapchat"}),vt=o=>p({...o,...d.reddit,provider:"reddit"}),St=o=>p({...o,...d.pinterest,provider:"pinterest"}),Pt=o=>p({...o,...d.twitch,provider:"twitch"}),yt=o=>p({...o,...d.steam,provider:"steam"}),Bt=o=>p({...o,...d.epic,provider:"epic"}),It=o=>p({...o,...d.playstation,provider:"playstation"}),xt=o=>p({...o,...d.xbox,provider:"xbox"}),qt=o=>p({...o,...d.whatsapp,provider:"whatsapp"}),At=o=>p({...o,...d.wechat,provider:"wechat"}),Ct=o=>p({...o,...d.amazon,provider:"amazon"}),Tt=o=>p({...o,...d.yahoo,provider:"yahoo"}),$t=o=>p({...o,...d.paypal,provider:"paypal"});function E({providers:o}){return u.Stack(j({providers:o}))}function H({mode:o,socialProviders:e,passwordRules:i,showRememberMe:l,showSocialDivider:c,showPasswordStrength:r,labels:a,onSignIn:n,onSignUp:m,onResetPassword:s,onModeChange:f,showContainer:b},...h){const g=o!=null?t.Value.deriveProp(o):t.prop("signin");return g.on(_=>f?.(_)),t.Use(S.AuthI18n,_=>{function I(){const k=t.coalesce(a?.hasAccountLink,_.$.hasAccountLink);return t.html.button(t.attr.type("button"),t.attr.class("bc-auth-form__link"),t.on.click(()=>g.set("signin")),k)}function x(){return t.html.button(t.attr.type("button"),t.attr.class("bc-auth-form__link"),t.on.click(()=>g.set("signup")),t.coalesce(a?.noAccountLink,_.$.noAccountLink))}function z(){return t.html.button(t.attr.type("button"),t.attr.class("bc-auth-form__link"),t.on.click(()=>g.set("reset-password")),t.coalesce(a?.forgotPasswordLink,_.$.forgotPasswordLink))}return t.html.div(X.classes({"bc-auth-container":!0,"bc-auth-container--styled":t.Value.map(b??!0,k=>k)}),t.attr.class(g.map(k=>`bc-auth-container--${k}`)),t.attr.class("bc-auth-form"),t.OnDispose(g.dispose),t.OneOfValue(g,{signin:()=>t.Fragment(t.html.h2(t.attr.class("bc-auth-form__title"),t.coalesce(a?.signInTitle,_.$.signInTitle)),e!=null?t.Fragment(E({providers:e}),t.When(c??!1,U)):null,R({onSignIn:n,showRememberMe:l,passwordRules:i,labels:{emailLabel:a?.emailLabel,passwordLabel:a?.passwordLabel,rememberMeLabel:a?.rememberMeLabel,signInButton:a?.signInButton,forgotPasswordLink:a?.forgotPasswordLink,noAccountLink:a?.noAccountLink}}),u.Stack(t.attr.class("bc-auth-form__footer"),x(),z())),signup:()=>t.Fragment(t.html.h2(t.attr.class("bc-auth-form__title"),t.coalesce(a?.signUpTitle,_.$.signUpTitle)),e!=null?t.Fragment(E({providers:e}),t.When(c??!1,U)):null,N({labels:{nameLabel:a?.nameLabel,emailLabel:a?.emailLabel,passwordLabel:a?.passwordLabel,confirmPasswordLabel:a?.confirmPasswordLabel,acceptTermsLabel:a?.acceptTermsLabel,signUpButton:a?.signUpButton,hasAccountLink:a?.hasAccountLink},onSignUp:m,passwordRules:i,showPasswordStrength:r}),u.Stack(t.attr.class("bc-auth-form__footer"),I())),"reset-password":()=>t.Fragment(t.html.h2(t.attr.class("bc-auth-form__title"),t.coalesce(a?.resetPasswordTitle,_.$.resetPasswordTitle)),G({labels:{backToSignInLink:a?.backToSignInLink,emailLabel:a?.emailLabel,resetPasswordButton:a?.resetPasswordButton,resetPasswordDescription:a?.resetPasswordDescription},onResetPassword:s}),u.Stack(t.attr.class("bc-auth-form__footer"),I()))}),...h)})}function Ot(o){return w.Modal({size:"sm",dismissable:!0,showCloseButton:!0},(e,i)=>o(l=>e({body:H({showContainer:!1,...l}),header:t.Use(S.AuthI18n,c=>t.coalesce(l.modalTitle,c.$.authenticationTitle))})))}function U({labels:o,className:e}={}){return t.html.div(t.attr.class("bc-auth-divider"),t.attr.class(e),t.html.div(t.attr.class("bc-auth-divider__line")),t.Use(S.AuthI18n,i=>t.html.span(t.attr.class("bc-auth-divider__text"),t.coalesce(o?.text,i.$.orDivider))),t.html.div(t.attr.class("bc-auth-divider__line")))}exports.AmazonLoginButton=Ct;exports.AppleLoginButton=dt;exports.AuthContainer=H;exports.AuthDivider=U;exports.AuthModal=Ot;exports.DiscordLoginButton=bt;exports.EpicLoginButton=Bt;exports.FacebookLoginButton=pt;exports.GitHubLoginButton=ut;exports.GoogleLoginButton=mt;exports.InstagramLoginButton=Lt;exports.LinkedInLoginButton=wt;exports.MicrosoftLoginButton=ft;exports.PasswordStrengthBar=ct;exports.PasswordStrengthIndicator=M;exports.PasswordStrengthText=lt;exports.PayPalLoginButton=$t;exports.PinterestLoginButton=St;exports.PlayStationLoginButton=It;exports.RedditLoginButton=vt;exports.ResetPasswordForm=G;exports.SignInForm=R;exports.SignUpForm=N;exports.SnapchatLoginButton=kt;exports.SocialLoginButton=p;exports.SocialLoginButtons=j;exports.SocialProviders=E;exports.SteamLoginButton=yt;exports.TiktokLoginButton=_t;exports.TwitchLoginButton=Pt;exports.TwitterLoginButton=gt;exports.WeChatLoginButton=At;exports.WhatsAppLoginButton=qt;exports.XLoginButtin=ht;exports.XboxLoginButton=xt;exports.YahooLoginButton=Tt;exports.authSchemas=rt;exports.calculatePasswordStrength=O;exports.createPasswordSchema=C;exports.createSignInSchema=T;exports.createSignUpSchema=$;exports.createSocialLoginUrl=Q;exports.defaultPasswordRules=P;exports.defaultSignInSchema=at;exports.defaultSignUpSchema=nt;exports.emailSchema=B;exports.formatAuthError=ot;exports.formatProviderName=D;exports.formatSocialLoginText=J;exports.generateRandomString=V;exports.getProviderColor=Z;exports.getProviderIcon=Y;exports.isBrowser=et;exports.isValidEmail=K;exports.openSocialLoginPopup=tt;exports.providerInfo=q;exports.requestToControllerValidation=A;exports.resetPasswordSchema=W;exports.socialProviderInfo=d;exports.useAuthEmailProp=F;exports.validateEmail=st;exports.validatePassword=it;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@tempots/dom"),u=require("../notice-D3P0lewM.cjs"),w=require("../modal-BmSRMdY9.cjs"),S=require("../translations-B7_3phoA.cjs"),y=require("../translations-C21osktO.cjs"),X=require("@tempots/ui"),q={google:{name:"Google",icon:"logos:google-icon",color:"#4285f4"},github:{name:"GitHub",icon:"logos:github-icon",color:"#333"},apple:{name:"Apple",icon:"logos:apple",color:"#000"},facebook:{name:"Facebook",icon:"logos:facebook",color:"#1877f2"},twitter:{name:"Twitter",icon:"logos:twitter",color:"#1da1f2"},microsoft:{name:"Microsoft",icon:"logos:microsoft-icon",color:"#00a4ef"},discord:{name:"Discord",icon:"logos:discord-icon",color:"#5865f2"},linkedin:{name:"LinkedIn",icon:"logos:linkedin-icon",color:"#0077b5"},instagram:{name:"Instagram",icon:"logos:instagram-icon",color:"#e4405f"},tiktok:{name:"TikTok",icon:"logos:tiktok-icon",color:"#000"},snapchat:{name:"Snapchat",icon:"logos:snapchat-icon",color:"#fffc00"},reddit:{name:"Reddit",icon:"logos:reddit-icon",color:"#ff4500"},pinterest:{name:"Pinterest",icon:"logos:pinterest-icon",color:"#bd081c"},twitch:{name:"Twitch",icon:"logos:twitch",color:"#9146ff"},steam:{name:"Steam",icon:"logos:steam-icon",color:"#000"},epic:{name:"Epic Games",icon:"simple-icons:epicgames",color:"#313131"},playstation:{name:"PlayStation",icon:"logos:playstation-icon",color:"#003791"},xbox:{name:"Xbox",icon:"logos:xbox-icon",color:"#107c10"},whatsapp:{name:"WhatsApp",icon:"logos:whatsapp-icon",color:"#25d366"},wechat:{name:"WeChat",icon:"logos:wechat-icon",color:"#1aad19"},amazon:{name:"Amazon",icon:"logos:amazon-icon",color:"#ff9900"},yahoo:{name:"Yahoo",icon:"logos:yahoo-icon",color:"#720e9e"},paypal:{name:"PayPal",icon:"logos:paypal",color:"#0070ba"},x:{name:"X",icon:"simple-icons:x",color:"#000"}};function D(o){return q[o]?.name||o}function Y(o){return q[o]?.icon||"mdi:account"}function Z(o){return q[o]?.color||"#666"}function J(o,e="Continue with {provider}"){return e.replace("{provider}",D(o))}const P={minLength:8,requireUppercase:!0,requireLowercase:!0,requireNumbers:!0,requireSymbols:!1};function K(o){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)}function V(o=32){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i="";for(let l=0;l<o;l++)i+=e.charAt(Math.floor(Math.random()*e.length));return i}function Q(o,e,i,l=[],c={}){const r={google:"https://accounts.google.com/oauth/authorize",github:"https://github.com/login/oauth/authorize",apple:"https://appleid.apple.com/auth/authorize",facebook:"https://www.facebook.com/v18.0/dialog/oauth",twitter:"https://twitter.com/i/oauth2/authorize",microsoft:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",discord:"https://discord.com/api/oauth2/authorize",linkedin:"https://www.linkedin.com/oauth/v2/authorization",instagram:"https://api.instagram.com/oauth/authorize",tiktok:"https://www.tiktok.com/v2/auth/authorize",snapchat:"https://accounts.snapchat.com/accounts/oauth2/authorize",reddit:"https://www.reddit.com/api/v1/authorize",pinterest:"https://api.pinterest.com/oauth/",twitch:"https://id.twitch.tv/oauth2/authorize",steam:"https://steamcommunity.com/oauth/authorize",epic:"https://auth.epicgames.com/authorize",playstation:"https://auth.api.sonyentertainmentnetwork.com/oauth/authorize",xbox:"https://login.live.com/oauth20_authorize.srf",whatsapp:"https://web.whatsapp.com/oauth/authorize",wechat:"https://open.weixin.qq.com/connect/qrconnect",amazon:"https://www.amazon.com/ap/oa",yahoo:"https://api.login.yahoo.com/oauth2/request_auth",paypal:"https://www.paypal.com/signin/authorize",x:"https://api.twitter.com/oauth2/authorize"},a={google:["openid","email","profile"],github:["user:email"],apple:["email","name"],facebook:["email"],twitter:["users.read"],microsoft:["openid","email","profile"],discord:["identify","email"],linkedin:["r_liteprofile","r_emailaddress"],instagram:["user_profile","user_media"],tiktok:["user.info.basic","user.external.id"],snapchat:["user.info.basic","user.external.id"],reddit:["identity","email"],pinterest:["read_public","read_relationships"],twitch:["openid","email","profile"],steam:["openid","email","profile"],epic:["openid","email","profile"],playstation:["openid","email","profile"],xbox:["openid","email","profile"],whatsapp:["openid","email","profile"],wechat:["openid","email","profile"],amazon:["openid","email","profile"],yahoo:["openid","email","profile"],paypal:["openid","email","profile"],x:["openid","email","profile"]},n=r[o];if(!n)throw new Error(`Unsupported provider: ${o}`);const m=l.length>0?l:a[o],s=V(),f=new URLSearchParams({client_id:e,redirect_uri:i,scope:m.join(" "),state:s,response_type:"code",...c});return`${n}?${f.toString()}`}function tt(o,e,i,l){const c=window.open(o,`${e}_login`,"width=500,height=600,scrollbars=yes,resizable=yes");if(!c){l?.(new Error("Failed to open popup window"));return}const r=setInterval(()=>{c.closed&&(clearInterval(r),l?.(new Error("Login cancelled")))},1e3),a=n=>{n.origin===window.location.origin&&(n.data.type==="SOCIAL_LOGIN_SUCCESS"?(clearInterval(r),c.close(),window.removeEventListener("message",a),i?.(n.data.result)):n.data.type==="SOCIAL_LOGIN_ERROR"&&(clearInterval(r),c.close(),window.removeEventListener("message",a),l?.(new Error(n.data.error))))};window.addEventListener("message",a)}function ot(o){return o instanceof Error?o.message:typeof o=="string"?o:o&&typeof o=="object"&&"message"in o?String(o.message):"An unexpected error occurred"}function et(){return typeof window<"u"&&typeof document<"u"}function A({task:o,message:e,onStart:i,onEnd:l}){return async c=>{i?.();const r=await u.taskToValidation({task:o!=null?()=>o(c):async()=>null,errorMessage:e,errorPath:["root"],validation:a=>a!=null?u.a.invalid({message:a}):u.a.valid});return l?.(),r}}function C(o=P){let e=w.string();return o.minLength&&(e=e.min(o.minLength,`Password must be at least ${o.minLength} characters`)),o.requireUppercase&&(e=e.regex(/[A-Z]/,"Password must contain at least one uppercase letter")),o.requireLowercase&&(e=e.regex(/[a-z]/,"Password must contain at least one lowercase letter")),o.requireNumbers&&(e=e.regex(/[0-9]/,"Password must contain at least one number")),o.requireSymbols&&(e=e.regex(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,"Password must contain at least one special character")),o.customValidation&&(e=e.refine(i=>o.customValidation(i))),e}const B=w.string().min(1,"Email is required").email("Please enter a valid email address");function T(o){const e=o?C(o):w.string().refine(i=>i.length>0?null:"Password is required");return w.object({email:B,password:e,rememberMe:w.boolean().default(!1)}).schema()}function $(o=P,e){const i=C(o),l=e?.showNameField!==!1,c=e?.showConfirmPassword!==!1,r=e?.showAcceptTermsAndConditions!==!1,a={name:l?w.string().min(1,"Name is required").optional():w.string().optional(),email:B,password:i,confirmPassword:c?w.string().min(1,"Please confirm your password"):w.string(),acceptTerms:r?w.boolean().refine(m=>m===!0,"You must accept the terms and conditions"):w.boolean().default(!0)},n=w.object(a);return c?n.refine(m=>m.password===m.confirmPassword?null:"Passwords don't match",{path:["confirmPassword"]}).schema():n.schema()}const W=w.object({email:B}).schema(),at=T(),nt=$(),rt={signIn:T,signUp:$,resetPassword:()=>W};function st(o){const e=B.validate(o);return e.success?null:e.errors[0]?.message||"Invalid email"}function it(o,e=P){const l=C(e).validate(o);return l.success?null:l.errors[0]?.message||"Invalid password"}function O(o,e=P){const i={length:o.length>=(e.minLength||8),uppercase:/[A-Z]/.test(o),lowercase:/[a-z]/.test(o),numbers:/[0-9]/.test(o),symbols:/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(o),custom:e.customValidation?e.customValidation(o)===null:o.length>0},l=[!0,e.requireUppercase,e.requireLowercase,e.requireNumbers,e.requireSymbols,!!e.customValidation].filter(Boolean).length,c=[i.length,e.requireUppercase?i.uppercase:null,e.requireLowercase?i.lowercase:null,e.requireNumbers?i.numbers:null,e.requireSymbols?i.symbols:null,e.customValidation?i.custom:null].filter(n=>n===!0).length,r=l>0?Math.round(c/l*100):0;let a;return r<40?a="weak":r<60?a="fair":r<80?a="good":a="strong",{strength:a,score:r,checks:i}}const F=()=>t.localStorageProp({key:"bui_auth_email",defaultValue:null});function R({onSignIn:o,passwordRules:e,labels:i,showRememberMe:l}){const c=t.prop(!1),r=F(),a=T(e),n=u.useForm({schema:a,onSubmit:A({task:o,message:"Reset password failed",onStart:()=>{c.set(!0),n.controller.disable()},onEnd:()=>{c.set(!1),n.controller.enable()}}),initialValue:{email:"",password:""}}),{controller:m,submit:s}=n;c.on(m.setDisabled);const f=m.field("email"),b=m.field("password");return r.on(h=>{h!=null&&f.change(h)}),f.signal.on(h=>{r.value!=null&&(r.value=h)}),t.Use(S.AuthI18n,h=>t.html.form(t.OnDispose(m.dispose,r.dispose,c.dispose),t.attr.class("bc-auth-form__form"),t.on.submit(s),u.Stack(t.attr.class("bc-auth-form__fields"),t.Ensure(m.error,g=>u.Notice({variant:"danger",tone:"prominent",role:"alert"},t.html.div(g))),u.Control(u.EmailInput,{controller:f,label:t.coalesce(i?.emailLabel,h.$.emailLabel)}),u.Control(u.PasswordInput,{controller:b,label:t.coalesce(i?.passwordLabel,h.$.passwordLabel)}),t.When(l??!0,()=>t.html.div(t.attr.class("bc-auth-form__remember-me"),t.html.label(t.attr.class("bc-auth-form__checkbox-label"),u.CheckboxInput({value:r.map(g=>g!=null),after:t.html.span(t.coalesce(i?.rememberMeLabel,h.$.rememberMeLabel)),onChange:g=>{g?r.value=f.signal.value??"":r.value=null}}))))),y.Button({type:"submit",variant:"filled",color:"primary",loading:c,disabled:m.disabledOrHasErrors},t.attr.class("bc-auth-form__submit"),t.coalesce(i?.signInButton,h.$.signInButton))))}function M({password:o,rules:e=P,showLabel:i=!0,className:l}){const c=t.computedOf(o)(s=>!s||s.length===0?{strength:"weak",score:0,checks:{length:!1,uppercase:!1,lowercase:!1,numbers:!1,symbols:!1,custom:!1}}:O(s,e)),r=c.map(s=>s.strength),a=c.map(s=>s.score),n=c.map(s=>s.checks),m=t.computedOf(r,l)((s,f)=>["bc-password-strength",`bc-password-strength--${s}`,f].filter(Boolean).join(" "));return t.html.div(t.OnDispose(c,m),t.attr.class(m),t.html.div(t.attr.class("bc-password-strength__bar"),t.html.div(t.attr.class("bc-password-strength__fill"),t.attr.style(a.map(s=>`width: ${s}%`)))),t.When(i,()=>t.Use(S.AuthI18n,s=>t.html.div(t.attr.class("bc-password-strength__label"),t.computedOf(r,s)((f,b)=>{switch(f){case"weak":return b.passwordStrengthWeak;case"fair":return b.passwordStrengthFair;case"good":return b.passwordStrengthGood;case"strong":return b.passwordStrengthStrong;default:return b.passwordStrengthWeak}})))),t.html.div(t.attr.class("bc-password-strength__requirements"),t.When(e.minLength!==void 0,()=>t.html.div(t.attr.class("bc-password-strength__requirement"),t.attr.class(t.computedOf(n)(s=>s.length?"bc-password-strength__requirement--met":"")),t.html.span(t.attr.class("bc-password-strength__requirement-icon"),t.computedOf(n)(s=>s.length?"✓":"○")),t.html.span(t.attr.class("bc-password-strength__requirement-text"),`At least ${e.minLength} characters`))),t.When(e.requireUppercase===!0,()=>t.html.div(t.attr.class("bc-password-strength__requirement"),t.attr.class(t.computedOf(n)(s=>s.uppercase?"bc-password-strength__requirement--met":"")),t.html.span(t.attr.class("bc-password-strength__requirement-icon"),t.computedOf(n)(s=>s.uppercase?"✓":"○")),t.html.span(t.attr.class("bc-password-strength__requirement-text"),"One uppercase letter"))),t.When(e.requireLowercase===!0,()=>t.html.div(t.attr.class("bc-password-strength__requirement"),t.attr.class(t.computedOf(n)(s=>s.lowercase?"bc-password-strength__requirement--met":"")),t.html.span(t.attr.class("bc-password-strength__requirement-icon"),t.computedOf(n)(s=>s.lowercase?"✓":"○")),t.html.span(t.attr.class("bc-password-strength__requirement-text"),"One lowercase letter"))),t.When(e.requireNumbers===!0,()=>t.html.div(t.attr.class("bc-password-strength__requirement"),t.attr.class(t.computedOf(n)(s=>s.numbers?"bc-password-strength__requirement--met":"")),t.html.span(t.attr.class("bc-password-strength__requirement-icon"),t.computedOf(n)(s=>s.numbers?"✓":"○")),t.html.span(t.attr.class("bc-password-strength__requirement-text"),"One number"))),t.When(e.requireSymbols===!0,()=>t.html.div(t.attr.class("bc-password-strength__requirement"),t.attr.class(t.computedOf(n)(s=>s.symbols?"bc-password-strength__requirement--met":"")),t.html.span(t.attr.class("bc-password-strength__requirement-icon"),t.computedOf(n)(s=>s.symbols?"✓":"○")),t.html.span(t.attr.class("bc-password-strength__requirement-text"),"One special character")))))}function ct({password:o,rules:e=P,className:i}){const l=t.computedOf(o)(n=>!n||n.length===0?{strength:"weak",score:0}:O(n,e)),c=l.map(n=>n.strength),r=l.map(n=>n.score),a=t.computedOf(c,i)((n,m)=>["bc-password-strength-bar",`bc-password-strength-bar--${n}`,m].filter(Boolean).join(" "));return t.html.div(t.OnDispose(l,a),t.attr.class(a),t.html.div(t.attr.class("bc-password-strength-bar__fill"),t.attr.style(r.map(n=>`width: ${n}%`))))}function lt({password:o,rules:e=P,className:i}){const l=t.computedOf(o)(r=>!r||r.length===0?"weak":O(r,e).strength),c=t.computedOf(l,i)((r,a)=>["bc-password-strength-text",`bc-password-strength-text--${r}`,a].filter(Boolean).join(" "));return t.Fragment(t.OnDispose(l,c),t.Use(S.AuthI18n,r=>t.html.span(t.attr.class(c),t.computedOf(l,r)((a,n)=>{switch(a){case"weak":return n.passwordStrengthWeak;case"fair":return n.passwordStrengthFair;case"good":return n.passwordStrengthGood;case"strong":return n.passwordStrengthStrong;default:return n.passwordStrengthWeak}}))))}function N({passwordRules:o,labels:e,showPasswordStrength:i,onSignUp:l,showNameField:c,showConfirmPassword:r,showAcceptTermsAndConditions:a,termsAndConditions:n}){const m=t.prop(!1),s=o||P,f=$(s,{showNameField:c!==!1,showConfirmPassword:r!==!1,showAcceptTermsAndConditions:a!==!1}),b=u.useForm({schema:f,onSubmit:A({task:l!=null?v=>l({email:v.email,password:v.password,name:v.name}):void 0,message:"Reset password failed",onStart:()=>{m.set(!0),b.controller.disable()},onEnd:()=>{m.set(!1),b.controller.enable()}}),initialValue:{name:"",email:"",password:"",confirmPassword:"",acceptTerms:!1}}),{controller:h,submit:g}=b;m.on(h.setDisabled);const _=h.field("name"),I=h.field("email"),x=h.field("password"),z=h.field("confirmPassword"),k=h.field("acceptTerms");return t.Use(S.AuthI18n,v=>t.html.form(t.OnDispose(h.dispose,m.dispose),t.attr.class("bc-auth-form__form"),t.on.submit(g),u.Stack(t.attr.class("bc-auth-form__fields"),t.Ensure(h.error,L=>u.Notice({variant:"danger",tone:"prominent",role:"alert"},t.html.div(L))),t.When(c!==!1,()=>u.Control(y.TextInput,{controller:_.transform(L=>L??"",L=>L===""?void 0:L),label:t.coalesce(e?.nameLabel,v.$.nameLabel)})),u.Control(u.EmailInput,{controller:I,label:t.coalesce(e?.emailLabel,v.$.emailLabel)}),u.Control(u.PasswordInput,{controller:x,label:t.coalesce(e?.passwordLabel,v.$.passwordLabel)}),t.When(i??!1,()=>M({password:x.signal,rules:s,showLabel:!0})),t.When(r??!1,()=>u.Control(u.PasswordInput,{controller:z,label:t.coalesce(e?.confirmPasswordLabel,v.$.confirmPasswordLabel)})),t.When(a??!1,()=>t.html.div(t.attr.class("bc-auth-form__terms"),t.html.label(t.attr.class("bc-auth-form__checkbox-label"),u.CheckboxInput({value:k.signal.map(L=>L??!1),onChange:L=>k.change(L)}),t.html.span(n||t.coalesce(e?.acceptTermsLabel,v.$.acceptTermsLabel))),t.When(k.errorVisible,()=>t.html.div(t.attr.class("bc-auth-form__field-error"),k.error.map(L=>L||"")))))),y.Button({type:"submit",variant:"filled",color:"primary",loading:m,disabled:h.disabledOrHasErrors},t.attr.class("bc-auth-form__submit"),t.coalesce(e?.signUpButton,v.$.signUpButton))))}function G({onResetPassword:o,labels:e={}}){const i=F(),l=t.prop(!1),c=u.useForm({schema:W,onSubmit:A({task:o,message:"Reset password failed",onStart:()=>{l.set(!0),c.controller.disable()},onEnd:()=>{l.set(!1),c.controller.enable()}}),initialValue:{email:""}}),{controller:r,submit:a}=c;l.on(r.setDisabled);const n=r.field("email");return i.on(m=>{m!=null&&n.change(m)}),t.Use(S.AuthI18n,m=>t.html.form(t.OnDispose(r.dispose,i.dispose,l.dispose),t.attr.class("bc-auth-form__form"),t.Ensure(r.error,s=>u.Notice({variant:"danger",tone:"prominent",role:"alert"},t.html.div(s))),t.html.p(t.attr.class("bc-auth-form__description"),t.coalesce(e?.resetPasswordDescription,m.$.resetPasswordDescription)),t.on.submit(a),u.Stack(t.attr.class("bc-auth-form__fields"),u.Control(u.EmailInput,{controller:n,label:t.coalesce(e?.emailLabel,m.$.emailLabel)})),y.Button({loading:l,type:"submit",variant:"filled",color:"primary",disabled:r.disabledOrHasErrors},t.attr.class("bc-auth-form__submit"),t.coalesce(e?.resetPasswordButton,m.$.resetPasswordButton))))}function p({provider:o,onClick:e,size:i="md",name:l,icon:c,color:r,flow:a,labels:n}){const m=async()=>{if(e)try{a==="popup"?await e():await e()}catch(s){console.error(`Social login error for ${o} (${a||"redirect"} flow):`,s)}};return y.Button({type:"button",variant:"filled",size:i,color:r,onClick:m,roundedness:"full"},t.attr.class("bc-social-login-button"),t.attr.class(t.computedOf(o)(s=>`bc-social-login-button--${s}`)),t.html.span(t.attr.class("bc-social-login-button__inner"),t.html.span(t.attr.class("bc-social-login-button__icon"),y.Icon({icon:c,size:i},t.attr.class("bc-social-login-button__icon-inner"))),t.Use(S.AuthI18n,s=>t.html.span(t.attr.class("bc-social-login-button__label"),t.bind(t.coalesce(n?.continueWithProvider,s.$.continueWithProvider))(l)))))}function j({providers:o,onProviderClick:e,size:i="md",className:l}){return u.Stack(t.attr.class("bc-social-login-buttons"),t.attr.class(l),t.ForEach(o,c=>p({provider:c.$.provider,flow:c.$.flow,color:c.map(({provider:r})=>d[r].color),name:c.map(({provider:r})=>d[r].name),icon:c.map(({provider:r})=>d[r].icon),onClick:async()=>{e&&await e(c.$.provider.value)},size:i})))}const d={google:{name:"Google",icon:"logos:google-icon",color:"red"},github:{name:"GitHub",icon:"logos:github-icon",color:"black"},apple:{name:"Apple",icon:"logos:apple",color:"stone"},facebook:{name:"Facebook",icon:"logos:facebook",color:"blue"},twitter:{name:"Twitter",icon:"logos:twitter",color:"sky"},x:{name:"X",icon:"logos:x",color:"zinc"},microsoft:{name:"Microsoft",icon:"logos:microsoft-icon",color:"amber"},discord:{name:"Discord",icon:"logos:discord-icon",color:"indigo"},linkedin:{name:"LinkedIn",icon:"logos:linkedin-icon",color:"cyan"},instagram:{name:"Instagram",icon:"logos:instagram-icon",color:"fuchsia"},tiktok:{name:"TikTok",icon:"logos:tiktok-icon",color:"teal"},snapchat:{name:"Snapchat",icon:"streamline-logos:snapchat-logo-solid",color:"yellow"},reddit:{name:"Reddit",icon:"logos:reddit-icon",color:"orange"},pinterest:{name:"Pinterest",icon:"logos:pinterest",color:"rose"},twitch:{name:"Twitch",icon:"logos:twitch",color:"purple"},steam:{name:"Steam",icon:"logos:steam",color:"slate"},epic:{name:"Epic Games",icon:"streamline-logos:epic-games-logo-solid",color:"neutral"},playstation:{name:"PlayStation",icon:"streamline-logos:playstation-logo-solid",color:"violet"},xbox:{name:"Xbox",icon:"streamline-logos:xbox-live-logo-solid",color:"green"},whatsapp:{name:"WhatsApp",icon:"logos:whatsapp-icon",color:"emerald"},wechat:{name:"WeChat",icon:"streamline-logos:wechat-logo",color:"lime"},amazon:{name:"Amazon",icon:"streamline-logos:amazon-logo-solid",color:"red"},yahoo:{name:"Yahoo",icon:"logos:yahoo",color:"rose"},paypal:{name:"PayPal",icon:"logos:paypal",color:"blue"}},mt=o=>p({...o,...d.google,provider:"google"}),ut=o=>p({...o,...d.github,provider:"github"}),dt=o=>p({...o,...d.apple,provider:"apple"}),pt=o=>p({...o,...d.facebook,provider:"facebook"}),ht=o=>p({...o,...d.x,provider:"x"}),gt=o=>p({...o,...d.twitter,provider:"twitter"}),ft=o=>p({...o,...d.microsoft,provider:"microsoft"}),bt=o=>p({...o,...d.discord,provider:"discord"}),wt=o=>p({...o,...d.linkedin,provider:"linkedin"}),Lt=o=>p({...o,...d.instagram,provider:"instagram"}),_t=o=>p({...o,...d.tiktok,provider:"tiktok"}),kt=o=>p({...o,...d.snapchat,provider:"snapchat"}),vt=o=>p({...o,...d.reddit,provider:"reddit"}),St=o=>p({...o,...d.pinterest,provider:"pinterest"}),Pt=o=>p({...o,...d.twitch,provider:"twitch"}),yt=o=>p({...o,...d.steam,provider:"steam"}),Bt=o=>p({...o,...d.epic,provider:"epic"}),It=o=>p({...o,...d.playstation,provider:"playstation"}),xt=o=>p({...o,...d.xbox,provider:"xbox"}),qt=o=>p({...o,...d.whatsapp,provider:"whatsapp"}),At=o=>p({...o,...d.wechat,provider:"wechat"}),Ct=o=>p({...o,...d.amazon,provider:"amazon"}),Tt=o=>p({...o,...d.yahoo,provider:"yahoo"}),$t=o=>p({...o,...d.paypal,provider:"paypal"});function E({providers:o}){return u.Stack(j({providers:o}))}function H({mode:o,socialProviders:e,passwordRules:i,showRememberMe:l,showSocialDivider:c,showPasswordStrength:r,labels:a,onSignIn:n,onSignUp:m,onResetPassword:s,onModeChange:f,showContainer:b},...h){const g=o!=null?t.Value.deriveProp(o):t.prop("signin");return g.on(_=>f?.(_)),t.Use(S.AuthI18n,_=>{function I(){const k=t.coalesce(a?.hasAccountLink,_.$.hasAccountLink);return t.html.button(t.attr.type("button"),t.attr.class("bc-auth-form__link"),t.on.click(()=>g.set("signin")),k)}function x(){return t.html.button(t.attr.type("button"),t.attr.class("bc-auth-form__link"),t.on.click(()=>g.set("signup")),t.coalesce(a?.noAccountLink,_.$.noAccountLink))}function z(){return t.html.button(t.attr.type("button"),t.attr.class("bc-auth-form__link"),t.on.click(()=>g.set("reset-password")),t.coalesce(a?.forgotPasswordLink,_.$.forgotPasswordLink))}return t.html.div(X.classes({"bc-auth-container":!0,"bc-auth-container--styled":t.Value.map(b??!0,k=>k)}),t.attr.class(g.map(k=>`bc-auth-container--${k}`)),t.attr.class("bc-auth-form"),t.OnDispose(g.dispose),t.OneOfValue(g,{signin:()=>t.Fragment(t.html.h2(t.attr.class("bc-auth-form__title"),t.coalesce(a?.signInTitle,_.$.signInTitle)),e!=null?t.Fragment(E({providers:e}),t.When(c??!1,U)):null,R({onSignIn:n,showRememberMe:l,passwordRules:i,labels:{emailLabel:a?.emailLabel,passwordLabel:a?.passwordLabel,rememberMeLabel:a?.rememberMeLabel,signInButton:a?.signInButton,forgotPasswordLink:a?.forgotPasswordLink,noAccountLink:a?.noAccountLink}}),u.Stack(t.attr.class("bc-auth-form__footer"),x(),z())),signup:()=>t.Fragment(t.html.h2(t.attr.class("bc-auth-form__title"),t.coalesce(a?.signUpTitle,_.$.signUpTitle)),e!=null?t.Fragment(E({providers:e}),t.When(c??!1,U)):null,N({labels:{nameLabel:a?.nameLabel,emailLabel:a?.emailLabel,passwordLabel:a?.passwordLabel,confirmPasswordLabel:a?.confirmPasswordLabel,acceptTermsLabel:a?.acceptTermsLabel,signUpButton:a?.signUpButton,hasAccountLink:a?.hasAccountLink},onSignUp:m,passwordRules:i,showPasswordStrength:r}),u.Stack(t.attr.class("bc-auth-form__footer"),I())),"reset-password":()=>t.Fragment(t.html.h2(t.attr.class("bc-auth-form__title"),t.coalesce(a?.resetPasswordTitle,_.$.resetPasswordTitle)),G({labels:{backToSignInLink:a?.backToSignInLink,emailLabel:a?.emailLabel,resetPasswordButton:a?.resetPasswordButton,resetPasswordDescription:a?.resetPasswordDescription},onResetPassword:s}),u.Stack(t.attr.class("bc-auth-form__footer"),I()))}),...h)})}function Ot(o){return w.Modal({size:"sm",dismissable:!0,showCloseButton:!0},(e,i)=>o(l=>e({body:H({showContainer:!1,...l}),header:t.Use(S.AuthI18n,c=>t.coalesce(l.modalTitle,c.$.authenticationTitle))})))}function U({labels:o,className:e}={}){return t.html.div(t.attr.class("bc-auth-divider"),t.attr.class(e),t.html.div(t.attr.class("bc-auth-divider__line")),t.Use(S.AuthI18n,i=>t.html.span(t.attr.class("bc-auth-divider__text"),t.coalesce(o?.text,i.$.orDivider))),t.html.div(t.attr.class("bc-auth-divider__line")))}exports.AmazonLoginButton=Ct;exports.AppleLoginButton=dt;exports.AuthContainer=H;exports.AuthDivider=U;exports.AuthModal=Ot;exports.DiscordLoginButton=bt;exports.EpicLoginButton=Bt;exports.FacebookLoginButton=pt;exports.GitHubLoginButton=ut;exports.GoogleLoginButton=mt;exports.InstagramLoginButton=Lt;exports.LinkedInLoginButton=wt;exports.MicrosoftLoginButton=ft;exports.PasswordStrengthBar=ct;exports.PasswordStrengthIndicator=M;exports.PasswordStrengthText=lt;exports.PayPalLoginButton=$t;exports.PinterestLoginButton=St;exports.PlayStationLoginButton=It;exports.RedditLoginButton=vt;exports.ResetPasswordForm=G;exports.SignInForm=R;exports.SignUpForm=N;exports.SnapchatLoginButton=kt;exports.SocialLoginButton=p;exports.SocialLoginButtons=j;exports.SocialProviders=E;exports.SteamLoginButton=yt;exports.TiktokLoginButton=_t;exports.TwitchLoginButton=Pt;exports.TwitterLoginButton=gt;exports.WeChatLoginButton=At;exports.WhatsAppLoginButton=qt;exports.XLoginButtin=ht;exports.XboxLoginButton=xt;exports.YahooLoginButton=Tt;exports.authSchemas=rt;exports.calculatePasswordStrength=O;exports.createPasswordSchema=C;exports.createSignInSchema=T;exports.createSignUpSchema=$;exports.createSocialLoginUrl=Q;exports.defaultPasswordRules=P;exports.defaultSignInSchema=at;exports.defaultSignUpSchema=nt;exports.emailSchema=B;exports.formatAuthError=ot;exports.formatProviderName=D;exports.formatSocialLoginText=J;exports.generateRandomString=V;exports.getProviderColor=Z;exports.getProviderIcon=Y;exports.isBrowser=et;exports.isValidEmail=K;exports.openSocialLoginPopup=tt;exports.providerInfo=q;exports.requestToControllerValidation=A;exports.resetPasswordSchema=W;exports.socialProviderInfo=d;exports.useAuthEmailProp=F;exports.validateEmail=st;exports.validatePassword=it;
|
package/dist/auth/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { localStorageProp as re, prop as U, Use as P, html as i, OnDispose as T, attr as t, on as C, When as L, coalesce as h, Ensure as N, computedOf as f, Fragment as A, bind as ie, ForEach as ce, Value as Q, OneOfValue as le } from "@tempots/dom";
|
|
2
|
-
import { t as me, a as ee, u as R, S as q, b as se, c as $, P as M, E as W, N as G } from "../notice-
|
|
3
|
-
import { s as I, o as H, b as D, M as ue } from "../modal-
|
|
4
|
-
import { AuthI18n as x } from "../translations-
|
|
5
|
-
import { B as O, T as de, I as pe } from "../translations-
|
|
2
|
+
import { t as me, a as ee, u as R, S as q, b as se, c as $, P as M, E as W, N as G } from "../notice-B5Yn_3Ay.js";
|
|
3
|
+
import { s as I, o as H, b as D, M as ue } from "../modal-DMc-R2VT.js";
|
|
4
|
+
import { AuthI18n as x } from "../translations-B0HuWYIz.js";
|
|
5
|
+
import { B as O, T as de, I as pe } from "../translations-D-fMB_IO.js";
|
|
6
6
|
import { classes as he } from "@tempots/ui";
|
|
7
7
|
const j = {
|
|
8
8
|
google: { name: "Google", icon: "logos:google-icon", color: "#4285f4" },
|
package/dist/beatui.css
CHANGED
|
@@ -2353,9 +2353,9 @@ a:focus-visible {
|
|
|
2353
2353
|
height: var(--collapse-height);
|
|
2354
2354
|
}
|
|
2355
2355
|
|
|
2356
|
-
/* Color Input Component (SVG blob preview overlaying native input) */
|
|
2356
|
+
/* Color Swatch Input Component (SVG blob preview overlaying native input) */
|
|
2357
2357
|
|
|
2358
|
-
.bc-color-input__control {
|
|
2358
|
+
.bc-color-swatch-input__control {
|
|
2359
2359
|
position: relative;
|
|
2360
2360
|
display: inline-block;
|
|
2361
2361
|
border-radius: var(--radius-control, var(--radius-md));
|
|
@@ -2364,7 +2364,12 @@ a:focus-visible {
|
|
|
2364
2364
|
border: 1px solid var(--color-neutral-300);
|
|
2365
2365
|
}
|
|
2366
2366
|
|
|
2367
|
-
.bc-color-
|
|
2367
|
+
.bc-input-container .bc-color-input__swatch {
|
|
2368
|
+
width: 2.2rem;
|
|
2369
|
+
cursor: pointer;
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
.bc-color-swatch-input__control--alpha {
|
|
2368
2373
|
/* subtle checkerboard background to visualize transparency */
|
|
2369
2374
|
background-image:
|
|
2370
2375
|
linear-gradient(
|
|
@@ -2395,12 +2400,12 @@ a:focus-visible {
|
|
|
2395
2400
|
-5px 0px;
|
|
2396
2401
|
}
|
|
2397
2402
|
|
|
2398
|
-
.bc-color-input__control:focus-within {
|
|
2403
|
+
.bc-color-swatch-input__control:focus-within {
|
|
2399
2404
|
outline: 2px solid var(--interactive-focus-light);
|
|
2400
2405
|
outline-offset: 2px;
|
|
2401
2406
|
}
|
|
2402
2407
|
|
|
2403
|
-
.bc-color-input__svg {
|
|
2408
|
+
.bc-color-swatch-input__svg {
|
|
2404
2409
|
display: block;
|
|
2405
2410
|
width: 100%;
|
|
2406
2411
|
height: 100%;
|
|
@@ -2410,11 +2415,11 @@ a:focus-visible {
|
|
|
2410
2415
|
);
|
|
2411
2416
|
}
|
|
2412
2417
|
|
|
2413
|
-
.bc-input-container--error .bc-color-input__control:focus-within {
|
|
2418
|
+
.bc-input-container--error .bc-color-swatch-input__control:focus-within {
|
|
2414
2419
|
outline: 2px solid var(--color-danger-600);
|
|
2415
2420
|
}
|
|
2416
2421
|
|
|
2417
|
-
.bc-color-input__native {
|
|
2422
|
+
.bc-color-swatch-input__native {
|
|
2418
2423
|
position: absolute;
|
|
2419
2424
|
inset: 0;
|
|
2420
2425
|
width: 100%;
|
|
@@ -2429,32 +2434,34 @@ a:focus-visible {
|
|
|
2429
2434
|
cursor: pointer;
|
|
2430
2435
|
}
|
|
2431
2436
|
|
|
2432
|
-
.bc-color-input__native:disabled {
|
|
2437
|
+
.bc-color-swatch-input__native:disabled {
|
|
2433
2438
|
cursor: not-allowed;
|
|
2434
2439
|
}
|
|
2435
2440
|
|
|
2436
|
-
.bc-color-input__rgb {
|
|
2441
|
+
.bc-color-swatch-input__rgb {
|
|
2437
2442
|
font-size: var(--font-size-sm);
|
|
2438
2443
|
color: var(--color-gray-700);
|
|
2439
2444
|
}
|
|
2440
2445
|
|
|
2441
|
-
.bc-color-input__alpha {
|
|
2446
|
+
.bc-color-swatch-input__alpha {
|
|
2442
2447
|
width: 5rem;
|
|
2443
2448
|
margin-inline-start: calc(var(--spacing-base) * 2);
|
|
2444
2449
|
}
|
|
2445
2450
|
|
|
2446
2451
|
/* Dark mode */
|
|
2447
|
-
.b-dark .bc-color-input__control:focus-within {
|
|
2452
|
+
.b-dark .bc-color-swatch-input__control:focus-within {
|
|
2448
2453
|
outline: 2px solid var(--interactive-focus-dark);
|
|
2449
2454
|
}
|
|
2450
2455
|
|
|
2451
|
-
.b-dark
|
|
2456
|
+
.b-dark
|
|
2457
|
+
.bc-input-container--error
|
|
2458
|
+
.bc-color-swatch-input__control:focus-within {
|
|
2452
2459
|
outline: 2px solid var(--color-danger-400);
|
|
2453
2460
|
}
|
|
2454
2461
|
|
|
2455
2462
|
/* Responsive styles */
|
|
2456
2463
|
@media (width >=var(--breakpoint-sm)) {
|
|
2457
|
-
.bc-color-input__control {
|
|
2464
|
+
.bc-color-swatch-input__control {
|
|
2458
2465
|
width: 2.75rem;
|
|
2459
2466
|
height: 2.25rem;
|
|
2460
2467
|
}
|
|
@@ -2774,7 +2781,7 @@ a:focus-visible {
|
|
|
2774
2781
|
}
|
|
2775
2782
|
|
|
2776
2783
|
.bc-control--text-size-md {
|
|
2777
|
-
font-size: var(--font-size-
|
|
2784
|
+
font-size: var(--font-size-md);
|
|
2778
2785
|
}
|
|
2779
2786
|
|
|
2780
2787
|
.bc-control--text-size-lg {
|
|
@@ -3893,8 +3900,6 @@ a:focus-visible {
|
|
|
3893
3900
|
|
|
3894
3901
|
.bc-input-container {
|
|
3895
3902
|
width: 100%;
|
|
3896
|
-
/* Horizontal padding only; vertical padding comes from size classes */
|
|
3897
|
-
padding-inline: calc(var(--spacing-base) * 4);
|
|
3898
3903
|
/* Add a transparent border to match button height math */
|
|
3899
3904
|
border: 1.5px solid transparent;
|
|
3900
3905
|
border-radius: var(--radius-control, var(--radius-md));
|
|
@@ -3903,6 +3908,7 @@ a:focus-visible {
|
|
|
3903
3908
|
transition: all
|
|
3904
3909
|
var(--motion-transition-fast, var(--motion-duration-fast, 0.2s))
|
|
3905
3910
|
var(--motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
3911
|
+
align-items: stretch;
|
|
3906
3912
|
}
|
|
3907
3913
|
|
|
3908
3914
|
/* Default state */
|
|
@@ -3962,7 +3968,6 @@ a:focus-visible {
|
|
|
3962
3968
|
.bc-input-container__after {
|
|
3963
3969
|
display: flex;
|
|
3964
3970
|
flex-direction: row;
|
|
3965
|
-
align-items: center;
|
|
3966
3971
|
z-index: var(--z-index-navigation);
|
|
3967
3972
|
}
|
|
3968
3973
|
|
|
@@ -3972,6 +3977,8 @@ a:focus-visible {
|
|
|
3972
3977
|
flex-direction: row;
|
|
3973
3978
|
align-items: center;
|
|
3974
3979
|
overflow: hidden;
|
|
3980
|
+
/* Horizontal padding only; vertical padding comes from size classes */
|
|
3981
|
+
padding-inline: calc(var(--spacing-base) * 4);
|
|
3975
3982
|
}
|
|
3976
3983
|
|
|
3977
3984
|
.bc-input-container__input--grow {
|
|
@@ -4003,13 +4010,14 @@ a:focus-visible {
|
|
|
4003
4010
|
font-size: var(--font-size-sm);
|
|
4004
4011
|
fill: var(--color-gray-400);
|
|
4005
4012
|
border-radius: var(--radius-full);
|
|
4006
|
-
padding: var(--spacing-sm);
|
|
4013
|
+
padding: var(--spacing-sm) var(--spacing-md);
|
|
4007
4014
|
background: transparent;
|
|
4008
4015
|
border: none;
|
|
4009
4016
|
cursor: pointer;
|
|
4010
4017
|
display: flex;
|
|
4011
4018
|
align-items: center;
|
|
4012
4019
|
justify-content: center;
|
|
4020
|
+
/* aspect-ratio: 1 / 1; */
|
|
4013
4021
|
}
|
|
4014
4022
|
|
|
4015
4023
|
.bc-input-container__password-toggle:hover {
|
|
@@ -4052,6 +4060,13 @@ a:focus-visible {
|
|
|
4052
4060
|
flex-grow: 1;
|
|
4053
4061
|
}
|
|
4054
4062
|
|
|
4063
|
+
.bc-input-container__icon {
|
|
4064
|
+
display: flex;
|
|
4065
|
+
align-items: center;
|
|
4066
|
+
justify-content: center;
|
|
4067
|
+
padding: var(--spacing-sm) var(--spacing-md);
|
|
4068
|
+
}
|
|
4069
|
+
|
|
4055
4070
|
/* Dark mode styles */
|
|
4056
4071
|
.b-dark .bc-input-container--default {
|
|
4057
4072
|
background-color: var(--bg-surface-dark);
|
|
@@ -5596,11 +5611,9 @@ a:focus-visible {
|
|
|
5596
5611
|
transition: all
|
|
5597
5612
|
var(--motion-transition-fast, var(--motion-duration-fast, 0.2s))
|
|
5598
5613
|
var(--motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
5599
|
-
}
|
|
5600
5614
|
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
height: 0.6rem;
|
|
5615
|
+
width: 1rem;
|
|
5616
|
+
height: 50%;
|
|
5604
5617
|
}
|
|
5605
5618
|
|
|
5606
5619
|
.bc-number-input-steppers-button:hover {
|