@thednp/color-picker 2.0.0-alpha8 → 2.0.0-alpha9

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -6,8 +6,8 @@
6
6
  [![NPM Version](https://img.shields.io/npm/v/@thednp/color-picker.svg)](https://www.npmjs.com/package/@thednp/color-picker)
7
7
  [![typescript version](https://img.shields.io/badge/typescript-5.1.6-brightgreen)](https://www.typescriptlang.org/)
8
8
  [![eslint version](https://img.shields.io/badge/eslint-8.47.0-brightgreen)](https://github.com/eslint)
9
- [![prettier version](https://img.shields.io/badge/prettier-3.0.1-brightgreen)](https://prettier.io/)
10
- [![cypress version](https://img.shields.io/badge/cypress-12.17.3-brightgreen)](https://cypress.io/)
9
+ [![prettier version](https://img.shields.io/badge/prettier-3.0.2-brightgreen)](https://prettier.io/)
10
+ [![cypress version](https://img.shields.io/badge/cypress-12.17.4-brightgreen)](https://cypress.io/)
11
11
  [![vite version](https://img.shields.io/badge/vite-4.4.9-brightgreen)](https://github.com/vitejs)
12
12
 
13
13
  The feature rich **ColorPicker** component for the modern web, sourced with TypeScript, Cypress tested, WAI-ARIA compliant and lots of goodies. In addition, it features its own version of [TinyColor](https://github.com/bgrins/TinyColor) called simply [Color](http://github.com/thednp/color).
package/compile.js CHANGED
@@ -2,12 +2,15 @@
2
2
  // Build script to compile and minify the CSS file from SCSS folder
3
3
  // Usage: npm run compile-scss
4
4
 
5
- const fs = require("fs");
6
- const writeFileSync = fs.writeFileSync;
5
+ const {writeFileSync} = require("fs");
6
+ // const writeFileSync = fs.writeFileSync;
7
+ // import { writeFileSync } from "fs";
7
8
  const sass = require("sass");
8
9
  const pkg = require("./package.json");
9
10
  const year = new Date().getFullYear();
10
11
  const args = {};
12
+ const pkName = pkg.name.includes(pkg.author) ? pkg.name.replace('@','') : `${pkg.author}/${pkg.name}`;
13
+ const home = `https://github.com/${pkName}`;
11
14
 
12
15
  const ARGS = process.argv.slice(-1)[0].split(",");
13
16
  ARGS.map((x) => {
@@ -22,7 +25,7 @@ const banner =
22
25
  : `/*!
23
26
  * ColorPicker v${pkg.version} (${pkg.homepage})
24
27
  * Copyright ${year} © ${pkg.author}
25
- * Licensed under MIT (${pkg.license}/blob/main/LICENSE)
28
+ * Licensed under MIT (${home}/blob/main/LICENSE)
26
29
  */`;
27
30
 
28
31
  const DIR = args.DIR === "rtl" ? ".rtl" : "";
@@ -80,11 +80,10 @@ describe('ColorPicker Class Test', () => {
80
80
  });
81
81
 
82
82
  cy.document().should('not.be.undefined')
83
- .get('@input').should('exist')
84
- cy.document().invoke('querySelectorAll', selector)
85
- .then((nodelist ) => {
86
- [...nodelist as NodeListOf<HTMLInputElement>].forEach(init);
87
- })
83
+ cy.get('@input').should('exist')
84
+ cy.document().invoke('querySelectorAll', selector).then((nodelist ) => {
85
+ [...nodelist as NodeListOf<HTMLInputElement>].forEach(init);
86
+ })
88
87
 
89
88
  cy.get('@input').then(($input) => {
90
89
  if ($input.length) {
@@ -95,8 +94,9 @@ describe('ColorPicker Class Test', () => {
95
94
 
96
95
  cy.get('@cp').should('exist')
97
96
  .get('@cp').then(() => {
98
- cy.get('@cp').its('colorLabels').then(({white,black,grey,red,orange,brown,gold,olive,yellow,lime,green,teal,cyan,blue,violet,magenta,pink}) => {
99
- expect([white,black,grey,red,orange,brown,gold,olive,yellow,lime,green,teal,cyan,blue,violet,magenta,pink])
97
+ cy.get('@cp').its('colorLabels').then((lbls) => {
98
+ // console.log(lbls)
99
+ expect(Object.values(lbls))
100
100
  .to.deep.equal(colorNamesFrench.split(','));
101
101
  })
102
102
 
@@ -130,17 +130,18 @@ describe('ColorPicker Class Test', () => {
130
130
  colorLabels: colorNamesFrench,
131
131
  componentLabels: componentLabelsFrench,
132
132
  });
133
- console.log(cp)
133
+ // console.log(cp)
134
134
  cy.wrap(cp).as('cp');
135
135
  cy.get('@cp').then(() => {
136
136
  cy.get('@cp').its('input').should('equal', input[0]);
137
137
  cy.get('@cp').its('format').should('equal', format);
138
138
  cy.get('@cp').its('value').should('equal', value);
139
139
  cy.get('@cp').its('colorPresets').should('be.instanceOf', Array);
140
- cy.get('@cp').its('colorLabels')
141
- .then(({white,black,grey,red,orange,brown,gold,olive,yellow,lime,green,teal,cyan,blue,violet,magenta,pink}) => {
142
- expect([white,black,grey,red,orange,brown,gold,olive,yellow,lime,green,teal,cyan,blue,violet,magenta,pink]).to.deep.equal(colorNamesFrench.split(','));
143
- });
140
+ cy.get('@cp').its('colorLabels').then((lbls) => {
141
+ // console.log(lbls)
142
+ expect(Object.values(lbls))
143
+ .to.deep.equal(colorNamesFrench.split(','));
144
+ })
144
145
  cy.get('@cp').its('colorKeywords').should('deep.equal', ['orange', 'lime', 'darkred']);
145
146
  cy.get('@cp').its('colorPicker').should('be.instanceOf', HTMLDivElement);
146
147
  cy.get('@cp').its('colorMenu').should('be.instanceOf', HTMLDivElement);
@@ -180,10 +181,7 @@ describe('ColorPicker Class Test', () => {
180
181
  cy.wrap(new ColorPicker(input[0], {
181
182
  colorPresets: '#330033, #990099, #ff00ff, #ff66ff, #ffccff'.split(','),
182
183
  })).as('cp');
183
- // cy.get('@cp')
184
- // .then(() => {
185
- cy.get('@cp').its('colorPresets').should('be.instanceOf', Array);
186
- // });
184
+ cy.get('@cp').its('colorPresets').should('be.instanceOf', Array);
187
185
  }
188
186
  });
189
187
  });
@@ -203,12 +201,15 @@ describe('ColorPicker Class Test', () => {
203
201
  cy.wrap(input[0]).focus().clear().type('hsl 0 100 50{enter}')
204
202
  cy.wait(50)
205
203
  cy.get('@cp').its('rgb').then((rgb) => {
206
- cy.get('.visual-control').eq(0).trigger('pointerdown', 0, 0, { force: true, pointerType: 'touch' })
207
- cy.get('.visual-control').eq(0).trigger('pointermove', -5, -5, { force: true, pointerType: 'touch' })
208
- cy.get('.visual-control').eq(0).trigger('pointermove', 500, 500, { force: true, pointerType: 'touch' })
209
- cy.get('.visual-control').eq(0).trigger('pointermove', 100, 100, { force: true, pointerType: 'touch' })
210
- cy.get('.visual-control').eq(0).trigger('pointerup', 100, 100, { force: true, pointerType: 'touch' }).then(() => {
211
- cy.wait(17)
204
+ // cy.wait(17)
205
+
206
+ cy.get('.visual-control').eq(0)
207
+ .trigger('pointerdown', 0, 0, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
208
+ .trigger('pointermove', -5, -5, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
209
+ .trigger('pointermove', 500, 500, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
210
+ .trigger('pointermove', 100, 100, {eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
211
+ .trigger('pointerup', 100, 100, {eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
212
+ .then(() => {
212
213
  cy.get('@cp').its('rgb').should('not.deep.equal', rgb);
213
214
  })
214
215
  });
@@ -216,26 +217,25 @@ describe('ColorPicker Class Test', () => {
216
217
  cy.wrap(input[0]).focus().clear().type('hsl 0 100 50{enter}')
217
218
  .get('@cp').its('rgb').then((rgb) => {
218
219
  cy.get('.visual-control').eq(1)
219
- .trigger('pointerdown', 3, 0, { force: true, pointerType: 'touch' })
220
- .trigger('pointermove', 0, -5, { force: true, pointerType: 'touch' })
221
- .trigger('pointermove', 3, 500, { force: true, pointerType: 'touch' })
222
- .trigger('pointermove', 3, 100, { force: true, pointerType: 'touch' })
223
- .trigger('pointerup', 3, 100, { force: true, pointerType: 'touch' })
220
+ .trigger('pointerdown', 3, 0, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
221
+ .trigger('pointermove', 0, -5, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
222
+ .trigger('pointermove', 3, 500, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
223
+ .trigger('pointermove', 3, 100, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
224
+ .trigger('pointerup', 3, 100, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
224
225
  .then(() => {
225
- cy.wait(17)
226
- .get('@cp').its('rgb').should('not.deep.equal', rgb);
226
+ cy.get('@cp').its('rgb').should('not.deep.equal', rgb);
227
227
  })
228
228
  });
229
229
 
230
230
  cy.wrap(input[0]).focus().clear().type('hsl 0 100 50{enter}')
231
- .get('@cp').its('rgb').then((rgb) => {
231
+ cy.get('@cp').its('rgb').then((rgb) => {
232
232
  cy.get('.visual-control').eq(2)
233
- .trigger('pointerdown', 3, 0, { force: true, pointerType: 'touch' })
234
- .trigger('pointermove', 3, -5, { force: true, pointerType: 'touch' })
235
- .trigger('pointermove', 3, 200, { force: true, pointerType: 'touch' })
236
- .trigger('pointermove', 3, 500, { force: true, pointerType: 'touch' })
237
- .trigger('pointermove', 3, 100, { force: true, pointerType: 'touch' })
238
- .trigger('pointerup', 3, 100, { force: true, pointerType: 'touch' })
233
+ .trigger('pointerdown', 3, 0, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
234
+ .trigger('pointermove', 3, -5, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
235
+ .trigger('pointermove', 3, 200, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
236
+ .trigger('pointermove', 3, 500, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
237
+ .trigger('pointermove', 3, 100, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
238
+ .trigger('pointerup', 3, 100, { eventConstructor: 'PointerEvent', force: true, pointerType: 'touch' })
239
239
  .then(() => {
240
240
  cy.wait(17)
241
241
  .get('@cp').its('rgb').should('not.deep.equal', rgb);
@@ -253,11 +253,7 @@ describe('ColorPicker Class Test', () => {
253
253
  const format = FORMAT[getRandomInt(0,3)];
254
254
  getMarkup(body, id, format);
255
255
 
256
- const a = document.createElement('button');
257
- // a.setAttribute('href', '#');
258
- a.innerText = 'Some link';
259
- body.append(a);
260
- cy.wrap(a).as('a');
256
+ // cy.wrap(a).as('a');
261
257
  // cy.get(`#color-picker-${id}`).then((input) => {
262
258
  cy.get('input').then((input) => {
263
259
  cy.wrap(input[0]).as('input');
@@ -329,16 +325,9 @@ describe('ColorPicker Class Test', () => {
329
325
  cy.wait(17);
330
326
 
331
327
  cy.log('Testing `focusout` on `input`');
332
- cy.get('@a').focus()
333
- cy.get('@a').blur()
334
328
 
335
- // cy.get('@a').focus();
336
- cy.wait(17)
337
- // cy.get('@a').trigger('focusin', {force: true})
338
- // cy.get('@a').trigger('focusout', {force: true})
339
- // .then(() => {
340
- cy.get('.color-dropdown.picker').should('not.have.class', 'show')
341
- // });
329
+ cy.get('a.my-link').eq(0).click({force: true})
330
+ cy.get('.color-dropdown.picker').should('not.have.class', 'show')
342
331
 
343
332
  cy.wait(17);
344
333
 
@@ -601,12 +590,12 @@ describe('ColorPicker Class Test', () => {
601
590
  const { width, height} = visual[0].getBoundingClientRect();
602
591
 
603
592
  cy.get('.knob').eq(0)
604
- .trigger('pointerdown', { force: true })
605
- .trigger('pointermove', -width, -height, { force: true })
606
- .trigger('pointermove', -width - 100, -height - 100, { force: true })
607
- .trigger('pointermove', 300, 300, { force: true })
608
- .trigger('pointermove', -width + 50, -height + 50, { force: true })
609
- .wait(17)
593
+ .trigger('pointerdown', { eventConstructor: 'PointerEvent', force: true })
594
+ .trigger('pointermove', -width, -height, { eventConstructor: 'PointerEvent', force: true })
595
+ .trigger('pointermove', -width - 100, -height - 100, { eventConstructor: 'PointerEvent', force: true })
596
+ .trigger('pointermove', 300, 300, { eventConstructor: 'PointerEvent', force: true })
597
+ .trigger('pointermove', -width + 50, -height + 50, { eventConstructor: 'PointerEvent', force: true })
598
+ // .wait(17)
610
599
  .get('@cp').its('rgb').should('not.deep.equal', rgb);
611
600
  });
612
601
  });
@@ -617,11 +606,11 @@ describe('ColorPicker Class Test', () => {
617
606
  const { width, height } = visual[0].getBoundingClientRect();
618
607
 
619
608
  cy.get('.knob').eq(1)
620
- .trigger('pointerdown', { force: true })
621
- .trigger('pointermove', width / 2, -height - 100, { force: true })
622
- .trigger('pointermove', width / 2, 300, { force: true })
623
- .trigger('pointermove', width / 2, -height + 20, { force: true })
624
- .wait(17)
609
+ .trigger('pointerdown', { eventConstructor: 'PointerEvent', force: true })
610
+ .trigger('pointermove', width / 2, -height - 100, { eventConstructor: 'PointerEvent', force: true })
611
+ .trigger('pointermove', width / 2, 300, { eventConstructor: 'PointerEvent', force: true })
612
+ .trigger('pointermove', width / 2, -height + 20, { eventConstructor: 'PointerEvent', force: true })
613
+ // .wait(17)
625
614
  .get('@cp').its('rgb').should('not.deep.equal', rgb);
626
615
  });
627
616
  });
@@ -632,11 +621,11 @@ describe('ColorPicker Class Test', () => {
632
621
  const { width, height } = visual[0].getBoundingClientRect();
633
622
 
634
623
  cy.get('.knob').eq(2)
635
- .trigger('pointerdown', { force: true })
636
- .trigger('pointermove', width / 2, -height - 100, { force: true })
637
- .trigger('pointermove', width / 2, 300, { force: true })
638
- .trigger('pointermove', width / 2, -height + 20, { force: true })
639
- .wait(17)
624
+ .trigger('pointerdown', { eventConstructor: 'PointerEvent', force: true })
625
+ .trigger('pointermove', width / 2, -height - 100, { eventConstructor: 'PointerEvent', force: true })
626
+ .trigger('pointermove', width / 2, 300, { eventConstructor: 'PointerEvent', force: true })
627
+ .trigger('pointermove', width / 2, -height + 20, { eventConstructor: 'PointerEvent', force: true })
628
+ // .wait(17)
640
629
  .get('@cp').its('rgb').should('not.deep.equal', rgb);
641
630
  });
642
631
  });
@@ -653,7 +642,7 @@ describe('ColorPicker Class Test', () => {
653
642
  .trigger('keydown', { code: 'ArrowRight' })
654
643
  .trigger('keydown', { code: 'ArrowRight' })
655
644
  .trigger('keydown', { code: 'ArrowLeft' })
656
- .wait(17)
645
+ // .wait(17)
657
646
  .get('@cp').its('rgb').should('not.deep.equal', rgb);
658
647
  });
659
648
 
@@ -667,7 +656,7 @@ describe('ColorPicker Class Test', () => {
667
656
  .trigger('keydown', { code: 'ArrowLeft' })
668
657
  .trigger('keydown', { code: 'ArrowLeft' })
669
658
  .trigger('keydown', { code: 'ArrowRight' })
670
- .wait(17)
659
+ // .wait(17)
671
660
  .get('@cp').its('rgb').should('not.deep.equal', rgb);
672
661
  });
673
662
 
@@ -681,7 +670,7 @@ describe('ColorPicker Class Test', () => {
681
670
  .trigger('keydown', { code: 'ArrowLeft' })
682
671
  .trigger('keydown', { code: 'ArrowLeft' })
683
672
  .trigger('keydown', { code: 'ArrowRight' })
684
- .wait(17)
673
+ // .wait(17)
685
674
  .get('@cp').its('rgb').should('not.deep.equal', rgb);
686
675
  });
687
676
  });
@@ -20,9 +20,16 @@ export default function getMarkup(body, id, format) {
20
20
  input.setAttribute('autocomplete', "off");
21
21
  input.setAttribute('spellcheck', "false");
22
22
  input.setAttribute('data-format', format);
23
+
24
+ const a = document.createElement('a');
25
+ a.setAttribute('href', '#');
26
+ a.innerText = 'Some link';
27
+ a.className = 'my-link';
28
+ a.style = 'position: absolute; top: 20px; opacity: 0.015';
29
+ // body.append(a);
23
30
  cpWrapper.append(input);
24
31
  if (body) {
25
- body.append(label, cpWrapper);
32
+ body.append(label, cpWrapper, a);
26
33
  }
27
34
  return {set, value};
28
35
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * ColorPicker v2.0.0-alpha7 (http://thednp.github.io/color-picker)
2
+ * ColorPicker v2.0.0-alpha9 (http://thednp.github.io/color-picker)
3
3
  * Copyright 2023 © thednp
4
- * Licensed under MIT (MIT/blob/main/LICENSE)
4
+ * Licensed under MIT (https://github.com/thednp/color-picker/blob/main/LICENSE)
5
5
  */
6
6
  /* :host */
7
7
  .color-picker {
@@ -293,7 +293,7 @@
293
293
  transition: var(--options-transition);
294
294
  }
295
295
 
296
- .color-options.scrollable:hover {
296
+ .color-dropdown.menu:hover .scrollable {
297
297
  height: var(--grid-hover-height);
298
298
  }
299
299
 
@@ -314,7 +314,7 @@
314
314
  width: var(--grid-item-size);
315
315
  height: var(--grid-item-size);
316
316
  overflow: hidden;
317
- text-indent: 2.1rem;
317
+ color: rgba(0, 0, 0, 0);
318
318
  }
319
319
  .color-options .color-option:active, .color-options .color-option:focus {
320
320
  outline: none;
@@ -399,14 +399,14 @@
399
399
 
400
400
  /* visual control */
401
401
  .visual-control {
402
- height: 150px;
402
+ height: 230px;
403
403
  /* important for mobile devices */
404
404
  touch-action: none;
405
405
  box-shadow: var(--visual-shadow);
406
406
  }
407
407
 
408
408
  .visual-control1 {
409
- width: 150px;
409
+ width: 230px;
410
410
  }
411
411
 
412
412
  .visual-control2,
@@ -415,15 +415,7 @@
415
415
  cursor: ns-resize;
416
416
  }
417
417
 
418
- @media (width >= 578px) {
419
- .visual-control {
420
- height: 230px;
421
- }
422
- .visual-control1 {
423
- width: 230px;
424
- }
425
- }
426
- @media (width >= 1200px) {
418
+ @media (width >= 980px) {
427
419
  .visual-control {
428
420
  height: 300px;
429
421
  }
@@ -1,2 +1,2 @@
1
- /* ColorPicker v2.0.0-alpha7 | thednp © 2023 | MIT-License */
2
- .color-picker{position:relative;display:flex;--white-15: rgba(255, 255, 255, 0.15);--white-25: rgba(255, 255, 255, 0.25);--white-33: rgba(255, 255, 255, 0.33);--white-50: rgba(255, 255, 255, 0.5);--white-75: rgba(255, 255, 255, 0.75);--white-90: rgba(255, 255, 255, 0.9);--black-15: rgba(0, 0, 0, 0.15);--black-25: rgba(0, 0, 0, 0.25);--black-33: rgba(0, 0, 0, 0.33);--black-50: rgba(0, 0, 0, 0.5);--black-75: rgba(0, 0, 0, 0.75);--black-90: rgba(0, 0, 0, 0.9);--dropdown-transition: transform 0.33s ease, opacity 0.33s ease;--btn-transition: box-shadow 0.33s ease, border 0.33s ease;--options-transition: height 0.33s ease;--dropdown-bg: var(--black-75);--dropdown-color: var(--white-75);--dropdown-shadow: 0 6px 12px var(--black-33);--dropdown-scrollbar-bg: var(--white-33);--dropdown-scrollbar-bg-hover: var(--white-50);--knob-bg: #000;--knob-border: 1px solid var(--white-90);--knob-shadow-hover: 0 0 0 6px var(--white-50);--knob-shadow-active: 0 0 0 6px var(--white-90);--input-border: 1px solid var(--white-15);--input-border-hover: 1px solid var(--white-33);--input-bg-hover: var(--black-15);--option-color-hover: var(--black-75);--option-bg-hover: var(--white-50);--option-color-active: var(--black-75);--option-bg-active: var(--white-90);--visual-shadow: 0 0 0 1px var(--white-15) inset}.color-picker *,.color-picker *::before,.color-picker *::after{box-sizing:border-box}.color-picker:focus{outline:none}.color-dropdown{position:absolute;z-index:50;display:none;flex-direction:column;width:min-content;padding:.5rem;color:var(--dropdown-color);background:var(--dropdown-bg);border-radius:.5rem;box-shadow:var(--dropdown-shadow);opacity:0;transition:var(--dropdown-transition)}.color-dropdown.picker{left:0}.color-dropdown.menu{right:0;max-height:230px}.open .color-dropdown.top{top:auto;bottom:100%}.color-dropdown.bottom{top:100%}.open .color-dropdown.top,.open .color-dropdown.bottom{display:flex}.color-dropdown.show{opacity:1}.color-dropdown.show.top{transform:translate(0, -5px)}.color-dropdown.show.bottom{transform:translate(0, 5px)}.color-controls{display:none;flex-wrap:wrap;justify-content:space-between;width:max-content}.btn-appearance{width:100%;padding:.6rem 1rem;font-size:1rem;line-height:1.5;border:0;border-radius:.25rem;outline:none;appearance:none;transition:var(--btn-transition)}.btn-appearance:focus,.btn-appearance:hover{box-shadow:0 0 0 3px var(--black-15)}.color-preview{box-shadow:0 0 0 1px rgba(120,120,120,.33) inset;direction:ltr}.txt-dark .color-preview{color:var(--white-75)}.txt-dark .color-preview:focus{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--black-15)}.txt-dark .color-preview::placeholder{color:var(--white-50)}.txt-light .color-preview{color:var(--black-75)}.txt-light .color-preview:focus{color:var(--black-75);box-shadow:0 0 0 1px #000 inset,0 0 0 3px var(--black-15)}.txt-light .color-preview::placeholder{color:var(--black-50)}.picker-toggle{position:absolute;inset:0;width:100%;height:100%;cursor:pointer;background:rgba(0,0,0,0);border:0}.open .picker-toggle{z-index:-1}.menu-toggle{position:absolute;top:0;right:0;display:flex;width:3rem;height:100%;padding:0 .25rem;cursor:pointer;border:0;border-radius:0 .25rem .25rem 0}.txt-light .menu-toggle{background:var(--black-50)}.txt-light .menu-toggle:focus{background:var(--black-75)}.txt-dark .menu-toggle{background:var(--white-33)}.txt-dark .menu-toggle:focus{background:var(--white-50)}.menu-toggle svg{width:auto;height:100%}.scrollable{overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}.scrollable::-webkit-scrollbar{width:.5rem}.scrollable::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.scrollable::-webkit-scrollbar-thumb{width:.5rem;background-color:rgba(0,0,0,0);background-clip:content-box;border:0}.scrollable:hover::-webkit-scrollbar-thumb{background-color:var(--dropdown-scrollbar-bg)}.scrollable::-webkit-scrollbar-thumb:hover{background-color:var(--dropdown-scrollbar-bg-hover)}.color-defaults{display:none;flex-flow:column wrap;margin:0;list-style:none;padding-inline:0}.color-dropdown.menu .color-defaults,.color-dropdown.picker .color-controls{display:flex}.color-defaults .color-option{padding:.25rem .5rem;color:inherit}.color-option{cursor:pointer}.color-defaults .color-option:focus,.color-defaults .color-option:hover{color:var(--option-color-hover);background:var(--option-bg-hover);outline:none}.color-defaults .color-option:active,.color-defaults .color-option.active{color:var(--option-color-active);background:var(--option-bg-active)}.color-options{--grid-item-size: 2rem;--grid-fit: 5;--grid-gap: .25rem;--grid-height: auto;--grid-hover-height: auto;display:grid;padding:0;margin:0;list-style:none;grid-template-columns:repeat(var(--grid-fit), var(--grid-item-size));grid-template-rows:repeat(auto-fill, var(--grid-item-size));gap:var(--grid-gap)}.color-options.scrollable{height:var(--grid-height);margin:0 -0.5rem 0 0;overflow-y:scroll;transition:var(--options-transition)}.color-options.scrollable:hover{height:var(--grid-hover-height)}.color-options+.color-defaults{margin-top:.25rem}.multiline+.color-defaults{flex-flow:row wrap}.multiline+.color-defaults .color-option{padding:.25rem .33rem;font-size:12px}.color-options .color-option{position:relative;width:var(--grid-item-size);height:var(--grid-item-size);overflow:hidden;text-indent:2.1rem}.color-options .color-option:active,.color-options .color-option:focus{outline:none;box-shadow:0 0 0 4px rgba(125,125,125,.75) inset}.color-options .color-option::before{position:absolute;inset:0}.color-options .color-option:hover::before,.color-options .color-option:active::before,.color-options .color-option:focus::before{content:"";border:3px solid var(--white-75);mix-blend-mode:difference}.color-options .color-option.active::after{position:absolute;top:50%;left:50%;width:4px;height:4px;margin:-2px 0 0 -2px;content:"";border-radius:4px}.txt-dark .color-options .color-option.active::after{box-shadow:0 0 0 4px var(--white-90)}.txt-light .color-options .color-option.active::after{box-shadow:0 0 0 4px var(--black-90)}.color-form{display:flex;flex-flow:row wrap;align-items:center;padding:.25rem 0 0;font:12px sans-serif}.color-form.hex{max-width:initial}.color-form>*{flex:1 0 0%;width:17.5%;max-width:17.5%}.color-form label{width:7.5%;max-width:7.5%;text-align:center}.color-input{color:inherit;text-align:right;background:rgba(0,0,0,0);border:var(--input-border);outline:none}.color-input.hex{width:92.5%;max-width:92.5%}.color-input:active,.color-input:focus{background:var(--input-bg-hover);border:var(--input-border-hover)}.visual-control{height:150px;touch-action:none;box-shadow:var(--visual-shadow)}.visual-control1{width:150px}.visual-control2,.visual-control3{width:21px;cursor:ns-resize}@media(width >= 578px){.visual-control{height:230px}.visual-control1{width:230px}}@media(width >= 1200px){.visual-control{height:300px}.visual-control1{width:300px}}.color-control{position:relative;display:inline-block}.color-slider{left:0;width:calc(100% - 2px);cursor:ns-resize}.color-control+.color-control{margin-left:.5rem}.knob{position:absolute;top:0;left:0;width:100%;height:7px;touch-action:none;user-select:none;background-color:var(--knob-bg);border:var(--knob-border);border-radius:5px;outline:none;will-change:transform}.knob:hover{box-shadow:var(--knob-shadow-hover)}.knob:focus,.knob:active{z-index:1;box-shadow:var(--knob-shadow-active)}.color-pointer{width:7px;background-color:rgba(0,0,0,0);border:0}.txt-dark .color-pointer{box-shadow:0 0 0 5px var(--white-50)}.txt-light .color-pointer{box-shadow:0 0 0 5px var(--black-50)}.txt-dark .color-pointer:hover{box-shadow:0 0 0 5px var(--white-75)}.txt-light .color-pointer:hover{box-shadow:0 0 0 5px var(--black-75)}.txt-dark .color-pointer:focus,.txt-dark .color-pointer:active{box-shadow:0 0 0 5px var(--white-90)}.txt-light .color-pointer:focus,.txt-light .color-pointer:active{box-shadow:0 0 0 5px var(--black-90)}.v-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}
1
+ /* ColorPicker v2.0.0-alpha9 | thednp © 2023 | MIT-License */
2
+ .color-picker{position:relative;display:flex;--white-15: rgba(255, 255, 255, 0.15);--white-25: rgba(255, 255, 255, 0.25);--white-33: rgba(255, 255, 255, 0.33);--white-50: rgba(255, 255, 255, 0.5);--white-75: rgba(255, 255, 255, 0.75);--white-90: rgba(255, 255, 255, 0.9);--black-15: rgba(0, 0, 0, 0.15);--black-25: rgba(0, 0, 0, 0.25);--black-33: rgba(0, 0, 0, 0.33);--black-50: rgba(0, 0, 0, 0.5);--black-75: rgba(0, 0, 0, 0.75);--black-90: rgba(0, 0, 0, 0.9);--dropdown-transition: transform 0.33s ease, opacity 0.33s ease;--btn-transition: box-shadow 0.33s ease, border 0.33s ease;--options-transition: height 0.33s ease;--dropdown-bg: var(--black-75);--dropdown-color: var(--white-75);--dropdown-shadow: 0 6px 12px var(--black-33);--dropdown-scrollbar-bg: var(--white-33);--dropdown-scrollbar-bg-hover: var(--white-50);--knob-bg: #000;--knob-border: 1px solid var(--white-90);--knob-shadow-hover: 0 0 0 6px var(--white-50);--knob-shadow-active: 0 0 0 6px var(--white-90);--input-border: 1px solid var(--white-15);--input-border-hover: 1px solid var(--white-33);--input-bg-hover: var(--black-15);--option-color-hover: var(--black-75);--option-bg-hover: var(--white-50);--option-color-active: var(--black-75);--option-bg-active: var(--white-90);--visual-shadow: 0 0 0 1px var(--white-15) inset}.color-picker *,.color-picker *::before,.color-picker *::after{box-sizing:border-box}.color-picker:focus{outline:none}.color-dropdown{position:absolute;z-index:50;display:none;flex-direction:column;width:min-content;padding:.5rem;color:var(--dropdown-color);background:var(--dropdown-bg);border-radius:.5rem;box-shadow:var(--dropdown-shadow);opacity:0;transition:var(--dropdown-transition)}.color-dropdown.picker{left:0}.color-dropdown.menu{right:0;max-height:230px}.open .color-dropdown.top{top:auto;bottom:100%}.color-dropdown.bottom{top:100%}.open .color-dropdown.top,.open .color-dropdown.bottom{display:flex}.color-dropdown.show{opacity:1}.color-dropdown.show.top{transform:translate(0, -5px)}.color-dropdown.show.bottom{transform:translate(0, 5px)}.color-controls{display:none;flex-wrap:wrap;justify-content:space-between;width:max-content}.btn-appearance{width:100%;padding:.6rem 1rem;font-size:1rem;line-height:1.5;border:0;border-radius:.25rem;outline:none;appearance:none;transition:var(--btn-transition)}.btn-appearance:focus,.btn-appearance:hover{box-shadow:0 0 0 3px var(--black-15)}.color-preview{box-shadow:0 0 0 1px rgba(120,120,120,.33) inset;direction:ltr}.txt-dark .color-preview{color:var(--white-75)}.txt-dark .color-preview:focus{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--black-15)}.txt-dark .color-preview::placeholder{color:var(--white-50)}.txt-light .color-preview{color:var(--black-75)}.txt-light .color-preview:focus{color:var(--black-75);box-shadow:0 0 0 1px #000 inset,0 0 0 3px var(--black-15)}.txt-light .color-preview::placeholder{color:var(--black-50)}.picker-toggle{position:absolute;inset:0;width:100%;height:100%;cursor:pointer;background:rgba(0,0,0,0);border:0}.open .picker-toggle{z-index:-1}.menu-toggle{position:absolute;top:0;right:0;display:flex;width:3rem;height:100%;padding:0 .25rem;cursor:pointer;border:0;border-radius:0 .25rem .25rem 0}.txt-light .menu-toggle{background:var(--black-50)}.txt-light .menu-toggle:focus{background:var(--black-75)}.txt-dark .menu-toggle{background:var(--white-33)}.txt-dark .menu-toggle:focus{background:var(--white-50)}.menu-toggle svg{width:auto;height:100%}.scrollable{overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}.scrollable::-webkit-scrollbar{width:.5rem}.scrollable::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.scrollable::-webkit-scrollbar-thumb{width:.5rem;background-color:rgba(0,0,0,0);background-clip:content-box;border:0}.scrollable:hover::-webkit-scrollbar-thumb{background-color:var(--dropdown-scrollbar-bg)}.scrollable::-webkit-scrollbar-thumb:hover{background-color:var(--dropdown-scrollbar-bg-hover)}.color-defaults{display:none;flex-flow:column wrap;margin:0;list-style:none;padding-inline:0}.color-dropdown.menu .color-defaults,.color-dropdown.picker .color-controls{display:flex}.color-defaults .color-option{padding:.25rem .5rem;color:inherit}.color-option{cursor:pointer}.color-defaults .color-option:focus,.color-defaults .color-option:hover{color:var(--option-color-hover);background:var(--option-bg-hover);outline:none}.color-defaults .color-option:active,.color-defaults .color-option.active{color:var(--option-color-active);background:var(--option-bg-active)}.color-options{--grid-item-size: 2rem;--grid-fit: 5;--grid-gap: .25rem;--grid-height: auto;--grid-hover-height: auto;display:grid;padding:0;margin:0;list-style:none;grid-template-columns:repeat(var(--grid-fit), var(--grid-item-size));grid-template-rows:repeat(auto-fill, var(--grid-item-size));gap:var(--grid-gap)}.color-options.scrollable{height:var(--grid-height);margin:0 -0.5rem 0 0;overflow-y:scroll;transition:var(--options-transition)}.color-dropdown.menu:hover .scrollable{height:var(--grid-hover-height)}.color-options+.color-defaults{margin-top:.25rem}.multiline+.color-defaults{flex-flow:row wrap}.multiline+.color-defaults .color-option{padding:.25rem .33rem;font-size:12px}.color-options .color-option{position:relative;width:var(--grid-item-size);height:var(--grid-item-size);overflow:hidden;color:rgba(0,0,0,0)}.color-options .color-option:active,.color-options .color-option:focus{outline:none;box-shadow:0 0 0 4px rgba(125,125,125,.75) inset}.color-options .color-option::before{position:absolute;inset:0}.color-options .color-option:hover::before,.color-options .color-option:active::before,.color-options .color-option:focus::before{content:"";border:3px solid var(--white-75);mix-blend-mode:difference}.color-options .color-option.active::after{position:absolute;top:50%;left:50%;width:4px;height:4px;margin:-2px 0 0 -2px;content:"";border-radius:4px}.txt-dark .color-options .color-option.active::after{box-shadow:0 0 0 4px var(--white-90)}.txt-light .color-options .color-option.active::after{box-shadow:0 0 0 4px var(--black-90)}.color-form{display:flex;flex-flow:row wrap;align-items:center;padding:.25rem 0 0;font:12px sans-serif}.color-form.hex{max-width:initial}.color-form>*{flex:1 0 0%;width:17.5%;max-width:17.5%}.color-form label{width:7.5%;max-width:7.5%;text-align:center}.color-input{color:inherit;text-align:right;background:rgba(0,0,0,0);border:var(--input-border);outline:none}.color-input.hex{width:92.5%;max-width:92.5%}.color-input:active,.color-input:focus{background:var(--input-bg-hover);border:var(--input-border-hover)}.visual-control{height:230px;touch-action:none;box-shadow:var(--visual-shadow)}.visual-control1{width:230px}.visual-control2,.visual-control3{width:21px;cursor:ns-resize}@media(width >= 980px){.visual-control{height:300px}.visual-control1{width:300px}}.color-control{position:relative;display:inline-block}.color-slider{left:0;width:calc(100% - 2px);cursor:ns-resize}.color-control+.color-control{margin-left:.5rem}.knob{position:absolute;top:0;left:0;width:100%;height:7px;touch-action:none;user-select:none;background-color:var(--knob-bg);border:var(--knob-border);border-radius:5px;outline:none;will-change:transform}.knob:hover{box-shadow:var(--knob-shadow-hover)}.knob:focus,.knob:active{z-index:1;box-shadow:var(--knob-shadow-active)}.color-pointer{width:7px;background-color:rgba(0,0,0,0);border:0}.txt-dark .color-pointer{box-shadow:0 0 0 5px var(--white-50)}.txt-light .color-pointer{box-shadow:0 0 0 5px var(--black-50)}.txt-dark .color-pointer:hover{box-shadow:0 0 0 5px var(--white-75)}.txt-light .color-pointer:hover{box-shadow:0 0 0 5px var(--black-75)}.txt-dark .color-pointer:focus,.txt-dark .color-pointer:active{box-shadow:0 0 0 5px var(--white-90)}.txt-light .color-pointer:focus,.txt-light .color-pointer:active{box-shadow:0 0 0 5px var(--black-90)}.v-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * ColorPicker v2.0.0-alpha7 (http://thednp.github.io/color-picker)
2
+ * ColorPicker v2.0.0-alpha9 (http://thednp.github.io/color-picker)
3
3
  * Copyright 2023 © thednp
4
- * Licensed under MIT (MIT/blob/main/LICENSE)
4
+ * Licensed under MIT (https://github.com/thednp/color-picker/blob/main/LICENSE)
5
5
  */
6
6
  /* :host */
7
7
  .color-picker {
@@ -293,7 +293,7 @@
293
293
  transition: var(--options-transition);
294
294
  }
295
295
 
296
- .color-options.scrollable:hover {
296
+ .color-dropdown.menu:hover .scrollable {
297
297
  height: var(--grid-hover-height);
298
298
  }
299
299
 
@@ -314,7 +314,7 @@
314
314
  width: var(--grid-item-size);
315
315
  height: var(--grid-item-size);
316
316
  overflow: hidden;
317
- text-indent: 2.1rem;
317
+ color: rgba(0, 0, 0, 0);
318
318
  }
319
319
  .color-options .color-option:active, .color-options .color-option:focus {
320
320
  outline: none;
@@ -399,14 +399,14 @@
399
399
 
400
400
  /* visual control */
401
401
  .visual-control {
402
- height: 150px;
402
+ height: 230px;
403
403
  /* important for mobile devices */
404
404
  touch-action: none;
405
405
  box-shadow: var(--visual-shadow);
406
406
  }
407
407
 
408
408
  .visual-control1 {
409
- width: 150px;
409
+ width: 230px;
410
410
  }
411
411
 
412
412
  .visual-control2,
@@ -415,15 +415,7 @@
415
415
  cursor: ns-resize;
416
416
  }
417
417
 
418
- @media (width >= 578px) {
419
- .visual-control {
420
- height: 230px;
421
- }
422
- .visual-control1 {
423
- width: 230px;
424
- }
425
- }
426
- @media (width >= 1200px) {
418
+ @media (width >= 980px) {
427
419
  .visual-control {
428
420
  height: 300px;
429
421
  }
@@ -1,2 +1,2 @@
1
- /* ColorPicker RTL v2.0.0-alpha7 | thednp © 2023 | MIT-License */
2
- .color-picker{position:relative;display:flex;--white-15: rgba(255, 255, 255, 0.15);--white-25: rgba(255, 255, 255, 0.25);--white-33: rgba(255, 255, 255, 0.33);--white-50: rgba(255, 255, 255, 0.5);--white-75: rgba(255, 255, 255, 0.75);--white-90: rgba(255, 255, 255, 0.9);--black-15: rgba(0, 0, 0, 0.15);--black-25: rgba(0, 0, 0, 0.25);--black-33: rgba(0, 0, 0, 0.33);--black-50: rgba(0, 0, 0, 0.5);--black-75: rgba(0, 0, 0, 0.75);--black-90: rgba(0, 0, 0, 0.9);--dropdown-transition: transform 0.33s ease, opacity 0.33s ease;--btn-transition: box-shadow 0.33s ease, border 0.33s ease;--options-transition: height 0.33s ease;--dropdown-bg: var(--black-75);--dropdown-color: var(--white-75);--dropdown-shadow: 0 6px 12px var(--black-33);--dropdown-scrollbar-bg: var(--white-33);--dropdown-scrollbar-bg-hover: var(--white-50);--knob-bg: #000;--knob-border: 1px solid var(--white-90);--knob-shadow-hover: 0 0 0 6px var(--white-50);--knob-shadow-active: 0 0 0 6px var(--white-90);--input-border: 1px solid var(--white-15);--input-border-hover: 1px solid var(--white-33);--input-bg-hover: var(--black-15);--option-color-hover: var(--black-75);--option-bg-hover: var(--white-50);--option-color-active: var(--black-75);--option-bg-active: var(--white-90);--visual-shadow: 0 0 0 1px var(--white-15) inset}.color-picker *,.color-picker *::before,.color-picker *::after{box-sizing:border-box}.color-picker:focus{outline:none}.color-dropdown{position:absolute;z-index:50;display:none;flex-direction:column;width:min-content;padding:.5rem;color:var(--dropdown-color);background:var(--dropdown-bg);border-radius:.5rem;box-shadow:var(--dropdown-shadow);opacity:0;transition:var(--dropdown-transition)}.color-dropdown.picker{left:0}.color-dropdown.menu{right:0;max-height:230px}.open .color-dropdown.top{top:auto;bottom:100%}.color-dropdown.bottom{top:100%}.open .color-dropdown.top,.open .color-dropdown.bottom{display:flex}.color-dropdown.show{opacity:1}.color-dropdown.show.top{transform:translate(0, -5px)}.color-dropdown.show.bottom{transform:translate(0, 5px)}.color-controls{display:none;flex-wrap:wrap;justify-content:space-between;width:max-content}.btn-appearance{width:100%;padding:.6rem 1rem;font-size:1rem;line-height:1.5;border:0;border-radius:.25rem;outline:none;appearance:none;transition:var(--btn-transition)}.btn-appearance:focus,.btn-appearance:hover{box-shadow:0 0 0 3px var(--black-15)}.color-preview{box-shadow:0 0 0 1px rgba(120,120,120,.33) inset;direction:ltr}.txt-dark .color-preview{color:var(--white-75)}.txt-dark .color-preview:focus{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--black-15)}.txt-dark .color-preview::placeholder{color:var(--white-50)}.txt-light .color-preview{color:var(--black-75)}.txt-light .color-preview:focus{color:var(--black-75);box-shadow:0 0 0 1px #000 inset,0 0 0 3px var(--black-15)}.txt-light .color-preview::placeholder{color:var(--black-50)}.picker-toggle{position:absolute;inset:0;width:100%;height:100%;cursor:pointer;background:rgba(0,0,0,0);border:0}.open .picker-toggle{z-index:-1}.menu-toggle{position:absolute;top:0;right:0;display:flex;width:3rem;height:100%;padding:0 .25rem;cursor:pointer;border:0;border-radius:0 .25rem .25rem 0}.txt-light .menu-toggle{background:var(--black-50)}.txt-light .menu-toggle:focus{background:var(--black-75)}.txt-dark .menu-toggle{background:var(--white-33)}.txt-dark .menu-toggle:focus{background:var(--white-50)}.menu-toggle svg{width:auto;height:100%}.scrollable{overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}.scrollable::-webkit-scrollbar{width:.5rem}.scrollable::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.scrollable::-webkit-scrollbar-thumb{width:.5rem;background-color:rgba(0,0,0,0);background-clip:content-box;border:0}.scrollable:hover::-webkit-scrollbar-thumb{background-color:var(--dropdown-scrollbar-bg)}.scrollable::-webkit-scrollbar-thumb:hover{background-color:var(--dropdown-scrollbar-bg-hover)}.color-defaults{display:none;flex-flow:column wrap;margin:0;list-style:none;padding-inline:0}.color-dropdown.menu .color-defaults,.color-dropdown.picker .color-controls{display:flex}.color-defaults .color-option{padding:.25rem .5rem;color:inherit}.color-option{cursor:pointer}.color-defaults .color-option:focus,.color-defaults .color-option:hover{color:var(--option-color-hover);background:var(--option-bg-hover);outline:none}.color-defaults .color-option:active,.color-defaults .color-option.active{color:var(--option-color-active);background:var(--option-bg-active)}.color-options{--grid-item-size: 2rem;--grid-fit: 5;--grid-gap: .25rem;--grid-height: auto;--grid-hover-height: auto;display:grid;padding:0;margin:0;list-style:none;grid-template-columns:repeat(var(--grid-fit), var(--grid-item-size));grid-template-rows:repeat(auto-fill, var(--grid-item-size));gap:var(--grid-gap)}.color-options.scrollable{height:var(--grid-height);margin:0 -0.5rem 0 0;overflow-y:scroll;transition:var(--options-transition)}.color-options.scrollable:hover{height:var(--grid-hover-height)}.color-options+.color-defaults{margin-top:.25rem}.multiline+.color-defaults{flex-flow:row wrap}.multiline+.color-defaults .color-option{padding:.25rem .33rem;font-size:12px}.color-options .color-option{position:relative;width:var(--grid-item-size);height:var(--grid-item-size);overflow:hidden;text-indent:2.1rem}.color-options .color-option:active,.color-options .color-option:focus{outline:none;box-shadow:0 0 0 4px rgba(125,125,125,.75) inset}.color-options .color-option::before{position:absolute;inset:0}.color-options .color-option:hover::before,.color-options .color-option:active::before,.color-options .color-option:focus::before{content:"";border:3px solid var(--white-75);mix-blend-mode:difference}.color-options .color-option.active::after{position:absolute;top:50%;left:50%;width:4px;height:4px;margin:-2px 0 0 -2px;content:"";border-radius:4px}.txt-dark .color-options .color-option.active::after{box-shadow:0 0 0 4px var(--white-90)}.txt-light .color-options .color-option.active::after{box-shadow:0 0 0 4px var(--black-90)}.color-form{display:flex;flex-flow:row wrap;align-items:center;padding:.25rem 0 0;font:12px sans-serif}.color-form.hex{max-width:initial}.color-form>*{flex:1 0 0%;width:17.5%;max-width:17.5%}.color-form label{width:7.5%;max-width:7.5%;text-align:center}.color-input{color:inherit;text-align:right;background:rgba(0,0,0,0);border:var(--input-border);outline:none}.color-input.hex{width:92.5%;max-width:92.5%}.color-input:active,.color-input:focus{background:var(--input-bg-hover);border:var(--input-border-hover)}.visual-control{height:150px;touch-action:none;box-shadow:var(--visual-shadow)}.visual-control1{width:150px}.visual-control2,.visual-control3{width:21px;cursor:ns-resize}@media(width >= 578px){.visual-control{height:230px}.visual-control1{width:230px}}@media(width >= 1200px){.visual-control{height:300px}.visual-control1{width:300px}}.color-control{position:relative;display:inline-block}.color-slider{left:0;width:calc(100% - 2px);cursor:ns-resize}.color-control+.color-control{margin-left:.5rem}.knob{position:absolute;top:0;left:0;width:100%;height:7px;touch-action:none;user-select:none;background-color:var(--knob-bg);border:var(--knob-border);border-radius:5px;outline:none;will-change:transform}.knob:hover{box-shadow:var(--knob-shadow-hover)}.knob:focus,.knob:active{z-index:1;box-shadow:var(--knob-shadow-active)}.color-pointer{width:7px;background-color:rgba(0,0,0,0);border:0}.txt-dark .color-pointer{box-shadow:0 0 0 5px var(--white-50)}.txt-light .color-pointer{box-shadow:0 0 0 5px var(--black-50)}.txt-dark .color-pointer:hover{box-shadow:0 0 0 5px var(--white-75)}.txt-light .color-pointer:hover{box-shadow:0 0 0 5px var(--black-75)}.txt-dark .color-pointer:focus,.txt-dark .color-pointer:active{box-shadow:0 0 0 5px var(--white-90)}.txt-light .color-pointer:focus,.txt-light .color-pointer:active{box-shadow:0 0 0 5px var(--black-90)}.v-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}[dir=rtl] .color-preview{text-align:right}[dir=rtl] .menu-toggle{right:auto;left:0;border-radius:.25rem 0 0 .25rem}[dir=rtl] .color-dropdown.picker{right:0;left:auto}[dir=rtl] .color-dropdown.menu{right:auto;left:0}[dir=rtl] .color-control+.color-control{margin-right:.5rem;margin-left:0}[dir=rtl] .color-options.scrollable{margin:0 0 0 -0.5rem}
1
+ /* ColorPicker RTL v2.0.0-alpha9 | thednp © 2023 | MIT-License */
2
+ .color-picker{position:relative;display:flex;--white-15: rgba(255, 255, 255, 0.15);--white-25: rgba(255, 255, 255, 0.25);--white-33: rgba(255, 255, 255, 0.33);--white-50: rgba(255, 255, 255, 0.5);--white-75: rgba(255, 255, 255, 0.75);--white-90: rgba(255, 255, 255, 0.9);--black-15: rgba(0, 0, 0, 0.15);--black-25: rgba(0, 0, 0, 0.25);--black-33: rgba(0, 0, 0, 0.33);--black-50: rgba(0, 0, 0, 0.5);--black-75: rgba(0, 0, 0, 0.75);--black-90: rgba(0, 0, 0, 0.9);--dropdown-transition: transform 0.33s ease, opacity 0.33s ease;--btn-transition: box-shadow 0.33s ease, border 0.33s ease;--options-transition: height 0.33s ease;--dropdown-bg: var(--black-75);--dropdown-color: var(--white-75);--dropdown-shadow: 0 6px 12px var(--black-33);--dropdown-scrollbar-bg: var(--white-33);--dropdown-scrollbar-bg-hover: var(--white-50);--knob-bg: #000;--knob-border: 1px solid var(--white-90);--knob-shadow-hover: 0 0 0 6px var(--white-50);--knob-shadow-active: 0 0 0 6px var(--white-90);--input-border: 1px solid var(--white-15);--input-border-hover: 1px solid var(--white-33);--input-bg-hover: var(--black-15);--option-color-hover: var(--black-75);--option-bg-hover: var(--white-50);--option-color-active: var(--black-75);--option-bg-active: var(--white-90);--visual-shadow: 0 0 0 1px var(--white-15) inset}.color-picker *,.color-picker *::before,.color-picker *::after{box-sizing:border-box}.color-picker:focus{outline:none}.color-dropdown{position:absolute;z-index:50;display:none;flex-direction:column;width:min-content;padding:.5rem;color:var(--dropdown-color);background:var(--dropdown-bg);border-radius:.5rem;box-shadow:var(--dropdown-shadow);opacity:0;transition:var(--dropdown-transition)}.color-dropdown.picker{left:0}.color-dropdown.menu{right:0;max-height:230px}.open .color-dropdown.top{top:auto;bottom:100%}.color-dropdown.bottom{top:100%}.open .color-dropdown.top,.open .color-dropdown.bottom{display:flex}.color-dropdown.show{opacity:1}.color-dropdown.show.top{transform:translate(0, -5px)}.color-dropdown.show.bottom{transform:translate(0, 5px)}.color-controls{display:none;flex-wrap:wrap;justify-content:space-between;width:max-content}.btn-appearance{width:100%;padding:.6rem 1rem;font-size:1rem;line-height:1.5;border:0;border-radius:.25rem;outline:none;appearance:none;transition:var(--btn-transition)}.btn-appearance:focus,.btn-appearance:hover{box-shadow:0 0 0 3px var(--black-15)}.color-preview{box-shadow:0 0 0 1px rgba(120,120,120,.33) inset;direction:ltr}.txt-dark .color-preview{color:var(--white-75)}.txt-dark .color-preview:focus{box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--black-15)}.txt-dark .color-preview::placeholder{color:var(--white-50)}.txt-light .color-preview{color:var(--black-75)}.txt-light .color-preview:focus{color:var(--black-75);box-shadow:0 0 0 1px #000 inset,0 0 0 3px var(--black-15)}.txt-light .color-preview::placeholder{color:var(--black-50)}.picker-toggle{position:absolute;inset:0;width:100%;height:100%;cursor:pointer;background:rgba(0,0,0,0);border:0}.open .picker-toggle{z-index:-1}.menu-toggle{position:absolute;top:0;right:0;display:flex;width:3rem;height:100%;padding:0 .25rem;cursor:pointer;border:0;border-radius:0 .25rem .25rem 0}.txt-light .menu-toggle{background:var(--black-50)}.txt-light .menu-toggle:focus{background:var(--black-75)}.txt-dark .menu-toggle{background:var(--white-33)}.txt-dark .menu-toggle:focus{background:var(--white-50)}.menu-toggle svg{width:auto;height:100%}.scrollable{overflow-x:hidden;overflow-y:auto;scrollbar-width:thin}.scrollable::-webkit-scrollbar{width:.5rem}.scrollable::-webkit-scrollbar-track{background-color:rgba(0,0,0,0)}.scrollable::-webkit-scrollbar-thumb{width:.5rem;background-color:rgba(0,0,0,0);background-clip:content-box;border:0}.scrollable:hover::-webkit-scrollbar-thumb{background-color:var(--dropdown-scrollbar-bg)}.scrollable::-webkit-scrollbar-thumb:hover{background-color:var(--dropdown-scrollbar-bg-hover)}.color-defaults{display:none;flex-flow:column wrap;margin:0;list-style:none;padding-inline:0}.color-dropdown.menu .color-defaults,.color-dropdown.picker .color-controls{display:flex}.color-defaults .color-option{padding:.25rem .5rem;color:inherit}.color-option{cursor:pointer}.color-defaults .color-option:focus,.color-defaults .color-option:hover{color:var(--option-color-hover);background:var(--option-bg-hover);outline:none}.color-defaults .color-option:active,.color-defaults .color-option.active{color:var(--option-color-active);background:var(--option-bg-active)}.color-options{--grid-item-size: 2rem;--grid-fit: 5;--grid-gap: .25rem;--grid-height: auto;--grid-hover-height: auto;display:grid;padding:0;margin:0;list-style:none;grid-template-columns:repeat(var(--grid-fit), var(--grid-item-size));grid-template-rows:repeat(auto-fill, var(--grid-item-size));gap:var(--grid-gap)}.color-options.scrollable{height:var(--grid-height);margin:0 -0.5rem 0 0;overflow-y:scroll;transition:var(--options-transition)}.color-dropdown.menu:hover .scrollable{height:var(--grid-hover-height)}.color-options+.color-defaults{margin-top:.25rem}.multiline+.color-defaults{flex-flow:row wrap}.multiline+.color-defaults .color-option{padding:.25rem .33rem;font-size:12px}.color-options .color-option{position:relative;width:var(--grid-item-size);height:var(--grid-item-size);overflow:hidden;color:rgba(0,0,0,0)}.color-options .color-option:active,.color-options .color-option:focus{outline:none;box-shadow:0 0 0 4px rgba(125,125,125,.75) inset}.color-options .color-option::before{position:absolute;inset:0}.color-options .color-option:hover::before,.color-options .color-option:active::before,.color-options .color-option:focus::before{content:"";border:3px solid var(--white-75);mix-blend-mode:difference}.color-options .color-option.active::after{position:absolute;top:50%;left:50%;width:4px;height:4px;margin:-2px 0 0 -2px;content:"";border-radius:4px}.txt-dark .color-options .color-option.active::after{box-shadow:0 0 0 4px var(--white-90)}.txt-light .color-options .color-option.active::after{box-shadow:0 0 0 4px var(--black-90)}.color-form{display:flex;flex-flow:row wrap;align-items:center;padding:.25rem 0 0;font:12px sans-serif}.color-form.hex{max-width:initial}.color-form>*{flex:1 0 0%;width:17.5%;max-width:17.5%}.color-form label{width:7.5%;max-width:7.5%;text-align:center}.color-input{color:inherit;text-align:right;background:rgba(0,0,0,0);border:var(--input-border);outline:none}.color-input.hex{width:92.5%;max-width:92.5%}.color-input:active,.color-input:focus{background:var(--input-bg-hover);border:var(--input-border-hover)}.visual-control{height:230px;touch-action:none;box-shadow:var(--visual-shadow)}.visual-control1{width:230px}.visual-control2,.visual-control3{width:21px;cursor:ns-resize}@media(width >= 980px){.visual-control{height:300px}.visual-control1{width:300px}}.color-control{position:relative;display:inline-block}.color-slider{left:0;width:calc(100% - 2px);cursor:ns-resize}.color-control+.color-control{margin-left:.5rem}.knob{position:absolute;top:0;left:0;width:100%;height:7px;touch-action:none;user-select:none;background-color:var(--knob-bg);border:var(--knob-border);border-radius:5px;outline:none;will-change:transform}.knob:hover{box-shadow:var(--knob-shadow-hover)}.knob:focus,.knob:active{z-index:1;box-shadow:var(--knob-shadow-active)}.color-pointer{width:7px;background-color:rgba(0,0,0,0);border:0}.txt-dark .color-pointer{box-shadow:0 0 0 5px var(--white-50)}.txt-light .color-pointer{box-shadow:0 0 0 5px var(--black-50)}.txt-dark .color-pointer:hover{box-shadow:0 0 0 5px var(--white-75)}.txt-light .color-pointer:hover{box-shadow:0 0 0 5px var(--black-75)}.txt-dark .color-pointer:focus,.txt-dark .color-pointer:active{box-shadow:0 0 0 5px var(--white-90)}.txt-light .color-pointer:focus,.txt-light .color-pointer:active{box-shadow:0 0 0 5px var(--black-90)}.v-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}[dir=rtl] .color-preview{text-align:right}[dir=rtl] .menu-toggle{right:auto;left:0;border-radius:.25rem 0 0 .25rem}[dir=rtl] .color-dropdown.picker{right:0;left:auto}[dir=rtl] .color-dropdown.menu{right:auto;left:0}[dir=rtl] .color-control+.color-control{margin-right:.5rem;margin-left:0}[dir=rtl] .color-options.scrollable{margin:0 0 0 -0.5rem}