@eldrajs/ui 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/LICENSE-tabler-icons +21 -0
- package/README.md +132 -0
- package/dist/{VariantPicker-CWnrUgIt.js → VariantPicker-C56GlM1e.js} +45 -18
- package/dist/componentNames.d.ts +1 -1
- package/dist/components/icon/Icon.vue.d.ts +2 -2
- package/dist/components/icon/sizes.d.ts +9 -0
- package/dist/components/site-form/SiteForm.vue.d.ts +43 -0
- package/dist/components/site-form/localize.d.ts +9 -0
- package/dist/components/site-form/turnstile.d.ts +22 -0
- package/dist/components/site-form/types.d.ts +91 -0
- package/dist/components/site-form/useSiteForm.d.ts +35 -0
- package/dist/components/site-form/validate.d.ts +8 -0
- package/dist/components/tabler-icon/TablerIcon.vue.d.ts +10 -0
- package/dist/components/tabler-icon/bucket.d.ts +3 -0
- package/dist/components/tabler-icon/registry.d.ts +7 -0
- package/dist/components/tabler-icon/tablerIconData.d.ts +2 -0
- package/dist/components/tabler-icon/tablerIconName.d.ts +2 -0
- package/dist/components/tabler-icon/types.d.ts +15 -0
- package/dist/components.css +21 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1111 -186
- package/dist/messages/en-US.d.ts +26 -0
- package/dist/messages/is-IS.js +23 -1
- package/dist/resolver.js +2 -0
- package/dist/style.css +21 -0
- package/dist/tabler-icons/000.js +17 -0
- package/dist/tabler-icons/001.js +14 -0
- package/dist/tabler-icons/002.js +18 -0
- package/dist/tabler-icons/003.js +16 -0
- package/dist/tabler-icons/004.js +18 -0
- package/dist/tabler-icons/005.js +19 -0
- package/dist/tabler-icons/006.js +9 -0
- package/dist/tabler-icons/007.js +15 -0
- package/dist/tabler-icons/008.js +20 -0
- package/dist/tabler-icons/009.js +21 -0
- package/dist/tabler-icons/010.js +14 -0
- package/dist/tabler-icons/011.js +16 -0
- package/dist/tabler-icons/012.js +16 -0
- package/dist/tabler-icons/013.js +10 -0
- package/dist/tabler-icons/014.js +15 -0
- package/dist/tabler-icons/015.js +17 -0
- package/dist/tabler-icons/016.js +24 -0
- package/dist/tabler-icons/017.js +20 -0
- package/dist/tabler-icons/018.js +12 -0
- package/dist/tabler-icons/019.js +17 -0
- package/dist/tabler-icons/020.js +15 -0
- package/dist/tabler-icons/021.js +11 -0
- package/dist/tabler-icons/022.js +13 -0
- package/dist/tabler-icons/023.js +15 -0
- package/dist/tabler-icons/024.js +20 -0
- package/dist/tabler-icons/025.js +13 -0
- package/dist/tabler-icons/026.js +18 -0
- package/dist/tabler-icons/027.js +21 -0
- package/dist/tabler-icons/028.js +16 -0
- package/dist/tabler-icons/029.js +16 -0
- package/dist/tabler-icons/030.js +25 -0
- package/dist/tabler-icons/031.js +26 -0
- package/dist/tabler-icons/032.js +13 -0
- package/dist/tabler-icons/033.js +19 -0
- package/dist/tabler-icons/034.js +17 -0
- package/dist/tabler-icons/035.js +15 -0
- package/dist/tabler-icons/036.js +17 -0
- package/dist/tabler-icons/037.js +17 -0
- package/dist/tabler-icons/038.js +23 -0
- package/dist/tabler-icons/039.js +16 -0
- package/dist/tabler-icons/040.js +15 -0
- package/dist/tabler-icons/041.js +14 -0
- package/dist/tabler-icons/042.js +19 -0
- package/dist/tabler-icons/043.js +18 -0
- package/dist/tabler-icons/044.js +10 -0
- package/dist/tabler-icons/045.js +19 -0
- package/dist/tabler-icons/046.js +15 -0
- package/dist/tabler-icons/047.js +23 -0
- package/dist/tabler-icons/048.js +26 -0
- package/dist/tabler-icons/049.js +16 -0
- package/dist/tabler-icons/050.js +11 -0
- package/dist/tabler-icons/051.js +12 -0
- package/dist/tabler-icons/052.js +15 -0
- package/dist/tabler-icons/053.js +17 -0
- package/dist/tabler-icons/054.js +13 -0
- package/dist/tabler-icons/055.js +20 -0
- package/dist/tabler-icons/056.js +19 -0
- package/dist/tabler-icons/057.js +16 -0
- package/dist/tabler-icons/058.js +20 -0
- package/dist/tabler-icons/059.js +19 -0
- package/dist/tabler-icons/060.js +16 -0
- package/dist/tabler-icons/061.js +17 -0
- package/dist/tabler-icons/062.js +9 -0
- package/dist/tabler-icons/063.js +19 -0
- package/dist/tabler-icons/064.js +18 -0
- package/dist/tabler-icons/065.js +17 -0
- package/dist/tabler-icons/066.js +15 -0
- package/dist/tabler-icons/067.js +17 -0
- package/dist/tabler-icons/068.js +18 -0
- package/dist/tabler-icons/069.js +12 -0
- package/dist/tabler-icons/070.js +15 -0
- package/dist/tabler-icons/071.js +15 -0
- package/dist/tabler-icons/072.js +15 -0
- package/dist/tabler-icons/073.js +15 -0
- package/dist/tabler-icons/074.js +17 -0
- package/dist/tabler-icons/075.js +22 -0
- package/dist/tabler-icons/076.js +14 -0
- package/dist/tabler-icons/077.js +13 -0
- package/dist/tabler-icons/078.js +12 -0
- package/dist/tabler-icons/079.js +12 -0
- package/dist/tabler-icons/080.js +14 -0
- package/dist/tabler-icons/081.js +16 -0
- package/dist/tabler-icons/082.js +18 -0
- package/dist/tabler-icons/083.js +16 -0
- package/dist/tabler-icons/084.js +17 -0
- package/dist/tabler-icons/085.js +20 -0
- package/dist/tabler-icons/086.js +23 -0
- package/dist/tabler-icons/087.js +13 -0
- package/dist/tabler-icons/088.js +16 -0
- package/dist/tabler-icons/089.js +21 -0
- package/dist/tabler-icons/090.js +18 -0
- package/dist/tabler-icons/091.js +19 -0
- package/dist/tabler-icons/092.js +13 -0
- package/dist/tabler-icons/093.js +11 -0
- package/dist/tabler-icons/094.js +24 -0
- package/dist/tabler-icons/095.js +12 -0
- package/dist/tabler-icons/096.js +18 -0
- package/dist/tabler-icons/097.js +21 -0
- package/dist/tabler-icons/098.js +15 -0
- package/dist/tabler-icons/099.js +17 -0
- package/dist/tabler-icons/100.js +11 -0
- package/dist/tabler-icons/101.js +15 -0
- package/dist/tabler-icons/102.js +14 -0
- package/dist/tabler-icons/103.js +9 -0
- package/dist/tabler-icons/104.js +18 -0
- package/dist/tabler-icons/105.js +17 -0
- package/dist/tabler-icons/106.js +16 -0
- package/dist/tabler-icons/107.js +16 -0
- package/dist/tabler-icons/108.js +16 -0
- package/dist/tabler-icons/109.js +19 -0
- package/dist/tabler-icons/110.js +12 -0
- package/dist/tabler-icons/111.js +13 -0
- package/dist/tabler-icons/112.js +19 -0
- package/dist/tabler-icons/113.js +21 -0
- package/dist/tabler-icons/114.js +17 -0
- package/dist/tabler-icons/115.js +17 -0
- package/dist/tabler-icons/116.js +19 -0
- package/dist/tabler-icons/117.js +29 -0
- package/dist/tabler-icons/118.js +12 -0
- package/dist/tabler-icons/119.js +17 -0
- package/dist/tabler-icons/120.js +14 -0
- package/dist/tabler-icons/121.js +21 -0
- package/dist/tabler-icons/122.js +12 -0
- package/dist/tabler-icons/123.js +14 -0
- package/dist/tabler-icons/124.js +15 -0
- package/dist/tabler-icons/125.js +14 -0
- package/dist/tabler-icons/126.js +18 -0
- package/dist/tabler-icons/127.js +16 -0
- package/dist/tabler-icons/128.js +20 -0
- package/dist/tabler-icons/129.js +15 -0
- package/dist/tabler-icons/130.js +18 -0
- package/dist/tabler-icons/131.js +16 -0
- package/dist/tabler-icons/132.js +20 -0
- package/dist/tabler-icons/133.js +18 -0
- package/dist/tabler-icons/134.js +16 -0
- package/dist/tabler-icons/135.js +16 -0
- package/dist/tabler-icons/136.js +21 -0
- package/dist/tabler-icons/137.js +16 -0
- package/dist/tabler-icons/138.js +12 -0
- package/dist/tabler-icons/139.js +27 -0
- package/dist/tabler-icons/140.js +14 -0
- package/dist/tabler-icons/141.js +16 -0
- package/dist/tabler-icons/142.js +17 -0
- package/dist/tabler-icons/143.js +12 -0
- package/dist/tabler-icons/144.js +15 -0
- package/dist/tabler-icons/145.js +11 -0
- package/dist/tabler-icons/146.js +18 -0
- package/dist/tabler-icons/147.js +13 -0
- package/dist/tabler-icons/148.js +13 -0
- package/dist/tabler-icons/149.js +19 -0
- package/dist/tabler-icons/150.js +20 -0
- package/dist/tabler-icons/151.js +16 -0
- package/dist/tabler-icons/152.js +16 -0
- package/dist/tabler-icons/153.js +18 -0
- package/dist/tabler-icons/154.js +16 -0
- package/dist/tabler-icons/155.js +15 -0
- package/dist/tabler-icons/156.js +12 -0
- package/dist/tabler-icons/157.js +16 -0
- package/dist/tabler-icons/158.js +18 -0
- package/dist/tabler-icons/159.js +19 -0
- package/dist/tabler-icons/160.js +20 -0
- package/dist/tabler-icons/161.js +14 -0
- package/dist/tabler-icons/162.js +18 -0
- package/dist/tabler-icons/163.js +12 -0
- package/dist/tabler-icons/164.js +19 -0
- package/dist/tabler-icons/165.js +19 -0
- package/dist/tabler-icons/166.js +18 -0
- package/dist/tabler-icons/167.js +14 -0
- package/dist/tabler-icons/168.js +15 -0
- package/dist/tabler-icons/169.js +14 -0
- package/dist/tabler-icons/170.js +13 -0
- package/dist/tabler-icons/171.js +13 -0
- package/dist/tabler-icons/172.js +13 -0
- package/dist/tabler-icons/173.js +19 -0
- package/dist/tabler-icons/174.js +11 -0
- package/dist/tabler-icons/175.js +14 -0
- package/dist/tabler-icons/176.js +20 -0
- package/dist/tabler-icons/177.js +17 -0
- package/dist/tabler-icons/178.js +17 -0
- package/dist/tabler-icons/179.js +16 -0
- package/dist/tabler-icons/180.js +20 -0
- package/dist/tabler-icons/181.js +18 -0
- package/dist/tabler-icons/182.js +15 -0
- package/dist/tabler-icons/183.js +15 -0
- package/dist/tabler-icons/184.js +21 -0
- package/dist/tabler-icons/185.js +19 -0
- package/dist/tabler-icons/186.js +10 -0
- package/dist/tabler-icons/187.js +16 -0
- package/dist/tabler-icons/188.js +15 -0
- package/dist/tabler-icons/189.js +14 -0
- package/dist/tabler-icons/190.js +15 -0
- package/dist/tabler-icons/191.js +17 -0
- package/dist/tabler-icons/192.js +14 -0
- package/dist/tabler-icons/193.js +16 -0
- package/dist/tabler-icons/194.js +17 -0
- package/dist/tabler-icons/195.js +17 -0
- package/dist/tabler-icons/196.js +11 -0
- package/dist/tabler-icons/197.js +13 -0
- package/dist/tabler-icons/198.js +13 -0
- package/dist/tabler-icons/199.js +15 -0
- package/dist/tabler-icons/200.js +16 -0
- package/dist/tabler-icons/201.js +13 -0
- package/dist/tabler-icons/202.js +19 -0
- package/dist/tabler-icons/203.js +15 -0
- package/dist/tabler-icons/204.js +16 -0
- package/dist/tabler-icons/205.js +16 -0
- package/dist/tabler-icons/206.js +14 -0
- package/dist/tabler-icons/207.js +14 -0
- package/dist/tabler-icons/208.js +18 -0
- package/dist/tabler-icons/209.js +23 -0
- package/dist/tabler-icons/210.js +16 -0
- package/dist/tabler-icons/211.js +17 -0
- package/dist/tabler-icons/212.js +16 -0
- package/dist/tabler-icons/213.js +16 -0
- package/dist/tabler-icons/214.js +18 -0
- package/dist/tabler-icons/215.js +12 -0
- package/dist/tabler-icons/216.js +13 -0
- package/dist/tabler-icons/217.js +14 -0
- package/dist/tabler-icons/218.js +18 -0
- package/dist/tabler-icons/219.js +22 -0
- package/dist/tabler-icons/220.js +15 -0
- package/dist/tabler-icons/221.js +15 -0
- package/dist/tabler-icons/222.js +21 -0
- package/dist/tabler-icons/223.js +17 -0
- package/dist/tabler-icons/224.js +23 -0
- package/dist/tabler-icons/225.js +20 -0
- package/dist/tabler-icons/226.js +18 -0
- package/dist/tabler-icons/227.js +13 -0
- package/dist/tabler-icons/228.js +18 -0
- package/dist/tabler-icons/229.js +14 -0
- package/dist/tabler-icons/230.js +14 -0
- package/dist/tabler-icons/231.js +17 -0
- package/dist/tabler-icons/232.js +24 -0
- package/dist/tabler-icons/233.js +13 -0
- package/dist/tabler-icons/234.js +21 -0
- package/dist/tabler-icons/235.js +13 -0
- package/dist/tabler-icons/236.js +16 -0
- package/dist/tabler-icons/237.js +15 -0
- package/dist/tabler-icons/238.js +16 -0
- package/dist/tabler-icons/239.js +13 -0
- package/dist/tabler-icons/240.js +19 -0
- package/dist/tabler-icons/241.js +9 -0
- package/dist/tabler-icons/242.js +14 -0
- package/dist/tabler-icons/243.js +14 -0
- package/dist/tabler-icons/244.js +18 -0
- package/dist/tabler-icons/245.js +18 -0
- package/dist/tabler-icons/246.js +19 -0
- package/dist/tabler-icons/247.js +14 -0
- package/dist/tabler-icons/248.js +14 -0
- package/dist/tabler-icons/249.js +13 -0
- package/dist/tabler-icons/250.js +12 -0
- package/dist/tabler-icons/251.js +16 -0
- package/dist/tabler-icons/252.js +15 -0
- package/dist/tabler-icons/253.js +16 -0
- package/dist/tabler-icons/254.js +15 -0
- package/dist/tabler-icons/255.js +11 -0
- package/dist/tabler-icons/256.js +11 -0
- package/dist/tabler-icons/257.js +10 -0
- package/dist/tabler-icons/258.js +17 -0
- package/dist/tabler-icons/259.js +15 -0
- package/dist/tabler-icons/260.js +17 -0
- package/dist/tabler-icons/261.js +19 -0
- package/dist/tabler-icons/262.js +15 -0
- package/dist/tabler-icons/263.js +16 -0
- package/dist/tabler-icons/264.js +13 -0
- package/dist/tabler-icons/265.js +21 -0
- package/dist/tabler-icons/266.js +24 -0
- package/dist/tabler-icons/267.js +19 -0
- package/dist/tabler-icons/268.js +12 -0
- package/dist/tabler-icons/269.js +21 -0
- package/dist/tabler-icons/270.js +15 -0
- package/dist/tabler-icons/271.js +12 -0
- package/dist/tabler-icons/272.js +12 -0
- package/dist/tabler-icons/273.js +16 -0
- package/dist/tabler-icons/274.js +14 -0
- package/dist/tabler-icons/275.js +12 -0
- package/dist/tabler-icons/276.js +18 -0
- package/dist/tabler-icons/277.js +16 -0
- package/dist/tabler-icons/278.js +15 -0
- package/dist/tabler-icons/279.js +16 -0
- package/dist/tabler-icons/280.js +19 -0
- package/dist/tabler-icons/281.js +18 -0
- package/dist/tabler-icons/282.js +20 -0
- package/dist/tabler-icons/283.js +15 -0
- package/dist/tabler-icons/284.js +18 -0
- package/dist/tabler-icons/285.js +16 -0
- package/dist/tabler-icons/286.js +15 -0
- package/dist/tabler-icons/287.js +15 -0
- package/dist/tabler-icons/288.js +18 -0
- package/dist/tabler-icons/289.js +13 -0
- package/dist/tabler-icons/290.js +15 -0
- package/dist/tabler-icons/291.js +21 -0
- package/dist/tabler-icons/292.js +23 -0
- package/dist/tabler-icons/293.js +22 -0
- package/dist/tabler-icons/294.js +18 -0
- package/dist/tabler-icons/295.js +12 -0
- package/dist/tabler-icons/296.js +18 -0
- package/dist/tabler-icons/297.js +11 -0
- package/dist/tabler-icons/298.js +16 -0
- package/dist/tabler-icons/299.js +19 -0
- package/dist/tabler-icons/300.js +20 -0
- package/dist/tabler-icons/301.js +12 -0
- package/dist/tabler-icons/302.js +14 -0
- package/dist/tabler-icons/303.js +23 -0
- package/dist/tabler-icons/304.js +12 -0
- package/dist/tabler-icons/305.js +16 -0
- package/dist/tabler-icons/306.js +18 -0
- package/dist/tabler-icons/307.js +15 -0
- package/dist/tabler-icons/308.js +18 -0
- package/dist/tabler-icons/309.js +19 -0
- package/dist/tabler-icons/310.js +13 -0
- package/dist/tabler-icons/311.js +13 -0
- package/dist/tabler-icons/312.js +15 -0
- package/dist/tabler-icons/313.js +15 -0
- package/dist/tabler-icons/314.js +18 -0
- package/dist/tabler-icons/315.js +11 -0
- package/dist/tabler-icons/316.js +16 -0
- package/dist/tabler-icons/317.js +16 -0
- package/dist/tabler-icons/318.js +12 -0
- package/dist/tabler-icons/319.js +16 -0
- package/dist/tabler-icons/320.js +20 -0
- package/dist/tabler-icons/321.js +11 -0
- package/dist/tabler-icons/322.js +19 -0
- package/dist/tabler-icons/323.js +14 -0
- package/dist/tabler-icons/324.js +17 -0
- package/dist/tabler-icons/325.js +15 -0
- package/dist/tabler-icons/326.js +20 -0
- package/dist/tabler-icons/327.js +15 -0
- package/dist/tabler-icons/328.js +14 -0
- package/dist/tabler-icons/329.js +20 -0
- package/dist/tabler-icons/330.js +16 -0
- package/dist/tabler-icons/331.js +15 -0
- package/dist/tabler-icons/332.js +15 -0
- package/dist/tabler-icons/333.js +19 -0
- package/dist/tabler-icons/334.js +15 -0
- package/dist/tabler-icons/335.js +19 -0
- package/dist/tabler-icons/336.js +12 -0
- package/dist/tabler-icons/337.js +18 -0
- package/dist/tabler-icons/338.js +11 -0
- package/dist/tabler-icons/339.js +15 -0
- package/dist/tabler-icons/340.js +19 -0
- package/dist/tabler-icons/341.js +19 -0
- package/dist/tabler-icons/342.js +14 -0
- package/dist/tabler-icons/343.js +16 -0
- package/dist/tabler-icons/344.js +15 -0
- package/dist/tabler-icons/345.js +14 -0
- package/dist/tabler-icons/346.js +13 -0
- package/dist/tabler-icons/347.js +13 -0
- package/dist/tabler-icons/348.js +18 -0
- package/dist/tabler-icons/349.js +12 -0
- package/dist/tabler-icons/350.js +15 -0
- package/dist/tabler-icons/351.js +17 -0
- package/dist/tabler-icons/352.js +16 -0
- package/dist/tabler-icons/353.js +18 -0
- package/dist/tabler-icons/354.js +17 -0
- package/dist/tabler-icons/355.js +14 -0
- package/dist/tabler-icons/356.js +16 -0
- package/dist/tabler-icons/357.js +19 -0
- package/dist/tabler-icons/358.js +22 -0
- package/dist/tabler-icons/359.js +15 -0
- package/dist/tabler-icons/360.js +19 -0
- package/dist/tabler-icons/361.js +20 -0
- package/dist/tabler-icons/362.js +12 -0
- package/dist/tabler-icons/363.js +21 -0
- package/dist/tabler-icons/364.js +21 -0
- package/dist/tabler-icons/365.js +15 -0
- package/dist/tabler-icons/366.js +10 -0
- package/dist/tabler-icons/367.js +22 -0
- package/dist/tabler-icons/368.js +21 -0
- package/dist/tabler-icons/369.js +17 -0
- package/dist/tabler-icons/370.js +15 -0
- package/dist/tabler-icons/371.js +16 -0
- package/dist/tabler-icons/372.js +12 -0
- package/dist/tabler-icons/373.js +13 -0
- package/dist/tabler-icons/374.js +18 -0
- package/dist/tabler-icons/375.js +17 -0
- package/dist/tabler-icons/376.js +15 -0
- package/dist/tabler-icons/377.js +17 -0
- package/dist/tabler-icons/378.js +17 -0
- package/dist/tabler-icons/379.js +11 -0
- package/dist/tabler-icons/380.js +15 -0
- package/dist/tabler-icons/381.js +14 -0
- package/dist/tabler-icons/382.js +12 -0
- package/dist/tabler-icons/383.js +20 -0
- package/dist/tabler-icons/384.js +11 -0
- package/dist/tabler-icons/385.js +22 -0
- package/dist/tabler-icons/386.js +30 -0
- package/dist/tabler-icons/387.js +13 -0
- package/dist/tabler-icons/388.js +14 -0
- package/dist/tabler-icons/389.js +19 -0
- package/dist/tabler-icons/390.js +15 -0
- package/dist/tabler-icons/391.js +16 -0
- package/dist/tabler-icons/392.js +19 -0
- package/dist/tabler-icons/393.js +17 -0
- package/dist/tabler-icons/394.js +12 -0
- package/dist/tabler-icons/395.js +12 -0
- package/dist/tabler-icons/396.js +16 -0
- package/dist/tabler-icons/397.js +11 -0
- package/dist/tabler-icons/398.js +18 -0
- package/dist/tabler-icons/399.js +13 -0
- package/dist/tabler-icons/400.js +13 -0
- package/dist/tabler-icons/401.js +18 -0
- package/dist/tabler-icons/402.js +16 -0
- package/dist/tabler-icons/403.js +21 -0
- package/dist/tabler-icons/404.js +17 -0
- package/dist/tabler-icons/405.js +11 -0
- package/dist/tabler-icons/406.js +20 -0
- package/dist/tabler-icons/407.js +15 -0
- package/dist/tabler-icons/408.js +17 -0
- package/dist/tabler-icons/409.js +13 -0
- package/dist/tabler-icons/410.js +19 -0
- package/dist/tabler-icons/411.js +23 -0
- package/dist/tabler-icons/412.js +19 -0
- package/dist/tabler-icons/413.js +15 -0
- package/dist/tabler-icons/414.js +16 -0
- package/dist/tabler-icons/415.js +17 -0
- package/dist/tabler-icons/416.js +17 -0
- package/dist/tabler-icons/417.js +17 -0
- package/dist/tabler-icons/418.js +10 -0
- package/dist/tabler-icons/419.js +24 -0
- package/dist/tabler-icons/420.js +17 -0
- package/dist/tabler-icons/421.js +18 -0
- package/dist/tabler-icons/422.js +12 -0
- package/dist/tabler-icons/423.js +16 -0
- package/dist/tabler-icons/424.js +15 -0
- package/dist/tabler-icons/425.js +24 -0
- package/dist/tabler-icons/426.js +17 -0
- package/dist/tabler-icons/427.js +14 -0
- package/dist/tabler-icons/428.js +26 -0
- package/dist/tabler-icons/429.js +14 -0
- package/dist/tabler-icons/430.js +15 -0
- package/dist/tabler-icons/431.js +13 -0
- package/dist/tabler-icons/432.js +20 -0
- package/dist/tabler-icons/433.js +15 -0
- package/dist/tabler-icons/434.js +17 -0
- package/dist/tabler-icons/435.js +17 -0
- package/dist/tabler-icons/436.js +16 -0
- package/dist/tabler-icons/437.js +16 -0
- package/dist/tabler-icons/438.js +10 -0
- package/dist/tabler-icons/439.js +12 -0
- package/dist/tabler-icons/440.js +14 -0
- package/dist/tabler-icons/441.js +19 -0
- package/dist/tabler-icons/442.js +15 -0
- package/dist/tabler-icons/443.js +18 -0
- package/dist/tabler-icons/444.js +17 -0
- package/dist/tabler-icons/445.js +18 -0
- package/dist/tabler-icons/446.js +16 -0
- package/dist/tabler-icons/447.js +17 -0
- package/dist/tabler-icons/448.js +12 -0
- package/dist/tabler-icons/449.js +17 -0
- package/dist/tabler-icons/450.js +18 -0
- package/dist/tabler-icons/451.js +15 -0
- package/dist/tabler-icons/452.js +16 -0
- package/dist/tabler-icons/453.js +16 -0
- package/dist/tabler-icons/454.js +15 -0
- package/dist/tabler-icons/455.js +17 -0
- package/dist/tabler-icons/456.js +12 -0
- package/dist/tabler-icons/457.js +19 -0
- package/dist/tabler-icons/458.js +14 -0
- package/dist/tabler-icons/459.js +24 -0
- package/dist/tabler-icons/460.js +14 -0
- package/dist/tabler-icons/461.js +19 -0
- package/dist/tabler-icons/462.js +16 -0
- package/dist/tabler-icons/463.js +9 -0
- package/dist/tabler-icons/464.js +19 -0
- package/dist/tabler-icons/465.js +16 -0
- package/dist/tabler-icons/466.js +13 -0
- package/dist/tabler-icons/467.js +19 -0
- package/dist/tabler-icons/468.js +21 -0
- package/dist/tabler-icons/469.js +15 -0
- package/dist/tabler-icons/470.js +10 -0
- package/dist/tabler-icons/471.js +16 -0
- package/dist/tabler-icons/472.js +16 -0
- package/dist/tabler-icons/473.js +20 -0
- package/dist/tabler-icons/474.js +17 -0
- package/dist/tabler-icons/475.js +18 -0
- package/dist/tabler-icons/476.js +17 -0
- package/dist/tabler-icons/477.js +16 -0
- package/dist/tabler-icons/478.js +13 -0
- package/dist/tabler-icons/479.js +21 -0
- package/dist/tabler-icons/480.js +25 -0
- package/dist/tabler-icons/481.js +22 -0
- package/dist/tabler-icons/482.js +17 -0
- package/dist/tabler-icons/483.js +18 -0
- package/dist/tabler-icons/484.js +15 -0
- package/dist/tabler-icons/485.js +15 -0
- package/dist/tabler-icons/486.js +23 -0
- package/dist/tabler-icons/487.js +16 -0
- package/dist/tabler-icons/488.js +18 -0
- package/dist/tabler-icons/489.js +13 -0
- package/dist/tabler-icons/490.js +18 -0
- package/dist/tabler-icons/491.js +17 -0
- package/dist/tabler-icons/492.js +8 -0
- package/dist/tabler-icons/493.js +16 -0
- package/dist/tabler-icons/494.js +16 -0
- package/dist/tabler-icons/495.js +22 -0
- package/dist/tabler-icons/496.js +15 -0
- package/dist/tabler-icons/497.js +14 -0
- package/dist/tabler-icons/498.js +18 -0
- package/dist/tabler-icons/499.js +15 -0
- package/dist/tabler-icons/500.js +15 -0
- package/dist/tabler-icons/501.js +13 -0
- package/dist/tabler-icons/502.js +15 -0
- package/dist/tabler-icons/503.js +17 -0
- package/dist/tabler-icons/504.js +14 -0
- package/dist/tabler-icons/505.js +13 -0
- package/dist/tabler-icons/506.js +19 -0
- package/dist/tabler-icons/507.js +21 -0
- package/dist/tabler-icons/508.js +10 -0
- package/dist/tabler-icons/509.js +18 -0
- package/dist/tabler-icons/510.js +21 -0
- package/dist/tabler-icons/511.js +15 -0
- package/dist/tablerIconData-CQubY1fX.js +533 -0
- package/dist/vee-validate.js +1 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,8 @@ Release-please writes the generated notes from commit messages and does not repl
|
|
|
7
7
|
|
|
8
8
|
### Added
|
|
9
9
|
|
|
10
|
+
- **`TablerIcon`** — any Tabler icon by the name a `tabler-icon` CMS field holds: the export name Studio's picker stores (`IconCashRegister`) or Tabler's kebab-case name (`cash-register`), stega tolerated. `Icon`'s `size`, `label` and `classes`, plus `strokeWidth`; filled icons are filled. The icon is in the server HTML and hydration loads nothing; a page rendered in the browser loads only the data file holding each icon it draws (512 lazy chunks, every `@tabler/icons-vue` 3.48.0 export). An unknown name draws an empty box and warns once, never throws. New exports `tablerIconName` and `preloadTablerIcons`, types `TablerIconProps` and `TablerIconPart`; `<EldraTablerIcon>` through the resolver.
|
|
11
|
+
- **`SiteForm`** draws any form built in Studio from its definition (`definition`, or `formKey` read in the browser) and submits it through the SDK's `client.forms`: every field type with its own control, labels for `locale`, the platform's own checks and wording before sending, the honeypot, Cloudflare Turnstile when the form has a site key (and nothing third-party when it has none), a `422`'s messages under their fields and in an error summary, `429`, `413` and network failures in the summary, the success panel or the merchant's redirect (`navigate`), and the "check your inbox" state of a subscribing form. `layout`, `heading`, `submitLabel`, `classes` (`SiteFormPart`), slots `submit`, `success`, `loading`, `failed`, events `success` and `error`. **`useSiteForm`** is the state it is drawn from, for markup of your own. New messages `formSubmit`, `formSubmitting`, `formLoading`, `formLoadFailed`, `formRequired`, `formRequiredCheckbox`, `formInvalidEmail`, `formInvalidNumber`, `formInvalidUrl`, `formInvalidOption`, `formInvalidFormat`, `formTooShort`, `formTooLong`, `formRefused`, `formRateLimited`, `formTooLarge`, `formUnavailable`, `formSpamCheckRequired`, `formSpamCheckFailed`, `formSuccessTitle`, `formPendingTitle`, `formPendingMessage`, in English and Icelandic. New types `SiteFormClient`, `SiteFormDefinition`, `SiteFormField`, `SiteFormValue`, `SiteFormStatus`, `SiteFormSuccess`, `SiteFormFailure`, `SiteFormFailureReason`, `SiteFormSubmitOutcome`, `SiteFormLayout`, `SiteFormPart`, `SiteFormProps`, `UseSiteFormOptions`, `UseSiteFormReturn`.
|
|
10
12
|
- **`Image` exact crops.** `zoomOrigin: 'focal'` zooms around the focal point itself, so a crop can reach the edges of the picture; the default, `'band'`, keeps the origin in the band the page builder's framing clamps to, so stored framings render as before and as Studio previews them. `crops: ImageCrop[]` art-directs the one `<img>`: a `ratio`, `focal`, `zoom` and `sizes` per media condition, first match first, with `sizes` scoped and scaled per crop, so a phone gets its own crop without a second download. `ratio` also takes a number (width ÷ height). New type `ImageCrop`.
|
|
11
13
|
- **`NavMenu`** — the header navigation: top-level links, and buttons opening a `dropdown` panel or a `mega` panel of columns (entries with `description`, `badge`, `current`, `newTab`). Disclosure pattern: `Enter`/`Space` open, `Tab` walks through, `Escape` closes and returns focus, an outside click or focus leaving closes, one panel at a time; plus the APG arrow keys (`←`/`→`/`Home`/`End` along the bar, `↓`/`↑` into and through a panel, never wrapping). Optional `openOnHover`, opening after a 150ms rest and closing 150ms after the pointer leaves; a closing panel fades out. Below `collapseBelow` (default `lg`; also `md`, `xl`, the container breakpoints `@tablet`/`@content`/`@wide`, `never` and `always`) it becomes a menu button and a left `Drawer` with accordion rows. Takes a resolved Studio link tree as it is. `variant`: `ghost` (default; text colour with a fill on hover and while open) or `muted` (muted text turning the text colour on hover, while open and on the current page, no fill), for the bar and its panels alike. `linkAs`, `classes`, slots `panelItem`/`groupHeading`/`panelFooter`/`toggle`/`drawerFooter`, `v-model` (open panel) and `v-model:drawerOpen`, exposed `close()`. New messages `navMenuLabel`, `navMenuOpen`, `navMenuDrawer`, `navMenuOverview`; new CSS variables `--eldra-nav-menu-offset`, `--eldra-nav-menu-dropdown-min`/`-max`, `--eldra-nav-menu-column-min`.
|
|
12
14
|
- **`NavMenu`'s phone menu**: `drawerLayout` (`accordion`, the default, or `sections`, each panel listed open under its label, the new `drawerSectionHeading` part naming its list, group headings kept where a panel has them); `drawerItems`, the drawer's own entries when they differ from the bar's (a mega panel's area pages, a bar panel's footer links as rows); the `drawerHeader` slot (`{ close }`) for a logo and a call to action in the drawer's header row; the `triggerIcon` slot (`{ item, open }`) replacing the panel buttons' chevron, still turned over while open; `placement` (`bar` or `drawer`) in the `panelItem` and `groupHeading` slot props; new parts `drawerRoot`, `drawerHeader`, `drawerClose`, `drawerBody`, `drawerSectionHeading`. New types `NavMenuDrawerLayout`, `NavMenuPlacement`, `NavMenuPanelPart`, `NavMenuDrawerPanelPart`, `NavMenuPanelItemSlotProps`, `NavMenuGroupHeadingSlotProps`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2026 Paweł Kuna
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -175,11 +175,13 @@ Every component supports all five of these; none hard-codes anything a store mig
|
|
|
175
175
|
| `SearchModal` | `--eldra-search-modal-width` (default `40rem`), `--eldra-search-modal-max-height` (default `40rem`) — both clamped to the viewport inside their own utility, which also carries the full-screen-below-a-48rem-_viewport_ media query; `--eldra-search-modal-field-size` (default `1.0625rem`), `--eldra-search-modal-foot-size`/`-line` (defaults `0.75rem`/`1.4`), `--eldra-search-modal-kbd-size` (default `0.6875rem`) — none with a token of their own; plus everything `SearchBar`'s reused `SearchResultsPanel` reads (`--eldra-search-text-line`, `--eldra-search-empty-line`, `--eldra-control-line-height`) |
|
|
176
176
|
| `Section` | none — the vertical rhythm (`--eldra-section-{sm,md,lg}`) and the gutters it shares with `Container` are shared tokens |
|
|
177
177
|
| `Select` | `--eldra-select-panel-max-height` (default `20rem`), `--eldra-select-panel-max-width` (default `22rem`, clamped to `90vw`), `--eldra-z-popover` (default `30`), `--eldra-field-radius`, `--eldra-field-border-width`, `--eldra-select-group-tracking`, `--eldra-select-option-line`, `--eldra-select-swatch-edge`, the `--eldra-select-match-*` trio, and `--eldra-popover-origin` (`top left` / `bottom left`, set by the panel from the placement it resolved to) |
|
|
178
|
+
| `SiteForm` | none of its own: it composes `FormLayout`, `FieldWrapper`, `Input`, `Textarea`, `Select`, `Checkbox` and `Button`, each restyled through its own row; its `classes` reach their parts (see [Site forms](#site-forms)) |
|
|
178
179
|
| `Skeleton` | none — `width` sets an inline style directly (see the Deviations entry), no CSS variable involved |
|
|
179
180
|
| `StockBadge` | `--eldra-stock-status-line` (default `1.4`) — the status line text's line ratio, no token of its own |
|
|
180
181
|
| `Switch` | `--eldra-switch-radius` (default `var(--eldra-radius-full)`), `--eldra-switch-track-border-width` (default `1.5px`), `--eldra-switch-thumb-offset` (default `0.1875rem`, the thumb's rest inset from the track's start edge) |
|
|
181
182
|
| `Tab` | none — reads only the shared tokens from layer 1, plus `VariantPicker`'s `text-variant-pill` type style (no per-component variable of its own; see that component's row) |
|
|
182
183
|
| `TabPanel` | none — reads only the shared tokens from layer 1 |
|
|
184
|
+
| `TablerIcon` | none — reads only the shared tokens from layer 1, the same as `Icon` |
|
|
183
185
|
| `Tabs` | none — reads only the shared tokens from layer 1; the `eldra-scrollbar-hide` utility the tab list uses has no variable of its own. The pills list's own padding, the negative margin that cancels it and its scroll padding are all `calc(var(--eldra-focus-offset) + var(--eldra-focus-width))` — the focus ring's own reach, so raising either ring token widens the room the scrolling list keeps for a focused pill's ring instead of letting it clip (the underline variant reserves nothing: its tabs ring _inside_ their own box, per the design spec, and padding that list vertically would push its hairline off the tabs). Set a gutter through `classes.list` only if it is wider than that reach — a `px-*`/`-mx-*`/`scroll-px-*` utility of your own replaces the reservation on that axis rather than composing with it, the way `--eldra-carousel-bleed` does for the carousel |
|
|
184
186
|
| `Textarea` | `--eldra-textarea-radius` (default `var(--eldra-radius-md)`), `--eldra-textarea-min-height` (set from the `minHeight` prop, default `5rem`), `--eldra-counter-line-height` (default `1.5`) |
|
|
185
187
|
| `Toast` | `--eldra-toast-title-size` (default `0.9375rem`), `--eldra-toast-title-line` (default `1.4`) — the title's own size/line, sitting between two type-scale steps with no token of its own |
|
|
@@ -313,6 +315,91 @@ import { isIS } from '@eldrajs/ui/messages/is-IS';
|
|
|
313
315
|
app.provide(MESSAGES_KEY, isIS);
|
|
314
316
|
```
|
|
315
317
|
|
|
318
|
+
## Site forms
|
|
319
|
+
|
|
320
|
+
`SiteForm` draws any form a merchant builds in Studio (Settings › Forms) from its public definition,
|
|
321
|
+
and submits it through the SDK. It is the form; the page around it (heading copy, card, image) is
|
|
322
|
+
yours.
|
|
323
|
+
|
|
324
|
+
```vue
|
|
325
|
+
<script setup lang="ts">
|
|
326
|
+
import { createEldraClient } from '@eldrajs/sdk';
|
|
327
|
+
import { SiteForm } from '@eldrajs/ui';
|
|
328
|
+
import { isIS } from '@eldrajs/ui/messages/is-IS';
|
|
329
|
+
|
|
330
|
+
const eldra = createEldraClient({ orgId: useRuntimeConfig().public.eldraOrgId });
|
|
331
|
+
const { data: contact } = await useAsyncData('form:contact', () => eldra.forms.get('contact'));
|
|
332
|
+
</script>
|
|
333
|
+
|
|
334
|
+
<template>
|
|
335
|
+
<SiteForm :definition="contact" :client="eldra" locale="is-IS" :messages="isIS" />
|
|
336
|
+
</template>
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
- **Definition or key.** Pass `definition` (read in your data loader, so the form is in the
|
|
340
|
+
server-rendered HTML), or only `formKey`, and the form reads it with `client.forms.get` in the
|
|
341
|
+
browser, showing `formLoading` until it arrives and `formLoadFailed` (`role="alert"`) if it
|
|
342
|
+
cannot. A definition with a field type this version does not know is refused whole, with the
|
|
343
|
+
same notice, rather than drawn with the wrong control. A `null` definition with no `formKey`
|
|
344
|
+
reads as a form that cannot be shown, so with a loader that is still reading
|
|
345
|
+
(`useLazyAsyncData`) render `SiteForm` once the definition is there (`v-if`). `client` is
|
|
346
|
+
anything with the SDK's `forms.get` and `forms.submit` (`SiteFormClient`).
|
|
347
|
+
- **Fields.** `text`, `email`, `phone` (`type="tel"`), `number` (a text field with the decimal
|
|
348
|
+
keypad, so a decimal comma survives), `url`, `textarea`, `select` (`Select`, clearable when
|
|
349
|
+
optional), `checkbox` and `consent` (`Checkbox`; a required one must be ticked). Labels,
|
|
350
|
+
placeholders and option labels are picked for `locale`: the exact tag, then the same language,
|
|
351
|
+
then the first tag, as the platform picks them. Every required field carries native `required`,
|
|
352
|
+
and a required field with a label of its own (not a box) the `*` mark; in a form of more than
|
|
353
|
+
one field the optional ones say "(optional)".
|
|
354
|
+
- **Checks.** On submit every field is checked by the platform's own rules in the platform's order
|
|
355
|
+
(required; the per-type length ceiling, 254 for an email, 50 for a phone, 8000 for a textarea
|
|
356
|
+
and 500 otherwise, lowered by `maxLength`; the email, number, URL and option shape; `minLength`;
|
|
357
|
+
`pattern` against the whole value, an email lowercased and a number with a decimal point, as
|
|
358
|
+
the platform matches it), on the value the platform will see (control characters dropped, Go's
|
|
359
|
+
whitespace collapsed outside a textarea, trimmed), with the platform's wording, except that a
|
|
360
|
+
required box says `formRequiredCheckbox`. A pattern that does not compile as a `u` RegExp, and a
|
|
361
|
+
value holding a character RE2 and JavaScript read differently, are left to the platform rather
|
|
362
|
+
than guessed at. Nothing is sent while any field fails; focus moves to the first failing field.
|
|
363
|
+
A field's message clears when its value changes.
|
|
364
|
+
- **Spam.** The honeypot the definition names is rendered visually hidden, `inert`,
|
|
365
|
+
`aria-hidden` and out of the tab order, and sent as `hp` only when something filled it. When
|
|
366
|
+
the definition carries a `turnstileSiteKey`, Cloudflare's script is loaded (once per page) and
|
|
367
|
+
the widget rendered under the fields; the token is sent as `turnstileToken`, and a fresh one is
|
|
368
|
+
asked for after every refused submission because a token is single-use. A form without a site
|
|
369
|
+
key loads nothing third-party.
|
|
370
|
+
- **Answers.** A `422`'s field messages go under their fields (`aria-invalid`, first in
|
|
371
|
+
`aria-describedby`); its form messages, and a message for a field the form does not draw, go in
|
|
372
|
+
the error summary above the fields (`role="alert"`). A `429`, a `413` and anything else (the
|
|
373
|
+
network included) are the `formRateLimited`, `formTooLarge` and `formUnavailable` messages in the
|
|
374
|
+
same summary, and the visitor can send again. `error` is emitted with `{ reason, cause? }`
|
|
375
|
+
(`refused`, `rate-limited`, `too-large`, `unavailable`).
|
|
376
|
+
- **Success.** The form is replaced by a `role="status"` panel that takes focus: `formSuccessTitle`
|
|
377
|
+
and the merchant's message, or for a subscribing form (`pending`) `formPendingTitle` and the
|
|
378
|
+
merchant's message or `formPendingMessage`. A merchant redirect is followed instead: a site path
|
|
379
|
+
(`/takk`) through `navigate` when you pass one (your router's, to stay in the app), an absolute
|
|
380
|
+
http(s) address, and a path with no `navigate`, through `location.assign`; anything else the
|
|
381
|
+
platform sent is dropped. `success` is emitted first with `{ pending, redirect }`.
|
|
382
|
+
- **Consent.** A subscribing form's `consentText` is shown as plain text under the button, which
|
|
383
|
+
it describes (`aria-describedby`): pressing the button is the consent.
|
|
384
|
+
- **Layout.** `layout` is `FormLayout`'s: `single`, `two`, or `inline` for a sign-up, which applies
|
|
385
|
+
only to a form of one text-like field and falls back to `single` otherwise. `heading` and
|
|
386
|
+
`headingLevel` give it a visible title; without one it is named by the definition's `name`.
|
|
387
|
+
- **Styling.** `classes` takes the parts in `SiteFormPart`: `root`, `notice`, `success`,
|
|
388
|
+
`successTitle`, `successMessage`, `consentText` and `turnstile` are its own; `form`, `heading`,
|
|
389
|
+
`errorSummary`, `fields` and `actions` reach `FormLayout`; `field`, `label`, `requiredMark`,
|
|
390
|
+
`optionalText` and `error` reach every field's `FieldWrapper`; `control` reaches each `Input` and
|
|
391
|
+
`Textarea` element and the `Select` trigger; `checkbox` each `Checkbox`; `submit` the `Button`.
|
|
392
|
+
Slots: `submit` (`{ label, submitting, describedBy }`, a `type="submit"` control of your own;
|
|
393
|
+
bind `describedBy` to its `aria-describedby`, the consent sentence when there is one), `success`
|
|
394
|
+
(`{ pending, title, message, reset }`, where `reset` empties the form and focuses its first
|
|
395
|
+
field), `loading` and `failed`.
|
|
396
|
+
- **Strings.** Every string is a `form*` message (English built in, Icelandic in
|
|
397
|
+
`@eldrajs/ui/messages/is-IS`), set app-wide or through the `messages` prop, which `SiteForm`
|
|
398
|
+
also passes down to the controls inside it. `submitLabel` overrides the button's text.
|
|
399
|
+
|
|
400
|
+
`useSiteForm(options)` is the state the component is drawn from (the localized definition, values,
|
|
401
|
+
errors, honeypot, Turnstile element, `submit()` and `reset()`), for a form with markup of your own.
|
|
402
|
+
|
|
316
403
|
## Composables
|
|
317
404
|
|
|
318
405
|
Exported from the package root — the same building blocks `Select`, `MultiSelect`, `SearchBar` and
|
|
@@ -1070,6 +1157,10 @@ during development, outside this repository's own history.
|
|
|
1070
1157
|
Things this package ships that design spec 1 does not name at all. Each is listed here so a reader
|
|
1071
1158
|
comparing the package against the spec can tell an addition from a drift.
|
|
1072
1159
|
|
|
1160
|
+
- **`SiteForm` and `useSiteForm`**: a form from the platform's Forms API, drawn from its public
|
|
1161
|
+
definition with this package's own controls, checked by the platform's rules and submitted
|
|
1162
|
+
through `@eldrajs/sdk`. The spec has form controls and a form layout but no platform form; see
|
|
1163
|
+
[Site forms](#site-forms).
|
|
1073
1164
|
- **`Chip` and `ChipGroup`** — an operator addition (2026-09-25) for the private component
|
|
1074
1165
|
library's `FilterChip`, which a store migrating onto this package needs an equivalent of. There
|
|
1075
1166
|
is no spec 1 "Chip" section; the visual language is derived from two sections that do exist:
|
|
@@ -1468,6 +1559,47 @@ children?, layout? }`, one level of children. Children sharing a `group` form a
|
|
|
1468
1559
|
the fade's own value spans, `currentValue`/`compareAtValue` on `Price` and `labelValue` on
|
|
1469
1560
|
`StockBadge`.
|
|
1470
1561
|
|
|
1562
|
+
- **`TablerIcon`** — any [Tabler](https://tabler.io/icons) icon by the name a `tabler-icon` CMS
|
|
1563
|
+
field holds, for a value an editor picks in Studio rather than an icon the code knows. It takes
|
|
1564
|
+
the export name Studio's picker stores (`IconCashRegister`) or Tabler's kebab-case name
|
|
1565
|
+
(`cash-register`, what hand-written and MCP-written content holds), and tolerates the stega
|
|
1566
|
+
payload Studio's preview appends. `size`, `label` and `classes` are `Icon`'s, with `Icon`'s
|
|
1567
|
+
decorative-by-default ARIA; `strokeWidth` (default the spec's 1.75) is for a site whose own
|
|
1568
|
+
design draws another weight; a filled icon (`IconHeartFilled`, `heart-filled`) is filled with no
|
|
1569
|
+
stroke. It is the one icon component here that takes a name rather than a component, because a
|
|
1570
|
+
CMS field can only hold a name.
|
|
1571
|
+
|
|
1572
|
+
**Only the icons a page draws reach the browser.** The icons (every `@tabler/icons-vue` export,
|
|
1573
|
+
aliases included) ship as data in 512 small files of about 12 icons each, which a bundler emits
|
|
1574
|
+
as lazy chunks; the component loads the one file holding its icon. Rendered on the server
|
|
1575
|
+
(`onServerPrefetch`), the `<svg>` and its paths are in the HTML, stamped
|
|
1576
|
+
`data-tabler-icon="<export name>"`, and hydration keeps them and loads nothing when the stamp is
|
|
1577
|
+
the client's name, so a server-rendered or prerendered page downloads no icon code at all (a
|
|
1578
|
+
client rendering another name draws its own; an icon the server failed to load is unstamped, so
|
|
1579
|
+
the browser loads it). A page rendered in the browser (a client-side navigation, Studio's live
|
|
1580
|
+
preview) loads the index chunk (about 5.5 kB gzipped, once) and one file per icon it does not
|
|
1581
|
+
have yet (1 to 1.7 kB gzipped); until it arrives the box is drawn empty at its full size, so
|
|
1582
|
+
nothing moves. The server bundle
|
|
1583
|
+
carries every icon (about 1.8 MB, 450 kB gzipped), since any name can be asked for.
|
|
1584
|
+
`preloadTablerIcons(names)` loads a page's icons ahead of render, for a site that wants a
|
|
1585
|
+
client-side navigation to draw them in its first frame (await it where the page's data loads).
|
|
1586
|
+
One file per icon was measured and rejected: Nuxt keeps a manifest entry for every client chunk
|
|
1587
|
+
in its server bundle, and 6,300 of them added 3.7 MB to a Cloudflare Worker and doubled the
|
|
1588
|
+
build.
|
|
1589
|
+
|
|
1590
|
+
**An unknown name never throws.** A name Tabler does not have renders the empty box and warns
|
|
1591
|
+
once; a value that cannot be a name (`Cash Register`) renders nothing and warns once; an empty
|
|
1592
|
+
value renders nothing. A failed chunk load warns, draws the empty box and is retried on the next
|
|
1593
|
+
mount. `preloadTablerIcons` takes one name or any iterable of them.
|
|
1594
|
+
|
|
1595
|
+
**The data follows Studio's picker.** It is generated from the `@tabler/icons-vue` version this
|
|
1596
|
+
package pins (`pnpm --filter @eldrajs/ui build-tabler-icons`, checked by `check:tabler-icons`),
|
|
1597
|
+
which must be at least the version Studio's picker uses, so every name the picker offers
|
|
1598
|
+
resolves. A name never disappears: the generator fails when a new version drops one the data
|
|
1599
|
+
held, and `RETIRED` in `scripts/build-tabler-icons.mjs` maps it to its successor
|
|
1600
|
+
(`IconMoodConfuzedFilled`, offered by Studio up to 3.44 and gone from 3.48 without an alias).
|
|
1601
|
+
The markup comes only from that data; a field value is only ever a lookup key.
|
|
1602
|
+
|
|
1471
1603
|
## Deviations
|
|
1472
1604
|
|
|
1473
1605
|
- **`FilterPanel`'s price range is inset by the thumb's radius plus the focus ring's reach (0.875rem), not the spec's bare 0.625rem.** The spec's Filter panel rows inset the track and the histogram by 0.625rem so the thumbs' centres reach the panel's edges; the extra ring reach keeps a focused end thumb from being clipped by a scrolling drawer body, which would otherwise show a horizontal scrollbar. It is still the thumb's own inset rather than `RangeSlider`'s default half-a-touch-target gutter (`eldra-range-gutter-thumb` versus `eldra-range-gutter`), which is what put a sidebar's track at two thirds of its width.
|
|
@@ -837,7 +837,33 @@ var enUS = {
|
|
|
837
837
|
* pending-count read, which a panel mounted ahead of it does not have yet — and a button that
|
|
838
838
|
* said "Show 0 products" while the read was in flight would be a number nobody can trust.
|
|
839
839
|
*/
|
|
840
|
-
filterPanelShowProducts: "Show products"
|
|
840
|
+
filterPanelShowProducts: "Show products",
|
|
841
|
+
/** `SiteForm`'s submit button. The field messages below are the platform's own `422` wording. */
|
|
842
|
+
formSubmit: "Send",
|
|
843
|
+
/** The submit button's accessible name while the submission is on its way. */
|
|
844
|
+
formSubmitting: "Sending",
|
|
845
|
+
formLoading: "Loading the form…",
|
|
846
|
+
formLoadFailed: "This form can’t be shown right now.",
|
|
847
|
+
formRequired: "This field is required.",
|
|
848
|
+
formRequiredCheckbox: "Tick this box to continue.",
|
|
849
|
+
formInvalidEmail: "Enter a valid email address.",
|
|
850
|
+
formInvalidNumber: "Enter a number, for example 12 or 3.5.",
|
|
851
|
+
formInvalidUrl: "Enter a full web address starting with http:// or https://.",
|
|
852
|
+
formInvalidOption: "Choose one of the options.",
|
|
853
|
+
formInvalidFormat: "Check the format of this value.",
|
|
854
|
+
formTooShort: (min) => `This is too short (at least ${min} ${min === 1 ? "character" : "characters"}).`,
|
|
855
|
+
formTooLong: (max) => `This is too long (at most ${max} ${max === 1 ? "character" : "characters"}).`,
|
|
856
|
+
/** A refusal the platform sent no message for. */
|
|
857
|
+
formRefused: "Check your answers and try again.",
|
|
858
|
+
formRateLimited: "Too many attempts. Wait a minute and try again.",
|
|
859
|
+
formTooLarge: "That is more than the form can take. Shorten your answers and try again.",
|
|
860
|
+
formUnavailable: "The form could not be sent just now. Try again in a minute.",
|
|
861
|
+
formSpamCheckRequired: "Complete the spam check and try again.",
|
|
862
|
+
formSpamCheckFailed: "The spam check could not load. Reload the page and try again.",
|
|
863
|
+
formSuccessTitle: "Thank you",
|
|
864
|
+
/** A subscribing form's success: the address is confirmed from an email. */
|
|
865
|
+
formPendingTitle: "Check your inbox",
|
|
866
|
+
formPendingMessage: "We sent you an email. Open the link in it to confirm."
|
|
841
867
|
};
|
|
842
868
|
//#endregion
|
|
843
869
|
//#region src/composables/useMessages.ts
|
|
@@ -922,8 +948,20 @@ var FORM_SUBMITTING_KEY = Symbol("eldra-form-submitting");
|
|
|
922
948
|
*/
|
|
923
949
|
var FORM_LAYOUT_KEY = Symbol("eldra-form-layout");
|
|
924
950
|
//#endregion
|
|
925
|
-
//#region src/components/icon/
|
|
926
|
-
|
|
951
|
+
//#region src/components/icon/sizes.ts
|
|
952
|
+
/**
|
|
953
|
+
* The spec's sizes as Tailwind utilities. The theme's `--spacing` is 0.25rem,
|
|
954
|
+
* so `size-4`/`size-5`/`size-6`/`size-8` are exactly 1/1.25/1.5/2rem — no
|
|
955
|
+
* literal length appears here or in the built CSS.
|
|
956
|
+
*/
|
|
957
|
+
var ICON_SIZE_CLASS = {
|
|
958
|
+
sm: "size-4",
|
|
959
|
+
md: "size-5",
|
|
960
|
+
lg: "size-6",
|
|
961
|
+
xl: "size-8"
|
|
962
|
+
};
|
|
963
|
+
/** The spec's outline stroke weight. */
|
|
964
|
+
var ICON_STROKE_WIDTH = 1.75;
|
|
927
965
|
//#endregion
|
|
928
966
|
//#region src/components/icon/Icon.vue
|
|
929
967
|
var Icon_default = /* @__PURE__ */ defineComponent({
|
|
@@ -936,31 +974,20 @@ var Icon_default = /* @__PURE__ */ defineComponent({
|
|
|
936
974
|
},
|
|
937
975
|
setup(__props) {
|
|
938
976
|
const props = __props;
|
|
939
|
-
|
|
940
|
-
* The spec's sizes as Tailwind utilities. The theme's `--spacing` is 0.25rem,
|
|
941
|
-
* so `size-4`/`size-5`/`size-6`/`size-8` are exactly 1/1.25/1.5/2rem — no
|
|
942
|
-
* literal length appears here or in the built CSS.
|
|
943
|
-
*/
|
|
944
|
-
const SIZE_CLASS = {
|
|
945
|
-
sm: "size-4",
|
|
946
|
-
md: "size-5",
|
|
947
|
-
lg: "size-6",
|
|
948
|
-
xl: "size-8"
|
|
949
|
-
};
|
|
950
|
-
/** The spec's outline stroke weight. */
|
|
951
|
-
const rootClass = computed(() => partClass(`${SIZE_CLASS[props.size]} shrink-0`, props.classes, "root"));
|
|
977
|
+
const rootClass = computed(() => partClass(`${ICON_SIZE_CLASS[props.size]} shrink-0`, props.classes, "root"));
|
|
952
978
|
return (_ctx, _cache) => {
|
|
953
979
|
return openBlock(), createBlock(resolveDynamicComponent(__props.icon), {
|
|
954
980
|
"data-eldra-ui": "",
|
|
955
981
|
"data-part": "root",
|
|
956
982
|
class: normalizeClass(rootClass.value),
|
|
957
|
-
"stroke-width":
|
|
983
|
+
"stroke-width": unref(ICON_STROKE_WIDTH),
|
|
958
984
|
"aria-hidden": __props.label === void 0 ? "true" : void 0,
|
|
959
985
|
role: __props.label === void 0 ? void 0 : "img",
|
|
960
986
|
"aria-label": __props.label,
|
|
961
987
|
focusable: "false"
|
|
962
988
|
}, null, 8, [
|
|
963
989
|
"class",
|
|
990
|
+
"stroke-width",
|
|
964
991
|
"aria-hidden",
|
|
965
992
|
"role",
|
|
966
993
|
"aria-label"
|
|
@@ -9047,4 +9074,4 @@ var VariantPicker_default = /* @__PURE__ */ defineComponent({
|
|
|
9047
9074
|
}
|
|
9048
9075
|
});
|
|
9049
9076
|
//#endregion
|
|
9050
|
-
export { useEldraUiLocale as $, FIELD_BASE as A, formatCurrency as B, filterNumericBeforeInput as C, stripMask as D, defaultCharacterMeaning as E, FIELD_SIZE as F, useSlotPresence as G, formatUnit as H, createNumberFormat as I, DEFAULT_UI_LOCALE as J, useHeadingTag as K, currencyFractionDigits as L, FIELD_DISABLED as M, FIELD_LIVE as N, CurrencyInput_default as O, FIELD_SEARCH_APPEARANCE as P, useEldraUiCurrency as Q, currencySymbol as R, VisuallyHidden_default as S, applyMask as T, localeSeparators as U, formatNumber as V, parseLocaleNumber as W, provideEldraUiCurrency as X, LOCALE_KEY as Y, provideEldraUiLocale as Z, normalizeText as _,
|
|
9077
|
+
export { useEldraUiLocale as $, FIELD_BASE as A, formatCurrency as B, filterNumericBeforeInput as C, partClass as Ct, stripMask as D, defaultCharacterMeaning as E, FIELD_SIZE as F, useSlotPresence as G, formatUnit as H, createNumberFormat as I, DEFAULT_UI_LOCALE as J, useHeadingTag as K, currencyFractionDigits as L, FIELD_DISABLED as M, FIELD_LIVE as N, CurrencyInput_default as O, FIELD_SEARCH_APPEARANCE as P, useEldraUiCurrency as Q, currencySymbol as R, VisuallyHidden_default as S, cx as St, applyMask as T, localeSeparators as U, formatNumber as V, parseLocaleNumber as W, provideEldraUiCurrency as X, LOCALE_KEY as Y, provideEldraUiLocale as Z, normalizeText as _, useMessages as _t, claimShortcut as a, FieldError_default as at, focusInvalid as b, joinIds as bt, SearchResultsPanel_default as c, Button_default as ct, MultiSelect_default as d, ICON_SIZE_CLASS as dt, TAG_FILL as et, usePopover as f, ICON_STROKE_WIDTH as ft, matchRange as g, provideEldraUiMessages as gt, useFloating$1 as h, MESSAGES_KEY as ht, SearchBar_default as i, CheckboxGroup_default as it, FIELD_CLEAR_BUTTON as j, UnitInput_default as k, RadioGroup_default as l, Spinner_default as lt, useTeleportTarget as m, FORM_SUBMITTING_KEY as mt, Textarea_default as n, TAG_SHAPE as nt, ownsShortcut as o, Checkbox_default as ot, useOverlay as p, FORM_LAYOUT_KEY as pt, CURRENCY_KEY as q, Select_default as r, tagPadding as rt, releaseShortcut as s, FIELD_KEY as st, VariantPicker_default as t, TAG_REMOVE_BUTTON as tt, QuantityStepper_default as u, Icon_default as ut, useListbox as v, enUS as vt, Input_default as w, Switch_default as x, useUiId as xt, FormLayout_default as y, useControllableModel as yt, defaultUnitFormat as z };
|
package/dist/componentNames.d.ts
CHANGED
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
* it from `@eldrajs/ui`, where it does not exist, and would pull an optional peer into a project
|
|
16
16
|
* that never installed it. `src/__tests__/veeValidateIsolation.spec.ts` asserts both halves.
|
|
17
17
|
*/
|
|
18
|
-
export declare const componentNames: readonly ["Accordion", "AccordionItem", "Avatar", "AvatarGroup", "Badge", "Breadcrumb", "Button", "ButtonGroup", "Carousel", "Checkbox", "CheckboxGroup", "Chip", "ChipGroup", "Container", "ContentCard", "CurrencyInput", "Dialog", "Drawer", "EditorPlaceholder", "EmptyState", "FeatureCard", "FieldWrapper", "FilterPanel", "FormLayout", "Icon", "Image", "Input", "Lightbox", "Link", "LoadMore", "LogoItem", "MultiSelect", "NavMenu", "Pagination", "Popover", "Price", "ProductCard", "QuantityStepper", "RadioGroup", "RangeSlider", "Rating", "SearchBar", "SearchModal", "Section", "Select", "Skeleton", "StockBadge", "Switch", "Tab", "TabPanel", "Tabs", "Textarea", "Toast", "Toaster", "Tooltip", "UnitInput", "VariantPicker", "VisuallyHidden"];
|
|
18
|
+
export declare const componentNames: readonly ["Accordion", "AccordionItem", "Avatar", "AvatarGroup", "Badge", "Breadcrumb", "Button", "ButtonGroup", "Carousel", "Checkbox", "CheckboxGroup", "Chip", "ChipGroup", "Container", "ContentCard", "CurrencyInput", "Dialog", "Drawer", "EditorPlaceholder", "EmptyState", "FeatureCard", "FieldWrapper", "FilterPanel", "FormLayout", "Icon", "Image", "Input", "Lightbox", "Link", "LoadMore", "LogoItem", "MultiSelect", "NavMenu", "Pagination", "Popover", "Price", "ProductCard", "QuantityStepper", "RadioGroup", "RangeSlider", "Rating", "SearchBar", "SearchModal", "Section", "Select", "SiteForm", "Skeleton", "StockBadge", "Switch", "Tab", "TabPanel", "TablerIcon", "Tabs", "Textarea", "Toast", "Toaster", "Tooltip", "UnitInput", "VariantPicker", "VisuallyHidden"];
|
|
19
19
|
export type ComponentName = (typeof componentNames)[number];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IconProps
|
|
1
|
+
import { IconProps } from './types.js';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<IconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IconProps> & Readonly<{}>, {
|
|
3
|
-
size: IconSize;
|
|
3
|
+
size: import('./types.js').IconSize;
|
|
4
4
|
label: string;
|
|
5
5
|
classes: Partial<Record<import('./types.js').IconPart, string>>;
|
|
6
6
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IconSize } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The spec's sizes as Tailwind utilities. The theme's `--spacing` is 0.25rem,
|
|
4
|
+
* so `size-4`/`size-5`/`size-6`/`size-8` are exactly 1/1.25/1.5/2rem — no
|
|
5
|
+
* literal length appears here or in the built CSS.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ICON_SIZE_CLASS: Record<IconSize, string>;
|
|
8
|
+
/** The spec's outline stroke weight. */
|
|
9
|
+
export declare const ICON_STROKE_WIDTH = 1.75;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { UiMessages } from '../../messages/en-US.js';
|
|
2
|
+
import { SiteFormFailure, SiteFormProps, SiteFormSuccess } from './types.js';
|
|
3
|
+
type __VLS_Slots = {
|
|
4
|
+
loading?(): unknown;
|
|
5
|
+
failed?(): unknown;
|
|
6
|
+
submit?(props: {
|
|
7
|
+
label: string;
|
|
8
|
+
submitting: boolean;
|
|
9
|
+
describedBy: string | undefined;
|
|
10
|
+
}): unknown;
|
|
11
|
+
success?(props: {
|
|
12
|
+
pending: boolean;
|
|
13
|
+
title: string;
|
|
14
|
+
message: string;
|
|
15
|
+
reset: () => void;
|
|
16
|
+
}): unknown;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import('vue').DefineComponent<SiteFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
|
+
error: (failure: SiteFormFailure) => any;
|
|
20
|
+
success: (success: SiteFormSuccess) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<SiteFormProps> & Readonly<{
|
|
22
|
+
onError?: ((failure: SiteFormFailure) => any) | undefined;
|
|
23
|
+
onSuccess?: ((success: SiteFormSuccess) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
classes: Partial<Record<import('./types.js').SiteFormPart, string>>;
|
|
26
|
+
headingLevel: import('../../index.js').FormLayoutHeadingLevel;
|
|
27
|
+
messages: Partial<UiMessages>;
|
|
28
|
+
layout: import('./types.js').SiteFormLayout;
|
|
29
|
+
heading: string;
|
|
30
|
+
definition: import('@eldrajs/sdk').EldraFormDefinition | null;
|
|
31
|
+
formKey: string;
|
|
32
|
+
pagePath: string;
|
|
33
|
+
submitLabel: string;
|
|
34
|
+
navigate: (path: string) => void;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EldraFormDefinition, EldraFormLocalized } from '@eldrajs/sdk';
|
|
2
|
+
import { SiteFormDefinition, SiteFormField } from './types.js';
|
|
3
|
+
/** One locale's text: exact tag, same language, first sorted tag, `''`, as the platform's `formLabel`. */
|
|
4
|
+
export declare function pickLocalized(map: EldraFormLocalized | undefined, locale: string): string;
|
|
5
|
+
export declare function isBooleanField(field: Pick<SiteFormField, 'type'>): boolean;
|
|
6
|
+
/** A `/` path or an absolute http(s) URL, the two shapes the platform accepts for a redirect. */
|
|
7
|
+
export declare function safeRedirect(target: string): string | null;
|
|
8
|
+
/** Every per-locale text resolved for `locale`; throws on a field type it cannot draw. */
|
|
9
|
+
export declare function localizeSiteForm(raw: EldraFormDefinition, locale: string): SiteFormDefinition;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export declare const TURNSTILE_SCRIPT_SRC = "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit";
|
|
3
|
+
interface TurnstileRenderOptions {
|
|
4
|
+
sitekey: string;
|
|
5
|
+
callback: (token: string) => void;
|
|
6
|
+
'expired-callback': () => void;
|
|
7
|
+
'error-callback': () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface TurnstileApi {
|
|
10
|
+
render(container: HTMLElement, options: TurnstileRenderOptions): string;
|
|
11
|
+
reset(widgetId: string): void;
|
|
12
|
+
remove(widgetId: string): void;
|
|
13
|
+
}
|
|
14
|
+
/** Cloudflare Turnstile in `container` while `siteKey` is set; nothing loads without one. */
|
|
15
|
+
export declare function useTurnstile(siteKey: Ref<string | null>, container: Ref<HTMLElement | null>): {
|
|
16
|
+
token: Ref<string | null, string | null>;
|
|
17
|
+
failed: Ref<boolean, boolean>;
|
|
18
|
+
reset: () => void;
|
|
19
|
+
};
|
|
20
|
+
/** Test seam: forgets the page-wide script promise. */
|
|
21
|
+
export declare function resetTurnstileLoaderForTests(): void;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { EldraFormDefinition, EldraFormFieldType, EldraFormsClient } from '@eldrajs/sdk';
|
|
2
|
+
import { UiMessages } from '../../messages/en-US.js';
|
|
3
|
+
import { FormLayoutHeadingLevel } from '../form-layout/types.js';
|
|
4
|
+
/** What a form reads and submits through: `createEldraClient()`'s client, or anything shaped like its `forms`. */
|
|
5
|
+
export interface SiteFormClient {
|
|
6
|
+
forms: Pick<EldraFormsClient, 'get' | 'submit'>;
|
|
7
|
+
}
|
|
8
|
+
/** A field with its texts resolved for one locale. */
|
|
9
|
+
export interface SiteFormField {
|
|
10
|
+
id: string;
|
|
11
|
+
type: EldraFormFieldType;
|
|
12
|
+
required: boolean;
|
|
13
|
+
label: string;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
options?: Array<{
|
|
16
|
+
value: string;
|
|
17
|
+
label: string;
|
|
18
|
+
}>;
|
|
19
|
+
validation?: {
|
|
20
|
+
minLength?: number;
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
pattern?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** A form definition with every per-locale text resolved for one locale. */
|
|
26
|
+
export interface SiteFormDefinition {
|
|
27
|
+
key: string;
|
|
28
|
+
name: string;
|
|
29
|
+
fields: SiteFormField[];
|
|
30
|
+
honeypotField: string;
|
|
31
|
+
turnstileSiteKey: string | null;
|
|
32
|
+
successMessage: string;
|
|
33
|
+
/** A `/` path or an absolute http(s) URL; anything else the platform sent is dropped. */
|
|
34
|
+
successRedirect: string | null;
|
|
35
|
+
/** The consent sentence of a subscribing form, `''` for any other form. */
|
|
36
|
+
consentText: string;
|
|
37
|
+
}
|
|
38
|
+
/** A checkbox or consent field holds a boolean, every other field a string. */
|
|
39
|
+
export type SiteFormValue = string | boolean;
|
|
40
|
+
/** Whether the definition can be drawn yet. */
|
|
41
|
+
export type SiteFormStatus = 'loading' | 'failed' | 'ready';
|
|
42
|
+
export interface SiteFormSuccess {
|
|
43
|
+
/** `true` when the form subscribes the visitor and a confirmation email is on its way. */
|
|
44
|
+
pending: boolean;
|
|
45
|
+
redirect: string | null;
|
|
46
|
+
}
|
|
47
|
+
/** `refused` is a `422`, `rate-limited` a `429`, `too-large` a `413`, `unavailable` anything else. */
|
|
48
|
+
export type SiteFormFailureReason = 'refused' | 'rate-limited' | 'too-large' | 'unavailable';
|
|
49
|
+
export interface SiteFormFailure {
|
|
50
|
+
reason: SiteFormFailureReason;
|
|
51
|
+
/** What the client threw; absent for a `422`, which the SDK resolves rather than throws. */
|
|
52
|
+
cause?: unknown;
|
|
53
|
+
}
|
|
54
|
+
/** `invalid` means the visitor's answers failed the checks here and nothing was sent. */
|
|
55
|
+
export type SiteFormSubmitOutcome = {
|
|
56
|
+
kind: 'success';
|
|
57
|
+
success: SiteFormSuccess;
|
|
58
|
+
} | {
|
|
59
|
+
kind: 'invalid';
|
|
60
|
+
} | {
|
|
61
|
+
kind: 'failed';
|
|
62
|
+
failure: SiteFormFailure;
|
|
63
|
+
} | {
|
|
64
|
+
kind: 'ignored';
|
|
65
|
+
};
|
|
66
|
+
export type SiteFormLayout = 'single' | 'two' | 'inline';
|
|
67
|
+
/** The parts `classes` restyles; which inner component each reaches is in the README, "Site forms". */
|
|
68
|
+
export type SiteFormPart = 'root' | 'notice' | 'form' | 'heading' | 'errorSummary' | 'fields' | 'actions' | 'field' | 'label' | 'requiredMark' | 'optionalText' | 'error' | 'control' | 'checkbox' | 'turnstile' | 'consentText' | 'submit' | 'success' | 'successTitle' | 'successMessage';
|
|
69
|
+
export interface SiteFormProps {
|
|
70
|
+
/** As `client.forms.get(key)` answers it, read in your data loader so the form is server-rendered. */
|
|
71
|
+
definition?: EldraFormDefinition | null;
|
|
72
|
+
/** The form's key, read with `client.forms.get` in the browser when there is no `definition`. */
|
|
73
|
+
formKey?: string;
|
|
74
|
+
/** Reads the definition and posts the submission. */
|
|
75
|
+
client: SiteFormClient;
|
|
76
|
+
/** The visitor's locale (`is-IS`): the labels shown and the language the platform answers in. */
|
|
77
|
+
locale: string;
|
|
78
|
+
/** Sent with the submission as the page it came from. Defaults to `location.pathname`. */
|
|
79
|
+
pagePath?: string;
|
|
80
|
+
/** `single` (default), `two`, or `inline` for a one-field sign-up (else it falls back to `single`). */
|
|
81
|
+
layout?: SiteFormLayout;
|
|
82
|
+
/** A visible heading; without one the form is named by the definition's `name`. */
|
|
83
|
+
heading?: string;
|
|
84
|
+
headingLevel?: FormLayoutHeadingLevel;
|
|
85
|
+
/** The submit button's text. Defaults to the `formSubmit` message. */
|
|
86
|
+
submitLabel?: string;
|
|
87
|
+
/** Follows a site-path redirect (`navigateTo`); an absolute one always uses `location.assign`. */
|
|
88
|
+
navigate?: (path: string) => void;
|
|
89
|
+
messages?: Partial<UiMessages>;
|
|
90
|
+
classes?: Partial<Record<SiteFormPart, string>>;
|
|
91
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { EldraFormDefinition } from '@eldrajs/sdk';
|
|
2
|
+
import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
|
|
3
|
+
import { UiMessages } from '../../messages/en-US.js';
|
|
4
|
+
import { SiteFormClient, SiteFormDefinition, SiteFormStatus, SiteFormSubmitOutcome, SiteFormSuccess, SiteFormValue } from './types.js';
|
|
5
|
+
export interface UseSiteFormOptions {
|
|
6
|
+
/** A definition already read; when absent the form reads `formKey` in the browser. */
|
|
7
|
+
definition?: MaybeRefOrGetter<EldraFormDefinition | null | undefined>;
|
|
8
|
+
formKey?: MaybeRefOrGetter<string | undefined>;
|
|
9
|
+
client: MaybeRefOrGetter<SiteFormClient>;
|
|
10
|
+
locale: MaybeRefOrGetter<string>;
|
|
11
|
+
/** Defaults to `location.pathname` at submit time. */
|
|
12
|
+
pagePath?: MaybeRefOrGetter<string | undefined>;
|
|
13
|
+
messages?: MaybeRefOrGetter<Partial<UiMessages> | undefined>;
|
|
14
|
+
}
|
|
15
|
+
export interface UseSiteFormReturn {
|
|
16
|
+
form: ComputedRef<SiteFormDefinition | null>;
|
|
17
|
+
status: ComputedRef<SiteFormStatus>;
|
|
18
|
+
values: Record<string, SiteFormValue>;
|
|
19
|
+
/** One message per field id, from the checks here or the platform's `422`. */
|
|
20
|
+
errors: Record<string, string | undefined>;
|
|
21
|
+
/** Messages about the form as a whole: a refused spam check, a rate limit, the network. */
|
|
22
|
+
formErrors: Ref<string[]>;
|
|
23
|
+
/** Bind to the honeypot input the definition names. */
|
|
24
|
+
honeypot: Ref<string>;
|
|
25
|
+
/** Bind to the element the Turnstile widget renders into, shown while `turnstileSiteKey` is set. */
|
|
26
|
+
turnstileRoot: Ref<HTMLElement | null>;
|
|
27
|
+
submitting: Ref<boolean>;
|
|
28
|
+
success: Ref<SiteFormSuccess | null>;
|
|
29
|
+
setValue(id: string, value: SiteFormValue): void;
|
|
30
|
+
submit(): Promise<SiteFormSubmitOutcome>;
|
|
31
|
+
/** Back to an empty form, after a success too. */
|
|
32
|
+
reset(): void;
|
|
33
|
+
}
|
|
34
|
+
/** One Eldra form's state, checks, honeypot, Turnstile and submission; `SiteForm` is drawn from it. */
|
|
35
|
+
export declare function useSiteForm(options: UseSiteFormOptions): UseSiteFormReturn;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UiMessages } from '../../messages/en-US.js';
|
|
2
|
+
import { SiteFormField, SiteFormValue } from './types.js';
|
|
3
|
+
type ValidationMessages = Pick<UiMessages, 'formRequired' | 'formRequiredCheckbox' | 'formInvalidEmail' | 'formInvalidNumber' | 'formInvalidUrl' | 'formInvalidOption' | 'formInvalidFormat' | 'formTooShort' | 'formTooLong'>;
|
|
4
|
+
/** The text the platform validates: control characters dropped, spaces collapsed outside a textarea, trimmed. */
|
|
5
|
+
export declare function normalizeSiteFormText(field: Pick<SiteFormField, 'type'>, value: string): string;
|
|
6
|
+
/** The first reason the platform would refuse `value`, by its rules in its order, or `null`. */
|
|
7
|
+
export declare function validateSiteFormValue(field: SiteFormField, value: SiteFormValue | undefined, messages: ValidationMessages): string | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TablerIconProps } from './types.js';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<TablerIconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TablerIconProps> & Readonly<{}>, {
|
|
3
|
+
size: import('../../index.js').IconSize;
|
|
4
|
+
label: string;
|
|
5
|
+
name: string | null;
|
|
6
|
+
classes: Partial<Record<import('./types.js').TablerIconPart, string>>;
|
|
7
|
+
strokeWidth: number;
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function warnTablerIconOnce(key: string, message: string): void;
|
|
2
|
+
/** An icon's markup once loaded: a string, `null` for a name Tabler does not have, `undefined` before it loads. */
|
|
3
|
+
export declare function cachedTablerIcon(name: string): string | null | undefined;
|
|
4
|
+
/** Loads an icon's markup by export name: `null` for an unknown name, `undefined` for a failed load. Never rejects. */
|
|
5
|
+
export declare function loadTablerIcon(name: string): Promise<string | null | undefined>;
|
|
6
|
+
/** Loads the named icons ahead of render, so a page rendered in the browser draws them in its first frame. */
|
|
7
|
+
export declare function preloadTablerIcons(values: string | Iterable<string | null | undefined>): Promise<void>;
|